]> git.sur5r.net Git - openldap/blob - configure
Update slapd limits handling (from Ando)
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.478.2.18 2004/04/15 20:48:20 kurt Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 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-2004 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 = yes -o $ol_enable_hdb = yes ; 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
2408         elif test $ol_enable_bdb = auto ; then
2409                 if test $ol_with_ldbm_api != berkeley \
2410                         -o $ol_with_ldbm_api != auto ; then
2411                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2412                         ol_enable_bdb=no
2413                 fi
2414         fi
2415 fi
2416
2417 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2418         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2419 fi
2420
2421 if test $ol_enable_slurpd = yes ; then
2422                 if test $ol_with_threads = no ; then
2423                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2424         fi
2425 fi
2426
2427 if test $ol_enable_lmpasswd = yes ; then
2428         if test $ol_with_tls = no ; then
2429                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2430         fi
2431 fi
2432
2433 if test $ol_enable_kbind = yes ; then
2434         if test $ol_with_kerberos = no ; then
2435                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2436         elif test $ol_with_kerberos = auto ; then
2437                 ol_with_kerberos=yes
2438         fi
2439
2440 elif test $ol_enable_kbind = no ; then
2441         if test $ol_with_kerberos = auto ; then
2442                 ol_with_kerberos=no
2443         elif test $ol_with_kerberos != no ; then
2444                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2445                 ol_with_kerberos=no
2446         fi
2447 fi
2448
2449 if test $ol_enable_spasswd = yes ; then
2450         if test $ol_with_cyrus_sasl = no ; then
2451                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2452         fi
2453         ol_with_cyrus_sasl=yes
2454 fi
2455
2456 echo "$ac_t""done" 1>&6
2457
2458 LDAP_LIBS=
2459 LDBM_LIBS=
2460 LTHREAD_LIBS=
2461 LUTIL_LIBS=
2462
2463 SLAPD_LIBS=
2464 SLURPD_LIBS=
2465
2466 BUILD_SLAPD=no
2467 BUILD_SLURPD=no
2468
2469 BUILD_THREAD=no
2470
2471 BUILD_SLAPI=no
2472 SLAPD_SLAPI_DEPEND=
2473
2474 BUILD_BDB=no
2475 BUILD_DNSSRV=no
2476 BUILD_HDB=no
2477 BUILD_LDAP=no
2478 BUILD_LDBM=no
2479 BUILD_META=no
2480 BUILD_MONITOR=no
2481 BUILD_NULL=no
2482 BUILD_PASSWD=no
2483 BUILD_PERL=no
2484 BUILD_SHELL=no
2485 BUILD_SQL=no
2486
2487 BUILD_DYNGROUP=no
2488 BUILD_PROXYCACHE=no
2489
2490 SLAPD_DYNAMIC_OVERLAYS=
2491
2492 SLAPD_MODULES_LDFLAGS=
2493 SLAPD_MODULES_CPPFLAGS=
2494
2495 SLAPD_STATIC_BACKENDS=
2496 SLAPD_DYNAMIC_BACKENDS=
2497
2498 SLAPD_PERL_LDFLAGS=
2499 MOD_PERL_LDFLAGS=
2500 PERL_CPPFLAGS=
2501
2502 SLAPD_SQL_LDFLAGS=
2503 SLAPD_SQL_LIBS=
2504 SLAPD_SQL_INCLUDES=
2505
2506 KRB4_LIBS=
2507 KRB5_LIBS=
2508 SASL_LIBS=
2509 TLS_LIBS=
2510 MODULES_LIBS=
2511 SLAPI_LIBS=
2512 LIBSLAPI=
2513 LIBSLAPITOOLS=
2514 AUTH_LIBS=
2515
2516 SLAPD_SLP_LIBS=
2517
2518
2519 # Find a good install program.  We prefer a C program (faster),
2520 # so one script is as good as another.  But avoid the broken or
2521 # incompatible versions:
2522 # SysV /etc/install, /usr/sbin/install
2523 # SunOS /usr/etc/install
2524 # IRIX /sbin/install
2525 # AIX /bin/install
2526 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2527 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2528 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2529 # ./install, which can be erroneously created by make from ./install.sh.
2530 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2531 echo "configure:2532: checking for a BSD compatible install" >&5
2532 if test -z "$INSTALL"; then
2533 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2534   echo $ac_n "(cached) $ac_c" 1>&6
2535 else
2536     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2537   for ac_dir in $PATH; do
2538     # Account for people who put trailing slashes in PATH elements.
2539     case "$ac_dir/" in
2540     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2541     *)
2542       # OSF1 and SCO ODT 3.0 have their own names for install.
2543       # Don't use installbsd from OSF since it installs stuff as root
2544       # by default.
2545       for ac_prog in ginstall scoinst install; do
2546         if test -f $ac_dir/$ac_prog; then
2547           if test $ac_prog = install &&
2548             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2549             # AIX install.  It has an incompatible calling convention.
2550             :
2551           elif test $ac_prog = install &&
2552             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2553             # program-specific install script used by HP pwplus--don't use.
2554             :
2555           else
2556             ac_cv_path_install="$ac_dir/$ac_prog -c"
2557             break 2
2558           fi
2559         fi
2560       done
2561       ;;
2562     esac
2563   done
2564   IFS="$ac_save_IFS"
2565
2566 fi
2567   if test "${ac_cv_path_install+set}" = set; then
2568     INSTALL="$ac_cv_path_install"
2569   else
2570     # As a last resort, use the slow shell script.  We don't cache a
2571     # path for INSTALL within a source directory, because that will
2572     # break other packages using the cache if that directory is
2573     # removed, or if the path is relative.
2574     INSTALL="$ac_install_sh"
2575   fi
2576 fi
2577 echo "$ac_t""$INSTALL" 1>&6
2578
2579 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2580 # It thinks the first close brace ends the variable substitution.
2581 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2582
2583 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2584
2585 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2586
2587
2588 cat >> confdefs.h <<\EOF
2589 #define HAVE_MKVERSION 1
2590 EOF
2591
2592
2593
2594
2595 ol_aix_threads=no
2596 case "$target" in
2597 *-*-aix*)       if test -z "$CC" ; then
2598                 case "$ol_with_threads" in
2599                 auto | yes |  posix) ol_aix_threads=yes ;;
2600                 esac
2601         fi
2602 ;;
2603 esac
2604
2605 if test $ol_aix_threads = yes ; then
2606         if test -z "${CC}" ; then
2607                 for ac_prog in cc_r xlc_r cc
2608 do
2609 # Extract the first word of "$ac_prog", so it can be a program name with args.
2610 set dummy $ac_prog; ac_word=$2
2611 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2612 echo "configure:2613: checking for $ac_word" >&5
2613 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2614   echo $ac_n "(cached) $ac_c" 1>&6
2615 else
2616   if test -n "$CC"; then
2617   ac_cv_prog_CC="$CC" # Let the user override the test.
2618 else
2619   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2620   ac_dummy="$PATH"
2621   for ac_dir in $ac_dummy; do
2622     test -z "$ac_dir" && ac_dir=.
2623     if test -f $ac_dir/$ac_word; then
2624       ac_cv_prog_CC="$ac_prog"
2625       break
2626     fi
2627   done
2628   IFS="$ac_save_ifs"
2629 fi
2630 fi
2631 CC="$ac_cv_prog_CC"
2632 if test -n "$CC"; then
2633   echo "$ac_t""$CC" 1>&6
2634 else
2635   echo "$ac_t""no" 1>&6
2636 fi
2637
2638 test -n "$CC" && break
2639 done
2640
2641
2642                 if test "$CC" = cc ; then
2643                                                 if test $ol_with_threads != auto ; then
2644                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2645                         else
2646                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2647                         fi
2648                         ol_with_threads=no
2649                 fi
2650         fi
2651
2652         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2653                 ol_with_threads=posix
2654                 ol_cv_pthread_create=yes
2655         fi
2656 fi
2657
2658 if test -z "${CC}"; then
2659         for ac_prog in cc gcc
2660 do
2661 # Extract the first word of "$ac_prog", so it can be a program name with args.
2662 set dummy $ac_prog; ac_word=$2
2663 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2664 echo "configure:2665: checking for $ac_word" >&5
2665 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2666   echo $ac_n "(cached) $ac_c" 1>&6
2667 else
2668   if test -n "$CC"; then
2669   ac_cv_prog_CC="$CC" # Let the user override the test.
2670 else
2671   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2672   ac_dummy="$PATH"
2673   for ac_dir in $ac_dummy; do
2674     test -z "$ac_dir" && ac_dir=.
2675     if test -f $ac_dir/$ac_word; then
2676       ac_cv_prog_CC="$ac_prog"
2677       break
2678     fi
2679   done
2680   IFS="$ac_save_ifs"
2681 fi
2682 fi
2683 CC="$ac_cv_prog_CC"
2684 if test -n "$CC"; then
2685   echo "$ac_t""$CC" 1>&6
2686 else
2687   echo "$ac_t""no" 1>&6
2688 fi
2689
2690 test -n "$CC" && break
2691 done
2692 test -n "$CC" || CC="missing"
2693
2694
2695         if test "${CC}" = "missing" ; then
2696                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2697         fi
2698 fi
2699
2700 if test -z "${AR}"; then
2701         for ac_prog in ar gar
2702 do
2703 # Extract the first word of "$ac_prog", so it can be a program name with args.
2704 set dummy $ac_prog; ac_word=$2
2705 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2706 echo "configure:2707: checking for $ac_word" >&5
2707 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2708   echo $ac_n "(cached) $ac_c" 1>&6
2709 else
2710   if test -n "$AR"; then
2711   ac_cv_prog_AR="$AR" # Let the user override the test.
2712 else
2713   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2714   ac_dummy="$PATH"
2715   for ac_dir in $ac_dummy; do
2716     test -z "$ac_dir" && ac_dir=.
2717     if test -f $ac_dir/$ac_word; then
2718       ac_cv_prog_AR="$ac_prog"
2719       break
2720     fi
2721   done
2722   IFS="$ac_save_ifs"
2723 fi
2724 fi
2725 AR="$ac_cv_prog_AR"
2726 if test -n "$AR"; then
2727   echo "$ac_t""$AR" 1>&6
2728 else
2729   echo "$ac_t""no" 1>&6
2730 fi
2731
2732 test -n "$AR" && break
2733 done
2734 test -n "$AR" || AR="missing"
2735
2736
2737         if test "${AR}" = "missing" ; then
2738                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
2739         fi
2740 fi
2741
2742
2743
2744 # Find the correct PATH separator.  Usually this is `:', but
2745 # DJGPP uses `;' like DOS.
2746 if test "X${PATH_SEPARATOR+set}" != Xset; then
2747   UNAME=${UNAME-`uname 2>/dev/null`}
2748   case X$UNAME in
2749     *-DOS) lt_cv_sys_path_separator=';' ;;
2750     *)     lt_cv_sys_path_separator=':' ;;
2751   esac
2752   PATH_SEPARATOR=$lt_cv_sys_path_separator
2753 fi
2754
2755 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2756 echo "configure:2757: checking for Cygwin environment" >&5
2757 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
2758   echo $ac_n "(cached) $ac_c" 1>&6
2759 else
2760   cat > conftest.$ac_ext <<EOF
2761 #line 2762 "configure"
2762 #include "confdefs.h"
2763
2764 int main() {
2765
2766 #ifndef __CYGWIN__
2767 #define __CYGWIN__ __CYGWIN32__
2768 #endif
2769 return __CYGWIN__;
2770 ; return 0; }
2771 EOF
2772 if { (eval echo configure:2773: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2773   rm -rf conftest*
2774   ac_cv_cygwin=yes
2775 else
2776   echo "configure: failed program was:" >&5
2777   cat conftest.$ac_ext >&5
2778   rm -rf conftest*
2779   ac_cv_cygwin=no
2780 fi
2781 rm -f conftest*
2782 fi
2783
2784 echo "$ac_t""$ac_cv_cygwin" 1>&6
2785 CYGWIN=
2786 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2787 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2788 echo "configure:2789: checking for mingw32 environment" >&5
2789 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
2790   echo $ac_n "(cached) $ac_c" 1>&6
2791 else
2792   cat > conftest.$ac_ext <<EOF
2793 #line 2794 "configure"
2794 #include "confdefs.h"
2795
2796 int main() {
2797 return __MINGW32__;
2798 ; return 0; }
2799 EOF
2800 if { (eval echo configure:2801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2801   rm -rf conftest*
2802   ac_cv_mingw32=yes
2803 else
2804   echo "configure: failed program was:" >&5
2805   cat conftest.$ac_ext >&5
2806   rm -rf conftest*
2807   ac_cv_mingw32=no
2808 fi
2809 rm -f conftest*
2810 fi
2811
2812 echo "$ac_t""$ac_cv_mingw32" 1>&6
2813 MINGW32=
2814 test "$ac_cv_mingw32" = yes && MINGW32=yes
2815 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
2816 echo "configure:2817: checking for EMX OS/2 environment" >&5
2817 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
2818   echo $ac_n "(cached) $ac_c" 1>&6
2819 else
2820   cat > conftest.$ac_ext <<EOF
2821 #line 2822 "configure"
2822 #include "confdefs.h"
2823
2824 int main() {
2825 return __EMX__;
2826 ; return 0; }
2827 EOF
2828 if { (eval echo configure:2829: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2829   rm -rf conftest*
2830   ac_cv_emxos2=yes
2831 else
2832   echo "configure: failed program was:" >&5
2833   cat conftest.$ac_ext >&5
2834   rm -rf conftest*
2835   ac_cv_emxos2=no
2836 fi
2837 rm -f conftest*
2838 fi
2839
2840 echo "$ac_t""$ac_cv_emxos2" 1>&6
2841 EMXOS2=
2842 test "$ac_cv_emxos2" = yes && EMXOS2=yes
2843 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
2844 echo "configure:2845: checking how to run the C preprocessor" >&5
2845 # On Suns, sometimes $CPP names a directory.
2846 if test -n "$CPP" && test -d "$CPP"; then
2847   CPP=
2848 fi
2849 if test -z "$CPP"; then
2850 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
2851   echo $ac_n "(cached) $ac_c" 1>&6
2852 else
2853     # This must be in double quotes, not single quotes, because CPP may get
2854   # substituted into the Makefile and "${CC-cc}" will confuse make.
2855   CPP="${CC-cc} -E"
2856   # On the NeXT, cc -E runs the code through the compiler's parser,
2857   # not just through cpp.
2858   cat > conftest.$ac_ext <<EOF
2859 #line 2860 "configure"
2860 #include "confdefs.h"
2861 #include <assert.h>
2862 Syntax Error
2863 EOF
2864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2865 { (eval echo configure:2866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2867 if test -z "$ac_err"; then
2868   :
2869 else
2870   echo "$ac_err" >&5
2871   echo "configure: failed program was:" >&5
2872   cat conftest.$ac_ext >&5
2873   rm -rf conftest*
2874   CPP="${CC-cc} -E -traditional-cpp"
2875   cat > conftest.$ac_ext <<EOF
2876 #line 2877 "configure"
2877 #include "confdefs.h"
2878 #include <assert.h>
2879 Syntax Error
2880 EOF
2881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2882 { (eval echo configure:2883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2884 if test -z "$ac_err"; then
2885   :
2886 else
2887   echo "$ac_err" >&5
2888   echo "configure: failed program was:" >&5
2889   cat conftest.$ac_ext >&5
2890   rm -rf conftest*
2891   CPP="${CC-cc} -nologo -E"
2892   cat > conftest.$ac_ext <<EOF
2893 #line 2894 "configure"
2894 #include "confdefs.h"
2895 #include <assert.h>
2896 Syntax Error
2897 EOF
2898 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
2899 { (eval echo configure:2900: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
2900 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
2901 if test -z "$ac_err"; then
2902   :
2903 else
2904   echo "$ac_err" >&5
2905   echo "configure: failed program was:" >&5
2906   cat conftest.$ac_ext >&5
2907   rm -rf conftest*
2908   CPP=/lib/cpp
2909 fi
2910 rm -f conftest*
2911 fi
2912 rm -f conftest*
2913 fi
2914 rm -f conftest*
2915   ac_cv_prog_CPP="$CPP"
2916 fi
2917   CPP="$ac_cv_prog_CPP"
2918 else
2919   ac_cv_prog_CPP="$CPP"
2920 fi
2921 echo "$ac_t""$CPP" 1>&6
2922
2923 # Check whether --enable-fast-install or --disable-fast-install was given.
2924 if test "${enable_fast_install+set}" = set; then
2925   enableval="$enable_fast_install"
2926   p=${PACKAGE-default}
2927 case $enableval in
2928 yes) enable_fast_install=yes ;;
2929 no) enable_fast_install=no ;;
2930 *)
2931   enable_fast_install=no
2932   # Look at the argument we got.  We use all the common list separators.
2933   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2934   for pkg in $enableval; do
2935     if test "X$pkg" = "X$p"; then
2936       enable_fast_install=yes
2937     fi
2938   done
2939   IFS="$ac_save_ifs"
2940   ;;
2941 esac
2942 else
2943   enable_fast_install=yes
2944 fi
2945
2946 # Extract the first word of "gcc", so it can be a program name with args.
2947 set dummy gcc; ac_word=$2
2948 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2949 echo "configure:2950: checking for $ac_word" >&5
2950 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2951   echo $ac_n "(cached) $ac_c" 1>&6
2952 else
2953   if test -n "$CC"; then
2954   ac_cv_prog_CC="$CC" # Let the user override the test.
2955 else
2956   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2957   ac_dummy="$PATH"
2958   for ac_dir in $ac_dummy; do
2959     test -z "$ac_dir" && ac_dir=.
2960     if test -f $ac_dir/$ac_word; then
2961       ac_cv_prog_CC="gcc"
2962       break
2963     fi
2964   done
2965   IFS="$ac_save_ifs"
2966 fi
2967 fi
2968 CC="$ac_cv_prog_CC"
2969 if test -n "$CC"; then
2970   echo "$ac_t""$CC" 1>&6
2971 else
2972   echo "$ac_t""no" 1>&6
2973 fi
2974
2975 if test -z "$CC"; then
2976   # Extract the first word of "cc", so it can be a program name with args.
2977 set dummy cc; ac_word=$2
2978 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2979 echo "configure:2980: checking for $ac_word" >&5
2980 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2981   echo $ac_n "(cached) $ac_c" 1>&6
2982 else
2983   if test -n "$CC"; then
2984   ac_cv_prog_CC="$CC" # Let the user override the test.
2985 else
2986   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2987   ac_prog_rejected=no
2988   ac_dummy="$PATH"
2989   for ac_dir in $ac_dummy; do
2990     test -z "$ac_dir" && ac_dir=.
2991     if test -f $ac_dir/$ac_word; then
2992       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
2993         ac_prog_rejected=yes
2994         continue
2995       fi
2996       ac_cv_prog_CC="cc"
2997       break
2998     fi
2999   done
3000   IFS="$ac_save_ifs"
3001 if test $ac_prog_rejected = yes; then
3002   # We found a bogon in the path, so make sure we never use it.
3003   set dummy $ac_cv_prog_CC
3004   shift
3005   if test $# -gt 0; then
3006     # We chose a different compiler from the bogus one.
3007     # However, it has the same basename, so the bogon will be chosen
3008     # first if we set CC to just the basename; use the full file name.
3009     shift
3010     set dummy "$ac_dir/$ac_word" "$@"
3011     shift
3012     ac_cv_prog_CC="$@"
3013   fi
3014 fi
3015 fi
3016 fi
3017 CC="$ac_cv_prog_CC"
3018 if test -n "$CC"; then
3019   echo "$ac_t""$CC" 1>&6
3020 else
3021   echo "$ac_t""no" 1>&6
3022 fi
3023
3024   if test -z "$CC"; then
3025     case "`uname -s`" in
3026     *win32* | *WIN32* | *CYGWIN*)
3027       # Extract the first word of "cl", so it can be a program name with args.
3028 set dummy cl; ac_word=$2
3029 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3030 echo "configure:3031: checking for $ac_word" >&5
3031 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3032   echo $ac_n "(cached) $ac_c" 1>&6
3033 else
3034   if test -n "$CC"; then
3035   ac_cv_prog_CC="$CC" # Let the user override the test.
3036 else
3037   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3038   ac_dummy="$PATH"
3039   for ac_dir in $ac_dummy; do
3040     test -z "$ac_dir" && ac_dir=.
3041     if test -f $ac_dir/$ac_word; then
3042       ac_cv_prog_CC="cl"
3043       break
3044     fi
3045   done
3046   IFS="$ac_save_ifs"
3047 fi
3048 fi
3049 CC="$ac_cv_prog_CC"
3050 if test -n "$CC"; then
3051   echo "$ac_t""$CC" 1>&6
3052 else
3053   echo "$ac_t""no" 1>&6
3054 fi
3055  ;;
3056     esac
3057   fi
3058   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3059 fi
3060
3061 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3062 echo "configure:3063: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3063
3064 ac_ext=c
3065 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3066 ac_cpp='$CPP $CPPFLAGS'
3067 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3068 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3069 cross_compiling=$ac_cv_prog_cc_cross
3070
3071 cat > conftest.$ac_ext << EOF
3072
3073 #line 3074 "configure"
3074 #include "confdefs.h"
3075
3076 main(){return(0);}
3077 EOF
3078 if { (eval echo configure:3079: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3079   ac_cv_prog_cc_works=yes
3080   # If we can't run a trivial program, we are probably using a cross compiler.
3081   if (./conftest; exit) 2>/dev/null; then
3082     ac_cv_prog_cc_cross=no
3083   else
3084     ac_cv_prog_cc_cross=yes
3085   fi
3086 else
3087   echo "configure: failed program was:" >&5
3088   cat conftest.$ac_ext >&5
3089   ac_cv_prog_cc_works=no
3090 fi
3091 rm -fr conftest*
3092 ac_ext=c
3093 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3094 ac_cpp='$CPP $CPPFLAGS'
3095 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3096 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3097 cross_compiling=$ac_cv_prog_cc_cross
3098
3099 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3100 if test $ac_cv_prog_cc_works = no; then
3101   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3102 fi
3103 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3104 echo "configure:3105: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3105 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3106 cross_compiling=$ac_cv_prog_cc_cross
3107
3108 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3109 echo "configure:3110: checking whether we are using GNU C" >&5
3110 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3111   echo $ac_n "(cached) $ac_c" 1>&6
3112 else
3113   cat > conftest.c <<EOF
3114 #ifdef __GNUC__
3115   yes;
3116 #endif
3117 EOF
3118 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3119: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3119   ac_cv_prog_gcc=yes
3120 else
3121   ac_cv_prog_gcc=no
3122 fi
3123 fi
3124
3125 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3126
3127 if test $ac_cv_prog_gcc = yes; then
3128   GCC=yes
3129 else
3130   GCC=
3131 fi
3132
3133 ac_test_CFLAGS="${CFLAGS+set}"
3134 ac_save_CFLAGS="$CFLAGS"
3135 CFLAGS=
3136 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3137 echo "configure:3138: checking whether ${CC-cc} accepts -g" >&5
3138 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3139   echo $ac_n "(cached) $ac_c" 1>&6
3140 else
3141   echo 'void f(){}' > conftest.c
3142 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3143   ac_cv_prog_cc_g=yes
3144 else
3145   ac_cv_prog_cc_g=no
3146 fi
3147 rm -f conftest*
3148
3149 fi
3150
3151 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3152 if test "$ac_test_CFLAGS" = set; then
3153   CFLAGS="$ac_save_CFLAGS"
3154 elif test $ac_cv_prog_cc_g = yes; then
3155   if test "$GCC" = yes; then
3156     CFLAGS="-g -O2"
3157   else
3158     CFLAGS="-g"
3159   fi
3160 else
3161   if test "$GCC" = yes; then
3162     CFLAGS="-O2"
3163   else
3164     CFLAGS=
3165   fi
3166 fi
3167
3168 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3169 if test "${with_gnu_ld+set}" = set; then
3170   withval="$with_gnu_ld"
3171   test "$withval" = no || with_gnu_ld=yes
3172 else
3173   with_gnu_ld=no
3174 fi
3175
3176 ac_prog=ld
3177 if test "$GCC" = yes; then
3178   # Check if gcc -print-prog-name=ld gives a path.
3179   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3180 echo "configure:3181: checking for ld used by GCC" >&5
3181   case $host in
3182   *-*-mingw*)
3183     # gcc leaves a trailing carriage return which upsets mingw
3184     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3185   *)
3186     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3187   esac
3188   case $ac_prog in
3189     # Accept absolute paths.
3190     [\\/]* | [A-Za-z]:[\\/]*)
3191       re_direlt='/[^/][^/]*/\.\./'
3192       # Canonicalize the path of ld
3193       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3194       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3195         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3196       done
3197       test -z "$LD" && LD="$ac_prog"
3198       ;;
3199   "")
3200     # If it fails, then pretend we aren't using GCC.
3201     ac_prog=ld
3202     ;;
3203   *)
3204     # If it is relative, then search for the first ld in PATH.
3205     with_gnu_ld=unknown
3206     ;;
3207   esac
3208 elif test "$with_gnu_ld" = yes; then
3209   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3210 echo "configure:3211: checking for GNU ld" >&5
3211 else
3212   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3213 echo "configure:3214: checking for non-GNU ld" >&5
3214 fi
3215 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3216   echo $ac_n "(cached) $ac_c" 1>&6
3217 else
3218   if test -z "$LD"; then
3219   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3220   for ac_dir in $PATH; do
3221     test -z "$ac_dir" && ac_dir=.
3222     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3223       lt_cv_path_LD="$ac_dir/$ac_prog"
3224       # Check to see if the program is GNU ld.  I'd rather use --version,
3225       # but apparently some GNU ld's only accept -v.
3226       # Break only if it was the GNU/non-GNU ld that we prefer.
3227       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3228         test "$with_gnu_ld" != no && break
3229       else
3230         test "$with_gnu_ld" != yes && break
3231       fi
3232     fi
3233   done
3234   IFS="$ac_save_ifs"
3235 else
3236   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3237 fi
3238 fi
3239
3240 LD="$lt_cv_path_LD"
3241 if test -n "$LD"; then
3242   echo "$ac_t""$LD" 1>&6
3243 else
3244   echo "$ac_t""no" 1>&6
3245 fi
3246 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3247 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3248 echo "configure:3249: checking if the linker ($LD) is GNU ld" >&5
3249 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3250   echo $ac_n "(cached) $ac_c" 1>&6
3251 else
3252   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3253 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3254   lt_cv_prog_gnu_ld=yes
3255 else
3256   lt_cv_prog_gnu_ld=no
3257 fi
3258 fi
3259
3260 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3261 with_gnu_ld=$lt_cv_prog_gnu_ld
3262
3263
3264 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3265 echo "configure:3266: checking for $LD option to reload object files" >&5
3266 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3267   echo $ac_n "(cached) $ac_c" 1>&6
3268 else
3269   lt_cv_ld_reload_flag='-r'
3270 fi
3271
3272 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3273 reload_flag=$lt_cv_ld_reload_flag
3274 test -n "$reload_flag" && reload_flag=" $reload_flag"
3275
3276 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3277 echo "configure:3278: checking for BSD-compatible nm" >&5
3278 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3279   echo $ac_n "(cached) $ac_c" 1>&6
3280 else
3281   if test -n "$NM"; then
3282   # Let the user override the test.
3283   lt_cv_path_NM="$NM"
3284 else
3285   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3286   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3287     test -z "$ac_dir" && ac_dir=.
3288     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3289     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3290       # Check to see if the nm accepts a BSD-compat flag.
3291       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3292       #   nm: unknown option "B" ignored
3293       # Tru64's nm complains that /dev/null is an invalid object file
3294       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3295         lt_cv_path_NM="$tmp_nm -B"
3296         break
3297       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3298         lt_cv_path_NM="$tmp_nm -p"
3299         break
3300       else
3301         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3302         continue # so that we can try to find one that supports BSD flags
3303       fi
3304     fi
3305   done
3306   IFS="$ac_save_ifs"
3307   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3308 fi
3309 fi
3310
3311 NM="$lt_cv_path_NM"
3312 echo "$ac_t""$NM" 1>&6
3313
3314 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3315 echo "configure:3316: checking for a sed that does not truncate output" >&5
3316 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3317   echo $ac_n "(cached) $ac_c" 1>&6
3318 else
3319   # Loop through the user's path and test for sed and gsed.
3320 # Then use that list of sed's as ones to test for truncation.
3321 as_executable_p="test -f"
3322 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3323 for as_dir in $PATH
3324 do
3325   IFS=$as_save_IFS
3326   test -z "$as_dir" && as_dir=.
3327   for ac_prog in sed gsed; do
3328     for ac_exec_ext in '' $ac_executable_extensions; do
3329       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3330         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3331       fi
3332     done
3333   done
3334 done
3335
3336   # Create a temporary directory, and hook for its removal unless debugging.
3337 $debug ||
3338 {
3339   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3340   trap '{ (exit 1); exit 1; }' 1 2 13 15
3341 }
3342
3343 # Create a (secure) tmp directory for tmp files.
3344 : ${TMPDIR=/tmp}
3345 {
3346   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3347   test -n "$tmp" && test -d "$tmp"
3348 }  ||
3349 {
3350   tmp=$TMPDIR/sed$$-$RANDOM
3351   (umask 077 && mkdir $tmp)
3352 } ||
3353 {
3354    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3355    { (exit 1); exit 1; }
3356 }
3357   _max=0
3358   _count=0
3359   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3360   # along with /bin/sed that truncates output.
3361   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3362     test ! -f ${_sed} && break
3363     cat /dev/null > "$tmp/sed.in"
3364     _count=0
3365     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3366     # Check for GNU sed and select it if it is found.
3367     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3368       lt_cv_path_SED=${_sed}
3369       break
3370     fi
3371     while true; do
3372       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3373       mv "$tmp/sed.tmp" "$tmp/sed.in"
3374       cp "$tmp/sed.in" "$tmp/sed.nl"
3375       echo >>"$tmp/sed.nl"
3376       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3377       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3378       # 40000 chars as input seems more than enough
3379       test $_count -gt 10 && break
3380       _count=`expr $_count + 1`
3381       if test $_count -gt $_max; then
3382         _max=$_count
3383         lt_cv_path_SED=$_sed
3384       fi
3385     done
3386   done
3387   rm -rf "$tmp"
3388
3389 fi
3390
3391 if test "X$SED" != "X"; then
3392   lt_cv_path_SED=$SED
3393 else
3394   SED=$lt_cv_path_SED
3395 fi
3396 echo "$ac_t""$SED" 1>&6
3397
3398 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3399 echo "configure:3400: checking whether ln -s works" >&5
3400 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3401   echo $ac_n "(cached) $ac_c" 1>&6
3402 else
3403   rm -f conftestdata
3404 if ln -s X conftestdata 2>/dev/null
3405 then
3406   rm -f conftestdata
3407   ac_cv_prog_LN_S="ln -s"
3408 else
3409   ac_cv_prog_LN_S=ln
3410 fi
3411 fi
3412 LN_S="$ac_cv_prog_LN_S"
3413 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3414   echo "$ac_t""yes" 1>&6
3415 else
3416   echo "$ac_t""no" 1>&6
3417 fi
3418
3419 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3420 echo "configure:3421: checking how to recognise dependent libraries" >&5
3421 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3422   echo $ac_n "(cached) $ac_c" 1>&6
3423 else
3424   lt_cv_file_magic_cmd='$MAGIC_CMD'
3425 lt_cv_file_magic_test_file=
3426 lt_cv_deplibs_check_method='unknown'
3427 # Need to set the preceding variable on all platforms that support
3428 # interlibrary dependencies.
3429 # 'none' -- dependencies not supported.
3430 # `unknown' -- same as none, but documents that we really don't know.
3431 # 'pass_all' -- all dependencies passed with no checks.
3432 # 'test_compile' -- check by making test program.
3433 # 'file_magic [[regex]]' -- check by looking for files in library path
3434 # which responds to the $file_magic_cmd with a given egrep regex.
3435 # If you have `file' or equivalent on your system and you're not sure
3436 # whether `pass_all' will *always* work, you probably want this one.
3437
3438 case $host_os in
3439 aix4* | aix5*)
3440   lt_cv_deplibs_check_method=pass_all
3441   ;;
3442
3443 beos*)
3444   lt_cv_deplibs_check_method=pass_all
3445   ;;
3446
3447 bsdi4*)
3448   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3449   lt_cv_file_magic_cmd='/usr/bin/file -L'
3450   lt_cv_file_magic_test_file=/shlib/libc.so
3451   ;;
3452
3453 cygwin* | mingw* | pw32*)
3454   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3455   lt_cv_file_magic_cmd='$OBJDUMP -f'
3456   ;;
3457
3458 darwin* | rhapsody*)
3459   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3460   lt_cv_file_magic_cmd='/usr/bin/file -L'
3461   case "$host_os" in
3462   rhapsody* | darwin1.[012])
3463     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3464     ;;
3465   *) # Darwin 1.3 on
3466     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3467     ;;
3468   esac
3469   ;;
3470
3471 freebsd*)
3472   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3473     case $host_cpu in
3474     i*86 )
3475       # Not sure whether the presence of OpenBSD here was a mistake.
3476       # Let's accept both of them until this is cleared up.
3477       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3478       lt_cv_file_magic_cmd=/usr/bin/file
3479       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3480       ;;
3481     esac
3482   else
3483     lt_cv_deplibs_check_method=pass_all
3484   fi
3485   ;;
3486
3487 gnu*)
3488   lt_cv_deplibs_check_method=pass_all
3489   ;;
3490
3491 hpux10.20*|hpux11*)
3492   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3493   lt_cv_file_magic_cmd=/usr/bin/file
3494   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3495   ;;
3496
3497 irix5* | irix6* | nonstopux*)
3498   case $host_os in
3499   irix5* | nonstopux*)
3500     # this will be overridden with pass_all, but let us keep it just in case
3501     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3502     ;;
3503   *)
3504     case $LD in
3505     *-32|*"-32 ") libmagic=32-bit;;
3506     *-n32|*"-n32 ") libmagic=N32;;
3507     *-64|*"-64 ") libmagic=64-bit;;
3508     *) libmagic=never-match;;
3509     esac
3510     # this will be overridden with pass_all, but let us keep it just in case
3511     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3512     ;;
3513   esac
3514   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3515   lt_cv_deplibs_check_method=pass_all
3516   ;;
3517
3518 # This must be Linux ELF.
3519 linux-gnu*)
3520   case $host_cpu in
3521   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3522     lt_cv_deplibs_check_method=pass_all ;;
3523   *)
3524     # glibc up to 2.1.1 does not perform some relocations on ARM
3525     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3526   esac
3527   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3528   ;;
3529
3530 netbsd*)
3531   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3532     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3533   else
3534     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3535   fi
3536   ;;
3537
3538 newos6*)
3539   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3540   lt_cv_file_magic_cmd=/usr/bin/file
3541   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3542   ;;
3543
3544 openbsd*)
3545   lt_cv_file_magic_cmd=/usr/bin/file
3546   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3547   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3548     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3549   else
3550     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3551   fi
3552   ;;
3553
3554 openedition*)
3555   lt_cv_deplibs_check_method=pass_all
3556   ;;
3557
3558 osf3* | osf4* | osf5*)
3559   # this will be overridden with pass_all, but let us keep it just in case
3560   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3561   lt_cv_file_magic_test_file=/shlib/libc.so
3562   lt_cv_deplibs_check_method=pass_all
3563   ;;
3564
3565 sco3.2v5*)
3566   lt_cv_deplibs_check_method=pass_all
3567   ;;
3568
3569 solaris*)
3570   lt_cv_deplibs_check_method=pass_all
3571   lt_cv_file_magic_test_file=/lib/libc.so
3572   ;;
3573
3574 sysv5uw[78]* | sysv4*uw2*)
3575   lt_cv_deplibs_check_method=pass_all
3576   ;;
3577
3578 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3579   case $host_vendor in
3580   motorola)
3581     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]'
3582     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3583     ;;
3584   ncr)
3585     lt_cv_deplibs_check_method=pass_all
3586     ;;
3587   sequent)
3588     lt_cv_file_magic_cmd='/bin/file'
3589     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3590     ;;
3591   sni)
3592     lt_cv_file_magic_cmd='/bin/file'
3593     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3594     lt_cv_file_magic_test_file=/lib/libc.so
3595     ;;
3596   siemens)
3597     lt_cv_deplibs_check_method=pass_all
3598     ;;
3599   esac
3600   ;;
3601 esac
3602
3603 fi
3604
3605 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3606 file_magic_cmd=$lt_cv_file_magic_cmd
3607 deplibs_check_method=$lt_cv_deplibs_check_method
3608
3609 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3610 echo "configure:3611: checking for object suffix" >&5
3611 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3612   echo $ac_n "(cached) $ac_c" 1>&6
3613 else
3614   rm -f conftest*
3615 echo 'int i = 1;' > conftest.$ac_ext
3616 if { (eval echo configure:3617: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3617   for ac_file in conftest.*; do
3618     case $ac_file in
3619     *.c) ;;
3620     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3621     esac
3622   done
3623 else
3624   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3625 fi
3626 rm -f conftest*
3627 fi
3628
3629 echo "$ac_t""$ac_cv_objext" 1>&6
3630 OBJEXT=$ac_cv_objext
3631 ac_objext=$ac_cv_objext
3632
3633
3634
3635
3636 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3637 echo "configure:3638: checking for executable suffix" >&5
3638 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3639   echo $ac_n "(cached) $ac_c" 1>&6
3640 else
3641   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3642   ac_cv_exeext=.exe
3643 else
3644   rm -f conftest*
3645   echo 'int main () { return 0; }' > conftest.$ac_ext
3646   ac_cv_exeext=
3647   if { (eval echo configure:3648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3648     for file in conftest.*; do
3649       case $file in
3650       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3651       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3652       esac
3653     done
3654   else
3655     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3656   fi
3657   rm -f conftest*
3658   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3659 fi
3660 fi
3661
3662 EXEEXT=""
3663 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3664 echo "$ac_t""${ac_cv_exeext}" 1>&6
3665 ac_exeext=$EXEEXT
3666
3667 if test $host != $build; then
3668   ac_tool_prefix=${host_alias}-
3669 else
3670   ac_tool_prefix=
3671 fi
3672
3673
3674
3675
3676 # Check for command to grab the raw symbol name followed by C symbol from nm.
3677 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3678 echo "configure:3679: checking command to parse $NM output" >&5
3679 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3680   echo $ac_n "(cached) $ac_c" 1>&6
3681 else
3682   
3683 # These are sane defaults that work on at least a few old systems.
3684 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3685
3686 # Character class describing NM global symbol codes.
3687 symcode='[BCDEGRST]'
3688
3689 # Regexp to match symbols that can be accessed directly from C.
3690 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3691
3692 # Transform the above into a raw symbol and a C symbol.
3693 symxfrm='\1 \2\3 \3'
3694
3695 # Transform an extracted symbol line into a proper C declaration
3696 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3697
3698 # Transform an extracted symbol line into symbol name and symbol address
3699 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'"
3700
3701 # Define system-specific variables.
3702 case $host_os in
3703 aix*)
3704   symcode='[BCDT]'
3705   ;;
3706 cygwin* | mingw* | pw32*)
3707   symcode='[ABCDGISTW]'
3708   ;;
3709 hpux*) # Its linker distinguishes data from code symbols
3710   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3711   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'"
3712   ;;
3713 irix* | nonstopux*)
3714   symcode='[BCDEGRST]'
3715   ;;
3716 osf*)
3717   symcode='[BCDEGQRST]'
3718   ;;
3719 solaris* | sysv5*)
3720   symcode='[BDT]'
3721   ;;
3722 sysv4)
3723   symcode='[DFNSTU]'
3724   ;;
3725 esac
3726
3727 # Handle CRLF in mingw tool chain
3728 opt_cr=
3729 case $host_os in
3730 mingw*)
3731   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3732   ;;
3733 esac
3734
3735 # If we're using GNU nm, then use its standard symbol codes.
3736 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3737   symcode='[ABCDGISTW]'
3738 fi
3739
3740 # Try without a prefix undercore, then with it.
3741 for ac_symprfx in "" "_"; do
3742
3743   # Write the raw and C identifiers.
3744 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3745
3746   # Check to see that the pipe works correctly.
3747   pipe_works=no
3748   rm -f conftest*
3749   cat > conftest.$ac_ext <<EOF
3750 #ifdef __cplusplus
3751 extern "C" {
3752 #endif
3753 char nm_test_var;
3754 void nm_test_func(){}
3755 #ifdef __cplusplus
3756 }
3757 #endif
3758 int main(){nm_test_var='a';nm_test_func();return(0);}
3759 EOF
3760
3761   if { (eval echo configure:3762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3762     # Now try to grab the symbols.
3763     nlist=conftest.nm
3764     if { (eval echo configure:3765: \"$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
3765       # Try sorting and uniquifying the output.
3766       if sort "$nlist" | uniq > "$nlist"T; then
3767         mv -f "$nlist"T "$nlist"
3768       else
3769         rm -f "$nlist"T
3770       fi
3771
3772       # Make sure that we snagged all the symbols we need.
3773       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3774         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3775           cat <<EOF > conftest.$ac_ext
3776 #ifdef __cplusplus
3777 extern "C" {
3778 #endif
3779
3780 EOF
3781           # Now generate the symbol file.
3782           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
3783
3784           cat <<EOF >> conftest.$ac_ext
3785 #if defined (__STDC__) && __STDC__
3786 # define lt_ptr void *
3787 #else
3788 # define lt_ptr char *
3789 # define const
3790 #endif
3791
3792 /* The mapping between symbol names and symbols. */
3793 const struct {
3794   const char *name;
3795   lt_ptr address;
3796 }
3797 lt_preloaded_symbols[] =
3798 {
3799 EOF
3800           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
3801           cat <<\EOF >> conftest.$ac_ext
3802   {0, (lt_ptr) 0}
3803 };
3804
3805 #ifdef __cplusplus
3806 }
3807 #endif
3808 EOF
3809           # Now try linking the two files.
3810           mv conftest.$ac_objext conftstm.$ac_objext
3811           save_LIBS="$LIBS"
3812           save_CFLAGS="$CFLAGS"
3813           LIBS="conftstm.$ac_objext"
3814           CFLAGS="$CFLAGS$no_builtin_flag"
3815           if { (eval echo configure:3816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
3816             pipe_works=yes
3817           fi
3818           LIBS="$save_LIBS"
3819           CFLAGS="$save_CFLAGS"
3820         else
3821           echo "cannot find nm_test_func in $nlist" >&5
3822         fi
3823       else
3824         echo "cannot find nm_test_var in $nlist" >&5
3825       fi
3826     else
3827       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
3828     fi
3829   else
3830     echo "$progname: failed program was:" >&5
3831     cat conftest.$ac_ext >&5
3832   fi
3833   rm -f conftest* conftst*
3834
3835   # Do not use the global_symbol_pipe unless it works.
3836   if test "$pipe_works" = yes; then
3837     break
3838   else
3839     lt_cv_sys_global_symbol_pipe=
3840   fi
3841 done
3842
3843 fi
3844
3845 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
3846 if test -z "$lt_cv_sys_global_symbol_pipe"; then
3847   global_symbol_to_cdecl=
3848   global_symbol_to_c_name_address=
3849 else
3850   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
3851   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
3852 fi
3853 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
3854 then
3855   echo "$ac_t""failed" 1>&6
3856 else
3857   echo "$ac_t""ok" 1>&6
3858 fi
3859
3860 for ac_hdr in dlfcn.h
3861 do
3862 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
3863 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
3864 echo "configure:3865: checking for $ac_hdr" >&5
3865 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
3866   echo $ac_n "(cached) $ac_c" 1>&6
3867 else
3868   cat > conftest.$ac_ext <<EOF
3869 #line 3870 "configure"
3870 #include "confdefs.h"
3871 #include <$ac_hdr>
3872 EOF
3873 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3874 { (eval echo configure:3875: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3875 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3876 if test -z "$ac_err"; then
3877   rm -rf conftest*
3878   eval "ac_cv_header_$ac_safe=yes"
3879 else
3880   echo "$ac_err" >&5
3881   echo "configure: failed program was:" >&5
3882   cat conftest.$ac_ext >&5
3883   rm -rf conftest*
3884   eval "ac_cv_header_$ac_safe=no"
3885 fi
3886 rm -f conftest*
3887 fi
3888 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
3889   echo "$ac_t""yes" 1>&6
3890     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
3891   cat >> confdefs.h <<EOF
3892 #define $ac_tr_hdr 1
3893 EOF
3894  
3895 else
3896   echo "$ac_t""no" 1>&6
3897 fi
3898 done
3899
3900
3901
3902
3903
3904
3905 # Only perform the check for file, if the check method requires it
3906 case $deplibs_check_method in
3907 file_magic*)
3908   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
3909     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
3910 echo "configure:3911: checking for ${ac_tool_prefix}file" >&5
3911 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
3912   echo $ac_n "(cached) $ac_c" 1>&6
3913 else
3914   case $MAGIC_CMD in
3915   /*)
3916   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3917   ;;
3918   ?:/*)
3919   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3920   ;;
3921   *)
3922   ac_save_MAGIC_CMD="$MAGIC_CMD"
3923   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3924   ac_dummy="/usr/bin:$PATH"
3925   for ac_dir in $ac_dummy; do
3926     test -z "$ac_dir" && ac_dir=.
3927     if test -f $ac_dir/${ac_tool_prefix}file; then
3928       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
3929       if test -n "$file_magic_test_file"; then
3930         case $deplibs_check_method in
3931         "file_magic "*)
3932           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3933           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3934           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3935             egrep "$file_magic_regex" > /dev/null; then
3936             :
3937           else
3938             cat <<EOF 1>&2
3939
3940 *** Warning: the command libtool uses to detect shared libraries,
3941 *** $file_magic_cmd, produces output that libtool cannot recognize.
3942 *** The result is that libtool may fail to recognize shared libraries
3943 *** as such.  This will affect the creation of libtool libraries that
3944 *** depend on shared libraries, but programs linked with such libtool
3945 *** libraries will work regardless of this problem.  Nevertheless, you
3946 *** may want to report the problem to your system manager and/or to
3947 *** bug-libtool@gnu.org
3948
3949 EOF
3950           fi ;;
3951         esac
3952       fi
3953       break
3954     fi
3955   done
3956   IFS="$ac_save_ifs"
3957   MAGIC_CMD="$ac_save_MAGIC_CMD"
3958   ;;
3959 esac
3960 fi
3961
3962 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3963 if test -n "$MAGIC_CMD"; then
3964   echo "$ac_t""$MAGIC_CMD" 1>&6
3965 else
3966   echo "$ac_t""no" 1>&6
3967 fi
3968
3969 if test -z "$lt_cv_path_MAGIC_CMD"; then
3970   if test -n "$ac_tool_prefix"; then
3971     echo $ac_n "checking for file""... $ac_c" 1>&6
3972 echo "configure:3973: checking for file" >&5
3973 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
3974   echo $ac_n "(cached) $ac_c" 1>&6
3975 else
3976   case $MAGIC_CMD in
3977   /*)
3978   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
3979   ;;
3980   ?:/*)
3981   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
3982   ;;
3983   *)
3984   ac_save_MAGIC_CMD="$MAGIC_CMD"
3985   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3986   ac_dummy="/usr/bin:$PATH"
3987   for ac_dir in $ac_dummy; do
3988     test -z "$ac_dir" && ac_dir=.
3989     if test -f $ac_dir/file; then
3990       lt_cv_path_MAGIC_CMD="$ac_dir/file"
3991       if test -n "$file_magic_test_file"; then
3992         case $deplibs_check_method in
3993         "file_magic "*)
3994           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
3995           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
3996           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
3997             egrep "$file_magic_regex" > /dev/null; then
3998             :
3999           else
4000             cat <<EOF 1>&2
4001
4002 *** Warning: the command libtool uses to detect shared libraries,
4003 *** $file_magic_cmd, produces output that libtool cannot recognize.
4004 *** The result is that libtool may fail to recognize shared libraries
4005 *** as such.  This will affect the creation of libtool libraries that
4006 *** depend on shared libraries, but programs linked with such libtool
4007 *** libraries will work regardless of this problem.  Nevertheless, you
4008 *** may want to report the problem to your system manager and/or to
4009 *** bug-libtool@gnu.org
4010
4011 EOF
4012           fi ;;
4013         esac
4014       fi
4015       break
4016     fi
4017   done
4018   IFS="$ac_save_ifs"
4019   MAGIC_CMD="$ac_save_MAGIC_CMD"
4020   ;;
4021 esac
4022 fi
4023
4024 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4025 if test -n "$MAGIC_CMD"; then
4026   echo "$ac_t""$MAGIC_CMD" 1>&6
4027 else
4028   echo "$ac_t""no" 1>&6
4029 fi
4030
4031   else
4032     MAGIC_CMD=:
4033   fi
4034 fi
4035
4036   fi
4037   ;;
4038 esac
4039
4040 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4041 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4042 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4043 echo "configure:4044: checking for $ac_word" >&5
4044 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4045   echo $ac_n "(cached) $ac_c" 1>&6
4046 else
4047   if test -n "$RANLIB"; then
4048   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4049 else
4050   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4051   ac_dummy="$PATH"
4052   for ac_dir in $ac_dummy; do
4053     test -z "$ac_dir" && ac_dir=.
4054     if test -f $ac_dir/$ac_word; then
4055       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4056       break
4057     fi
4058   done
4059   IFS="$ac_save_ifs"
4060 fi
4061 fi
4062 RANLIB="$ac_cv_prog_RANLIB"
4063 if test -n "$RANLIB"; then
4064   echo "$ac_t""$RANLIB" 1>&6
4065 else
4066   echo "$ac_t""no" 1>&6
4067 fi
4068
4069
4070 if test -z "$ac_cv_prog_RANLIB"; then
4071 if test -n "$ac_tool_prefix"; then
4072   # Extract the first word of "ranlib", so it can be a program name with args.
4073 set dummy ranlib; ac_word=$2
4074 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4075 echo "configure:4076: checking for $ac_word" >&5
4076 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4077   echo $ac_n "(cached) $ac_c" 1>&6
4078 else
4079   if test -n "$RANLIB"; then
4080   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4081 else
4082   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4083   ac_dummy="$PATH"
4084   for ac_dir in $ac_dummy; do
4085     test -z "$ac_dir" && ac_dir=.
4086     if test -f $ac_dir/$ac_word; then
4087       ac_cv_prog_RANLIB="ranlib"
4088       break
4089     fi
4090   done
4091   IFS="$ac_save_ifs"
4092   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4093 fi
4094 fi
4095 RANLIB="$ac_cv_prog_RANLIB"
4096 if test -n "$RANLIB"; then
4097   echo "$ac_t""$RANLIB" 1>&6
4098 else
4099   echo "$ac_t""no" 1>&6
4100 fi
4101
4102 else
4103   RANLIB=":"
4104 fi
4105 fi
4106
4107 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4108 set dummy ${ac_tool_prefix}strip; ac_word=$2
4109 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4110 echo "configure:4111: checking for $ac_word" >&5
4111 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4112   echo $ac_n "(cached) $ac_c" 1>&6
4113 else
4114   if test -n "$STRIP"; then
4115   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4116 else
4117   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4118   ac_dummy="$PATH"
4119   for ac_dir in $ac_dummy; do
4120     test -z "$ac_dir" && ac_dir=.
4121     if test -f $ac_dir/$ac_word; then
4122       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4123       break
4124     fi
4125   done
4126   IFS="$ac_save_ifs"
4127 fi
4128 fi
4129 STRIP="$ac_cv_prog_STRIP"
4130 if test -n "$STRIP"; then
4131   echo "$ac_t""$STRIP" 1>&6
4132 else
4133   echo "$ac_t""no" 1>&6
4134 fi
4135
4136
4137 if test -z "$ac_cv_prog_STRIP"; then
4138 if test -n "$ac_tool_prefix"; then
4139   # Extract the first word of "strip", so it can be a program name with args.
4140 set dummy strip; ac_word=$2
4141 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4142 echo "configure:4143: checking for $ac_word" >&5
4143 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4144   echo $ac_n "(cached) $ac_c" 1>&6
4145 else
4146   if test -n "$STRIP"; then
4147   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4148 else
4149   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4150   ac_dummy="$PATH"
4151   for ac_dir in $ac_dummy; do
4152     test -z "$ac_dir" && ac_dir=.
4153     if test -f $ac_dir/$ac_word; then
4154       ac_cv_prog_STRIP="strip"
4155       break
4156     fi
4157   done
4158   IFS="$ac_save_ifs"
4159   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4160 fi
4161 fi
4162 STRIP="$ac_cv_prog_STRIP"
4163 if test -n "$STRIP"; then
4164   echo "$ac_t""$STRIP" 1>&6
4165 else
4166   echo "$ac_t""no" 1>&6
4167 fi
4168
4169 else
4170   STRIP=":"
4171 fi
4172 fi
4173
4174
4175 enable_dlopen=yes
4176 enable_win32_dll=yes
4177
4178 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4179 if test "${enable_libtool_lock+set}" = set; then
4180   enableval="$enable_libtool_lock"
4181   :
4182 fi
4183
4184 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4185
4186 # Some flags need to be propagated to the compiler or linker for good
4187 # libtool support.
4188 case $host in
4189 *-*-irix6*)
4190   # Find out which ABI we are using.
4191   echo '#line 4192 "configure"' > conftest.$ac_ext
4192   if { (eval echo configure:4193: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4193     case `/usr/bin/file conftest.$ac_objext` in
4194     *32-bit*)
4195       LD="${LD-ld} -32"
4196       ;;
4197     *N32*)
4198       LD="${LD-ld} -n32"
4199       ;;
4200     *64-bit*)
4201       LD="${LD-ld} -64"
4202       ;;
4203     esac
4204   fi
4205   rm -rf conftest*
4206   ;;
4207
4208 *-*-sco3.2v5*)
4209   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4210   SAVE_CFLAGS="$CFLAGS"
4211   CFLAGS="$CFLAGS -belf"
4212   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4213 echo "configure:4214: checking whether the C compiler needs -belf" >&5
4214 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4215   echo $ac_n "(cached) $ac_c" 1>&6
4216 else
4217   
4218      ac_ext=c
4219 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4220 ac_cpp='$CPP $CPPFLAGS'
4221 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4222 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4223 cross_compiling=$ac_cv_prog_cc_cross
4224
4225      cat > conftest.$ac_ext <<EOF
4226 #line 4227 "configure"
4227 #include "confdefs.h"
4228
4229 int main() {
4230
4231 ; return 0; }
4232 EOF
4233 if { (eval echo configure:4234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4234   rm -rf conftest*
4235   lt_cv_cc_needs_belf=yes
4236 else
4237   echo "configure: failed program was:" >&5
4238   cat conftest.$ac_ext >&5
4239   rm -rf conftest*
4240   lt_cv_cc_needs_belf=no
4241 fi
4242 rm -f conftest*
4243      ac_ext=c
4244 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4245 ac_cpp='$CPP $CPPFLAGS'
4246 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4247 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4248 cross_compiling=$ac_cv_prog_cc_cross
4249
4250 fi
4251
4252 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4253   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4254     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4255     CFLAGS="$SAVE_CFLAGS"
4256   fi
4257   ;;
4258
4259 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4260   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4261 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4262 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4263 echo "configure:4264: checking for $ac_word" >&5
4264 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4265   echo $ac_n "(cached) $ac_c" 1>&6
4266 else
4267   if test -n "$DLLTOOL"; then
4268   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4269 else
4270   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4271   ac_dummy="$PATH"
4272   for ac_dir in $ac_dummy; do
4273     test -z "$ac_dir" && ac_dir=.
4274     if test -f $ac_dir/$ac_word; then
4275       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4276       break
4277     fi
4278   done
4279   IFS="$ac_save_ifs"
4280 fi
4281 fi
4282 DLLTOOL="$ac_cv_prog_DLLTOOL"
4283 if test -n "$DLLTOOL"; then
4284   echo "$ac_t""$DLLTOOL" 1>&6
4285 else
4286   echo "$ac_t""no" 1>&6
4287 fi
4288
4289
4290 if test -z "$ac_cv_prog_DLLTOOL"; then
4291 if test -n "$ac_tool_prefix"; then
4292   # Extract the first word of "dlltool", so it can be a program name with args.
4293 set dummy dlltool; ac_word=$2
4294 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4295 echo "configure:4296: checking for $ac_word" >&5
4296 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4297   echo $ac_n "(cached) $ac_c" 1>&6
4298 else
4299   if test -n "$DLLTOOL"; then
4300   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4301 else
4302   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4303   ac_dummy="$PATH"
4304   for ac_dir in $ac_dummy; do
4305     test -z "$ac_dir" && ac_dir=.
4306     if test -f $ac_dir/$ac_word; then
4307       ac_cv_prog_DLLTOOL="dlltool"
4308       break
4309     fi
4310   done
4311   IFS="$ac_save_ifs"
4312   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4313 fi
4314 fi
4315 DLLTOOL="$ac_cv_prog_DLLTOOL"
4316 if test -n "$DLLTOOL"; then
4317   echo "$ac_t""$DLLTOOL" 1>&6
4318 else
4319   echo "$ac_t""no" 1>&6
4320 fi
4321
4322 else
4323   DLLTOOL="false"
4324 fi
4325 fi
4326
4327   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4328 set dummy ${ac_tool_prefix}as; ac_word=$2
4329 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4330 echo "configure:4331: checking for $ac_word" >&5
4331 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4332   echo $ac_n "(cached) $ac_c" 1>&6
4333 else
4334   if test -n "$AS"; then
4335   ac_cv_prog_AS="$AS" # Let the user override the test.
4336 else
4337   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4338   ac_dummy="$PATH"
4339   for ac_dir in $ac_dummy; do
4340     test -z "$ac_dir" && ac_dir=.
4341     if test -f $ac_dir/$ac_word; then
4342       ac_cv_prog_AS="${ac_tool_prefix}as"
4343       break
4344     fi
4345   done
4346   IFS="$ac_save_ifs"
4347 fi
4348 fi
4349 AS="$ac_cv_prog_AS"
4350 if test -n "$AS"; then
4351   echo "$ac_t""$AS" 1>&6
4352 else
4353   echo "$ac_t""no" 1>&6
4354 fi
4355
4356
4357 if test -z "$ac_cv_prog_AS"; then
4358 if test -n "$ac_tool_prefix"; then
4359   # Extract the first word of "as", so it can be a program name with args.
4360 set dummy as; ac_word=$2
4361 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4362 echo "configure:4363: checking for $ac_word" >&5
4363 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4364   echo $ac_n "(cached) $ac_c" 1>&6
4365 else
4366   if test -n "$AS"; then
4367   ac_cv_prog_AS="$AS" # Let the user override the test.
4368 else
4369   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4370   ac_dummy="$PATH"
4371   for ac_dir in $ac_dummy; do
4372     test -z "$ac_dir" && ac_dir=.
4373     if test -f $ac_dir/$ac_word; then
4374       ac_cv_prog_AS="as"
4375       break
4376     fi
4377   done
4378   IFS="$ac_save_ifs"
4379   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4380 fi
4381 fi
4382 AS="$ac_cv_prog_AS"
4383 if test -n "$AS"; then
4384   echo "$ac_t""$AS" 1>&6
4385 else
4386   echo "$ac_t""no" 1>&6
4387 fi
4388
4389 else
4390   AS="false"
4391 fi
4392 fi
4393
4394   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4395 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4396 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4397 echo "configure:4398: checking for $ac_word" >&5
4398 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4399   echo $ac_n "(cached) $ac_c" 1>&6
4400 else
4401   if test -n "$OBJDUMP"; then
4402   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4403 else
4404   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4405   ac_dummy="$PATH"
4406   for ac_dir in $ac_dummy; do
4407     test -z "$ac_dir" && ac_dir=.
4408     if test -f $ac_dir/$ac_word; then
4409       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4410       break
4411     fi
4412   done
4413   IFS="$ac_save_ifs"
4414 fi
4415 fi
4416 OBJDUMP="$ac_cv_prog_OBJDUMP"
4417 if test -n "$OBJDUMP"; then
4418   echo "$ac_t""$OBJDUMP" 1>&6
4419 else
4420   echo "$ac_t""no" 1>&6
4421 fi
4422
4423
4424 if test -z "$ac_cv_prog_OBJDUMP"; then
4425 if test -n "$ac_tool_prefix"; then
4426   # Extract the first word of "objdump", so it can be a program name with args.
4427 set dummy objdump; ac_word=$2
4428 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4429 echo "configure:4430: checking for $ac_word" >&5
4430 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4431   echo $ac_n "(cached) $ac_c" 1>&6
4432 else
4433   if test -n "$OBJDUMP"; then
4434   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4435 else
4436   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4437   ac_dummy="$PATH"
4438   for ac_dir in $ac_dummy; do
4439     test -z "$ac_dir" && ac_dir=.
4440     if test -f $ac_dir/$ac_word; then
4441       ac_cv_prog_OBJDUMP="objdump"
4442       break
4443     fi
4444   done
4445   IFS="$ac_save_ifs"
4446   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4447 fi
4448 fi
4449 OBJDUMP="$ac_cv_prog_OBJDUMP"
4450 if test -n "$OBJDUMP"; then
4451   echo "$ac_t""$OBJDUMP" 1>&6
4452 else
4453   echo "$ac_t""no" 1>&6
4454 fi
4455
4456 else
4457   OBJDUMP="false"
4458 fi
4459 fi
4460
4461
4462   # recent cygwin and mingw systems supply a stub DllMain which the user
4463   # can override, but on older systems we have to supply one
4464   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4465 echo "configure:4466: checking if libtool should supply DllMain function" >&5
4466 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4467   echo $ac_n "(cached) $ac_c" 1>&6
4468 else
4469   cat > conftest.$ac_ext <<EOF
4470 #line 4471 "configure"
4471 #include "confdefs.h"
4472
4473 int main() {
4474 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4475       DllMain (0, 0, 0);
4476 ; return 0; }
4477 EOF
4478 if { (eval echo configure:4479: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4479   rm -rf conftest*
4480   lt_cv_need_dllmain=no
4481 else
4482   echo "configure: failed program was:" >&5
4483   cat conftest.$ac_ext >&5
4484   rm -rf conftest*
4485   lt_cv_need_dllmain=yes
4486 fi
4487 rm -f conftest*
4488 fi
4489
4490 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4491
4492   case $host/$CC in
4493   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4494     # old mingw systems require "-dll" to link a DLL, while more recent ones
4495     # require "-mdll"
4496     SAVE_CFLAGS="$CFLAGS"
4497     CFLAGS="$CFLAGS -mdll"
4498     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4499 echo "configure:4500: checking how to link DLLs" >&5
4500 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4501   echo $ac_n "(cached) $ac_c" 1>&6
4502 else
4503   cat > conftest.$ac_ext <<EOF
4504 #line 4505 "configure"
4505 #include "confdefs.h"
4506
4507 int main() {
4508
4509 ; return 0; }
4510 EOF
4511 if { (eval echo configure:4512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4512   rm -rf conftest*
4513   lt_cv_cc_dll_switch=-mdll
4514 else
4515   echo "configure: failed program was:" >&5
4516   cat conftest.$ac_ext >&5
4517   rm -rf conftest*
4518   lt_cv_cc_dll_switch=-dll
4519 fi
4520 rm -f conftest*
4521 fi
4522
4523 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4524     CFLAGS="$SAVE_CFLAGS" ;;
4525   *-*-cygwin* | *-*-pw32*)
4526     # cygwin systems need to pass --dll to the linker, and not link
4527     # crt.o which will require a WinMain@16 definition.
4528     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4529   esac
4530   ;;
4531   
4532 esac
4533
4534 # Sed substitution that helps us do robust quoting.  It backslashifies
4535 # metacharacters that are still active within double-quoted strings.
4536 Xsed='sed -e s/^X//'
4537 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4538
4539 # Same as above, but do not quote variable references.
4540 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4541
4542 # Sed substitution to delay expansion of an escaped shell variable in a
4543 # double_quote_subst'ed string.
4544 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4545
4546 # Constants:
4547 rm="rm -f"
4548
4549 # Global variables:
4550 default_ofile=libtool
4551 can_build_shared=yes
4552
4553 # All known linkers require a `.a' archive for static linking (except M$VC,
4554 # which needs '.lib').
4555 libext=a
4556 ltmain="$ac_aux_dir/ltmain.sh"
4557 ofile="$default_ofile"
4558 with_gnu_ld="$lt_cv_prog_gnu_ld"
4559 need_locks="$enable_libtool_lock"
4560
4561 old_CC="$CC"
4562 old_CFLAGS="$CFLAGS"
4563
4564 # Set sane defaults for various variables
4565 test -z "$AR" && AR=ar
4566 test -z "$AR_FLAGS" && AR_FLAGS=cru
4567 test -z "$AS" && AS=as
4568 test -z "$CC" && CC=cc
4569 test -z "$DLLTOOL" && DLLTOOL=dlltool
4570 test -z "$LD" && LD=ld
4571 test -z "$LN_S" && LN_S="ln -s"
4572 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4573 test -z "$NM" && NM=nm
4574 test -z "$OBJDUMP" && OBJDUMP=objdump
4575 test -z "$RANLIB" && RANLIB=:
4576 test -z "$STRIP" && STRIP=:
4577 test -z "$ac_objext" && ac_objext=o
4578
4579 if test x"$host" != x"$build"; then
4580   ac_tool_prefix=${host_alias}-
4581 else
4582   ac_tool_prefix=
4583 fi
4584
4585 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4586 case $host_os in
4587 linux-gnu*) ;;
4588 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4589 esac
4590
4591 case $host_os in
4592 aix3*)
4593   # AIX sometimes has problems with the GCC collect2 program.  For some
4594   # reason, if we set the COLLECT_NAMES environment variable, the problems
4595   # vanish in a puff of smoke.
4596   if test "X${COLLECT_NAMES+set}" != Xset; then
4597     COLLECT_NAMES=
4598     export COLLECT_NAMES
4599   fi
4600   ;;
4601 esac
4602
4603 # Determine commands to create old-style static archives.
4604 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4605 old_postinstall_cmds='chmod 644 $oldlib'
4606 old_postuninstall_cmds=
4607
4608 if test -n "$RANLIB"; then
4609   case $host_os in
4610   openbsd*)
4611     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4612     ;;
4613   *)
4614     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4615     ;;
4616   esac
4617   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4618 fi
4619
4620 # Allow CC to be a program name with arguments.
4621 set dummy $CC
4622 compiler="$2"
4623
4624 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4625 echo "configure:4626: checking for objdir" >&5
4626 rm -f .libs 2>/dev/null
4627 mkdir .libs 2>/dev/null
4628 if test -d .libs; then
4629   objdir=.libs
4630 else
4631   # MS-DOS does not allow filenames that begin with a dot.
4632   objdir=_libs
4633 fi
4634 rmdir .libs 2>/dev/null
4635 echo "$ac_t""$objdir" 1>&6
4636
4637
4638 # Check whether --with-pic or --without-pic was given.
4639 if test "${with_pic+set}" = set; then
4640   withval="$with_pic"
4641   pic_mode="$withval"
4642 else
4643   pic_mode=default
4644 fi
4645
4646 test -z "$pic_mode" && pic_mode=default
4647
4648 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4649 # in isolation, and that seeing it set (from the cache) indicates that
4650 # the associated values are set (in the cache) correctly too.
4651 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4652 echo "configure:4653: checking for $compiler option to produce PIC" >&5
4653 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4654   echo $ac_n "(cached) $ac_c" 1>&6
4655 else
4656    lt_cv_prog_cc_pic=
4657   lt_cv_prog_cc_shlib=
4658   lt_cv_prog_cc_wl=
4659   lt_cv_prog_cc_static=
4660   lt_cv_prog_cc_no_builtin=
4661   lt_cv_prog_cc_can_build_shared=$can_build_shared
4662
4663   if test "$GCC" = yes; then
4664     lt_cv_prog_cc_wl='-Wl,'
4665     lt_cv_prog_cc_static='-static'
4666
4667     case $host_os in
4668     aix*)
4669       # Below there is a dirty hack to force normal static linking with -ldl
4670       # The problem is because libdl dynamically linked with both libc and
4671       # libC (AIX C++ library), which obviously doesn't included in libraries
4672       # list by gcc. This cause undefined symbols with -static flags.
4673       # This hack allows C programs to be linked with "-static -ldl", but
4674       # not sure about C++ programs.
4675       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4676       ;;
4677     amigaos*)
4678       # FIXME: we need at least 68020 code to build shared libraries, but
4679       # adding the `-m68020' flag to GCC prevents building anything better,
4680       # like `-m68040'.
4681       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4682       ;;
4683     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4684       # PIC is the default for these OSes.
4685       ;;
4686     darwin* | rhapsody*)
4687       # PIC is the default on this platform
4688       # Common symbols not allowed in MH_DYLIB files
4689       lt_cv_prog_cc_pic='-fno-common'
4690       ;;
4691     cygwin* | mingw* | pw32* | os2*)
4692       # This hack is so that the source file can tell whether it is being
4693       # built for inclusion in a dll (and should export symbols for example).
4694       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4695       ;;
4696     sysv4*MP*)
4697       if test -d /usr/nec; then
4698          lt_cv_prog_cc_pic=-Kconform_pic
4699       fi
4700       ;;
4701     *)
4702       lt_cv_prog_cc_pic='-fPIC'
4703       ;;
4704     esac
4705   else
4706     # PORTME Check for PIC flags for the system compiler.
4707     case $host_os in
4708     aix3* | aix4* | aix5*)
4709       lt_cv_prog_cc_wl='-Wl,'
4710       # All AIX code is PIC.
4711       if test "$host_cpu" = ia64; then
4712         # AIX 5 now supports IA64 processor
4713         lt_cv_prog_cc_static='-Bstatic'
4714       else
4715         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4716       fi
4717       ;;
4718
4719     hpux9* | hpux10* | hpux11*)
4720       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4721       lt_cv_prog_cc_wl='-Wl,'
4722       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4723       lt_cv_prog_cc_pic='+Z'
4724       ;;
4725
4726     irix5* | irix6* | nonstopux*)
4727       lt_cv_prog_cc_wl='-Wl,'
4728       lt_cv_prog_cc_static='-non_shared'
4729       # PIC (with -KPIC) is the default.
4730       ;;
4731
4732     cygwin* | mingw* | pw32* | os2*)
4733       # This hack is so that the source file can tell whether it is being
4734       # built for inclusion in a dll (and should export symbols for example).
4735       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4736       ;;
4737
4738     newsos6)
4739       lt_cv_prog_cc_pic='-KPIC'
4740       lt_cv_prog_cc_static='-Bstatic'
4741       ;;
4742     
4743     openedition)
4744       # XPLINK code is PIC by default
4745       ;;
4746
4747     osf3* | osf4* | osf5*)
4748       # All OSF/1 code is PIC.
4749       lt_cv_prog_cc_wl='-Wl,'
4750       lt_cv_prog_cc_static='-non_shared'
4751       ;;
4752
4753     sco3.2v5*)
4754       lt_cv_prog_cc_pic='-Kpic'
4755       lt_cv_prog_cc_static='-dn'
4756       lt_cv_prog_cc_shlib='-belf'
4757       ;;
4758
4759     solaris*)
4760       lt_cv_prog_cc_pic='-KPIC'
4761       lt_cv_prog_cc_static='-Bstatic'
4762       lt_cv_prog_cc_wl='-Wl,'
4763       ;;
4764
4765     sunos4*)
4766       lt_cv_prog_cc_pic='-PIC'
4767       lt_cv_prog_cc_static='-Bstatic'
4768       lt_cv_prog_cc_wl='-Qoption ld '
4769       ;;
4770
4771     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4772       lt_cv_prog_cc_pic='-KPIC'
4773       lt_cv_prog_cc_static='-Bstatic'
4774       lt_cv_prog_cc_wl='-Wl,'
4775       ;;
4776
4777     uts4*)
4778       lt_cv_prog_cc_pic='-pic'
4779       lt_cv_prog_cc_static='-Bstatic'
4780       ;;
4781
4782     sysv4*MP*)
4783       if test -d /usr/nec ;then
4784         lt_cv_prog_cc_pic='-Kconform_pic'
4785         lt_cv_prog_cc_static='-Bstatic'
4786       fi
4787       ;;
4788
4789     *)
4790       lt_cv_prog_cc_can_build_shared=no
4791       ;;
4792     esac
4793   fi
4794
4795 fi
4796
4797 if test -z "$lt_cv_prog_cc_pic"; then
4798   echo "$ac_t""none" 1>&6
4799 else
4800   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
4801
4802   # Check to make sure the pic_flag actually works.
4803   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
4804 echo "configure:4805: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
4805   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
4806   echo $ac_n "(cached) $ac_c" 1>&6
4807 else
4808       save_CFLAGS="$CFLAGS"
4809     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
4810     cat > conftest.$ac_ext <<EOF
4811 #line 4812 "configure"
4812 #include "confdefs.h"
4813
4814 int main() {
4815
4816 ; return 0; }
4817 EOF
4818 if { (eval echo configure:4819: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4819   rm -rf conftest*
4820         case $host_os in
4821       hpux9* | hpux10* | hpux11*)
4822         # On HP-UX, both CC and GCC only warn that PIC is supported... then
4823         # they create non-PIC objects.  So, if there were any warnings, we
4824         # assume that PIC is not supported.
4825         if test -s conftest.err; then
4826           lt_cv_prog_cc_pic_works=no
4827         else
4828           lt_cv_prog_cc_pic_works=yes
4829         fi
4830         ;;
4831       *)
4832         lt_cv_prog_cc_pic_works=yes
4833         ;;
4834       esac
4835     
4836 else
4837   echo "configure: failed program was:" >&5
4838   cat conftest.$ac_ext >&5
4839   rm -rf conftest*
4840         lt_cv_prog_cc_pic_works=no
4841     
4842 fi
4843 rm -f conftest*
4844     CFLAGS="$save_CFLAGS"
4845   
4846 fi
4847
4848
4849   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
4850     lt_cv_prog_cc_pic=
4851     lt_cv_prog_cc_can_build_shared=no
4852   else
4853     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
4854   fi
4855
4856   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
4857 fi
4858
4859 # Check for any special shared library compilation flags.
4860 if test -n "$lt_cv_prog_cc_shlib"; then
4861   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
4862   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
4863   else
4864    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
4865     lt_cv_prog_cc_can_build_shared=no
4866   fi
4867 fi
4868
4869 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
4870 echo "configure:4871: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
4871 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
4872   echo $ac_n "(cached) $ac_c" 1>&6
4873 else
4874     lt_cv_prog_cc_static_works=no
4875   save_LDFLAGS="$LDFLAGS"
4876   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
4877   cat > conftest.$ac_ext <<EOF
4878 #line 4879 "configure"
4879 #include "confdefs.h"
4880
4881 int main() {
4882
4883 ; return 0; }
4884 EOF
4885 if { (eval echo configure:4886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4886   rm -rf conftest*
4887   lt_cv_prog_cc_static_works=yes
4888 else
4889   echo "configure: failed program was:" >&5
4890   cat conftest.$ac_ext >&5
4891 fi
4892 rm -f conftest*
4893   LDFLAGS="$save_LDFLAGS"
4894
4895 fi
4896
4897
4898 # Belt *and* braces to stop my trousers falling down:
4899 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
4900 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
4901
4902 pic_flag="$lt_cv_prog_cc_pic"
4903 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
4904 wl="$lt_cv_prog_cc_wl"
4905 link_static_flag="$lt_cv_prog_cc_static"
4906 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
4907 can_build_shared="$lt_cv_prog_cc_can_build_shared"
4908
4909
4910 # Check to see if options -o and -c are simultaneously supported by compiler
4911 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
4912 echo "configure:4913: checking if $compiler supports -c -o file.$ac_objext" >&5
4913 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
4914   echo $ac_n "(cached) $ac_c" 1>&6
4915 else
4916   
4917 $rm -r conftest 2>/dev/null
4918 mkdir conftest
4919 cd conftest
4920 echo "int some_variable = 0;" > conftest.$ac_ext
4921 mkdir out
4922 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
4923 # that will create temporary files in the current directory regardless of
4924 # the output directory.  Thus, making CWD read-only will cause this test
4925 # to fail, enabling locking or at least warning the user not to do parallel
4926 # builds.
4927 chmod -w .
4928 save_CFLAGS="$CFLAGS"
4929 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
4930 compiler_c_o=no
4931 if { (eval echo configure:4932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
4932   # The compiler can only warn and ignore the option if not recognized
4933   # So say no if there are warnings
4934   if test -s out/conftest.err; then
4935     lt_cv_compiler_c_o=no
4936   else
4937     lt_cv_compiler_c_o=yes
4938   fi
4939 else
4940   # Append any errors to the config.log.
4941   cat out/conftest.err 1>&5
4942   lt_cv_compiler_c_o=no
4943 fi
4944 CFLAGS="$save_CFLAGS"
4945 chmod u+w .
4946 $rm conftest* out/*
4947 rmdir out
4948 cd ..
4949 rmdir conftest
4950 $rm -r conftest 2>/dev/null
4951
4952 fi
4953
4954 compiler_c_o=$lt_cv_compiler_c_o
4955 echo "$ac_t""$compiler_c_o" 1>&6
4956
4957 if test x"$compiler_c_o" = x"yes"; then
4958   # Check to see if we can write to a .lo
4959   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
4960 echo "configure:4961: checking if $compiler supports -c -o file.lo" >&5
4961   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
4962   echo $ac_n "(cached) $ac_c" 1>&6
4963 else
4964   
4965   lt_cv_compiler_o_lo=no
4966   save_CFLAGS="$CFLAGS"
4967   CFLAGS="$CFLAGS -c -o conftest.lo"
4968   save_objext="$ac_objext"
4969   ac_objext=lo
4970   cat > conftest.$ac_ext <<EOF
4971 #line 4972 "configure"
4972 #include "confdefs.h"
4973
4974 int main() {
4975 int some_variable = 0;
4976 ; return 0; }
4977 EOF
4978 if { (eval echo configure:4979: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4979   rm -rf conftest*
4980       # The compiler can only warn and ignore the option if not recognized
4981     # So say no if there are warnings
4982     if test -s conftest.err; then
4983       lt_cv_compiler_o_lo=no
4984     else
4985       lt_cv_compiler_o_lo=yes
4986     fi
4987   
4988 else
4989   echo "configure: failed program was:" >&5
4990   cat conftest.$ac_ext >&5
4991 fi
4992 rm -f conftest*
4993   ac_objext="$save_objext"
4994   CFLAGS="$save_CFLAGS"
4995   
4996 fi
4997
4998   compiler_o_lo=$lt_cv_compiler_o_lo
4999   echo "$ac_t""$compiler_o_lo" 1>&6
5000 else
5001   compiler_o_lo=no
5002 fi
5003
5004 # Check to see if we can do hard links to lock some files if needed
5005 hard_links="nottested"
5006 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5007   # do not overwrite the value of need_locks provided by the user
5008   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5009 echo "configure:5010: checking if we can lock with hard links" >&5
5010   hard_links=yes
5011   $rm conftest*
5012   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5013   touch conftest.a
5014   ln conftest.a conftest.b 2>&5 || hard_links=no
5015   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5016   echo "$ac_t""$hard_links" 1>&6
5017   if test "$hard_links" = no; then
5018     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5019     need_locks=warn
5020   fi
5021 else
5022   need_locks=no
5023 fi
5024
5025 if test "$GCC" = yes; then
5026   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5027   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5028 echo "configure:5029: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5029   echo "int some_variable = 0;" > conftest.$ac_ext
5030   save_CFLAGS="$CFLAGS"
5031   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5032   compiler_rtti_exceptions=no
5033   cat > conftest.$ac_ext <<EOF
5034 #line 5035 "configure"
5035 #include "confdefs.h"
5036
5037 int main() {
5038 int some_variable = 0;
5039 ; return 0; }
5040 EOF
5041 if { (eval echo configure:5042: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5042   rm -rf conftest*
5043       # The compiler can only warn and ignore the option if not recognized
5044     # So say no if there are warnings
5045     if test -s conftest.err; then
5046       compiler_rtti_exceptions=no
5047     else
5048       compiler_rtti_exceptions=yes
5049     fi
5050   
5051 else
5052   echo "configure: failed program was:" >&5
5053   cat conftest.$ac_ext >&5
5054 fi
5055 rm -f conftest*
5056   CFLAGS="$save_CFLAGS"
5057   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5058
5059   if test "$compiler_rtti_exceptions" = "yes"; then
5060     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5061   else
5062     no_builtin_flag=' -fno-builtin'
5063   fi
5064 fi
5065
5066 # See if the linker supports building shared libraries.
5067 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5068 echo "configure:5069: checking whether the linker ($LD) supports shared libraries" >&5
5069
5070 allow_undefined_flag=
5071 no_undefined_flag=
5072 need_lib_prefix=unknown
5073 need_version=unknown
5074 # when you set need_version to no, make sure it does not cause -set_version
5075 # flags to be left without arguments
5076 archive_cmds=
5077 archive_expsym_cmds=
5078 old_archive_from_new_cmds=
5079 old_archive_from_expsyms_cmds=
5080 export_dynamic_flag_spec=
5081 whole_archive_flag_spec=
5082 thread_safe_flag_spec=
5083 hardcode_into_libs=no
5084 hardcode_libdir_flag_spec=
5085 hardcode_libdir_separator=
5086 hardcode_direct=no
5087 hardcode_minus_L=no
5088 hardcode_shlibpath_var=unsupported
5089 runpath_var=
5090 link_all_deplibs=unknown
5091 always_export_symbols=no
5092 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5093 # include_expsyms should be a list of space-separated symbols to be *always*
5094 # included in the symbol list
5095 include_expsyms=
5096 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5097 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5098 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5099 # as well as any symbol that contains `d'.
5100 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5101 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5102 # platforms (ab)use it in PIC code, but their linkers get confused if
5103 # the symbol is explicitly referenced.  Since portable code cannot
5104 # rely on this symbol name, it's probably fine to never include it in
5105 # preloaded symbol tables.
5106 extract_expsyms_cmds=
5107
5108 case $host_os in
5109 cygwin* | mingw* | pw32*)
5110   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5111   # When not using gcc, we currently assume that we are using
5112   # Microsoft Visual C++.
5113   if test "$GCC" != yes; then
5114     with_gnu_ld=no
5115   fi
5116   ;;
5117 openbsd*)
5118   with_gnu_ld=no
5119   ;;
5120 esac
5121
5122 ld_shlibs=yes
5123 if test "$with_gnu_ld" = yes; then
5124   # If archive_cmds runs LD, not CC, wlarc should be empty
5125   wlarc='${wl}'
5126
5127   # See if GNU ld supports shared libraries.
5128   case $host_os in
5129   aix3* | aix4* | aix5*)
5130     # On AIX, the GNU linker is very broken
5131     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5132     ld_shlibs=no
5133     cat <<EOF 1>&2
5134
5135 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5136 *** to be unable to reliably create shared libraries on AIX.
5137 *** Therefore, libtool is disabling shared libraries support.  If you
5138 *** really care for shared libraries, you may want to modify your PATH
5139 *** so that a non-GNU linker is found, and then restart.
5140
5141 EOF
5142     ;;
5143
5144   amigaos*)
5145     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)'
5146     hardcode_libdir_flag_spec='-L$libdir'
5147     hardcode_minus_L=yes
5148
5149     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5150     # that the semantics of dynamic libraries on AmigaOS, at least up
5151     # to version 4, is to share data among multiple programs linked
5152     # with the same dynamic library.  Since this doesn't match the
5153     # behavior of shared libraries on other platforms, we can use
5154     # them.
5155     ld_shlibs=no
5156     ;;
5157
5158   beos*)
5159     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5160       allow_undefined_flag=unsupported
5161       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5162       # support --undefined.  This deserves some investigation.  FIXME
5163       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5164     else
5165       ld_shlibs=no
5166     fi
5167     ;;
5168
5169   cygwin* | mingw* | pw32*)
5170     # hardcode_libdir_flag_spec is actually meaningless, as there is
5171     # no search path for DLLs.
5172     hardcode_libdir_flag_spec='-L$libdir'
5173     allow_undefined_flag=unsupported
5174     always_export_symbols=yes
5175
5176     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5177       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5178       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5179       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5180       else $CC -o impgen impgen.c ; fi)~
5181       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5182
5183     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5184
5185     # cygwin and mingw dlls have different entry points and sets of symbols
5186     # to exclude.
5187     # FIXME: what about values for MSVC?
5188     dll_entry=__cygwin_dll_entry@12
5189     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5190     case $host_os in
5191     mingw*)
5192       # mingw values
5193       dll_entry=_DllMainCRTStartup@12
5194       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5195       ;;
5196     esac
5197
5198     # mingw and cygwin differ, and it's simplest to just exclude the union
5199     # of the two symbol sets.
5200     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5201
5202     # recent cygwin and mingw systems supply a stub DllMain which the user
5203     # can override, but on older systems we have to supply one (in ltdll.c)
5204     if test "x$lt_cv_need_dllmain" = "xyes"; then
5205       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5206       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~
5207         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5208     else
5209       ltdll_obj=
5210       ltdll_cmds=
5211     fi
5212
5213     # Extract the symbol export list from an `--export-all' def file,
5214     # then regenerate the def file from the symbol export list, so that
5215     # the compiled dll only exports the symbol export list.
5216     # Be careful not to strip the DATA tag left be newer dlltools.
5217     export_symbols_cmds="$ltdll_cmds"'
5218       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5219       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5220
5221     # If the export-symbols file already is a .def file (1st line
5222     # is EXPORTS), use it as is.
5223     # If DATA tags from a recent dlltool are present, honour them!
5224     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5225         cp $export_symbols $output_objdir/$soname-def;
5226       else
5227         echo EXPORTS > $output_objdir/$soname-def;
5228         _lt_hint=1;
5229         cat $export_symbols | while read symbol; do
5230          set dummy \$symbol;
5231          case \$# in
5232            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5233            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5234            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5235          esac;
5236          _lt_hint=`expr 1 + \$_lt_hint`;
5237         done;
5238       fi~
5239       '"$ltdll_cmds"'
5240       $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~
5241       $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~
5242       $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~
5243       $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~
5244       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5245     ;;
5246
5247   netbsd*)
5248     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5249       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5250       wlarc=
5251     else
5252       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5253       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5254     fi
5255     ;;
5256
5257   solaris* | sysv5*)
5258     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5259       ld_shlibs=no
5260       cat <<EOF 1>&2
5261
5262 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5263 *** create shared libraries on Solaris systems.  Therefore, libtool
5264 *** is disabling shared libraries support.  We urge you to upgrade GNU
5265 *** binutils to release 2.9.1 or newer.  Another option is to modify
5266 *** your PATH or compiler configuration so that the native linker is
5267 *** used, and then restart.
5268
5269 EOF
5270     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5271       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5272       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5273     else
5274       ld_shlibs=no
5275     fi
5276     ;;
5277
5278   sunos4*)
5279     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5280     wlarc=
5281     hardcode_direct=yes
5282     hardcode_shlibpath_var=no
5283     ;;
5284
5285   *)
5286     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5287       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5288       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5289     else
5290       ld_shlibs=no
5291     fi
5292     ;;
5293   esac
5294
5295   if test "$ld_shlibs" = yes; then
5296     runpath_var=LD_RUN_PATH
5297     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5298     export_dynamic_flag_spec='${wl}--export-dynamic'
5299     case $host_os in
5300     cygwin* | mingw* | pw32*)
5301       # dlltool doesn't understand --whole-archive et. al.
5302       whole_archive_flag_spec=
5303       ;;
5304     *)
5305       # ancient GNU ld didn't support --whole-archive et. al.
5306       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5307         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5308       else
5309         whole_archive_flag_spec=
5310       fi
5311       ;;
5312     esac
5313   fi
5314 else
5315   # PORTME fill in a description of your system's linker (not GNU ld)
5316   case $host_os in
5317   aix3*)
5318     allow_undefined_flag=unsupported
5319     always_export_symbols=yes
5320     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'
5321     # Note: this linker hardcodes the directories in LIBPATH if there
5322     # are no directories specified by -L.
5323     hardcode_minus_L=yes
5324     if test "$GCC" = yes && test -z "$link_static_flag"; then
5325       # Neither direct hardcoding nor static linking is supported with a
5326       # broken collect2.
5327       hardcode_direct=unsupported
5328     fi
5329     ;;
5330
5331   aix4* | aix5*)
5332     if test "$host_cpu" = ia64; then
5333       # On IA64, the linker does run time linking by default, so we don't
5334       # have to do anything special.
5335       aix_use_runtimelinking=no
5336       exp_sym_flag='-Bexport'
5337       no_entry_flag=""
5338     else
5339       aix_use_runtimelinking=no
5340
5341       # Test if we are trying to use run time linking or normal
5342       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5343       # need to do runtime linking.
5344       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5345         for ld_flag in $LDFLAGS; do
5346           case $ld_flag in
5347           *-brtl*)
5348             aix_use_runtimelinking=yes
5349             break
5350           ;;
5351           esac
5352         done
5353       esac
5354
5355       exp_sym_flag='-bexport'
5356       no_entry_flag='-bnoentry'
5357     fi
5358
5359     # When large executables or shared objects are built, AIX ld can
5360     # have problems creating the table of contents.  If linking a library
5361     # or program results in "error TOC overflow" add -mminimal-toc to
5362     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5363     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5364
5365     hardcode_direct=yes
5366     archive_cmds=''
5367     hardcode_libdir_separator=':'
5368     if test "$GCC" = yes; then
5369       case $host_os in aix4.[012]|aix4.[012].*)
5370         collect2name=`${CC} -print-prog-name=collect2`
5371         if test -f "$collect2name" && \
5372           strings "$collect2name" | grep resolve_lib_name >/dev/null
5373         then
5374           # We have reworked collect2
5375           hardcode_direct=yes
5376         else
5377           # We have old collect2
5378           hardcode_direct=unsupported
5379           # It fails to find uninstalled libraries when the uninstalled
5380           # path is not listed in the libpath.  Setting hardcode_minus_L
5381           # to unsupported forces relinking
5382           hardcode_minus_L=yes
5383           hardcode_libdir_flag_spec='-L$libdir'
5384           hardcode_libdir_separator=
5385         fi
5386       esac
5387
5388       shared_flag='-shared'
5389     else
5390       # not using gcc
5391       if test "$host_cpu" = ia64; then
5392         shared_flag='${wl}-G'
5393       else
5394         if test "$aix_use_runtimelinking" = yes; then
5395           shared_flag='${wl}-G'
5396         else
5397           shared_flag='${wl}-bM:SRE'
5398         fi
5399       fi
5400     fi
5401
5402     # It seems that -bexpall can do strange things, so it is better to
5403     # generate a list of symbols to export.
5404     always_export_symbols=yes
5405     if test "$aix_use_runtimelinking" = yes; then
5406       # Warning - without using the other runtime loading flags (-brtl),
5407       # -berok will link without error, but may produce a broken library.
5408       allow_undefined_flag='-berok'
5409       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5410       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"
5411     else
5412       if test "$host_cpu" = ia64; then
5413         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5414         allow_undefined_flag="-z nodefs"
5415         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"
5416       else
5417         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5418         # Warning - without using the other run time loading flags,
5419         # -berok will link without error, but may produce a broken library.
5420         allow_undefined_flag='${wl}-berok'
5421         # This is a bit strange, but is similar to how AIX traditionally builds
5422         # it's shared libraries.
5423         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'
5424       fi
5425     fi
5426     ;;
5427
5428   amigaos*)
5429     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)'
5430     hardcode_libdir_flag_spec='-L$libdir'
5431     hardcode_minus_L=yes
5432     # see comment about different semantics on the GNU ld section
5433     ld_shlibs=no
5434     ;;
5435
5436   cygwin* | mingw* | pw32*)
5437     # When not using gcc, we currently assume that we are using
5438     # Microsoft Visual C++.
5439     # hardcode_libdir_flag_spec is actually meaningless, as there is
5440     # no search path for DLLs.
5441     hardcode_libdir_flag_spec=' '
5442     allow_undefined_flag=unsupported
5443     # Tell ltmain to make .lib files, not .a files.
5444     libext=lib
5445     # FIXME: Setting linknames here is a bad hack.
5446     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5447     # The linker will automatically build a .lib file if we build a DLL.
5448     old_archive_from_new_cmds='true'
5449     # FIXME: Should let the user specify the lib program.
5450     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5451     fix_srcfile_path='`cygpath -w "$srcfile"`'
5452     ;;
5453
5454   darwin* | rhapsody*)
5455     case "$host_os" in
5456     rhapsody* | darwin1.[012])
5457       allow_undefined_flag='-undefined suppress'
5458       ;;
5459     *) # Darwin 1.3 on
5460       allow_undefined_flag='-flat_namespace -undefined suppress'
5461       ;;
5462     esac
5463     # FIXME: Relying on posixy $() will cause problems for
5464     #        cross-compilation, but unfortunately the echo tests do not
5465     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5466     #        `"' quotes if we put them in here... so don't!
5467     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)'
5468     # We need to add '_' to the symbols in $export_symbols first
5469     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5470     hardcode_direct=yes
5471     hardcode_shlibpath_var=no
5472     whole_archive_flag_spec='-all_load $convenience'
5473     ;;
5474
5475   freebsd1*)
5476     ld_shlibs=no
5477     ;;
5478
5479   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5480   # support.  Future versions do this automatically, but an explicit c++rt0.o
5481   # does not break anything, and helps significantly (at the cost of a little
5482   # extra space).
5483   freebsd2.2*)
5484     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5485     hardcode_libdir_flag_spec='-R$libdir'
5486     hardcode_direct=yes
5487     hardcode_shlibpath_var=no
5488     ;;
5489
5490   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5491   freebsd2*)
5492     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5493     hardcode_direct=yes
5494     hardcode_minus_L=yes
5495     hardcode_shlibpath_var=no
5496     ;;
5497
5498   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5499   freebsd*)
5500     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5501     hardcode_libdir_flag_spec='-R$libdir'
5502     hardcode_direct=yes
5503     hardcode_shlibpath_var=no
5504     ;;
5505
5506   hpux9* | hpux10* | hpux11*)
5507     case $host_os in
5508     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' ;;
5509     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5510     esac
5511     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5512     hardcode_libdir_separator=:
5513     hardcode_direct=yes
5514     hardcode_minus_L=yes # Not in the search PATH, but as the default
5515                          # location of the library.
5516     export_dynamic_flag_spec='${wl}-E'
5517     ;;
5518
5519   irix5* | irix6* | nonstopux*)
5520     if test "$GCC" = yes; then
5521       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'
5522       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5523     else
5524       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'
5525       hardcode_libdir_flag_spec='-rpath $libdir'
5526     fi
5527     hardcode_libdir_separator=:
5528     link_all_deplibs=yes
5529     ;;
5530
5531   netbsd*)
5532     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5533       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5534     else
5535       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5536     fi
5537     hardcode_libdir_flag_spec='-R$libdir'
5538     hardcode_direct=yes
5539     hardcode_shlibpath_var=no
5540     ;;
5541
5542   newsos6)
5543     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5544     hardcode_direct=yes
5545     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5546     hardcode_libdir_separator=:
5547     hardcode_shlibpath_var=no
5548     ;;
5549
5550   openbsd*)
5551     hardcode_direct=yes
5552     hardcode_shlibpath_var=no
5553     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5554       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5555       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5556       export_dynamic_flag_spec='${wl}-E'
5557     else
5558       case "$host_os" in
5559       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5560         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5561         hardcode_libdir_flag_spec='-R$libdir'
5562         ;;
5563       *)
5564         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5565         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5566         ;;
5567       esac
5568     fi
5569     ;;
5570
5571   openedition*)
5572     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5573         cp \$linknames \$output_objdir && linknames=''"
5574     export_dynamic_flag_spec="-Wl,DLL"
5575     ;;
5576
5577   os2*)
5578     hardcode_libdir_flag_spec='-L$libdir'
5579     hardcode_minus_L=yes
5580     allow_undefined_flag=unsupported
5581     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'
5582     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5583     ;;
5584
5585   osf3*)
5586     if test "$GCC" = yes; then
5587       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5588       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'
5589     else
5590       allow_undefined_flag=' -expect_unresolved \*'
5591       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'
5592     fi
5593     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5594     hardcode_libdir_separator=:
5595     ;;
5596
5597   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5598     if test "$GCC" = yes; then
5599       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5600       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'
5601       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5602     else
5603       allow_undefined_flag=' -expect_unresolved \*'
5604       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'
5605       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5606       $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'
5607
5608       #Both c and cxx compiler support -rpath directly
5609       hardcode_libdir_flag_spec='-rpath $libdir'
5610     fi
5611     hardcode_libdir_separator=:
5612     ;;
5613
5614   sco3.2v5*)
5615     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5616     hardcode_shlibpath_var=no
5617     runpath_var=LD_RUN_PATH
5618     hardcode_runpath_var=yes
5619     export_dynamic_flag_spec='${wl}-Bexport'
5620     ;;
5621
5622   solaris*)
5623     # gcc --version < 3.0 without binutils cannot create self contained
5624     # shared libraries reliably, requiring libgcc.a to resolve some of
5625     # the object symbols generated in some cases.  Libraries that use
5626     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5627     # a copy of libgcc.a into every shared library to guarantee resolving
5628     # such symbols causes other problems:  According to Tim Van Holder
5629     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5630     # (to the application) exception stack for one thing.
5631     no_undefined_flag=' -z defs'
5632     if test "$GCC" = yes; then
5633       case `$CC --version 2>/dev/null` in
5634       [12].*)
5635         cat <<EOF 1>&2
5636
5637 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5638 *** create self contained shared libraries on Solaris systems, without
5639 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5640 *** -no-undefined support, which will at least allow you to build shared
5641 *** libraries.  However, you may find that when you link such libraries
5642 *** into an application without using GCC, you have to manually add
5643 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5644 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5645 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5646
5647 EOF
5648         no_undefined_flag=
5649         ;;
5650       esac
5651     fi
5652     # $CC -shared without GNU ld will not create a library from C++
5653     # object files and a static libstdc++, better avoid it by now
5654     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5655     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5656                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5657     hardcode_libdir_flag_spec='-R$libdir'
5658     hardcode_shlibpath_var=no
5659     case $host_os in
5660     solaris2.[0-5] | solaris2.[0-5].*) ;;
5661     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5662       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5663     esac
5664     link_all_deplibs=yes
5665     ;;
5666
5667   sunos4*)
5668     if test "x$host_vendor" = xsequent; then
5669       # Use $CC to link under sequent, because it throws in some extra .o
5670       # files that make .init and .fini sections work.
5671       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5672     else
5673       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5674     fi
5675     hardcode_libdir_flag_spec='-L$libdir'
5676     hardcode_direct=yes
5677     hardcode_minus_L=yes
5678     hardcode_shlibpath_var=no
5679     ;;
5680
5681   sysv4)
5682     case $host_vendor in
5683       sni)
5684         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5685         hardcode_direct=yes # is this really true???
5686         ;;
5687       siemens)
5688         ## LD is ld it makes a PLAMLIB
5689         ## CC just makes a GrossModule.
5690         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5691         reload_cmds='$CC -r -o $output$reload_objs'
5692         hardcode_direct=no
5693         ;;
5694       motorola)
5695         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5696         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5697         ;;
5698     esac
5699     runpath_var='LD_RUN_PATH'
5700     hardcode_shlibpath_var=no
5701     ;;
5702
5703   sysv4.3*)
5704     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5705     hardcode_shlibpath_var=no
5706     export_dynamic_flag_spec='-Bexport'
5707     ;;
5708
5709   sysv5*)
5710     no_undefined_flag=' -z text'
5711     # $CC -shared without GNU ld will not create a library from C++
5712     # object files and a static libstdc++, better avoid it by now
5713     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5714     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5715                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5716     hardcode_libdir_flag_spec=
5717     hardcode_shlibpath_var=no
5718     runpath_var='LD_RUN_PATH'
5719     ;;
5720
5721   uts4*)
5722     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5723     hardcode_libdir_flag_spec='-L$libdir'
5724     hardcode_shlibpath_var=no
5725     ;;
5726
5727   dgux*)
5728     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5729     hardcode_libdir_flag_spec='-L$libdir'
5730     hardcode_shlibpath_var=no
5731     ;;
5732
5733   sysv4*MP*)
5734     if test -d /usr/nec; then
5735       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5736       hardcode_shlibpath_var=no
5737       runpath_var=LD_RUN_PATH
5738       hardcode_runpath_var=yes
5739       ld_shlibs=yes
5740     fi
5741     ;;
5742
5743   sysv4.2uw2*)
5744     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5745     hardcode_direct=yes
5746     hardcode_minus_L=no
5747     hardcode_shlibpath_var=no
5748     hardcode_runpath_var=yes
5749     runpath_var=LD_RUN_PATH
5750     ;;
5751
5752   sysv5uw7* | unixware7*)
5753     no_undefined_flag='${wl}-z ${wl}text'
5754     if test "$GCC" = yes; then
5755       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5756     else
5757       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5758     fi
5759     runpath_var='LD_RUN_PATH'
5760     hardcode_shlibpath_var=no
5761     ;;
5762
5763   *)
5764     ld_shlibs=no
5765     ;;
5766   esac
5767 fi
5768 echo "$ac_t""$ld_shlibs" 1>&6
5769 test "$ld_shlibs" = no && can_build_shared=no
5770
5771 # Check hardcoding attributes.
5772 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
5773 echo "configure:5774: checking how to hardcode library paths into programs" >&5
5774 hardcode_action=
5775 if test -n "$hardcode_libdir_flag_spec" || \
5776    test -n "$runpath_var"; then
5777
5778   # We can hardcode non-existant directories.
5779   if test "$hardcode_direct" != no &&
5780      # If the only mechanism to avoid hardcoding is shlibpath_var, we
5781      # have to relink, otherwise we might link with an installed library
5782      # when we should be linking with a yet-to-be-installed one
5783      ## test "$hardcode_shlibpath_var" != no &&
5784      test "$hardcode_minus_L" != no; then
5785     # Linking always hardcodes the temporary library directory.
5786     hardcode_action=relink
5787   else
5788     # We can link without hardcoding, and we can hardcode nonexisting dirs.
5789     hardcode_action=immediate
5790   fi
5791 else
5792   # We cannot hardcode anything, or else we can only hardcode existing
5793   # directories.
5794   hardcode_action=unsupported
5795 fi
5796 echo "$ac_t""$hardcode_action" 1>&6
5797
5798 striplib=
5799 old_striplib=
5800 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
5801 echo "configure:5802: checking whether stripping libraries is possible" >&5
5802 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
5803   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
5804   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
5805   echo "$ac_t""yes" 1>&6
5806 else
5807   echo "$ac_t""no" 1>&6
5808 fi
5809
5810 reload_cmds='$LD$reload_flag -o $output$reload_objs'
5811 test -z "$deplibs_check_method" && deplibs_check_method=unknown
5812
5813 # PORTME Fill in your ld.so characteristics
5814 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
5815 echo "configure:5816: checking dynamic linker characteristics" >&5
5816 library_names_spec=
5817 libname_spec='lib$name'
5818 soname_spec=
5819 postinstall_cmds=
5820 postuninstall_cmds=
5821 finish_cmds=
5822 finish_eval=
5823 shlibpath_var=
5824 shlibpath_overrides_runpath=unknown
5825 version_type=none
5826 dynamic_linker="$host_os ld.so"
5827 sys_lib_dlsearch_path_spec="/lib /usr/lib"
5828 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
5829
5830 case $host_os in
5831 aix3*)
5832   version_type=linux
5833   library_names_spec='${libname}${release}.so$versuffix $libname.a'
5834   shlibpath_var=LIBPATH
5835
5836   # AIX has no versioning support, so we append a major version to the name.
5837   soname_spec='${libname}${release}.so$major'
5838   ;;
5839
5840 aix4* | aix5*)
5841   version_type=linux
5842   need_lib_prefix=no
5843   need_version=no
5844   hardcode_into_libs=yes
5845   if test "$host_cpu" = ia64; then
5846     # AIX 5 supports IA64
5847     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
5848     shlibpath_var=LD_LIBRARY_PATH
5849   else
5850     # With GCC up to 2.95.x, collect2 would create an import file
5851     # for dependence libraries.  The import file would start with
5852     # the line `#! .'.  This would cause the generated library to
5853     # depend on `.', always an invalid library.  This was fixed in
5854     # development snapshots of GCC prior to 3.0.
5855     case $host_os in
5856       aix4 | aix4.[01] | aix4.[01].*)
5857         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
5858              echo ' yes '
5859              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
5860           :
5861         else
5862           can_build_shared=no
5863         fi
5864         ;;
5865     esac
5866     # AIX (on Power*) has no versioning support, so currently we can
5867     # not hardcode correct soname into executable. Probably we can
5868     # add versioning support to collect2, so additional links can
5869     # be useful in future.
5870     if test "$aix_use_runtimelinking" = yes; then
5871       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
5872       # instead of lib<name>.a to let people know that these are not
5873       # typical AIX shared libraries.
5874       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5875     else
5876       # We preserve .a as extension for shared libraries through AIX4.2
5877       # and later when we are not doing run time linking.
5878       library_names_spec='${libname}${release}.a $libname.a'
5879       soname_spec='${libname}${release}.so$major'
5880     fi
5881     shlibpath_var=LIBPATH
5882   fi
5883   hardcode_into_libs=yes
5884   ;;
5885
5886 amigaos*)
5887   library_names_spec='$libname.ixlibrary $libname.a'
5888   # Create ${libname}_ixlibrary.a entries in /sys/libs.
5889   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'
5890   ;;
5891
5892 beos*)
5893   library_names_spec='${libname}.so'
5894   dynamic_linker="$host_os ld.so"
5895   shlibpath_var=LIBRARY_PATH
5896   ;;
5897
5898 bsdi4*)
5899   version_type=linux
5900   need_version=no
5901   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
5902   soname_spec='${libname}${release}.so$major'
5903   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
5904   shlibpath_var=LD_LIBRARY_PATH
5905   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
5906   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
5907   export_dynamic_flag_spec=-rdynamic
5908   # the default ld.so.conf also contains /usr/contrib/lib and
5909   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
5910   # libtool to hard-code these into programs
5911   ;;
5912
5913 cygwin* | mingw* | pw32*)
5914   version_type=windows
5915   need_version=no
5916   need_lib_prefix=no
5917   case $GCC,$host_os in
5918   yes,cygwin*)
5919     library_names_spec='$libname.dll.a'
5920     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
5921     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
5922       dldir=$destdir/`dirname \$dlpath`~
5923       test -d \$dldir || mkdir -p \$dldir~
5924       $install_prog .libs/$dlname \$dldir/$dlname'
5925     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
5926       dlpath=$dir/\$dldll~
5927        $rm \$dlpath'
5928     ;;
5929   yes,mingw*)
5930     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
5931     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
5932     ;;
5933   yes,pw32*)
5934     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
5935     ;;
5936   *)
5937     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
5938     ;;
5939   esac
5940   dynamic_linker='Win32 ld.exe'
5941   # FIXME: first we should search . and the directory the executable is in
5942   shlibpath_var=PATH
5943   ;;
5944
5945 darwin* | rhapsody*)
5946   dynamic_linker="$host_os dyld"
5947   version_type=darwin
5948   need_lib_prefix=no
5949   need_version=no
5950   # FIXME: Relying on posixy $() will cause problems for
5951   #        cross-compilation, but unfortunately the echo tests do not
5952   #        yet detect zsh echo's removal of \ escapes.
5953   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)'
5954   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
5955   shlibpath_overrides_runpath=yes
5956   shlibpath_var=DYLD_LIBRARY_PATH
5957   ;;
5958
5959 freebsd1*)
5960   dynamic_linker=no
5961   ;;
5962
5963 freebsd*)
5964   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
5965   version_type=freebsd-$objformat
5966   case $version_type in
5967     freebsd-elf*)
5968       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
5969       need_version=no
5970       need_lib_prefix=no
5971       ;;
5972     freebsd-*)
5973       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
5974       need_version=yes
5975       ;;
5976   esac
5977   shlibpath_var=LD_LIBRARY_PATH
5978   case $host_os in
5979   freebsd2*)
5980     shlibpath_overrides_runpath=yes
5981     ;;
5982   *)
5983     shlibpath_overrides_runpath=no
5984     hardcode_into_libs=yes
5985     ;;
5986   esac
5987   ;;
5988
5989 gnu*)
5990   version_type=linux
5991   need_lib_prefix=no
5992   need_version=no
5993   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
5994   soname_spec='${libname}${release}.so$major'
5995   shlibpath_var=LD_LIBRARY_PATH
5996   hardcode_into_libs=yes
5997   ;;
5998
5999 hpux9* | hpux10* | hpux11*)
6000   # Give a soname corresponding to the major version so that dld.sl refuses to
6001   # link against other versions.
6002   dynamic_linker="$host_os dld.sl"
6003   version_type=sunos
6004   need_lib_prefix=no
6005   need_version=no
6006   shlibpath_var=SHLIB_PATH
6007   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6008   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6009   soname_spec='${libname}${release}.sl$major'
6010   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6011   postinstall_cmds='chmod 555 $lib'
6012   ;;
6013
6014 irix5* | irix6* | nonstopux*)
6015   case $host_os in
6016     nonstopux*) version_type=nonstopux ;;
6017     *)          version_type=irix ;;
6018   esac
6019   need_lib_prefix=no
6020   need_version=no
6021   soname_spec='${libname}${release}.so$major'
6022   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6023   case $host_os in
6024   irix5* | nonstopux*)
6025     libsuff= shlibsuff=
6026     ;;
6027   *)
6028     case $LD in # libtool.m4 will add one of these switches to LD
6029     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6030     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6031     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6032     *) libsuff= shlibsuff= libmagic=never-match;;
6033     esac
6034     ;;
6035   esac
6036   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6037   shlibpath_overrides_runpath=no
6038   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6039   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6040   ;;
6041
6042 # No shared lib support for Linux oldld, aout, or coff.
6043 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6044   dynamic_linker=no
6045   ;;
6046
6047 # This must be Linux ELF.
6048 linux-gnu*)
6049   version_type=linux
6050   need_lib_prefix=no
6051   need_version=no
6052   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6053   soname_spec='${libname}${release}.so$major'
6054   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6055   shlibpath_var=LD_LIBRARY_PATH
6056   shlibpath_overrides_runpath=no
6057   # This implies no fast_install, which is unacceptable.
6058   # Some rework will be needed to allow for fast_install
6059   # before this can be enabled.
6060   hardcode_into_libs=yes
6061
6062   # We used to test for /lib/ld.so.1 and disable shared libraries on
6063   # powerpc, because MkLinux only supported shared libraries with the
6064   # GNU dynamic linker.  Since this was broken with cross compilers,
6065   # most powerpc-linux boxes support dynamic linking these days and
6066   # people can always --disable-shared, the test was removed, and we
6067   # assume the GNU/Linux dynamic linker is in use.
6068   dynamic_linker='GNU/Linux ld.so'
6069   ;;
6070
6071 netbsd*)
6072   version_type=sunos
6073   need_lib_prefix=no
6074   need_version=no
6075   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6076     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6077     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6078     dynamic_linker='NetBSD (a.out) ld.so'
6079   else
6080     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6081     soname_spec='${libname}${release}.so$major'
6082     dynamic_linker='NetBSD ld.elf_so'
6083   fi
6084   shlibpath_var=LD_LIBRARY_PATH
6085   shlibpath_overrides_runpath=yes
6086   hardcode_into_libs=yes
6087   ;;
6088
6089 newsos6)
6090   version_type=linux
6091   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6092   shlibpath_var=LD_LIBRARY_PATH
6093   shlibpath_overrides_runpath=yes
6094   ;;
6095
6096 openbsd*)
6097   version_type=sunos
6098   need_lib_prefix=no
6099   need_version=no
6100   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6101     case "$host_os" in
6102     openbsd2.[89] | openbsd2.[89].*)
6103       shlibpath_overrides_runpath=no
6104       ;;
6105     *)
6106       shlibpath_overrides_runpath=yes
6107       ;;
6108     esac
6109   else
6110     shlibpath_overrides_runpath=yes
6111   fi
6112   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6113   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6114   shlibpath_var=LD_LIBRARY_PATH
6115   ;;
6116
6117 openedition*)
6118   need_lib_prefix=no
6119   need_version=no
6120   shlibpath_overrides_runpath=yes
6121   shlibpath_var=LIBPATH
6122   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6123   # the library's exports are in libname.x; this is the file that must
6124   # actually be linked with to use a DLL.
6125   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6126   ;;
6127
6128 os2*)
6129   libname_spec='$name'
6130   need_lib_prefix=no
6131   library_names_spec='$libname.dll $libname.a'
6132   dynamic_linker='OS/2 ld.exe'
6133   shlibpath_var=LIBPATH
6134   ;;
6135
6136 osf3* | osf4* | osf5*)
6137   version_type=osf
6138   need_version=no
6139   soname_spec='${libname}${release}.so$major'
6140   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6141   shlibpath_var=LD_LIBRARY_PATH
6142   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6143   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6144   hardcode_into_libs=yes
6145   ;;
6146
6147 sco3.2v5*)
6148   version_type=osf
6149   soname_spec='${libname}${release}.so$major'
6150   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6151   shlibpath_var=LD_LIBRARY_PATH
6152   ;;
6153
6154 solaris*)
6155   version_type=linux
6156   need_lib_prefix=no
6157   need_version=no
6158   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6159   soname_spec='${libname}${release}.so$major'
6160   shlibpath_var=LD_LIBRARY_PATH
6161   shlibpath_overrides_runpath=yes
6162   hardcode_into_libs=yes
6163   # ldd complains unless libraries are executable
6164   postinstall_cmds='chmod +x $lib'
6165   ;;
6166
6167 sunos4*)
6168   version_type=sunos
6169   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6170   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6171   shlibpath_var=LD_LIBRARY_PATH
6172   shlibpath_overrides_runpath=yes
6173   if test "$with_gnu_ld" = yes; then
6174     need_lib_prefix=no
6175   fi
6176   need_version=yes
6177   ;;
6178
6179 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6180   version_type=linux
6181   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6182   soname_spec='${libname}${release}.so$major'
6183   shlibpath_var=LD_LIBRARY_PATH
6184   case $host_vendor in
6185     sni)
6186       shlibpath_overrides_runpath=no
6187       need_lib_prefix=no
6188       export_dynamic_flag_spec='${wl}-Blargedynsym'
6189       runpath_var=LD_RUN_PATH
6190       ;;
6191     siemens)
6192       need_lib_prefix=no
6193       ;;
6194     motorola)
6195       need_lib_prefix=no
6196       need_version=no
6197       shlibpath_overrides_runpath=no
6198       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6199       ;;
6200   esac
6201   ;;
6202
6203 uts4*)
6204   version_type=linux
6205   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6206   soname_spec='${libname}${release}.so$major'
6207   shlibpath_var=LD_LIBRARY_PATH
6208   ;;
6209
6210 dgux*)
6211   version_type=linux
6212   need_lib_prefix=no
6213   need_version=no
6214   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6215   soname_spec='${libname}${release}.so$major'
6216   shlibpath_var=LD_LIBRARY_PATH
6217   ;;
6218
6219 sysv4*MP*)
6220   if test -d /usr/nec ;then
6221     version_type=linux
6222     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6223     soname_spec='$libname.so.$major'
6224     shlibpath_var=LD_LIBRARY_PATH
6225   fi
6226   ;;
6227
6228 *)
6229   dynamic_linker=no
6230   ;;
6231 esac
6232 echo "$ac_t""$dynamic_linker" 1>&6
6233 test "$dynamic_linker" = no && can_build_shared=no
6234
6235 # Report the final consequences.
6236 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6237 echo "configure:6238: checking if libtool supports shared libraries" >&5
6238 echo "$ac_t""$can_build_shared" 1>&6
6239
6240 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6241 echo "configure:6242: checking whether to build shared libraries" >&5
6242 test "$can_build_shared" = "no" && enable_shared=no
6243
6244 # On AIX, shared libraries and static libraries use the same namespace, and
6245 # are all built from PIC.
6246 case "$host_os" in
6247 aix3*)
6248   test "$enable_shared" = yes && enable_static=no
6249   if test -n "$RANLIB"; then
6250     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6251     postinstall_cmds='$RANLIB $lib'
6252   fi
6253   ;;
6254
6255 aix4*)
6256   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6257     test "$enable_shared" = yes && enable_static=no
6258   fi
6259   ;;
6260 esac
6261 echo "$ac_t""$enable_shared" 1>&6
6262
6263 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6264 echo "configure:6265: checking whether to build static libraries" >&5
6265 # Make sure either enable_shared or enable_static is yes.
6266 test "$enable_shared" = yes || enable_static=yes
6267 echo "$ac_t""$enable_static" 1>&6
6268
6269 if test "$hardcode_action" = relink; then
6270   # Fast installation is not supported
6271   enable_fast_install=no
6272 elif test "$shlibpath_overrides_runpath" = yes ||
6273      test "$enable_shared" = no; then
6274   # Fast installation is not necessary
6275   enable_fast_install=needless
6276 fi
6277
6278 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6279 if test "$GCC" = yes; then
6280   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6281 fi
6282
6283 if test "x$enable_dlopen" != xyes; then
6284   enable_dlopen=unknown
6285   enable_dlopen_self=unknown
6286   enable_dlopen_self_static=unknown
6287 else
6288   lt_cv_dlopen=no
6289   lt_cv_dlopen_libs=
6290
6291   case $host_os in
6292   beos*)
6293     lt_cv_dlopen="load_add_on"
6294     lt_cv_dlopen_libs=
6295     lt_cv_dlopen_self=yes
6296     ;;
6297
6298   cygwin* | mingw* | pw32*)
6299     lt_cv_dlopen="LoadLibrary"
6300     lt_cv_dlopen_libs=
6301    ;;
6302
6303   *)
6304     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6305 echo "configure:6306: checking for dllload" >&5
6306 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6307   echo $ac_n "(cached) $ac_c" 1>&6
6308 else
6309   cat > conftest.$ac_ext <<EOF
6310 #line 6311 "configure"
6311 #include "confdefs.h"
6312 /* System header to define __stub macros and hopefully few prototypes,
6313     which can conflict with char dllload(); below.  */
6314 #include <assert.h>
6315 /* Override any gcc2 internal prototype to avoid an error.  */
6316 /* We use char because int might match the return type of a gcc2
6317     builtin and then its argument prototype would still apply.  */
6318 char dllload();
6319 char (*f)();
6320
6321 int main() {
6322
6323 /* The GNU C library defines this for functions which it implements
6324     to always fail with ENOSYS.  Some functions are actually named
6325     something starting with __ and the normal name is an alias.  */
6326 #if defined (__stub_dllload) || defined (__stub___dllload)
6327 choke me
6328 #else
6329 f = dllload;
6330 #endif
6331
6332 ; return 0; }
6333 EOF
6334 if { (eval echo configure:6335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6335   rm -rf conftest*
6336   eval "ac_cv_func_dllload=yes"
6337 else
6338   echo "configure: failed program was:" >&5
6339   cat conftest.$ac_ext >&5
6340   rm -rf conftest*
6341   eval "ac_cv_func_dllload=no"
6342 fi
6343 rm -f conftest*
6344 fi
6345
6346 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6347   echo "$ac_t""yes" 1>&6
6348   lt_cv_dlopen="dllload"
6349 else
6350   echo "$ac_t""no" 1>&6
6351 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6352 echo "configure:6353: checking for shl_load" >&5
6353 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6354   echo $ac_n "(cached) $ac_c" 1>&6
6355 else
6356   cat > conftest.$ac_ext <<EOF
6357 #line 6358 "configure"
6358 #include "confdefs.h"
6359 /* System header to define __stub macros and hopefully few prototypes,
6360     which can conflict with char shl_load(); below.  */
6361 #include <assert.h>
6362 /* Override any gcc2 internal prototype to avoid an error.  */
6363 /* We use char because int might match the return type of a gcc2
6364     builtin and then its argument prototype would still apply.  */
6365 char shl_load();
6366 char (*f)();
6367
6368 int main() {
6369
6370 /* The GNU C library defines this for functions which it implements
6371     to always fail with ENOSYS.  Some functions are actually named
6372     something starting with __ and the normal name is an alias.  */
6373 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6374 choke me
6375 #else
6376 f = shl_load;
6377 #endif
6378
6379 ; return 0; }
6380 EOF
6381 if { (eval echo configure:6382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6382   rm -rf conftest*
6383   eval "ac_cv_func_shl_load=yes"
6384 else
6385   echo "configure: failed program was:" >&5
6386   cat conftest.$ac_ext >&5
6387   rm -rf conftest*
6388   eval "ac_cv_func_shl_load=no"
6389 fi
6390 rm -f conftest*
6391 fi
6392
6393 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6394   echo "$ac_t""yes" 1>&6
6395   lt_cv_dlopen="shl_load"
6396 else
6397   echo "$ac_t""no" 1>&6
6398 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6399 echo "configure:6400: checking for shl_load in -ldld" >&5
6400 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6401 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6402   echo $ac_n "(cached) $ac_c" 1>&6
6403 else
6404   ac_save_LIBS="$LIBS"
6405 LIBS="-ldld  $LIBS"
6406 cat > conftest.$ac_ext <<EOF
6407 #line 6408 "configure"
6408 #include "confdefs.h"
6409 /* Override any gcc2 internal prototype to avoid an error.  */
6410 /* We use char because int might match the return type of a gcc2
6411     builtin and then its argument prototype would still apply.  */
6412 char shl_load();
6413
6414 int main() {
6415 shl_load()
6416 ; return 0; }
6417 EOF
6418 if { (eval echo configure:6419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6419   rm -rf conftest*
6420   eval "ac_cv_lib_$ac_lib_var=yes"
6421 else
6422   echo "configure: failed program was:" >&5
6423   cat conftest.$ac_ext >&5
6424   rm -rf conftest*
6425   eval "ac_cv_lib_$ac_lib_var=no"
6426 fi
6427 rm -f conftest*
6428 LIBS="$ac_save_LIBS"
6429
6430 fi
6431 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6432   echo "$ac_t""yes" 1>&6
6433   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6434 else
6435   echo "$ac_t""no" 1>&6
6436 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6437 echo "configure:6438: checking for dlopen" >&5
6438 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6439   echo $ac_n "(cached) $ac_c" 1>&6
6440 else
6441   cat > conftest.$ac_ext <<EOF
6442 #line 6443 "configure"
6443 #include "confdefs.h"
6444 /* System header to define __stub macros and hopefully few prototypes,
6445     which can conflict with char dlopen(); below.  */
6446 #include <assert.h>
6447 /* Override any gcc2 internal prototype to avoid an error.  */
6448 /* We use char because int might match the return type of a gcc2
6449     builtin and then its argument prototype would still apply.  */
6450 char dlopen();
6451 char (*f)();
6452
6453 int main() {
6454
6455 /* The GNU C library defines this for functions which it implements
6456     to always fail with ENOSYS.  Some functions are actually named
6457     something starting with __ and the normal name is an alias.  */
6458 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6459 choke me
6460 #else
6461 f = dlopen;
6462 #endif
6463
6464 ; return 0; }
6465 EOF
6466 if { (eval echo configure:6467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6467   rm -rf conftest*
6468   eval "ac_cv_func_dlopen=yes"
6469 else
6470   echo "configure: failed program was:" >&5
6471   cat conftest.$ac_ext >&5
6472   rm -rf conftest*
6473   eval "ac_cv_func_dlopen=no"
6474 fi
6475 rm -f conftest*
6476 fi
6477
6478 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6479   echo "$ac_t""yes" 1>&6
6480   lt_cv_dlopen="dlopen"
6481 else
6482   echo "$ac_t""no" 1>&6
6483 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6484 echo "configure:6485: checking for dlopen in -ldl" >&5
6485 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6486 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6487   echo $ac_n "(cached) $ac_c" 1>&6
6488 else
6489   ac_save_LIBS="$LIBS"
6490 LIBS="-ldl  $LIBS"
6491 cat > conftest.$ac_ext <<EOF
6492 #line 6493 "configure"
6493 #include "confdefs.h"
6494 /* Override any gcc2 internal prototype to avoid an error.  */
6495 /* We use char because int might match the return type of a gcc2
6496     builtin and then its argument prototype would still apply.  */
6497 char dlopen();
6498
6499 int main() {
6500 dlopen()
6501 ; return 0; }
6502 EOF
6503 if { (eval echo configure:6504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6504   rm -rf conftest*
6505   eval "ac_cv_lib_$ac_lib_var=yes"
6506 else
6507   echo "configure: failed program was:" >&5
6508   cat conftest.$ac_ext >&5
6509   rm -rf conftest*
6510   eval "ac_cv_lib_$ac_lib_var=no"
6511 fi
6512 rm -f conftest*
6513 LIBS="$ac_save_LIBS"
6514
6515 fi
6516 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6517   echo "$ac_t""yes" 1>&6
6518   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6519 else
6520   echo "$ac_t""no" 1>&6
6521 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6522 echo "configure:6523: checking for dlopen in -lsvld" >&5
6523 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6524 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6525   echo $ac_n "(cached) $ac_c" 1>&6
6526 else
6527   ac_save_LIBS="$LIBS"
6528 LIBS="-lsvld  $LIBS"
6529 cat > conftest.$ac_ext <<EOF
6530 #line 6531 "configure"
6531 #include "confdefs.h"
6532 /* Override any gcc2 internal prototype to avoid an error.  */
6533 /* We use char because int might match the return type of a gcc2
6534     builtin and then its argument prototype would still apply.  */
6535 char dlopen();
6536
6537 int main() {
6538 dlopen()
6539 ; return 0; }
6540 EOF
6541 if { (eval echo configure:6542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6542   rm -rf conftest*
6543   eval "ac_cv_lib_$ac_lib_var=yes"
6544 else
6545   echo "configure: failed program was:" >&5
6546   cat conftest.$ac_ext >&5
6547   rm -rf conftest*
6548   eval "ac_cv_lib_$ac_lib_var=no"
6549 fi
6550 rm -f conftest*
6551 LIBS="$ac_save_LIBS"
6552
6553 fi
6554 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6555   echo "$ac_t""yes" 1>&6
6556   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6557 else
6558   echo "$ac_t""no" 1>&6
6559 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6560 echo "configure:6561: checking for dld_link in -ldld" >&5
6561 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6562 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6563   echo $ac_n "(cached) $ac_c" 1>&6
6564 else
6565   ac_save_LIBS="$LIBS"
6566 LIBS="-ldld  $LIBS"
6567 cat > conftest.$ac_ext <<EOF
6568 #line 6569 "configure"
6569 #include "confdefs.h"
6570 /* Override any gcc2 internal prototype to avoid an error.  */
6571 /* We use char because int might match the return type of a gcc2
6572     builtin and then its argument prototype would still apply.  */
6573 char dld_link();
6574
6575 int main() {
6576 dld_link()
6577 ; return 0; }
6578 EOF
6579 if { (eval echo configure:6580: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6580   rm -rf conftest*
6581   eval "ac_cv_lib_$ac_lib_var=yes"
6582 else
6583   echo "configure: failed program was:" >&5
6584   cat conftest.$ac_ext >&5
6585   rm -rf conftest*
6586   eval "ac_cv_lib_$ac_lib_var=no"
6587 fi
6588 rm -f conftest*
6589 LIBS="$ac_save_LIBS"
6590
6591 fi
6592 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6593   echo "$ac_t""yes" 1>&6
6594   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6595 else
6596   echo "$ac_t""no" 1>&6
6597 fi
6598
6599               
6600 fi
6601
6602             
6603 fi
6604
6605           
6606 fi
6607
6608         
6609 fi
6610
6611       
6612 fi
6613
6614     
6615 fi
6616
6617     ;;
6618   esac
6619
6620   if test "x$lt_cv_dlopen" != xno; then
6621     enable_dlopen=yes
6622   else
6623     enable_dlopen=no
6624   fi
6625
6626   case $lt_cv_dlopen in
6627   dlopen)
6628     save_CPPFLAGS="$CPPFLAGS"
6629         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6630
6631     save_LDFLAGS="$LDFLAGS"
6632     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6633
6634     save_LIBS="$LIBS"
6635     LIBS="$lt_cv_dlopen_libs $LIBS"
6636
6637     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6638 echo "configure:6639: checking whether a program can dlopen itself" >&5
6639 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6640   echo $ac_n "(cached) $ac_c" 1>&6
6641 else
6642           if test "$cross_compiling" = yes; then :
6643   lt_cv_dlopen_self=cross
6644 else
6645     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6646   lt_status=$lt_dlunknown
6647   cat > conftest.$ac_ext <<EOF
6648 #line 6649 "configure"
6649 #include "confdefs.h"
6650
6651 #if HAVE_DLFCN_H
6652 #include <dlfcn.h>
6653 #endif
6654
6655 #include <stdio.h>
6656
6657 #ifdef RTLD_GLOBAL
6658 #  define LT_DLGLOBAL           RTLD_GLOBAL
6659 #else
6660 #  ifdef DL_GLOBAL
6661 #    define LT_DLGLOBAL         DL_GLOBAL
6662 #  else
6663 #    define LT_DLGLOBAL         0
6664 #  endif
6665 #endif
6666
6667 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6668    find out it does not work in some platform. */
6669 #ifndef LT_DLLAZY_OR_NOW
6670 #  ifdef RTLD_LAZY
6671 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6672 #  else
6673 #    ifdef DL_LAZY
6674 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6675 #    else
6676 #      ifdef RTLD_NOW
6677 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6678 #      else
6679 #        ifdef DL_NOW
6680 #          define LT_DLLAZY_OR_NOW      DL_NOW
6681 #        else
6682 #          define LT_DLLAZY_OR_NOW      0
6683 #        endif
6684 #      endif
6685 #    endif
6686 #  endif
6687 #endif
6688
6689 #ifdef __cplusplus
6690 extern "C" void exit (int);
6691 #endif
6692
6693 void fnord() { int i=42;}
6694 int main ()
6695 {
6696   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6697   int status = $lt_dlunknown;
6698
6699   if (self)
6700     {
6701       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6702       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6703       /* dlclose (self); */
6704     }
6705
6706     exit (status);
6707 }
6708 EOF
6709   if { (eval echo configure:6710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6710     (./conftest; exit; ) 2>/dev/null
6711     lt_status=$?
6712     case x$lt_status in
6713       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6714       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6715       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6716     esac
6717   else :
6718     # compilation failed
6719     lt_cv_dlopen_self=no
6720   fi
6721 fi
6722 rm -fr conftest*
6723
6724     
6725 fi
6726
6727 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6728
6729     if test "x$lt_cv_dlopen_self" = xyes; then
6730       LDFLAGS="$LDFLAGS $link_static_flag"
6731       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6732 echo "configure:6733: checking whether a statically linked program can dlopen itself" >&5
6733 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6734   echo $ac_n "(cached) $ac_c" 1>&6
6735 else
6736           if test "$cross_compiling" = yes; then :
6737   lt_cv_dlopen_self_static=cross
6738 else
6739     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6740   lt_status=$lt_dlunknown
6741   cat > conftest.$ac_ext <<EOF
6742 #line 6743 "configure"
6743 #include "confdefs.h"
6744
6745 #if HAVE_DLFCN_H
6746 #include <dlfcn.h>
6747 #endif
6748
6749 #include <stdio.h>
6750
6751 #ifdef RTLD_GLOBAL
6752 #  define LT_DLGLOBAL           RTLD_GLOBAL
6753 #else
6754 #  ifdef DL_GLOBAL
6755 #    define LT_DLGLOBAL         DL_GLOBAL
6756 #  else
6757 #    define LT_DLGLOBAL         0
6758 #  endif
6759 #endif
6760
6761 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6762    find out it does not work in some platform. */
6763 #ifndef LT_DLLAZY_OR_NOW
6764 #  ifdef RTLD_LAZY
6765 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6766 #  else
6767 #    ifdef DL_LAZY
6768 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6769 #    else
6770 #      ifdef RTLD_NOW
6771 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6772 #      else
6773 #        ifdef DL_NOW
6774 #          define LT_DLLAZY_OR_NOW      DL_NOW
6775 #        else
6776 #          define LT_DLLAZY_OR_NOW      0
6777 #        endif
6778 #      endif
6779 #    endif
6780 #  endif
6781 #endif
6782
6783 #ifdef __cplusplus
6784 extern "C" void exit (int);
6785 #endif
6786
6787 void fnord() { int i=42;}
6788 int main ()
6789 {
6790   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6791   int status = $lt_dlunknown;
6792
6793   if (self)
6794     {
6795       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6796       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6797       /* dlclose (self); */
6798     }
6799
6800     exit (status);
6801 }
6802 EOF
6803   if { (eval echo configure:6804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6804     (./conftest; exit; ) 2>/dev/null
6805     lt_status=$?
6806     case x$lt_status in
6807       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6808       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6809       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6810     esac
6811   else :
6812     # compilation failed
6813     lt_cv_dlopen_self_static=no
6814   fi
6815 fi
6816 rm -fr conftest*
6817
6818       
6819 fi
6820
6821 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
6822     fi
6823
6824     CPPFLAGS="$save_CPPFLAGS"
6825     LDFLAGS="$save_LDFLAGS"
6826     LIBS="$save_LIBS"
6827     ;;
6828   esac
6829
6830   case $lt_cv_dlopen_self in
6831   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6832   *) enable_dlopen_self=unknown ;;
6833   esac
6834
6835   case $lt_cv_dlopen_self_static in
6836   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
6837   *) enable_dlopen_self_static=unknown ;;
6838   esac
6839 fi
6840
6841
6842 if test "$enable_shared" = yes && test "$GCC" = yes; then
6843   case $archive_cmds in
6844   *'~'*)
6845     # FIXME: we may have to deal with multi-command sequences.
6846     ;;
6847   '$CC '*)
6848     # Test whether the compiler implicitly links with -lc since on some
6849     # systems, -lgcc has to come before -lc. If gcc already passes -lc
6850     # to ld, don't add -lc before -lgcc.
6851     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
6852 echo "configure:6853: checking whether -lc should be explicitly linked in" >&5
6853     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
6854   echo $ac_n "(cached) $ac_c" 1>&6
6855 else
6856   $rm conftest*
6857     echo 'static int dummy;' > conftest.$ac_ext
6858
6859     if { (eval echo configure:6860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
6860       soname=conftest
6861       lib=conftest
6862       libobjs=conftest.$ac_objext
6863       deplibs=
6864       wl=$lt_cv_prog_cc_wl
6865       compiler_flags=-v
6866       linker_flags=-v
6867       verstring=
6868       output_objdir=.
6869       libname=conftest
6870       save_allow_undefined_flag=$allow_undefined_flag
6871       allow_undefined_flag=
6872       if { (eval echo configure:6873: \"$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; }
6873       then
6874         lt_cv_archive_cmds_need_lc=no
6875       else
6876         lt_cv_archive_cmds_need_lc=yes
6877       fi
6878       allow_undefined_flag=$save_allow_undefined_flag
6879     else
6880       cat conftest.err 1>&5
6881     fi
6882 fi
6883
6884     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
6885     ;;
6886   esac
6887 fi
6888 need_lc=${lt_cv_archive_cmds_need_lc-yes}
6889
6890 # The second clause should only fire when bootstrapping the
6891 # libtool distribution, otherwise you forgot to ship ltmain.sh
6892 # with your package, and you will get complaints that there are
6893 # no rules to generate ltmain.sh.
6894 if test -f "$ltmain"; then
6895   :
6896 else
6897   # If there is no Makefile yet, we rely on a make rule to execute
6898   # `config.status --recheck' to rerun these tests and create the
6899   # libtool script then.
6900   test -f Makefile && make "$ltmain"
6901 fi
6902
6903 if test -f "$ltmain"; then
6904   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
6905   $rm -f "${ofile}T"
6906
6907   echo creating $ofile
6908
6909   # Now quote all the things that may contain metacharacters while being
6910   # careful not to overquote the AC_SUBSTed values.  We take copies of the
6911   # variables and quote the copies for generation of the libtool script.
6912   for var in echo old_CC old_CFLAGS SED \
6913     AR AR_FLAGS CC LD LN_S NM SHELL \
6914     reload_flag reload_cmds wl \
6915     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
6916     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
6917     library_names_spec soname_spec \
6918     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
6919     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
6920     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
6921     old_striplib striplib file_magic_cmd export_symbols_cmds \
6922     deplibs_check_method allow_undefined_flag no_undefined_flag \
6923     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
6924     global_symbol_to_c_name_address \
6925     hardcode_libdir_flag_spec hardcode_libdir_separator  \
6926     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
6927     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
6928
6929     case $var in
6930     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
6931     old_postinstall_cmds | old_postuninstall_cmds | \
6932     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
6933     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
6934     postinstall_cmds | postuninstall_cmds | \
6935     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
6936       # Double-quote double-evaled strings.
6937       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
6938       ;;
6939     *)
6940       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
6941       ;;
6942     esac
6943   done
6944
6945   cat <<__EOF__ > "${ofile}T"
6946 #! $SHELL
6947
6948 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
6949 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
6950 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
6951 #
6952 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
6953 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
6954 #
6955 # This program is free software; you can redistribute it and/or modify
6956 # it under the terms of the GNU General Public License as published by
6957 # the Free Software Foundation; either version 2 of the License, or
6958 # (at your option) any later version.
6959 #
6960 # This program is distributed in the hope that it will be useful, but
6961 # WITHOUT ANY WARRANTY; without even the implied warranty of
6962 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
6963 # General Public License for more details.
6964 #
6965 # You should have received a copy of the GNU General Public License
6966 # along with this program; if not, write to the Free Software
6967 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
6968 #
6969 # As a special exception to the GNU General Public License, if you
6970 # distribute this file as part of a program that contains a
6971 # configuration script generated by Autoconf, you may include it under
6972 # the same distribution terms that you use for the rest of that program.
6973
6974 # A sed that does not truncate output.
6975 SED=$lt_SED
6976
6977 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
6978 Xsed="${SED} -e s/^X//"
6979
6980 # The HP-UX ksh and POSIX shell print the target directory to stdout
6981 # if CDPATH is set.
6982 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
6983
6984 # ### BEGIN LIBTOOL CONFIG
6985
6986 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
6987
6988 # Shell to use when invoking shell scripts.
6989 SHELL=$lt_SHELL
6990
6991 # Whether or not to build shared libraries.
6992 build_libtool_libs=$enable_shared
6993
6994 # Whether or not to build static libraries.
6995 build_old_libs=$enable_static
6996
6997 # Whether or not to add -lc for building shared libraries.
6998 build_libtool_need_lc=$need_lc
6999
7000 # Whether or not to optimize for fast installation.
7001 fast_install=$enable_fast_install
7002
7003 # The host system.
7004 host_alias=$host_alias
7005 host=$host
7006
7007 # An echo program that does not interpret backslashes.
7008 echo=$lt_echo
7009
7010 # The archiver.
7011 AR=$lt_AR
7012 AR_FLAGS=$lt_AR_FLAGS
7013
7014 # The default C compiler.
7015 CC=$lt_CC
7016
7017 # Is the compiler the GNU C compiler?
7018 with_gcc=$GCC
7019
7020 # The linker used to build libraries.
7021 LD=$lt_LD
7022
7023 # Whether we need hard or soft links.
7024 LN_S=$lt_LN_S
7025
7026 # A BSD-compatible nm program.
7027 NM=$lt_NM
7028
7029 # A symbol stripping program
7030 STRIP=$STRIP
7031
7032 # Used to examine libraries when file_magic_cmd begins "file"
7033 MAGIC_CMD=$MAGIC_CMD
7034
7035 # Used on cygwin: DLL creation program.
7036 DLLTOOL="$DLLTOOL"
7037
7038 # Used on cygwin: object dumper.
7039 OBJDUMP="$OBJDUMP"
7040
7041 # Used on cygwin: assembler.
7042 AS="$AS"
7043
7044 # The name of the directory that contains temporary libtool files.
7045 objdir=$objdir
7046
7047 # How to create reloadable object files.
7048 reload_flag=$lt_reload_flag
7049 reload_cmds=$lt_reload_cmds
7050
7051 # How to pass a linker flag through the compiler.
7052 wl=$lt_wl
7053
7054 # Object file suffix (normally "o").
7055 objext="$ac_objext"
7056
7057 # Old archive suffix (normally "a").
7058 libext="$libext"
7059
7060 # Executable file suffix (normally "").
7061 exeext="$exeext"
7062
7063 # Additional compiler flags for building library objects.
7064 pic_flag=$lt_pic_flag
7065 pic_mode=$pic_mode
7066
7067 # Does compiler simultaneously support -c and -o options?
7068 compiler_c_o=$lt_compiler_c_o
7069
7070 # Can we write directly to a .lo ?
7071 compiler_o_lo=$lt_compiler_o_lo
7072
7073 # Must we lock files when doing compilation ?
7074 need_locks=$lt_need_locks
7075
7076 # Do we need the lib prefix for modules?
7077 need_lib_prefix=$need_lib_prefix
7078
7079 # Do we need a version for libraries?
7080 need_version=$need_version
7081
7082 # Whether dlopen is supported.
7083 dlopen_support=$enable_dlopen
7084
7085 # Whether dlopen of programs is supported.
7086 dlopen_self=$enable_dlopen_self
7087
7088 # Whether dlopen of statically linked programs is supported.
7089 dlopen_self_static=$enable_dlopen_self_static
7090
7091 # Compiler flag to prevent dynamic linking.
7092 link_static_flag=$lt_link_static_flag
7093
7094 # Compiler flag to turn off builtin functions.
7095 no_builtin_flag=$lt_no_builtin_flag
7096
7097 # Compiler flag to allow reflexive dlopens.
7098 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7099
7100 # Compiler flag to generate shared objects directly from archives.
7101 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7102
7103 # Compiler flag to generate thread-safe objects.
7104 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7105
7106 # Library versioning type.
7107 version_type=$version_type
7108
7109 # Format of library name prefix.
7110 libname_spec=$lt_libname_spec
7111
7112 # List of archive names.  First name is the real one, the rest are links.
7113 # The last name is the one that the linker finds with -lNAME.
7114 library_names_spec=$lt_library_names_spec
7115
7116 # The coded name of the library, if different from the real name.
7117 soname_spec=$lt_soname_spec
7118
7119 # Commands used to build and install an old-style archive.
7120 RANLIB=$lt_RANLIB
7121 old_archive_cmds=$lt_old_archive_cmds
7122 old_postinstall_cmds=$lt_old_postinstall_cmds
7123 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7124
7125 # Create an old-style archive from a shared archive.
7126 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7127
7128 # Create a temporary old-style archive to link instead of a shared archive.
7129 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7130
7131 # Commands used to build and install a shared archive.
7132 archive_cmds=$lt_archive_cmds
7133 archive_expsym_cmds=$lt_archive_expsym_cmds
7134 postinstall_cmds=$lt_postinstall_cmds
7135 postuninstall_cmds=$lt_postuninstall_cmds
7136
7137 # Commands to strip libraries.
7138 old_striplib=$lt_old_striplib
7139 striplib=$lt_striplib
7140
7141 # Method to check whether dependent libraries are shared objects.
7142 deplibs_check_method=$lt_deplibs_check_method
7143
7144 # Command to use when deplibs_check_method == file_magic.
7145 file_magic_cmd=$lt_file_magic_cmd
7146
7147 # Flag that allows shared libraries with undefined symbols to be built.
7148 allow_undefined_flag=$lt_allow_undefined_flag
7149
7150 # Flag that forces no undefined symbols.
7151 no_undefined_flag=$lt_no_undefined_flag
7152
7153 # Commands used to finish a libtool library installation in a directory.
7154 finish_cmds=$lt_finish_cmds
7155
7156 # Same as above, but a single script fragment to be evaled but not shown.
7157 finish_eval=$lt_finish_eval
7158
7159 # Take the output of nm and produce a listing of raw symbols and C names.
7160 global_symbol_pipe=$lt_global_symbol_pipe
7161
7162 # Transform the output of nm in a proper C declaration
7163 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7164
7165 # Transform the output of nm in a C name address pair
7166 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7167
7168 # This is the shared library runtime path variable.
7169 runpath_var=$runpath_var
7170
7171 # This is the shared library path variable.
7172 shlibpath_var=$shlibpath_var
7173
7174 # Is shlibpath searched before the hard-coded library search path?
7175 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7176
7177 # How to hardcode a shared library path into an executable.
7178 hardcode_action=$hardcode_action
7179
7180 # Whether we should hardcode library paths into libraries.
7181 hardcode_into_libs=$hardcode_into_libs
7182
7183 # Flag to hardcode \$libdir into a binary during linking.
7184 # This must work even if \$libdir does not exist.
7185 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7186
7187 # Whether we need a single -rpath flag with a separated argument.
7188 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7189
7190 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7191 # resulting binary.
7192 hardcode_direct=$hardcode_direct
7193
7194 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7195 # resulting binary.
7196 hardcode_minus_L=$hardcode_minus_L
7197
7198 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7199 # the resulting binary.
7200 hardcode_shlibpath_var=$hardcode_shlibpath_var
7201
7202 # Variables whose values should be saved in libtool wrapper scripts and
7203 # restored at relink time.
7204 variables_saved_for_relink="$variables_saved_for_relink"
7205
7206 # Whether libtool must link a program against all its dependency libraries.
7207 link_all_deplibs=$link_all_deplibs
7208
7209 # Compile-time system search path for libraries
7210 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7211
7212 # Run-time system search path for libraries
7213 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7214
7215 # Fix the shell variable \$srcfile for the compiler.
7216 fix_srcfile_path="$fix_srcfile_path"
7217
7218 # Set to yes if exported symbols are required.
7219 always_export_symbols=$always_export_symbols
7220
7221 # The commands to list exported symbols.
7222 export_symbols_cmds=$lt_export_symbols_cmds
7223
7224 # The commands to extract the exported symbol list from a shared archive.
7225 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7226
7227 # Symbols that should not be listed in the preloaded symbols.
7228 exclude_expsyms=$lt_exclude_expsyms
7229
7230 # Symbols that must always be exported.
7231 include_expsyms=$lt_include_expsyms
7232
7233 # ### END LIBTOOL CONFIG
7234
7235 __EOF__
7236
7237   case $host_os in
7238   aix3*)
7239     cat <<\EOF >> "${ofile}T"
7240
7241 # AIX sometimes has problems with the GCC collect2 program.  For some
7242 # reason, if we set the COLLECT_NAMES environment variable, the problems
7243 # vanish in a puff of smoke.
7244 if test "X${COLLECT_NAMES+set}" != Xset; then
7245   COLLECT_NAMES=
7246   export COLLECT_NAMES
7247 fi
7248 EOF
7249     ;;
7250   esac
7251
7252   case $host_os in
7253   cygwin* | mingw* | pw32* | os2*)
7254     cat <<'EOF' >> "${ofile}T"
7255       # This is a source program that is used to create dlls on Windows
7256       # Don't remove nor modify the starting and closing comments
7257 # /* ltdll.c starts here */
7258 # #define WIN32_LEAN_AND_MEAN
7259 # #include <windows.h>
7260 # #undef WIN32_LEAN_AND_MEAN
7261 # #include <stdio.h>
7262 #
7263 # #ifndef __CYGWIN__
7264 # #  ifdef __CYGWIN32__
7265 # #    define __CYGWIN__ __CYGWIN32__
7266 # #  endif
7267 # #endif
7268 #
7269 # #ifdef __cplusplus
7270 # extern "C" {
7271 # #endif
7272 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7273 # #ifdef __cplusplus
7274 # }
7275 # #endif
7276 #
7277 # #ifdef __CYGWIN__
7278 # #include <cygwin/cygwin_dll.h>
7279 # DECLARE_CYGWIN_DLL( DllMain );
7280 # #endif
7281 # HINSTANCE __hDllInstance_base;
7282 #
7283 # BOOL APIENTRY
7284 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7285 # {
7286 #   __hDllInstance_base = hInst;
7287 #   return TRUE;
7288 # }
7289 # /* ltdll.c ends here */
7290         # This is a source program that is used to create import libraries
7291         # on Windows for dlls which lack them. Don't remove nor modify the
7292         # starting and closing comments
7293 # /* impgen.c starts here */
7294 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7295 #
7296 #  This file is part of GNU libtool.
7297 #
7298 #  This program is free software; you can redistribute it and/or modify
7299 #  it under the terms of the GNU General Public License as published by
7300 #  the Free Software Foundation; either version 2 of the License, or
7301 #  (at your option) any later version.
7302 #
7303 #  This program is distributed in the hope that it will be useful,
7304 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7305 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7306 #  GNU General Public License for more details.
7307 #
7308 #  You should have received a copy of the GNU General Public License
7309 #  along with this program; if not, write to the Free Software
7310 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7311 #  */
7312 #
7313 # #include <stdio.h>            /* for printf() */
7314 # #include <unistd.h>           /* for open(), lseek(), read() */
7315 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7316 # #include <string.h>           /* for strdup() */
7317 #
7318 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7319 # #ifndef O_BINARY
7320 # #define O_BINARY 0
7321 # #endif
7322 #
7323 # static unsigned int
7324 # pe_get16 (fd, offset)
7325 #      int fd;
7326 #      int offset;
7327 # {
7328 #   unsigned char b[2];
7329 #   lseek (fd, offset, SEEK_SET);
7330 #   read (fd, b, 2);
7331 #   return b[0] + (b[1]<<8);
7332 # }
7333 #
7334 # static unsigned int
7335 # pe_get32 (fd, offset)
7336 #     int fd;
7337 #     int offset;
7338 # {
7339 #   unsigned char b[4];
7340 #   lseek (fd, offset, SEEK_SET);
7341 #   read (fd, b, 4);
7342 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7343 # }
7344 #
7345 # static unsigned int
7346 # pe_as32 (ptr)
7347 #      void *ptr;
7348 # {
7349 #   unsigned char *b = ptr;
7350 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7351 # }
7352 #
7353 # int
7354 # main (argc, argv)
7355 #     int argc;
7356 #     char *argv[];
7357 # {
7358 #     int dll;
7359 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7360 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7361 #     unsigned long name_rvas, nexp;
7362 #     unsigned char *expdata, *erva;
7363 #     char *filename, *dll_name;
7364 #
7365 #     filename = argv[1];
7366 #
7367 #     dll = open(filename, O_RDONLY|O_BINARY);
7368 #     if (dll < 1)
7369 #       return 1;
7370 #
7371 #     dll_name = filename;
7372 #
7373 #     for (i=0; filename[i]; i++)
7374 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7375 #           dll_name = filename + i +1;
7376 #
7377 #     pe_header_offset = pe_get32 (dll, 0x3c);
7378 #     opthdr_ofs = pe_header_offset + 4 + 20;
7379 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7380 #
7381 #     if (num_entries < 1) /* no exports */
7382 #       return 1;
7383 #
7384 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7385 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7386 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7387 #     secptr = (pe_header_offset + 4 + 20 +
7388 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7389 #
7390 #     expptr = 0;
7391 #     for (i = 0; i < nsections; i++)
7392 #     {
7393 #       char sname[8];
7394 #       unsigned long secptr1 = secptr + 40 * i;
7395 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7396 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7397 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7398 #       lseek(dll, secptr1, SEEK_SET);
7399 #       read(dll, sname, 8);
7400 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7401 #       {
7402 #           expptr = fptr + (export_rva - vaddr);
7403 #           if (export_rva + export_size > vaddr + vsize)
7404 #               export_size = vsize - (export_rva - vaddr);
7405 #           break;
7406 #       }
7407 #     }
7408 #
7409 #     expdata = (unsigned char*)malloc(export_size);
7410 #     lseek (dll, expptr, SEEK_SET);
7411 #     read (dll, expdata, export_size);
7412 #     erva = expdata - export_rva;
7413 #
7414 #     nexp = pe_as32 (expdata+24);
7415 #     name_rvas = pe_as32 (expdata+32);
7416 #
7417 #     printf ("EXPORTS\n");
7418 #     for (i = 0; i<nexp; i++)
7419 #     {
7420 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7421 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7422 #     }
7423 #
7424 #     return 0;
7425 # }
7426 # /* impgen.c ends here */
7427
7428 EOF
7429     ;;
7430   esac
7431
7432   # We use sed instead of cat because bash on DJGPP gets confused if
7433   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7434   # text mode, it properly converts lines to CR/LF.  This bash problem
7435   # is reportedly fixed, but why not run on old versions too?
7436   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7437
7438   mv -f "${ofile}T" "$ofile" || \
7439     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7440   chmod +x "$ofile"
7441 fi
7442
7443
7444
7445
7446
7447 # This can be used to rebuild libtool when needed
7448 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7449
7450 # Always use our own libtool.
7451 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7452
7453 # Prevent multiple expansion
7454
7455
7456
7457 # test for ln hardlink support
7458 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7459 echo "configure:7460: checking whether ln works" >&5
7460 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7461   echo $ac_n "(cached) $ac_c" 1>&6
7462 else
7463   rm -f conftest.src conftest.dst
7464 echo "conftest" > conftest.src
7465 if ln conftest.src conftest.dst 2>/dev/null
7466 then
7467   ol_cv_prog_LN_H="ln"
7468 else
7469   ol_cv_prog_LN_H="cp"
7470 fi
7471 rm -f conftest.src conftest.dst
7472
7473 fi
7474 LN_H="$ol_cv_prog_LN_H"
7475 if test "$ol_cv_prog_LN_H" = "ln"; then
7476         echo "$ac_t""yes" 1>&6
7477 else
7478         echo "$ac_t""no" 1>&6
7479 fi
7480
7481 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7482 echo "configure:7483: checking whether ln -s works" >&5
7483 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7484   echo $ac_n "(cached) $ac_c" 1>&6
7485 else
7486   rm -f conftestdata
7487 if ln -s X conftestdata 2>/dev/null
7488 then
7489   rm -f conftestdata
7490   ac_cv_prog_LN_S="ln -s"
7491 else
7492   ac_cv_prog_LN_S=ln
7493 fi
7494 fi
7495 LN_S="$ac_cv_prog_LN_S"
7496 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7497   echo "$ac_t""yes" 1>&6
7498 else
7499   echo "$ac_t""no" 1>&6
7500 fi
7501
7502
7503 ol_link_perl=no
7504 if test $ol_enable_perl != no ; then
7505         # Extract the first word of "perl", so it can be a program name with args.
7506 set dummy perl; ac_word=$2
7507 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7508 echo "configure:7509: checking for $ac_word" >&5
7509 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7510   echo $ac_n "(cached) $ac_c" 1>&6
7511 else
7512   case "$PERLBIN" in
7513   /*)
7514   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7515   ;;
7516   ?:/*)
7517   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7518   ;;
7519   *)
7520   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7521   ac_dummy="$PATH"
7522   for ac_dir in $ac_dummy; do 
7523     test -z "$ac_dir" && ac_dir=.
7524     if test -f $ac_dir/$ac_word; then
7525       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7526       break
7527     fi
7528   done
7529   IFS="$ac_save_ifs"
7530   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7531   ;;
7532 esac
7533 fi
7534 PERLBIN="$ac_cv_path_PERLBIN"
7535 if test -n "$PERLBIN"; then
7536   echo "$ac_t""$PERLBIN" 1>&6
7537 else
7538   echo "$ac_t""no" 1>&6
7539 fi
7540
7541
7542         if test "no$PERLBIN" = "no" ; then
7543                 if test $ol_enable_perl = yes ; then
7544                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7545                 fi
7546
7547         else
7548                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7549                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7550
7551                 if test x"$ol_enable_perl" = "xyes" ; then
7552                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7553                 else
7554                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7555                 fi
7556                                 ol_link_perl=yes
7557         fi
7558 fi
7559
7560 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7561 echo "configure:7562: checking how to run the C preprocessor" >&5
7562 # On Suns, sometimes $CPP names a directory.
7563 if test -n "$CPP" && test -d "$CPP"; then
7564   CPP=
7565 fi
7566 if test -z "$CPP"; then
7567 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7568   echo $ac_n "(cached) $ac_c" 1>&6
7569 else
7570     # This must be in double quotes, not single quotes, because CPP may get
7571   # substituted into the Makefile and "${CC-cc}" will confuse make.
7572   CPP="${CC-cc} -E"
7573   # On the NeXT, cc -E runs the code through the compiler's parser,
7574   # not just through cpp.
7575   cat > conftest.$ac_ext <<EOF
7576 #line 7577 "configure"
7577 #include "confdefs.h"
7578 #include <assert.h>
7579 Syntax Error
7580 EOF
7581 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7582 { (eval echo configure:7583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7583 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7584 if test -z "$ac_err"; then
7585   :
7586 else
7587   echo "$ac_err" >&5
7588   echo "configure: failed program was:" >&5
7589   cat conftest.$ac_ext >&5
7590   rm -rf conftest*
7591   CPP="${CC-cc} -E -traditional-cpp"
7592   cat > conftest.$ac_ext <<EOF
7593 #line 7594 "configure"
7594 #include "confdefs.h"
7595 #include <assert.h>
7596 Syntax Error
7597 EOF
7598 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7599 { (eval echo configure:7600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7600 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7601 if test -z "$ac_err"; then
7602   :
7603 else
7604   echo "$ac_err" >&5
7605   echo "configure: failed program was:" >&5
7606   cat conftest.$ac_ext >&5
7607   rm -rf conftest*
7608   CPP="${CC-cc} -nologo -E"
7609   cat > conftest.$ac_ext <<EOF
7610 #line 7611 "configure"
7611 #include "confdefs.h"
7612 #include <assert.h>
7613 Syntax Error
7614 EOF
7615 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7616 { (eval echo configure:7617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7617 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7618 if test -z "$ac_err"; then
7619   :
7620 else
7621   echo "$ac_err" >&5
7622   echo "configure: failed program was:" >&5
7623   cat conftest.$ac_ext >&5
7624   rm -rf conftest*
7625   CPP=/lib/cpp
7626 fi
7627 rm -f conftest*
7628 fi
7629 rm -f conftest*
7630 fi
7631 rm -f conftest*
7632   ac_cv_prog_CPP="$CPP"
7633 fi
7634   CPP="$ac_cv_prog_CPP"
7635 else
7636   ac_cv_prog_CPP="$CPP"
7637 fi
7638 echo "$ac_t""$CPP" 1>&6
7639
7640
7641
7642 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7643 echo "configure:7644: checking for Cygwin environment" >&5
7644 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7645   echo $ac_n "(cached) $ac_c" 1>&6
7646 else
7647   cat > conftest.$ac_ext <<EOF
7648 #line 7649 "configure"
7649 #include "confdefs.h"
7650
7651 int main() {
7652
7653 #ifndef __CYGWIN__
7654 #define __CYGWIN__ __CYGWIN32__
7655 #endif
7656 return __CYGWIN__;
7657 ; return 0; }
7658 EOF
7659 if { (eval echo configure:7660: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7660   rm -rf conftest*
7661   ac_cv_cygwin=yes
7662 else
7663   echo "configure: failed program was:" >&5
7664   cat conftest.$ac_ext >&5
7665   rm -rf conftest*
7666   ac_cv_cygwin=no
7667 fi
7668 rm -f conftest*
7669 fi
7670
7671 echo "$ac_t""$ac_cv_cygwin" 1>&6
7672 CYGWIN=
7673 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7674 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7675 echo "configure:7676: checking for mingw32 environment" >&5
7676 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7677   echo $ac_n "(cached) $ac_c" 1>&6
7678 else
7679   cat > conftest.$ac_ext <<EOF
7680 #line 7681 "configure"
7681 #include "confdefs.h"
7682
7683 int main() {
7684 return __MINGW32__;
7685 ; return 0; }
7686 EOF
7687 if { (eval echo configure:7688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7688   rm -rf conftest*
7689   ac_cv_mingw32=yes
7690 else
7691   echo "configure: failed program was:" >&5
7692   cat conftest.$ac_ext >&5
7693   rm -rf conftest*
7694   ac_cv_mingw32=no
7695 fi
7696 rm -f conftest*
7697 fi
7698
7699 echo "$ac_t""$ac_cv_mingw32" 1>&6
7700 MINGW32=
7701 test "$ac_cv_mingw32" = yes && MINGW32=yes
7702
7703
7704
7705 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7706 echo "configure:7707: checking for executable suffix" >&5
7707 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7708   echo $ac_n "(cached) $ac_c" 1>&6
7709 else
7710   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7711   ac_cv_exeext=.exe
7712 else
7713   rm -f conftest*
7714   echo 'int main () { return 0; }' > conftest.$ac_ext
7715   ac_cv_exeext=
7716   if { (eval echo configure:7717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7717     for file in conftest.*; do
7718       case $file in
7719       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7720       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7721       esac
7722     done
7723   else
7724     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7725   fi
7726   rm -f conftest*
7727   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7728 fi
7729 fi
7730
7731 EXEEXT=""
7732 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7733 echo "$ac_t""${ac_cv_exeext}" 1>&6
7734 ac_exeext=$EXEEXT
7735
7736 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7737 echo "configure:7738: checking for object suffix" >&5
7738 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7739   echo $ac_n "(cached) $ac_c" 1>&6
7740 else
7741   rm -f conftest*
7742 echo 'int i = 1;' > conftest.$ac_ext
7743 if { (eval echo configure:7744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7744   for ac_file in conftest.*; do
7745     case $ac_file in
7746     *.c) ;;
7747     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7748     esac
7749   done
7750 else
7751   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7752 fi
7753 rm -f conftest*
7754 fi
7755
7756 echo "$ac_t""$ac_cv_objext" 1>&6
7757 OBJEXT=$ac_cv_objext
7758 ac_objext=$ac_cv_objext
7759
7760
7761 cat >> confdefs.h <<EOF
7762 #define EXEEXT "${EXEEXT}"
7763 EOF
7764
7765
7766 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7767 echo "configure:7768: checking for be_app in -lbe" >&5
7768 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7769 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7770   echo $ac_n "(cached) $ac_c" 1>&6
7771 else
7772   ac_save_LIBS="$LIBS"
7773 LIBS="-lbe -lroot -lnet $LIBS"
7774 cat > conftest.$ac_ext <<EOF
7775 #line 7776 "configure"
7776 #include "confdefs.h"
7777 /* Override any gcc2 internal prototype to avoid an error.  */
7778 /* We use char because int might match the return type of a gcc2
7779     builtin and then its argument prototype would still apply.  */
7780 char be_app();
7781
7782 int main() {
7783 be_app()
7784 ; return 0; }
7785 EOF
7786 if { (eval echo configure:7787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7787   rm -rf conftest*
7788   eval "ac_cv_lib_$ac_lib_var=yes"
7789 else
7790   echo "configure: failed program was:" >&5
7791   cat conftest.$ac_ext >&5
7792   rm -rf conftest*
7793   eval "ac_cv_lib_$ac_lib_var=no"
7794 fi
7795 rm -f conftest*
7796 LIBS="$ac_save_LIBS"
7797
7798 fi
7799 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7800   echo "$ac_t""yes" 1>&6
7801   LIBS="$LIBS -lbe -lroot -lnet"
7802 else
7803   echo "$ac_t""no" 1>&6
7804 :
7805 fi
7806
7807
7808
7809
7810
7811 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
7812 echo "configure:7813: checking for ${CC-cc} option to accept ANSI C" >&5
7813 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
7814   echo $ac_n "(cached) $ac_c" 1>&6
7815 else
7816   am_cv_prog_cc_stdc=no
7817 ac_save_CC="$CC"
7818 # Don't try gcc -ansi; that turns off useful extensions and
7819 # breaks some systems' header files.
7820 # AIX                   -qlanglvl=ansi
7821 # Ultrix and OSF/1      -std1
7822 # HP-UX 10.20 and later -Ae
7823 # HP-UX older versions  -Aa -D_HPUX_SOURCE
7824 # SVR4                  -Xc -D__EXTENSIONS__
7825 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7826 do
7827   CC="$ac_save_CC $ac_arg"
7828   cat > conftest.$ac_ext <<EOF
7829 #line 7830 "configure"
7830 #include "confdefs.h"
7831 #include <stdarg.h>
7832 #include <stdio.h>
7833 #include <sys/types.h>
7834 #include <sys/stat.h>
7835 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
7836 struct buf { int x; };
7837 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7838 static char *e (p, i)
7839      char **p;
7840      int i;
7841 {
7842   return p[i];
7843 }
7844 static char *f (char * (*g) (char **, int), char **p, ...)
7845 {
7846   char *s;
7847   va_list v;
7848   va_start (v,p);
7849   s = g (p, va_arg (v,int));
7850   va_end (v);
7851   return s;
7852 }
7853 int test (int i, double x);
7854 struct s1 {int (*f) (int a);};
7855 struct s2 {int (*f) (double a);};
7856 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
7857 int argc;
7858 char **argv;
7859
7860 int main() {
7861
7862 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
7863
7864 ; return 0; }
7865 EOF
7866 if { (eval echo configure:7867: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7867   rm -rf conftest*
7868   am_cv_prog_cc_stdc="$ac_arg"; break
7869 else
7870   echo "configure: failed program was:" >&5
7871   cat conftest.$ac_ext >&5
7872 fi
7873 rm -f conftest*
7874 done
7875 CC="$ac_save_CC"
7876
7877 fi
7878
7879 if test -z "$am_cv_prog_cc_stdc"; then
7880   echo "$ac_t""none needed" 1>&6
7881 else
7882   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
7883 fi
7884 case "x$am_cv_prog_cc_stdc" in
7885   x|xno) ;;
7886   *) CC="$CC $am_cv_prog_cc_stdc" ;;
7887 esac
7888
7889 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
7890         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
7891 fi
7892
7893 # test for make depend flag
7894 OL_MKDEP=
7895 OL_MKDEP_FLAGS=
7896 if test -z "${MKDEP}"; then
7897         OL_MKDEP="${CC-cc}"
7898         if test -z "${MKDEP_FLAGS}"; then
7899                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
7900 echo "configure:7901: checking for ${OL_MKDEP} depend flag" >&5
7901 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
7902   echo $ac_n "(cached) $ac_c" 1>&6
7903 else
7904   
7905                         ol_cv_mkdep=no
7906                         for flag in "-M" "-xM"; do
7907                                 cat > conftest.c <<EOF
7908  noCode;
7909 EOF
7910                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:7911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
7911                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
7912                                 then
7913                                         if test ! -f conftest."${ac_object}" ; then
7914                                                 ol_cv_mkdep=$flag
7915                                                 OL_MKDEP_FLAGS="$flag"
7916                                                 break
7917                                         fi
7918                                 fi
7919                         done
7920                         rm -f conftest*
7921                 
7922 fi
7923
7924 echo "$ac_t""$ol_cv_mkdep" 1>&6
7925         else
7926                 cc_cv_mkdep=yes
7927                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
7928         fi
7929 else
7930         cc_cv_mkdep=yes
7931         OL_MKDEP="${MKDEP}"
7932         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
7933 fi
7934
7935
7936
7937 if test "${ol_cv_mkdep}" = no ; then
7938         # this will soon become an error
7939         echo "configure: warning: do not know how to generate dependencies" 1>&2
7940 fi
7941
7942 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
7943 echo "configure:7944: checking for afopen in -ls" >&5
7944 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
7945 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7946   echo $ac_n "(cached) $ac_c" 1>&6
7947 else
7948   ac_save_LIBS="$LIBS"
7949 LIBS="-ls  $LIBS"
7950 cat > conftest.$ac_ext <<EOF
7951 #line 7952 "configure"
7952 #include "confdefs.h"
7953 /* Override any gcc2 internal prototype to avoid an error.  */
7954 /* We use char because int might match the return type of a gcc2
7955     builtin and then its argument prototype would still apply.  */
7956 char afopen();
7957
7958 int main() {
7959 afopen()
7960 ; return 0; }
7961 EOF
7962 if { (eval echo configure:7963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7963   rm -rf conftest*
7964   eval "ac_cv_lib_$ac_lib_var=yes"
7965 else
7966   echo "configure: failed program was:" >&5
7967   cat conftest.$ac_ext >&5
7968   rm -rf conftest*
7969   eval "ac_cv_lib_$ac_lib_var=no"
7970 fi
7971 rm -f conftest*
7972 LIBS="$ac_save_LIBS"
7973
7974 fi
7975 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7976   echo "$ac_t""yes" 1>&6
7977   
7978         AUTH_LIBS=-ls
7979         cat >> confdefs.h <<\EOF
7980 #define HAVE_AIX_SECURITY 1
7981 EOF
7982
7983
7984 else
7985   echo "$ac_t""no" 1>&6
7986 fi
7987
7988
7989 case "$target" in
7990 *-ibm-openedition)
7991         ac_cv_func_getopt=no
7992         cat >> confdefs.h <<\EOF
7993 #define BOTH_STRINGS_H 1
7994 EOF
7995
7996         ;;
7997 esac
7998
7999 ol_link_modules=no
8000 if test $ol_enable_modules != no ; then
8001         for ac_hdr in ltdl.h
8002 do
8003 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8004 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8005 echo "configure:8006: checking for $ac_hdr" >&5
8006 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8007   echo $ac_n "(cached) $ac_c" 1>&6
8008 else
8009   cat > conftest.$ac_ext <<EOF
8010 #line 8011 "configure"
8011 #include "confdefs.h"
8012 #include <$ac_hdr>
8013 EOF
8014 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8015 { (eval echo configure:8016: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8016 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8017 if test -z "$ac_err"; then
8018   rm -rf conftest*
8019   eval "ac_cv_header_$ac_safe=yes"
8020 else
8021   echo "$ac_err" >&5
8022   echo "configure: failed program was:" >&5
8023   cat conftest.$ac_ext >&5
8024   rm -rf conftest*
8025   eval "ac_cv_header_$ac_safe=no"
8026 fi
8027 rm -f conftest*
8028 fi
8029 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8030   echo "$ac_t""yes" 1>&6
8031     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8032   cat >> confdefs.h <<EOF
8033 #define $ac_tr_hdr 1
8034 EOF
8035  
8036 else
8037   echo "$ac_t""no" 1>&6
8038 fi
8039 done
8040
8041
8042         if test $ac_cv_header_ltdl_h = no ; then
8043                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8044         fi
8045
8046         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8047 echo "configure:8048: checking for lt_dlinit in -lltdl" >&5
8048 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8049 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8050   echo $ac_n "(cached) $ac_c" 1>&6
8051 else
8052   ac_save_LIBS="$LIBS"
8053 LIBS="-lltdl  $LIBS"
8054 cat > conftest.$ac_ext <<EOF
8055 #line 8056 "configure"
8056 #include "confdefs.h"
8057 /* Override any gcc2 internal prototype to avoid an error.  */
8058 /* We use char because int might match the return type of a gcc2
8059     builtin and then its argument prototype would still apply.  */
8060 char lt_dlinit();
8061
8062 int main() {
8063 lt_dlinit()
8064 ; return 0; }
8065 EOF
8066 if { (eval echo configure:8067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8067   rm -rf conftest*
8068   eval "ac_cv_lib_$ac_lib_var=yes"
8069 else
8070   echo "configure: failed program was:" >&5
8071   cat conftest.$ac_ext >&5
8072   rm -rf conftest*
8073   eval "ac_cv_lib_$ac_lib_var=no"
8074 fi
8075 rm -f conftest*
8076 LIBS="$ac_save_LIBS"
8077
8078 fi
8079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8080   echo "$ac_t""yes" 1>&6
8081   
8082                 MODULES_LIBS=-lltdl
8083                 cat >> confdefs.h <<\EOF
8084 #define HAVE_LIBLTDL 1
8085 EOF
8086
8087         
8088 else
8089   echo "$ac_t""no" 1>&6
8090 fi
8091
8092
8093         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8094                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8095         fi
8096         ol_link_modules=yes
8097
8098 else
8099         for i in $Backends; do
8100                 eval "ol_tmp=\$ol_enable_$i"
8101                 if test $ol_tmp = mod ; then
8102                         echo "configure: warning: building static $i backend" 1>&2
8103                         eval "ol_enable_$i=yes"
8104                 fi
8105         done
8106         for i in $Overlays; do
8107                 eval "ol_tmp=\$ol_enable_$i"
8108                 if test $ol_tmp = mod ; then
8109                         echo "configure: warning: building static $i overlay" 1>&2
8110                         eval "ol_enable_$i=yes"
8111                 fi
8112         done
8113 fi
8114
8115 # test for EBCDIC
8116 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8117 echo "configure:8118: checking for EBCDIC" >&5
8118 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8119   echo $ac_n "(cached) $ac_c" 1>&6
8120 else
8121   
8122         cat > conftest.$ac_ext <<EOF
8123 #line 8124 "configure"
8124 #include "confdefs.h"
8125
8126 #if !('M' == 0xd4)
8127 #include <__ASCII__/generate_error.h>
8128 #endif
8129
8130 EOF
8131 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8132 { (eval echo configure:8133: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8133 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8134 if test -z "$ac_err"; then
8135   rm -rf conftest*
8136   ol_cv_cpp_ebcdic=yes
8137 else
8138   echo "$ac_err" >&5
8139   echo "configure: failed program was:" >&5
8140   cat conftest.$ac_ext >&5
8141   rm -rf conftest*
8142   ol_cv_cpp_ebcdic=no
8143 fi
8144 rm -f conftest*
8145 fi
8146
8147 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8148 if test $ol_cv_cpp_ebcdic = yes ; then
8149         cat >> confdefs.h <<\EOF
8150 #define HAVE_EBCDIC 1
8151 EOF
8152
8153 fi
8154
8155 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8156 echo "configure:8157: checking for ANSI C header files" >&5
8157 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8158   echo $ac_n "(cached) $ac_c" 1>&6
8159 else
8160   cat > conftest.$ac_ext <<EOF
8161 #line 8162 "configure"
8162 #include "confdefs.h"
8163 #include <stdlib.h>
8164 #include <stdarg.h>
8165 #include <string.h>
8166 #include <float.h>
8167 EOF
8168 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8169 { (eval echo configure:8170: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8170 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8171 if test -z "$ac_err"; then
8172   rm -rf conftest*
8173   ol_cv_header_stdc=yes
8174 else
8175   echo "$ac_err" >&5
8176   echo "configure: failed program was:" >&5
8177   cat conftest.$ac_ext >&5
8178   rm -rf conftest*
8179   ol_cv_header_stdc=no
8180 fi
8181 rm -f conftest*
8182
8183 if test $ol_cv_header_stdc = yes; then
8184   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8185 cat > conftest.$ac_ext <<EOF
8186 #line 8187 "configure"
8187 #include "confdefs.h"
8188 #include <string.h>
8189 EOF
8190 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8191   egrep "memchr" >/dev/null 2>&1; then
8192   :
8193 else
8194   rm -rf conftest*
8195   ol_cv_header_stdc=no
8196 fi
8197 rm -f conftest*
8198
8199 fi
8200
8201 if test $ol_cv_header_stdc = yes; then
8202   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8203 cat > conftest.$ac_ext <<EOF
8204 #line 8205 "configure"
8205 #include "confdefs.h"
8206 #include <stdlib.h>
8207 EOF
8208 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8209   egrep "free" >/dev/null 2>&1; then
8210   :
8211 else
8212   rm -rf conftest*
8213   ol_cv_header_stdc=no
8214 fi
8215 rm -f conftest*
8216
8217 fi
8218
8219 if test $ol_cv_header_stdc = yes; then
8220   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8221 if test "$cross_compiling" = yes; then
8222   :
8223 else
8224   cat > conftest.$ac_ext <<EOF
8225 #line 8226 "configure"
8226 #include "confdefs.h"
8227 #include <ctype.h>
8228 #ifndef HAVE_EBCDIC
8229 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8230 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8231 #else
8232 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8233                 || ('j' <= (c) && (c) <= 'r') \
8234                 || ('s' <= (c) && (c) <= 'z'))
8235 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8236 #endif
8237 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8238 int main () { int i; for (i = 0; i < 256; i++)
8239 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8240 exit (0); }
8241
8242 EOF
8243 if { (eval echo configure:8244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8244 then
8245   :
8246 else
8247   echo "configure: failed program was:" >&5
8248   cat conftest.$ac_ext >&5
8249   rm -fr conftest*
8250   ol_cv_header_stdc=no
8251 fi
8252 rm -fr conftest*
8253 fi
8254
8255 fi
8256 fi
8257
8258 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8259 if test $ol_cv_header_stdc = yes; then
8260   cat >> confdefs.h <<\EOF
8261 #define STDC_HEADERS 1
8262 EOF
8263
8264 fi
8265 ac_cv_header_stdc=disable
8266
8267
8268 if test $ol_cv_header_stdc != yes; then
8269         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8270 fi
8271
8272 ac_header_dirent=no
8273 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8274 do
8275 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8276 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8277 echo "configure:8278: checking for $ac_hdr that defines DIR" >&5
8278 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8279   echo $ac_n "(cached) $ac_c" 1>&6
8280 else
8281   cat > conftest.$ac_ext <<EOF
8282 #line 8283 "configure"
8283 #include "confdefs.h"
8284 #include <sys/types.h>
8285 #include <$ac_hdr>
8286 int main() {
8287 DIR *dirp = 0;
8288 ; return 0; }
8289 EOF
8290 if { (eval echo configure:8291: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8291   rm -rf conftest*
8292   eval "ac_cv_header_dirent_$ac_safe=yes"
8293 else
8294   echo "configure: failed program was:" >&5
8295   cat conftest.$ac_ext >&5
8296   rm -rf conftest*
8297   eval "ac_cv_header_dirent_$ac_safe=no"
8298 fi
8299 rm -f conftest*
8300 fi
8301 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8302   echo "$ac_t""yes" 1>&6
8303     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8304   cat >> confdefs.h <<EOF
8305 #define $ac_tr_hdr 1
8306 EOF
8307  ac_header_dirent=$ac_hdr; break
8308 else
8309   echo "$ac_t""no" 1>&6
8310 fi
8311 done
8312 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8313 if test $ac_header_dirent = dirent.h; then
8314 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8315 echo "configure:8316: checking for opendir in -ldir" >&5
8316 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8317 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8318   echo $ac_n "(cached) $ac_c" 1>&6
8319 else
8320   ac_save_LIBS="$LIBS"
8321 LIBS="-ldir  $LIBS"
8322 cat > conftest.$ac_ext <<EOF
8323 #line 8324 "configure"
8324 #include "confdefs.h"
8325 /* Override any gcc2 internal prototype to avoid an error.  */
8326 /* We use char because int might match the return type of a gcc2
8327     builtin and then its argument prototype would still apply.  */
8328 char opendir();
8329
8330 int main() {
8331 opendir()
8332 ; return 0; }
8333 EOF
8334 if { (eval echo configure:8335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8335   rm -rf conftest*
8336   eval "ac_cv_lib_$ac_lib_var=yes"
8337 else
8338   echo "configure: failed program was:" >&5
8339   cat conftest.$ac_ext >&5
8340   rm -rf conftest*
8341   eval "ac_cv_lib_$ac_lib_var=no"
8342 fi
8343 rm -f conftest*
8344 LIBS="$ac_save_LIBS"
8345
8346 fi
8347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8348   echo "$ac_t""yes" 1>&6
8349   LIBS="$LIBS -ldir"
8350 else
8351   echo "$ac_t""no" 1>&6
8352 fi
8353
8354 else
8355 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8356 echo "configure:8357: checking for opendir in -lx" >&5
8357 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8358 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8359   echo $ac_n "(cached) $ac_c" 1>&6
8360 else
8361   ac_save_LIBS="$LIBS"
8362 LIBS="-lx  $LIBS"
8363 cat > conftest.$ac_ext <<EOF
8364 #line 8365 "configure"
8365 #include "confdefs.h"
8366 /* Override any gcc2 internal prototype to avoid an error.  */
8367 /* We use char because int might match the return type of a gcc2
8368     builtin and then its argument prototype would still apply.  */
8369 char opendir();
8370
8371 int main() {
8372 opendir()
8373 ; return 0; }
8374 EOF
8375 if { (eval echo configure:8376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8376   rm -rf conftest*
8377   eval "ac_cv_lib_$ac_lib_var=yes"
8378 else
8379   echo "configure: failed program was:" >&5
8380   cat conftest.$ac_ext >&5
8381   rm -rf conftest*
8382   eval "ac_cv_lib_$ac_lib_var=no"
8383 fi
8384 rm -f conftest*
8385 LIBS="$ac_save_LIBS"
8386
8387 fi
8388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8389   echo "$ac_t""yes" 1>&6
8390   LIBS="$LIBS -lx"
8391 else
8392   echo "$ac_t""no" 1>&6
8393 fi
8394
8395 fi
8396
8397 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8398 echo "configure:8399: checking for sys/wait.h that is POSIX.1 compatible" >&5
8399 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8400   echo $ac_n "(cached) $ac_c" 1>&6
8401 else
8402   cat > conftest.$ac_ext <<EOF
8403 #line 8404 "configure"
8404 #include "confdefs.h"
8405 #include <sys/types.h>
8406 #include <sys/wait.h>
8407 #ifndef WEXITSTATUS
8408 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8409 #endif
8410 #ifndef WIFEXITED
8411 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8412 #endif
8413 int main() {
8414 int s;
8415 wait (&s);
8416 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8417 ; return 0; }
8418 EOF
8419 if { (eval echo configure:8420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8420   rm -rf conftest*
8421   ac_cv_header_sys_wait_h=yes
8422 else
8423   echo "configure: failed program was:" >&5
8424   cat conftest.$ac_ext >&5
8425   rm -rf conftest*
8426   ac_cv_header_sys_wait_h=no
8427 fi
8428 rm -f conftest*
8429 fi
8430
8431 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8432 if test $ac_cv_header_sys_wait_h = yes; then
8433   cat >> confdefs.h <<\EOF
8434 #define HAVE_SYS_WAIT_H 1
8435 EOF
8436
8437 fi
8438
8439 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8440 echo "configure:8441: checking POSIX termios" >&5
8441 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8442   echo $ac_n "(cached) $ac_c" 1>&6
8443 else
8444   cat > conftest.$ac_ext <<EOF
8445 #line 8446 "configure"
8446 #include "confdefs.h"
8447 #include <sys/types.h>
8448 #include <unistd.h>
8449 #include <termios.h>
8450 int main() {
8451 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8452    tcgetattr(0, 0);
8453 ; return 0; }
8454 EOF
8455 if { (eval echo configure:8456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8456   rm -rf conftest*
8457   am_cv_sys_posix_termios=yes
8458 else
8459   echo "configure: failed program was:" >&5
8460   cat conftest.$ac_ext >&5
8461   rm -rf conftest*
8462   am_cv_sys_posix_termios=no
8463 fi
8464 rm -f conftest*
8465 fi
8466
8467 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8468
8469
8470  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8471 echo "configure:8472: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8472 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8473   echo $ac_n "(cached) $ac_c" 1>&6
8474 else
8475   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8476
8477   gwinsz_in_termios_h=no
8478   if test $am_cv_sys_posix_termios = yes; then
8479     cat > conftest.$ac_ext <<EOF
8480 #line 8481 "configure"
8481 #include "confdefs.h"
8482 #include <sys/types.h>
8483 #     include <termios.h>
8484 #     ifdef TIOCGWINSZ
8485         yes
8486 #     endif
8487     
8488 EOF
8489 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8490   egrep "yes" >/dev/null 2>&1; then
8491   rm -rf conftest*
8492   gwinsz_in_termios_h=yes
8493 fi
8494 rm -f conftest*
8495
8496   fi
8497
8498   if test $gwinsz_in_termios_h = no; then
8499     cat > conftest.$ac_ext <<EOF
8500 #line 8501 "configure"
8501 #include "confdefs.h"
8502 #include <sys/types.h>
8503 #     include <sys/ioctl.h>
8504 #     ifdef TIOCGWINSZ
8505         yes
8506 #     endif
8507     
8508 EOF
8509 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8510   egrep "yes" >/dev/null 2>&1; then
8511   rm -rf conftest*
8512   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8513 fi
8514 rm -f conftest*
8515
8516   fi
8517   
8518 fi
8519
8520 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8521   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8522     cat >> confdefs.h <<\EOF
8523 #define GWINSZ_IN_SYS_IOCTL 1
8524 EOF
8525
8526   fi
8527
8528 if test $am_cv_sys_posix_termios = yes ; then
8529         cat >> confdefs.h <<\EOF
8530 #define HAVE_POSIX_TERMIOS 1
8531 EOF
8532
8533 fi
8534
8535 for ac_hdr in \
8536         arpa/inet.h             \
8537         arpa/nameser.h  \
8538         assert.h                \
8539         bits/types.h    \
8540         conio.h                 \
8541         crypt.h                 \
8542         direct.h                \
8543         errno.h                 \
8544         fcntl.h                 \
8545         filio.h                 \
8546         getopt.h                \
8547         grp.h                   \
8548         io.h                    \
8549         libutil.h               \
8550         limits.h                \
8551         locale.h                \
8552         netinet/tcp.h   \
8553         malloc.h                \
8554         memory.h                \
8555         psap.h                  \
8556         pwd.h                   \
8557         process.h               \
8558         resolv.h                \
8559         sgtty.h                 \
8560         shadow.h                \
8561         stddef.h                \
8562         string.h                \
8563         strings.h               \
8564         sysexits.h              \
8565         sys/file.h              \
8566         sys/filio.h             \
8567         sys/errno.h             \
8568         sys/ioctl.h             \
8569         sys/param.h             \
8570         sys/resource.h  \
8571         sys/select.h    \
8572         sys/socket.h    \
8573         sys/stat.h              \
8574         sys/syslog.h    \
8575         sys/time.h              \
8576         sys/types.h             \
8577         sys/ucred.h             \
8578         sys/uio.h               \
8579         syslog.h                \
8580         termios.h               \
8581         unistd.h                \
8582         winsock.h               \
8583         winsock2.h              \
8584
8585 do
8586 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8587 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8588 echo "configure:8589: checking for $ac_hdr" >&5
8589 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8590   echo $ac_n "(cached) $ac_c" 1>&6
8591 else
8592   cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8595 #include <$ac_hdr>
8596 EOF
8597 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8598 { (eval echo configure:8599: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8599 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8600 if test -z "$ac_err"; then
8601   rm -rf conftest*
8602   eval "ac_cv_header_$ac_safe=yes"
8603 else
8604   echo "$ac_err" >&5
8605   echo "configure: failed program was:" >&5
8606   cat conftest.$ac_ext >&5
8607   rm -rf conftest*
8608   eval "ac_cv_header_$ac_safe=no"
8609 fi
8610 rm -f conftest*
8611 fi
8612 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8613   echo "$ac_t""yes" 1>&6
8614     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8615   cat >> confdefs.h <<EOF
8616 #define $ac_tr_hdr 1
8617 EOF
8618  
8619 else
8620   echo "$ac_t""no" 1>&6
8621 fi
8622 done
8623
8624
8625
8626
8627 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8628 echo "configure:8629: checking for sigset in -lV3" >&5
8629 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8630 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8631   echo $ac_n "(cached) $ac_c" 1>&6
8632 else
8633   ac_save_LIBS="$LIBS"
8634 LIBS="-lV3  $LIBS"
8635 cat > conftest.$ac_ext <<EOF
8636 #line 8637 "configure"
8637 #include "confdefs.h"
8638 /* Override any gcc2 internal prototype to avoid an error.  */
8639 /* We use char because int might match the return type of a gcc2
8640     builtin and then its argument prototype would still apply.  */
8641 char sigset();
8642
8643 int main() {
8644 sigset()
8645 ; return 0; }
8646 EOF
8647 if { (eval echo configure:8648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8648   rm -rf conftest*
8649   eval "ac_cv_lib_$ac_lib_var=yes"
8650 else
8651   echo "configure: failed program was:" >&5
8652   cat conftest.$ac_ext >&5
8653   rm -rf conftest*
8654   eval "ac_cv_lib_$ac_lib_var=no"
8655 fi
8656 rm -f conftest*
8657 LIBS="$ac_save_LIBS"
8658
8659 fi
8660 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8661   echo "$ac_t""yes" 1>&6
8662     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8663     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8664   cat >> confdefs.h <<EOF
8665 #define $ac_tr_lib 1
8666 EOF
8667
8668   LIBS="-lV3 $LIBS"
8669
8670 else
8671   echo "$ac_t""no" 1>&6
8672 fi
8673
8674
8675 if test "$ac_cv_header_winsock_h" = yes; then
8676 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8677 echo "configure:8678: checking for winsock" >&5
8678 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8679   echo $ac_n "(cached) $ac_c" 1>&6
8680 else
8681   save_LIBS="$LIBS"
8682 for curlib in ws2_32 wsock32; do
8683         LIBS="$LIBS -l$curlib"
8684         cat > conftest.$ac_ext <<EOF
8685 #line 8686 "configure"
8686 #include "confdefs.h"
8687 #include <winsock.h>
8688                         
8689 int main() {
8690
8691                         socket(0,0,0);
8692                         select(0,NULL,NULL,NULL,NULL);
8693                         closesocket(0);
8694                         gethostname(NULL,0);
8695                         
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   ol_cv_winsock=yes
8701 else
8702   echo "configure: failed program was:" >&5
8703   cat conftest.$ac_ext >&5
8704   rm -rf conftest*
8705   ol_cv_winsock=no
8706 fi
8707 rm -f conftest*
8708
8709         if test $ol_cv_winsock = yes; then
8710                 cat >> confdefs.h <<\EOF
8711 #define HAVE_WINSOCK 1
8712 EOF
8713
8714                 ac_cv_func_socket=yes
8715                 ac_cv_func_select=yes
8716                 ac_cv_func_closesocket=yes
8717                 ac_cv_func_gethostname=yes
8718                 if test $curlib = ws2_32; then
8719                         ol_cv_winsock=winsock2
8720                         cat >> confdefs.h <<\EOF
8721 #define HAVE_WINSOCK2 1
8722 EOF
8723
8724                 fi
8725                 break
8726         fi
8727         LIBS="$save_LIBS"
8728 done
8729 fi
8730
8731 echo "$ac_t""$ol_cv_winsock" 1>&6
8732 fi
8733
8734
8735 echo $ac_n "checking for socket""... $ac_c" 1>&6
8736 echo "configure:8737: checking for socket" >&5
8737 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
8738   echo $ac_n "(cached) $ac_c" 1>&6
8739 else
8740   cat > conftest.$ac_ext <<EOF
8741 #line 8742 "configure"
8742 #include "confdefs.h"
8743 /* System header to define __stub macros and hopefully few prototypes,
8744     which can conflict with char socket(); below.  */
8745 #include <assert.h>
8746 /* Override any gcc2 internal prototype to avoid an error.  */
8747 /* We use char because int might match the return type of a gcc2
8748     builtin and then its argument prototype would still apply.  */
8749 char socket();
8750 char (*f)();
8751
8752 int main() {
8753
8754 /* The GNU C library defines this for functions which it implements
8755     to always fail with ENOSYS.  Some functions are actually named
8756     something starting with __ and the normal name is an alias.  */
8757 #if defined (__stub_socket) || defined (__stub___socket)
8758 choke me
8759 #else
8760 f = socket;
8761 #endif
8762
8763 ; return 0; }
8764 EOF
8765 if { (eval echo configure:8766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8766   rm -rf conftest*
8767   eval "ac_cv_func_socket=yes"
8768 else
8769   echo "configure: failed program was:" >&5
8770   cat conftest.$ac_ext >&5
8771   rm -rf conftest*
8772   eval "ac_cv_func_socket=no"
8773 fi
8774 rm -f conftest*
8775 fi
8776
8777 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8778   echo "$ac_t""yes" 1>&6
8779   :
8780 else
8781   echo "$ac_t""no" 1>&6
8782         
8783         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
8784 echo "configure:8785: checking for main in -lsocket" >&5
8785 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
8786 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8787   echo $ac_n "(cached) $ac_c" 1>&6
8788 else
8789   ac_save_LIBS="$LIBS"
8790 LIBS="-lsocket  $LIBS"
8791 cat > conftest.$ac_ext <<EOF
8792 #line 8793 "configure"
8793 #include "confdefs.h"
8794
8795 int main() {
8796 main()
8797 ; return 0; }
8798 EOF
8799 if { (eval echo configure:8800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8800   rm -rf conftest*
8801   eval "ac_cv_lib_$ac_lib_var=yes"
8802 else
8803   echo "configure: failed program was:" >&5
8804   cat conftest.$ac_ext >&5
8805   rm -rf conftest*
8806   eval "ac_cv_lib_$ac_lib_var=no"
8807 fi
8808 rm -f conftest*
8809 LIBS="$ac_save_LIBS"
8810
8811 fi
8812 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8813   echo "$ac_t""yes" 1>&6
8814     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8815     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8816   cat >> confdefs.h <<EOF
8817 #define $ac_tr_lib 1
8818 EOF
8819
8820   LIBS="-lsocket $LIBS"
8821
8822 else
8823   echo "$ac_t""no" 1>&6
8824 fi
8825
8826         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
8827 echo "configure:8828: checking for main in -lnet" >&5
8828 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
8829 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8830   echo $ac_n "(cached) $ac_c" 1>&6
8831 else
8832   ac_save_LIBS="$LIBS"
8833 LIBS="-lnet  $LIBS"
8834 cat > conftest.$ac_ext <<EOF
8835 #line 8836 "configure"
8836 #include "confdefs.h"
8837
8838 int main() {
8839 main()
8840 ; return 0; }
8841 EOF
8842 if { (eval echo configure:8843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8843   rm -rf conftest*
8844   eval "ac_cv_lib_$ac_lib_var=yes"
8845 else
8846   echo "configure: failed program was:" >&5
8847   cat conftest.$ac_ext >&5
8848   rm -rf conftest*
8849   eval "ac_cv_lib_$ac_lib_var=no"
8850 fi
8851 rm -f conftest*
8852 LIBS="$ac_save_LIBS"
8853
8854 fi
8855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8856   echo "$ac_t""yes" 1>&6
8857     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8858     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8859   cat >> confdefs.h <<EOF
8860 #define $ac_tr_lib 1
8861 EOF
8862
8863   LIBS="-lnet $LIBS"
8864
8865 else
8866   echo "$ac_t""no" 1>&6
8867 fi
8868
8869         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
8870 echo "configure:8871: checking for main in -lnsl_s" >&5
8871 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
8872 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8873   echo $ac_n "(cached) $ac_c" 1>&6
8874 else
8875   ac_save_LIBS="$LIBS"
8876 LIBS="-lnsl_s  $LIBS"
8877 cat > conftest.$ac_ext <<EOF
8878 #line 8879 "configure"
8879 #include "confdefs.h"
8880
8881 int main() {
8882 main()
8883 ; return 0; }
8884 EOF
8885 if { (eval echo configure:8886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8886   rm -rf conftest*
8887   eval "ac_cv_lib_$ac_lib_var=yes"
8888 else
8889   echo "configure: failed program was:" >&5
8890   cat conftest.$ac_ext >&5
8891   rm -rf conftest*
8892   eval "ac_cv_lib_$ac_lib_var=no"
8893 fi
8894 rm -f conftest*
8895 LIBS="$ac_save_LIBS"
8896
8897 fi
8898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8899   echo "$ac_t""yes" 1>&6
8900     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8901     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8902   cat >> confdefs.h <<EOF
8903 #define $ac_tr_lib 1
8904 EOF
8905
8906   LIBS="-lnsl_s $LIBS"
8907
8908 else
8909   echo "$ac_t""no" 1>&6
8910 fi
8911
8912         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
8913 echo "configure:8914: checking for main in -lnsl" >&5
8914 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
8915 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8916   echo $ac_n "(cached) $ac_c" 1>&6
8917 else
8918   ac_save_LIBS="$LIBS"
8919 LIBS="-lnsl  $LIBS"
8920 cat > conftest.$ac_ext <<EOF
8921 #line 8922 "configure"
8922 #include "confdefs.h"
8923
8924 int main() {
8925 main()
8926 ; return 0; }
8927 EOF
8928 if { (eval echo configure:8929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8929   rm -rf conftest*
8930   eval "ac_cv_lib_$ac_lib_var=yes"
8931 else
8932   echo "configure: failed program was:" >&5
8933   cat conftest.$ac_ext >&5
8934   rm -rf conftest*
8935   eval "ac_cv_lib_$ac_lib_var=no"
8936 fi
8937 rm -f conftest*
8938 LIBS="$ac_save_LIBS"
8939
8940 fi
8941 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8942   echo "$ac_t""yes" 1>&6
8943     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8944     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8945   cat >> confdefs.h <<EOF
8946 #define $ac_tr_lib 1
8947 EOF
8948
8949   LIBS="-lnsl $LIBS"
8950
8951 else
8952   echo "$ac_t""no" 1>&6
8953 fi
8954
8955         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
8956 echo "configure:8957: checking for socket in -linet" >&5
8957 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
8958 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8959   echo $ac_n "(cached) $ac_c" 1>&6
8960 else
8961   ac_save_LIBS="$LIBS"
8962 LIBS="-linet  $LIBS"
8963 cat > conftest.$ac_ext <<EOF
8964 #line 8965 "configure"
8965 #include "confdefs.h"
8966 /* Override any gcc2 internal prototype to avoid an error.  */
8967 /* We use char because int might match the return type of a gcc2
8968     builtin and then its argument prototype would still apply.  */
8969 char socket();
8970
8971 int main() {
8972 socket()
8973 ; return 0; }
8974 EOF
8975 if { (eval echo configure:8976: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8976   rm -rf conftest*
8977   eval "ac_cv_lib_$ac_lib_var=yes"
8978 else
8979   echo "configure: failed program was:" >&5
8980   cat conftest.$ac_ext >&5
8981   rm -rf conftest*
8982   eval "ac_cv_lib_$ac_lib_var=no"
8983 fi
8984 rm -f conftest*
8985 LIBS="$ac_save_LIBS"
8986
8987 fi
8988 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8989   echo "$ac_t""yes" 1>&6
8990     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8991     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8992   cat >> confdefs.h <<EOF
8993 #define $ac_tr_lib 1
8994 EOF
8995
8996   LIBS="-linet $LIBS"
8997
8998 else
8999   echo "$ac_t""no" 1>&6
9000 fi
9001
9002         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9003 echo "configure:9004: checking for main in -lgen" >&5
9004 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9005 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9006   echo $ac_n "(cached) $ac_c" 1>&6
9007 else
9008   ac_save_LIBS="$LIBS"
9009 LIBS="-lgen  $LIBS"
9010 cat > conftest.$ac_ext <<EOF
9011 #line 9012 "configure"
9012 #include "confdefs.h"
9013
9014 int main() {
9015 main()
9016 ; return 0; }
9017 EOF
9018 if { (eval echo configure:9019: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9019   rm -rf conftest*
9020   eval "ac_cv_lib_$ac_lib_var=yes"
9021 else
9022   echo "configure: failed program was:" >&5
9023   cat conftest.$ac_ext >&5
9024   rm -rf conftest*
9025   eval "ac_cv_lib_$ac_lib_var=no"
9026 fi
9027 rm -f conftest*
9028 LIBS="$ac_save_LIBS"
9029
9030 fi
9031 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9032   echo "$ac_t""yes" 1>&6
9033     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9034     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9035   cat >> confdefs.h <<EOF
9036 #define $ac_tr_lib 1
9037 EOF
9038
9039   LIBS="-lgen $LIBS"
9040
9041 else
9042   echo "$ac_t""no" 1>&6
9043 fi
9044
9045
9046 fi
9047
9048
9049 echo $ac_n "checking for select""... $ac_c" 1>&6
9050 echo "configure:9051: checking for select" >&5
9051 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9052   echo $ac_n "(cached) $ac_c" 1>&6
9053 else
9054   cat > conftest.$ac_ext <<EOF
9055 #line 9056 "configure"
9056 #include "confdefs.h"
9057 /* System header to define __stub macros and hopefully few prototypes,
9058     which can conflict with char select(); below.  */
9059 #include <assert.h>
9060 /* Override any gcc2 internal prototype to avoid an error.  */
9061 /* We use char because int might match the return type of a gcc2
9062     builtin and then its argument prototype would still apply.  */
9063 char select();
9064 char (*f)();
9065
9066 int main() {
9067
9068 /* The GNU C library defines this for functions which it implements
9069     to always fail with ENOSYS.  Some functions are actually named
9070     something starting with __ and the normal name is an alias.  */
9071 #if defined (__stub_select) || defined (__stub___select)
9072 choke me
9073 #else
9074 f = select;
9075 #endif
9076
9077 ; return 0; }
9078 EOF
9079 if { (eval echo configure:9080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9080   rm -rf conftest*
9081   eval "ac_cv_func_select=yes"
9082 else
9083   echo "configure: failed program was:" >&5
9084   cat conftest.$ac_ext >&5
9085   rm -rf conftest*
9086   eval "ac_cv_func_select=no"
9087 fi
9088 rm -f conftest*
9089 fi
9090
9091 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9092   echo "$ac_t""yes" 1>&6
9093   :
9094 else
9095   echo "$ac_t""no" 1>&6
9096 { echo "configure: error: select() required." 1>&2; exit 1; }
9097 fi
9098
9099
9100 if test "${ac_cv_header_winsock_h}" != yes; then
9101                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9102 echo "configure:9103: checking types of arguments for select()" >&5
9103  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9104   echo $ac_n "(cached) $ac_c" 1>&6
9105 else
9106    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9107   echo $ac_n "(cached) $ac_c" 1>&6
9108 else
9109     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9110   echo $ac_n "(cached) $ac_c" 1>&6
9111 else
9112      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9113      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9114       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9115        cat > conftest.$ac_ext <<EOF
9116 #line 9117 "configure"
9117 #include "confdefs.h"
9118 #ifdef HAVE_SYS_TYPES_H
9119 #include <sys/types.h>
9120 #endif
9121 #ifdef HAVE_SYS_TIME_H
9122 #include <sys/time.h>
9123 #endif
9124 #ifdef HAVE_SYS_SELECT_H
9125 #include <sys/select.h>
9126 #endif
9127 #ifdef HAVE_SYS_SOCKET_H
9128 #include <sys/socket.h>
9129 #endif
9130 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);
9131 int main() {
9132
9133 ; return 0; }
9134 EOF
9135 if { (eval echo configure:9136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9136   rm -rf conftest*
9137           ac_not_found=no ; break 3
9138 else
9139   echo "configure: failed program was:" >&5
9140   cat conftest.$ac_ext >&5
9141   rm -rf conftest*
9142   ac_not_found=yes
9143 fi
9144 rm -f conftest*
9145       done
9146      done
9147     done
9148    
9149 fi
9150   
9151 fi
9152  
9153 fi
9154  if test "$ac_not_found" = yes; then
9155   ac_cv_func_select_arg1=int 
9156   ac_cv_func_select_arg234='int *' 
9157   ac_cv_func_select_arg5='struct timeval *'
9158  fi
9159  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9160  cat >> confdefs.h <<EOF
9161 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9162 EOF
9163
9164  cat >> confdefs.h <<EOF
9165 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9166 EOF
9167
9168  cat >> confdefs.h <<EOF
9169 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9170 EOF
9171
9172
9173 fi
9174
9175
9176 for ac_hdr in regex.h 
9177 do
9178 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9179 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9180 echo "configure:9181: checking for $ac_hdr" >&5
9181 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9182   echo $ac_n "(cached) $ac_c" 1>&6
9183 else
9184   cat > conftest.$ac_ext <<EOF
9185 #line 9186 "configure"
9186 #include "confdefs.h"
9187 #include <$ac_hdr>
9188 EOF
9189 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9190 { (eval echo configure:9191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9191 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9192 if test -z "$ac_err"; then
9193   rm -rf conftest*
9194   eval "ac_cv_header_$ac_safe=yes"
9195 else
9196   echo "$ac_err" >&5
9197   echo "configure: failed program was:" >&5
9198   cat conftest.$ac_ext >&5
9199   rm -rf conftest*
9200   eval "ac_cv_header_$ac_safe=no"
9201 fi
9202 rm -f conftest*
9203 fi
9204 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9205   echo "$ac_t""yes" 1>&6
9206     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9207   cat >> confdefs.h <<EOF
9208 #define $ac_tr_hdr 1
9209 EOF
9210  
9211 else
9212   echo "$ac_t""no" 1>&6
9213 fi
9214 done
9215
9216 if test "$ac_cv_header_regex_h" != yes ; then
9217         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9218 fi
9219
9220 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9221 echo "configure:9222: checking for library containing regfree" >&5
9222 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9223   echo $ac_n "(cached) $ac_c" 1>&6
9224 else
9225   ac_func_search_save_LIBS="$LIBS"
9226 ac_cv_search_regfree="no"
9227 cat > conftest.$ac_ext <<EOF
9228 #line 9229 "configure"
9229 #include "confdefs.h"
9230 /* Override any gcc2 internal prototype to avoid an error.  */
9231 /* We use char because int might match the return type of a gcc2
9232     builtin and then its argument prototype would still apply.  */
9233 char regfree();
9234
9235 int main() {
9236 regfree()
9237 ; return 0; }
9238 EOF
9239 if { (eval echo configure:9240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9240   rm -rf conftest*
9241   ac_cv_search_regfree="none required"
9242 else
9243   echo "configure: failed program was:" >&5
9244   cat conftest.$ac_ext >&5
9245 fi
9246 rm -f conftest*
9247 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9248 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9249 cat > conftest.$ac_ext <<EOF
9250 #line 9251 "configure"
9251 #include "confdefs.h"
9252 /* Override any gcc2 internal prototype to avoid an error.  */
9253 /* We use char because int might match the return type of a gcc2
9254     builtin and then its argument prototype would still apply.  */
9255 char regfree();
9256
9257 int main() {
9258 regfree()
9259 ; return 0; }
9260 EOF
9261 if { (eval echo configure:9262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9262   rm -rf conftest*
9263   ac_cv_search_regfree="-l$ac_lib"
9264 break
9265 else
9266   echo "configure: failed program was:" >&5
9267   cat conftest.$ac_ext >&5
9268 fi
9269 rm -f conftest*
9270 done
9271 LIBS="$ac_func_search_save_LIBS"
9272 fi
9273
9274 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9275 if test "$ac_cv_search_regfree" != "no"; then
9276   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9277   :
9278 else :
9279   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9280 fi
9281
9282
9283 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9284 echo "configure:9285: checking for compatible POSIX regex" >&5
9285 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9286   echo $ac_n "(cached) $ac_c" 1>&6
9287 else
9288   
9289         if test "$cross_compiling" = yes; then
9290   ol_cv_c_posix_regex=cross
9291 else
9292   cat > conftest.$ac_ext <<EOF
9293 #line 9294 "configure"
9294 #include "confdefs.h"
9295
9296 #include <sys/types.h>
9297 #include <regex.h>
9298 static char *pattern, *string;
9299 main()
9300 {
9301         int rc;
9302         regex_t re;
9303
9304         pattern = "^A";
9305
9306         if(regcomp(&re, pattern, 0)) {
9307                 return -1;
9308         }
9309         
9310         string = "ALL MATCH";
9311         
9312         rc = regexec(&re, string, 0, (void*)0, 0);
9313
9314         regfree(&re);
9315
9316         return rc;
9317 }
9318 EOF
9319 if { (eval echo configure:9320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9320 then
9321   ol_cv_c_posix_regex=yes
9322 else
9323   echo "configure: failed program was:" >&5
9324   cat conftest.$ac_ext >&5
9325   rm -fr conftest*
9326   ol_cv_c_posix_regex=no
9327 fi
9328 rm -fr conftest*
9329 fi
9330
9331 fi
9332
9333 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9334
9335 if test "$ol_cv_c_posix_regex" = no ; then
9336         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9337 fi
9338
9339
9340 have_uuid=no
9341 for ac_hdr in sys/uuid.h
9342 do
9343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9345 echo "configure:9346: checking for $ac_hdr" >&5
9346 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9347   echo $ac_n "(cached) $ac_c" 1>&6
9348 else
9349   cat > conftest.$ac_ext <<EOF
9350 #line 9351 "configure"
9351 #include "confdefs.h"
9352 #include <$ac_hdr>
9353 EOF
9354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9355 { (eval echo configure:9356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9357 if test -z "$ac_err"; then
9358   rm -rf conftest*
9359   eval "ac_cv_header_$ac_safe=yes"
9360 else
9361   echo "$ac_err" >&5
9362   echo "configure: failed program was:" >&5
9363   cat conftest.$ac_ext >&5
9364   rm -rf conftest*
9365   eval "ac_cv_header_$ac_safe=no"
9366 fi
9367 rm -f conftest*
9368 fi
9369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9370   echo "$ac_t""yes" 1>&6
9371     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9372   cat >> confdefs.h <<EOF
9373 #define $ac_tr_hdr 1
9374 EOF
9375  
9376 else
9377   echo "$ac_t""no" 1>&6
9378 fi
9379 done
9380
9381 if test $ac_cv_header_sys_uuid_h = yes ; then
9382         save_LIBS="$LIBS"
9383         
9384 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9385 echo "configure:9386: checking for library containing uuid_to_str" >&5
9386 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9387   echo $ac_n "(cached) $ac_c" 1>&6
9388 else
9389   ac_func_search_save_LIBS="$LIBS"
9390 ac_cv_search_uuid_to_str="no"
9391 cat > conftest.$ac_ext <<EOF
9392 #line 9393 "configure"
9393 #include "confdefs.h"
9394 /* Override any gcc2 internal prototype to avoid an error.  */
9395 /* We use char because int might match the return type of a gcc2
9396     builtin and then its argument prototype would still apply.  */
9397 char uuid_to_str();
9398
9399 int main() {
9400 uuid_to_str()
9401 ; return 0; }
9402 EOF
9403 if { (eval echo configure:9404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9404   rm -rf conftest*
9405   ac_cv_search_uuid_to_str="none required"
9406 else
9407   echo "configure: failed program was:" >&5
9408   cat conftest.$ac_ext >&5
9409 fi
9410 rm -f conftest*
9411 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9412 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9413 cat > conftest.$ac_ext <<EOF
9414 #line 9415 "configure"
9415 #include "confdefs.h"
9416 /* Override any gcc2 internal prototype to avoid an error.  */
9417 /* We use char because int might match the return type of a gcc2
9418     builtin and then its argument prototype would still apply.  */
9419 char uuid_to_str();
9420
9421 int main() {
9422 uuid_to_str()
9423 ; return 0; }
9424 EOF
9425 if { (eval echo configure:9426: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9426   rm -rf conftest*
9427   ac_cv_search_uuid_to_str="-l$ac_lib"
9428 break
9429 else
9430   echo "configure: failed program was:" >&5
9431   cat conftest.$ac_ext >&5
9432 fi
9433 rm -f conftest*
9434 done
9435 LIBS="$ac_func_search_save_LIBS"
9436 fi
9437
9438 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9439 if test "$ac_cv_search_uuid_to_str" != "no"; then
9440   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9441   have_uuid=yes
9442 else :
9443   :
9444 fi
9445         LIBS="$save_LIBS"
9446
9447         if test have_uuid = yes ; then
9448                 cat >> confdefs.h <<\EOF
9449 #define HAVE_UUID_TO_STR 1
9450 EOF
9451
9452
9453                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9454                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9455         fi
9456 fi
9457
9458 if test $have_uuid = no ; then
9459         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9460 echo "configure:9461: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9461         save_LIBS="$LIBS"
9462         LIBS="$LIBS -lrpcrt4"
9463         cat > conftest.$ac_ext <<EOF
9464 #line 9465 "configure"
9465 #include "confdefs.h"
9466
9467                 int __stdcall UuidCreate(void *);
9468                 int __stdcall UuidToStringA(void *,void **);
9469                 
9470 int main() {
9471
9472                 UuidCreate(0);
9473                 UuidToStringA(0,0);
9474                 
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   need_rpcrt=yes
9480 else
9481   echo "configure: failed program was:" >&5
9482   cat conftest.$ac_ext >&5
9483   rm -rf conftest*
9484   need_rpcrt=no
9485 fi
9486 rm -f conftest*
9487         if test $need_rpcrt = yes; then
9488                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9489         fi
9490         LIBS="$save_LIBS"
9491         echo "$ac_t""$need_rpcrt" 1>&6
9492 fi
9493
9494 ol_link_dnssrv=no
9495 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9496 echo "configure:9497: checking for res_query" >&5
9497 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9498   echo $ac_n "(cached) $ac_c" 1>&6
9499 else
9500   cat > conftest.$ac_ext <<EOF
9501 #line 9502 "configure"
9502 #include "confdefs.h"
9503 /* System header to define __stub macros and hopefully few prototypes,
9504     which can conflict with char res_query(); below.  */
9505 #include <assert.h>
9506 /* Override any gcc2 internal prototype to avoid an error.  */
9507 /* We use char because int might match the return type of a gcc2
9508     builtin and then its argument prototype would still apply.  */
9509 char res_query();
9510 char (*f)();
9511
9512 int main() {
9513
9514 /* The GNU C library defines this for functions which it implements
9515     to always fail with ENOSYS.  Some functions are actually named
9516     something starting with __ and the normal name is an alias.  */
9517 #if defined (__stub_res_query) || defined (__stub___res_query)
9518 choke me
9519 #else
9520 f = res_query;
9521 #endif
9522
9523 ; return 0; }
9524 EOF
9525 if { (eval echo configure:9526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9526   rm -rf conftest*
9527   eval "ac_cv_func_res_query=yes"
9528 else
9529   echo "configure: failed program was:" >&5
9530   cat conftest.$ac_ext >&5
9531   rm -rf conftest*
9532   eval "ac_cv_func_res_query=no"
9533 fi
9534 rm -f conftest*
9535 fi
9536
9537 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9538   echo "$ac_t""yes" 1>&6
9539   :
9540 else
9541   echo "$ac_t""no" 1>&6
9542 fi
9543
9544 if test $ac_cv_func_res_query = no ; then 
9545         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9546 echo "configure:9547: checking for __res_query" >&5
9547 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9548   echo $ac_n "(cached) $ac_c" 1>&6
9549 else
9550   cat > conftest.$ac_ext <<EOF
9551 #line 9552 "configure"
9552 #include "confdefs.h"
9553 /* System header to define __stub macros and hopefully few prototypes,
9554     which can conflict with char __res_query(); below.  */
9555 #include <assert.h>
9556 /* Override any gcc2 internal prototype to avoid an error.  */
9557 /* We use char because int might match the return type of a gcc2
9558     builtin and then its argument prototype would still apply.  */
9559 char __res_query();
9560 char (*f)();
9561
9562 int main() {
9563
9564 /* The GNU C library defines this for functions which it implements
9565     to always fail with ENOSYS.  Some functions are actually named
9566     something starting with __ and the normal name is an alias.  */
9567 #if defined (__stub___res_query) || defined (__stub_____res_query)
9568 choke me
9569 #else
9570 f = __res_query;
9571 #endif
9572
9573 ; return 0; }
9574 EOF
9575 if { (eval echo configure:9576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9576   rm -rf conftest*
9577   eval "ac_cv_func___res_query=yes"
9578 else
9579   echo "configure: failed program was:" >&5
9580   cat conftest.$ac_ext >&5
9581   rm -rf conftest*
9582   eval "ac_cv_func___res_query=no"
9583 fi
9584 rm -f conftest*
9585 fi
9586
9587 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9588   echo "$ac_t""yes" 1>&6
9589   :
9590 else
9591   echo "$ac_t""no" 1>&6
9592 fi
9593
9594         ac_cv_func_res_query=$ac_cv_func___res_query
9595 fi
9596
9597 if test $ac_cv_func_res_query = no ; then 
9598         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9599 echo "configure:9600: checking for res_query in -lbind" >&5
9600 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9601 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9602   echo $ac_n "(cached) $ac_c" 1>&6
9603 else
9604   ac_save_LIBS="$LIBS"
9605 LIBS="-lbind  $LIBS"
9606 cat > conftest.$ac_ext <<EOF
9607 #line 9608 "configure"
9608 #include "confdefs.h"
9609 /* Override any gcc2 internal prototype to avoid an error.  */
9610 /* We use char because int might match the return type of a gcc2
9611     builtin and then its argument prototype would still apply.  */
9612 char res_query();
9613
9614 int main() {
9615 res_query()
9616 ; return 0; }
9617 EOF
9618 if { (eval echo configure:9619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9619   rm -rf conftest*
9620   eval "ac_cv_lib_$ac_lib_var=yes"
9621 else
9622   echo "configure: failed program was:" >&5
9623   cat conftest.$ac_ext >&5
9624   rm -rf conftest*
9625   eval "ac_cv_lib_$ac_lib_var=no"
9626 fi
9627 rm -f conftest*
9628 LIBS="$ac_save_LIBS"
9629
9630 fi
9631 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9632   echo "$ac_t""yes" 1>&6
9633     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9634     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9635   cat >> confdefs.h <<EOF
9636 #define $ac_tr_lib 1
9637 EOF
9638
9639   LIBS="-lbind $LIBS"
9640
9641 else
9642   echo "$ac_t""no" 1>&6
9643 fi
9644
9645         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9646 fi
9647
9648 if test $ac_cv_func_res_query = no ; then 
9649         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9650 echo "configure:9651: checking for __res_query in -lbind" >&5
9651 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9652 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9653   echo $ac_n "(cached) $ac_c" 1>&6
9654 else
9655   ac_save_LIBS="$LIBS"
9656 LIBS="-lbind  $LIBS"
9657 cat > conftest.$ac_ext <<EOF
9658 #line 9659 "configure"
9659 #include "confdefs.h"
9660 /* Override any gcc2 internal prototype to avoid an error.  */
9661 /* We use char because int might match the return type of a gcc2
9662     builtin and then its argument prototype would still apply.  */
9663 char __res_query();
9664
9665 int main() {
9666 __res_query()
9667 ; return 0; }
9668 EOF
9669 if { (eval echo configure:9670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9670   rm -rf conftest*
9671   eval "ac_cv_lib_$ac_lib_var=yes"
9672 else
9673   echo "configure: failed program was:" >&5
9674   cat conftest.$ac_ext >&5
9675   rm -rf conftest*
9676   eval "ac_cv_lib_$ac_lib_var=no"
9677 fi
9678 rm -f conftest*
9679 LIBS="$ac_save_LIBS"
9680
9681 fi
9682 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9683   echo "$ac_t""yes" 1>&6
9684     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9685     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9686   cat >> confdefs.h <<EOF
9687 #define $ac_tr_lib 1
9688 EOF
9689
9690   LIBS="-lbind $LIBS"
9691
9692 else
9693   echo "$ac_t""no" 1>&6
9694 fi
9695
9696         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
9697 fi
9698
9699 if test $ac_cv_func_res_query = no ; then 
9700         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
9701 echo "configure:9702: checking for res_query in -lresolv" >&5
9702 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
9703 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9704   echo $ac_n "(cached) $ac_c" 1>&6
9705 else
9706   ac_save_LIBS="$LIBS"
9707 LIBS="-lresolv  $LIBS"
9708 cat > conftest.$ac_ext <<EOF
9709 #line 9710 "configure"
9710 #include "confdefs.h"
9711 /* Override any gcc2 internal prototype to avoid an error.  */
9712 /* We use char because int might match the return type of a gcc2
9713     builtin and then its argument prototype would still apply.  */
9714 char res_query();
9715
9716 int main() {
9717 res_query()
9718 ; return 0; }
9719 EOF
9720 if { (eval echo configure:9721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9721   rm -rf conftest*
9722   eval "ac_cv_lib_$ac_lib_var=yes"
9723 else
9724   echo "configure: failed program was:" >&5
9725   cat conftest.$ac_ext >&5
9726   rm -rf conftest*
9727   eval "ac_cv_lib_$ac_lib_var=no"
9728 fi
9729 rm -f conftest*
9730 LIBS="$ac_save_LIBS"
9731
9732 fi
9733 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9734   echo "$ac_t""yes" 1>&6
9735     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9736     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9737   cat >> confdefs.h <<EOF
9738 #define $ac_tr_lib 1
9739 EOF
9740
9741   LIBS="-lresolv $LIBS"
9742
9743 else
9744   echo "$ac_t""no" 1>&6
9745 fi
9746
9747         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
9748 fi
9749
9750 if test $ac_cv_func_res_query = no ; then 
9751         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
9752 echo "configure:9753: checking for __res_query in -lresolv" >&5
9753 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
9754 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9755   echo $ac_n "(cached) $ac_c" 1>&6
9756 else
9757   ac_save_LIBS="$LIBS"
9758 LIBS="-lresolv  $LIBS"
9759 cat > conftest.$ac_ext <<EOF
9760 #line 9761 "configure"
9761 #include "confdefs.h"
9762 /* Override any gcc2 internal prototype to avoid an error.  */
9763 /* We use char because int might match the return type of a gcc2
9764     builtin and then its argument prototype would still apply.  */
9765 char __res_query();
9766
9767 int main() {
9768 __res_query()
9769 ; return 0; }
9770 EOF
9771 if { (eval echo configure:9772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9772   rm -rf conftest*
9773   eval "ac_cv_lib_$ac_lib_var=yes"
9774 else
9775   echo "configure: failed program was:" >&5
9776   cat conftest.$ac_ext >&5
9777   rm -rf conftest*
9778   eval "ac_cv_lib_$ac_lib_var=no"
9779 fi
9780 rm -f conftest*
9781 LIBS="$ac_save_LIBS"
9782
9783 fi
9784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9785   echo "$ac_t""yes" 1>&6
9786     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9787     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9788   cat >> confdefs.h <<EOF
9789 #define $ac_tr_lib 1
9790 EOF
9791
9792   LIBS="-lresolv $LIBS"
9793
9794 else
9795   echo "$ac_t""no" 1>&6
9796 fi
9797
9798         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
9799 fi
9800
9801 if test "$ac_cv_func_res_query" = yes ; then
9802         cat >> confdefs.h <<\EOF
9803 #define HAVE_RES_QUERY 1
9804 EOF
9805
9806
9807         if test $ol_enable_dnssrv != no ; then
9808                 ol_link_dnssrv=yes
9809         fi
9810 fi
9811
9812 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
9813         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
9814 fi
9815
9816 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
9817 do
9818 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9819 echo "configure:9820: checking for $ac_func" >&5
9820 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9821   echo $ac_n "(cached) $ac_c" 1>&6
9822 else
9823   cat > conftest.$ac_ext <<EOF
9824 #line 9825 "configure"
9825 #include "confdefs.h"
9826 /* System header to define __stub macros and hopefully few prototypes,
9827     which can conflict with char $ac_func(); below.  */
9828 #include <assert.h>
9829 /* Override any gcc2 internal prototype to avoid an error.  */
9830 /* We use char because int might match the return type of a gcc2
9831     builtin and then its argument prototype would still apply.  */
9832 char $ac_func();
9833 char (*f)();
9834
9835 int main() {
9836
9837 /* The GNU C library defines this for functions which it implements
9838     to always fail with ENOSYS.  Some functions are actually named
9839     something starting with __ and the normal name is an alias.  */
9840 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9841 choke me
9842 #else
9843 f = $ac_func;
9844 #endif
9845
9846 ; return 0; }
9847 EOF
9848 if { (eval echo configure:9849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9849   rm -rf conftest*
9850   eval "ac_cv_func_$ac_func=yes"
9851 else
9852   echo "configure: failed program was:" >&5
9853   cat conftest.$ac_ext >&5
9854   rm -rf conftest*
9855   eval "ac_cv_func_$ac_func=no"
9856 fi
9857 rm -f conftest*
9858 fi
9859
9860 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9861   echo "$ac_t""yes" 1>&6
9862     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9863   cat >> confdefs.h <<EOF
9864 #define $ac_tr_func 1
9865 EOF
9866  
9867 else
9868   echo "$ac_t""no" 1>&6
9869 fi
9870 done
9871
9872
9873 ol_link_ipv6=no
9874 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
9875         if test $ol_enable_ipv6 = yes ; then
9876                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
9877         fi
9878 elif test $ol_enable_ipv6 != no ; then
9879         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
9880 echo "configure:9881: checking INET6_ADDRSTRLEN" >&5
9881 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
9882   echo $ac_n "(cached) $ac_c" 1>&6
9883 else
9884   
9885                 cat > conftest.$ac_ext <<EOF
9886 #line 9887 "configure"
9887 #include "confdefs.h"
9888
9889 #                       include <netinet/in.h>
9890 #                       ifdef INET6_ADDRSTRLEN
9891                                 __has_inet6_addrstrlen__;
9892 #                       endif
9893                 
9894 EOF
9895 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9896   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
9897   rm -rf conftest*
9898   ol_cv_inet6_addrstrlen=yes
9899 else
9900   rm -rf conftest*
9901   ol_cv_inet6_addrstrlen=no
9902 fi
9903 rm -f conftest*
9904
9905 fi
9906
9907 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
9908
9909
9910         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
9911 echo "configure:9912: checking struct sockaddr_storage" >&5
9912 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
9913   echo $ac_n "(cached) $ac_c" 1>&6
9914 else
9915   
9916                 cat > conftest.$ac_ext <<EOF
9917 #line 9918 "configure"
9918 #include "confdefs.h"
9919
9920 #include <sys/types.h>
9921 #include <sys/socket.h>
9922
9923 int main() {
9924
9925                         struct sockaddr_storage ss;
9926
9927 ; return 0; }
9928 EOF
9929 if { (eval echo configure:9930: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9930   rm -rf conftest*
9931   ol_cv_struct_sockaddr_storage=yes
9932 else
9933   echo "configure: failed program was:" >&5
9934   cat conftest.$ac_ext >&5
9935   rm -rf conftest*
9936   ol_cv_struct_sockaddr_storage=no
9937 fi
9938 rm -f conftest*
9939 fi
9940
9941 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
9942
9943         if test $ol_cv_inet6_addrstrlen = yes \
9944                 -a $ol_cv_struct_sockaddr_storage = yes ; then
9945                 ol_link_ipv6=yes
9946         elif test $ol_enable_ipv6 = yes \
9947                         -a $ol_cv_inet6_addrstrlen = no ; then
9948                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
9949         elif test $ol_enable_ipv6 = yes \
9950                         -a $ol_cv_struct_sockaddr_storage = no ; then
9951                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
9952         fi
9953 fi
9954
9955 if test $ol_enable_local != no ; then
9956         for ac_hdr in sys/un.h 
9957 do
9958 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9959 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9960 echo "configure:9961: checking for $ac_hdr" >&5
9961 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9962   echo $ac_n "(cached) $ac_c" 1>&6
9963 else
9964   cat > conftest.$ac_ext <<EOF
9965 #line 9966 "configure"
9966 #include "confdefs.h"
9967 #include <$ac_hdr>
9968 EOF
9969 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9970 { (eval echo configure:9971: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9971 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9972 if test -z "$ac_err"; then
9973   rm -rf conftest*
9974   eval "ac_cv_header_$ac_safe=yes"
9975 else
9976   echo "$ac_err" >&5
9977   echo "configure: failed program was:" >&5
9978   cat conftest.$ac_ext >&5
9979   rm -rf conftest*
9980   eval "ac_cv_header_$ac_safe=no"
9981 fi
9982 rm -f conftest*
9983 fi
9984 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9985   echo "$ac_t""yes" 1>&6
9986     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9987   cat >> confdefs.h <<EOF
9988 #define $ac_tr_hdr 1
9989 EOF
9990  
9991 else
9992   echo "$ac_t""no" 1>&6
9993 fi
9994 done
9995
9996
9997         if test $ol_enable_local = auto ; then
9998                 ol_enable_local=$ac_cv_header_sys_un_h
9999         elif test $ac_cv_header_sys_un_h = no ; then
10000                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10001         fi
10002 fi
10003
10004 ol_link_kbind=no
10005 ol_link_krb5=no
10006 ol_link_krb4=no
10007
10008 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10009         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10010         -o $ol_with_kerberos = k425 ; then
10011
10012         for ac_hdr in krb5.h
10013 do
10014 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10015 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10016 echo "configure:10017: checking for $ac_hdr" >&5
10017 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10018   echo $ac_n "(cached) $ac_c" 1>&6
10019 else
10020   cat > conftest.$ac_ext <<EOF
10021 #line 10022 "configure"
10022 #include "confdefs.h"
10023 #include <$ac_hdr>
10024 EOF
10025 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10026 { (eval echo configure:10027: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10027 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10028 if test -z "$ac_err"; then
10029   rm -rf conftest*
10030   eval "ac_cv_header_$ac_safe=yes"
10031 else
10032   echo "$ac_err" >&5
10033   echo "configure: failed program was:" >&5
10034   cat conftest.$ac_ext >&5
10035   rm -rf conftest*
10036   eval "ac_cv_header_$ac_safe=no"
10037 fi
10038 rm -f conftest*
10039 fi
10040 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10041   echo "$ac_t""yes" 1>&6
10042     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10043   cat >> confdefs.h <<EOF
10044 #define $ac_tr_hdr 1
10045 EOF
10046  
10047 else
10048   echo "$ac_t""no" 1>&6
10049 fi
10050 done
10051
10052
10053         if test $ac_cv_header_krb5_h = yes ; then
10054                                 for ac_hdr in heim_err.h
10055 do
10056 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10057 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10058 echo "configure:10059: checking for $ac_hdr" >&5
10059 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10060   echo $ac_n "(cached) $ac_c" 1>&6
10061 else
10062   cat > conftest.$ac_ext <<EOF
10063 #line 10064 "configure"
10064 #include "confdefs.h"
10065 #include <$ac_hdr>
10066 EOF
10067 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10068 { (eval echo configure:10069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10069 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10070 if test -z "$ac_err"; then
10071   rm -rf conftest*
10072   eval "ac_cv_header_$ac_safe=yes"
10073 else
10074   echo "$ac_err" >&5
10075   echo "configure: failed program was:" >&5
10076   cat conftest.$ac_ext >&5
10077   rm -rf conftest*
10078   eval "ac_cv_header_$ac_safe=no"
10079 fi
10080 rm -f conftest*
10081 fi
10082 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10083   echo "$ac_t""yes" 1>&6
10084     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10085   cat >> confdefs.h <<EOF
10086 #define $ac_tr_hdr 1
10087 EOF
10088  
10089 else
10090   echo "$ac_t""no" 1>&6
10091 fi
10092 done
10093
10094                 if test $ac_cv_header_heim_err_h = yes ; then
10095                         krb5_impl=heimdal
10096                 else
10097                         krb5_impl=mit
10098                 fi
10099
10100                 if test $krb5_impl = mit; then
10101                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10102 echo "configure:10103: checking for main in -lk5crypto" >&5
10103 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10104 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10105   echo $ac_n "(cached) $ac_c" 1>&6
10106 else
10107   ac_save_LIBS="$LIBS"
10108 LIBS="-lk5crypto  $LIBS"
10109 cat > conftest.$ac_ext <<EOF
10110 #line 10111 "configure"
10111 #include "confdefs.h"
10112
10113 int main() {
10114 main()
10115 ; return 0; }
10116 EOF
10117 if { (eval echo configure:10118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10118   rm -rf conftest*
10119   eval "ac_cv_lib_$ac_lib_var=yes"
10120 else
10121   echo "configure: failed program was:" >&5
10122   cat conftest.$ac_ext >&5
10123   rm -rf conftest*
10124   eval "ac_cv_lib_$ac_lib_var=no"
10125 fi
10126 rm -f conftest*
10127 LIBS="$ac_save_LIBS"
10128
10129 fi
10130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10131   echo "$ac_t""yes" 1>&6
10132   krb5crypto=k5crypto
10133 else
10134   echo "$ac_t""no" 1>&6
10135 krb5crypto=crypto
10136 fi
10137
10138
10139                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10140 echo "configure:10141: checking for main in -lkrb5" >&5
10141 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10142 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10143   echo $ac_n "(cached) $ac_c" 1>&6
10144 else
10145   ac_save_LIBS="$LIBS"
10146 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10147 cat > conftest.$ac_ext <<EOF
10148 #line 10149 "configure"
10149 #include "confdefs.h"
10150
10151 int main() {
10152 main()
10153 ; return 0; }
10154 EOF
10155 if { (eval echo configure:10156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10156   rm -rf conftest*
10157   eval "ac_cv_lib_$ac_lib_var=yes"
10158 else
10159   echo "configure: failed program was:" >&5
10160   cat conftest.$ac_ext >&5
10161   rm -rf conftest*
10162   eval "ac_cv_lib_$ac_lib_var=no"
10163 fi
10164 rm -f conftest*
10165 LIBS="$ac_save_LIBS"
10166
10167 fi
10168 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10169   echo "$ac_t""yes" 1>&6
10170   have_krb5=yes
10171                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10172 else
10173   echo "$ac_t""no" 1>&6
10174 have_krb5=no
10175 fi
10176
10177
10178                 elif test $krb5_impl = heimdal; then
10179                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10180 echo "configure:10181: checking for main in -ldes" >&5
10181 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10182 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10183   echo $ac_n "(cached) $ac_c" 1>&6
10184 else
10185   ac_save_LIBS="$LIBS"
10186 LIBS="-ldes  $LIBS"
10187 cat > conftest.$ac_ext <<EOF
10188 #line 10189 "configure"
10189 #include "confdefs.h"
10190
10191 int main() {
10192 main()
10193 ; return 0; }
10194 EOF
10195 if { (eval echo configure:10196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10196   rm -rf conftest*
10197   eval "ac_cv_lib_$ac_lib_var=yes"
10198 else
10199   echo "configure: failed program was:" >&5
10200   cat conftest.$ac_ext >&5
10201   rm -rf conftest*
10202   eval "ac_cv_lib_$ac_lib_var=no"
10203 fi
10204 rm -f conftest*
10205 LIBS="$ac_save_LIBS"
10206
10207 fi
10208 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10209   echo "$ac_t""yes" 1>&6
10210   krb5crypto=des
10211 else
10212   echo "$ac_t""no" 1>&6
10213 krb5crypto=crypto
10214 fi
10215
10216
10217                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10218 echo "configure:10219: checking for main in -lkrb5" >&5
10219 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10220 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10221   echo $ac_n "(cached) $ac_c" 1>&6
10222 else
10223   ac_save_LIBS="$LIBS"
10224 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10225 cat > conftest.$ac_ext <<EOF
10226 #line 10227 "configure"
10227 #include "confdefs.h"
10228
10229 int main() {
10230 main()
10231 ; return 0; }
10232 EOF
10233 if { (eval echo configure:10234: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10234   rm -rf conftest*
10235   eval "ac_cv_lib_$ac_lib_var=yes"
10236 else
10237   echo "configure: failed program was:" >&5
10238   cat conftest.$ac_ext >&5
10239   rm -rf conftest*
10240   eval "ac_cv_lib_$ac_lib_var=no"
10241 fi
10242 rm -f conftest*
10243 LIBS="$ac_save_LIBS"
10244
10245 fi
10246 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10247   echo "$ac_t""yes" 1>&6
10248   have_krb5=yes
10249                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10250 else
10251   echo "$ac_t""no" 1>&6
10252 have_krb5=no
10253 fi
10254
10255
10256                         cat >> confdefs.h <<\EOF
10257 #define HAVE_HEIMDAL_KERBEROS 1
10258 EOF
10259
10260
10261                 else
10262                         have_krb5=no
10263                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10264                 fi
10265
10266                 if test $have_krb5 = yes ; then
10267                         ol_link_krb5=yes
10268
10269                         cat >> confdefs.h <<\EOF
10270 #define HAVE_KRB5 1
10271 EOF
10272
10273
10274                         if test $ol_with_kerberos = k5only ; then
10275                                 ol_with_kerberos=found
10276                         fi
10277
10278                 elif test $ol_with_kerberos != auto ; then
10279                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10280                 fi
10281
10282         fi
10283 fi
10284
10285 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10286         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10287
10288         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10289 do
10290 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10291 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10292 echo "configure:10293: checking for $ac_hdr" >&5
10293 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10294   echo $ac_n "(cached) $ac_c" 1>&6
10295 else
10296   cat > conftest.$ac_ext <<EOF
10297 #line 10298 "configure"
10298 #include "confdefs.h"
10299 #include <$ac_hdr>
10300 EOF
10301 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10302 { (eval echo configure:10303: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10303 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10304 if test -z "$ac_err"; then
10305   rm -rf conftest*
10306   eval "ac_cv_header_$ac_safe=yes"
10307 else
10308   echo "$ac_err" >&5
10309   echo "configure: failed program was:" >&5
10310   cat conftest.$ac_ext >&5
10311   rm -rf conftest*
10312   eval "ac_cv_header_$ac_safe=no"
10313 fi
10314 rm -f conftest*
10315 fi
10316 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10317   echo "$ac_t""yes" 1>&6
10318     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10319   cat >> confdefs.h <<EOF
10320 #define $ac_tr_hdr 1
10321 EOF
10322  
10323 else
10324   echo "$ac_t""no" 1>&6
10325 fi
10326 done
10327
10328
10329         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10330                 if test $krb5_impl = mit; then
10331                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10332 echo "configure:10333: checking for main in -lkrb4" >&5
10333 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10334 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10335   echo $ac_n "(cached) $ac_c" 1>&6
10336 else
10337   ac_save_LIBS="$LIBS"
10338 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10339 cat > conftest.$ac_ext <<EOF
10340 #line 10341 "configure"
10341 #include "confdefs.h"
10342
10343 int main() {
10344 main()
10345 ; return 0; }
10346 EOF
10347 if { (eval echo configure:10348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10348   rm -rf conftest*
10349   eval "ac_cv_lib_$ac_lib_var=yes"
10350 else
10351   echo "configure: failed program was:" >&5
10352   cat conftest.$ac_ext >&5
10353   rm -rf conftest*
10354   eval "ac_cv_lib_$ac_lib_var=no"
10355 fi
10356 rm -f conftest*
10357 LIBS="$ac_save_LIBS"
10358
10359 fi
10360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10361   echo "$ac_t""yes" 1>&6
10362   have_k425=yes
10363                                 KRB4_LIBS="-lkrb4 -ldes425"
10364 else
10365   echo "$ac_t""no" 1>&6
10366 have_k425=no
10367 fi
10368
10369
10370                 elif test $krb5_impl = heimdal; then
10371                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10372 echo "configure:10373: checking for main in -lkrb4" >&5
10373 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10374 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10375   echo $ac_n "(cached) $ac_c" 1>&6
10376 else
10377   ac_save_LIBS="$LIBS"
10378 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10379 cat > conftest.$ac_ext <<EOF
10380 #line 10381 "configure"
10381 #include "confdefs.h"
10382
10383 int main() {
10384 main()
10385 ; return 0; }
10386 EOF
10387 if { (eval echo configure:10388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10388   rm -rf conftest*
10389   eval "ac_cv_lib_$ac_lib_var=yes"
10390 else
10391   echo "configure: failed program was:" >&5
10392   cat conftest.$ac_ext >&5
10393   rm -rf conftest*
10394   eval "ac_cv_lib_$ac_lib_var=no"
10395 fi
10396 rm -f conftest*
10397 LIBS="$ac_save_LIBS"
10398
10399 fi
10400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10401   echo "$ac_t""yes" 1>&6
10402   have_k425=yes
10403                                 KRB4_LIBS="-lkrb4"
10404 else
10405   echo "$ac_t""no" 1>&6
10406 have_k425=no
10407 fi
10408
10409
10410                 else
10411                         have_425=no
10412                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10413                 fi
10414
10415                 if test $have_k425 = yes ; then
10416                         ol_with_kerberos=found
10417                         ol_link_krb4=yes
10418
10419                         cat >> confdefs.h <<\EOF
10420 #define HAVE_KRB425 1
10421 EOF
10422
10423                         cat >> confdefs.h <<\EOF
10424 #define HAVE_KRB4 1
10425 EOF
10426
10427
10428                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10429 echo "configure:10430: checking for des_debug in Kerberos libraries" >&5
10430 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10431   echo $ac_n "(cached) $ac_c" 1>&6
10432 else
10433   
10434                                                                 save_LIBS="$LIBS"
10435                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10436                                 cat > conftest.$ac_ext <<EOF
10437 #line 10438 "configure"
10438 #include "confdefs.h"
10439
10440 #include <kerberosIV/krb.h>
10441 #include <kerberosIV/des.h>
10442 extern int des_debug;
10443
10444 int main() {
10445
10446 des_debug = 1;
10447
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   ol_cv_var_des_debug=yes
10453 else
10454   echo "configure: failed program was:" >&5
10455   cat conftest.$ac_ext >&5
10456   rm -rf conftest*
10457   ol_cv_var_des_debug=no
10458 fi
10459 rm -f conftest*
10460                                                                 LIBS="$save_LIBS"
10461                         
10462 fi
10463
10464 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10465
10466                         if test $ol_cv_var_des_debug = yes ; then
10467                                 cat >> confdefs.h <<\EOF
10468 #define HAVE_DES_DEBUG 1
10469 EOF
10470
10471                         fi
10472
10473                         LIBS="$save_LIBS"
10474                 fi
10475         fi
10476 fi
10477
10478 if test $ol_link_krb5 = yes ; then
10479         ol_with_kerberos=found
10480 fi
10481
10482 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10483         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10484
10485         for ac_hdr in krb.h des.h krb-archaeology.h 
10486 do
10487 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10488 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10489 echo "configure:10490: checking for $ac_hdr" >&5
10490 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10491   echo $ac_n "(cached) $ac_c" 1>&6
10492 else
10493   cat > conftest.$ac_ext <<EOF
10494 #line 10495 "configure"
10495 #include "confdefs.h"
10496 #include <$ac_hdr>
10497 EOF
10498 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10499 { (eval echo configure:10500: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10500 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10501 if test -z "$ac_err"; then
10502   rm -rf conftest*
10503   eval "ac_cv_header_$ac_safe=yes"
10504 else
10505   echo "$ac_err" >&5
10506   echo "configure: failed program was:" >&5
10507   cat conftest.$ac_ext >&5
10508   rm -rf conftest*
10509   eval "ac_cv_header_$ac_safe=no"
10510 fi
10511 rm -f conftest*
10512 fi
10513 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10514   echo "$ac_t""yes" 1>&6
10515     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10516   cat >> confdefs.h <<EOF
10517 #define $ac_tr_hdr 1
10518 EOF
10519  
10520 else
10521   echo "$ac_t""no" 1>&6
10522 fi
10523 done
10524
10525
10526         if test $ac_cv_header_krb_h = yes ; then
10527                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10528 echo "configure:10529: checking for main in -lkrb" >&5
10529 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10530 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10531   echo $ac_n "(cached) $ac_c" 1>&6
10532 else
10533   ac_save_LIBS="$LIBS"
10534 LIBS="-lkrb -ldes $LIBS"
10535 cat > conftest.$ac_ext <<EOF
10536 #line 10537 "configure"
10537 #include "confdefs.h"
10538
10539 int main() {
10540 main()
10541 ; return 0; }
10542 EOF
10543 if { (eval echo configure:10544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10544   rm -rf conftest*
10545   eval "ac_cv_lib_$ac_lib_var=yes"
10546 else
10547   echo "configure: failed program was:" >&5
10548   cat conftest.$ac_ext >&5
10549   rm -rf conftest*
10550   eval "ac_cv_lib_$ac_lib_var=no"
10551 fi
10552 rm -f conftest*
10553 LIBS="$ac_save_LIBS"
10554
10555 fi
10556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10557   echo "$ac_t""yes" 1>&6
10558   have_k4=yes
10559 else
10560   echo "$ac_t""no" 1>&6
10561 have_k4=no
10562 fi
10563
10564
10565                 if test $have_k4 = yes ; then
10566                         ol_with_kerberos=found
10567                         ol_link_krb4=yes
10568
10569                         cat >> confdefs.h <<\EOF
10570 #define HAVE_KRB4 1
10571 EOF
10572
10573
10574                         KRB4_LIBS="-lkrb -ldes"
10575
10576                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10577                                 cat >> confdefs.h <<\EOF
10578 #define HAVE_KTH_KERBEROS 1
10579 EOF
10580
10581                         fi
10582                 fi
10583         fi
10584 fi
10585
10586 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10587         ol_link_kbind=yes
10588
10589 elif test $ol_enable_kbind = yes ; then
10590         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10591 fi
10592
10593 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10594         cat >> confdefs.h <<\EOF
10595 #define HAVE_KERBEROS 1
10596 EOF
10597
10598
10599 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10600         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10601 fi
10602
10603 ol_link_tls=no
10604 if test $ol_with_tls != no ; then
10605         for ac_hdr in openssl/ssl.h ssl.h
10606 do
10607 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10608 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10609 echo "configure:10610: checking for $ac_hdr" >&5
10610 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10611   echo $ac_n "(cached) $ac_c" 1>&6
10612 else
10613   cat > conftest.$ac_ext <<EOF
10614 #line 10615 "configure"
10615 #include "confdefs.h"
10616 #include <$ac_hdr>
10617 EOF
10618 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10619 { (eval echo configure:10620: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10620 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10621 if test -z "$ac_err"; then
10622   rm -rf conftest*
10623   eval "ac_cv_header_$ac_safe=yes"
10624 else
10625   echo "$ac_err" >&5
10626   echo "configure: failed program was:" >&5
10627   cat conftest.$ac_ext >&5
10628   rm -rf conftest*
10629   eval "ac_cv_header_$ac_safe=no"
10630 fi
10631 rm -f conftest*
10632 fi
10633 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10634   echo "$ac_t""yes" 1>&6
10635     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10636   cat >> confdefs.h <<EOF
10637 #define $ac_tr_hdr 1
10638 EOF
10639  
10640 else
10641   echo "$ac_t""no" 1>&6
10642 fi
10643 done
10644
10645         
10646         if test $ac_cv_header_openssl_ssl_h = yes \
10647                 -o $ac_cv_header_ssl_h = yes ; then
10648                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10649 echo "configure:10650: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10650 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10651 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10652   echo $ac_n "(cached) $ac_c" 1>&6
10653 else
10654   ac_save_LIBS="$LIBS"
10655 LIBS="-lssl -lcrypto $LIBS"
10656 cat > conftest.$ac_ext <<EOF
10657 #line 10658 "configure"
10658 #include "confdefs.h"
10659 /* Override any gcc2 internal prototype to avoid an error.  */
10660 /* We use char because int might match the return type of a gcc2
10661     builtin and then its argument prototype would still apply.  */
10662 char SSLeay_add_ssl_algorithms();
10663
10664 int main() {
10665 SSLeay_add_ssl_algorithms()
10666 ; return 0; }
10667 EOF
10668 if { (eval echo configure:10669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10669   rm -rf conftest*
10670   eval "ac_cv_lib_$ac_lib_var=yes"
10671 else
10672   echo "configure: failed program was:" >&5
10673   cat conftest.$ac_ext >&5
10674   rm -rf conftest*
10675   eval "ac_cv_lib_$ac_lib_var=no"
10676 fi
10677 rm -f conftest*
10678 LIBS="$ac_save_LIBS"
10679
10680 fi
10681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10682   echo "$ac_t""yes" 1>&6
10683   have_ssleay=yes
10684                         need_rsaref=no
10685 else
10686   echo "$ac_t""no" 1>&6
10687 have_ssleay=no
10688 fi
10689
10690                         
10691                 if test $have_ssleay = no ; then
10692                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
10693 echo "configure:10694: checking for SSL_library_init in -lssl" >&5
10694 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
10695 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10696   echo $ac_n "(cached) $ac_c" 1>&6
10697 else
10698   ac_save_LIBS="$LIBS"
10699 LIBS="-lssl -lcrypto $LIBS"
10700 cat > conftest.$ac_ext <<EOF
10701 #line 10702 "configure"
10702 #include "confdefs.h"
10703 /* Override any gcc2 internal prototype to avoid an error.  */
10704 /* We use char because int might match the return type of a gcc2
10705     builtin and then its argument prototype would still apply.  */
10706 char SSL_library_init();
10707
10708 int main() {
10709 SSL_library_init()
10710 ; return 0; }
10711 EOF
10712 if { (eval echo configure:10713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10713   rm -rf conftest*
10714   eval "ac_cv_lib_$ac_lib_var=yes"
10715 else
10716   echo "configure: failed program was:" >&5
10717   cat conftest.$ac_ext >&5
10718   rm -rf conftest*
10719   eval "ac_cv_lib_$ac_lib_var=no"
10720 fi
10721 rm -f conftest*
10722 LIBS="$ac_save_LIBS"
10723
10724 fi
10725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10726   echo "$ac_t""yes" 1>&6
10727   have_ssleay=yes
10728                                 need_rsaref=no
10729 else
10730   echo "$ac_t""no" 1>&6
10731 have_ssleay=no
10732 fi
10733
10734                 fi
10735
10736                 if test $have_ssleay = no ; then
10737                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
10738 echo "configure:10739: checking for ssl3_accept in -lssl" >&5
10739 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
10740 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10741   echo $ac_n "(cached) $ac_c" 1>&6
10742 else
10743   ac_save_LIBS="$LIBS"
10744 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
10745 cat > conftest.$ac_ext <<EOF
10746 #line 10747 "configure"
10747 #include "confdefs.h"
10748 /* Override any gcc2 internal prototype to avoid an error.  */
10749 /* We use char because int might match the return type of a gcc2
10750     builtin and then its argument prototype would still apply.  */
10751 char ssl3_accept();
10752
10753 int main() {
10754 ssl3_accept()
10755 ; return 0; }
10756 EOF
10757 if { (eval echo configure:10758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10758   rm -rf conftest*
10759   eval "ac_cv_lib_$ac_lib_var=yes"
10760 else
10761   echo "configure: failed program was:" >&5
10762   cat conftest.$ac_ext >&5
10763   rm -rf conftest*
10764   eval "ac_cv_lib_$ac_lib_var=no"
10765 fi
10766 rm -f conftest*
10767 LIBS="$ac_save_LIBS"
10768
10769 fi
10770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10771   echo "$ac_t""yes" 1>&6
10772   have_ssleay=yes
10773                                 need_rsaref=yes
10774 else
10775   echo "$ac_t""no" 1>&6
10776 have_ssleay=no
10777 fi
10778
10779                 fi
10780
10781                 if test $have_ssleay = yes ; then
10782                         ol_with_tls=found
10783                         ol_link_tls=yes
10784
10785                         cat >> confdefs.h <<\EOF
10786 #define HAVE_SSLEAY 1
10787 EOF
10788
10789
10790                         if test $need_rsaref = yes; then
10791                                 cat >> confdefs.h <<\EOF
10792 #define HAVE_RSAREF 1
10793 EOF
10794
10795
10796                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
10797                         else
10798                                 TLS_LIBS="-lssl -lcrypto"
10799                         fi
10800                 fi
10801         fi
10802
10803 else
10804         echo "configure: warning: TLS data protection not supported!" 1>&2
10805 fi
10806
10807 WITH_TLS=no
10808 if test $ol_link_tls = yes ; then
10809         cat >> confdefs.h <<\EOF
10810 #define HAVE_TLS 1
10811 EOF
10812
10813         WITH_TLS=yes
10814
10815 elif test $ol_with_tls = auto ; then
10816         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
10817         echo "configure: warning: TLS data protection not supported!" 1>&2
10818
10819 elif test $ol_with_tls != no ; then
10820         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
10821 fi
10822
10823 if test $ol_enable_lmpasswd != no; then
10824         if test $ol_link_tls != yes ; then
10825                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
10826         fi
10827
10828         cat >> confdefs.h <<\EOF
10829 #define SLAPD_LMHASH 1
10830 EOF
10831
10832 fi
10833
10834 ol_link_threads=no
10835
10836 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10837         -o $ol_with_threads = nt ; then
10838
10839         
10840         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
10841 echo "configure:10842: checking for _beginthread" >&5
10842 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
10843   echo $ac_n "(cached) $ac_c" 1>&6
10844 else
10845   cat > conftest.$ac_ext <<EOF
10846 #line 10847 "configure"
10847 #include "confdefs.h"
10848 /* System header to define __stub macros and hopefully few prototypes,
10849     which can conflict with char _beginthread(); below.  */
10850 #include <assert.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 _beginthread();
10855 char (*f)();
10856
10857 int main() {
10858
10859 /* The GNU C library defines this for functions which it implements
10860     to always fail with ENOSYS.  Some functions are actually named
10861     something starting with __ and the normal name is an alias.  */
10862 #if defined (__stub__beginthread) || defined (__stub____beginthread)
10863 choke me
10864 #else
10865 f = _beginthread;
10866 #endif
10867
10868 ; return 0; }
10869 EOF
10870 if { (eval echo configure:10871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10871   rm -rf conftest*
10872   eval "ac_cv_func__beginthread=yes"
10873 else
10874   echo "configure: failed program was:" >&5
10875   cat conftest.$ac_ext >&5
10876   rm -rf conftest*
10877   eval "ac_cv_func__beginthread=no"
10878 fi
10879 rm -f conftest*
10880 fi
10881
10882 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
10883   echo "$ac_t""yes" 1>&6
10884   :
10885 else
10886   echo "$ac_t""no" 1>&6
10887 fi
10888
10889
10890         if test $ac_cv_func__beginthread = yes ; then
10891                 cat >> confdefs.h <<\EOF
10892 #define HAVE_NT_THREADS 1
10893 EOF
10894
10895                 ol_cv_nt_threads=yes
10896         fi
10897
10898
10899         if test "$ol_cv_nt_threads" = yes ; then
10900                 ol_link_threads=nt
10901                 ol_with_threads=found
10902                 ol_with_yielding_select=yes
10903
10904                 cat >> confdefs.h <<\EOF
10905 #define HAVE_NT_SERVICE_MANAGER 1
10906 EOF
10907
10908                 cat >> confdefs.h <<\EOF
10909 #define HAVE_NT_EVENT_LOG 1
10910 EOF
10911
10912         fi
10913
10914         if test $ol_with_threads = nt ; then
10915                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
10916         fi
10917 fi
10918
10919 if test $ol_with_threads = auto -o $ol_with_threads = yes \
10920         -o $ol_with_threads = posix ; then
10921
10922         for ac_hdr in pthread.h
10923 do
10924 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10925 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10926 echo "configure:10927: checking for $ac_hdr" >&5
10927 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10928   echo $ac_n "(cached) $ac_c" 1>&6
10929 else
10930   cat > conftest.$ac_ext <<EOF
10931 #line 10932 "configure"
10932 #include "confdefs.h"
10933 #include <$ac_hdr>
10934 EOF
10935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10936 { (eval echo configure:10937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10938 if test -z "$ac_err"; then
10939   rm -rf conftest*
10940   eval "ac_cv_header_$ac_safe=yes"
10941 else
10942   echo "$ac_err" >&5
10943   echo "configure: failed program was:" >&5
10944   cat conftest.$ac_ext >&5
10945   rm -rf conftest*
10946   eval "ac_cv_header_$ac_safe=no"
10947 fi
10948 rm -f conftest*
10949 fi
10950 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10951   echo "$ac_t""yes" 1>&6
10952     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10953   cat >> confdefs.h <<EOF
10954 #define $ac_tr_hdr 1
10955 EOF
10956  
10957 else
10958   echo "$ac_t""no" 1>&6
10959 fi
10960 done
10961
10962
10963         if test $ac_cv_header_pthread_h = yes ; then
10964                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
10965 echo "configure:10966: checking POSIX thread version" >&5
10966 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
10967   echo $ac_n "(cached) $ac_c" 1>&6
10968 else
10969   
10970         cat > conftest.$ac_ext <<EOF
10971 #line 10972 "configure"
10972 #include "confdefs.h"
10973
10974 #               include <pthread.h>
10975         
10976 int main() {
10977
10978                 int i = PTHREAD_CREATE_JOINABLE;
10979         
10980 ; return 0; }
10981 EOF
10982 if { (eval echo configure:10983: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10983   rm -rf conftest*
10984   
10985         cat > conftest.$ac_ext <<EOF
10986 #line 10987 "configure"
10987 #include "confdefs.h"
10988 #include <pthread.h>
10989 EOF
10990 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10991   egrep "pthread_detach" >/dev/null 2>&1; then
10992   rm -rf conftest*
10993   ol_cv_pthread_version=10
10994 else
10995   rm -rf conftest*
10996   ol_cv_pthread_version=8
10997 fi
10998 rm -f conftest*
10999
11000 else
11001   echo "configure: failed program was:" >&5
11002   cat conftest.$ac_ext >&5
11003   rm -rf conftest*
11004   
11005         cat > conftest.$ac_ext <<EOF
11006 #line 11007 "configure"
11007 #include "confdefs.h"
11008
11009 #               include <pthread.h>
11010 #               ifdef PTHREAD_CREATE_UNDETACHED
11011                 draft7
11012 #               endif
11013         
11014 EOF
11015 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11016   egrep "draft7" >/dev/null 2>&1; then
11017   rm -rf conftest*
11018   ol_cv_pthread_version=7
11019 else
11020   rm -rf conftest*
11021   
11022         cat > conftest.$ac_ext <<EOF
11023 #line 11024 "configure"
11024 #include "confdefs.h"
11025 #include <pthread.h>
11026 EOF
11027 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11028   egrep "pthread_attr_init" >/dev/null 2>&1; then
11029   rm -rf conftest*
11030   ol_cv_pthread_version=6
11031 else
11032   rm -rf conftest*
11033   
11034         cat > conftest.$ac_ext <<EOF
11035 #line 11036 "configure"
11036 #include "confdefs.h"
11037
11038 #               include <pthread.h>
11039 #ifdef          PTHREAD_MUTEX_INITIALIZER
11040                 draft5
11041 #endif
11042         
11043 EOF
11044 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11045   egrep "draft5" >/dev/null 2>&1; then
11046   rm -rf conftest*
11047   ol_cv_pthread_version=5
11048 else
11049   rm -rf conftest*
11050   ol_cv_pthread_version=4
11051 fi
11052 rm -f conftest*
11053  
11054 fi
11055 rm -f conftest*
11056  
11057 fi
11058 rm -f conftest*
11059  
11060 fi
11061 rm -f conftest*
11062
11063 fi
11064
11065 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11066
11067
11068                 if test $ol_cv_pthread_version != 0 ; then
11069                         cat >> confdefs.h <<EOF
11070 #define HAVE_PTHREADS $ol_cv_pthread_version
11071 EOF
11072
11073                 else
11074                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11075                 fi
11076
11077                 # consider threads found
11078                 ol_with_threads=found
11079
11080                 
11081         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11082 echo "configure:11083: checking for LinuxThreads pthread.h" >&5
11083 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11084   echo $ac_n "(cached) $ac_c" 1>&6
11085 else
11086   cat > conftest.$ac_ext <<EOF
11087 #line 11088 "configure"
11088 #include "confdefs.h"
11089 #include <pthread.h>
11090 EOF
11091 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11092   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11093   rm -rf conftest*
11094   ol_cv_header_linux_threads=yes
11095 else
11096   rm -rf conftest*
11097   ol_cv_header_linux_threads=no
11098 fi
11099 rm -f conftest*
11100
11101                 
11102 fi
11103
11104 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11105         if test $ol_cv_header_linux_threads = yes; then
11106                 cat >> confdefs.h <<\EOF
11107 #define HAVE_LINUX_THREADS 1
11108 EOF
11109
11110         fi
11111
11112                 
11113         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11114 echo "configure:11115: checking for GNU Pth pthread.h" >&5
11115 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11116   echo $ac_n "(cached) $ac_c" 1>&6
11117 else
11118   cat > conftest.$ac_ext <<EOF
11119 #line 11120 "configure"
11120 #include "confdefs.h"
11121 #include <pthread.h>
11122 #ifdef _POSIX_THREAD_IS_GNU_PTH
11123         __gnu_pth__;
11124 #endif
11125
11126 EOF
11127 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11128   egrep "__gnu_pth__" >/dev/null 2>&1; then
11129   rm -rf conftest*
11130   ol_cv_header_gnu_pth_pthread_h=yes
11131 else
11132   rm -rf conftest*
11133   ol_cv_header_gnu_pth_pthread_h=no
11134 fi
11135 rm -f conftest*
11136
11137                 
11138 fi
11139
11140 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11141
11142
11143                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11144                         for ac_hdr in sched.h
11145 do
11146 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11147 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11148 echo "configure:11149: checking for $ac_hdr" >&5
11149 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11150   echo $ac_n "(cached) $ac_c" 1>&6
11151 else
11152   cat > conftest.$ac_ext <<EOF
11153 #line 11154 "configure"
11154 #include "confdefs.h"
11155 #include <$ac_hdr>
11156 EOF
11157 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11158 { (eval echo configure:11159: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11159 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11160 if test -z "$ac_err"; then
11161   rm -rf conftest*
11162   eval "ac_cv_header_$ac_safe=yes"
11163 else
11164   echo "$ac_err" >&5
11165   echo "configure: failed program was:" >&5
11166   cat conftest.$ac_ext >&5
11167   rm -rf conftest*
11168   eval "ac_cv_header_$ac_safe=no"
11169 fi
11170 rm -f conftest*
11171 fi
11172 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11173   echo "$ac_t""yes" 1>&6
11174     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11175   cat >> confdefs.h <<EOF
11176 #define $ac_tr_hdr 1
11177 EOF
11178  
11179 else
11180   echo "$ac_t""no" 1>&6
11181 fi
11182 done
11183
11184                 fi
11185
11186                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11187                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11188 echo "configure:11189: checking for pthread_create in default libraries" >&5
11189 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11190   echo $ac_n "(cached) $ac_c" 1>&6
11191 else
11192   
11193                 if test "$cross_compiling" = yes; then
11194   cat > conftest.$ac_ext <<EOF
11195 #line 11196 "configure"
11196 #include "confdefs.h"
11197 /* pthread test headers */
11198 #include <pthread.h>
11199 #if HAVE_PTHREADS < 7
11200 #include <errno.h>
11201 #endif
11202 #ifndef NULL
11203 #define NULL (void*)0
11204 #endif
11205
11206 static void *task(p)
11207         void *p;
11208 {
11209         return (void *) (p == NULL);
11210 }
11211
11212 int main() {
11213
11214         /* pthread test function */
11215 #ifndef PTHREAD_CREATE_DETACHED
11216 #define PTHREAD_CREATE_DETACHED 1
11217 #endif
11218         pthread_t t;
11219         int status;
11220         int detach = PTHREAD_CREATE_DETACHED;
11221
11222 #if HAVE_PTHREADS > 4
11223         /* Final pthreads */
11224         pthread_attr_t attr;
11225
11226         status = pthread_attr_init(&attr);
11227         if( status ) return status;
11228
11229 #if HAVE_PTHREADS < 7
11230         status = pthread_attr_setdetachstate(&attr, &detach);
11231         if( status < 0 ) status = errno;
11232 #else
11233         status = pthread_attr_setdetachstate(&attr, detach);
11234 #endif
11235         if( status ) return status;
11236         status = pthread_create( &t, &attr, task, NULL );
11237 #if HAVE_PTHREADS < 7
11238         if( status < 0 ) status = errno;
11239 #endif
11240         if( status ) return status;
11241 #else
11242         /* Draft 4 pthreads */
11243         status = pthread_create( &t, pthread_attr_default, task, NULL );
11244         if( status ) return errno;
11245
11246         /* give thread a chance to complete */
11247         /* it should remain joinable and hence detachable */
11248         sleep( 1 );
11249
11250         status = pthread_detach( &t );
11251         if( status ) return errno;
11252 #endif
11253
11254 #ifdef HAVE_LINUX_THREADS
11255         pthread_kill_other_threads_np();
11256 #endif
11257
11258         return 0;
11259
11260 ; return 0; }
11261 EOF
11262 if { (eval echo configure:11263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11263   rm -rf conftest*
11264   ol_cv_pthread_create=yes
11265 else
11266   echo "configure: failed program was:" >&5
11267   cat conftest.$ac_ext >&5
11268   rm -rf conftest*
11269   ol_cv_pthread_create=no
11270 fi
11271 rm -f conftest*
11272 else
11273   cat > conftest.$ac_ext <<EOF
11274 #line 11275 "configure"
11275 #include "confdefs.h"
11276 /* pthread test headers */
11277 #include <pthread.h>
11278 #if HAVE_PTHREADS < 7
11279 #include <errno.h>
11280 #endif
11281 #ifndef NULL
11282 #define NULL (void*)0
11283 #endif
11284
11285 static void *task(p)
11286         void *p;
11287 {
11288         return (void *) (p == NULL);
11289 }
11290
11291
11292 int main(argc, argv)
11293         int argc;
11294         char **argv;
11295 {
11296
11297         /* pthread test function */
11298 #ifndef PTHREAD_CREATE_DETACHED
11299 #define PTHREAD_CREATE_DETACHED 1
11300 #endif
11301         pthread_t t;
11302         int status;
11303         int detach = PTHREAD_CREATE_DETACHED;
11304
11305 #if HAVE_PTHREADS > 4
11306         /* Final pthreads */
11307         pthread_attr_t attr;
11308
11309         status = pthread_attr_init(&attr);
11310         if( status ) return status;
11311
11312 #if HAVE_PTHREADS < 7
11313         status = pthread_attr_setdetachstate(&attr, &detach);
11314         if( status < 0 ) status = errno;
11315 #else
11316         status = pthread_attr_setdetachstate(&attr, detach);
11317 #endif
11318         if( status ) return status;
11319         status = pthread_create( &t, &attr, task, NULL );
11320 #if HAVE_PTHREADS < 7
11321         if( status < 0 ) status = errno;
11322 #endif
11323         if( status ) return status;
11324 #else
11325         /* Draft 4 pthreads */
11326         status = pthread_create( &t, pthread_attr_default, task, NULL );
11327         if( status ) return errno;
11328
11329         /* give thread a chance to complete */
11330         /* it should remain joinable and hence detachable */
11331         sleep( 1 );
11332
11333         status = pthread_detach( &t );
11334         if( status ) return errno;
11335 #endif
11336
11337 #ifdef HAVE_LINUX_THREADS
11338         pthread_kill_other_threads_np();
11339 #endif
11340
11341         return 0;
11342
11343 }
11344
11345 EOF
11346 if { (eval echo configure:11347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11347 then
11348   ol_cv_pthread_create=yes
11349 else
11350   echo "configure: failed program was:" >&5
11351   cat conftest.$ac_ext >&5
11352   rm -fr conftest*
11353   ol_cv_pthread_create=no
11354 fi
11355 rm -fr conftest*
11356 fi
11357
11358 fi
11359
11360 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11361
11362                 if test $ol_cv_pthread_create != no ; then
11363                         ol_link_threads=posix
11364                         ol_link_pthreads=""
11365                 fi
11366                 
11367                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11368 if test "$ol_link_threads" = no ; then
11369         # try -kthread
11370         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11371 echo "configure:11372: checking for pthread link with -kthread" >&5
11372 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11373   echo $ac_n "(cached) $ac_c" 1>&6
11374 else
11375   
11376                 # save the flags
11377                 ol_LIBS="$LIBS"
11378                 LIBS="-kthread $LIBS"
11379
11380                 if test "$cross_compiling" = yes; then
11381   cat > conftest.$ac_ext <<EOF
11382 #line 11383 "configure"
11383 #include "confdefs.h"
11384 /* pthread test headers */
11385 #include <pthread.h>
11386 #if HAVE_PTHREADS < 7
11387 #include <errno.h>
11388 #endif
11389 #ifndef NULL
11390 #define NULL (void*)0
11391 #endif
11392
11393 static void *task(p)
11394         void *p;
11395 {
11396         return (void *) (p == NULL);
11397 }
11398
11399 int main() {
11400
11401         /* pthread test function */
11402 #ifndef PTHREAD_CREATE_DETACHED
11403 #define PTHREAD_CREATE_DETACHED 1
11404 #endif
11405         pthread_t t;
11406         int status;
11407         int detach = PTHREAD_CREATE_DETACHED;
11408
11409 #if HAVE_PTHREADS > 4
11410         /* Final pthreads */
11411         pthread_attr_t attr;
11412
11413         status = pthread_attr_init(&attr);
11414         if( status ) return status;
11415
11416 #if HAVE_PTHREADS < 7
11417         status = pthread_attr_setdetachstate(&attr, &detach);
11418         if( status < 0 ) status = errno;
11419 #else
11420         status = pthread_attr_setdetachstate(&attr, detach);
11421 #endif
11422         if( status ) return status;
11423         status = pthread_create( &t, &attr, task, NULL );
11424 #if HAVE_PTHREADS < 7
11425         if( status < 0 ) status = errno;
11426 #endif
11427         if( status ) return status;
11428 #else
11429         /* Draft 4 pthreads */
11430         status = pthread_create( &t, pthread_attr_default, task, NULL );
11431         if( status ) return errno;
11432
11433         /* give thread a chance to complete */
11434         /* it should remain joinable and hence detachable */
11435         sleep( 1 );
11436
11437         status = pthread_detach( &t );
11438         if( status ) return errno;
11439 #endif
11440
11441 #ifdef HAVE_LINUX_THREADS
11442         pthread_kill_other_threads_np();
11443 #endif
11444
11445         return 0;
11446
11447 ; return 0; }
11448 EOF
11449 if { (eval echo configure:11450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11450   rm -rf conftest*
11451   ol_cv_pthread_kthread=yes
11452 else
11453   echo "configure: failed program was:" >&5
11454   cat conftest.$ac_ext >&5
11455   rm -rf conftest*
11456   ol_cv_pthread_kthread=no
11457 fi
11458 rm -f conftest*
11459 else
11460   cat > conftest.$ac_ext <<EOF
11461 #line 11462 "configure"
11462 #include "confdefs.h"
11463 /* pthread test headers */
11464 #include <pthread.h>
11465 #if HAVE_PTHREADS < 7
11466 #include <errno.h>
11467 #endif
11468 #ifndef NULL
11469 #define NULL (void*)0
11470 #endif
11471
11472 static void *task(p)
11473         void *p;
11474 {
11475         return (void *) (p == NULL);
11476 }
11477
11478
11479 int main(argc, argv)
11480         int argc;
11481         char **argv;
11482 {
11483
11484         /* pthread test function */
11485 #ifndef PTHREAD_CREATE_DETACHED
11486 #define PTHREAD_CREATE_DETACHED 1
11487 #endif
11488         pthread_t t;
11489         int status;
11490         int detach = PTHREAD_CREATE_DETACHED;
11491
11492 #if HAVE_PTHREADS > 4
11493         /* Final pthreads */
11494         pthread_attr_t attr;
11495
11496         status = pthread_attr_init(&attr);
11497         if( status ) return status;
11498
11499 #if HAVE_PTHREADS < 7
11500         status = pthread_attr_setdetachstate(&attr, &detach);
11501         if( status < 0 ) status = errno;
11502 #else
11503         status = pthread_attr_setdetachstate(&attr, detach);
11504 #endif
11505         if( status ) return status;
11506         status = pthread_create( &t, &attr, task, NULL );
11507 #if HAVE_PTHREADS < 7
11508         if( status < 0 ) status = errno;
11509 #endif
11510         if( status ) return status;
11511 #else
11512         /* Draft 4 pthreads */
11513         status = pthread_create( &t, pthread_attr_default, task, NULL );
11514         if( status ) return errno;
11515
11516         /* give thread a chance to complete */
11517         /* it should remain joinable and hence detachable */
11518         sleep( 1 );
11519
11520         status = pthread_detach( &t );
11521         if( status ) return errno;
11522 #endif
11523
11524 #ifdef HAVE_LINUX_THREADS
11525         pthread_kill_other_threads_np();
11526 #endif
11527
11528         return 0;
11529
11530 }
11531
11532 EOF
11533 if { (eval echo configure:11534: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11534 then
11535   ol_cv_pthread_kthread=yes
11536 else
11537   echo "configure: failed program was:" >&5
11538   cat conftest.$ac_ext >&5
11539   rm -fr conftest*
11540   ol_cv_pthread_kthread=no
11541 fi
11542 rm -fr conftest*
11543 fi
11544
11545
11546                 # restore the LIBS
11547                 LIBS="$ol_LIBS"
11548         
11549 fi
11550
11551 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11552
11553         if test $ol_cv_pthread_kthread = yes ; then
11554                 ol_link_pthreads="-kthread"
11555                 ol_link_threads=posix
11556         fi
11557 fi
11558
11559                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11560 if test "$ol_link_threads" = no ; then
11561         # try -pthread
11562         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11563 echo "configure:11564: checking for pthread link with -pthread" >&5
11564 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11565   echo $ac_n "(cached) $ac_c" 1>&6
11566 else
11567   
11568                 # save the flags
11569                 ol_LIBS="$LIBS"
11570                 LIBS="-pthread $LIBS"
11571
11572                 if test "$cross_compiling" = yes; then
11573   cat > conftest.$ac_ext <<EOF
11574 #line 11575 "configure"
11575 #include "confdefs.h"
11576 /* pthread test headers */
11577 #include <pthread.h>
11578 #if HAVE_PTHREADS < 7
11579 #include <errno.h>
11580 #endif
11581 #ifndef NULL
11582 #define NULL (void*)0
11583 #endif
11584
11585 static void *task(p)
11586         void *p;
11587 {
11588         return (void *) (p == NULL);
11589 }
11590
11591 int main() {
11592
11593         /* pthread test function */
11594 #ifndef PTHREAD_CREATE_DETACHED
11595 #define PTHREAD_CREATE_DETACHED 1
11596 #endif
11597         pthread_t t;
11598         int status;
11599         int detach = PTHREAD_CREATE_DETACHED;
11600
11601 #if HAVE_PTHREADS > 4
11602         /* Final pthreads */
11603         pthread_attr_t attr;
11604
11605         status = pthread_attr_init(&attr);
11606         if( status ) return status;
11607
11608 #if HAVE_PTHREADS < 7
11609         status = pthread_attr_setdetachstate(&attr, &detach);
11610         if( status < 0 ) status = errno;
11611 #else
11612         status = pthread_attr_setdetachstate(&attr, detach);
11613 #endif
11614         if( status ) return status;
11615         status = pthread_create( &t, &attr, task, NULL );
11616 #if HAVE_PTHREADS < 7
11617         if( status < 0 ) status = errno;
11618 #endif
11619         if( status ) return status;
11620 #else
11621         /* Draft 4 pthreads */
11622         status = pthread_create( &t, pthread_attr_default, task, NULL );
11623         if( status ) return errno;
11624
11625         /* give thread a chance to complete */
11626         /* it should remain joinable and hence detachable */
11627         sleep( 1 );
11628
11629         status = pthread_detach( &t );
11630         if( status ) return errno;
11631 #endif
11632
11633 #ifdef HAVE_LINUX_THREADS
11634         pthread_kill_other_threads_np();
11635 #endif
11636
11637         return 0;
11638
11639 ; return 0; }
11640 EOF
11641 if { (eval echo configure:11642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11642   rm -rf conftest*
11643   ol_cv_pthread_pthread=yes
11644 else
11645   echo "configure: failed program was:" >&5
11646   cat conftest.$ac_ext >&5
11647   rm -rf conftest*
11648   ol_cv_pthread_pthread=no
11649 fi
11650 rm -f conftest*
11651 else
11652   cat > conftest.$ac_ext <<EOF
11653 #line 11654 "configure"
11654 #include "confdefs.h"
11655 /* pthread test headers */
11656 #include <pthread.h>
11657 #if HAVE_PTHREADS < 7
11658 #include <errno.h>
11659 #endif
11660 #ifndef NULL
11661 #define NULL (void*)0
11662 #endif
11663
11664 static void *task(p)
11665         void *p;
11666 {
11667         return (void *) (p == NULL);
11668 }
11669
11670
11671 int main(argc, argv)
11672         int argc;
11673         char **argv;
11674 {
11675
11676         /* pthread test function */
11677 #ifndef PTHREAD_CREATE_DETACHED
11678 #define PTHREAD_CREATE_DETACHED 1
11679 #endif
11680         pthread_t t;
11681         int status;
11682         int detach = PTHREAD_CREATE_DETACHED;
11683
11684 #if HAVE_PTHREADS > 4
11685         /* Final pthreads */
11686         pthread_attr_t attr;
11687
11688         status = pthread_attr_init(&attr);
11689         if( status ) return status;
11690
11691 #if HAVE_PTHREADS < 7
11692         status = pthread_attr_setdetachstate(&attr, &detach);
11693         if( status < 0 ) status = errno;
11694 #else
11695         status = pthread_attr_setdetachstate(&attr, detach);
11696 #endif
11697         if( status ) return status;
11698         status = pthread_create( &t, &attr, task, NULL );
11699 #if HAVE_PTHREADS < 7
11700         if( status < 0 ) status = errno;
11701 #endif
11702         if( status ) return status;
11703 #else
11704         /* Draft 4 pthreads */
11705         status = pthread_create( &t, pthread_attr_default, task, NULL );
11706         if( status ) return errno;
11707
11708         /* give thread a chance to complete */
11709         /* it should remain joinable and hence detachable */
11710         sleep( 1 );
11711
11712         status = pthread_detach( &t );
11713         if( status ) return errno;
11714 #endif
11715
11716 #ifdef HAVE_LINUX_THREADS
11717         pthread_kill_other_threads_np();
11718 #endif
11719
11720         return 0;
11721
11722 }
11723
11724 EOF
11725 if { (eval echo configure:11726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11726 then
11727   ol_cv_pthread_pthread=yes
11728 else
11729   echo "configure: failed program was:" >&5
11730   cat conftest.$ac_ext >&5
11731   rm -fr conftest*
11732   ol_cv_pthread_pthread=no
11733 fi
11734 rm -fr conftest*
11735 fi
11736
11737
11738                 # restore the LIBS
11739                 LIBS="$ol_LIBS"
11740         
11741 fi
11742
11743 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
11744
11745         if test $ol_cv_pthread_pthread = yes ; then
11746                 ol_link_pthreads="-pthread"
11747                 ol_link_threads=posix
11748         fi
11749 fi
11750
11751                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
11752 if test "$ol_link_threads" = no ; then
11753         # try -pthreads
11754         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
11755 echo "configure:11756: checking for pthread link with -pthreads" >&5
11756 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
11757   echo $ac_n "(cached) $ac_c" 1>&6
11758 else
11759   
11760                 # save the flags
11761                 ol_LIBS="$LIBS"
11762                 LIBS="-pthreads $LIBS"
11763
11764                 if test "$cross_compiling" = yes; then
11765   cat > conftest.$ac_ext <<EOF
11766 #line 11767 "configure"
11767 #include "confdefs.h"
11768 /* pthread test headers */
11769 #include <pthread.h>
11770 #if HAVE_PTHREADS < 7
11771 #include <errno.h>
11772 #endif
11773 #ifndef NULL
11774 #define NULL (void*)0
11775 #endif
11776
11777 static void *task(p)
11778         void *p;
11779 {
11780         return (void *) (p == NULL);
11781 }
11782
11783 int main() {
11784
11785         /* pthread test function */
11786 #ifndef PTHREAD_CREATE_DETACHED
11787 #define PTHREAD_CREATE_DETACHED 1
11788 #endif
11789         pthread_t t;
11790         int status;
11791         int detach = PTHREAD_CREATE_DETACHED;
11792
11793 #if HAVE_PTHREADS > 4
11794         /* Final pthreads */
11795         pthread_attr_t attr;
11796
11797         status = pthread_attr_init(&attr);
11798         if( status ) return status;
11799
11800 #if HAVE_PTHREADS < 7
11801         status = pthread_attr_setdetachstate(&attr, &detach);
11802         if( status < 0 ) status = errno;
11803 #else
11804         status = pthread_attr_setdetachstate(&attr, detach);
11805 #endif
11806         if( status ) return status;
11807         status = pthread_create( &t, &attr, task, NULL );
11808 #if HAVE_PTHREADS < 7
11809         if( status < 0 ) status = errno;
11810 #endif
11811         if( status ) return status;
11812 #else
11813         /* Draft 4 pthreads */
11814         status = pthread_create( &t, pthread_attr_default, task, NULL );
11815         if( status ) return errno;
11816
11817         /* give thread a chance to complete */
11818         /* it should remain joinable and hence detachable */
11819         sleep( 1 );
11820
11821         status = pthread_detach( &t );
11822         if( status ) return errno;
11823 #endif
11824
11825 #ifdef HAVE_LINUX_THREADS
11826         pthread_kill_other_threads_np();
11827 #endif
11828
11829         return 0;
11830
11831 ; return 0; }
11832 EOF
11833 if { (eval echo configure:11834: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11834   rm -rf conftest*
11835   ol_cv_pthread_pthreads=yes
11836 else
11837   echo "configure: failed program was:" >&5
11838   cat conftest.$ac_ext >&5
11839   rm -rf conftest*
11840   ol_cv_pthread_pthreads=no
11841 fi
11842 rm -f conftest*
11843 else
11844   cat > conftest.$ac_ext <<EOF
11845 #line 11846 "configure"
11846 #include "confdefs.h"
11847 /* pthread test headers */
11848 #include <pthread.h>
11849 #if HAVE_PTHREADS < 7
11850 #include <errno.h>
11851 #endif
11852 #ifndef NULL
11853 #define NULL (void*)0
11854 #endif
11855
11856 static void *task(p)
11857         void *p;
11858 {
11859         return (void *) (p == NULL);
11860 }
11861
11862
11863 int main(argc, argv)
11864         int argc;
11865         char **argv;
11866 {
11867
11868         /* pthread test function */
11869 #ifndef PTHREAD_CREATE_DETACHED
11870 #define PTHREAD_CREATE_DETACHED 1
11871 #endif
11872         pthread_t t;
11873         int status;
11874         int detach = PTHREAD_CREATE_DETACHED;
11875
11876 #if HAVE_PTHREADS > 4
11877         /* Final pthreads */
11878         pthread_attr_t attr;
11879
11880         status = pthread_attr_init(&attr);
11881         if( status ) return status;
11882
11883 #if HAVE_PTHREADS < 7
11884         status = pthread_attr_setdetachstate(&attr, &detach);
11885         if( status < 0 ) status = errno;
11886 #else
11887         status = pthread_attr_setdetachstate(&attr, detach);
11888 #endif
11889         if( status ) return status;
11890         status = pthread_create( &t, &attr, task, NULL );
11891 #if HAVE_PTHREADS < 7
11892         if( status < 0 ) status = errno;
11893 #endif
11894         if( status ) return status;
11895 #else
11896         /* Draft 4 pthreads */
11897         status = pthread_create( &t, pthread_attr_default, task, NULL );
11898         if( status ) return errno;
11899
11900         /* give thread a chance to complete */
11901         /* it should remain joinable and hence detachable */
11902         sleep( 1 );
11903
11904         status = pthread_detach( &t );
11905         if( status ) return errno;
11906 #endif
11907
11908 #ifdef HAVE_LINUX_THREADS
11909         pthread_kill_other_threads_np();
11910 #endif
11911
11912         return 0;
11913
11914 }
11915
11916 EOF
11917 if { (eval echo configure:11918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11918 then
11919   ol_cv_pthread_pthreads=yes
11920 else
11921   echo "configure: failed program was:" >&5
11922   cat conftest.$ac_ext >&5
11923   rm -fr conftest*
11924   ol_cv_pthread_pthreads=no
11925 fi
11926 rm -fr conftest*
11927 fi
11928
11929
11930                 # restore the LIBS
11931                 LIBS="$ol_LIBS"
11932         
11933 fi
11934
11935 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
11936
11937         if test $ol_cv_pthread_pthreads = yes ; then
11938                 ol_link_pthreads="-pthreads"
11939                 ol_link_threads=posix
11940         fi
11941 fi
11942
11943                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
11944 if test "$ol_link_threads" = no ; then
11945         # try -mthreads
11946         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
11947 echo "configure:11948: checking for pthread link with -mthreads" >&5
11948 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
11949   echo $ac_n "(cached) $ac_c" 1>&6
11950 else
11951   
11952                 # save the flags
11953                 ol_LIBS="$LIBS"
11954                 LIBS="-mthreads $LIBS"
11955
11956                 if test "$cross_compiling" = yes; then
11957   cat > conftest.$ac_ext <<EOF
11958 #line 11959 "configure"
11959 #include "confdefs.h"
11960 /* pthread test headers */
11961 #include <pthread.h>
11962 #if HAVE_PTHREADS < 7
11963 #include <errno.h>
11964 #endif
11965 #ifndef NULL
11966 #define NULL (void*)0
11967 #endif
11968
11969 static void *task(p)
11970         void *p;
11971 {
11972         return (void *) (p == NULL);
11973 }
11974
11975 int main() {
11976
11977         /* pthread test function */
11978 #ifndef PTHREAD_CREATE_DETACHED
11979 #define PTHREAD_CREATE_DETACHED 1
11980 #endif
11981         pthread_t t;
11982         int status;
11983         int detach = PTHREAD_CREATE_DETACHED;
11984
11985 #if HAVE_PTHREADS > 4
11986         /* Final pthreads */
11987         pthread_attr_t attr;
11988
11989         status = pthread_attr_init(&attr);
11990         if( status ) return status;
11991
11992 #if HAVE_PTHREADS < 7
11993         status = pthread_attr_setdetachstate(&attr, &detach);
11994         if( status < 0 ) status = errno;
11995 #else
11996         status = pthread_attr_setdetachstate(&attr, detach);
11997 #endif
11998         if( status ) return status;
11999         status = pthread_create( &t, &attr, task, NULL );
12000 #if HAVE_PTHREADS < 7
12001         if( status < 0 ) status = errno;
12002 #endif
12003         if( status ) return status;
12004 #else
12005         /* Draft 4 pthreads */
12006         status = pthread_create( &t, pthread_attr_default, task, NULL );
12007         if( status ) return errno;
12008
12009         /* give thread a chance to complete */
12010         /* it should remain joinable and hence detachable */
12011         sleep( 1 );
12012
12013         status = pthread_detach( &t );
12014         if( status ) return errno;
12015 #endif
12016
12017 #ifdef HAVE_LINUX_THREADS
12018         pthread_kill_other_threads_np();
12019 #endif
12020
12021         return 0;
12022
12023 ; return 0; }
12024 EOF
12025 if { (eval echo configure:12026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12026   rm -rf conftest*
12027   ol_cv_pthread_mthreads=yes
12028 else
12029   echo "configure: failed program was:" >&5
12030   cat conftest.$ac_ext >&5
12031   rm -rf conftest*
12032   ol_cv_pthread_mthreads=no
12033 fi
12034 rm -f conftest*
12035 else
12036   cat > conftest.$ac_ext <<EOF
12037 #line 12038 "configure"
12038 #include "confdefs.h"
12039 /* pthread test headers */
12040 #include <pthread.h>
12041 #if HAVE_PTHREADS < 7
12042 #include <errno.h>
12043 #endif
12044 #ifndef NULL
12045 #define NULL (void*)0
12046 #endif
12047
12048 static void *task(p)
12049         void *p;
12050 {
12051         return (void *) (p == NULL);
12052 }
12053
12054
12055 int main(argc, argv)
12056         int argc;
12057         char **argv;
12058 {
12059
12060         /* pthread test function */
12061 #ifndef PTHREAD_CREATE_DETACHED
12062 #define PTHREAD_CREATE_DETACHED 1
12063 #endif
12064         pthread_t t;
12065         int status;
12066         int detach = PTHREAD_CREATE_DETACHED;
12067
12068 #if HAVE_PTHREADS > 4
12069         /* Final pthreads */
12070         pthread_attr_t attr;
12071
12072         status = pthread_attr_init(&attr);
12073         if( status ) return status;
12074
12075 #if HAVE_PTHREADS < 7
12076         status = pthread_attr_setdetachstate(&attr, &detach);
12077         if( status < 0 ) status = errno;
12078 #else
12079         status = pthread_attr_setdetachstate(&attr, detach);
12080 #endif
12081         if( status ) return status;
12082         status = pthread_create( &t, &attr, task, NULL );
12083 #if HAVE_PTHREADS < 7
12084         if( status < 0 ) status = errno;
12085 #endif
12086         if( status ) return status;
12087 #else
12088         /* Draft 4 pthreads */
12089         status = pthread_create( &t, pthread_attr_default, task, NULL );
12090         if( status ) return errno;
12091
12092         /* give thread a chance to complete */
12093         /* it should remain joinable and hence detachable */
12094         sleep( 1 );
12095
12096         status = pthread_detach( &t );
12097         if( status ) return errno;
12098 #endif
12099
12100 #ifdef HAVE_LINUX_THREADS
12101         pthread_kill_other_threads_np();
12102 #endif
12103
12104         return 0;
12105
12106 }
12107
12108 EOF
12109 if { (eval echo configure:12110: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12110 then
12111   ol_cv_pthread_mthreads=yes
12112 else
12113   echo "configure: failed program was:" >&5
12114   cat conftest.$ac_ext >&5
12115   rm -fr conftest*
12116   ol_cv_pthread_mthreads=no
12117 fi
12118 rm -fr conftest*
12119 fi
12120
12121
12122                 # restore the LIBS
12123                 LIBS="$ol_LIBS"
12124         
12125 fi
12126
12127 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12128
12129         if test $ol_cv_pthread_mthreads = yes ; then
12130                 ol_link_pthreads="-mthreads"
12131                 ol_link_threads=posix
12132         fi
12133 fi
12134
12135                 # Pthread try link: -thread (ol_cv_pthread_thread)
12136 if test "$ol_link_threads" = no ; then
12137         # try -thread
12138         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12139 echo "configure:12140: checking for pthread link with -thread" >&5
12140 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12141   echo $ac_n "(cached) $ac_c" 1>&6
12142 else
12143   
12144                 # save the flags
12145                 ol_LIBS="$LIBS"
12146                 LIBS="-thread $LIBS"
12147
12148                 if test "$cross_compiling" = yes; then
12149   cat > conftest.$ac_ext <<EOF
12150 #line 12151 "configure"
12151 #include "confdefs.h"
12152 /* pthread test headers */
12153 #include <pthread.h>
12154 #if HAVE_PTHREADS < 7
12155 #include <errno.h>
12156 #endif
12157 #ifndef NULL
12158 #define NULL (void*)0
12159 #endif
12160
12161 static void *task(p)
12162         void *p;
12163 {
12164         return (void *) (p == NULL);
12165 }
12166
12167 int main() {
12168
12169         /* pthread test function */
12170 #ifndef PTHREAD_CREATE_DETACHED
12171 #define PTHREAD_CREATE_DETACHED 1
12172 #endif
12173         pthread_t t;
12174         int status;
12175         int detach = PTHREAD_CREATE_DETACHED;
12176
12177 #if HAVE_PTHREADS > 4
12178         /* Final pthreads */
12179         pthread_attr_t attr;
12180
12181         status = pthread_attr_init(&attr);
12182         if( status ) return status;
12183
12184 #if HAVE_PTHREADS < 7
12185         status = pthread_attr_setdetachstate(&attr, &detach);
12186         if( status < 0 ) status = errno;
12187 #else
12188         status = pthread_attr_setdetachstate(&attr, detach);
12189 #endif
12190         if( status ) return status;
12191         status = pthread_create( &t, &attr, task, NULL );
12192 #if HAVE_PTHREADS < 7
12193         if( status < 0 ) status = errno;
12194 #endif
12195         if( status ) return status;
12196 #else
12197         /* Draft 4 pthreads */
12198         status = pthread_create( &t, pthread_attr_default, task, NULL );
12199         if( status ) return errno;
12200
12201         /* give thread a chance to complete */
12202         /* it should remain joinable and hence detachable */
12203         sleep( 1 );
12204
12205         status = pthread_detach( &t );
12206         if( status ) return errno;
12207 #endif
12208
12209 #ifdef HAVE_LINUX_THREADS
12210         pthread_kill_other_threads_np();
12211 #endif
12212
12213         return 0;
12214
12215 ; return 0; }
12216 EOF
12217 if { (eval echo configure:12218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12218   rm -rf conftest*
12219   ol_cv_pthread_thread=yes
12220 else
12221   echo "configure: failed program was:" >&5
12222   cat conftest.$ac_ext >&5
12223   rm -rf conftest*
12224   ol_cv_pthread_thread=no
12225 fi
12226 rm -f conftest*
12227 else
12228   cat > conftest.$ac_ext <<EOF
12229 #line 12230 "configure"
12230 #include "confdefs.h"
12231 /* pthread test headers */
12232 #include <pthread.h>
12233 #if HAVE_PTHREADS < 7
12234 #include <errno.h>
12235 #endif
12236 #ifndef NULL
12237 #define NULL (void*)0
12238 #endif
12239
12240 static void *task(p)
12241         void *p;
12242 {
12243         return (void *) (p == NULL);
12244 }
12245
12246
12247 int main(argc, argv)
12248         int argc;
12249         char **argv;
12250 {
12251
12252         /* pthread test function */
12253 #ifndef PTHREAD_CREATE_DETACHED
12254 #define PTHREAD_CREATE_DETACHED 1
12255 #endif
12256         pthread_t t;
12257         int status;
12258         int detach = PTHREAD_CREATE_DETACHED;
12259
12260 #if HAVE_PTHREADS > 4
12261         /* Final pthreads */
12262         pthread_attr_t attr;
12263
12264         status = pthread_attr_init(&attr);
12265         if( status ) return status;
12266
12267 #if HAVE_PTHREADS < 7
12268         status = pthread_attr_setdetachstate(&attr, &detach);
12269         if( status < 0 ) status = errno;
12270 #else
12271         status = pthread_attr_setdetachstate(&attr, detach);
12272 #endif
12273         if( status ) return status;
12274         status = pthread_create( &t, &attr, task, NULL );
12275 #if HAVE_PTHREADS < 7
12276         if( status < 0 ) status = errno;
12277 #endif
12278         if( status ) return status;
12279 #else
12280         /* Draft 4 pthreads */
12281         status = pthread_create( &t, pthread_attr_default, task, NULL );
12282         if( status ) return errno;
12283
12284         /* give thread a chance to complete */
12285         /* it should remain joinable and hence detachable */
12286         sleep( 1 );
12287
12288         status = pthread_detach( &t );
12289         if( status ) return errno;
12290 #endif
12291
12292 #ifdef HAVE_LINUX_THREADS
12293         pthread_kill_other_threads_np();
12294 #endif
12295
12296         return 0;
12297
12298 }
12299
12300 EOF
12301 if { (eval echo configure:12302: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12302 then
12303   ol_cv_pthread_thread=yes
12304 else
12305   echo "configure: failed program was:" >&5
12306   cat conftest.$ac_ext >&5
12307   rm -fr conftest*
12308   ol_cv_pthread_thread=no
12309 fi
12310 rm -fr conftest*
12311 fi
12312
12313
12314                 # restore the LIBS
12315                 LIBS="$ol_LIBS"
12316         
12317 fi
12318
12319 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12320
12321         if test $ol_cv_pthread_thread = yes ; then
12322                 ol_link_pthreads="-thread"
12323                 ol_link_threads=posix
12324         fi
12325 fi
12326
12327
12328                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12329 if test "$ol_link_threads" = no ; then
12330         # try -lpthread -lmach -lexc -lc_r
12331         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12332 echo "configure:12333: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12333 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12334   echo $ac_n "(cached) $ac_c" 1>&6
12335 else
12336   
12337                 # save the flags
12338                 ol_LIBS="$LIBS"
12339                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12340
12341                 if test "$cross_compiling" = yes; then
12342   cat > conftest.$ac_ext <<EOF
12343 #line 12344 "configure"
12344 #include "confdefs.h"
12345 /* pthread test headers */
12346 #include <pthread.h>
12347 #if HAVE_PTHREADS < 7
12348 #include <errno.h>
12349 #endif
12350 #ifndef NULL
12351 #define NULL (void*)0
12352 #endif
12353
12354 static void *task(p)
12355         void *p;
12356 {
12357         return (void *) (p == NULL);
12358 }
12359
12360 int main() {
12361
12362         /* pthread test function */
12363 #ifndef PTHREAD_CREATE_DETACHED
12364 #define PTHREAD_CREATE_DETACHED 1
12365 #endif
12366         pthread_t t;
12367         int status;
12368         int detach = PTHREAD_CREATE_DETACHED;
12369
12370 #if HAVE_PTHREADS > 4
12371         /* Final pthreads */
12372         pthread_attr_t attr;
12373
12374         status = pthread_attr_init(&attr);
12375         if( status ) return status;
12376
12377 #if HAVE_PTHREADS < 7
12378         status = pthread_attr_setdetachstate(&attr, &detach);
12379         if( status < 0 ) status = errno;
12380 #else
12381         status = pthread_attr_setdetachstate(&attr, detach);
12382 #endif
12383         if( status ) return status;
12384         status = pthread_create( &t, &attr, task, NULL );
12385 #if HAVE_PTHREADS < 7
12386         if( status < 0 ) status = errno;
12387 #endif
12388         if( status ) return status;
12389 #else
12390         /* Draft 4 pthreads */
12391         status = pthread_create( &t, pthread_attr_default, task, NULL );
12392         if( status ) return errno;
12393
12394         /* give thread a chance to complete */
12395         /* it should remain joinable and hence detachable */
12396         sleep( 1 );
12397
12398         status = pthread_detach( &t );
12399         if( status ) return errno;
12400 #endif
12401
12402 #ifdef HAVE_LINUX_THREADS
12403         pthread_kill_other_threads_np();
12404 #endif
12405
12406         return 0;
12407
12408 ; return 0; }
12409 EOF
12410 if { (eval echo configure:12411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12411   rm -rf conftest*
12412   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12413 else
12414   echo "configure: failed program was:" >&5
12415   cat conftest.$ac_ext >&5
12416   rm -rf conftest*
12417   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12418 fi
12419 rm -f conftest*
12420 else
12421   cat > conftest.$ac_ext <<EOF
12422 #line 12423 "configure"
12423 #include "confdefs.h"
12424 /* pthread test headers */
12425 #include <pthread.h>
12426 #if HAVE_PTHREADS < 7
12427 #include <errno.h>
12428 #endif
12429 #ifndef NULL
12430 #define NULL (void*)0
12431 #endif
12432
12433 static void *task(p)
12434         void *p;
12435 {
12436         return (void *) (p == NULL);
12437 }
12438
12439
12440 int main(argc, argv)
12441         int argc;
12442         char **argv;
12443 {
12444
12445         /* pthread test function */
12446 #ifndef PTHREAD_CREATE_DETACHED
12447 #define PTHREAD_CREATE_DETACHED 1
12448 #endif
12449         pthread_t t;
12450         int status;
12451         int detach = PTHREAD_CREATE_DETACHED;
12452
12453 #if HAVE_PTHREADS > 4
12454         /* Final pthreads */
12455         pthread_attr_t attr;
12456
12457         status = pthread_attr_init(&attr);
12458         if( status ) return status;
12459
12460 #if HAVE_PTHREADS < 7
12461         status = pthread_attr_setdetachstate(&attr, &detach);
12462         if( status < 0 ) status = errno;
12463 #else
12464         status = pthread_attr_setdetachstate(&attr, detach);
12465 #endif
12466         if( status ) return status;
12467         status = pthread_create( &t, &attr, task, NULL );
12468 #if HAVE_PTHREADS < 7
12469         if( status < 0 ) status = errno;
12470 #endif
12471         if( status ) return status;
12472 #else
12473         /* Draft 4 pthreads */
12474         status = pthread_create( &t, pthread_attr_default, task, NULL );
12475         if( status ) return errno;
12476
12477         /* give thread a chance to complete */
12478         /* it should remain joinable and hence detachable */
12479         sleep( 1 );
12480
12481         status = pthread_detach( &t );
12482         if( status ) return errno;
12483 #endif
12484
12485 #ifdef HAVE_LINUX_THREADS
12486         pthread_kill_other_threads_np();
12487 #endif
12488
12489         return 0;
12490
12491 }
12492
12493 EOF
12494 if { (eval echo configure:12495: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12495 then
12496   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12497 else
12498   echo "configure: failed program was:" >&5
12499   cat conftest.$ac_ext >&5
12500   rm -fr conftest*
12501   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12502 fi
12503 rm -fr conftest*
12504 fi
12505
12506
12507                 # restore the LIBS
12508                 LIBS="$ol_LIBS"
12509         
12510 fi
12511
12512 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12513
12514         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12515                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12516                 ol_link_threads=posix
12517         fi
12518 fi
12519
12520                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12521 if test "$ol_link_threads" = no ; then
12522         # try -lpthread -lmach -lexc
12523         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12524 echo "configure:12525: checking for pthread link with -lpthread -lmach -lexc" >&5
12525 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12526   echo $ac_n "(cached) $ac_c" 1>&6
12527 else
12528   
12529                 # save the flags
12530                 ol_LIBS="$LIBS"
12531                 LIBS="-lpthread -lmach -lexc $LIBS"
12532
12533                 if test "$cross_compiling" = yes; then
12534   cat > conftest.$ac_ext <<EOF
12535 #line 12536 "configure"
12536 #include "confdefs.h"
12537 /* pthread test headers */
12538 #include <pthread.h>
12539 #if HAVE_PTHREADS < 7
12540 #include <errno.h>
12541 #endif
12542 #ifndef NULL
12543 #define NULL (void*)0
12544 #endif
12545
12546 static void *task(p)
12547         void *p;
12548 {
12549         return (void *) (p == NULL);
12550 }
12551
12552 int main() {
12553
12554         /* pthread test function */
12555 #ifndef PTHREAD_CREATE_DETACHED
12556 #define PTHREAD_CREATE_DETACHED 1
12557 #endif
12558         pthread_t t;
12559         int status;
12560         int detach = PTHREAD_CREATE_DETACHED;
12561
12562 #if HAVE_PTHREADS > 4
12563         /* Final pthreads */
12564         pthread_attr_t attr;
12565
12566         status = pthread_attr_init(&attr);
12567         if( status ) return status;
12568
12569 #if HAVE_PTHREADS < 7
12570         status = pthread_attr_setdetachstate(&attr, &detach);
12571         if( status < 0 ) status = errno;
12572 #else
12573         status = pthread_attr_setdetachstate(&attr, detach);
12574 #endif
12575         if( status ) return status;
12576         status = pthread_create( &t, &attr, task, NULL );
12577 #if HAVE_PTHREADS < 7
12578         if( status < 0 ) status = errno;
12579 #endif
12580         if( status ) return status;
12581 #else
12582         /* Draft 4 pthreads */
12583         status = pthread_create( &t, pthread_attr_default, task, NULL );
12584         if( status ) return errno;
12585
12586         /* give thread a chance to complete */
12587         /* it should remain joinable and hence detachable */
12588         sleep( 1 );
12589
12590         status = pthread_detach( &t );
12591         if( status ) return errno;
12592 #endif
12593
12594 #ifdef HAVE_LINUX_THREADS
12595         pthread_kill_other_threads_np();
12596 #endif
12597
12598         return 0;
12599
12600 ; return 0; }
12601 EOF
12602 if { (eval echo configure:12603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12603   rm -rf conftest*
12604   ol_cv_pthread_lpthread_lmach_lexc=yes
12605 else
12606   echo "configure: failed program was:" >&5
12607   cat conftest.$ac_ext >&5
12608   rm -rf conftest*
12609   ol_cv_pthread_lpthread_lmach_lexc=no
12610 fi
12611 rm -f conftest*
12612 else
12613   cat > conftest.$ac_ext <<EOF
12614 #line 12615 "configure"
12615 #include "confdefs.h"
12616 /* pthread test headers */
12617 #include <pthread.h>
12618 #if HAVE_PTHREADS < 7
12619 #include <errno.h>
12620 #endif
12621 #ifndef NULL
12622 #define NULL (void*)0
12623 #endif
12624
12625 static void *task(p)
12626         void *p;
12627 {
12628         return (void *) (p == NULL);
12629 }
12630
12631
12632 int main(argc, argv)
12633         int argc;
12634         char **argv;
12635 {
12636
12637         /* pthread test function */
12638 #ifndef PTHREAD_CREATE_DETACHED
12639 #define PTHREAD_CREATE_DETACHED 1
12640 #endif
12641         pthread_t t;
12642         int status;
12643         int detach = PTHREAD_CREATE_DETACHED;
12644
12645 #if HAVE_PTHREADS > 4
12646         /* Final pthreads */
12647         pthread_attr_t attr;
12648
12649         status = pthread_attr_init(&attr);
12650         if( status ) return status;
12651
12652 #if HAVE_PTHREADS < 7
12653         status = pthread_attr_setdetachstate(&attr, &detach);
12654         if( status < 0 ) status = errno;
12655 #else
12656         status = pthread_attr_setdetachstate(&attr, detach);
12657 #endif
12658         if( status ) return status;
12659         status = pthread_create( &t, &attr, task, NULL );
12660 #if HAVE_PTHREADS < 7
12661         if( status < 0 ) status = errno;
12662 #endif
12663         if( status ) return status;
12664 #else
12665         /* Draft 4 pthreads */
12666         status = pthread_create( &t, pthread_attr_default, task, NULL );
12667         if( status ) return errno;
12668
12669         /* give thread a chance to complete */
12670         /* it should remain joinable and hence detachable */
12671         sleep( 1 );
12672
12673         status = pthread_detach( &t );
12674         if( status ) return errno;
12675 #endif
12676
12677 #ifdef HAVE_LINUX_THREADS
12678         pthread_kill_other_threads_np();
12679 #endif
12680
12681         return 0;
12682
12683 }
12684
12685 EOF
12686 if { (eval echo configure:12687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12687 then
12688   ol_cv_pthread_lpthread_lmach_lexc=yes
12689 else
12690   echo "configure: failed program was:" >&5
12691   cat conftest.$ac_ext >&5
12692   rm -fr conftest*
12693   ol_cv_pthread_lpthread_lmach_lexc=no
12694 fi
12695 rm -fr conftest*
12696 fi
12697
12698
12699                 # restore the LIBS
12700                 LIBS="$ol_LIBS"
12701         
12702 fi
12703
12704 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
12705
12706         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
12707                 ol_link_pthreads="-lpthread -lmach -lexc"
12708                 ol_link_threads=posix
12709         fi
12710 fi
12711
12712
12713                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
12714 if test "$ol_link_threads" = no ; then
12715         # try -lpthread -Wl,-woff,85
12716         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
12717 echo "configure:12718: checking for pthread link with -lpthread -Wl,-woff,85" >&5
12718 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
12719   echo $ac_n "(cached) $ac_c" 1>&6
12720 else
12721   
12722                 # save the flags
12723                 ol_LIBS="$LIBS"
12724                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
12725
12726                 if test "$cross_compiling" = yes; then
12727   cat > conftest.$ac_ext <<EOF
12728 #line 12729 "configure"
12729 #include "confdefs.h"
12730 /* pthread test headers */
12731 #include <pthread.h>
12732 #if HAVE_PTHREADS < 7
12733 #include <errno.h>
12734 #endif
12735 #ifndef NULL
12736 #define NULL (void*)0
12737 #endif
12738
12739 static void *task(p)
12740         void *p;
12741 {
12742         return (void *) (p == NULL);
12743 }
12744
12745 int main() {
12746
12747         /* pthread test function */
12748 #ifndef PTHREAD_CREATE_DETACHED
12749 #define PTHREAD_CREATE_DETACHED 1
12750 #endif
12751         pthread_t t;
12752         int status;
12753         int detach = PTHREAD_CREATE_DETACHED;
12754
12755 #if HAVE_PTHREADS > 4
12756         /* Final pthreads */
12757         pthread_attr_t attr;
12758
12759         status = pthread_attr_init(&attr);
12760         if( status ) return status;
12761
12762 #if HAVE_PTHREADS < 7
12763         status = pthread_attr_setdetachstate(&attr, &detach);
12764         if( status < 0 ) status = errno;
12765 #else
12766         status = pthread_attr_setdetachstate(&attr, detach);
12767 #endif
12768         if( status ) return status;
12769         status = pthread_create( &t, &attr, task, NULL );
12770 #if HAVE_PTHREADS < 7
12771         if( status < 0 ) status = errno;
12772 #endif
12773         if( status ) return status;
12774 #else
12775         /* Draft 4 pthreads */
12776         status = pthread_create( &t, pthread_attr_default, task, NULL );
12777         if( status ) return errno;
12778
12779         /* give thread a chance to complete */
12780         /* it should remain joinable and hence detachable */
12781         sleep( 1 );
12782
12783         status = pthread_detach( &t );
12784         if( status ) return errno;
12785 #endif
12786
12787 #ifdef HAVE_LINUX_THREADS
12788         pthread_kill_other_threads_np();
12789 #endif
12790
12791         return 0;
12792
12793 ; return 0; }
12794 EOF
12795 if { (eval echo configure:12796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12796   rm -rf conftest*
12797   ol_cv_pthread_lib_lpthread_woff=yes
12798 else
12799   echo "configure: failed program was:" >&5
12800   cat conftest.$ac_ext >&5
12801   rm -rf conftest*
12802   ol_cv_pthread_lib_lpthread_woff=no
12803 fi
12804 rm -f conftest*
12805 else
12806   cat > conftest.$ac_ext <<EOF
12807 #line 12808 "configure"
12808 #include "confdefs.h"
12809 /* pthread test headers */
12810 #include <pthread.h>
12811 #if HAVE_PTHREADS < 7
12812 #include <errno.h>
12813 #endif
12814 #ifndef NULL
12815 #define NULL (void*)0
12816 #endif
12817
12818 static void *task(p)
12819         void *p;
12820 {
12821         return (void *) (p == NULL);
12822 }
12823
12824
12825 int main(argc, argv)
12826         int argc;
12827         char **argv;
12828 {
12829
12830         /* pthread test function */
12831 #ifndef PTHREAD_CREATE_DETACHED
12832 #define PTHREAD_CREATE_DETACHED 1
12833 #endif
12834         pthread_t t;
12835         int status;
12836         int detach = PTHREAD_CREATE_DETACHED;
12837
12838 #if HAVE_PTHREADS > 4
12839         /* Final pthreads */
12840         pthread_attr_t attr;
12841
12842         status = pthread_attr_init(&attr);
12843         if( status ) return status;
12844
12845 #if HAVE_PTHREADS < 7
12846         status = pthread_attr_setdetachstate(&attr, &detach);
12847         if( status < 0 ) status = errno;
12848 #else
12849         status = pthread_attr_setdetachstate(&attr, detach);
12850 #endif
12851         if( status ) return status;
12852         status = pthread_create( &t, &attr, task, NULL );
12853 #if HAVE_PTHREADS < 7
12854         if( status < 0 ) status = errno;
12855 #endif
12856         if( status ) return status;
12857 #else
12858         /* Draft 4 pthreads */
12859         status = pthread_create( &t, pthread_attr_default, task, NULL );
12860         if( status ) return errno;
12861
12862         /* give thread a chance to complete */
12863         /* it should remain joinable and hence detachable */
12864         sleep( 1 );
12865
12866         status = pthread_detach( &t );
12867         if( status ) return errno;
12868 #endif
12869
12870 #ifdef HAVE_LINUX_THREADS
12871         pthread_kill_other_threads_np();
12872 #endif
12873
12874         return 0;
12875
12876 }
12877
12878 EOF
12879 if { (eval echo configure:12880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12880 then
12881   ol_cv_pthread_lib_lpthread_woff=yes
12882 else
12883   echo "configure: failed program was:" >&5
12884   cat conftest.$ac_ext >&5
12885   rm -fr conftest*
12886   ol_cv_pthread_lib_lpthread_woff=no
12887 fi
12888 rm -fr conftest*
12889 fi
12890
12891
12892                 # restore the LIBS
12893                 LIBS="$ol_LIBS"
12894         
12895 fi
12896
12897 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
12898
12899         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
12900                 ol_link_pthreads="-lpthread -Wl,-woff,85"
12901                 ol_link_threads=posix
12902         fi
12903 fi
12904
12905
12906                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
12907 if test "$ol_link_threads" = no ; then
12908         # try -lpthread
12909         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
12910 echo "configure:12911: checking for pthread link with -lpthread" >&5
12911 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
12912   echo $ac_n "(cached) $ac_c" 1>&6
12913 else
12914   
12915                 # save the flags
12916                 ol_LIBS="$LIBS"
12917                 LIBS="-lpthread $LIBS"
12918
12919                 if test "$cross_compiling" = yes; then
12920   cat > conftest.$ac_ext <<EOF
12921 #line 12922 "configure"
12922 #include "confdefs.h"
12923 /* pthread test headers */
12924 #include <pthread.h>
12925 #if HAVE_PTHREADS < 7
12926 #include <errno.h>
12927 #endif
12928 #ifndef NULL
12929 #define NULL (void*)0
12930 #endif
12931
12932 static void *task(p)
12933         void *p;
12934 {
12935         return (void *) (p == NULL);
12936 }
12937
12938 int main() {
12939
12940         /* pthread test function */
12941 #ifndef PTHREAD_CREATE_DETACHED
12942 #define PTHREAD_CREATE_DETACHED 1
12943 #endif
12944         pthread_t t;
12945         int status;
12946         int detach = PTHREAD_CREATE_DETACHED;
12947
12948 #if HAVE_PTHREADS > 4
12949         /* Final pthreads */
12950         pthread_attr_t attr;
12951
12952         status = pthread_attr_init(&attr);
12953         if( status ) return status;
12954
12955 #if HAVE_PTHREADS < 7
12956         status = pthread_attr_setdetachstate(&attr, &detach);
12957         if( status < 0 ) status = errno;
12958 #else
12959         status = pthread_attr_setdetachstate(&attr, detach);
12960 #endif
12961         if( status ) return status;
12962         status = pthread_create( &t, &attr, task, NULL );
12963 #if HAVE_PTHREADS < 7
12964         if( status < 0 ) status = errno;
12965 #endif
12966         if( status ) return status;
12967 #else
12968         /* Draft 4 pthreads */
12969         status = pthread_create( &t, pthread_attr_default, task, NULL );
12970         if( status ) return errno;
12971
12972         /* give thread a chance to complete */
12973         /* it should remain joinable and hence detachable */
12974         sleep( 1 );
12975
12976         status = pthread_detach( &t );
12977         if( status ) return errno;
12978 #endif
12979
12980 #ifdef HAVE_LINUX_THREADS
12981         pthread_kill_other_threads_np();
12982 #endif
12983
12984         return 0;
12985
12986 ; return 0; }
12987 EOF
12988 if { (eval echo configure:12989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12989   rm -rf conftest*
12990   ol_cv_pthread_lpthread=yes
12991 else
12992   echo "configure: failed program was:" >&5
12993   cat conftest.$ac_ext >&5
12994   rm -rf conftest*
12995   ol_cv_pthread_lpthread=no
12996 fi
12997 rm -f conftest*
12998 else
12999   cat > conftest.$ac_ext <<EOF
13000 #line 13001 "configure"
13001 #include "confdefs.h"
13002 /* pthread test headers */
13003 #include <pthread.h>
13004 #if HAVE_PTHREADS < 7
13005 #include <errno.h>
13006 #endif
13007 #ifndef NULL
13008 #define NULL (void*)0
13009 #endif
13010
13011 static void *task(p)
13012         void *p;
13013 {
13014         return (void *) (p == NULL);
13015 }
13016
13017
13018 int main(argc, argv)
13019         int argc;
13020         char **argv;
13021 {
13022
13023         /* pthread test function */
13024 #ifndef PTHREAD_CREATE_DETACHED
13025 #define PTHREAD_CREATE_DETACHED 1
13026 #endif
13027         pthread_t t;
13028         int status;
13029         int detach = PTHREAD_CREATE_DETACHED;
13030
13031 #if HAVE_PTHREADS > 4
13032         /* Final pthreads */
13033         pthread_attr_t attr;
13034
13035         status = pthread_attr_init(&attr);
13036         if( status ) return status;
13037
13038 #if HAVE_PTHREADS < 7
13039         status = pthread_attr_setdetachstate(&attr, &detach);
13040         if( status < 0 ) status = errno;
13041 #else
13042         status = pthread_attr_setdetachstate(&attr, detach);
13043 #endif
13044         if( status ) return status;
13045         status = pthread_create( &t, &attr, task, NULL );
13046 #if HAVE_PTHREADS < 7
13047         if( status < 0 ) status = errno;
13048 #endif
13049         if( status ) return status;
13050 #else
13051         /* Draft 4 pthreads */
13052         status = pthread_create( &t, pthread_attr_default, task, NULL );
13053         if( status ) return errno;
13054
13055         /* give thread a chance to complete */
13056         /* it should remain joinable and hence detachable */
13057         sleep( 1 );
13058
13059         status = pthread_detach( &t );
13060         if( status ) return errno;
13061 #endif
13062
13063 #ifdef HAVE_LINUX_THREADS
13064         pthread_kill_other_threads_np();
13065 #endif
13066
13067         return 0;
13068
13069 }
13070
13071 EOF
13072 if { (eval echo configure:13073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13073 then
13074   ol_cv_pthread_lpthread=yes
13075 else
13076   echo "configure: failed program was:" >&5
13077   cat conftest.$ac_ext >&5
13078   rm -fr conftest*
13079   ol_cv_pthread_lpthread=no
13080 fi
13081 rm -fr conftest*
13082 fi
13083
13084
13085                 # restore the LIBS
13086                 LIBS="$ol_LIBS"
13087         
13088 fi
13089
13090 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13091
13092         if test $ol_cv_pthread_lpthread = yes ; then
13093                 ol_link_pthreads="-lpthread"
13094                 ol_link_threads=posix
13095         fi
13096 fi
13097
13098                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13099 if test "$ol_link_threads" = no ; then
13100         # try -lc_r
13101         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13102 echo "configure:13103: checking for pthread link with -lc_r" >&5
13103 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13104   echo $ac_n "(cached) $ac_c" 1>&6
13105 else
13106   
13107                 # save the flags
13108                 ol_LIBS="$LIBS"
13109                 LIBS="-lc_r $LIBS"
13110
13111                 if test "$cross_compiling" = yes; then
13112   cat > conftest.$ac_ext <<EOF
13113 #line 13114 "configure"
13114 #include "confdefs.h"
13115 /* pthread test headers */
13116 #include <pthread.h>
13117 #if HAVE_PTHREADS < 7
13118 #include <errno.h>
13119 #endif
13120 #ifndef NULL
13121 #define NULL (void*)0
13122 #endif
13123
13124 static void *task(p)
13125         void *p;
13126 {
13127         return (void *) (p == NULL);
13128 }
13129
13130 int main() {
13131
13132         /* pthread test function */
13133 #ifndef PTHREAD_CREATE_DETACHED
13134 #define PTHREAD_CREATE_DETACHED 1
13135 #endif
13136         pthread_t t;
13137         int status;
13138         int detach = PTHREAD_CREATE_DETACHED;
13139
13140 #if HAVE_PTHREADS > 4
13141         /* Final pthreads */
13142         pthread_attr_t attr;
13143
13144         status = pthread_attr_init(&attr);
13145         if( status ) return status;
13146
13147 #if HAVE_PTHREADS < 7
13148         status = pthread_attr_setdetachstate(&attr, &detach);
13149         if( status < 0 ) status = errno;
13150 #else
13151         status = pthread_attr_setdetachstate(&attr, detach);
13152 #endif
13153         if( status ) return status;
13154         status = pthread_create( &t, &attr, task, NULL );
13155 #if HAVE_PTHREADS < 7
13156         if( status < 0 ) status = errno;
13157 #endif
13158         if( status ) return status;
13159 #else
13160         /* Draft 4 pthreads */
13161         status = pthread_create( &t, pthread_attr_default, task, NULL );
13162         if( status ) return errno;
13163
13164         /* give thread a chance to complete */
13165         /* it should remain joinable and hence detachable */
13166         sleep( 1 );
13167
13168         status = pthread_detach( &t );
13169         if( status ) return errno;
13170 #endif
13171
13172 #ifdef HAVE_LINUX_THREADS
13173         pthread_kill_other_threads_np();
13174 #endif
13175
13176         return 0;
13177
13178 ; return 0; }
13179 EOF
13180 if { (eval echo configure:13181: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13181   rm -rf conftest*
13182   ol_cv_pthread_lc_r=yes
13183 else
13184   echo "configure: failed program was:" >&5
13185   cat conftest.$ac_ext >&5
13186   rm -rf conftest*
13187   ol_cv_pthread_lc_r=no
13188 fi
13189 rm -f conftest*
13190 else
13191   cat > conftest.$ac_ext <<EOF
13192 #line 13193 "configure"
13193 #include "confdefs.h"
13194 /* pthread test headers */
13195 #include <pthread.h>
13196 #if HAVE_PTHREADS < 7
13197 #include <errno.h>
13198 #endif
13199 #ifndef NULL
13200 #define NULL (void*)0
13201 #endif
13202
13203 static void *task(p)
13204         void *p;
13205 {
13206         return (void *) (p == NULL);
13207 }
13208
13209
13210 int main(argc, argv)
13211         int argc;
13212         char **argv;
13213 {
13214
13215         /* pthread test function */
13216 #ifndef PTHREAD_CREATE_DETACHED
13217 #define PTHREAD_CREATE_DETACHED 1
13218 #endif
13219         pthread_t t;
13220         int status;
13221         int detach = PTHREAD_CREATE_DETACHED;
13222
13223 #if HAVE_PTHREADS > 4
13224         /* Final pthreads */
13225         pthread_attr_t attr;
13226
13227         status = pthread_attr_init(&attr);
13228         if( status ) return status;
13229
13230 #if HAVE_PTHREADS < 7
13231         status = pthread_attr_setdetachstate(&attr, &detach);
13232         if( status < 0 ) status = errno;
13233 #else
13234         status = pthread_attr_setdetachstate(&attr, detach);
13235 #endif
13236         if( status ) return status;
13237         status = pthread_create( &t, &attr, task, NULL );
13238 #if HAVE_PTHREADS < 7
13239         if( status < 0 ) status = errno;
13240 #endif
13241         if( status ) return status;
13242 #else
13243         /* Draft 4 pthreads */
13244         status = pthread_create( &t, pthread_attr_default, task, NULL );
13245         if( status ) return errno;
13246
13247         /* give thread a chance to complete */
13248         /* it should remain joinable and hence detachable */
13249         sleep( 1 );
13250
13251         status = pthread_detach( &t );
13252         if( status ) return errno;
13253 #endif
13254
13255 #ifdef HAVE_LINUX_THREADS
13256         pthread_kill_other_threads_np();
13257 #endif
13258
13259         return 0;
13260
13261 }
13262
13263 EOF
13264 if { (eval echo configure:13265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13265 then
13266   ol_cv_pthread_lc_r=yes
13267 else
13268   echo "configure: failed program was:" >&5
13269   cat conftest.$ac_ext >&5
13270   rm -fr conftest*
13271   ol_cv_pthread_lc_r=no
13272 fi
13273 rm -fr conftest*
13274 fi
13275
13276
13277                 # restore the LIBS
13278                 LIBS="$ol_LIBS"
13279         
13280 fi
13281
13282 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13283
13284         if test $ol_cv_pthread_lc_r = yes ; then
13285                 ol_link_pthreads="-lc_r"
13286                 ol_link_threads=posix
13287         fi
13288 fi
13289
13290
13291                 # Pthread try link: -threads (ol_cv_pthread_threads)
13292 if test "$ol_link_threads" = no ; then
13293         # try -threads
13294         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13295 echo "configure:13296: checking for pthread link with -threads" >&5
13296 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13297   echo $ac_n "(cached) $ac_c" 1>&6
13298 else
13299   
13300                 # save the flags
13301                 ol_LIBS="$LIBS"
13302                 LIBS="-threads $LIBS"
13303
13304                 if test "$cross_compiling" = yes; then
13305   cat > conftest.$ac_ext <<EOF
13306 #line 13307 "configure"
13307 #include "confdefs.h"
13308 /* pthread test headers */
13309 #include <pthread.h>
13310 #if HAVE_PTHREADS < 7
13311 #include <errno.h>
13312 #endif
13313 #ifndef NULL
13314 #define NULL (void*)0
13315 #endif
13316
13317 static void *task(p)
13318         void *p;
13319 {
13320         return (void *) (p == NULL);
13321 }
13322
13323 int main() {
13324
13325         /* pthread test function */
13326 #ifndef PTHREAD_CREATE_DETACHED
13327 #define PTHREAD_CREATE_DETACHED 1
13328 #endif
13329         pthread_t t;
13330         int status;
13331         int detach = PTHREAD_CREATE_DETACHED;
13332
13333 #if HAVE_PTHREADS > 4
13334         /* Final pthreads */
13335         pthread_attr_t attr;
13336
13337         status = pthread_attr_init(&attr);
13338         if( status ) return status;
13339
13340 #if HAVE_PTHREADS < 7
13341         status = pthread_attr_setdetachstate(&attr, &detach);
13342         if( status < 0 ) status = errno;
13343 #else
13344         status = pthread_attr_setdetachstate(&attr, detach);
13345 #endif
13346         if( status ) return status;
13347         status = pthread_create( &t, &attr, task, NULL );
13348 #if HAVE_PTHREADS < 7
13349         if( status < 0 ) status = errno;
13350 #endif
13351         if( status ) return status;
13352 #else
13353         /* Draft 4 pthreads */
13354         status = pthread_create( &t, pthread_attr_default, task, NULL );
13355         if( status ) return errno;
13356
13357         /* give thread a chance to complete */
13358         /* it should remain joinable and hence detachable */
13359         sleep( 1 );
13360
13361         status = pthread_detach( &t );
13362         if( status ) return errno;
13363 #endif
13364
13365 #ifdef HAVE_LINUX_THREADS
13366         pthread_kill_other_threads_np();
13367 #endif
13368
13369         return 0;
13370
13371 ; return 0; }
13372 EOF
13373 if { (eval echo configure:13374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13374   rm -rf conftest*
13375   ol_cv_pthread_threads=yes
13376 else
13377   echo "configure: failed program was:" >&5
13378   cat conftest.$ac_ext >&5
13379   rm -rf conftest*
13380   ol_cv_pthread_threads=no
13381 fi
13382 rm -f conftest*
13383 else
13384   cat > conftest.$ac_ext <<EOF
13385 #line 13386 "configure"
13386 #include "confdefs.h"
13387 /* pthread test headers */
13388 #include <pthread.h>
13389 #if HAVE_PTHREADS < 7
13390 #include <errno.h>
13391 #endif
13392 #ifndef NULL
13393 #define NULL (void*)0
13394 #endif
13395
13396 static void *task(p)
13397         void *p;
13398 {
13399         return (void *) (p == NULL);
13400 }
13401
13402
13403 int main(argc, argv)
13404         int argc;
13405         char **argv;
13406 {
13407
13408         /* pthread test function */
13409 #ifndef PTHREAD_CREATE_DETACHED
13410 #define PTHREAD_CREATE_DETACHED 1
13411 #endif
13412         pthread_t t;
13413         int status;
13414         int detach = PTHREAD_CREATE_DETACHED;
13415
13416 #if HAVE_PTHREADS > 4
13417         /* Final pthreads */
13418         pthread_attr_t attr;
13419
13420         status = pthread_attr_init(&attr);
13421         if( status ) return status;
13422
13423 #if HAVE_PTHREADS < 7
13424         status = pthread_attr_setdetachstate(&attr, &detach);
13425         if( status < 0 ) status = errno;
13426 #else
13427         status = pthread_attr_setdetachstate(&attr, detach);
13428 #endif
13429         if( status ) return status;
13430         status = pthread_create( &t, &attr, task, NULL );
13431 #if HAVE_PTHREADS < 7
13432         if( status < 0 ) status = errno;
13433 #endif
13434         if( status ) return status;
13435 #else
13436         /* Draft 4 pthreads */
13437         status = pthread_create( &t, pthread_attr_default, task, NULL );
13438         if( status ) return errno;
13439
13440         /* give thread a chance to complete */
13441         /* it should remain joinable and hence detachable */
13442         sleep( 1 );
13443
13444         status = pthread_detach( &t );
13445         if( status ) return errno;
13446 #endif
13447
13448 #ifdef HAVE_LINUX_THREADS
13449         pthread_kill_other_threads_np();
13450 #endif
13451
13452         return 0;
13453
13454 }
13455
13456 EOF
13457 if { (eval echo configure:13458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13458 then
13459   ol_cv_pthread_threads=yes
13460 else
13461   echo "configure: failed program was:" >&5
13462   cat conftest.$ac_ext >&5
13463   rm -fr conftest*
13464   ol_cv_pthread_threads=no
13465 fi
13466 rm -fr conftest*
13467 fi
13468
13469
13470                 # restore the LIBS
13471                 LIBS="$ol_LIBS"
13472         
13473 fi
13474
13475 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13476
13477         if test $ol_cv_pthread_threads = yes ; then
13478                 ol_link_pthreads="-threads"
13479                 ol_link_threads=posix
13480         fi
13481 fi
13482
13483
13484                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13485 if test "$ol_link_threads" = no ; then
13486         # try -lpthreads -lmach -lexc -lc_r
13487         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13488 echo "configure:13489: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13489 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13490   echo $ac_n "(cached) $ac_c" 1>&6
13491 else
13492   
13493                 # save the flags
13494                 ol_LIBS="$LIBS"
13495                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13496
13497                 if test "$cross_compiling" = yes; then
13498   cat > conftest.$ac_ext <<EOF
13499 #line 13500 "configure"
13500 #include "confdefs.h"
13501 /* pthread test headers */
13502 #include <pthread.h>
13503 #if HAVE_PTHREADS < 7
13504 #include <errno.h>
13505 #endif
13506 #ifndef NULL
13507 #define NULL (void*)0
13508 #endif
13509
13510 static void *task(p)
13511         void *p;
13512 {
13513         return (void *) (p == NULL);
13514 }
13515
13516 int main() {
13517
13518         /* pthread test function */
13519 #ifndef PTHREAD_CREATE_DETACHED
13520 #define PTHREAD_CREATE_DETACHED 1
13521 #endif
13522         pthread_t t;
13523         int status;
13524         int detach = PTHREAD_CREATE_DETACHED;
13525
13526 #if HAVE_PTHREADS > 4
13527         /* Final pthreads */
13528         pthread_attr_t attr;
13529
13530         status = pthread_attr_init(&attr);
13531         if( status ) return status;
13532
13533 #if HAVE_PTHREADS < 7
13534         status = pthread_attr_setdetachstate(&attr, &detach);
13535         if( status < 0 ) status = errno;
13536 #else
13537         status = pthread_attr_setdetachstate(&attr, detach);
13538 #endif
13539         if( status ) return status;
13540         status = pthread_create( &t, &attr, task, NULL );
13541 #if HAVE_PTHREADS < 7
13542         if( status < 0 ) status = errno;
13543 #endif
13544         if( status ) return status;
13545 #else
13546         /* Draft 4 pthreads */
13547         status = pthread_create( &t, pthread_attr_default, task, NULL );
13548         if( status ) return errno;
13549
13550         /* give thread a chance to complete */
13551         /* it should remain joinable and hence detachable */
13552         sleep( 1 );
13553
13554         status = pthread_detach( &t );
13555         if( status ) return errno;
13556 #endif
13557
13558 #ifdef HAVE_LINUX_THREADS
13559         pthread_kill_other_threads_np();
13560 #endif
13561
13562         return 0;
13563
13564 ; return 0; }
13565 EOF
13566 if { (eval echo configure:13567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13567   rm -rf conftest*
13568   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13569 else
13570   echo "configure: failed program was:" >&5
13571   cat conftest.$ac_ext >&5
13572   rm -rf conftest*
13573   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13574 fi
13575 rm -f conftest*
13576 else
13577   cat > conftest.$ac_ext <<EOF
13578 #line 13579 "configure"
13579 #include "confdefs.h"
13580 /* pthread test headers */
13581 #include <pthread.h>
13582 #if HAVE_PTHREADS < 7
13583 #include <errno.h>
13584 #endif
13585 #ifndef NULL
13586 #define NULL (void*)0
13587 #endif
13588
13589 static void *task(p)
13590         void *p;
13591 {
13592         return (void *) (p == NULL);
13593 }
13594
13595
13596 int main(argc, argv)
13597         int argc;
13598         char **argv;
13599 {
13600
13601         /* pthread test function */
13602 #ifndef PTHREAD_CREATE_DETACHED
13603 #define PTHREAD_CREATE_DETACHED 1
13604 #endif
13605         pthread_t t;
13606         int status;
13607         int detach = PTHREAD_CREATE_DETACHED;
13608
13609 #if HAVE_PTHREADS > 4
13610         /* Final pthreads */
13611         pthread_attr_t attr;
13612
13613         status = pthread_attr_init(&attr);
13614         if( status ) return status;
13615
13616 #if HAVE_PTHREADS < 7
13617         status = pthread_attr_setdetachstate(&attr, &detach);
13618         if( status < 0 ) status = errno;
13619 #else
13620         status = pthread_attr_setdetachstate(&attr, detach);
13621 #endif
13622         if( status ) return status;
13623         status = pthread_create( &t, &attr, task, NULL );
13624 #if HAVE_PTHREADS < 7
13625         if( status < 0 ) status = errno;
13626 #endif
13627         if( status ) return status;
13628 #else
13629         /* Draft 4 pthreads */
13630         status = pthread_create( &t, pthread_attr_default, task, NULL );
13631         if( status ) return errno;
13632
13633         /* give thread a chance to complete */
13634         /* it should remain joinable and hence detachable */
13635         sleep( 1 );
13636
13637         status = pthread_detach( &t );
13638         if( status ) return errno;
13639 #endif
13640
13641 #ifdef HAVE_LINUX_THREADS
13642         pthread_kill_other_threads_np();
13643 #endif
13644
13645         return 0;
13646
13647 }
13648
13649 EOF
13650 if { (eval echo configure:13651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13651 then
13652   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13653 else
13654   echo "configure: failed program was:" >&5
13655   cat conftest.$ac_ext >&5
13656   rm -fr conftest*
13657   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13658 fi
13659 rm -fr conftest*
13660 fi
13661
13662
13663                 # restore the LIBS
13664                 LIBS="$ol_LIBS"
13665         
13666 fi
13667
13668 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
13669
13670         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
13671                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
13672                 ol_link_threads=posix
13673         fi
13674 fi
13675
13676                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
13677 if test "$ol_link_threads" = no ; then
13678         # try -lpthreads -lmach -lexc
13679         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
13680 echo "configure:13681: checking for pthread link with -lpthreads -lmach -lexc" >&5
13681 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
13682   echo $ac_n "(cached) $ac_c" 1>&6
13683 else
13684   
13685                 # save the flags
13686                 ol_LIBS="$LIBS"
13687                 LIBS="-lpthreads -lmach -lexc $LIBS"
13688
13689                 if test "$cross_compiling" = yes; then
13690   cat > conftest.$ac_ext <<EOF
13691 #line 13692 "configure"
13692 #include "confdefs.h"
13693 /* pthread test headers */
13694 #include <pthread.h>
13695 #if HAVE_PTHREADS < 7
13696 #include <errno.h>
13697 #endif
13698 #ifndef NULL
13699 #define NULL (void*)0
13700 #endif
13701
13702 static void *task(p)
13703         void *p;
13704 {
13705         return (void *) (p == NULL);
13706 }
13707
13708 int main() {
13709
13710         /* pthread test function */
13711 #ifndef PTHREAD_CREATE_DETACHED
13712 #define PTHREAD_CREATE_DETACHED 1
13713 #endif
13714         pthread_t t;
13715         int status;
13716         int detach = PTHREAD_CREATE_DETACHED;
13717
13718 #if HAVE_PTHREADS > 4
13719         /* Final pthreads */
13720         pthread_attr_t attr;
13721
13722         status = pthread_attr_init(&attr);
13723         if( status ) return status;
13724
13725 #if HAVE_PTHREADS < 7
13726         status = pthread_attr_setdetachstate(&attr, &detach);
13727         if( status < 0 ) status = errno;
13728 #else
13729         status = pthread_attr_setdetachstate(&attr, detach);
13730 #endif
13731         if( status ) return status;
13732         status = pthread_create( &t, &attr, task, NULL );
13733 #if HAVE_PTHREADS < 7
13734         if( status < 0 ) status = errno;
13735 #endif
13736         if( status ) return status;
13737 #else
13738         /* Draft 4 pthreads */
13739         status = pthread_create( &t, pthread_attr_default, task, NULL );
13740         if( status ) return errno;
13741
13742         /* give thread a chance to complete */
13743         /* it should remain joinable and hence detachable */
13744         sleep( 1 );
13745
13746         status = pthread_detach( &t );
13747         if( status ) return errno;
13748 #endif
13749
13750 #ifdef HAVE_LINUX_THREADS
13751         pthread_kill_other_threads_np();
13752 #endif
13753
13754         return 0;
13755
13756 ; return 0; }
13757 EOF
13758 if { (eval echo configure:13759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13759   rm -rf conftest*
13760   ol_cv_pthread_lpthreads_lmach_lexc=yes
13761 else
13762   echo "configure: failed program was:" >&5
13763   cat conftest.$ac_ext >&5
13764   rm -rf conftest*
13765   ol_cv_pthread_lpthreads_lmach_lexc=no
13766 fi
13767 rm -f conftest*
13768 else
13769   cat > conftest.$ac_ext <<EOF
13770 #line 13771 "configure"
13771 #include "confdefs.h"
13772 /* pthread test headers */
13773 #include <pthread.h>
13774 #if HAVE_PTHREADS < 7
13775 #include <errno.h>
13776 #endif
13777 #ifndef NULL
13778 #define NULL (void*)0
13779 #endif
13780
13781 static void *task(p)
13782         void *p;
13783 {
13784         return (void *) (p == NULL);
13785 }
13786
13787
13788 int main(argc, argv)
13789         int argc;
13790         char **argv;
13791 {
13792
13793         /* pthread test function */
13794 #ifndef PTHREAD_CREATE_DETACHED
13795 #define PTHREAD_CREATE_DETACHED 1
13796 #endif
13797         pthread_t t;
13798         int status;
13799         int detach = PTHREAD_CREATE_DETACHED;
13800
13801 #if HAVE_PTHREADS > 4
13802         /* Final pthreads */
13803         pthread_attr_t attr;
13804
13805         status = pthread_attr_init(&attr);
13806         if( status ) return status;
13807
13808 #if HAVE_PTHREADS < 7
13809         status = pthread_attr_setdetachstate(&attr, &detach);
13810         if( status < 0 ) status = errno;
13811 #else
13812         status = pthread_attr_setdetachstate(&attr, detach);
13813 #endif
13814         if( status ) return status;
13815         status = pthread_create( &t, &attr, task, NULL );
13816 #if HAVE_PTHREADS < 7
13817         if( status < 0 ) status = errno;
13818 #endif
13819         if( status ) return status;
13820 #else
13821         /* Draft 4 pthreads */
13822         status = pthread_create( &t, pthread_attr_default, task, NULL );
13823         if( status ) return errno;
13824
13825         /* give thread a chance to complete */
13826         /* it should remain joinable and hence detachable */
13827         sleep( 1 );
13828
13829         status = pthread_detach( &t );
13830         if( status ) return errno;
13831 #endif
13832
13833 #ifdef HAVE_LINUX_THREADS
13834         pthread_kill_other_threads_np();
13835 #endif
13836
13837         return 0;
13838
13839 }
13840
13841 EOF
13842 if { (eval echo configure:13843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13843 then
13844   ol_cv_pthread_lpthreads_lmach_lexc=yes
13845 else
13846   echo "configure: failed program was:" >&5
13847   cat conftest.$ac_ext >&5
13848   rm -fr conftest*
13849   ol_cv_pthread_lpthreads_lmach_lexc=no
13850 fi
13851 rm -fr conftest*
13852 fi
13853
13854
13855                 # restore the LIBS
13856                 LIBS="$ol_LIBS"
13857         
13858 fi
13859
13860 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
13861
13862         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
13863                 ol_link_pthreads="-lpthreads -lmach -lexc"
13864                 ol_link_threads=posix
13865         fi
13866 fi
13867
13868                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
13869 if test "$ol_link_threads" = no ; then
13870         # try -lpthreads -lexc
13871         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
13872 echo "configure:13873: checking for pthread link with -lpthreads -lexc" >&5
13873 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
13874   echo $ac_n "(cached) $ac_c" 1>&6
13875 else
13876   
13877                 # save the flags
13878                 ol_LIBS="$LIBS"
13879                 LIBS="-lpthreads -lexc $LIBS"
13880
13881                 if test "$cross_compiling" = yes; then
13882   cat > conftest.$ac_ext <<EOF
13883 #line 13884 "configure"
13884 #include "confdefs.h"
13885 /* pthread test headers */
13886 #include <pthread.h>
13887 #if HAVE_PTHREADS < 7
13888 #include <errno.h>
13889 #endif
13890 #ifndef NULL
13891 #define NULL (void*)0
13892 #endif
13893
13894 static void *task(p)
13895         void *p;
13896 {
13897         return (void *) (p == NULL);
13898 }
13899
13900 int main() {
13901
13902         /* pthread test function */
13903 #ifndef PTHREAD_CREATE_DETACHED
13904 #define PTHREAD_CREATE_DETACHED 1
13905 #endif
13906         pthread_t t;
13907         int status;
13908         int detach = PTHREAD_CREATE_DETACHED;
13909
13910 #if HAVE_PTHREADS > 4
13911         /* Final pthreads */
13912         pthread_attr_t attr;
13913
13914         status = pthread_attr_init(&attr);
13915         if( status ) return status;
13916
13917 #if HAVE_PTHREADS < 7
13918         status = pthread_attr_setdetachstate(&attr, &detach);
13919         if( status < 0 ) status = errno;
13920 #else
13921         status = pthread_attr_setdetachstate(&attr, detach);
13922 #endif
13923         if( status ) return status;
13924         status = pthread_create( &t, &attr, task, NULL );
13925 #if HAVE_PTHREADS < 7
13926         if( status < 0 ) status = errno;
13927 #endif
13928         if( status ) return status;
13929 #else
13930         /* Draft 4 pthreads */
13931         status = pthread_create( &t, pthread_attr_default, task, NULL );
13932         if( status ) return errno;
13933
13934         /* give thread a chance to complete */
13935         /* it should remain joinable and hence detachable */
13936         sleep( 1 );
13937
13938         status = pthread_detach( &t );
13939         if( status ) return errno;
13940 #endif
13941
13942 #ifdef HAVE_LINUX_THREADS
13943         pthread_kill_other_threads_np();
13944 #endif
13945
13946         return 0;
13947
13948 ; return 0; }
13949 EOF
13950 if { (eval echo configure:13951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13951   rm -rf conftest*
13952   ol_cv_pthread_lpthreads_lexc=yes
13953 else
13954   echo "configure: failed program was:" >&5
13955   cat conftest.$ac_ext >&5
13956   rm -rf conftest*
13957   ol_cv_pthread_lpthreads_lexc=no
13958 fi
13959 rm -f conftest*
13960 else
13961   cat > conftest.$ac_ext <<EOF
13962 #line 13963 "configure"
13963 #include "confdefs.h"
13964 /* pthread test headers */
13965 #include <pthread.h>
13966 #if HAVE_PTHREADS < 7
13967 #include <errno.h>
13968 #endif
13969 #ifndef NULL
13970 #define NULL (void*)0
13971 #endif
13972
13973 static void *task(p)
13974         void *p;
13975 {
13976         return (void *) (p == NULL);
13977 }
13978
13979
13980 int main(argc, argv)
13981         int argc;
13982         char **argv;
13983 {
13984
13985         /* pthread test function */
13986 #ifndef PTHREAD_CREATE_DETACHED
13987 #define PTHREAD_CREATE_DETACHED 1
13988 #endif
13989         pthread_t t;
13990         int status;
13991         int detach = PTHREAD_CREATE_DETACHED;
13992
13993 #if HAVE_PTHREADS > 4
13994         /* Final pthreads */
13995         pthread_attr_t attr;
13996
13997         status = pthread_attr_init(&attr);
13998         if( status ) return status;
13999
14000 #if HAVE_PTHREADS < 7
14001         status = pthread_attr_setdetachstate(&attr, &detach);
14002         if( status < 0 ) status = errno;
14003 #else
14004         status = pthread_attr_setdetachstate(&attr, detach);
14005 #endif
14006         if( status ) return status;
14007         status = pthread_create( &t, &attr, task, NULL );
14008 #if HAVE_PTHREADS < 7
14009         if( status < 0 ) status = errno;
14010 #endif
14011         if( status ) return status;
14012 #else
14013         /* Draft 4 pthreads */
14014         status = pthread_create( &t, pthread_attr_default, task, NULL );
14015         if( status ) return errno;
14016
14017         /* give thread a chance to complete */
14018         /* it should remain joinable and hence detachable */
14019         sleep( 1 );
14020
14021         status = pthread_detach( &t );
14022         if( status ) return errno;
14023 #endif
14024
14025 #ifdef HAVE_LINUX_THREADS
14026         pthread_kill_other_threads_np();
14027 #endif
14028
14029         return 0;
14030
14031 }
14032
14033 EOF
14034 if { (eval echo configure:14035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14035 then
14036   ol_cv_pthread_lpthreads_lexc=yes
14037 else
14038   echo "configure: failed program was:" >&5
14039   cat conftest.$ac_ext >&5
14040   rm -fr conftest*
14041   ol_cv_pthread_lpthreads_lexc=no
14042 fi
14043 rm -fr conftest*
14044 fi
14045
14046
14047                 # restore the LIBS
14048                 LIBS="$ol_LIBS"
14049         
14050 fi
14051
14052 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14053
14054         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14055                 ol_link_pthreads="-lpthreads -lexc"
14056                 ol_link_threads=posix
14057         fi
14058 fi
14059
14060
14061                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14062 if test "$ol_link_threads" = no ; then
14063         # try -lpthreads
14064         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14065 echo "configure:14066: checking for pthread link with -lpthreads" >&5
14066 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14067   echo $ac_n "(cached) $ac_c" 1>&6
14068 else
14069   
14070                 # save the flags
14071                 ol_LIBS="$LIBS"
14072                 LIBS="-lpthreads $LIBS"
14073
14074                 if test "$cross_compiling" = yes; then
14075   cat > conftest.$ac_ext <<EOF
14076 #line 14077 "configure"
14077 #include "confdefs.h"
14078 /* pthread test headers */
14079 #include <pthread.h>
14080 #if HAVE_PTHREADS < 7
14081 #include <errno.h>
14082 #endif
14083 #ifndef NULL
14084 #define NULL (void*)0
14085 #endif
14086
14087 static void *task(p)
14088         void *p;
14089 {
14090         return (void *) (p == NULL);
14091 }
14092
14093 int main() {
14094
14095         /* pthread test function */
14096 #ifndef PTHREAD_CREATE_DETACHED
14097 #define PTHREAD_CREATE_DETACHED 1
14098 #endif
14099         pthread_t t;
14100         int status;
14101         int detach = PTHREAD_CREATE_DETACHED;
14102
14103 #if HAVE_PTHREADS > 4
14104         /* Final pthreads */
14105         pthread_attr_t attr;
14106
14107         status = pthread_attr_init(&attr);
14108         if( status ) return status;
14109
14110 #if HAVE_PTHREADS < 7
14111         status = pthread_attr_setdetachstate(&attr, &detach);
14112         if( status < 0 ) status = errno;
14113 #else
14114         status = pthread_attr_setdetachstate(&attr, detach);
14115 #endif
14116         if( status ) return status;
14117         status = pthread_create( &t, &attr, task, NULL );
14118 #if HAVE_PTHREADS < 7
14119         if( status < 0 ) status = errno;
14120 #endif
14121         if( status ) return status;
14122 #else
14123         /* Draft 4 pthreads */
14124         status = pthread_create( &t, pthread_attr_default, task, NULL );
14125         if( status ) return errno;
14126
14127         /* give thread a chance to complete */
14128         /* it should remain joinable and hence detachable */
14129         sleep( 1 );
14130
14131         status = pthread_detach( &t );
14132         if( status ) return errno;
14133 #endif
14134
14135 #ifdef HAVE_LINUX_THREADS
14136         pthread_kill_other_threads_np();
14137 #endif
14138
14139         return 0;
14140
14141 ; return 0; }
14142 EOF
14143 if { (eval echo configure:14144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14144   rm -rf conftest*
14145   ol_cv_pthread_lib_lpthreads=yes
14146 else
14147   echo "configure: failed program was:" >&5
14148   cat conftest.$ac_ext >&5
14149   rm -rf conftest*
14150   ol_cv_pthread_lib_lpthreads=no
14151 fi
14152 rm -f conftest*
14153 else
14154   cat > conftest.$ac_ext <<EOF
14155 #line 14156 "configure"
14156 #include "confdefs.h"
14157 /* pthread test headers */
14158 #include <pthread.h>
14159 #if HAVE_PTHREADS < 7
14160 #include <errno.h>
14161 #endif
14162 #ifndef NULL
14163 #define NULL (void*)0
14164 #endif
14165
14166 static void *task(p)
14167         void *p;
14168 {
14169         return (void *) (p == NULL);
14170 }
14171
14172
14173 int main(argc, argv)
14174         int argc;
14175         char **argv;
14176 {
14177
14178         /* pthread test function */
14179 #ifndef PTHREAD_CREATE_DETACHED
14180 #define PTHREAD_CREATE_DETACHED 1
14181 #endif
14182         pthread_t t;
14183         int status;
14184         int detach = PTHREAD_CREATE_DETACHED;
14185
14186 #if HAVE_PTHREADS > 4
14187         /* Final pthreads */
14188         pthread_attr_t attr;
14189
14190         status = pthread_attr_init(&attr);
14191         if( status ) return status;
14192
14193 #if HAVE_PTHREADS < 7
14194         status = pthread_attr_setdetachstate(&attr, &detach);
14195         if( status < 0 ) status = errno;
14196 #else
14197         status = pthread_attr_setdetachstate(&attr, detach);
14198 #endif
14199         if( status ) return status;
14200         status = pthread_create( &t, &attr, task, NULL );
14201 #if HAVE_PTHREADS < 7
14202         if( status < 0 ) status = errno;
14203 #endif
14204         if( status ) return status;
14205 #else
14206         /* Draft 4 pthreads */
14207         status = pthread_create( &t, pthread_attr_default, task, NULL );
14208         if( status ) return errno;
14209
14210         /* give thread a chance to complete */
14211         /* it should remain joinable and hence detachable */
14212         sleep( 1 );
14213
14214         status = pthread_detach( &t );
14215         if( status ) return errno;
14216 #endif
14217
14218 #ifdef HAVE_LINUX_THREADS
14219         pthread_kill_other_threads_np();
14220 #endif
14221
14222         return 0;
14223
14224 }
14225
14226 EOF
14227 if { (eval echo configure:14228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14228 then
14229   ol_cv_pthread_lib_lpthreads=yes
14230 else
14231   echo "configure: failed program was:" >&5
14232   cat conftest.$ac_ext >&5
14233   rm -fr conftest*
14234   ol_cv_pthread_lib_lpthreads=no
14235 fi
14236 rm -fr conftest*
14237 fi
14238
14239
14240                 # restore the LIBS
14241                 LIBS="$ol_LIBS"
14242         
14243 fi
14244
14245 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14246
14247         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14248                 ol_link_pthreads="-lpthreads"
14249                 ol_link_threads=posix
14250         fi
14251 fi
14252
14253
14254                 if test $ol_link_threads != no ; then
14255                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14256
14257                                                 save_CPPFLAGS="$CPPFLAGS"
14258                         save_LIBS="$LIBS"
14259                         LIBS="$LTHREAD_LIBS $LIBS"
14260
14261                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14262 do
14263 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14264 echo "configure:14265: checking for $ac_func" >&5
14265 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14266   echo $ac_n "(cached) $ac_c" 1>&6
14267 else
14268   cat > conftest.$ac_ext <<EOF
14269 #line 14270 "configure"
14270 #include "confdefs.h"
14271 /* System header to define __stub macros and hopefully few prototypes,
14272     which can conflict with char $ac_func(); below.  */
14273 #include <assert.h>
14274 /* Override any gcc2 internal prototype to avoid an error.  */
14275 /* We use char because int might match the return type of a gcc2
14276     builtin and then its argument prototype would still apply.  */
14277 char $ac_func();
14278 char (*f)();
14279
14280 int main() {
14281
14282 /* The GNU C library defines this for functions which it implements
14283     to always fail with ENOSYS.  Some functions are actually named
14284     something starting with __ and the normal name is an alias.  */
14285 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14286 choke me
14287 #else
14288 f = $ac_func;
14289 #endif
14290
14291 ; return 0; }
14292 EOF
14293 if { (eval echo configure:14294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14294   rm -rf conftest*
14295   eval "ac_cv_func_$ac_func=yes"
14296 else
14297   echo "configure: failed program was:" >&5
14298   cat conftest.$ac_ext >&5
14299   rm -rf conftest*
14300   eval "ac_cv_func_$ac_func=no"
14301 fi
14302 rm -f conftest*
14303 fi
14304
14305 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14306   echo "$ac_t""yes" 1>&6
14307     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14308   cat >> confdefs.h <<EOF
14309 #define $ac_tr_func 1
14310 EOF
14311  
14312 else
14313   echo "$ac_t""no" 1>&6
14314 fi
14315 done
14316
14317
14318                         if test $ac_cv_func_sched_yield = no -a \
14319                                 $ac_cv_func_pthread_yield = no -a \
14320                                 $ac_cv_func_thr_yield = no ; then
14321                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14322 echo "configure:14323: checking for sched_yield in -lrt" >&5
14323 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14324 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14325   echo $ac_n "(cached) $ac_c" 1>&6
14326 else
14327   ac_save_LIBS="$LIBS"
14328 LIBS="-lrt  $LIBS"
14329 cat > conftest.$ac_ext <<EOF
14330 #line 14331 "configure"
14331 #include "confdefs.h"
14332 /* Override any gcc2 internal prototype to avoid an error.  */
14333 /* We use char because int might match the return type of a gcc2
14334     builtin and then its argument prototype would still apply.  */
14335 char sched_yield();
14336
14337 int main() {
14338 sched_yield()
14339 ; return 0; }
14340 EOF
14341 if { (eval echo configure:14342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14342   rm -rf conftest*
14343   eval "ac_cv_lib_$ac_lib_var=yes"
14344 else
14345   echo "configure: failed program was:" >&5
14346   cat conftest.$ac_ext >&5
14347   rm -rf conftest*
14348   eval "ac_cv_lib_$ac_lib_var=no"
14349 fi
14350 rm -f conftest*
14351 LIBS="$ac_save_LIBS"
14352
14353 fi
14354 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14355   echo "$ac_t""yes" 1>&6
14356   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14357                                         cat >> confdefs.h <<\EOF
14358 #define HAVE_SCHED_YIELD 1
14359 EOF
14360
14361                                         ac_cv_func_sched_yield=yes
14362 else
14363   echo "$ac_t""no" 1>&6
14364 ac_cv_func_sched_yield=no
14365 fi
14366
14367                         fi
14368                         if test $ac_cv_func_sched_yield = no -a \
14369                                 $ac_cv_func_pthread_yield = no -a \
14370                                 "$ac_cv_func_thr_yield" = no ; then
14371                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14372                         fi
14373
14374                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14375 do
14376 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14377 echo "configure:14378: checking for $ac_func" >&5
14378 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14379   echo $ac_n "(cached) $ac_c" 1>&6
14380 else
14381   cat > conftest.$ac_ext <<EOF
14382 #line 14383 "configure"
14383 #include "confdefs.h"
14384 /* System header to define __stub macros and hopefully few prototypes,
14385     which can conflict with char $ac_func(); below.  */
14386 #include <assert.h>
14387 /* Override any gcc2 internal prototype to avoid an error.  */
14388 /* We use char because int might match the return type of a gcc2
14389     builtin and then its argument prototype would still apply.  */
14390 char $ac_func();
14391 char (*f)();
14392
14393 int main() {
14394
14395 /* The GNU C library defines this for functions which it implements
14396     to always fail with ENOSYS.  Some functions are actually named
14397     something starting with __ and the normal name is an alias.  */
14398 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14399 choke me
14400 #else
14401 f = $ac_func;
14402 #endif
14403
14404 ; return 0; }
14405 EOF
14406 if { (eval echo configure:14407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14407   rm -rf conftest*
14408   eval "ac_cv_func_$ac_func=yes"
14409 else
14410   echo "configure: failed program was:" >&5
14411   cat conftest.$ac_ext >&5
14412   rm -rf conftest*
14413   eval "ac_cv_func_$ac_func=no"
14414 fi
14415 rm -f conftest*
14416 fi
14417
14418 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14419   echo "$ac_t""yes" 1>&6
14420     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14421   cat >> confdefs.h <<EOF
14422 #define $ac_tr_func 1
14423 EOF
14424  
14425 else
14426   echo "$ac_t""no" 1>&6
14427 fi
14428 done
14429
14430
14431                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14432 echo "configure:14433: checking for pthread_detach with <pthread.h>" >&5
14433 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14434   echo $ac_n "(cached) $ac_c" 1>&6
14435 else
14436   
14437                                                                 cat > conftest.$ac_ext <<EOF
14438 #line 14439 "configure"
14439 #include "confdefs.h"
14440
14441 #include <pthread.h>
14442 #ifndef NULL
14443 #define NULL (void*)0
14444 #endif
14445
14446 int main() {
14447 pthread_detach(NULL);
14448 ; return 0; }
14449 EOF
14450 if { (eval echo configure:14451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14451   rm -rf conftest*
14452   ol_cv_func_pthread_detach=yes
14453 else
14454   echo "configure: failed program was:" >&5
14455   cat conftest.$ac_ext >&5
14456   rm -rf conftest*
14457   ol_cv_func_pthread_detach=no
14458 fi
14459 rm -f conftest*
14460                         
14461 fi
14462
14463 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14464
14465                         if test $ol_cv_func_pthread_detach = no ; then
14466                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14467                         fi
14468
14469                         cat >> confdefs.h <<\EOF
14470 #define HAVE_PTHREAD_DETACH 1
14471 EOF
14472
14473
14474                                                 for ac_func in \
14475                                 pthread_setconcurrency \
14476                                 pthread_getconcurrency \
14477                                 thr_setconcurrency \
14478                                 thr_getconcurrency \
14479                         
14480 do
14481 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14482 echo "configure:14483: checking for $ac_func" >&5
14483 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14484   echo $ac_n "(cached) $ac_c" 1>&6
14485 else
14486   cat > conftest.$ac_ext <<EOF
14487 #line 14488 "configure"
14488 #include "confdefs.h"
14489 /* System header to define __stub macros and hopefully few prototypes,
14490     which can conflict with char $ac_func(); below.  */
14491 #include <assert.h>
14492 /* Override any gcc2 internal prototype to avoid an error.  */
14493 /* We use char because int might match the return type of a gcc2
14494     builtin and then its argument prototype would still apply.  */
14495 char $ac_func();
14496 char (*f)();
14497
14498 int main() {
14499
14500 /* The GNU C library defines this for functions which it implements
14501     to always fail with ENOSYS.  Some functions are actually named
14502     something starting with __ and the normal name is an alias.  */
14503 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14504 choke me
14505 #else
14506 f = $ac_func;
14507 #endif
14508
14509 ; return 0; }
14510 EOF
14511 if { (eval echo configure:14512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14512   rm -rf conftest*
14513   eval "ac_cv_func_$ac_func=yes"
14514 else
14515   echo "configure: failed program was:" >&5
14516   cat conftest.$ac_ext >&5
14517   rm -rf conftest*
14518   eval "ac_cv_func_$ac_func=no"
14519 fi
14520 rm -f conftest*
14521 fi
14522
14523 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14524   echo "$ac_t""yes" 1>&6
14525     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14526   cat >> confdefs.h <<EOF
14527 #define $ac_tr_func 1
14528 EOF
14529  
14530 else
14531   echo "$ac_t""no" 1>&6
14532 fi
14533 done
14534
14535
14536                         
14537         for ac_func in pthread_kill_other_threads_np
14538 do
14539 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14540 echo "configure:14541: checking for $ac_func" >&5
14541 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14542   echo $ac_n "(cached) $ac_c" 1>&6
14543 else
14544   cat > conftest.$ac_ext <<EOF
14545 #line 14546 "configure"
14546 #include "confdefs.h"
14547 /* System header to define __stub macros and hopefully few prototypes,
14548     which can conflict with char $ac_func(); below.  */
14549 #include <assert.h>
14550 /* Override any gcc2 internal prototype to avoid an error.  */
14551 /* We use char because int might match the return type of a gcc2
14552     builtin and then its argument prototype would still apply.  */
14553 char $ac_func();
14554 char (*f)();
14555
14556 int main() {
14557
14558 /* The GNU C library defines this for functions which it implements
14559     to always fail with ENOSYS.  Some functions are actually named
14560     something starting with __ and the normal name is an alias.  */
14561 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14562 choke me
14563 #else
14564 f = $ac_func;
14565 #endif
14566
14567 ; return 0; }
14568 EOF
14569 if { (eval echo configure:14570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14570   rm -rf conftest*
14571   eval "ac_cv_func_$ac_func=yes"
14572 else
14573   echo "configure: failed program was:" >&5
14574   cat conftest.$ac_ext >&5
14575   rm -rf conftest*
14576   eval "ac_cv_func_$ac_func=no"
14577 fi
14578 rm -f conftest*
14579 fi
14580
14581 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14582   echo "$ac_t""yes" 1>&6
14583     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14584   cat >> confdefs.h <<EOF
14585 #define $ac_tr_func 1
14586 EOF
14587  
14588 else
14589   echo "$ac_t""no" 1>&6
14590 fi
14591 done
14592
14593         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14594 echo "configure:14595: checking for LinuxThreads implementation" >&5
14595 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14596   echo $ac_n "(cached) $ac_c" 1>&6
14597 else
14598   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14599 fi
14600
14601 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14602
14603                         
14604         
14605         
14606         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14607 echo "configure:14608: checking for LinuxThreads consistency" >&5
14608 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
14609   echo $ac_n "(cached) $ac_c" 1>&6
14610 else
14611   
14612                 if test $ol_cv_header_linux_threads = yes -a \
14613                         $ol_cv_sys_linux_threads = yes; then
14614                         ol_cv_linux_threads=yes
14615                 elif test $ol_cv_header_linux_threads = no -a \
14616                         $ol_cv_sys_linux_threads = no; then
14617                         ol_cv_linux_threads=no
14618                 else
14619                         ol_cv_linux_threads=error
14620                 fi
14621         
14622 fi
14623
14624 echo "$ac_t""$ol_cv_linux_threads" 1>&6
14625
14626
14627                         if test $ol_cv_linux_threads = error; then
14628                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
14629                         fi
14630
14631                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
14632 echo "configure:14633: checking if pthread_create() works" >&5
14633 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
14634   echo $ac_n "(cached) $ac_c" 1>&6
14635 else
14636   
14637                         if test "$cross_compiling" = yes; then
14638                                 ol_cv_pthread_create_works=yes
14639 else
14640   cat > conftest.$ac_ext <<EOF
14641 #line 14642 "configure"
14642 #include "confdefs.h"
14643 /* pthread test headers */
14644 #include <pthread.h>
14645 #if HAVE_PTHREADS < 7
14646 #include <errno.h>
14647 #endif
14648 #ifndef NULL
14649 #define NULL (void*)0
14650 #endif
14651
14652 static void *task(p)
14653         void *p;
14654 {
14655         return (void *) (p == NULL);
14656 }
14657
14658
14659 int main(argc, argv)
14660         int argc;
14661         char **argv;
14662 {
14663
14664         /* pthread test function */
14665 #ifndef PTHREAD_CREATE_DETACHED
14666 #define PTHREAD_CREATE_DETACHED 1
14667 #endif
14668         pthread_t t;
14669         int status;
14670         int detach = PTHREAD_CREATE_DETACHED;
14671
14672 #if HAVE_PTHREADS > 4
14673         /* Final pthreads */
14674         pthread_attr_t attr;
14675
14676         status = pthread_attr_init(&attr);
14677         if( status ) return status;
14678
14679 #if HAVE_PTHREADS < 7
14680         status = pthread_attr_setdetachstate(&attr, &detach);
14681         if( status < 0 ) status = errno;
14682 #else
14683         status = pthread_attr_setdetachstate(&attr, detach);
14684 #endif
14685         if( status ) return status;
14686         status = pthread_create( &t, &attr, task, NULL );
14687 #if HAVE_PTHREADS < 7
14688         if( status < 0 ) status = errno;
14689 #endif
14690         if( status ) return status;
14691 #else
14692         /* Draft 4 pthreads */
14693         status = pthread_create( &t, pthread_attr_default, task, NULL );
14694         if( status ) return errno;
14695
14696         /* give thread a chance to complete */
14697         /* it should remain joinable and hence detachable */
14698         sleep( 1 );
14699
14700         status = pthread_detach( &t );
14701         if( status ) return errno;
14702 #endif
14703
14704 #ifdef HAVE_LINUX_THREADS
14705         pthread_kill_other_threads_np();
14706 #endif
14707
14708         return 0;
14709
14710 }
14711
14712 EOF
14713 if { (eval echo configure:14714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14714 then
14715   ol_cv_pthread_create_works=yes
14716 else
14717   echo "configure: failed program was:" >&5
14718   cat conftest.$ac_ext >&5
14719   rm -fr conftest*
14720   ol_cv_pthread_create_works=no
14721 fi
14722 rm -fr conftest*
14723 fi
14724
14725 fi
14726
14727 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
14728
14729                         if test $ol_cv_pthread_create_works = no ; then
14730                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
14731                         fi
14732
14733                                                 if test $ol_with_yielding_select = auto ; then
14734                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
14735 echo "configure:14736: checking if select yields when using pthreads" >&5
14736 if eval "test \"\${ol_cv_pthread_select_yields+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_select_yields=cross
14742 else
14743   cat > conftest.$ac_ext <<EOF
14744 #line 14745 "configure"
14745 #include "confdefs.h"
14746
14747 #include <sys/types.h>
14748 #include <sys/time.h>
14749 #include <unistd.h>
14750 #include <pthread.h>
14751 #ifndef NULL
14752 #define NULL (void*) 0
14753 #endif
14754
14755 static int fildes[2];
14756
14757 static void *task(p)
14758         void *p;
14759 {
14760         int i;
14761         struct timeval tv;
14762
14763         fd_set rfds;
14764
14765         tv.tv_sec=10;
14766         tv.tv_usec=0;
14767
14768         FD_ZERO(&rfds);
14769         FD_SET(fildes[0], &rfds);
14770
14771         /* we're not interested in any fds */
14772         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
14773
14774         if(i < 0) {
14775                 perror("select");
14776                 exit(10);
14777         }
14778
14779         exit(0); /* if we exit here, the select blocked the whole process */
14780 }
14781
14782 int main(argc, argv)
14783         int argc;
14784         char **argv;
14785 {
14786         pthread_t t;
14787
14788         /* create a pipe to select */
14789         if(pipe(&fildes[0])) {
14790                 perror("select");
14791                 exit(1);
14792         }
14793
14794 #ifdef HAVE_PTHREAD_SETCONCURRENCY
14795         (void) pthread_setconcurrency(2);
14796 #else
14797 #ifdef HAVE_THR_SETCONCURRENCY
14798         /* Set Solaris LWP concurrency to 2 */
14799         thr_setconcurrency(2);
14800 #endif
14801 #endif
14802
14803 #if HAVE_PTHREADS < 6
14804         pthread_create(&t, pthread_attr_default, task, NULL);
14805 #else
14806         pthread_create(&t, NULL, task, NULL);
14807 #endif
14808
14809         /* make sure task runs first */
14810 #if HAVE_THR_YIELD
14811         thr_yield();
14812 #elif defined( HAVE_SCHED_YIELD )
14813         sched_yield();
14814 #elif defined( HAVE_PTHREAD_YIELD )
14815         pthread_yield();
14816 #endif
14817
14818         exit(2);
14819 }
14820 EOF
14821 if { (eval echo configure:14822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14822 then
14823   ol_cv_pthread_select_yields=no
14824 else
14825   echo "configure: failed program was:" >&5
14826   cat conftest.$ac_ext >&5
14827   rm -fr conftest*
14828   ol_cv_pthread_select_yields=yes
14829 fi
14830 rm -fr conftest*
14831 fi
14832
14833 fi
14834
14835 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
14836
14837                                 if test $ol_cv_pthread_select_yields = cross ; then
14838                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
14839                                 fi
14840
14841                                 if test $ol_cv_pthread_select_yields = yes ; then
14842                                         ol_with_yielding_select=yes
14843                                 fi
14844                         fi
14845
14846                                                 CPPFLAGS="$save_CPPFLAGS"
14847                         LIBS="$save_LIBS"
14848                 else
14849                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
14850                 fi
14851         fi
14852
14853         if test $ol_with_threads = posix ; then
14854                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
14855         fi
14856 fi
14857
14858 if test $ol_with_threads = auto -o $ol_with_threads = yes \
14859         -o $ol_with_threads = mach ; then
14860
14861                 for ac_hdr in mach/cthreads.h cthreads.h
14862 do
14863 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
14864 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
14865 echo "configure:14866: checking for $ac_hdr" >&5
14866 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
14867   echo $ac_n "(cached) $ac_c" 1>&6
14868 else
14869   cat > conftest.$ac_ext <<EOF
14870 #line 14871 "configure"
14871 #include "confdefs.h"
14872 #include <$ac_hdr>
14873 EOF
14874 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
14875 { (eval echo configure:14876: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
14876 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
14877 if test -z "$ac_err"; then
14878   rm -rf conftest*
14879   eval "ac_cv_header_$ac_safe=yes"
14880 else
14881   echo "$ac_err" >&5
14882   echo "configure: failed program was:" >&5
14883   cat conftest.$ac_ext >&5
14884   rm -rf conftest*
14885   eval "ac_cv_header_$ac_safe=no"
14886 fi
14887 rm -f conftest*
14888 fi
14889 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
14890   echo "$ac_t""yes" 1>&6
14891     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
14892   cat >> confdefs.h <<EOF
14893 #define $ac_tr_hdr 1
14894 EOF
14895  
14896 else
14897   echo "$ac_t""no" 1>&6
14898 fi
14899 done
14900
14901         if test $ac_cv_header_mach_cthreads_h = yes ; then
14902                 ol_with_threads=found
14903
14904                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
14905 echo "configure:14906: checking for cthread_fork" >&5
14906 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
14907   echo $ac_n "(cached) $ac_c" 1>&6
14908 else
14909   cat > conftest.$ac_ext <<EOF
14910 #line 14911 "configure"
14911 #include "confdefs.h"
14912 /* System header to define __stub macros and hopefully few prototypes,
14913     which can conflict with char cthread_fork(); below.  */
14914 #include <assert.h>
14915 /* Override any gcc2 internal prototype to avoid an error.  */
14916 /* We use char because int might match the return type of a gcc2
14917     builtin and then its argument prototype would still apply.  */
14918 char cthread_fork();
14919 char (*f)();
14920
14921 int main() {
14922
14923 /* The GNU C library defines this for functions which it implements
14924     to always fail with ENOSYS.  Some functions are actually named
14925     something starting with __ and the normal name is an alias.  */
14926 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
14927 choke me
14928 #else
14929 f = cthread_fork;
14930 #endif
14931
14932 ; return 0; }
14933 EOF
14934 if { (eval echo configure:14935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14935   rm -rf conftest*
14936   eval "ac_cv_func_cthread_fork=yes"
14937 else
14938   echo "configure: failed program was:" >&5
14939   cat conftest.$ac_ext >&5
14940   rm -rf conftest*
14941   eval "ac_cv_func_cthread_fork=no"
14942 fi
14943 rm -f conftest*
14944 fi
14945
14946 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
14947   echo "$ac_t""yes" 1>&6
14948   ol_link_threads=yes
14949 else
14950   echo "$ac_t""no" 1>&6
14951 fi
14952
14953
14954                 if test $ol_link_threads = no ; then
14955                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
14956 echo "configure:14957: checking for cthread_fork with -all_load" >&5
14957 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
14958   echo $ac_n "(cached) $ac_c" 1>&6
14959 else
14960   
14961                                                                 save_LIBS="$LIBS"
14962                                 LIBS="-all_load $LIBS"
14963                                 cat > conftest.$ac_ext <<EOF
14964 #line 14965 "configure"
14965 #include "confdefs.h"
14966 #include <mach/cthreads.h>
14967 int main() {
14968
14969                                         cthread_fork((void *)0, (void *)0);
14970                                         
14971 ; return 0; }
14972 EOF
14973 if { (eval echo configure:14974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14974   rm -rf conftest*
14975   ol_cv_cthread_all_load=yes
14976 else
14977   echo "configure: failed program was:" >&5
14978   cat conftest.$ac_ext >&5
14979   rm -rf conftest*
14980   ol_cv_cthread_all_load=no
14981 fi
14982 rm -f conftest*
14983                                                                 LIBS="$save_LIBS"
14984                         
14985 fi
14986
14987 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
14988
14989                         if test $ol_cv_cthread_all_load = yes ; then
14990                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
14991                                 ol_link_threads=mach
14992                                 ol_with_threads=found
14993                         fi
14994                 fi
14995
14996         elif test $ac_cv_header_cthreads_h = yes ; then
14997                                 
14998                 ol_with_threads=found
14999  
15000                                 save_LIBS="$LIBS"
15001                 LIBS="$LIBS -lthreads"
15002                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15003 echo "configure:15004: checking for cthread_fork" >&5
15004 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15005   echo $ac_n "(cached) $ac_c" 1>&6
15006 else
15007   cat > conftest.$ac_ext <<EOF
15008 #line 15009 "configure"
15009 #include "confdefs.h"
15010 /* System header to define __stub macros and hopefully few prototypes,
15011     which can conflict with char cthread_fork(); below.  */
15012 #include <assert.h>
15013 /* Override any gcc2 internal prototype to avoid an error.  */
15014 /* We use char because int might match the return type of a gcc2
15015     builtin and then its argument prototype would still apply.  */
15016 char cthread_fork();
15017 char (*f)();
15018
15019 int main() {
15020
15021 /* The GNU C library defines this for functions which it implements
15022     to always fail with ENOSYS.  Some functions are actually named
15023     something starting with __ and the normal name is an alias.  */
15024 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15025 choke me
15026 #else
15027 f = cthread_fork;
15028 #endif
15029
15030 ; return 0; }
15031 EOF
15032 if { (eval echo configure:15033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15033   rm -rf conftest*
15034   eval "ac_cv_func_cthread_fork=yes"
15035 else
15036   echo "configure: failed program was:" >&5
15037   cat conftest.$ac_ext >&5
15038   rm -rf conftest*
15039   eval "ac_cv_func_cthread_fork=no"
15040 fi
15041 rm -f conftest*
15042 fi
15043
15044 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15045   echo "$ac_t""yes" 1>&6
15046   ol_link_threads=yes
15047 else
15048   echo "$ac_t""no" 1>&6
15049 fi
15050
15051                 LIBS="$save_LIBS"
15052
15053                 if test $ol_link_threads = yes ; then
15054                         LTHREAD_LIBS="-lthreads"
15055                         ol_link_threads=mach
15056                         ol_with_threads=found
15057                 else
15058                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15059                 fi
15060
15061         elif test $ol_with_threads = mach ; then
15062                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15063         fi
15064
15065         if test $ol_link_threads = mach ; then
15066                 cat >> confdefs.h <<\EOF
15067 #define HAVE_MACH_CTHREADS 1
15068 EOF
15069
15070         elif test $ol_with_threads = found ; then
15071                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15072         fi
15073 fi
15074
15075 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15076         -o $ol_with_threads = pth ; then
15077
15078         for ac_hdr in pth.h
15079 do
15080 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15081 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15082 echo "configure:15083: checking for $ac_hdr" >&5
15083 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15084   echo $ac_n "(cached) $ac_c" 1>&6
15085 else
15086   cat > conftest.$ac_ext <<EOF
15087 #line 15088 "configure"
15088 #include "confdefs.h"
15089 #include <$ac_hdr>
15090 EOF
15091 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15092 { (eval echo configure:15093: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15093 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15094 if test -z "$ac_err"; then
15095   rm -rf conftest*
15096   eval "ac_cv_header_$ac_safe=yes"
15097 else
15098   echo "$ac_err" >&5
15099   echo "configure: failed program was:" >&5
15100   cat conftest.$ac_ext >&5
15101   rm -rf conftest*
15102   eval "ac_cv_header_$ac_safe=no"
15103 fi
15104 rm -f conftest*
15105 fi
15106 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15107   echo "$ac_t""yes" 1>&6
15108     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15109   cat >> confdefs.h <<EOF
15110 #define $ac_tr_hdr 1
15111 EOF
15112  
15113 else
15114   echo "$ac_t""no" 1>&6
15115 fi
15116 done
15117
15118
15119         if test $ac_cv_header_pth_h = yes ; then
15120                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15121 echo "configure:15122: checking for pth_version in -lpth" >&5
15122 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15123 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15124   echo $ac_n "(cached) $ac_c" 1>&6
15125 else
15126   ac_save_LIBS="$LIBS"
15127 LIBS="-lpth  $LIBS"
15128 cat > conftest.$ac_ext <<EOF
15129 #line 15130 "configure"
15130 #include "confdefs.h"
15131 /* Override any gcc2 internal prototype to avoid an error.  */
15132 /* We use char because int might match the return type of a gcc2
15133     builtin and then its argument prototype would still apply.  */
15134 char pth_version();
15135
15136 int main() {
15137 pth_version()
15138 ; return 0; }
15139 EOF
15140 if { (eval echo configure:15141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15141   rm -rf conftest*
15142   eval "ac_cv_lib_$ac_lib_var=yes"
15143 else
15144   echo "configure: failed program was:" >&5
15145   cat conftest.$ac_ext >&5
15146   rm -rf conftest*
15147   eval "ac_cv_lib_$ac_lib_var=no"
15148 fi
15149 rm -f conftest*
15150 LIBS="$ac_save_LIBS"
15151
15152 fi
15153 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15154   echo "$ac_t""yes" 1>&6
15155   have_pth=yes
15156 else
15157   echo "$ac_t""no" 1>&6
15158 have_pth=no
15159 fi
15160
15161
15162                 if test $have_pth = yes ; then
15163                         cat >> confdefs.h <<\EOF
15164 #define HAVE_GNU_PTH 1
15165 EOF
15166
15167                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15168                         ol_link_threads=pth
15169                         ol_with_threads=found
15170
15171                         if test $ol_with_yielding_select = auto ; then
15172                                 ol_with_yielding_select=yes
15173                         fi
15174                 fi
15175         fi
15176 fi
15177
15178 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15179         -o $ol_with_threads = lwp ; then
15180
15181                 for ac_hdr in thread.h synch.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         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15222                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15223 echo "configure:15224: checking for thr_create in -lthread" >&5
15224 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15225 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15226   echo $ac_n "(cached) $ac_c" 1>&6
15227 else
15228   ac_save_LIBS="$LIBS"
15229 LIBS="-lthread  $LIBS"
15230 cat > conftest.$ac_ext <<EOF
15231 #line 15232 "configure"
15232 #include "confdefs.h"
15233 /* Override any gcc2 internal prototype to avoid an error.  */
15234 /* We use char because int might match the return type of a gcc2
15235     builtin and then its argument prototype would still apply.  */
15236 char thr_create();
15237
15238 int main() {
15239 thr_create()
15240 ; return 0; }
15241 EOF
15242 if { (eval echo configure:15243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15243   rm -rf conftest*
15244   eval "ac_cv_lib_$ac_lib_var=yes"
15245 else
15246   echo "configure: failed program was:" >&5
15247   cat conftest.$ac_ext >&5
15248   rm -rf conftest*
15249   eval "ac_cv_lib_$ac_lib_var=no"
15250 fi
15251 rm -f conftest*
15252 LIBS="$ac_save_LIBS"
15253
15254 fi
15255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15256   echo "$ac_t""yes" 1>&6
15257   have_thr=yes
15258 else
15259   echo "$ac_t""no" 1>&6
15260 have_thr=no
15261 fi
15262
15263
15264                 if test $have_thr = yes ; then
15265                         cat >> confdefs.h <<\EOF
15266 #define HAVE_THR 1
15267 EOF
15268
15269                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15270                         ol_link_threads=thr
15271
15272                         if test $ol_with_yielding_select = auto ; then
15273                                 ol_with_yielding_select=yes
15274                         fi
15275
15276                                                 for ac_func in \
15277                                 thr_setconcurrency \
15278                                 thr_getconcurrency \
15279                         
15280 do
15281 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15282 echo "configure:15283: checking for $ac_func" >&5
15283 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15284   echo $ac_n "(cached) $ac_c" 1>&6
15285 else
15286   cat > conftest.$ac_ext <<EOF
15287 #line 15288 "configure"
15288 #include "confdefs.h"
15289 /* System header to define __stub macros and hopefully few prototypes,
15290     which can conflict with char $ac_func(); below.  */
15291 #include <assert.h>
15292 /* Override any gcc2 internal prototype to avoid an error.  */
15293 /* We use char because int might match the return type of a gcc2
15294     builtin and then its argument prototype would still apply.  */
15295 char $ac_func();
15296 char (*f)();
15297
15298 int main() {
15299
15300 /* The GNU C library defines this for functions which it implements
15301     to always fail with ENOSYS.  Some functions are actually named
15302     something starting with __ and the normal name is an alias.  */
15303 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15304 choke me
15305 #else
15306 f = $ac_func;
15307 #endif
15308
15309 ; return 0; }
15310 EOF
15311 if { (eval echo configure:15312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15312   rm -rf conftest*
15313   eval "ac_cv_func_$ac_func=yes"
15314 else
15315   echo "configure: failed program was:" >&5
15316   cat conftest.$ac_ext >&5
15317   rm -rf conftest*
15318   eval "ac_cv_func_$ac_func=no"
15319 fi
15320 rm -f conftest*
15321 fi
15322
15323 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15324   echo "$ac_t""yes" 1>&6
15325     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15326   cat >> confdefs.h <<EOF
15327 #define $ac_tr_func 1
15328 EOF
15329  
15330 else
15331   echo "$ac_t""no" 1>&6
15332 fi
15333 done
15334
15335                 fi
15336         fi
15337
15338                 for ac_hdr in lwp/lwp.h
15339 do
15340 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15341 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15342 echo "configure:15343: checking for $ac_hdr" >&5
15343 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15344   echo $ac_n "(cached) $ac_c" 1>&6
15345 else
15346   cat > conftest.$ac_ext <<EOF
15347 #line 15348 "configure"
15348 #include "confdefs.h"
15349 #include <$ac_hdr>
15350 EOF
15351 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15352 { (eval echo configure:15353: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15353 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15354 if test -z "$ac_err"; then
15355   rm -rf conftest*
15356   eval "ac_cv_header_$ac_safe=yes"
15357 else
15358   echo "$ac_err" >&5
15359   echo "configure: failed program was:" >&5
15360   cat conftest.$ac_ext >&5
15361   rm -rf conftest*
15362   eval "ac_cv_header_$ac_safe=no"
15363 fi
15364 rm -f conftest*
15365 fi
15366 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15367   echo "$ac_t""yes" 1>&6
15368     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15369   cat >> confdefs.h <<EOF
15370 #define $ac_tr_hdr 1
15371 EOF
15372  
15373 else
15374   echo "$ac_t""no" 1>&6
15375 fi
15376 done
15377
15378         if test $ac_cv_header_lwp_lwp_h = yes ; then
15379                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15380 echo "configure:15381: checking for lwp_create in -llwp" >&5
15381 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15382 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15383   echo $ac_n "(cached) $ac_c" 1>&6
15384 else
15385   ac_save_LIBS="$LIBS"
15386 LIBS="-llwp  $LIBS"
15387 cat > conftest.$ac_ext <<EOF
15388 #line 15389 "configure"
15389 #include "confdefs.h"
15390 /* Override any gcc2 internal prototype to avoid an error.  */
15391 /* We use char because int might match the return type of a gcc2
15392     builtin and then its argument prototype would still apply.  */
15393 char lwp_create();
15394
15395 int main() {
15396 lwp_create()
15397 ; return 0; }
15398 EOF
15399 if { (eval echo configure:15400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15400   rm -rf conftest*
15401   eval "ac_cv_lib_$ac_lib_var=yes"
15402 else
15403   echo "configure: failed program was:" >&5
15404   cat conftest.$ac_ext >&5
15405   rm -rf conftest*
15406   eval "ac_cv_lib_$ac_lib_var=no"
15407 fi
15408 rm -f conftest*
15409 LIBS="$ac_save_LIBS"
15410
15411 fi
15412 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15413   echo "$ac_t""yes" 1>&6
15414   have_lwp=yes
15415 else
15416   echo "$ac_t""no" 1>&6
15417 have_lwp=no
15418 fi
15419
15420
15421                 if test $have_lwp = yes ; then
15422                         cat >> confdefs.h <<\EOF
15423 #define HAVE_LWP 1
15424 EOF
15425
15426                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15427                         ol_link_threads=lwp
15428
15429                         if test $ol_with_yielding_select = auto ; then
15430                                 ol_with_yielding_select=no
15431                         fi
15432                 fi
15433         fi
15434 fi
15435
15436 if test $ol_with_yielding_select = yes ; then
15437         cat >> confdefs.h <<\EOF
15438 #define HAVE_YIELDING_SELECT 1
15439 EOF
15440
15441 fi
15442
15443 if test $ol_with_threads = manual ; then
15444                 ol_link_threads=yes
15445
15446         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15447
15448         for ac_hdr in pthread.h sched.h
15449 do
15450 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15451 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15452 echo "configure:15453: checking for $ac_hdr" >&5
15453 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15454   echo $ac_n "(cached) $ac_c" 1>&6
15455 else
15456   cat > conftest.$ac_ext <<EOF
15457 #line 15458 "configure"
15458 #include "confdefs.h"
15459 #include <$ac_hdr>
15460 EOF
15461 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15462 { (eval echo configure:15463: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15463 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15464 if test -z "$ac_err"; then
15465   rm -rf conftest*
15466   eval "ac_cv_header_$ac_safe=yes"
15467 else
15468   echo "$ac_err" >&5
15469   echo "configure: failed program was:" >&5
15470   cat conftest.$ac_ext >&5
15471   rm -rf conftest*
15472   eval "ac_cv_header_$ac_safe=no"
15473 fi
15474 rm -f conftest*
15475 fi
15476 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15477   echo "$ac_t""yes" 1>&6
15478     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15479   cat >> confdefs.h <<EOF
15480 #define $ac_tr_hdr 1
15481 EOF
15482  
15483 else
15484   echo "$ac_t""no" 1>&6
15485 fi
15486 done
15487
15488         for ac_func in sched_yield pthread_yield
15489 do
15490 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15491 echo "configure:15492: checking for $ac_func" >&5
15492 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15493   echo $ac_n "(cached) $ac_c" 1>&6
15494 else
15495   cat > conftest.$ac_ext <<EOF
15496 #line 15497 "configure"
15497 #include "confdefs.h"
15498 /* System header to define __stub macros and hopefully few prototypes,
15499     which can conflict with char $ac_func(); below.  */
15500 #include <assert.h>
15501 /* Override any gcc2 internal prototype to avoid an error.  */
15502 /* We use char because int might match the return type of a gcc2
15503     builtin and then its argument prototype would still apply.  */
15504 char $ac_func();
15505 char (*f)();
15506
15507 int main() {
15508
15509 /* The GNU C library defines this for functions which it implements
15510     to always fail with ENOSYS.  Some functions are actually named
15511     something starting with __ and the normal name is an alias.  */
15512 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15513 choke me
15514 #else
15515 f = $ac_func;
15516 #endif
15517
15518 ; return 0; }
15519 EOF
15520 if { (eval echo configure:15521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15521   rm -rf conftest*
15522   eval "ac_cv_func_$ac_func=yes"
15523 else
15524   echo "configure: failed program was:" >&5
15525   cat conftest.$ac_ext >&5
15526   rm -rf conftest*
15527   eval "ac_cv_func_$ac_func=no"
15528 fi
15529 rm -f conftest*
15530 fi
15531
15532 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15533   echo "$ac_t""yes" 1>&6
15534     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15535   cat >> confdefs.h <<EOF
15536 #define $ac_tr_func 1
15537 EOF
15538  
15539 else
15540   echo "$ac_t""no" 1>&6
15541 fi
15542 done
15543
15544         
15545         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15546 echo "configure:15547: checking for LinuxThreads pthread.h" >&5
15547 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15548   echo $ac_n "(cached) $ac_c" 1>&6
15549 else
15550   cat > conftest.$ac_ext <<EOF
15551 #line 15552 "configure"
15552 #include "confdefs.h"
15553 #include <pthread.h>
15554 EOF
15555 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15556   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15557   rm -rf conftest*
15558   ol_cv_header_linux_threads=yes
15559 else
15560   rm -rf conftest*
15561   ol_cv_header_linux_threads=no
15562 fi
15563 rm -f conftest*
15564
15565                 
15566 fi
15567
15568 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15569         if test $ol_cv_header_linux_threads = yes; then
15570                 cat >> confdefs.h <<\EOF
15571 #define HAVE_LINUX_THREADS 1
15572 EOF
15573
15574         fi
15575
15576
15577         for ac_hdr in mach/cthreads.h
15578 do
15579 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15580 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15581 echo "configure:15582: checking for $ac_hdr" >&5
15582 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15583   echo $ac_n "(cached) $ac_c" 1>&6
15584 else
15585   cat > conftest.$ac_ext <<EOF
15586 #line 15587 "configure"
15587 #include "confdefs.h"
15588 #include <$ac_hdr>
15589 EOF
15590 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15591 { (eval echo configure:15592: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15592 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15593 if test -z "$ac_err"; then
15594   rm -rf conftest*
15595   eval "ac_cv_header_$ac_safe=yes"
15596 else
15597   echo "$ac_err" >&5
15598   echo "configure: failed program was:" >&5
15599   cat conftest.$ac_ext >&5
15600   rm -rf conftest*
15601   eval "ac_cv_header_$ac_safe=no"
15602 fi
15603 rm -f conftest*
15604 fi
15605 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15606   echo "$ac_t""yes" 1>&6
15607     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15608   cat >> confdefs.h <<EOF
15609 #define $ac_tr_hdr 1
15610 EOF
15611  
15612 else
15613   echo "$ac_t""no" 1>&6
15614 fi
15615 done
15616
15617         for ac_hdr in lwp/lwp.h
15618 do
15619 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15620 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15621 echo "configure:15622: checking for $ac_hdr" >&5
15622 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15623   echo $ac_n "(cached) $ac_c" 1>&6
15624 else
15625   cat > conftest.$ac_ext <<EOF
15626 #line 15627 "configure"
15627 #include "confdefs.h"
15628 #include <$ac_hdr>
15629 EOF
15630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15631 { (eval echo configure:15632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15633 if test -z "$ac_err"; then
15634   rm -rf conftest*
15635   eval "ac_cv_header_$ac_safe=yes"
15636 else
15637   echo "$ac_err" >&5
15638   echo "configure: failed program was:" >&5
15639   cat conftest.$ac_ext >&5
15640   rm -rf conftest*
15641   eval "ac_cv_header_$ac_safe=no"
15642 fi
15643 rm -f conftest*
15644 fi
15645 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15646   echo "$ac_t""yes" 1>&6
15647     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15648   cat >> confdefs.h <<EOF
15649 #define $ac_tr_hdr 1
15650 EOF
15651  
15652 else
15653   echo "$ac_t""no" 1>&6
15654 fi
15655 done
15656
15657         for ac_hdr in thread.h synch.h
15658 do
15659 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15660 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15661 echo "configure:15662: checking for $ac_hdr" >&5
15662 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15663   echo $ac_n "(cached) $ac_c" 1>&6
15664 else
15665   cat > conftest.$ac_ext <<EOF
15666 #line 15667 "configure"
15667 #include "confdefs.h"
15668 #include <$ac_hdr>
15669 EOF
15670 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15671 { (eval echo configure:15672: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15672 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15673 if test -z "$ac_err"; then
15674   rm -rf conftest*
15675   eval "ac_cv_header_$ac_safe=yes"
15676 else
15677   echo "$ac_err" >&5
15678   echo "configure: failed program was:" >&5
15679   cat conftest.$ac_ext >&5
15680   rm -rf conftest*
15681   eval "ac_cv_header_$ac_safe=no"
15682 fi
15683 rm -f conftest*
15684 fi
15685 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15686   echo "$ac_t""yes" 1>&6
15687     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15688   cat >> confdefs.h <<EOF
15689 #define $ac_tr_hdr 1
15690 EOF
15691  
15692 else
15693   echo "$ac_t""no" 1>&6
15694 fi
15695 done
15696
15697 fi
15698
15699 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
15700                         cat >> confdefs.h <<\EOF
15701 #define REENTRANT 1
15702 EOF
15703
15704         cat >> confdefs.h <<\EOF
15705 #define _REENTRANT 1
15706 EOF
15707
15708         cat >> confdefs.h <<\EOF
15709 #define THREAD_SAFE 1
15710 EOF
15711
15712         cat >> confdefs.h <<\EOF
15713 #define _THREAD_SAFE 1
15714 EOF
15715
15716         cat >> confdefs.h <<\EOF
15717 #define THREADSAFE 1
15718 EOF
15719
15720         cat >> confdefs.h <<\EOF
15721 #define _THREADSAFE 1
15722 EOF
15723
15724         cat >> confdefs.h <<\EOF
15725 #define _SGI_MP_SOURCE 1
15726 EOF
15727
15728
15729                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
15730 echo "configure:15731: checking for thread specific errno" >&5
15731 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
15732   echo $ac_n "(cached) $ac_c" 1>&6
15733 else
15734   
15735                 cat > conftest.$ac_ext <<EOF
15736 #line 15737 "configure"
15737 #include "confdefs.h"
15738 #include <errno.h>
15739 int main() {
15740 errno = 0;
15741 ; return 0; }
15742 EOF
15743 if { (eval echo configure:15744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15744   rm -rf conftest*
15745   ol_cv_errno_thread_specific=yes
15746 else
15747   echo "configure: failed program was:" >&5
15748   cat conftest.$ac_ext >&5
15749   rm -rf conftest*
15750   ol_cv_errno_thread_specific=no
15751 fi
15752 rm -f conftest*
15753         
15754 fi
15755
15756 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
15757
15758                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
15759 echo "configure:15760: checking for thread specific h_errno" >&5
15760 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
15761   echo $ac_n "(cached) $ac_c" 1>&6
15762 else
15763   
15764                 cat > conftest.$ac_ext <<EOF
15765 #line 15766 "configure"
15766 #include "confdefs.h"
15767 #include <netdb.h>
15768 int main() {
15769 h_errno = 0;
15770 ; return 0; }
15771 EOF
15772 if { (eval echo configure:15773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15773   rm -rf conftest*
15774   ol_cv_h_errno_thread_specific=yes
15775 else
15776   echo "configure: failed program was:" >&5
15777   cat conftest.$ac_ext >&5
15778   rm -rf conftest*
15779   ol_cv_h_errno_thread_specific=no
15780 fi
15781 rm -f conftest*
15782         
15783 fi
15784
15785 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
15786
15787         if test $ol_cv_errno_thread_specific != yes \
15788                 -o $ol_cv_h_errno_thread_specific != yes ; then
15789                 LIBS="$LTHREAD_LIBS $LIBS"
15790                 LTHREAD_LIBS=""
15791         fi
15792
15793 fi  
15794
15795 if test $ol_link_threads = no ; then
15796         if test $ol_with_threads = yes ; then
15797                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
15798         fi
15799
15800         if test $ol_with_threads = auto ; then
15801                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
15802                 ol_with_threads=no
15803         fi
15804
15805         cat >> confdefs.h <<\EOF
15806 #define NO_THREADS 1
15807 EOF
15808
15809         LTHREAD_LIBS=""
15810 fi
15811
15812 if test $ol_link_threads != no ; then
15813         cat >> confdefs.h <<\EOF
15814 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
15815 EOF
15816
15817 fi
15818
15819 for ac_func in \
15820         ctime_r                 \
15821         gethostbyname_r gethostbyaddr_r \
15822
15823 do
15824 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15825 echo "configure:15826: checking for $ac_func" >&5
15826 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15827   echo $ac_n "(cached) $ac_c" 1>&6
15828 else
15829   cat > conftest.$ac_ext <<EOF
15830 #line 15831 "configure"
15831 #include "confdefs.h"
15832 /* System header to define __stub macros and hopefully few prototypes,
15833     which can conflict with char $ac_func(); below.  */
15834 #include <assert.h>
15835 /* Override any gcc2 internal prototype to avoid an error.  */
15836 /* We use char because int might match the return type of a gcc2
15837     builtin and then its argument prototype would still apply.  */
15838 char $ac_func();
15839 char (*f)();
15840
15841 int main() {
15842
15843 /* The GNU C library defines this for functions which it implements
15844     to always fail with ENOSYS.  Some functions are actually named
15845     something starting with __ and the normal name is an alias.  */
15846 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15847 choke me
15848 #else
15849 f = $ac_func;
15850 #endif
15851
15852 ; return 0; }
15853 EOF
15854 if { (eval echo configure:15855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15855   rm -rf conftest*
15856   eval "ac_cv_func_$ac_func=yes"
15857 else
15858   echo "configure: failed program was:" >&5
15859   cat conftest.$ac_ext >&5
15860   rm -rf conftest*
15861   eval "ac_cv_func_$ac_func=no"
15862 fi
15863 rm -f conftest*
15864 fi
15865
15866 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15867   echo "$ac_t""yes" 1>&6
15868     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15869   cat >> confdefs.h <<EOF
15870 #define $ac_tr_func 1
15871 EOF
15872  
15873 else
15874   echo "$ac_t""no" 1>&6
15875 fi
15876 done
15877
15878
15879 if test "$ac_cv_func_ctime_r" = no ; then
15880         ol_cv_func_ctime_r_nargs=0
15881 else
15882         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
15883 echo "configure:15884: checking number of arguments of ctime_r" >&5
15884 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
15885   echo $ac_n "(cached) $ac_c" 1>&6
15886 else
15887   cat > conftest.$ac_ext <<EOF
15888 #line 15889 "configure"
15889 #include "confdefs.h"
15890 #include <time.h>
15891 int main() {
15892 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
15893 ; return 0; }
15894 EOF
15895 if { (eval echo configure:15896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15896   rm -rf conftest*
15897   ol_cv_func_ctime_r_nargs3=yes
15898 else
15899   echo "configure: failed program was:" >&5
15900   cat conftest.$ac_ext >&5
15901   rm -rf conftest*
15902   ol_cv_func_ctime_r_nargs3=no
15903 fi
15904 rm -f conftest*
15905
15906         cat > conftest.$ac_ext <<EOF
15907 #line 15908 "configure"
15908 #include "confdefs.h"
15909 #include <time.h>
15910 int main() {
15911 time_t ti; char *buffer; ctime_r(&ti,buffer);
15912 ; return 0; }
15913 EOF
15914 if { (eval echo configure:15915: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15915   rm -rf conftest*
15916   ol_cv_func_ctime_r_nargs2=yes
15917 else
15918   echo "configure: failed program was:" >&5
15919   cat conftest.$ac_ext >&5
15920   rm -rf conftest*
15921   ol_cv_func_ctime_r_nargs2=no
15922 fi
15923 rm -f conftest*
15924
15925         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
15926                 $ol_cv_func_ctime_r_nargs2 = no ; then
15927
15928                 ol_cv_func_ctime_r_nargs=3
15929
15930         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
15931                 $ol_cv_func_ctime_r_nargs2 = yes ; then
15932
15933                 ol_cv_func_ctime_r_nargs=2
15934
15935         else
15936                 ol_cv_func_ctime_r_nargs=0
15937         fi
15938   
15939 fi
15940
15941 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
15942
15943   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
15944         cat >> confdefs.h <<EOF
15945 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
15946 EOF
15947
15948   fi
15949
15950 fi
15951
15952 if test "$ac_cv_func_gethostbyname_r" = yes ; then
15953         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
15954 echo "configure:15955: checking number of arguments of gethostbyname_r" >&5
15955 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
15956   echo $ac_n "(cached) $ac_c" 1>&6
15957 else
15958   cat > conftest.$ac_ext <<EOF
15959 #line 15960 "configure"
15960 #include "confdefs.h"
15961 #include <sys/types.h>
15962 #include <sys/socket.h>
15963 #include <netinet/in.h>
15964 #include <netdb.h>
15965 #define BUFSIZE (sizeof(struct hostent)+10)
15966 int main() {
15967 struct hostent hent; char buffer[BUFSIZE];
15968                 int bufsize=BUFSIZE;int h_errno;
15969                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
15970                         buffer, bufsize, &h_errno);
15971 ; return 0; }
15972 EOF
15973 if { (eval echo configure:15974: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
15974   rm -rf conftest*
15975   ol_cv_func_gethostbyname_r_nargs5=yes
15976 else
15977   echo "configure: failed program was:" >&5
15978   cat conftest.$ac_ext >&5
15979   rm -rf conftest*
15980   ol_cv_func_gethostbyname_r_nargs5=no
15981 fi
15982 rm -f conftest*
15983
15984         cat > conftest.$ac_ext <<EOF
15985 #line 15986 "configure"
15986 #include "confdefs.h"
15987 #include <sys/types.h>
15988 #include <sys/socket.h>
15989 #include <netinet/in.h>
15990 #include <netdb.h>
15991 #define BUFSIZE (sizeof(struct hostent)+10)
15992 int main() {
15993 struct hostent hent;struct hostent *rhent;
15994                 char buffer[BUFSIZE];
15995                 int bufsize=BUFSIZE;int h_errno;
15996                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
15997                         &rhent, &h_errno);
15998 ; return 0; }
15999 EOF
16000 if { (eval echo configure:16001: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16001   rm -rf conftest*
16002   ol_cv_func_gethostbyname_r_nargs6=yes
16003 else
16004   echo "configure: failed program was:" >&5
16005   cat conftest.$ac_ext >&5
16006   rm -rf conftest*
16007   ol_cv_func_gethostbyname_r_nargs6=no
16008 fi
16009 rm -f conftest*
16010
16011         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16012                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16013
16014                 ol_cv_func_gethostbyname_r_nargs=5
16015
16016         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16017                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16018
16019                 ol_cv_func_gethostbyname_r_nargs=6
16020
16021         else
16022                 ol_cv_func_gethostbyname_r_nargs=0
16023         fi
16024   
16025 fi
16026
16027 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16028   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16029         cat >> confdefs.h <<EOF
16030 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16031 EOF
16032
16033   fi
16034
16035 else
16036         ol_cv_func_gethostbyname_r_nargs=0
16037 fi
16038  
16039 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16040         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16041 echo "configure:16042: checking number of arguments of gethostbyaddr_r" >&5
16042 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16043   echo $ac_n "(cached) $ac_c" 1>&6
16044 else
16045   cat > conftest.$ac_ext <<EOF
16046 #line 16047 "configure"
16047 #include "confdefs.h"
16048 #include <sys/types.h>
16049 #include <sys/socket.h>
16050 #include <netinet/in.h>
16051 #include <netdb.h>
16052 #define BUFSIZE (sizeof(struct hostent)+10)
16053 int main() {
16054 struct hostent hent; char buffer[BUFSIZE]; 
16055             struct in_addr add;
16056             size_t alen=sizeof(struct in_addr);
16057             int bufsize=BUFSIZE;int h_errno;
16058                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16059                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16060 ; return 0; }
16061 EOF
16062 if { (eval echo configure:16063: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16063   rm -rf conftest*
16064   ol_cv_func_gethostbyaddr_r_nargs7=yes
16065 else
16066   echo "configure: failed program was:" >&5
16067   cat conftest.$ac_ext >&5
16068   rm -rf conftest*
16069   ol_cv_func_gethostbyaddr_r_nargs7=no
16070 fi
16071 rm -f conftest*
16072
16073         cat > conftest.$ac_ext <<EOF
16074 #line 16075 "configure"
16075 #include "confdefs.h"
16076 #include <sys/types.h>
16077 #include <sys/socket.h>
16078 #include <netinet/in.h>
16079 #include <netdb.h>
16080 #define BUFSIZE (sizeof(struct hostent)+10)
16081 int main() {
16082 struct hostent hent;
16083                 struct hostent *rhent; char buffer[BUFSIZE]; 
16084                 struct in_addr add;
16085                 size_t alen=sizeof(struct in_addr);
16086                 int bufsize=BUFSIZE;int h_errno;
16087                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16088                         alen, AF_INET, &hent, buffer, bufsize, 
16089                         &rhent, &h_errno);
16090 ; return 0; }
16091 EOF
16092 if { (eval echo configure:16093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16093   rm -rf conftest*
16094   ol_cv_func_gethostbyaddr_r_nargs8=yes
16095 else
16096   echo "configure: failed program was:" >&5
16097   cat conftest.$ac_ext >&5
16098   rm -rf conftest*
16099   ol_cv_func_gethostbyaddr_r_nargs8=no
16100 fi
16101 rm -f conftest*
16102
16103         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16104                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16105
16106                 ol_cv_func_gethostbyaddr_r_nargs=7
16107
16108         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16109                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16110
16111                 ol_cv_func_gethostbyaddr_r_nargs=8
16112
16113         else
16114                 ol_cv_func_gethostbyaddr_r_nargs=0
16115         fi
16116   
16117 fi
16118
16119 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16120   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16121     cat >> confdefs.h <<EOF
16122 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16123 EOF
16124
16125   fi
16126
16127 else
16128         ol_cv_func_gethostbyaddr_r_nargs=0
16129 fi
16130
16131 ol_link_ldbm=no 
16132
16133 if test $ol_with_ldbm_api = auto \
16134         -o $ol_with_ldbm_api = berkeley \
16135         -o $ol_with_ldbm_api = bcompat ; then
16136
16137         if test $ol_with_ldbm_api = bcompat; then \
16138                 for ac_hdr in db_185.h db.h
16139 do
16140 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16141 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16142 echo "configure:16143: checking for $ac_hdr" >&5
16143 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16144   echo $ac_n "(cached) $ac_c" 1>&6
16145 else
16146   cat > conftest.$ac_ext <<EOF
16147 #line 16148 "configure"
16148 #include "confdefs.h"
16149 #include <$ac_hdr>
16150 EOF
16151 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16152 { (eval echo configure:16153: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16153 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16154 if test -z "$ac_err"; then
16155   rm -rf conftest*
16156   eval "ac_cv_header_$ac_safe=yes"
16157 else
16158   echo "$ac_err" >&5
16159   echo "configure: failed program was:" >&5
16160   cat conftest.$ac_ext >&5
16161   rm -rf conftest*
16162   eval "ac_cv_header_$ac_safe=no"
16163 fi
16164 rm -f conftest*
16165 fi
16166 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16167   echo "$ac_t""yes" 1>&6
16168     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16169   cat >> confdefs.h <<EOF
16170 #define $ac_tr_hdr 1
16171 EOF
16172  
16173 else
16174   echo "$ac_t""no" 1>&6
16175 fi
16176 done
16177
16178 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16179         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16180 echo "configure:16181: checking if Berkeley DB header compatibility" >&5
16181 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16182   echo $ac_n "(cached) $ac_c" 1>&6
16183 else
16184   
16185                 cat > conftest.$ac_ext <<EOF
16186 #line 16187 "configure"
16187 #include "confdefs.h"
16188
16189 #if HAVE_DB_185_H
16190 #       include <db_185.h>
16191 #else
16192 #       include <db.h>
16193 #endif
16194
16195  /* this check could be improved */
16196 #ifndef DB_VERSION_MAJOR
16197 #       define DB_VERSION_MAJOR 1
16198 #endif
16199
16200 #if DB_VERSION_MAJOR == 1 
16201         __db_version_1
16202 #endif
16203
16204 EOF
16205 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16206   egrep "__db_version_1" >/dev/null 2>&1; then
16207   rm -rf conftest*
16208   ol_cv_header_db1=yes
16209 else
16210   rm -rf conftest*
16211   ol_cv_header_db1=no
16212 fi
16213 rm -f conftest*
16214
16215 fi
16216
16217 echo "$ac_t""$ol_cv_header_db1" 1>&6
16218
16219         if test $ol_cv_header_db1 = yes ; then
16220                 ol_cv_lib_db=no
16221 if test $ol_cv_lib_db = no ; then
16222         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16223 echo "configure:16224: checking for Berkeley DB link (default)" >&5
16224 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16225   echo $ac_n "(cached) $ac_c" 1>&6
16226 else
16227   
16228         ol_DB_LIB=
16229         ol_LIBS=$LIBS
16230         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16231
16232         cat > conftest.$ac_ext <<EOF
16233 #line 16234 "configure"
16234 #include "confdefs.h"
16235
16236 #ifdef HAVE_DB_185_H
16237 # include <db_185.h>
16238 #else
16239 # include <db.h>
16240 #endif
16241
16242 #ifndef DB_VERSION_MAJOR
16243 # define DB_VERSION_MAJOR 1
16244 #endif
16245
16246 #ifndef NULL
16247 #define NULL ((void*)0)
16248 #endif
16249
16250 int main() {
16251
16252 #if DB_VERSION_MAJOR > 1
16253         {
16254                 char *version;
16255                 int major, minor, patch;
16256
16257                 version = db_version( &major, &minor, &patch );
16258
16259                 if( major != DB_VERSION_MAJOR ||
16260                         minor < DB_VERSION_MINOR )
16261                 {
16262                         printf("Berkeley DB version mismatch\n"
16263                                 "\texpected: %s\n\tgot: %s\n",
16264                                 DB_VERSION_STRING, version);
16265                         return 1;
16266                 }
16267         }
16268 #endif
16269
16270 #if DB_VERSION_MAJOR > 2
16271         db_env_create( NULL, 0 );
16272 #elif DB_VERSION_MAJOR > 1
16273         db_appexit( NULL );
16274 #else
16275         (void) dbopen( NULL, 0, 0, 0, NULL);
16276 #endif
16277
16278 ; return 0; }
16279 EOF
16280 if { (eval echo configure:16281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16281   rm -rf conftest*
16282   ol_cv_db_none=yes
16283 else
16284   echo "configure: failed program was:" >&5
16285   cat conftest.$ac_ext >&5
16286   rm -rf conftest*
16287   ol_cv_db_none=no
16288 fi
16289 rm -f conftest*
16290
16291         LIBS="$ol_LIBS"
16292
16293 fi
16294
16295 echo "$ac_t""$ol_cv_db_none" 1>&6
16296
16297         if test $ol_cv_db_none = yes ; then
16298                 ol_cv_lib_db=yes
16299         fi
16300 fi
16301
16302 if test $ol_cv_lib_db = no ; then
16303         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16304 echo "configure:16305: checking for Berkeley DB link (-ldb42)" >&5
16305 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16306   echo $ac_n "(cached) $ac_c" 1>&6
16307 else
16308   
16309         ol_DB_LIB=-ldb42
16310         ol_LIBS=$LIBS
16311         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16312
16313         cat > conftest.$ac_ext <<EOF
16314 #line 16315 "configure"
16315 #include "confdefs.h"
16316
16317 #ifdef HAVE_DB_185_H
16318 # include <db_185.h>
16319 #else
16320 # include <db.h>
16321 #endif
16322
16323 #ifndef DB_VERSION_MAJOR
16324 # define DB_VERSION_MAJOR 1
16325 #endif
16326
16327 #ifndef NULL
16328 #define NULL ((void*)0)
16329 #endif
16330
16331 int main() {
16332
16333 #if DB_VERSION_MAJOR > 1
16334         {
16335                 char *version;
16336                 int major, minor, patch;
16337
16338                 version = db_version( &major, &minor, &patch );
16339
16340                 if( major != DB_VERSION_MAJOR ||
16341                         minor < DB_VERSION_MINOR )
16342                 {
16343                         printf("Berkeley DB version mismatch\n"
16344                                 "\texpected: %s\n\tgot: %s\n",
16345                                 DB_VERSION_STRING, version);
16346                         return 1;
16347                 }
16348         }
16349 #endif
16350
16351 #if DB_VERSION_MAJOR > 2
16352         db_env_create( NULL, 0 );
16353 #elif DB_VERSION_MAJOR > 1
16354         db_appexit( NULL );
16355 #else
16356         (void) dbopen( NULL, 0, 0, 0, NULL);
16357 #endif
16358
16359 ; return 0; }
16360 EOF
16361 if { (eval echo configure:16362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16362   rm -rf conftest*
16363   ol_cv_db_db42=yes
16364 else
16365   echo "configure: failed program was:" >&5
16366   cat conftest.$ac_ext >&5
16367   rm -rf conftest*
16368   ol_cv_db_db42=no
16369 fi
16370 rm -f conftest*
16371
16372         LIBS="$ol_LIBS"
16373
16374 fi
16375
16376 echo "$ac_t""$ol_cv_db_db42" 1>&6
16377
16378         if test $ol_cv_db_db42 = yes ; then
16379                 ol_cv_lib_db=-ldb42
16380         fi
16381 fi
16382
16383 if test $ol_cv_lib_db = no ; then
16384         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16385 echo "configure:16386: checking for Berkeley DB link (-ldb-42)" >&5
16386 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16387   echo $ac_n "(cached) $ac_c" 1>&6
16388 else
16389   
16390         ol_DB_LIB=-ldb-42
16391         ol_LIBS=$LIBS
16392         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16393
16394         cat > conftest.$ac_ext <<EOF
16395 #line 16396 "configure"
16396 #include "confdefs.h"
16397
16398 #ifdef HAVE_DB_185_H
16399 # include <db_185.h>
16400 #else
16401 # include <db.h>
16402 #endif
16403
16404 #ifndef DB_VERSION_MAJOR
16405 # define DB_VERSION_MAJOR 1
16406 #endif
16407
16408 #ifndef NULL
16409 #define NULL ((void*)0)
16410 #endif
16411
16412 int main() {
16413
16414 #if DB_VERSION_MAJOR > 1
16415         {
16416                 char *version;
16417                 int major, minor, patch;
16418
16419                 version = db_version( &major, &minor, &patch );
16420
16421                 if( major != DB_VERSION_MAJOR ||
16422                         minor < DB_VERSION_MINOR )
16423                 {
16424                         printf("Berkeley DB version mismatch\n"
16425                                 "\texpected: %s\n\tgot: %s\n",
16426                                 DB_VERSION_STRING, version);
16427                         return 1;
16428                 }
16429         }
16430 #endif
16431
16432 #if DB_VERSION_MAJOR > 2
16433         db_env_create( NULL, 0 );
16434 #elif DB_VERSION_MAJOR > 1
16435         db_appexit( NULL );
16436 #else
16437         (void) dbopen( NULL, 0, 0, 0, NULL);
16438 #endif
16439
16440 ; return 0; }
16441 EOF
16442 if { (eval echo configure:16443: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16443   rm -rf conftest*
16444   ol_cv_db_db_42=yes
16445 else
16446   echo "configure: failed program was:" >&5
16447   cat conftest.$ac_ext >&5
16448   rm -rf conftest*
16449   ol_cv_db_db_42=no
16450 fi
16451 rm -f conftest*
16452
16453         LIBS="$ol_LIBS"
16454
16455 fi
16456
16457 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16458
16459         if test $ol_cv_db_db_42 = yes ; then
16460                 ol_cv_lib_db=-ldb-42
16461         fi
16462 fi
16463
16464 if test $ol_cv_lib_db = no ; then
16465         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16466 echo "configure:16467: checking for Berkeley DB link (-ldb-4.2)" >&5
16467 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16468   echo $ac_n "(cached) $ac_c" 1>&6
16469 else
16470   
16471         ol_DB_LIB=-ldb-4.2
16472         ol_LIBS=$LIBS
16473         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16474
16475         cat > conftest.$ac_ext <<EOF
16476 #line 16477 "configure"
16477 #include "confdefs.h"
16478
16479 #ifdef HAVE_DB_185_H
16480 # include <db_185.h>
16481 #else
16482 # include <db.h>
16483 #endif
16484
16485 #ifndef DB_VERSION_MAJOR
16486 # define DB_VERSION_MAJOR 1
16487 #endif
16488
16489 #ifndef NULL
16490 #define NULL ((void*)0)
16491 #endif
16492
16493 int main() {
16494
16495 #if DB_VERSION_MAJOR > 1
16496         {
16497                 char *version;
16498                 int major, minor, patch;
16499
16500                 version = db_version( &major, &minor, &patch );
16501
16502                 if( major != DB_VERSION_MAJOR ||
16503                         minor < DB_VERSION_MINOR )
16504                 {
16505                         printf("Berkeley DB version mismatch\n"
16506                                 "\texpected: %s\n\tgot: %s\n",
16507                                 DB_VERSION_STRING, version);
16508                         return 1;
16509                 }
16510         }
16511 #endif
16512
16513 #if DB_VERSION_MAJOR > 2
16514         db_env_create( NULL, 0 );
16515 #elif DB_VERSION_MAJOR > 1
16516         db_appexit( NULL );
16517 #else
16518         (void) dbopen( NULL, 0, 0, 0, NULL);
16519 #endif
16520
16521 ; return 0; }
16522 EOF
16523 if { (eval echo configure:16524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16524   rm -rf conftest*
16525   ol_cv_db_db_4_dot_2=yes
16526 else
16527   echo "configure: failed program was:" >&5
16528   cat conftest.$ac_ext >&5
16529   rm -rf conftest*
16530   ol_cv_db_db_4_dot_2=no
16531 fi
16532 rm -f conftest*
16533
16534         LIBS="$ol_LIBS"
16535
16536 fi
16537
16538 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16539
16540         if test $ol_cv_db_db_4_dot_2 = yes ; then
16541                 ol_cv_lib_db=-ldb-4.2
16542         fi
16543 fi
16544
16545 if test $ol_cv_lib_db = no ; then
16546         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16547 echo "configure:16548: checking for Berkeley DB link (-ldb-4-2)" >&5
16548 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16549   echo $ac_n "(cached) $ac_c" 1>&6
16550 else
16551   
16552         ol_DB_LIB=-ldb-4-2
16553         ol_LIBS=$LIBS
16554         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16555
16556         cat > conftest.$ac_ext <<EOF
16557 #line 16558 "configure"
16558 #include "confdefs.h"
16559
16560 #ifdef HAVE_DB_185_H
16561 # include <db_185.h>
16562 #else
16563 # include <db.h>
16564 #endif
16565
16566 #ifndef DB_VERSION_MAJOR
16567 # define DB_VERSION_MAJOR 1
16568 #endif
16569
16570 #ifndef NULL
16571 #define NULL ((void*)0)
16572 #endif
16573
16574 int main() {
16575
16576 #if DB_VERSION_MAJOR > 1
16577         {
16578                 char *version;
16579                 int major, minor, patch;
16580
16581                 version = db_version( &major, &minor, &patch );
16582
16583                 if( major != DB_VERSION_MAJOR ||
16584                         minor < DB_VERSION_MINOR )
16585                 {
16586                         printf("Berkeley DB version mismatch\n"
16587                                 "\texpected: %s\n\tgot: %s\n",
16588                                 DB_VERSION_STRING, version);
16589                         return 1;
16590                 }
16591         }
16592 #endif
16593
16594 #if DB_VERSION_MAJOR > 2
16595         db_env_create( NULL, 0 );
16596 #elif DB_VERSION_MAJOR > 1
16597         db_appexit( NULL );
16598 #else
16599         (void) dbopen( NULL, 0, 0, 0, NULL);
16600 #endif
16601
16602 ; return 0; }
16603 EOF
16604 if { (eval echo configure:16605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16605   rm -rf conftest*
16606   ol_cv_db_db_4_2=yes
16607 else
16608   echo "configure: failed program was:" >&5
16609   cat conftest.$ac_ext >&5
16610   rm -rf conftest*
16611   ol_cv_db_db_4_2=no
16612 fi
16613 rm -f conftest*
16614
16615         LIBS="$ol_LIBS"
16616
16617 fi
16618
16619 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
16620
16621         if test $ol_cv_db_db_4_2 = yes ; then
16622                 ol_cv_lib_db=-ldb-4-2
16623         fi
16624 fi
16625
16626 if test $ol_cv_lib_db = no ; then
16627         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16628 echo "configure:16629: checking for Berkeley DB link (-ldb-4)" >&5
16629 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
16630   echo $ac_n "(cached) $ac_c" 1>&6
16631 else
16632   
16633         ol_DB_LIB=-ldb-4
16634         ol_LIBS=$LIBS
16635         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16636
16637         cat > conftest.$ac_ext <<EOF
16638 #line 16639 "configure"
16639 #include "confdefs.h"
16640
16641 #ifdef HAVE_DB_185_H
16642 # include <db_185.h>
16643 #else
16644 # include <db.h>
16645 #endif
16646
16647 #ifndef DB_VERSION_MAJOR
16648 # define DB_VERSION_MAJOR 1
16649 #endif
16650
16651 #ifndef NULL
16652 #define NULL ((void*)0)
16653 #endif
16654
16655 int main() {
16656
16657 #if DB_VERSION_MAJOR > 1
16658         {
16659                 char *version;
16660                 int major, minor, patch;
16661
16662                 version = db_version( &major, &minor, &patch );
16663
16664                 if( major != DB_VERSION_MAJOR ||
16665                         minor < DB_VERSION_MINOR )
16666                 {
16667                         printf("Berkeley DB version mismatch\n"
16668                                 "\texpected: %s\n\tgot: %s\n",
16669                                 DB_VERSION_STRING, version);
16670                         return 1;
16671                 }
16672         }
16673 #endif
16674
16675 #if DB_VERSION_MAJOR > 2
16676         db_env_create( NULL, 0 );
16677 #elif DB_VERSION_MAJOR > 1
16678         db_appexit( NULL );
16679 #else
16680         (void) dbopen( NULL, 0, 0, 0, NULL);
16681 #endif
16682
16683 ; return 0; }
16684 EOF
16685 if { (eval echo configure:16686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16686   rm -rf conftest*
16687   ol_cv_db_db_4=yes
16688 else
16689   echo "configure: failed program was:" >&5
16690   cat conftest.$ac_ext >&5
16691   rm -rf conftest*
16692   ol_cv_db_db_4=no
16693 fi
16694 rm -f conftest*
16695
16696         LIBS="$ol_LIBS"
16697
16698 fi
16699
16700 echo "$ac_t""$ol_cv_db_db_4" 1>&6
16701
16702         if test $ol_cv_db_db_4 = yes ; then
16703                 ol_cv_lib_db=-ldb-4
16704         fi
16705 fi
16706
16707 if test $ol_cv_lib_db = no ; then
16708         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16709 echo "configure:16710: checking for Berkeley DB link (-ldb4)" >&5
16710 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16711   echo $ac_n "(cached) $ac_c" 1>&6
16712 else
16713   
16714         ol_DB_LIB=-ldb4
16715         ol_LIBS=$LIBS
16716         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16717
16718         cat > conftest.$ac_ext <<EOF
16719 #line 16720 "configure"
16720 #include "confdefs.h"
16721
16722 #ifdef HAVE_DB_185_H
16723 # include <db_185.h>
16724 #else
16725 # include <db.h>
16726 #endif
16727
16728 #ifndef DB_VERSION_MAJOR
16729 # define DB_VERSION_MAJOR 1
16730 #endif
16731
16732 #ifndef NULL
16733 #define NULL ((void*)0)
16734 #endif
16735
16736 int main() {
16737
16738 #if DB_VERSION_MAJOR > 1
16739         {
16740                 char *version;
16741                 int major, minor, patch;
16742
16743                 version = db_version( &major, &minor, &patch );
16744
16745                 if( major != DB_VERSION_MAJOR ||
16746                         minor < DB_VERSION_MINOR )
16747                 {
16748                         printf("Berkeley DB version mismatch\n"
16749                                 "\texpected: %s\n\tgot: %s\n",
16750                                 DB_VERSION_STRING, version);
16751                         return 1;
16752                 }
16753         }
16754 #endif
16755
16756 #if DB_VERSION_MAJOR > 2
16757         db_env_create( NULL, 0 );
16758 #elif DB_VERSION_MAJOR > 1
16759         db_appexit( NULL );
16760 #else
16761         (void) dbopen( NULL, 0, 0, 0, NULL);
16762 #endif
16763
16764 ; return 0; }
16765 EOF
16766 if { (eval echo configure:16767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16767   rm -rf conftest*
16768   ol_cv_db_db4=yes
16769 else
16770   echo "configure: failed program was:" >&5
16771   cat conftest.$ac_ext >&5
16772   rm -rf conftest*
16773   ol_cv_db_db4=no
16774 fi
16775 rm -f conftest*
16776
16777         LIBS="$ol_LIBS"
16778
16779 fi
16780
16781 echo "$ac_t""$ol_cv_db_db4" 1>&6
16782
16783         if test $ol_cv_db_db4 = yes ; then
16784                 ol_cv_lib_db=-ldb4
16785         fi
16786 fi
16787
16788 if test $ol_cv_lib_db = no ; then
16789         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
16790 echo "configure:16791: checking for Berkeley DB link (-ldb)" >&5
16791 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
16792   echo $ac_n "(cached) $ac_c" 1>&6
16793 else
16794   
16795         ol_DB_LIB=-ldb
16796         ol_LIBS=$LIBS
16797         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16798
16799         cat > conftest.$ac_ext <<EOF
16800 #line 16801 "configure"
16801 #include "confdefs.h"
16802
16803 #ifdef HAVE_DB_185_H
16804 # include <db_185.h>
16805 #else
16806 # include <db.h>
16807 #endif
16808
16809 #ifndef DB_VERSION_MAJOR
16810 # define DB_VERSION_MAJOR 1
16811 #endif
16812
16813 #ifndef NULL
16814 #define NULL ((void*)0)
16815 #endif
16816
16817 int main() {
16818
16819 #if DB_VERSION_MAJOR > 1
16820         {
16821                 char *version;
16822                 int major, minor, patch;
16823
16824                 version = db_version( &major, &minor, &patch );
16825
16826                 if( major != DB_VERSION_MAJOR ||
16827                         minor < DB_VERSION_MINOR )
16828                 {
16829                         printf("Berkeley DB version mismatch\n"
16830                                 "\texpected: %s\n\tgot: %s\n",
16831                                 DB_VERSION_STRING, version);
16832                         return 1;
16833                 }
16834         }
16835 #endif
16836
16837 #if DB_VERSION_MAJOR > 2
16838         db_env_create( NULL, 0 );
16839 #elif DB_VERSION_MAJOR > 1
16840         db_appexit( NULL );
16841 #else
16842         (void) dbopen( NULL, 0, 0, 0, NULL);
16843 #endif
16844
16845 ; return 0; }
16846 EOF
16847 if { (eval echo configure:16848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16848   rm -rf conftest*
16849   ol_cv_db_db=yes
16850 else
16851   echo "configure: failed program was:" >&5
16852   cat conftest.$ac_ext >&5
16853   rm -rf conftest*
16854   ol_cv_db_db=no
16855 fi
16856 rm -f conftest*
16857
16858         LIBS="$ol_LIBS"
16859
16860 fi
16861
16862 echo "$ac_t""$ol_cv_db_db" 1>&6
16863
16864         if test $ol_cv_db_db = yes ; then
16865                 ol_cv_lib_db=-ldb
16866         fi
16867 fi
16868
16869 if test $ol_cv_lib_db = no ; then
16870         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
16871 echo "configure:16872: checking for Berkeley DB link (-ldb41)" >&5
16872 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
16873   echo $ac_n "(cached) $ac_c" 1>&6
16874 else
16875   
16876         ol_DB_LIB=-ldb41
16877         ol_LIBS=$LIBS
16878         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16879
16880         cat > conftest.$ac_ext <<EOF
16881 #line 16882 "configure"
16882 #include "confdefs.h"
16883
16884 #ifdef HAVE_DB_185_H
16885 # include <db_185.h>
16886 #else
16887 # include <db.h>
16888 #endif
16889
16890 #ifndef DB_VERSION_MAJOR
16891 # define DB_VERSION_MAJOR 1
16892 #endif
16893
16894 #ifndef NULL
16895 #define NULL ((void*)0)
16896 #endif
16897
16898 int main() {
16899
16900 #if DB_VERSION_MAJOR > 1
16901         {
16902                 char *version;
16903                 int major, minor, patch;
16904
16905                 version = db_version( &major, &minor, &patch );
16906
16907                 if( major != DB_VERSION_MAJOR ||
16908                         minor < DB_VERSION_MINOR )
16909                 {
16910                         printf("Berkeley DB version mismatch\n"
16911                                 "\texpected: %s\n\tgot: %s\n",
16912                                 DB_VERSION_STRING, version);
16913                         return 1;
16914                 }
16915         }
16916 #endif
16917
16918 #if DB_VERSION_MAJOR > 2
16919         db_env_create( NULL, 0 );
16920 #elif DB_VERSION_MAJOR > 1
16921         db_appexit( NULL );
16922 #else
16923         (void) dbopen( NULL, 0, 0, 0, NULL);
16924 #endif
16925
16926 ; return 0; }
16927 EOF
16928 if { (eval echo configure:16929: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16929   rm -rf conftest*
16930   ol_cv_db_db41=yes
16931 else
16932   echo "configure: failed program was:" >&5
16933   cat conftest.$ac_ext >&5
16934   rm -rf conftest*
16935   ol_cv_db_db41=no
16936 fi
16937 rm -f conftest*
16938
16939         LIBS="$ol_LIBS"
16940
16941 fi
16942
16943 echo "$ac_t""$ol_cv_db_db41" 1>&6
16944
16945         if test $ol_cv_db_db41 = yes ; then
16946                 ol_cv_lib_db=-ldb41
16947         fi
16948 fi
16949
16950 if test $ol_cv_lib_db = no ; then
16951         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
16952 echo "configure:16953: checking for Berkeley DB link (-ldb-41)" >&5
16953 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
16954   echo $ac_n "(cached) $ac_c" 1>&6
16955 else
16956   
16957         ol_DB_LIB=-ldb-41
16958         ol_LIBS=$LIBS
16959         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16960
16961         cat > conftest.$ac_ext <<EOF
16962 #line 16963 "configure"
16963 #include "confdefs.h"
16964
16965 #ifdef HAVE_DB_185_H
16966 # include <db_185.h>
16967 #else
16968 # include <db.h>
16969 #endif
16970
16971 #ifndef DB_VERSION_MAJOR
16972 # define DB_VERSION_MAJOR 1
16973 #endif
16974
16975 #ifndef NULL
16976 #define NULL ((void*)0)
16977 #endif
16978
16979 int main() {
16980
16981 #if DB_VERSION_MAJOR > 1
16982         {
16983                 char *version;
16984                 int major, minor, patch;
16985
16986                 version = db_version( &major, &minor, &patch );
16987
16988                 if( major != DB_VERSION_MAJOR ||
16989                         minor < DB_VERSION_MINOR )
16990                 {
16991                         printf("Berkeley DB version mismatch\n"
16992                                 "\texpected: %s\n\tgot: %s\n",
16993                                 DB_VERSION_STRING, version);
16994                         return 1;
16995                 }
16996         }
16997 #endif
16998
16999 #if DB_VERSION_MAJOR > 2
17000         db_env_create( NULL, 0 );
17001 #elif DB_VERSION_MAJOR > 1
17002         db_appexit( NULL );
17003 #else
17004         (void) dbopen( NULL, 0, 0, 0, NULL);
17005 #endif
17006
17007 ; return 0; }
17008 EOF
17009 if { (eval echo configure:17010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17010   rm -rf conftest*
17011   ol_cv_db_db_41=yes
17012 else
17013   echo "configure: failed program was:" >&5
17014   cat conftest.$ac_ext >&5
17015   rm -rf conftest*
17016   ol_cv_db_db_41=no
17017 fi
17018 rm -f conftest*
17019
17020         LIBS="$ol_LIBS"
17021
17022 fi
17023
17024 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17025
17026         if test $ol_cv_db_db_41 = yes ; then
17027                 ol_cv_lib_db=-ldb-41
17028         fi
17029 fi
17030
17031 if test $ol_cv_lib_db = no ; then
17032         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17033 echo "configure:17034: checking for Berkeley DB link (-ldb-4.1)" >&5
17034 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17035   echo $ac_n "(cached) $ac_c" 1>&6
17036 else
17037   
17038         ol_DB_LIB=-ldb-4.1
17039         ol_LIBS=$LIBS
17040         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17041
17042         cat > conftest.$ac_ext <<EOF
17043 #line 17044 "configure"
17044 #include "confdefs.h"
17045
17046 #ifdef HAVE_DB_185_H
17047 # include <db_185.h>
17048 #else
17049 # include <db.h>
17050 #endif
17051
17052 #ifndef DB_VERSION_MAJOR
17053 # define DB_VERSION_MAJOR 1
17054 #endif
17055
17056 #ifndef NULL
17057 #define NULL ((void*)0)
17058 #endif
17059
17060 int main() {
17061
17062 #if DB_VERSION_MAJOR > 1
17063         {
17064                 char *version;
17065                 int major, minor, patch;
17066
17067                 version = db_version( &major, &minor, &patch );
17068
17069                 if( major != DB_VERSION_MAJOR ||
17070                         minor < DB_VERSION_MINOR )
17071                 {
17072                         printf("Berkeley DB version mismatch\n"
17073                                 "\texpected: %s\n\tgot: %s\n",
17074                                 DB_VERSION_STRING, version);
17075                         return 1;
17076                 }
17077         }
17078 #endif
17079
17080 #if DB_VERSION_MAJOR > 2
17081         db_env_create( NULL, 0 );
17082 #elif DB_VERSION_MAJOR > 1
17083         db_appexit( NULL );
17084 #else
17085         (void) dbopen( NULL, 0, 0, 0, NULL);
17086 #endif
17087
17088 ; return 0; }
17089 EOF
17090 if { (eval echo configure:17091: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17091   rm -rf conftest*
17092   ol_cv_db_db_4_dot_1=yes
17093 else
17094   echo "configure: failed program was:" >&5
17095   cat conftest.$ac_ext >&5
17096   rm -rf conftest*
17097   ol_cv_db_db_4_dot_1=no
17098 fi
17099 rm -f conftest*
17100
17101         LIBS="$ol_LIBS"
17102
17103 fi
17104
17105 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17106
17107         if test $ol_cv_db_db_4_dot_1 = yes ; then
17108                 ol_cv_lib_db=-ldb-4.1
17109         fi
17110 fi
17111
17112 if test $ol_cv_lib_db = no ; then
17113         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17114 echo "configure:17115: checking for Berkeley DB link (-ldb-4-1)" >&5
17115 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17116   echo $ac_n "(cached) $ac_c" 1>&6
17117 else
17118   
17119         ol_DB_LIB=-ldb-4-1
17120         ol_LIBS=$LIBS
17121         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17122
17123         cat > conftest.$ac_ext <<EOF
17124 #line 17125 "configure"
17125 #include "confdefs.h"
17126
17127 #ifdef HAVE_DB_185_H
17128 # include <db_185.h>
17129 #else
17130 # include <db.h>
17131 #endif
17132
17133 #ifndef DB_VERSION_MAJOR
17134 # define DB_VERSION_MAJOR 1
17135 #endif
17136
17137 #ifndef NULL
17138 #define NULL ((void*)0)
17139 #endif
17140
17141 int main() {
17142
17143 #if DB_VERSION_MAJOR > 1
17144         {
17145                 char *version;
17146                 int major, minor, patch;
17147
17148                 version = db_version( &major, &minor, &patch );
17149
17150                 if( major != DB_VERSION_MAJOR ||
17151                         minor < DB_VERSION_MINOR )
17152                 {
17153                         printf("Berkeley DB version mismatch\n"
17154                                 "\texpected: %s\n\tgot: %s\n",
17155                                 DB_VERSION_STRING, version);
17156                         return 1;
17157                 }
17158         }
17159 #endif
17160
17161 #if DB_VERSION_MAJOR > 2
17162         db_env_create( NULL, 0 );
17163 #elif DB_VERSION_MAJOR > 1
17164         db_appexit( NULL );
17165 #else
17166         (void) dbopen( NULL, 0, 0, 0, NULL);
17167 #endif
17168
17169 ; return 0; }
17170 EOF
17171 if { (eval echo configure:17172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17172   rm -rf conftest*
17173   ol_cv_db_db_4_1=yes
17174 else
17175   echo "configure: failed program was:" >&5
17176   cat conftest.$ac_ext >&5
17177   rm -rf conftest*
17178   ol_cv_db_db_4_1=no
17179 fi
17180 rm -f conftest*
17181
17182         LIBS="$ol_LIBS"
17183
17184 fi
17185
17186 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17187
17188         if test $ol_cv_db_db_4_1 = yes ; then
17189                 ol_cv_lib_db=-ldb-4-1
17190         fi
17191 fi
17192
17193 if test $ol_cv_lib_db = no ; then
17194         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17195 echo "configure:17196: checking for Berkeley DB link (-ldb3)" >&5
17196 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17197   echo $ac_n "(cached) $ac_c" 1>&6
17198 else
17199   
17200         ol_DB_LIB=-ldb3
17201         ol_LIBS=$LIBS
17202         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17203
17204         cat > conftest.$ac_ext <<EOF
17205 #line 17206 "configure"
17206 #include "confdefs.h"
17207
17208 #ifdef HAVE_DB_185_H
17209 # include <db_185.h>
17210 #else
17211 # include <db.h>
17212 #endif
17213
17214 #ifndef DB_VERSION_MAJOR
17215 # define DB_VERSION_MAJOR 1
17216 #endif
17217
17218 #ifndef NULL
17219 #define NULL ((void*)0)
17220 #endif
17221
17222 int main() {
17223
17224 #if DB_VERSION_MAJOR > 1
17225         {
17226                 char *version;
17227                 int major, minor, patch;
17228
17229                 version = db_version( &major, &minor, &patch );
17230
17231                 if( major != DB_VERSION_MAJOR ||
17232                         minor < DB_VERSION_MINOR )
17233                 {
17234                         printf("Berkeley DB version mismatch\n"
17235                                 "\texpected: %s\n\tgot: %s\n",
17236                                 DB_VERSION_STRING, version);
17237                         return 1;
17238                 }
17239         }
17240 #endif
17241
17242 #if DB_VERSION_MAJOR > 2
17243         db_env_create( NULL, 0 );
17244 #elif DB_VERSION_MAJOR > 1
17245         db_appexit( NULL );
17246 #else
17247         (void) dbopen( NULL, 0, 0, 0, NULL);
17248 #endif
17249
17250 ; return 0; }
17251 EOF
17252 if { (eval echo configure:17253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17253   rm -rf conftest*
17254   ol_cv_db_db3=yes
17255 else
17256   echo "configure: failed program was:" >&5
17257   cat conftest.$ac_ext >&5
17258   rm -rf conftest*
17259   ol_cv_db_db3=no
17260 fi
17261 rm -f conftest*
17262
17263         LIBS="$ol_LIBS"
17264
17265 fi
17266
17267 echo "$ac_t""$ol_cv_db_db3" 1>&6
17268
17269         if test $ol_cv_db_db3 = yes ; then
17270                 ol_cv_lib_db=-ldb3
17271         fi
17272 fi
17273
17274 if test $ol_cv_lib_db = no ; then
17275         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17276 echo "configure:17277: checking for Berkeley DB link (-ldb-3)" >&5
17277 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17278   echo $ac_n "(cached) $ac_c" 1>&6
17279 else
17280   
17281         ol_DB_LIB=-ldb-3
17282         ol_LIBS=$LIBS
17283         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17284
17285         cat > conftest.$ac_ext <<EOF
17286 #line 17287 "configure"
17287 #include "confdefs.h"
17288
17289 #ifdef HAVE_DB_185_H
17290 # include <db_185.h>
17291 #else
17292 # include <db.h>
17293 #endif
17294
17295 #ifndef DB_VERSION_MAJOR
17296 # define DB_VERSION_MAJOR 1
17297 #endif
17298
17299 #ifndef NULL
17300 #define NULL ((void*)0)
17301 #endif
17302
17303 int main() {
17304
17305 #if DB_VERSION_MAJOR > 1
17306         {
17307                 char *version;
17308                 int major, minor, patch;
17309
17310                 version = db_version( &major, &minor, &patch );
17311
17312                 if( major != DB_VERSION_MAJOR ||
17313                         minor < DB_VERSION_MINOR )
17314                 {
17315                         printf("Berkeley DB version mismatch\n"
17316                                 "\texpected: %s\n\tgot: %s\n",
17317                                 DB_VERSION_STRING, version);
17318                         return 1;
17319                 }
17320         }
17321 #endif
17322
17323 #if DB_VERSION_MAJOR > 2
17324         db_env_create( NULL, 0 );
17325 #elif DB_VERSION_MAJOR > 1
17326         db_appexit( NULL );
17327 #else
17328         (void) dbopen( NULL, 0, 0, 0, NULL);
17329 #endif
17330
17331 ; return 0; }
17332 EOF
17333 if { (eval echo configure:17334: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17334   rm -rf conftest*
17335   ol_cv_db_db_3=yes
17336 else
17337   echo "configure: failed program was:" >&5
17338   cat conftest.$ac_ext >&5
17339   rm -rf conftest*
17340   ol_cv_db_db_3=no
17341 fi
17342 rm -f conftest*
17343
17344         LIBS="$ol_LIBS"
17345
17346 fi
17347
17348 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17349
17350         if test $ol_cv_db_db_3 = yes ; then
17351                 ol_cv_lib_db=-ldb-3
17352         fi
17353 fi
17354
17355 if test $ol_cv_lib_db = no ; then
17356         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17357 echo "configure:17358: checking for Berkeley DB link (-ldb2)" >&5
17358 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17359   echo $ac_n "(cached) $ac_c" 1>&6
17360 else
17361   
17362         ol_DB_LIB=-ldb2
17363         ol_LIBS=$LIBS
17364         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17365
17366         cat > conftest.$ac_ext <<EOF
17367 #line 17368 "configure"
17368 #include "confdefs.h"
17369
17370 #ifdef HAVE_DB_185_H
17371 # include <db_185.h>
17372 #else
17373 # include <db.h>
17374 #endif
17375
17376 #ifndef DB_VERSION_MAJOR
17377 # define DB_VERSION_MAJOR 1
17378 #endif
17379
17380 #ifndef NULL
17381 #define NULL ((void*)0)
17382 #endif
17383
17384 int main() {
17385
17386 #if DB_VERSION_MAJOR > 1
17387         {
17388                 char *version;
17389                 int major, minor, patch;
17390
17391                 version = db_version( &major, &minor, &patch );
17392
17393                 if( major != DB_VERSION_MAJOR ||
17394                         minor < DB_VERSION_MINOR )
17395                 {
17396                         printf("Berkeley DB version mismatch\n"
17397                                 "\texpected: %s\n\tgot: %s\n",
17398                                 DB_VERSION_STRING, version);
17399                         return 1;
17400                 }
17401         }
17402 #endif
17403
17404 #if DB_VERSION_MAJOR > 2
17405         db_env_create( NULL, 0 );
17406 #elif DB_VERSION_MAJOR > 1
17407         db_appexit( NULL );
17408 #else
17409         (void) dbopen( NULL, 0, 0, 0, NULL);
17410 #endif
17411
17412 ; return 0; }
17413 EOF
17414 if { (eval echo configure:17415: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17415   rm -rf conftest*
17416   ol_cv_db_db2=yes
17417 else
17418   echo "configure: failed program was:" >&5
17419   cat conftest.$ac_ext >&5
17420   rm -rf conftest*
17421   ol_cv_db_db2=no
17422 fi
17423 rm -f conftest*
17424
17425         LIBS="$ol_LIBS"
17426
17427 fi
17428
17429 echo "$ac_t""$ol_cv_db_db2" 1>&6
17430
17431         if test $ol_cv_db_db2 = yes ; then
17432                 ol_cv_lib_db=-ldb2
17433         fi
17434 fi
17435
17436 if test $ol_cv_lib_db = no ; then
17437         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17438 echo "configure:17439: checking for Berkeley DB link (-ldb-2)" >&5
17439 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17440   echo $ac_n "(cached) $ac_c" 1>&6
17441 else
17442   
17443         ol_DB_LIB=-ldb-2
17444         ol_LIBS=$LIBS
17445         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17446
17447         cat > conftest.$ac_ext <<EOF
17448 #line 17449 "configure"
17449 #include "confdefs.h"
17450
17451 #ifdef HAVE_DB_185_H
17452 # include <db_185.h>
17453 #else
17454 # include <db.h>
17455 #endif
17456
17457 #ifndef DB_VERSION_MAJOR
17458 # define DB_VERSION_MAJOR 1
17459 #endif
17460
17461 #ifndef NULL
17462 #define NULL ((void*)0)
17463 #endif
17464
17465 int main() {
17466
17467 #if DB_VERSION_MAJOR > 1
17468         {
17469                 char *version;
17470                 int major, minor, patch;
17471
17472                 version = db_version( &major, &minor, &patch );
17473
17474                 if( major != DB_VERSION_MAJOR ||
17475                         minor < DB_VERSION_MINOR )
17476                 {
17477                         printf("Berkeley DB version mismatch\n"
17478                                 "\texpected: %s\n\tgot: %s\n",
17479                                 DB_VERSION_STRING, version);
17480                         return 1;
17481                 }
17482         }
17483 #endif
17484
17485 #if DB_VERSION_MAJOR > 2
17486         db_env_create( NULL, 0 );
17487 #elif DB_VERSION_MAJOR > 1
17488         db_appexit( NULL );
17489 #else
17490         (void) dbopen( NULL, 0, 0, 0, NULL);
17491 #endif
17492
17493 ; return 0; }
17494 EOF
17495 if { (eval echo configure:17496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17496   rm -rf conftest*
17497   ol_cv_db_db_2=yes
17498 else
17499   echo "configure: failed program was:" >&5
17500   cat conftest.$ac_ext >&5
17501   rm -rf conftest*
17502   ol_cv_db_db_2=no
17503 fi
17504 rm -f conftest*
17505
17506         LIBS="$ol_LIBS"
17507
17508 fi
17509
17510 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17511
17512         if test $ol_cv_db_db_2 = yes ; then
17513                 ol_cv_lib_db=-ldb-2
17514         fi
17515 fi
17516
17517 if test $ol_cv_lib_db = no ; then
17518         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17519 echo "configure:17520: checking for Berkeley DB link (-ldb1)" >&5
17520 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17521   echo $ac_n "(cached) $ac_c" 1>&6
17522 else
17523   
17524         ol_DB_LIB=-ldb1
17525         ol_LIBS=$LIBS
17526         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17527
17528         cat > conftest.$ac_ext <<EOF
17529 #line 17530 "configure"
17530 #include "confdefs.h"
17531
17532 #ifdef HAVE_DB_185_H
17533 # include <db_185.h>
17534 #else
17535 # include <db.h>
17536 #endif
17537
17538 #ifndef DB_VERSION_MAJOR
17539 # define DB_VERSION_MAJOR 1
17540 #endif
17541
17542 #ifndef NULL
17543 #define NULL ((void*)0)
17544 #endif
17545
17546 int main() {
17547
17548 #if DB_VERSION_MAJOR > 1
17549         {
17550                 char *version;
17551                 int major, minor, patch;
17552
17553                 version = db_version( &major, &minor, &patch );
17554
17555                 if( major != DB_VERSION_MAJOR ||
17556                         minor < DB_VERSION_MINOR )
17557                 {
17558                         printf("Berkeley DB version mismatch\n"
17559                                 "\texpected: %s\n\tgot: %s\n",
17560                                 DB_VERSION_STRING, version);
17561                         return 1;
17562                 }
17563         }
17564 #endif
17565
17566 #if DB_VERSION_MAJOR > 2
17567         db_env_create( NULL, 0 );
17568 #elif DB_VERSION_MAJOR > 1
17569         db_appexit( NULL );
17570 #else
17571         (void) dbopen( NULL, 0, 0, 0, NULL);
17572 #endif
17573
17574 ; return 0; }
17575 EOF
17576 if { (eval echo configure:17577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17577   rm -rf conftest*
17578   ol_cv_db_db1=yes
17579 else
17580   echo "configure: failed program was:" >&5
17581   cat conftest.$ac_ext >&5
17582   rm -rf conftest*
17583   ol_cv_db_db1=no
17584 fi
17585 rm -f conftest*
17586
17587         LIBS="$ol_LIBS"
17588
17589 fi
17590
17591 echo "$ac_t""$ol_cv_db_db1" 1>&6
17592
17593         if test $ol_cv_db_db1 = yes ; then
17594                 ol_cv_lib_db=-ldb1
17595         fi
17596 fi
17597
17598 if test $ol_cv_lib_db = no ; then
17599         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17600 echo "configure:17601: checking for Berkeley DB link (-ldb-1)" >&5
17601 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17602   echo $ac_n "(cached) $ac_c" 1>&6
17603 else
17604   
17605         ol_DB_LIB=-ldb-1
17606         ol_LIBS=$LIBS
17607         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17608
17609         cat > conftest.$ac_ext <<EOF
17610 #line 17611 "configure"
17611 #include "confdefs.h"
17612
17613 #ifdef HAVE_DB_185_H
17614 # include <db_185.h>
17615 #else
17616 # include <db.h>
17617 #endif
17618
17619 #ifndef DB_VERSION_MAJOR
17620 # define DB_VERSION_MAJOR 1
17621 #endif
17622
17623 #ifndef NULL
17624 #define NULL ((void*)0)
17625 #endif
17626
17627 int main() {
17628
17629 #if DB_VERSION_MAJOR > 1
17630         {
17631                 char *version;
17632                 int major, minor, patch;
17633
17634                 version = db_version( &major, &minor, &patch );
17635
17636                 if( major != DB_VERSION_MAJOR ||
17637                         minor < DB_VERSION_MINOR )
17638                 {
17639                         printf("Berkeley DB version mismatch\n"
17640                                 "\texpected: %s\n\tgot: %s\n",
17641                                 DB_VERSION_STRING, version);
17642                         return 1;
17643                 }
17644         }
17645 #endif
17646
17647 #if DB_VERSION_MAJOR > 2
17648         db_env_create( NULL, 0 );
17649 #elif DB_VERSION_MAJOR > 1
17650         db_appexit( NULL );
17651 #else
17652         (void) dbopen( NULL, 0, 0, 0, NULL);
17653 #endif
17654
17655 ; return 0; }
17656 EOF
17657 if { (eval echo configure:17658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17658   rm -rf conftest*
17659   ol_cv_db_db_1=yes
17660 else
17661   echo "configure: failed program was:" >&5
17662   cat conftest.$ac_ext >&5
17663   rm -rf conftest*
17664   ol_cv_db_db_1=no
17665 fi
17666 rm -f conftest*
17667
17668         LIBS="$ol_LIBS"
17669
17670 fi
17671
17672 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17673
17674         if test $ol_cv_db_db_1 = yes ; then
17675                 ol_cv_lib_db=-ldb-1
17676         fi
17677 fi
17678
17679
17680                 if test "$ol_cv_lib_db" != no ; then
17681                         ol_cv_berkeley_db=yes
17682                 fi
17683         fi
17684 fi
17685
17686         else
17687                 ol_cv_berkeley_db=no
17688 for ac_hdr in db.h
17689 do
17690 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17691 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17692 echo "configure:17693: checking for $ac_hdr" >&5
17693 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17694   echo $ac_n "(cached) $ac_c" 1>&6
17695 else
17696   cat > conftest.$ac_ext <<EOF
17697 #line 17698 "configure"
17698 #include "confdefs.h"
17699 #include <$ac_hdr>
17700 EOF
17701 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17702 { (eval echo configure:17703: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17703 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17704 if test -z "$ac_err"; then
17705   rm -rf conftest*
17706   eval "ac_cv_header_$ac_safe=yes"
17707 else
17708   echo "$ac_err" >&5
17709   echo "configure: failed program was:" >&5
17710   cat conftest.$ac_ext >&5
17711   rm -rf conftest*
17712   eval "ac_cv_header_$ac_safe=no"
17713 fi
17714 rm -f conftest*
17715 fi
17716 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17717   echo "$ac_t""yes" 1>&6
17718     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17719   cat >> confdefs.h <<EOF
17720 #define $ac_tr_hdr 1
17721 EOF
17722  
17723 else
17724   echo "$ac_t""no" 1>&6
17725 fi
17726 done
17727
17728 if test $ac_cv_header_db_h = yes; then
17729         ol_cv_lib_db=no
17730 if test $ol_cv_lib_db = no ; then
17731         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17732 echo "configure:17733: checking for Berkeley DB link (default)" >&5
17733 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17734   echo $ac_n "(cached) $ac_c" 1>&6
17735 else
17736   
17737         ol_DB_LIB=
17738         ol_LIBS=$LIBS
17739         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17740
17741         cat > conftest.$ac_ext <<EOF
17742 #line 17743 "configure"
17743 #include "confdefs.h"
17744
17745 #ifdef HAVE_DB_185_H
17746 # include <db_185.h>
17747 #else
17748 # include <db.h>
17749 #endif
17750
17751 #ifndef DB_VERSION_MAJOR
17752 # define DB_VERSION_MAJOR 1
17753 #endif
17754
17755 #ifndef NULL
17756 #define NULL ((void*)0)
17757 #endif
17758
17759 int main() {
17760
17761 #if DB_VERSION_MAJOR > 1
17762         {
17763                 char *version;
17764                 int major, minor, patch;
17765
17766                 version = db_version( &major, &minor, &patch );
17767
17768                 if( major != DB_VERSION_MAJOR ||
17769                         minor < DB_VERSION_MINOR )
17770                 {
17771                         printf("Berkeley DB version mismatch\n"
17772                                 "\texpected: %s\n\tgot: %s\n",
17773                                 DB_VERSION_STRING, version);
17774                         return 1;
17775                 }
17776         }
17777 #endif
17778
17779 #if DB_VERSION_MAJOR > 2
17780         db_env_create( NULL, 0 );
17781 #elif DB_VERSION_MAJOR > 1
17782         db_appexit( NULL );
17783 #else
17784         (void) dbopen( NULL, 0, 0, 0, NULL);
17785 #endif
17786
17787 ; return 0; }
17788 EOF
17789 if { (eval echo configure:17790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17790   rm -rf conftest*
17791   ol_cv_db_none=yes
17792 else
17793   echo "configure: failed program was:" >&5
17794   cat conftest.$ac_ext >&5
17795   rm -rf conftest*
17796   ol_cv_db_none=no
17797 fi
17798 rm -f conftest*
17799
17800         LIBS="$ol_LIBS"
17801
17802 fi
17803
17804 echo "$ac_t""$ol_cv_db_none" 1>&6
17805
17806         if test $ol_cv_db_none = yes ; then
17807                 ol_cv_lib_db=yes
17808         fi
17809 fi
17810
17811 if test $ol_cv_lib_db = no ; then
17812         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
17813 echo "configure:17814: checking for Berkeley DB link (-ldb42)" >&5
17814 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
17815   echo $ac_n "(cached) $ac_c" 1>&6
17816 else
17817   
17818         ol_DB_LIB=-ldb42
17819         ol_LIBS=$LIBS
17820         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17821
17822         cat > conftest.$ac_ext <<EOF
17823 #line 17824 "configure"
17824 #include "confdefs.h"
17825
17826 #ifdef HAVE_DB_185_H
17827 # include <db_185.h>
17828 #else
17829 # include <db.h>
17830 #endif
17831
17832 #ifndef DB_VERSION_MAJOR
17833 # define DB_VERSION_MAJOR 1
17834 #endif
17835
17836 #ifndef NULL
17837 #define NULL ((void*)0)
17838 #endif
17839
17840 int main() {
17841
17842 #if DB_VERSION_MAJOR > 1
17843         {
17844                 char *version;
17845                 int major, minor, patch;
17846
17847                 version = db_version( &major, &minor, &patch );
17848
17849                 if( major != DB_VERSION_MAJOR ||
17850                         minor < DB_VERSION_MINOR )
17851                 {
17852                         printf("Berkeley DB version mismatch\n"
17853                                 "\texpected: %s\n\tgot: %s\n",
17854                                 DB_VERSION_STRING, version);
17855                         return 1;
17856                 }
17857         }
17858 #endif
17859
17860 #if DB_VERSION_MAJOR > 2
17861         db_env_create( NULL, 0 );
17862 #elif DB_VERSION_MAJOR > 1
17863         db_appexit( NULL );
17864 #else
17865         (void) dbopen( NULL, 0, 0, 0, NULL);
17866 #endif
17867
17868 ; return 0; }
17869 EOF
17870 if { (eval echo configure:17871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17871   rm -rf conftest*
17872   ol_cv_db_db42=yes
17873 else
17874   echo "configure: failed program was:" >&5
17875   cat conftest.$ac_ext >&5
17876   rm -rf conftest*
17877   ol_cv_db_db42=no
17878 fi
17879 rm -f conftest*
17880
17881         LIBS="$ol_LIBS"
17882
17883 fi
17884
17885 echo "$ac_t""$ol_cv_db_db42" 1>&6
17886
17887         if test $ol_cv_db_db42 = yes ; then
17888                 ol_cv_lib_db=-ldb42
17889         fi
17890 fi
17891
17892 if test $ol_cv_lib_db = no ; then
17893         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
17894 echo "configure:17895: checking for Berkeley DB link (-ldb-42)" >&5
17895 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
17896   echo $ac_n "(cached) $ac_c" 1>&6
17897 else
17898   
17899         ol_DB_LIB=-ldb-42
17900         ol_LIBS=$LIBS
17901         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17902
17903         cat > conftest.$ac_ext <<EOF
17904 #line 17905 "configure"
17905 #include "confdefs.h"
17906
17907 #ifdef HAVE_DB_185_H
17908 # include <db_185.h>
17909 #else
17910 # include <db.h>
17911 #endif
17912
17913 #ifndef DB_VERSION_MAJOR
17914 # define DB_VERSION_MAJOR 1
17915 #endif
17916
17917 #ifndef NULL
17918 #define NULL ((void*)0)
17919 #endif
17920
17921 int main() {
17922
17923 #if DB_VERSION_MAJOR > 1
17924         {
17925                 char *version;
17926                 int major, minor, patch;
17927
17928                 version = db_version( &major, &minor, &patch );
17929
17930                 if( major != DB_VERSION_MAJOR ||
17931                         minor < DB_VERSION_MINOR )
17932                 {
17933                         printf("Berkeley DB version mismatch\n"
17934                                 "\texpected: %s\n\tgot: %s\n",
17935                                 DB_VERSION_STRING, version);
17936                         return 1;
17937                 }
17938         }
17939 #endif
17940
17941 #if DB_VERSION_MAJOR > 2
17942         db_env_create( NULL, 0 );
17943 #elif DB_VERSION_MAJOR > 1
17944         db_appexit( NULL );
17945 #else
17946         (void) dbopen( NULL, 0, 0, 0, NULL);
17947 #endif
17948
17949 ; return 0; }
17950 EOF
17951 if { (eval echo configure:17952: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17952   rm -rf conftest*
17953   ol_cv_db_db_42=yes
17954 else
17955   echo "configure: failed program was:" >&5
17956   cat conftest.$ac_ext >&5
17957   rm -rf conftest*
17958   ol_cv_db_db_42=no
17959 fi
17960 rm -f conftest*
17961
17962         LIBS="$ol_LIBS"
17963
17964 fi
17965
17966 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17967
17968         if test $ol_cv_db_db_42 = yes ; then
17969                 ol_cv_lib_db=-ldb-42
17970         fi
17971 fi
17972
17973 if test $ol_cv_lib_db = no ; then
17974         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17975 echo "configure:17976: checking for Berkeley DB link (-ldb-4.2)" >&5
17976 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17977   echo $ac_n "(cached) $ac_c" 1>&6
17978 else
17979   
17980         ol_DB_LIB=-ldb-4.2
17981         ol_LIBS=$LIBS
17982         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17983
17984         cat > conftest.$ac_ext <<EOF
17985 #line 17986 "configure"
17986 #include "confdefs.h"
17987
17988 #ifdef HAVE_DB_185_H
17989 # include <db_185.h>
17990 #else
17991 # include <db.h>
17992 #endif
17993
17994 #ifndef DB_VERSION_MAJOR
17995 # define DB_VERSION_MAJOR 1
17996 #endif
17997
17998 #ifndef NULL
17999 #define NULL ((void*)0)
18000 #endif
18001
18002 int main() {
18003
18004 #if DB_VERSION_MAJOR > 1
18005         {
18006                 char *version;
18007                 int major, minor, patch;
18008
18009                 version = db_version( &major, &minor, &patch );
18010
18011                 if( major != DB_VERSION_MAJOR ||
18012                         minor < DB_VERSION_MINOR )
18013                 {
18014                         printf("Berkeley DB version mismatch\n"
18015                                 "\texpected: %s\n\tgot: %s\n",
18016                                 DB_VERSION_STRING, version);
18017                         return 1;
18018                 }
18019         }
18020 #endif
18021
18022 #if DB_VERSION_MAJOR > 2
18023         db_env_create( NULL, 0 );
18024 #elif DB_VERSION_MAJOR > 1
18025         db_appexit( NULL );
18026 #else
18027         (void) dbopen( NULL, 0, 0, 0, NULL);
18028 #endif
18029
18030 ; return 0; }
18031 EOF
18032 if { (eval echo configure:18033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18033   rm -rf conftest*
18034   ol_cv_db_db_4_dot_2=yes
18035 else
18036   echo "configure: failed program was:" >&5
18037   cat conftest.$ac_ext >&5
18038   rm -rf conftest*
18039   ol_cv_db_db_4_dot_2=no
18040 fi
18041 rm -f conftest*
18042
18043         LIBS="$ol_LIBS"
18044
18045 fi
18046
18047 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18048
18049         if test $ol_cv_db_db_4_dot_2 = yes ; then
18050                 ol_cv_lib_db=-ldb-4.2
18051         fi
18052 fi
18053
18054 if test $ol_cv_lib_db = no ; then
18055         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18056 echo "configure:18057: checking for Berkeley DB link (-ldb-4-2)" >&5
18057 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18058   echo $ac_n "(cached) $ac_c" 1>&6
18059 else
18060   
18061         ol_DB_LIB=-ldb-4-2
18062         ol_LIBS=$LIBS
18063         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18064
18065         cat > conftest.$ac_ext <<EOF
18066 #line 18067 "configure"
18067 #include "confdefs.h"
18068
18069 #ifdef HAVE_DB_185_H
18070 # include <db_185.h>
18071 #else
18072 # include <db.h>
18073 #endif
18074
18075 #ifndef DB_VERSION_MAJOR
18076 # define DB_VERSION_MAJOR 1
18077 #endif
18078
18079 #ifndef NULL
18080 #define NULL ((void*)0)
18081 #endif
18082
18083 int main() {
18084
18085 #if DB_VERSION_MAJOR > 1
18086         {
18087                 char *version;
18088                 int major, minor, patch;
18089
18090                 version = db_version( &major, &minor, &patch );
18091
18092                 if( major != DB_VERSION_MAJOR ||
18093                         minor < DB_VERSION_MINOR )
18094                 {
18095                         printf("Berkeley DB version mismatch\n"
18096                                 "\texpected: %s\n\tgot: %s\n",
18097                                 DB_VERSION_STRING, version);
18098                         return 1;
18099                 }
18100         }
18101 #endif
18102
18103 #if DB_VERSION_MAJOR > 2
18104         db_env_create( NULL, 0 );
18105 #elif DB_VERSION_MAJOR > 1
18106         db_appexit( NULL );
18107 #else
18108         (void) dbopen( NULL, 0, 0, 0, NULL);
18109 #endif
18110
18111 ; return 0; }
18112 EOF
18113 if { (eval echo configure:18114: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18114   rm -rf conftest*
18115   ol_cv_db_db_4_2=yes
18116 else
18117   echo "configure: failed program was:" >&5
18118   cat conftest.$ac_ext >&5
18119   rm -rf conftest*
18120   ol_cv_db_db_4_2=no
18121 fi
18122 rm -f conftest*
18123
18124         LIBS="$ol_LIBS"
18125
18126 fi
18127
18128 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18129
18130         if test $ol_cv_db_db_4_2 = yes ; then
18131                 ol_cv_lib_db=-ldb-4-2
18132         fi
18133 fi
18134
18135 if test $ol_cv_lib_db = no ; then
18136         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18137 echo "configure:18138: checking for Berkeley DB link (-ldb-4)" >&5
18138 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18139   echo $ac_n "(cached) $ac_c" 1>&6
18140 else
18141   
18142         ol_DB_LIB=-ldb-4
18143         ol_LIBS=$LIBS
18144         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18145
18146         cat > conftest.$ac_ext <<EOF
18147 #line 18148 "configure"
18148 #include "confdefs.h"
18149
18150 #ifdef HAVE_DB_185_H
18151 # include <db_185.h>
18152 #else
18153 # include <db.h>
18154 #endif
18155
18156 #ifndef DB_VERSION_MAJOR
18157 # define DB_VERSION_MAJOR 1
18158 #endif
18159
18160 #ifndef NULL
18161 #define NULL ((void*)0)
18162 #endif
18163
18164 int main() {
18165
18166 #if DB_VERSION_MAJOR > 1
18167         {
18168                 char *version;
18169                 int major, minor, patch;
18170
18171                 version = db_version( &major, &minor, &patch );
18172
18173                 if( major != DB_VERSION_MAJOR ||
18174                         minor < DB_VERSION_MINOR )
18175                 {
18176                         printf("Berkeley DB version mismatch\n"
18177                                 "\texpected: %s\n\tgot: %s\n",
18178                                 DB_VERSION_STRING, version);
18179                         return 1;
18180                 }
18181         }
18182 #endif
18183
18184 #if DB_VERSION_MAJOR > 2
18185         db_env_create( NULL, 0 );
18186 #elif DB_VERSION_MAJOR > 1
18187         db_appexit( NULL );
18188 #else
18189         (void) dbopen( NULL, 0, 0, 0, NULL);
18190 #endif
18191
18192 ; return 0; }
18193 EOF
18194 if { (eval echo configure:18195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18195   rm -rf conftest*
18196   ol_cv_db_db_4=yes
18197 else
18198   echo "configure: failed program was:" >&5
18199   cat conftest.$ac_ext >&5
18200   rm -rf conftest*
18201   ol_cv_db_db_4=no
18202 fi
18203 rm -f conftest*
18204
18205         LIBS="$ol_LIBS"
18206
18207 fi
18208
18209 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18210
18211         if test $ol_cv_db_db_4 = yes ; then
18212                 ol_cv_lib_db=-ldb-4
18213         fi
18214 fi
18215
18216 if test $ol_cv_lib_db = no ; then
18217         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18218 echo "configure:18219: checking for Berkeley DB link (-ldb4)" >&5
18219 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18220   echo $ac_n "(cached) $ac_c" 1>&6
18221 else
18222   
18223         ol_DB_LIB=-ldb4
18224         ol_LIBS=$LIBS
18225         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18226
18227         cat > conftest.$ac_ext <<EOF
18228 #line 18229 "configure"
18229 #include "confdefs.h"
18230
18231 #ifdef HAVE_DB_185_H
18232 # include <db_185.h>
18233 #else
18234 # include <db.h>
18235 #endif
18236
18237 #ifndef DB_VERSION_MAJOR
18238 # define DB_VERSION_MAJOR 1
18239 #endif
18240
18241 #ifndef NULL
18242 #define NULL ((void*)0)
18243 #endif
18244
18245 int main() {
18246
18247 #if DB_VERSION_MAJOR > 1
18248         {
18249                 char *version;
18250                 int major, minor, patch;
18251
18252                 version = db_version( &major, &minor, &patch );
18253
18254                 if( major != DB_VERSION_MAJOR ||
18255                         minor < DB_VERSION_MINOR )
18256                 {
18257                         printf("Berkeley DB version mismatch\n"
18258                                 "\texpected: %s\n\tgot: %s\n",
18259                                 DB_VERSION_STRING, version);
18260                         return 1;
18261                 }
18262         }
18263 #endif
18264
18265 #if DB_VERSION_MAJOR > 2
18266         db_env_create( NULL, 0 );
18267 #elif DB_VERSION_MAJOR > 1
18268         db_appexit( NULL );
18269 #else
18270         (void) dbopen( NULL, 0, 0, 0, NULL);
18271 #endif
18272
18273 ; return 0; }
18274 EOF
18275 if { (eval echo configure:18276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18276   rm -rf conftest*
18277   ol_cv_db_db4=yes
18278 else
18279   echo "configure: failed program was:" >&5
18280   cat conftest.$ac_ext >&5
18281   rm -rf conftest*
18282   ol_cv_db_db4=no
18283 fi
18284 rm -f conftest*
18285
18286         LIBS="$ol_LIBS"
18287
18288 fi
18289
18290 echo "$ac_t""$ol_cv_db_db4" 1>&6
18291
18292         if test $ol_cv_db_db4 = yes ; then
18293                 ol_cv_lib_db=-ldb4
18294         fi
18295 fi
18296
18297 if test $ol_cv_lib_db = no ; then
18298         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18299 echo "configure:18300: checking for Berkeley DB link (-ldb)" >&5
18300 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18301   echo $ac_n "(cached) $ac_c" 1>&6
18302 else
18303   
18304         ol_DB_LIB=-ldb
18305         ol_LIBS=$LIBS
18306         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18307
18308         cat > conftest.$ac_ext <<EOF
18309 #line 18310 "configure"
18310 #include "confdefs.h"
18311
18312 #ifdef HAVE_DB_185_H
18313 # include <db_185.h>
18314 #else
18315 # include <db.h>
18316 #endif
18317
18318 #ifndef DB_VERSION_MAJOR
18319 # define DB_VERSION_MAJOR 1
18320 #endif
18321
18322 #ifndef NULL
18323 #define NULL ((void*)0)
18324 #endif
18325
18326 int main() {
18327
18328 #if DB_VERSION_MAJOR > 1
18329         {
18330                 char *version;
18331                 int major, minor, patch;
18332
18333                 version = db_version( &major, &minor, &patch );
18334
18335                 if( major != DB_VERSION_MAJOR ||
18336                         minor < DB_VERSION_MINOR )
18337                 {
18338                         printf("Berkeley DB version mismatch\n"
18339                                 "\texpected: %s\n\tgot: %s\n",
18340                                 DB_VERSION_STRING, version);
18341                         return 1;
18342                 }
18343         }
18344 #endif
18345
18346 #if DB_VERSION_MAJOR > 2
18347         db_env_create( NULL, 0 );
18348 #elif DB_VERSION_MAJOR > 1
18349         db_appexit( NULL );
18350 #else
18351         (void) dbopen( NULL, 0, 0, 0, NULL);
18352 #endif
18353
18354 ; return 0; }
18355 EOF
18356 if { (eval echo configure:18357: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18357   rm -rf conftest*
18358   ol_cv_db_db=yes
18359 else
18360   echo "configure: failed program was:" >&5
18361   cat conftest.$ac_ext >&5
18362   rm -rf conftest*
18363   ol_cv_db_db=no
18364 fi
18365 rm -f conftest*
18366
18367         LIBS="$ol_LIBS"
18368
18369 fi
18370
18371 echo "$ac_t""$ol_cv_db_db" 1>&6
18372
18373         if test $ol_cv_db_db = yes ; then
18374                 ol_cv_lib_db=-ldb
18375         fi
18376 fi
18377
18378 if test $ol_cv_lib_db = no ; then
18379         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18380 echo "configure:18381: checking for Berkeley DB link (-ldb41)" >&5
18381 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18382   echo $ac_n "(cached) $ac_c" 1>&6
18383 else
18384   
18385         ol_DB_LIB=-ldb41
18386         ol_LIBS=$LIBS
18387         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18388
18389         cat > conftest.$ac_ext <<EOF
18390 #line 18391 "configure"
18391 #include "confdefs.h"
18392
18393 #ifdef HAVE_DB_185_H
18394 # include <db_185.h>
18395 #else
18396 # include <db.h>
18397 #endif
18398
18399 #ifndef DB_VERSION_MAJOR
18400 # define DB_VERSION_MAJOR 1
18401 #endif
18402
18403 #ifndef NULL
18404 #define NULL ((void*)0)
18405 #endif
18406
18407 int main() {
18408
18409 #if DB_VERSION_MAJOR > 1
18410         {
18411                 char *version;
18412                 int major, minor, patch;
18413
18414                 version = db_version( &major, &minor, &patch );
18415
18416                 if( major != DB_VERSION_MAJOR ||
18417                         minor < DB_VERSION_MINOR )
18418                 {
18419                         printf("Berkeley DB version mismatch\n"
18420                                 "\texpected: %s\n\tgot: %s\n",
18421                                 DB_VERSION_STRING, version);
18422                         return 1;
18423                 }
18424         }
18425 #endif
18426
18427 #if DB_VERSION_MAJOR > 2
18428         db_env_create( NULL, 0 );
18429 #elif DB_VERSION_MAJOR > 1
18430         db_appexit( NULL );
18431 #else
18432         (void) dbopen( NULL, 0, 0, 0, NULL);
18433 #endif
18434
18435 ; return 0; }
18436 EOF
18437 if { (eval echo configure:18438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18438   rm -rf conftest*
18439   ol_cv_db_db41=yes
18440 else
18441   echo "configure: failed program was:" >&5
18442   cat conftest.$ac_ext >&5
18443   rm -rf conftest*
18444   ol_cv_db_db41=no
18445 fi
18446 rm -f conftest*
18447
18448         LIBS="$ol_LIBS"
18449
18450 fi
18451
18452 echo "$ac_t""$ol_cv_db_db41" 1>&6
18453
18454         if test $ol_cv_db_db41 = yes ; then
18455                 ol_cv_lib_db=-ldb41
18456         fi
18457 fi
18458
18459 if test $ol_cv_lib_db = no ; then
18460         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18461 echo "configure:18462: checking for Berkeley DB link (-ldb-41)" >&5
18462 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18463   echo $ac_n "(cached) $ac_c" 1>&6
18464 else
18465   
18466         ol_DB_LIB=-ldb-41
18467         ol_LIBS=$LIBS
18468         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18469
18470         cat > conftest.$ac_ext <<EOF
18471 #line 18472 "configure"
18472 #include "confdefs.h"
18473
18474 #ifdef HAVE_DB_185_H
18475 # include <db_185.h>
18476 #else
18477 # include <db.h>
18478 #endif
18479
18480 #ifndef DB_VERSION_MAJOR
18481 # define DB_VERSION_MAJOR 1
18482 #endif
18483
18484 #ifndef NULL
18485 #define NULL ((void*)0)
18486 #endif
18487
18488 int main() {
18489
18490 #if DB_VERSION_MAJOR > 1
18491         {
18492                 char *version;
18493                 int major, minor, patch;
18494
18495                 version = db_version( &major, &minor, &patch );
18496
18497                 if( major != DB_VERSION_MAJOR ||
18498                         minor < DB_VERSION_MINOR )
18499                 {
18500                         printf("Berkeley DB version mismatch\n"
18501                                 "\texpected: %s\n\tgot: %s\n",
18502                                 DB_VERSION_STRING, version);
18503                         return 1;
18504                 }
18505         }
18506 #endif
18507
18508 #if DB_VERSION_MAJOR > 2
18509         db_env_create( NULL, 0 );
18510 #elif DB_VERSION_MAJOR > 1
18511         db_appexit( NULL );
18512 #else
18513         (void) dbopen( NULL, 0, 0, 0, NULL);
18514 #endif
18515
18516 ; return 0; }
18517 EOF
18518 if { (eval echo configure:18519: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18519   rm -rf conftest*
18520   ol_cv_db_db_41=yes
18521 else
18522   echo "configure: failed program was:" >&5
18523   cat conftest.$ac_ext >&5
18524   rm -rf conftest*
18525   ol_cv_db_db_41=no
18526 fi
18527 rm -f conftest*
18528
18529         LIBS="$ol_LIBS"
18530
18531 fi
18532
18533 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18534
18535         if test $ol_cv_db_db_41 = yes ; then
18536                 ol_cv_lib_db=-ldb-41
18537         fi
18538 fi
18539
18540 if test $ol_cv_lib_db = no ; then
18541         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18542 echo "configure:18543: checking for Berkeley DB link (-ldb-4.1)" >&5
18543 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18544   echo $ac_n "(cached) $ac_c" 1>&6
18545 else
18546   
18547         ol_DB_LIB=-ldb-4.1
18548         ol_LIBS=$LIBS
18549         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18550
18551         cat > conftest.$ac_ext <<EOF
18552 #line 18553 "configure"
18553 #include "confdefs.h"
18554
18555 #ifdef HAVE_DB_185_H
18556 # include <db_185.h>
18557 #else
18558 # include <db.h>
18559 #endif
18560
18561 #ifndef DB_VERSION_MAJOR
18562 # define DB_VERSION_MAJOR 1
18563 #endif
18564
18565 #ifndef NULL
18566 #define NULL ((void*)0)
18567 #endif
18568
18569 int main() {
18570
18571 #if DB_VERSION_MAJOR > 1
18572         {
18573                 char *version;
18574                 int major, minor, patch;
18575
18576                 version = db_version( &major, &minor, &patch );
18577
18578                 if( major != DB_VERSION_MAJOR ||
18579                         minor < DB_VERSION_MINOR )
18580                 {
18581                         printf("Berkeley DB version mismatch\n"
18582                                 "\texpected: %s\n\tgot: %s\n",
18583                                 DB_VERSION_STRING, version);
18584                         return 1;
18585                 }
18586         }
18587 #endif
18588
18589 #if DB_VERSION_MAJOR > 2
18590         db_env_create( NULL, 0 );
18591 #elif DB_VERSION_MAJOR > 1
18592         db_appexit( NULL );
18593 #else
18594         (void) dbopen( NULL, 0, 0, 0, NULL);
18595 #endif
18596
18597 ; return 0; }
18598 EOF
18599 if { (eval echo configure:18600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18600   rm -rf conftest*
18601   ol_cv_db_db_4_dot_1=yes
18602 else
18603   echo "configure: failed program was:" >&5
18604   cat conftest.$ac_ext >&5
18605   rm -rf conftest*
18606   ol_cv_db_db_4_dot_1=no
18607 fi
18608 rm -f conftest*
18609
18610         LIBS="$ol_LIBS"
18611
18612 fi
18613
18614 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18615
18616         if test $ol_cv_db_db_4_dot_1 = yes ; then
18617                 ol_cv_lib_db=-ldb-4.1
18618         fi
18619 fi
18620
18621 if test $ol_cv_lib_db = no ; then
18622         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18623 echo "configure:18624: checking for Berkeley DB link (-ldb-4-1)" >&5
18624 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18625   echo $ac_n "(cached) $ac_c" 1>&6
18626 else
18627   
18628         ol_DB_LIB=-ldb-4-1
18629         ol_LIBS=$LIBS
18630         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18631
18632         cat > conftest.$ac_ext <<EOF
18633 #line 18634 "configure"
18634 #include "confdefs.h"
18635
18636 #ifdef HAVE_DB_185_H
18637 # include <db_185.h>
18638 #else
18639 # include <db.h>
18640 #endif
18641
18642 #ifndef DB_VERSION_MAJOR
18643 # define DB_VERSION_MAJOR 1
18644 #endif
18645
18646 #ifndef NULL
18647 #define NULL ((void*)0)
18648 #endif
18649
18650 int main() {
18651
18652 #if DB_VERSION_MAJOR > 1
18653         {
18654                 char *version;
18655                 int major, minor, patch;
18656
18657                 version = db_version( &major, &minor, &patch );
18658
18659                 if( major != DB_VERSION_MAJOR ||
18660                         minor < DB_VERSION_MINOR )
18661                 {
18662                         printf("Berkeley DB version mismatch\n"
18663                                 "\texpected: %s\n\tgot: %s\n",
18664                                 DB_VERSION_STRING, version);
18665                         return 1;
18666                 }
18667         }
18668 #endif
18669
18670 #if DB_VERSION_MAJOR > 2
18671         db_env_create( NULL, 0 );
18672 #elif DB_VERSION_MAJOR > 1
18673         db_appexit( NULL );
18674 #else
18675         (void) dbopen( NULL, 0, 0, 0, NULL);
18676 #endif
18677
18678 ; return 0; }
18679 EOF
18680 if { (eval echo configure:18681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18681   rm -rf conftest*
18682   ol_cv_db_db_4_1=yes
18683 else
18684   echo "configure: failed program was:" >&5
18685   cat conftest.$ac_ext >&5
18686   rm -rf conftest*
18687   ol_cv_db_db_4_1=no
18688 fi
18689 rm -f conftest*
18690
18691         LIBS="$ol_LIBS"
18692
18693 fi
18694
18695 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18696
18697         if test $ol_cv_db_db_4_1 = yes ; then
18698                 ol_cv_lib_db=-ldb-4-1
18699         fi
18700 fi
18701
18702 if test $ol_cv_lib_db = no ; then
18703         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18704 echo "configure:18705: checking for Berkeley DB link (-ldb3)" >&5
18705 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18706   echo $ac_n "(cached) $ac_c" 1>&6
18707 else
18708   
18709         ol_DB_LIB=-ldb3
18710         ol_LIBS=$LIBS
18711         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18712
18713         cat > conftest.$ac_ext <<EOF
18714 #line 18715 "configure"
18715 #include "confdefs.h"
18716
18717 #ifdef HAVE_DB_185_H
18718 # include <db_185.h>
18719 #else
18720 # include <db.h>
18721 #endif
18722
18723 #ifndef DB_VERSION_MAJOR
18724 # define DB_VERSION_MAJOR 1
18725 #endif
18726
18727 #ifndef NULL
18728 #define NULL ((void*)0)
18729 #endif
18730
18731 int main() {
18732
18733 #if DB_VERSION_MAJOR > 1
18734         {
18735                 char *version;
18736                 int major, minor, patch;
18737
18738                 version = db_version( &major, &minor, &patch );
18739
18740                 if( major != DB_VERSION_MAJOR ||
18741                         minor < DB_VERSION_MINOR )
18742                 {
18743                         printf("Berkeley DB version mismatch\n"
18744                                 "\texpected: %s\n\tgot: %s\n",
18745                                 DB_VERSION_STRING, version);
18746                         return 1;
18747                 }
18748         }
18749 #endif
18750
18751 #if DB_VERSION_MAJOR > 2
18752         db_env_create( NULL, 0 );
18753 #elif DB_VERSION_MAJOR > 1
18754         db_appexit( NULL );
18755 #else
18756         (void) dbopen( NULL, 0, 0, 0, NULL);
18757 #endif
18758
18759 ; return 0; }
18760 EOF
18761 if { (eval echo configure:18762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18762   rm -rf conftest*
18763   ol_cv_db_db3=yes
18764 else
18765   echo "configure: failed program was:" >&5
18766   cat conftest.$ac_ext >&5
18767   rm -rf conftest*
18768   ol_cv_db_db3=no
18769 fi
18770 rm -f conftest*
18771
18772         LIBS="$ol_LIBS"
18773
18774 fi
18775
18776 echo "$ac_t""$ol_cv_db_db3" 1>&6
18777
18778         if test $ol_cv_db_db3 = yes ; then
18779                 ol_cv_lib_db=-ldb3
18780         fi
18781 fi
18782
18783 if test $ol_cv_lib_db = no ; then
18784         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18785 echo "configure:18786: checking for Berkeley DB link (-ldb-3)" >&5
18786 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18787   echo $ac_n "(cached) $ac_c" 1>&6
18788 else
18789   
18790         ol_DB_LIB=-ldb-3
18791         ol_LIBS=$LIBS
18792         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18793
18794         cat > conftest.$ac_ext <<EOF
18795 #line 18796 "configure"
18796 #include "confdefs.h"
18797
18798 #ifdef HAVE_DB_185_H
18799 # include <db_185.h>
18800 #else
18801 # include <db.h>
18802 #endif
18803
18804 #ifndef DB_VERSION_MAJOR
18805 # define DB_VERSION_MAJOR 1
18806 #endif
18807
18808 #ifndef NULL
18809 #define NULL ((void*)0)
18810 #endif
18811
18812 int main() {
18813
18814 #if DB_VERSION_MAJOR > 1
18815         {
18816                 char *version;
18817                 int major, minor, patch;
18818
18819                 version = db_version( &major, &minor, &patch );
18820
18821                 if( major != DB_VERSION_MAJOR ||
18822                         minor < DB_VERSION_MINOR )
18823                 {
18824                         printf("Berkeley DB version mismatch\n"
18825                                 "\texpected: %s\n\tgot: %s\n",
18826                                 DB_VERSION_STRING, version);
18827                         return 1;
18828                 }
18829         }
18830 #endif
18831
18832 #if DB_VERSION_MAJOR > 2
18833         db_env_create( NULL, 0 );
18834 #elif DB_VERSION_MAJOR > 1
18835         db_appexit( NULL );
18836 #else
18837         (void) dbopen( NULL, 0, 0, 0, NULL);
18838 #endif
18839
18840 ; return 0; }
18841 EOF
18842 if { (eval echo configure:18843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18843   rm -rf conftest*
18844   ol_cv_db_db_3=yes
18845 else
18846   echo "configure: failed program was:" >&5
18847   cat conftest.$ac_ext >&5
18848   rm -rf conftest*
18849   ol_cv_db_db_3=no
18850 fi
18851 rm -f conftest*
18852
18853         LIBS="$ol_LIBS"
18854
18855 fi
18856
18857 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18858
18859         if test $ol_cv_db_db_3 = yes ; then
18860                 ol_cv_lib_db=-ldb-3
18861         fi
18862 fi
18863
18864 if test $ol_cv_lib_db = no ; then
18865         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18866 echo "configure:18867: checking for Berkeley DB link (-ldb2)" >&5
18867 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18868   echo $ac_n "(cached) $ac_c" 1>&6
18869 else
18870   
18871         ol_DB_LIB=-ldb2
18872         ol_LIBS=$LIBS
18873         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18874
18875         cat > conftest.$ac_ext <<EOF
18876 #line 18877 "configure"
18877 #include "confdefs.h"
18878
18879 #ifdef HAVE_DB_185_H
18880 # include <db_185.h>
18881 #else
18882 # include <db.h>
18883 #endif
18884
18885 #ifndef DB_VERSION_MAJOR
18886 # define DB_VERSION_MAJOR 1
18887 #endif
18888
18889 #ifndef NULL
18890 #define NULL ((void*)0)
18891 #endif
18892
18893 int main() {
18894
18895 #if DB_VERSION_MAJOR > 1
18896         {
18897                 char *version;
18898                 int major, minor, patch;
18899
18900                 version = db_version( &major, &minor, &patch );
18901
18902                 if( major != DB_VERSION_MAJOR ||
18903                         minor < DB_VERSION_MINOR )
18904                 {
18905                         printf("Berkeley DB version mismatch\n"
18906                                 "\texpected: %s\n\tgot: %s\n",
18907                                 DB_VERSION_STRING, version);
18908                         return 1;
18909                 }
18910         }
18911 #endif
18912
18913 #if DB_VERSION_MAJOR > 2
18914         db_env_create( NULL, 0 );
18915 #elif DB_VERSION_MAJOR > 1
18916         db_appexit( NULL );
18917 #else
18918         (void) dbopen( NULL, 0, 0, 0, NULL);
18919 #endif
18920
18921 ; return 0; }
18922 EOF
18923 if { (eval echo configure:18924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18924   rm -rf conftest*
18925   ol_cv_db_db2=yes
18926 else
18927   echo "configure: failed program was:" >&5
18928   cat conftest.$ac_ext >&5
18929   rm -rf conftest*
18930   ol_cv_db_db2=no
18931 fi
18932 rm -f conftest*
18933
18934         LIBS="$ol_LIBS"
18935
18936 fi
18937
18938 echo "$ac_t""$ol_cv_db_db2" 1>&6
18939
18940         if test $ol_cv_db_db2 = yes ; then
18941                 ol_cv_lib_db=-ldb2
18942         fi
18943 fi
18944
18945 if test $ol_cv_lib_db = no ; then
18946         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18947 echo "configure:18948: checking for Berkeley DB link (-ldb-2)" >&5
18948 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18949   echo $ac_n "(cached) $ac_c" 1>&6
18950 else
18951   
18952         ol_DB_LIB=-ldb-2
18953         ol_LIBS=$LIBS
18954         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18955
18956         cat > conftest.$ac_ext <<EOF
18957 #line 18958 "configure"
18958 #include "confdefs.h"
18959
18960 #ifdef HAVE_DB_185_H
18961 # include <db_185.h>
18962 #else
18963 # include <db.h>
18964 #endif
18965
18966 #ifndef DB_VERSION_MAJOR
18967 # define DB_VERSION_MAJOR 1
18968 #endif
18969
18970 #ifndef NULL
18971 #define NULL ((void*)0)
18972 #endif
18973
18974 int main() {
18975
18976 #if DB_VERSION_MAJOR > 1
18977         {
18978                 char *version;
18979                 int major, minor, patch;
18980
18981                 version = db_version( &major, &minor, &patch );
18982
18983                 if( major != DB_VERSION_MAJOR ||
18984                         minor < DB_VERSION_MINOR )
18985                 {
18986                         printf("Berkeley DB version mismatch\n"
18987                                 "\texpected: %s\n\tgot: %s\n",
18988                                 DB_VERSION_STRING, version);
18989                         return 1;
18990                 }
18991         }
18992 #endif
18993
18994 #if DB_VERSION_MAJOR > 2
18995         db_env_create( NULL, 0 );
18996 #elif DB_VERSION_MAJOR > 1
18997         db_appexit( NULL );
18998 #else
18999         (void) dbopen( NULL, 0, 0, 0, NULL);
19000 #endif
19001
19002 ; return 0; }
19003 EOF
19004 if { (eval echo configure:19005: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19005   rm -rf conftest*
19006   ol_cv_db_db_2=yes
19007 else
19008   echo "configure: failed program was:" >&5
19009   cat conftest.$ac_ext >&5
19010   rm -rf conftest*
19011   ol_cv_db_db_2=no
19012 fi
19013 rm -f conftest*
19014
19015         LIBS="$ol_LIBS"
19016
19017 fi
19018
19019 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19020
19021         if test $ol_cv_db_db_2 = yes ; then
19022                 ol_cv_lib_db=-ldb-2
19023         fi
19024 fi
19025
19026 if test $ol_cv_lib_db = no ; then
19027         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19028 echo "configure:19029: checking for Berkeley DB link (-ldb1)" >&5
19029 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19030   echo $ac_n "(cached) $ac_c" 1>&6
19031 else
19032   
19033         ol_DB_LIB=-ldb1
19034         ol_LIBS=$LIBS
19035         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19036
19037         cat > conftest.$ac_ext <<EOF
19038 #line 19039 "configure"
19039 #include "confdefs.h"
19040
19041 #ifdef HAVE_DB_185_H
19042 # include <db_185.h>
19043 #else
19044 # include <db.h>
19045 #endif
19046
19047 #ifndef DB_VERSION_MAJOR
19048 # define DB_VERSION_MAJOR 1
19049 #endif
19050
19051 #ifndef NULL
19052 #define NULL ((void*)0)
19053 #endif
19054
19055 int main() {
19056
19057 #if DB_VERSION_MAJOR > 1
19058         {
19059                 char *version;
19060                 int major, minor, patch;
19061
19062                 version = db_version( &major, &minor, &patch );
19063
19064                 if( major != DB_VERSION_MAJOR ||
19065                         minor < DB_VERSION_MINOR )
19066                 {
19067                         printf("Berkeley DB version mismatch\n"
19068                                 "\texpected: %s\n\tgot: %s\n",
19069                                 DB_VERSION_STRING, version);
19070                         return 1;
19071                 }
19072         }
19073 #endif
19074
19075 #if DB_VERSION_MAJOR > 2
19076         db_env_create( NULL, 0 );
19077 #elif DB_VERSION_MAJOR > 1
19078         db_appexit( NULL );
19079 #else
19080         (void) dbopen( NULL, 0, 0, 0, NULL);
19081 #endif
19082
19083 ; return 0; }
19084 EOF
19085 if { (eval echo configure:19086: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19086   rm -rf conftest*
19087   ol_cv_db_db1=yes
19088 else
19089   echo "configure: failed program was:" >&5
19090   cat conftest.$ac_ext >&5
19091   rm -rf conftest*
19092   ol_cv_db_db1=no
19093 fi
19094 rm -f conftest*
19095
19096         LIBS="$ol_LIBS"
19097
19098 fi
19099
19100 echo "$ac_t""$ol_cv_db_db1" 1>&6
19101
19102         if test $ol_cv_db_db1 = yes ; then
19103                 ol_cv_lib_db=-ldb1
19104         fi
19105 fi
19106
19107 if test $ol_cv_lib_db = no ; then
19108         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19109 echo "configure:19110: checking for Berkeley DB link (-ldb-1)" >&5
19110 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19111   echo $ac_n "(cached) $ac_c" 1>&6
19112 else
19113   
19114         ol_DB_LIB=-ldb-1
19115         ol_LIBS=$LIBS
19116         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19117
19118         cat > conftest.$ac_ext <<EOF
19119 #line 19120 "configure"
19120 #include "confdefs.h"
19121
19122 #ifdef HAVE_DB_185_H
19123 # include <db_185.h>
19124 #else
19125 # include <db.h>
19126 #endif
19127
19128 #ifndef DB_VERSION_MAJOR
19129 # define DB_VERSION_MAJOR 1
19130 #endif
19131
19132 #ifndef NULL
19133 #define NULL ((void*)0)
19134 #endif
19135
19136 int main() {
19137
19138 #if DB_VERSION_MAJOR > 1
19139         {
19140                 char *version;
19141                 int major, minor, patch;
19142
19143                 version = db_version( &major, &minor, &patch );
19144
19145                 if( major != DB_VERSION_MAJOR ||
19146                         minor < DB_VERSION_MINOR )
19147                 {
19148                         printf("Berkeley DB version mismatch\n"
19149                                 "\texpected: %s\n\tgot: %s\n",
19150                                 DB_VERSION_STRING, version);
19151                         return 1;
19152                 }
19153         }
19154 #endif
19155
19156 #if DB_VERSION_MAJOR > 2
19157         db_env_create( NULL, 0 );
19158 #elif DB_VERSION_MAJOR > 1
19159         db_appexit( NULL );
19160 #else
19161         (void) dbopen( NULL, 0, 0, 0, NULL);
19162 #endif
19163
19164 ; return 0; }
19165 EOF
19166 if { (eval echo configure:19167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19167   rm -rf conftest*
19168   ol_cv_db_db_1=yes
19169 else
19170   echo "configure: failed program was:" >&5
19171   cat conftest.$ac_ext >&5
19172   rm -rf conftest*
19173   ol_cv_db_db_1=no
19174 fi
19175 rm -f conftest*
19176
19177         LIBS="$ol_LIBS"
19178
19179 fi
19180
19181 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19182
19183         if test $ol_cv_db_db_1 = yes ; then
19184                 ol_cv_lib_db=-ldb-1
19185         fi
19186 fi
19187
19188
19189         if test "$ol_cv_lib_db" != no ; then
19190                 ol_cv_berkeley_db=yes
19191                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19192 echo "configure:19193: checking for Berkeley DB thread support" >&5
19193 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19194   echo $ac_n "(cached) $ac_c" 1>&6
19195 else
19196   
19197         ol_LIBS="$LIBS"
19198         LIBS="$LTHREAD_LIBS $LIBS"
19199         if test $ol_cv_lib_db != yes ; then
19200                 LIBS="$ol_cv_lib_db $LIBS"
19201         fi
19202
19203         if test "$cross_compiling" = yes; then
19204   ol_cv_berkeley_db_thread=cross
19205 else
19206   cat > conftest.$ac_ext <<EOF
19207 #line 19208 "configure"
19208 #include "confdefs.h"
19209
19210 #ifdef HAVE_DB_185_H
19211         choke me;
19212 #else
19213 #include <db.h>
19214 #endif
19215 #ifndef NULL
19216 #define NULL ((void *)0)
19217 #endif
19218 main()
19219 {
19220         int rc;
19221         u_int32_t flags = DB_CREATE |
19222 #ifdef DB_PRIVATE
19223                 DB_PRIVATE |
19224 #endif
19225                 DB_THREAD;
19226
19227 #if DB_VERSION_MAJOR > 2
19228         DB_ENV *env = NULL;
19229
19230         rc = db_env_create( &env, 0 );
19231
19232         flags |= DB_INIT_MPOOL;
19233 #ifdef DB_MPOOL_PRIVATE
19234         flags |= DB_MPOOL_PRIVATE;
19235 #endif
19236
19237         if( rc ) {
19238                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19239                 return rc;
19240         }
19241
19242 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19243         rc = env->open( env, NULL, flags, 0 );
19244 #else
19245         rc = env->open( env, NULL, NULL, flags, 0 );
19246 #endif
19247
19248         if ( rc == 0 ) {
19249                 rc = env->close( env, 0 );
19250         }
19251
19252         if( rc ) {
19253                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19254                 return rc;
19255         }
19256
19257 #else
19258         DB_ENV env;
19259         memset( &env, '\0', sizeof(env) );
19260
19261         rc = db_appinit( NULL, NULL, &env, flags );
19262
19263         if( rc == 0 ) {
19264                 db_appexit( &env );
19265         }
19266
19267         unlink("__db_mpool.share");
19268         unlink("__db_lock.share");
19269 #endif
19270
19271         return rc;
19272 }
19273 EOF
19274 if { (eval echo configure:19275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19275 then
19276   ol_cv_berkeley_db_thread=yes
19277 else
19278   echo "configure: failed program was:" >&5
19279   cat conftest.$ac_ext >&5
19280   rm -fr conftest*
19281   ol_cv_berkeley_db_thread=no
19282 fi
19283 rm -fr conftest*
19284 fi
19285
19286
19287         LIBS="$ol_LIBS"
19288
19289 fi
19290
19291 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19292
19293         if test $ol_cv_berkeley_db_thread != no ; then
19294                 cat >> confdefs.h <<\EOF
19295 #define HAVE_BERKELEY_DB_THREAD 1
19296 EOF
19297
19298         fi
19299
19300         fi
19301 fi
19302
19303         fi
19304
19305         if test $ol_cv_berkeley_db != no ; then
19306                 cat >> confdefs.h <<\EOF
19307 #define HAVE_BERKELEY_DB 1
19308 EOF
19309
19310
19311                 ol_link_ldbm=berkeley
19312                 ol_with_ldbm_api=berkeley
19313
19314                 if test $ol_with_ldbm_type = hash ; then
19315                         cat >> confdefs.h <<\EOF
19316 #define LDBM_USE_DBHASH 1
19317 EOF
19318
19319                 else
19320                         cat >> confdefs.h <<\EOF
19321 #define LDBM_USE_DBBTREE 1
19322 EOF
19323
19324                 fi
19325
19326                                                 if test $ol_cv_lib_db != yes ; then
19327                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19328                 fi
19329         fi
19330 fi
19331
19332 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19333         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19334 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19335         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19336 echo "configure:19337: checking Berkeley DB version for BDB backend" >&5
19337 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19338   echo $ac_n "(cached) $ac_c" 1>&6
19339 else
19340   
19341         cat > conftest.$ac_ext <<EOF
19342 #line 19343 "configure"
19343 #include "confdefs.h"
19344
19345 #include <db.h>
19346
19347  /* this check could be improved */
19348 #ifndef DB_VERSION_MAJOR
19349 #       define DB_VERSION_MAJOR 1
19350 #endif
19351 #ifndef DB_VERSION_MINOR
19352 #       define DB_VERSION_MINOR 0
19353 #endif
19354
19355 /* require 4.2 or later */
19356 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19357         __db_version_compat
19358 #endif
19359         
19360 EOF
19361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19362   egrep "__db_version_compat" >/dev/null 2>&1; then
19363   rm -rf conftest*
19364   ol_cv_bdb_compat=yes
19365 else
19366   rm -rf conftest*
19367   ol_cv_bdb_compat=no
19368 fi
19369 rm -f conftest*
19370
19371 fi
19372
19373 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19374
19375
19376         if test $ol_cv_bdb_compat = yes ; then
19377                 ol_enable_bdb=yes
19378         elif test $ol_enable_bdb = yes ; then
19379                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19380         else
19381                 ol_enable_bdb=no
19382         fi
19383 fi
19384 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19385         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19386 fi
19387
19388 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19389         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19390         ol_with_ldbm_api=none
19391 fi
19392
19393 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19394         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19395 echo "configure:19396: checking for MDBM library" >&5
19396 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19397   echo $ac_n "(cached) $ac_c" 1>&6
19398 else
19399         ol_LIBS="$LIBS"
19400         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19401 echo "configure:19402: checking for mdbm_set_chain" >&5
19402 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19403   echo $ac_n "(cached) $ac_c" 1>&6
19404 else
19405   cat > conftest.$ac_ext <<EOF
19406 #line 19407 "configure"
19407 #include "confdefs.h"
19408 /* System header to define __stub macros and hopefully few prototypes,
19409     which can conflict with char mdbm_set_chain(); below.  */
19410 #include <assert.h>
19411 /* Override any gcc2 internal prototype to avoid an error.  */
19412 /* We use char because int might match the return type of a gcc2
19413     builtin and then its argument prototype would still apply.  */
19414 char mdbm_set_chain();
19415 char (*f)();
19416
19417 int main() {
19418
19419 /* The GNU C library defines this for functions which it implements
19420     to always fail with ENOSYS.  Some functions are actually named
19421     something starting with __ and the normal name is an alias.  */
19422 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19423 choke me
19424 #else
19425 f = mdbm_set_chain;
19426 #endif
19427
19428 ; return 0; }
19429 EOF
19430 if { (eval echo configure:19431: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19431   rm -rf conftest*
19432   eval "ac_cv_func_mdbm_set_chain=yes"
19433 else
19434   echo "configure: failed program was:" >&5
19435   cat conftest.$ac_ext >&5
19436   rm -rf conftest*
19437   eval "ac_cv_func_mdbm_set_chain=no"
19438 fi
19439 rm -f conftest*
19440 fi
19441
19442 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19443   echo "$ac_t""yes" 1>&6
19444   ol_cv_lib_mdbm=yes
19445 else
19446   echo "$ac_t""no" 1>&6
19447
19448                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19449 echo "configure:19450: checking for mdbm_set_chain in -lmdbm" >&5
19450 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19451 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19452   echo $ac_n "(cached) $ac_c" 1>&6
19453 else
19454   ac_save_LIBS="$LIBS"
19455 LIBS="-lmdbm  $LIBS"
19456 cat > conftest.$ac_ext <<EOF
19457 #line 19458 "configure"
19458 #include "confdefs.h"
19459 /* Override any gcc2 internal prototype to avoid an error.  */
19460 /* We use char because int might match the return type of a gcc2
19461     builtin and then its argument prototype would still apply.  */
19462 char mdbm_set_chain();
19463
19464 int main() {
19465 mdbm_set_chain()
19466 ; return 0; }
19467 EOF
19468 if { (eval echo configure:19469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19469   rm -rf conftest*
19470   eval "ac_cv_lib_$ac_lib_var=yes"
19471 else
19472   echo "configure: failed program was:" >&5
19473   cat conftest.$ac_ext >&5
19474   rm -rf conftest*
19475   eval "ac_cv_lib_$ac_lib_var=no"
19476 fi
19477 rm -f conftest*
19478 LIBS="$ac_save_LIBS"
19479
19480 fi
19481 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19482   echo "$ac_t""yes" 1>&6
19483   ol_cv_lib_mdbm=-lmdbm
19484 else
19485   echo "$ac_t""no" 1>&6
19486 ol_cv_lib_mdbm=no
19487 fi
19488
19489         
19490 fi
19491
19492         LIBS="$ol_LIBS"
19493
19494 fi
19495
19496 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19497
19498
19499  for ac_hdr in mdbm.h
19500 do
19501 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19502 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19503 echo "configure:19504: checking for $ac_hdr" >&5
19504 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19505   echo $ac_n "(cached) $ac_c" 1>&6
19506 else
19507   cat > conftest.$ac_ext <<EOF
19508 #line 19509 "configure"
19509 #include "confdefs.h"
19510 #include <$ac_hdr>
19511 EOF
19512 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19513 { (eval echo configure:19514: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19514 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19515 if test -z "$ac_err"; then
19516   rm -rf conftest*
19517   eval "ac_cv_header_$ac_safe=yes"
19518 else
19519   echo "$ac_err" >&5
19520   echo "configure: failed program was:" >&5
19521   cat conftest.$ac_ext >&5
19522   rm -rf conftest*
19523   eval "ac_cv_header_$ac_safe=no"
19524 fi
19525 rm -f conftest*
19526 fi
19527 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19528   echo "$ac_t""yes" 1>&6
19529     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19530   cat >> confdefs.h <<EOF
19531 #define $ac_tr_hdr 1
19532 EOF
19533  
19534 else
19535   echo "$ac_t""no" 1>&6
19536 fi
19537 done
19538
19539  echo $ac_n "checking for db""... $ac_c" 1>&6
19540 echo "configure:19541: checking for db" >&5
19541 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19542   echo $ac_n "(cached) $ac_c" 1>&6
19543 else
19544   
19545         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19546                 ol_cv_mdbm=no
19547         else
19548                 ol_cv_mdbm=yes
19549         fi
19550
19551 fi
19552
19553 echo "$ac_t""$ol_cv_mdbm" 1>&6
19554  if test $ol_cv_mdbm = yes ; then
19555         cat >> confdefs.h <<\EOF
19556 #define HAVE_MDBM 1
19557 EOF
19558
19559  fi
19560
19561
19562         if test $ol_cv_mdbm = yes ; then
19563                 ol_link_ldbm=mdbm
19564                 ol_with_ldbm_api=mdbm
19565                 if test $ol_cv_lib_mdbm != yes ; then
19566                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19567                 fi
19568         fi
19569 fi
19570
19571 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19572         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19573 echo "configure:19574: checking for GDBM library" >&5
19574 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19575   echo $ac_n "(cached) $ac_c" 1>&6
19576 else
19577         ol_LIBS="$LIBS"
19578         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19579 echo "configure:19580: checking for gdbm_open" >&5
19580 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19581   echo $ac_n "(cached) $ac_c" 1>&6
19582 else
19583   cat > conftest.$ac_ext <<EOF
19584 #line 19585 "configure"
19585 #include "confdefs.h"
19586 /* System header to define __stub macros and hopefully few prototypes,
19587     which can conflict with char gdbm_open(); below.  */
19588 #include <assert.h>
19589 /* Override any gcc2 internal prototype to avoid an error.  */
19590 /* We use char because int might match the return type of a gcc2
19591     builtin and then its argument prototype would still apply.  */
19592 char gdbm_open();
19593 char (*f)();
19594
19595 int main() {
19596
19597 /* The GNU C library defines this for functions which it implements
19598     to always fail with ENOSYS.  Some functions are actually named
19599     something starting with __ and the normal name is an alias.  */
19600 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19601 choke me
19602 #else
19603 f = gdbm_open;
19604 #endif
19605
19606 ; return 0; }
19607 EOF
19608 if { (eval echo configure:19609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19609   rm -rf conftest*
19610   eval "ac_cv_func_gdbm_open=yes"
19611 else
19612   echo "configure: failed program was:" >&5
19613   cat conftest.$ac_ext >&5
19614   rm -rf conftest*
19615   eval "ac_cv_func_gdbm_open=no"
19616 fi
19617 rm -f conftest*
19618 fi
19619
19620 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19621   echo "$ac_t""yes" 1>&6
19622   ol_cv_lib_gdbm=yes
19623 else
19624   echo "$ac_t""no" 1>&6
19625
19626                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19627 echo "configure:19628: checking for gdbm_open in -lgdbm" >&5
19628 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19629 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19630   echo $ac_n "(cached) $ac_c" 1>&6
19631 else
19632   ac_save_LIBS="$LIBS"
19633 LIBS="-lgdbm  $LIBS"
19634 cat > conftest.$ac_ext <<EOF
19635 #line 19636 "configure"
19636 #include "confdefs.h"
19637 /* Override any gcc2 internal prototype to avoid an error.  */
19638 /* We use char because int might match the return type of a gcc2
19639     builtin and then its argument prototype would still apply.  */
19640 char gdbm_open();
19641
19642 int main() {
19643 gdbm_open()
19644 ; return 0; }
19645 EOF
19646 if { (eval echo configure:19647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19647   rm -rf conftest*
19648   eval "ac_cv_lib_$ac_lib_var=yes"
19649 else
19650   echo "configure: failed program was:" >&5
19651   cat conftest.$ac_ext >&5
19652   rm -rf conftest*
19653   eval "ac_cv_lib_$ac_lib_var=no"
19654 fi
19655 rm -f conftest*
19656 LIBS="$ac_save_LIBS"
19657
19658 fi
19659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19660   echo "$ac_t""yes" 1>&6
19661   ol_cv_lib_gdbm=-lgdbm
19662 else
19663   echo "$ac_t""no" 1>&6
19664 ol_cv_lib_gdbm=no
19665 fi
19666
19667         
19668 fi
19669
19670         LIBS="$ol_LIBS"
19671
19672 fi
19673
19674 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19675
19676
19677  for ac_hdr in gdbm.h
19678 do
19679 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19680 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19681 echo "configure:19682: checking for $ac_hdr" >&5
19682 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19683   echo $ac_n "(cached) $ac_c" 1>&6
19684 else
19685   cat > conftest.$ac_ext <<EOF
19686 #line 19687 "configure"
19687 #include "confdefs.h"
19688 #include <$ac_hdr>
19689 EOF
19690 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19691 { (eval echo configure:19692: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19692 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19693 if test -z "$ac_err"; then
19694   rm -rf conftest*
19695   eval "ac_cv_header_$ac_safe=yes"
19696 else
19697   echo "$ac_err" >&5
19698   echo "configure: failed program was:" >&5
19699   cat conftest.$ac_ext >&5
19700   rm -rf conftest*
19701   eval "ac_cv_header_$ac_safe=no"
19702 fi
19703 rm -f conftest*
19704 fi
19705 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19706   echo "$ac_t""yes" 1>&6
19707     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19708   cat >> confdefs.h <<EOF
19709 #define $ac_tr_hdr 1
19710 EOF
19711  
19712 else
19713   echo "$ac_t""no" 1>&6
19714 fi
19715 done
19716
19717  echo $ac_n "checking for db""... $ac_c" 1>&6
19718 echo "configure:19719: checking for db" >&5
19719 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19720   echo $ac_n "(cached) $ac_c" 1>&6
19721 else
19722   
19723         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19724                 ol_cv_gdbm=no
19725         else
19726                 ol_cv_gdbm=yes
19727         fi
19728
19729 fi
19730
19731 echo "$ac_t""$ol_cv_gdbm" 1>&6
19732  if test $ol_cv_gdbm = yes ; then
19733         cat >> confdefs.h <<\EOF
19734 #define HAVE_GDBM 1
19735 EOF
19736
19737  fi
19738
19739
19740         if test $ol_cv_gdbm = yes ; then
19741                 ol_link_ldbm=gdbm
19742                 ol_with_ldbm_api=gdbm
19743
19744                 if test $ol_cv_lib_gdbm != yes ; then
19745                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19746                 fi
19747         fi
19748 fi
19749
19750 if test $ol_with_ldbm_api = ndbm ; then
19751         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19752 echo "configure:19753: checking for NDBM library" >&5
19753 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19754   echo $ac_n "(cached) $ac_c" 1>&6
19755 else
19756         ol_LIBS="$LIBS"
19757         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19758 echo "configure:19759: checking for dbm_open" >&5
19759 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19760   echo $ac_n "(cached) $ac_c" 1>&6
19761 else
19762   cat > conftest.$ac_ext <<EOF
19763 #line 19764 "configure"
19764 #include "confdefs.h"
19765 /* System header to define __stub macros and hopefully few prototypes,
19766     which can conflict with char dbm_open(); below.  */
19767 #include <assert.h>
19768 /* Override any gcc2 internal prototype to avoid an error.  */
19769 /* We use char because int might match the return type of a gcc2
19770     builtin and then its argument prototype would still apply.  */
19771 char dbm_open();
19772 char (*f)();
19773
19774 int main() {
19775
19776 /* The GNU C library defines this for functions which it implements
19777     to always fail with ENOSYS.  Some functions are actually named
19778     something starting with __ and the normal name is an alias.  */
19779 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19780 choke me
19781 #else
19782 f = dbm_open;
19783 #endif
19784
19785 ; return 0; }
19786 EOF
19787 if { (eval echo configure:19788: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19788   rm -rf conftest*
19789   eval "ac_cv_func_dbm_open=yes"
19790 else
19791   echo "configure: failed program was:" >&5
19792   cat conftest.$ac_ext >&5
19793   rm -rf conftest*
19794   eval "ac_cv_func_dbm_open=no"
19795 fi
19796 rm -f conftest*
19797 fi
19798
19799 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19800   echo "$ac_t""yes" 1>&6
19801   ol_cv_lib_ndbm=yes
19802 else
19803   echo "$ac_t""no" 1>&6
19804
19805                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19806 echo "configure:19807: checking for dbm_open in -lndbm" >&5
19807 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19808 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19809   echo $ac_n "(cached) $ac_c" 1>&6
19810 else
19811   ac_save_LIBS="$LIBS"
19812 LIBS="-lndbm  $LIBS"
19813 cat > conftest.$ac_ext <<EOF
19814 #line 19815 "configure"
19815 #include "confdefs.h"
19816 /* Override any gcc2 internal prototype to avoid an error.  */
19817 /* We use char because int might match the return type of a gcc2
19818     builtin and then its argument prototype would still apply.  */
19819 char dbm_open();
19820
19821 int main() {
19822 dbm_open()
19823 ; return 0; }
19824 EOF
19825 if { (eval echo configure:19826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19826   rm -rf conftest*
19827   eval "ac_cv_lib_$ac_lib_var=yes"
19828 else
19829   echo "configure: failed program was:" >&5
19830   cat conftest.$ac_ext >&5
19831   rm -rf conftest*
19832   eval "ac_cv_lib_$ac_lib_var=no"
19833 fi
19834 rm -f conftest*
19835 LIBS="$ac_save_LIBS"
19836
19837 fi
19838 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19839   echo "$ac_t""yes" 1>&6
19840   ol_cv_lib_ndbm=-lndbm
19841 else
19842   echo "$ac_t""no" 1>&6
19843
19844                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19845 echo "configure:19846: checking for dbm_open in -ldbm" >&5
19846 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19847 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19848   echo $ac_n "(cached) $ac_c" 1>&6
19849 else
19850   ac_save_LIBS="$LIBS"
19851 LIBS="-ldbm  $LIBS"
19852 cat > conftest.$ac_ext <<EOF
19853 #line 19854 "configure"
19854 #include "confdefs.h"
19855 /* Override any gcc2 internal prototype to avoid an error.  */
19856 /* We use char because int might match the return type of a gcc2
19857     builtin and then its argument prototype would still apply.  */
19858 char dbm_open();
19859
19860 int main() {
19861 dbm_open()
19862 ; return 0; }
19863 EOF
19864 if { (eval echo configure:19865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19865   rm -rf conftest*
19866   eval "ac_cv_lib_$ac_lib_var=yes"
19867 else
19868   echo "configure: failed program was:" >&5
19869   cat conftest.$ac_ext >&5
19870   rm -rf conftest*
19871   eval "ac_cv_lib_$ac_lib_var=no"
19872 fi
19873 rm -f conftest*
19874 LIBS="$ac_save_LIBS"
19875
19876 fi
19877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19878   echo "$ac_t""yes" 1>&6
19879   ol_cv_lib_ndbm=-ldbm
19880 else
19881   echo "$ac_t""no" 1>&6
19882 ol_cv_lib_ndbm=no
19883 fi
19884                 
19885 fi
19886
19887         
19888 fi
19889
19890         LIBS="$ol_LIBS"
19891
19892 fi
19893
19894 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19895
19896
19897  for ac_hdr in ndbm.h
19898 do
19899 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19900 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19901 echo "configure:19902: checking for $ac_hdr" >&5
19902 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19903   echo $ac_n "(cached) $ac_c" 1>&6
19904 else
19905   cat > conftest.$ac_ext <<EOF
19906 #line 19907 "configure"
19907 #include "confdefs.h"
19908 #include <$ac_hdr>
19909 EOF
19910 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19911 { (eval echo configure:19912: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19912 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19913 if test -z "$ac_err"; then
19914   rm -rf conftest*
19915   eval "ac_cv_header_$ac_safe=yes"
19916 else
19917   echo "$ac_err" >&5
19918   echo "configure: failed program was:" >&5
19919   cat conftest.$ac_ext >&5
19920   rm -rf conftest*
19921   eval "ac_cv_header_$ac_safe=no"
19922 fi
19923 rm -f conftest*
19924 fi
19925 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19926   echo "$ac_t""yes" 1>&6
19927     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19928   cat >> confdefs.h <<EOF
19929 #define $ac_tr_hdr 1
19930 EOF
19931  
19932 else
19933   echo "$ac_t""no" 1>&6
19934 fi
19935 done
19936
19937  echo $ac_n "checking for db""... $ac_c" 1>&6
19938 echo "configure:19939: checking for db" >&5
19939 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19940   echo $ac_n "(cached) $ac_c" 1>&6
19941 else
19942   
19943         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19944                 ol_cv_ndbm=no
19945         else
19946                 ol_cv_ndbm=yes
19947         fi
19948
19949 fi
19950
19951 echo "$ac_t""$ol_cv_ndbm" 1>&6
19952  if test $ol_cv_ndbm = yes ; then
19953         cat >> confdefs.h <<\EOF
19954 #define HAVE_NDBM 1
19955 EOF
19956
19957  fi
19958
19959
19960         if test $ol_cv_ndbm = yes ; then
19961                 ol_link_ldbm=ndbm
19962                 ol_with_ldbm_api=ndbm
19963
19964                 if test $ol_cv_lib_ndbm != yes ; then
19965                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19966                 fi
19967         fi
19968 fi
19969
19970 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19971         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19972         if test $ol_enable_ldbm = yes ; then
19973                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19974         fi
19975
19976         echo "configure: warning: disabling LDBM" 1>&2
19977         ol_enable_ldbm=no
19978 fi
19979
19980
19981 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19982         BUILD_LIBS_DYNAMIC=shared
19983         cat >> confdefs.h <<\EOF
19984 #define LDAP_LIBS_DYNAMIC 1
19985 EOF
19986
19987         LTSTATIC=""
19988 else
19989         BUILD_LIBS_DYNAMIC=static
19990         LTSTATIC="-static"
19991 fi
19992
19993 if test $ol_enable_wrappers != no ; then
19994         for ac_hdr in tcpd.h
19995 do
19996 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19997 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19998 echo "configure:19999: checking for $ac_hdr" >&5
19999 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20000   echo $ac_n "(cached) $ac_c" 1>&6
20001 else
20002   cat > conftest.$ac_ext <<EOF
20003 #line 20004 "configure"
20004 #include "confdefs.h"
20005 #include <$ac_hdr>
20006 EOF
20007 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20008 { (eval echo configure:20009: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20009 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20010 if test -z "$ac_err"; then
20011   rm -rf conftest*
20012   eval "ac_cv_header_$ac_safe=yes"
20013 else
20014   echo "$ac_err" >&5
20015   echo "configure: failed program was:" >&5
20016   cat conftest.$ac_ext >&5
20017   rm -rf conftest*
20018   eval "ac_cv_header_$ac_safe=no"
20019 fi
20020 rm -f conftest*
20021 fi
20022 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20023   echo "$ac_t""yes" 1>&6
20024     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20025   cat >> confdefs.h <<EOF
20026 #define $ac_tr_hdr 1
20027 EOF
20028  
20029                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20030 echo "configure:20031: checking for TCP wrappers library" >&5
20031                 save_LIBS="$LIBS"
20032                 LIBS="$LIBS -lwrap"
20033                 cat > conftest.$ac_ext <<EOF
20034 #line 20035 "configure"
20035 #include "confdefs.h"
20036
20037 #include <tcpd.h>
20038 int allow_severity = 0;
20039 int deny_severity  = 0;
20040
20041 struct request_info *req;
20042                 
20043 int main() {
20044
20045 hosts_access(req)
20046                 
20047 ; return 0; }
20048 EOF
20049 if { (eval echo configure:20050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20050   rm -rf conftest*
20051   echo "$ac_t""-lwrap" 1>&6
20052                 have_wrappers=yes
20053                 LIBS="$save_LIBS"
20054 else
20055   echo "configure: failed program was:" >&5
20056   cat conftest.$ac_ext >&5
20057   rm -rf conftest*
20058   
20059                                 LIBS="$LIBS -lnsl"
20060                 cat > conftest.$ac_ext <<EOF
20061 #line 20062 "configure"
20062 #include "confdefs.h"
20063
20064 #include <tcpd.h>
20065 int allow_severity = 0;
20066 int deny_severity  = 0;
20067
20068 struct request_info *req;
20069                 
20070 int main() {
20071
20072 hosts_access(req)
20073                 
20074 ; return 0; }
20075 EOF
20076 if { (eval echo configure:20077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20077   rm -rf conftest*
20078   echo "$ac_t""-lwrap -lnsl" 1>&6
20079                 have_wrappers=yes
20080                 LIBS="$save_LIBS -lnsl"
20081 else
20082   echo "configure: failed program was:" >&5
20083   cat conftest.$ac_ext >&5
20084   rm -rf conftest*
20085   
20086                 echo "$ac_t""no" 1>&6
20087                 have_wrappers=no
20088                 LIBS=$save_LIBS
20089 fi
20090 rm -f conftest*
20091 fi
20092 rm -f conftest*
20093 else
20094   echo "$ac_t""no" 1>&6
20095 have_wrappers=no
20096 fi
20097 done
20098
20099
20100         if test $have_wrappers = yes ; then
20101                 cat >> confdefs.h <<\EOF
20102 #define HAVE_TCPD 1
20103 EOF
20104
20105                 WRAP_LIBS="-lwrap"
20106         elif test $ol_enable_wrappers = yes ; then
20107                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20108         else
20109                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20110                 WRAP_LIBS=""
20111         fi
20112 fi
20113
20114 if test $ol_enable_syslog != no ; then
20115         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20116 echo "configure:20117: checking for openlog" >&5
20117 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20118   echo $ac_n "(cached) $ac_c" 1>&6
20119 else
20120   cat > conftest.$ac_ext <<EOF
20121 #line 20122 "configure"
20122 #include "confdefs.h"
20123 /* System header to define __stub macros and hopefully few prototypes,
20124     which can conflict with char openlog(); below.  */
20125 #include <assert.h>
20126 /* Override any gcc2 internal prototype to avoid an error.  */
20127 /* We use char because int might match the return type of a gcc2
20128     builtin and then its argument prototype would still apply.  */
20129 char openlog();
20130 char (*f)();
20131
20132 int main() {
20133
20134 /* The GNU C library defines this for functions which it implements
20135     to always fail with ENOSYS.  Some functions are actually named
20136     something starting with __ and the normal name is an alias.  */
20137 #if defined (__stub_openlog) || defined (__stub___openlog)
20138 choke me
20139 #else
20140 f = openlog;
20141 #endif
20142
20143 ; return 0; }
20144 EOF
20145 if { (eval echo configure:20146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20146   rm -rf conftest*
20147   eval "ac_cv_func_openlog=yes"
20148 else
20149   echo "configure: failed program was:" >&5
20150   cat conftest.$ac_ext >&5
20151   rm -rf conftest*
20152   eval "ac_cv_func_openlog=no"
20153 fi
20154 rm -f conftest*
20155 fi
20156
20157 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20158   echo "$ac_t""yes" 1>&6
20159   :
20160 else
20161   echo "$ac_t""no" 1>&6
20162 fi
20163
20164         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20165                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20166         fi
20167         ol_enable_syslog=$ac_cv_func_openlog
20168 fi
20169
20170
20171 ol_link_sql=no
20172 if test $ol_enable_sql != no ; then
20173         for ac_hdr in sql.h sqlext.h
20174 do
20175 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20176 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20177 echo "configure:20178: checking for $ac_hdr" >&5
20178 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20179   echo $ac_n "(cached) $ac_c" 1>&6
20180 else
20181   cat > conftest.$ac_ext <<EOF
20182 #line 20183 "configure"
20183 #include "confdefs.h"
20184 #include <$ac_hdr>
20185 EOF
20186 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20187 { (eval echo configure:20188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20188 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20189 if test -z "$ac_err"; then
20190   rm -rf conftest*
20191   eval "ac_cv_header_$ac_safe=yes"
20192 else
20193   echo "$ac_err" >&5
20194   echo "configure: failed program was:" >&5
20195   cat conftest.$ac_ext >&5
20196   rm -rf conftest*
20197   eval "ac_cv_header_$ac_safe=no"
20198 fi
20199 rm -f conftest*
20200 fi
20201 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20202   echo "$ac_t""yes" 1>&6
20203     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20204   cat >> confdefs.h <<EOF
20205 #define $ac_tr_hdr 1
20206 EOF
20207  
20208 else
20209   echo "$ac_t""no" 1>&6
20210 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20211         
20212 fi
20213 done
20214
20215
20216         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20217 echo "configure:20218: checking for SQLDriverConnect in -liodbc" >&5
20218 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20219 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20220   echo $ac_n "(cached) $ac_c" 1>&6
20221 else
20222   ac_save_LIBS="$LIBS"
20223 LIBS="-liodbc  $LIBS"
20224 cat > conftest.$ac_ext <<EOF
20225 #line 20226 "configure"
20226 #include "confdefs.h"
20227 /* Override any gcc2 internal prototype to avoid an error.  */
20228 /* We use char because int might match the return type of a gcc2
20229     builtin and then its argument prototype would still apply.  */
20230 char SQLDriverConnect();
20231
20232 int main() {
20233 SQLDriverConnect()
20234 ; return 0; }
20235 EOF
20236 if { (eval echo configure:20237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20237   rm -rf conftest*
20238   eval "ac_cv_lib_$ac_lib_var=yes"
20239 else
20240   echo "configure: failed program was:" >&5
20241   cat conftest.$ac_ext >&5
20242   rm -rf conftest*
20243   eval "ac_cv_lib_$ac_lib_var=no"
20244 fi
20245 rm -f conftest*
20246 LIBS="$ac_save_LIBS"
20247
20248 fi
20249 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20250   echo "$ac_t""yes" 1>&6
20251   have_iodbc=yes
20252 else
20253   echo "$ac_t""no" 1>&6
20254 have_iodbc=no
20255 fi
20256
20257         if test $have_iodbc = yes ; then
20258                 ol_link_sql="-liodbc"
20259         else
20260                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20261 echo "configure:20262: checking for SQLDriverConnect in -lodbc" >&5
20262 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20263 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20264   echo $ac_n "(cached) $ac_c" 1>&6
20265 else
20266   ac_save_LIBS="$LIBS"
20267 LIBS="-lodbc  $LIBS"
20268 cat > conftest.$ac_ext <<EOF
20269 #line 20270 "configure"
20270 #include "confdefs.h"
20271 /* Override any gcc2 internal prototype to avoid an error.  */
20272 /* We use char because int might match the return type of a gcc2
20273     builtin and then its argument prototype would still apply.  */
20274 char SQLDriverConnect();
20275
20276 int main() {
20277 SQLDriverConnect()
20278 ; return 0; }
20279 EOF
20280 if { (eval echo configure:20281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20281   rm -rf conftest*
20282   eval "ac_cv_lib_$ac_lib_var=yes"
20283 else
20284   echo "configure: failed program was:" >&5
20285   cat conftest.$ac_ext >&5
20286   rm -rf conftest*
20287   eval "ac_cv_lib_$ac_lib_var=no"
20288 fi
20289 rm -f conftest*
20290 LIBS="$ac_save_LIBS"
20291
20292 fi
20293 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20294   echo "$ac_t""yes" 1>&6
20295   have_odbc=yes
20296 else
20297   echo "$ac_t""no" 1>&6
20298 have_odbc=no
20299 fi
20300
20301                 if test $have_odbc = yes ; then
20302                         ol_link_sql="-lodbc"
20303                 fi
20304         fi
20305
20306         if test $ol_link_sql != no ; then
20307                 SLAPD_SQL_LIBS="$ol_link_sql"
20308
20309         elif test $ol_enable_sql != auto ; then
20310                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20311         fi
20312 fi
20313
20314 ol_link_sasl=no
20315 ol_link_spasswd=no
20316 if test $ol_with_cyrus_sasl != no ; then
20317         for ac_hdr in sasl/sasl.h sasl.h
20318 do
20319 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20320 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20321 echo "configure:20322: checking for $ac_hdr" >&5
20322 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20323   echo $ac_n "(cached) $ac_c" 1>&6
20324 else
20325   cat > conftest.$ac_ext <<EOF
20326 #line 20327 "configure"
20327 #include "confdefs.h"
20328 #include <$ac_hdr>
20329 EOF
20330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20331 { (eval echo configure:20332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20333 if test -z "$ac_err"; then
20334   rm -rf conftest*
20335   eval "ac_cv_header_$ac_safe=yes"
20336 else
20337   echo "$ac_err" >&5
20338   echo "configure: failed program was:" >&5
20339   cat conftest.$ac_ext >&5
20340   rm -rf conftest*
20341   eval "ac_cv_header_$ac_safe=no"
20342 fi
20343 rm -f conftest*
20344 fi
20345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20346   echo "$ac_t""yes" 1>&6
20347     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20348   cat >> confdefs.h <<EOF
20349 #define $ac_tr_hdr 1
20350 EOF
20351  
20352 else
20353   echo "$ac_t""no" 1>&6
20354 fi
20355 done
20356
20357
20358         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20359                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20360 echo "configure:20361: checking for sasl_client_init in -lsasl2" >&5
20361 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20362 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20363   echo $ac_n "(cached) $ac_c" 1>&6
20364 else
20365   ac_save_LIBS="$LIBS"
20366 LIBS="-lsasl2  $LIBS"
20367 cat > conftest.$ac_ext <<EOF
20368 #line 20369 "configure"
20369 #include "confdefs.h"
20370 /* Override any gcc2 internal prototype to avoid an error.  */
20371 /* We use char because int might match the return type of a gcc2
20372     builtin and then its argument prototype would still apply.  */
20373 char sasl_client_init();
20374
20375 int main() {
20376 sasl_client_init()
20377 ; return 0; }
20378 EOF
20379 if { (eval echo configure:20380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20380   rm -rf conftest*
20381   eval "ac_cv_lib_$ac_lib_var=yes"
20382 else
20383   echo "configure: failed program was:" >&5
20384   cat conftest.$ac_ext >&5
20385   rm -rf conftest*
20386   eval "ac_cv_lib_$ac_lib_var=no"
20387 fi
20388 rm -f conftest*
20389 LIBS="$ac_save_LIBS"
20390
20391 fi
20392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20393   echo "$ac_t""yes" 1>&6
20394   ol_link_sasl="-lsasl2"
20395 else
20396   echo "$ac_t""no" 1>&6
20397 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20398 echo "configure:20399: checking for sasl_client_init in -lsasl" >&5
20399 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20400 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20401   echo $ac_n "(cached) $ac_c" 1>&6
20402 else
20403   ac_save_LIBS="$LIBS"
20404 LIBS="-lsasl  $LIBS"
20405 cat > conftest.$ac_ext <<EOF
20406 #line 20407 "configure"
20407 #include "confdefs.h"
20408 /* Override any gcc2 internal prototype to avoid an error.  */
20409 /* We use char because int might match the return type of a gcc2
20410     builtin and then its argument prototype would still apply.  */
20411 char sasl_client_init();
20412
20413 int main() {
20414 sasl_client_init()
20415 ; return 0; }
20416 EOF
20417 if { (eval echo configure:20418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20418   rm -rf conftest*
20419   eval "ac_cv_lib_$ac_lib_var=yes"
20420 else
20421   echo "configure: failed program was:" >&5
20422   cat conftest.$ac_ext >&5
20423   rm -rf conftest*
20424   eval "ac_cv_lib_$ac_lib_var=no"
20425 fi
20426 rm -f conftest*
20427 LIBS="$ac_save_LIBS"
20428
20429 fi
20430 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20431   echo "$ac_t""yes" 1>&6
20432   ol_link_sasl="-lsasl"
20433 else
20434   echo "$ac_t""no" 1>&6
20435 fi
20436
20437 fi
20438
20439         fi
20440
20441         if test $ol_link_sasl = no ; then
20442                 if test $ol_with_cyrus_sasl != auto ; then
20443                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20444                 else
20445                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20446                         echo "configure: warning: SASL authentication not supported!" 1>&2
20447                         if test $ol_link_tls = no ; then
20448                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20449                         fi
20450                 fi
20451         else
20452                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20453 echo "configure:20454: checking Cyrus SASL library version" >&5
20454 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20455   echo $ac_n "(cached) $ac_c" 1>&6
20456 else
20457   
20458         cat > conftest.$ac_ext <<EOF
20459 #line 20460 "configure"
20460 #include "confdefs.h"
20461
20462 #ifdef HAVE_SASL_SASL_H
20463 #include <sasl/sasl.h>
20464 #else
20465 #include <sasl.h>
20466 #endif
20467
20468 /* Require 2.1.15+ */
20469 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20470         char *__sasl_compat = "2.2+ or better okay (we guess)";
20471 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20472         && SASL_VERSION_STEP >=15
20473         char *__sasl_compat = "2.1.15+ or better okay";
20474 #endif
20475         
20476 EOF
20477 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20478   egrep "__sasl_compat" >/dev/null 2>&1; then
20479   rm -rf conftest*
20480   ol_cv_sasl_compat=yes
20481 else
20482   rm -rf conftest*
20483   ol_cv_sasl_compat=no
20484 fi
20485 rm -f conftest*
20486
20487 fi
20488
20489 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20490
20491                 if test $ol_cv_sasl_compat = no ; then
20492                         ol_link_sasl=no
20493                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
20494                 fi
20495
20496                 cat >> confdefs.h <<\EOF
20497 #define HAVE_CYRUS_SASL 1
20498 EOF
20499
20500                 SASL_LIBS="$ol_link_sasl"
20501                 if test $ol_enable_spasswd != no ; then
20502                         ol_link_spasswd=yes
20503                 fi
20504
20505                 ac_save_LIBS="$LIBS"
20506                 LIBS="$LIBS $ol_link_sasl"
20507                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20508 echo "configure:20509: checking for sasl_version" >&5
20509 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20510   echo $ac_n "(cached) $ac_c" 1>&6
20511 else
20512   cat > conftest.$ac_ext <<EOF
20513 #line 20514 "configure"
20514 #include "confdefs.h"
20515 /* System header to define __stub macros and hopefully few prototypes,
20516     which can conflict with char sasl_version(); below.  */
20517 #include <assert.h>
20518 /* Override any gcc2 internal prototype to avoid an error.  */
20519 /* We use char because int might match the return type of a gcc2
20520     builtin and then its argument prototype would still apply.  */
20521 char sasl_version();
20522 char (*f)();
20523
20524 int main() {
20525
20526 /* The GNU C library defines this for functions which it implements
20527     to always fail with ENOSYS.  Some functions are actually named
20528     something starting with __ and the normal name is an alias.  */
20529 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20530 choke me
20531 #else
20532 f = sasl_version;
20533 #endif
20534
20535 ; return 0; }
20536 EOF
20537 if { (eval echo configure:20538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20538   rm -rf conftest*
20539   eval "ac_cv_func_sasl_version=yes"
20540 else
20541   echo "configure: failed program was:" >&5
20542   cat conftest.$ac_ext >&5
20543   rm -rf conftest*
20544   eval "ac_cv_func_sasl_version=no"
20545 fi
20546 rm -f conftest*
20547 fi
20548
20549 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20550   echo "$ac_t""yes" 1>&6
20551   cat >> confdefs.h <<\EOF
20552 #define HAVE_SASL_VERSION 1
20553 EOF
20554
20555 else
20556   echo "$ac_t""no" 1>&6
20557 fi
20558
20559                 LIBS="$ac_save_LIBS"
20560         fi
20561
20562 else
20563         echo "configure: warning: SASL authentication not supported!" 1>&2
20564         if test $ol_link_tls = no ; then
20565                 echo "configure: warning: Strong authentication not supported!" 1>&2
20566         fi
20567 fi
20568
20569 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20570         dev=no
20571         if test -r /dev/urandom ; then
20572                 dev="/dev/urandom";
20573         elif test -r /idev/urandom ; then
20574                 dev="/idev/urandom";
20575         elif test -r /dev/srandom ; then
20576                 dev="/dev/srandom";
20577         elif test -r /dev/random ; then
20578                 dev="/dev/random";
20579         elif test -r /idev/random ; then
20580                 dev="/idev/random";
20581         fi
20582
20583         if test $dev != no ; then
20584                 cat >> confdefs.h <<EOF
20585 #define URANDOM_DEVICE "$dev"
20586 EOF
20587
20588         fi
20589 fi
20590
20591 ol_link_fetch=no
20592 if test $ol_with_fetch != no ; then
20593         ol_LIBS=$LIBS
20594 LIBS="-lfetch -lcom_err $LIBS"
20595 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20596 echo "configure:20597: checking fetch(3) library" >&5
20597 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20598   echo $ac_n "(cached) $ac_c" 1>&6
20599 else
20600   
20601         cat > conftest.$ac_ext <<EOF
20602 #line 20603 "configure"
20603 #include "confdefs.h"
20604
20605 #include <sys/param.h>
20606 #include <stdio.h>
20607 #include <fetch.h>
20608 int main() {
20609 struct url *u = fetchParseURL("file:///"); 
20610 ; return 0; }
20611 EOF
20612 if { (eval echo configure:20613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20613   rm -rf conftest*
20614   ol_cv_lib_fetch=yes
20615 else
20616   echo "configure: failed program was:" >&5
20617   cat conftest.$ac_ext >&5
20618   rm -rf conftest*
20619   ol_cv_lib_fetch=no
20620 fi
20621 rm -f conftest*
20622 fi
20623
20624 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20625 LIBS=$ol_LIBS
20626 if test $ol_cv_lib_fetch != no ; then
20627         ol_link_fetch="-lfetch -lcom_err"
20628         cat >> confdefs.h <<\EOF
20629 #define HAVE_FETCH 1
20630 EOF
20631
20632 fi
20633
20634
20635         if test $ol_cv_lib_fetch != no ; then
20636                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
20637                 ol_link_fetch=freebsd
20638
20639         elif test $ol_with_fetch != auto ; then
20640                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20641         fi 
20642 fi
20643
20644 if test $ol_enable_crypt != no ; then
20645         save_LIBS="$LIBS"
20646         LIBS="$TLS_LIBS $LIBS"
20647
20648         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20649 echo "configure:20650: checking for crypt" >&5
20650 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20651   echo $ac_n "(cached) $ac_c" 1>&6
20652 else
20653   cat > conftest.$ac_ext <<EOF
20654 #line 20655 "configure"
20655 #include "confdefs.h"
20656 /* System header to define __stub macros and hopefully few prototypes,
20657     which can conflict with char crypt(); below.  */
20658 #include <assert.h>
20659 /* Override any gcc2 internal prototype to avoid an error.  */
20660 /* We use char because int might match the return type of a gcc2
20661     builtin and then its argument prototype would still apply.  */
20662 char crypt();
20663 char (*f)();
20664
20665 int main() {
20666
20667 /* The GNU C library defines this for functions which it implements
20668     to always fail with ENOSYS.  Some functions are actually named
20669     something starting with __ and the normal name is an alias.  */
20670 #if defined (__stub_crypt) || defined (__stub___crypt)
20671 choke me
20672 #else
20673 f = crypt;
20674 #endif
20675
20676 ; return 0; }
20677 EOF
20678 if { (eval echo configure:20679: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20679   rm -rf conftest*
20680   eval "ac_cv_func_crypt=yes"
20681 else
20682   echo "configure: failed program was:" >&5
20683   cat conftest.$ac_ext >&5
20684   rm -rf conftest*
20685   eval "ac_cv_func_crypt=no"
20686 fi
20687 rm -f conftest*
20688 fi
20689
20690 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20691   echo "$ac_t""yes" 1>&6
20692   have_crypt=yes
20693 else
20694   echo "$ac_t""no" 1>&6
20695
20696                 LIBS="$save_LIBS"
20697                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20698 echo "configure:20699: checking for crypt in -lcrypt" >&5
20699 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20700 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20701   echo $ac_n "(cached) $ac_c" 1>&6
20702 else
20703   ac_save_LIBS="$LIBS"
20704 LIBS="-lcrypt  $LIBS"
20705 cat > conftest.$ac_ext <<EOF
20706 #line 20707 "configure"
20707 #include "confdefs.h"
20708 /* Override any gcc2 internal prototype to avoid an error.  */
20709 /* We use char because int might match the return type of a gcc2
20710     builtin and then its argument prototype would still apply.  */
20711 char crypt();
20712
20713 int main() {
20714 crypt()
20715 ; return 0; }
20716 EOF
20717 if { (eval echo configure:20718: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20718   rm -rf conftest*
20719   eval "ac_cv_lib_$ac_lib_var=yes"
20720 else
20721   echo "configure: failed program was:" >&5
20722   cat conftest.$ac_ext >&5
20723   rm -rf conftest*
20724   eval "ac_cv_lib_$ac_lib_var=no"
20725 fi
20726 rm -f conftest*
20727 LIBS="$ac_save_LIBS"
20728
20729 fi
20730 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20731   echo "$ac_t""yes" 1>&6
20732   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20733                         have_crypt=yes
20734 else
20735   echo "$ac_t""no" 1>&6
20736 have_crypt=no
20737 fi
20738
20739 fi
20740
20741
20742         LIBS="$save_LIBS"
20743
20744         if test $have_crypt = yes ; then
20745                 cat >> confdefs.h <<\EOF
20746 #define HAVE_CRYPT 1
20747 EOF
20748
20749         else
20750                 echo "configure: warning: could not find crypt" 1>&2
20751                 if test $ol_enable_crypt = yes ; then
20752                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
20753                 fi
20754
20755                 echo "configure: warning: disabling crypt support" 1>&2
20756                 ol_enable_crypt=no
20757         fi
20758 fi
20759
20760 if test $ol_enable_proctitle != no ; then
20761         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20762 echo "configure:20763: checking for setproctitle" >&5
20763 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20764   echo $ac_n "(cached) $ac_c" 1>&6
20765 else
20766   cat > conftest.$ac_ext <<EOF
20767 #line 20768 "configure"
20768 #include "confdefs.h"
20769 /* System header to define __stub macros and hopefully few prototypes,
20770     which can conflict with char setproctitle(); below.  */
20771 #include <assert.h>
20772 /* Override any gcc2 internal prototype to avoid an error.  */
20773 /* We use char because int might match the return type of a gcc2
20774     builtin and then its argument prototype would still apply.  */
20775 char setproctitle();
20776 char (*f)();
20777
20778 int main() {
20779
20780 /* The GNU C library defines this for functions which it implements
20781     to always fail with ENOSYS.  Some functions are actually named
20782     something starting with __ and the normal name is an alias.  */
20783 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20784 choke me
20785 #else
20786 f = setproctitle;
20787 #endif
20788
20789 ; return 0; }
20790 EOF
20791 if { (eval echo configure:20792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20792   rm -rf conftest*
20793   eval "ac_cv_func_setproctitle=yes"
20794 else
20795   echo "configure: failed program was:" >&5
20796   cat conftest.$ac_ext >&5
20797   rm -rf conftest*
20798   eval "ac_cv_func_setproctitle=no"
20799 fi
20800 rm -f conftest*
20801 fi
20802
20803 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20804   echo "$ac_t""yes" 1>&6
20805   have_setproctitle=yes
20806 else
20807   echo "$ac_t""no" 1>&6
20808
20809                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20810 echo "configure:20811: checking for setproctitle in -lutil" >&5
20811 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20812 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20813   echo $ac_n "(cached) $ac_c" 1>&6
20814 else
20815   ac_save_LIBS="$LIBS"
20816 LIBS="-lutil  $LIBS"
20817 cat > conftest.$ac_ext <<EOF
20818 #line 20819 "configure"
20819 #include "confdefs.h"
20820 /* Override any gcc2 internal prototype to avoid an error.  */
20821 /* We use char because int might match the return type of a gcc2
20822     builtin and then its argument prototype would still apply.  */
20823 char setproctitle();
20824
20825 int main() {
20826 setproctitle()
20827 ; return 0; }
20828 EOF
20829 if { (eval echo configure:20830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20830   rm -rf conftest*
20831   eval "ac_cv_lib_$ac_lib_var=yes"
20832 else
20833   echo "configure: failed program was:" >&5
20834   cat conftest.$ac_ext >&5
20835   rm -rf conftest*
20836   eval "ac_cv_lib_$ac_lib_var=no"
20837 fi
20838 rm -f conftest*
20839 LIBS="$ac_save_LIBS"
20840
20841 fi
20842 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20843   echo "$ac_t""yes" 1>&6
20844   have_setproctitle=yes
20845                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20846 else
20847   echo "$ac_t""no" 1>&6
20848 have_setproctitle=no
20849                         LIBOBJS="$LIBOBJS setproctitle.o"
20850                         LIBSRCS="$LIBSRCS setproctitle.c"
20851 fi
20852
20853 fi
20854
20855
20856         if test $have_setproctitle = yes ; then
20857                 cat >> confdefs.h <<\EOF
20858 #define HAVE_SETPROCTITLE 1
20859 EOF
20860
20861         fi
20862 fi
20863
20864 if test $ol_enable_slp != no ; then
20865         for ac_hdr in slp.h 
20866 do
20867 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20868 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20869 echo "configure:20870: checking for $ac_hdr" >&5
20870 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20871   echo $ac_n "(cached) $ac_c" 1>&6
20872 else
20873   cat > conftest.$ac_ext <<EOF
20874 #line 20875 "configure"
20875 #include "confdefs.h"
20876 #include <$ac_hdr>
20877 EOF
20878 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20879 { (eval echo configure:20880: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20880 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20881 if test -z "$ac_err"; then
20882   rm -rf conftest*
20883   eval "ac_cv_header_$ac_safe=yes"
20884 else
20885   echo "$ac_err" >&5
20886   echo "configure: failed program was:" >&5
20887   cat conftest.$ac_ext >&5
20888   rm -rf conftest*
20889   eval "ac_cv_header_$ac_safe=no"
20890 fi
20891 rm -f conftest*
20892 fi
20893 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20894   echo "$ac_t""yes" 1>&6
20895     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20896   cat >> confdefs.h <<EOF
20897 #define $ac_tr_hdr 1
20898 EOF
20899  
20900 else
20901   echo "$ac_t""no" 1>&6
20902 fi
20903 done
20904
20905
20906         if test $ac_cv_header_slp_h = yes ; then
20907                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20908 echo "configure:20909: checking for SLPOpen in -lslp" >&5
20909 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20910 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20911   echo $ac_n "(cached) $ac_c" 1>&6
20912 else
20913   ac_save_LIBS="$LIBS"
20914 LIBS="-lslp  $LIBS"
20915 cat > conftest.$ac_ext <<EOF
20916 #line 20917 "configure"
20917 #include "confdefs.h"
20918 /* Override any gcc2 internal prototype to avoid an error.  */
20919 /* We use char because int might match the return type of a gcc2
20920     builtin and then its argument prototype would still apply.  */
20921 char SLPOpen();
20922
20923 int main() {
20924 SLPOpen()
20925 ; return 0; }
20926 EOF
20927 if { (eval echo configure:20928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20928   rm -rf conftest*
20929   eval "ac_cv_lib_$ac_lib_var=yes"
20930 else
20931   echo "configure: failed program was:" >&5
20932   cat conftest.$ac_ext >&5
20933   rm -rf conftest*
20934   eval "ac_cv_lib_$ac_lib_var=no"
20935 fi
20936 rm -f conftest*
20937 LIBS="$ac_save_LIBS"
20938
20939 fi
20940 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20941   echo "$ac_t""yes" 1>&6
20942   have_slp=yes
20943 else
20944   echo "$ac_t""no" 1>&6
20945 have_slp=no
20946 fi
20947
20948                 if test $have_slp = yes ; then
20949                         cat >> confdefs.h <<\EOF
20950 #define HAVE_SLP 1
20951 EOF
20952
20953                         SLAPD_SLP_LIBS=-lslp
20954                 fi
20955
20956         elif test $ol_enable_slp = yes ; then
20957                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20958         fi
20959 fi
20960
20961
20962 echo $ac_n "checking long long""... $ac_c" 1>&6
20963 echo "configure:20964: checking long long" >&5
20964 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
20965   echo $ac_n "(cached) $ac_c" 1>&6
20966 else
20967   
20968         cat > conftest.$ac_ext <<EOF
20969 #line 20970 "configure"
20970 #include "confdefs.h"
20971
20972 int main() {
20973 long long x;
20974 ; return 0; }
20975 EOF
20976 if { (eval echo configure:20977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20977   rm -rf conftest*
20978   ol_cv_type_long_long=yes
20979 else
20980   echo "configure: failed program was:" >&5
20981   cat conftest.$ac_ext >&5
20982   rm -rf conftest*
20983   ol_cv_type_long_long=no
20984 fi
20985 rm -f conftest*
20986 fi
20987
20988 echo "$ac_t""$ol_cv_type_long_long" 1>&6
20989 if test $ol_cv_type_long_long = yes; then
20990         cat >> confdefs.h <<\EOF
20991 #define HAVE_LONG_LONG 1
20992 EOF
20993
20994 fi
20995
20996 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20997 echo "configure:20998: checking for ANSI C header files" >&5
20998 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20999   echo $ac_n "(cached) $ac_c" 1>&6
21000 else
21001   cat > conftest.$ac_ext <<EOF
21002 #line 21003 "configure"
21003 #include "confdefs.h"
21004 #include <stdlib.h>
21005 #include <stdarg.h>
21006 #include <string.h>
21007 #include <float.h>
21008 EOF
21009 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21010 { (eval echo configure:21011: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21011 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21012 if test -z "$ac_err"; then
21013   rm -rf conftest*
21014   ac_cv_header_stdc=yes
21015 else
21016   echo "$ac_err" >&5
21017   echo "configure: failed program was:" >&5
21018   cat conftest.$ac_ext >&5
21019   rm -rf conftest*
21020   ac_cv_header_stdc=no
21021 fi
21022 rm -f conftest*
21023
21024 if test $ac_cv_header_stdc = yes; then
21025   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21026 cat > conftest.$ac_ext <<EOF
21027 #line 21028 "configure"
21028 #include "confdefs.h"
21029 #include <string.h>
21030 EOF
21031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21032   egrep "memchr" >/dev/null 2>&1; then
21033   :
21034 else
21035   rm -rf conftest*
21036   ac_cv_header_stdc=no
21037 fi
21038 rm -f conftest*
21039
21040 fi
21041
21042 if test $ac_cv_header_stdc = yes; then
21043   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21044 cat > conftest.$ac_ext <<EOF
21045 #line 21046 "configure"
21046 #include "confdefs.h"
21047 #include <stdlib.h>
21048 EOF
21049 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21050   egrep "free" >/dev/null 2>&1; then
21051   :
21052 else
21053   rm -rf conftest*
21054   ac_cv_header_stdc=no
21055 fi
21056 rm -f conftest*
21057
21058 fi
21059
21060 if test $ac_cv_header_stdc = yes; then
21061   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21062 if test "$cross_compiling" = yes; then
21063   :
21064 else
21065   cat > conftest.$ac_ext <<EOF
21066 #line 21067 "configure"
21067 #include "confdefs.h"
21068 #include <ctype.h>
21069 #if ((' ' & 0x0FF) == 0x020)
21070 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21071 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21072 #else
21073 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21074  || ('j' <= (c) && (c) <= 'r') \
21075  || ('s' <= (c) && (c) <= 'z'))
21076 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21077 #endif
21078 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21079 int main () { int i; for (i = 0; i < 256; i++)
21080 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21081 exit (0); }
21082
21083 EOF
21084 if { (eval echo configure:21085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21085 then
21086   :
21087 else
21088   echo "configure: failed program was:" >&5
21089   cat conftest.$ac_ext >&5
21090   rm -fr conftest*
21091   ac_cv_header_stdc=no
21092 fi
21093 rm -fr conftest*
21094 fi
21095
21096 fi
21097 fi
21098
21099 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21100 if test $ac_cv_header_stdc = yes; then
21101   cat >> confdefs.h <<\EOF
21102 #define STDC_HEADERS 1
21103 EOF
21104
21105 fi
21106
21107 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21108 echo "configure:21109: checking for mode_t" >&5
21109 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21110   echo $ac_n "(cached) $ac_c" 1>&6
21111 else
21112   cat > conftest.$ac_ext <<EOF
21113 #line 21114 "configure"
21114 #include "confdefs.h"
21115 #include <sys/types.h>
21116 #if STDC_HEADERS
21117 #include <stdlib.h>
21118 #include <stddef.h>
21119 #endif
21120
21121 EOF
21122 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21123   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21124   rm -rf conftest*
21125   eval "ac_cv_type_mode_t=yes"
21126 else
21127   rm -rf conftest*
21128   eval "ac_cv_type_mode_t=no"
21129 fi
21130 rm -f conftest*
21131
21132 fi
21133 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21134   echo "$ac_t""yes" 1>&6
21135 else
21136   echo "$ac_t""no" 1>&6
21137   cat >> confdefs.h <<EOF
21138 #define mode_t int
21139 EOF
21140
21141 fi
21142
21143 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21144 echo "configure:21145: checking for off_t" >&5
21145 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21146   echo $ac_n "(cached) $ac_c" 1>&6
21147 else
21148   cat > conftest.$ac_ext <<EOF
21149 #line 21150 "configure"
21150 #include "confdefs.h"
21151 #include <sys/types.h>
21152 #if STDC_HEADERS
21153 #include <stdlib.h>
21154 #include <stddef.h>
21155 #endif
21156
21157 EOF
21158 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21159   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21160   rm -rf conftest*
21161   eval "ac_cv_type_off_t=yes"
21162 else
21163   rm -rf conftest*
21164   eval "ac_cv_type_off_t=no"
21165 fi
21166 rm -f conftest*
21167
21168 fi
21169 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21170   echo "$ac_t""yes" 1>&6
21171 else
21172   echo "$ac_t""no" 1>&6
21173   cat >> confdefs.h <<EOF
21174 #define off_t long
21175 EOF
21176
21177 fi
21178
21179 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21180 echo "configure:21181: checking for pid_t" >&5
21181 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21182   echo $ac_n "(cached) $ac_c" 1>&6
21183 else
21184   cat > conftest.$ac_ext <<EOF
21185 #line 21186 "configure"
21186 #include "confdefs.h"
21187 #include <sys/types.h>
21188 #if STDC_HEADERS
21189 #include <stdlib.h>
21190 #include <stddef.h>
21191 #endif
21192
21193 EOF
21194 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21195   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21196   rm -rf conftest*
21197   eval "ac_cv_type_pid_t=yes"
21198 else
21199   rm -rf conftest*
21200   eval "ac_cv_type_pid_t=no"
21201 fi
21202 rm -f conftest*
21203
21204 fi
21205 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21206   echo "$ac_t""yes" 1>&6
21207 else
21208   echo "$ac_t""no" 1>&6
21209   cat >> confdefs.h <<EOF
21210 #define pid_t int
21211 EOF
21212
21213 fi
21214
21215 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21216 echo "configure:21217: checking for ptrdiff_t" >&5
21217 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21218   echo $ac_n "(cached) $ac_c" 1>&6
21219 else
21220   cat > conftest.$ac_ext <<EOF
21221 #line 21222 "configure"
21222 #include "confdefs.h"
21223 #include <stddef.h>
21224 int main() {
21225 ptrdiff_t p
21226 ; return 0; }
21227 EOF
21228 if { (eval echo configure:21229: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21229   rm -rf conftest*
21230   am_cv_type_ptrdiff_t=yes
21231 else
21232   echo "configure: failed program was:" >&5
21233   cat conftest.$ac_ext >&5
21234   rm -rf conftest*
21235   am_cv_type_ptrdiff_t=no
21236 fi
21237 rm -f conftest*
21238 fi
21239
21240 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21241    if test $am_cv_type_ptrdiff_t = yes; then
21242      cat >> confdefs.h <<\EOF
21243 #define HAVE_PTRDIFF_T 1
21244 EOF
21245
21246    fi
21247
21248 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21249 echo "configure:21250: checking return type of signal handlers" >&5
21250 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21251   echo $ac_n "(cached) $ac_c" 1>&6
21252 else
21253   cat > conftest.$ac_ext <<EOF
21254 #line 21255 "configure"
21255 #include "confdefs.h"
21256 #include <sys/types.h>
21257 #include <signal.h>
21258 #ifdef signal
21259 #undef signal
21260 #endif
21261 #ifdef __cplusplus
21262 extern "C" void (*signal (int, void (*)(int)))(int);
21263 #else
21264 void (*signal ()) ();
21265 #endif
21266
21267 int main() {
21268 int i;
21269 ; return 0; }
21270 EOF
21271 if { (eval echo configure:21272: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21272   rm -rf conftest*
21273   ac_cv_type_signal=void
21274 else
21275   echo "configure: failed program was:" >&5
21276   cat conftest.$ac_ext >&5
21277   rm -rf conftest*
21278   ac_cv_type_signal=int
21279 fi
21280 rm -f conftest*
21281 fi
21282
21283 echo "$ac_t""$ac_cv_type_signal" 1>&6
21284 cat >> confdefs.h <<EOF
21285 #define RETSIGTYPE $ac_cv_type_signal
21286 EOF
21287
21288
21289 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21290 echo "configure:21291: checking for size_t" >&5
21291 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21292   echo $ac_n "(cached) $ac_c" 1>&6
21293 else
21294   cat > conftest.$ac_ext <<EOF
21295 #line 21296 "configure"
21296 #include "confdefs.h"
21297 #include <sys/types.h>
21298 #if STDC_HEADERS
21299 #include <stdlib.h>
21300 #include <stddef.h>
21301 #endif
21302
21303 EOF
21304 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21305   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21306   rm -rf conftest*
21307   eval "ac_cv_type_size_t=yes"
21308 else
21309   rm -rf conftest*
21310   eval "ac_cv_type_size_t=no"
21311 fi
21312 rm -f conftest*
21313
21314 fi
21315 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21316   echo "$ac_t""yes" 1>&6
21317 else
21318   echo "$ac_t""no" 1>&6
21319   cat >> confdefs.h <<EOF
21320 #define size_t unsigned
21321 EOF
21322
21323 fi
21324
21325
21326 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21327 echo "configure:21328: checking for ssize_t" >&5
21328 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21329   echo $ac_n "(cached) $ac_c" 1>&6
21330 else
21331   cat > conftest.$ac_ext <<EOF
21332 #line 21333 "configure"
21333 #include "confdefs.h"
21334 #include <sys/types.h>
21335 #if STDC_HEADERS
21336 #include <stdlib.h>
21337 #include <stddef.h>
21338 #endif
21339
21340 EOF
21341 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21342   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21343   rm -rf conftest*
21344   eval "ac_cv_type_ssize_t=yes"
21345 else
21346   rm -rf conftest*
21347   eval "ac_cv_type_ssize_t=no"
21348 fi
21349 rm -f conftest*
21350
21351 fi
21352 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21353   echo "$ac_t""yes" 1>&6
21354 else
21355   echo "$ac_t""no" 1>&6
21356   cat >> confdefs.h <<EOF
21357 #define ssize_t signed int
21358 EOF
21359
21360 fi
21361
21362 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21363 echo "configure:21364: checking for caddr_t" >&5
21364 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21365   echo $ac_n "(cached) $ac_c" 1>&6
21366 else
21367   cat > conftest.$ac_ext <<EOF
21368 #line 21369 "configure"
21369 #include "confdefs.h"
21370 #include <sys/types.h>
21371 #if STDC_HEADERS
21372 #include <stdlib.h>
21373 #include <stddef.h>
21374 #endif
21375
21376 EOF
21377 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21378   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21379   rm -rf conftest*
21380   eval "ac_cv_type_caddr_t=yes"
21381 else
21382   rm -rf conftest*
21383   eval "ac_cv_type_caddr_t=no"
21384 fi
21385 rm -f conftest*
21386
21387 fi
21388 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21389   echo "$ac_t""yes" 1>&6
21390 else
21391   echo "$ac_t""no" 1>&6
21392   cat >> confdefs.h <<EOF
21393 #define caddr_t char *
21394 EOF
21395
21396 fi
21397
21398
21399 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21400 echo "configure:21401: checking for socklen_t" >&5
21401 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21402   echo $ac_n "(cached) $ac_c" 1>&6
21403 else
21404   cat > conftest.$ac_ext <<EOF
21405 #line 21406 "configure"
21406 #include "confdefs.h"
21407
21408 #ifdef HAVE_SYS_TYPES_H
21409 #include <sys/types.h>
21410 #endif
21411 #ifdef HAVE_SYS_SOCKET_H
21412 #include <sys/socket.h>
21413 #endif
21414
21415 int main() {
21416 socklen_t len;
21417 ; return 0; }
21418 EOF
21419 if { (eval echo configure:21420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21420   rm -rf conftest*
21421   ol_cv_type_socklen_t=yes
21422 else
21423   echo "configure: failed program was:" >&5
21424   cat conftest.$ac_ext >&5
21425   rm -rf conftest*
21426   ol_cv_type_socklen_t=no
21427 fi
21428 rm -f conftest*
21429 fi
21430
21431 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21432   if test $ol_cv_type_socklen_t = no; then
21433     cat >> confdefs.h <<\EOF
21434 #define socklen_t int
21435 EOF
21436
21437   fi
21438  
21439 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21440 echo "configure:21441: checking for member st_blksize in aggregate type struct stat" >&5
21441 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21442   echo $ac_n "(cached) $ac_c" 1>&6
21443 else
21444   cat > conftest.$ac_ext <<EOF
21445 #line 21446 "configure"
21446 #include "confdefs.h"
21447 #include <sys/types.h>
21448 #include <sys/stat.h>
21449 int main() {
21450 struct stat foo; foo.st_blksize;
21451 ; return 0; }
21452 EOF
21453 if { (eval echo configure:21454: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21454   rm -rf conftest*
21455   ac_cv_c_struct_member_st_blksize=yes
21456 else
21457   echo "configure: failed program was:" >&5
21458   cat conftest.$ac_ext >&5
21459   rm -rf conftest*
21460   ac_cv_c_struct_member_st_blksize=no
21461 fi
21462 rm -f conftest*
21463 fi
21464
21465 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21466 st_blksize="$ac_cv_c_struct_member_st_blksize"
21467 if test $ac_cv_c_struct_member_st_blksize = yes; then
21468   cat >> confdefs.h <<\EOF
21469 #define HAVE_ST_BLKSIZE 1
21470 EOF
21471
21472 fi
21473
21474 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21475 echo "configure:21476: checking whether time.h and sys/time.h may both be included" >&5
21476 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21477   echo $ac_n "(cached) $ac_c" 1>&6
21478 else
21479   cat > conftest.$ac_ext <<EOF
21480 #line 21481 "configure"
21481 #include "confdefs.h"
21482 #include <sys/types.h>
21483 #include <sys/time.h>
21484 #include <time.h>
21485 int main() {
21486 struct tm *tp;
21487 ; return 0; }
21488 EOF
21489 if { (eval echo configure:21490: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21490   rm -rf conftest*
21491   ac_cv_header_time=yes
21492 else
21493   echo "configure: failed program was:" >&5
21494   cat conftest.$ac_ext >&5
21495   rm -rf conftest*
21496   ac_cv_header_time=no
21497 fi
21498 rm -f conftest*
21499 fi
21500
21501 echo "$ac_t""$ac_cv_header_time" 1>&6
21502 if test $ac_cv_header_time = yes; then
21503   cat >> confdefs.h <<\EOF
21504 #define TIME_WITH_SYS_TIME 1
21505 EOF
21506
21507 fi
21508
21509 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21510 echo "configure:21511: checking whether struct tm is in sys/time.h or time.h" >&5
21511 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21512   echo $ac_n "(cached) $ac_c" 1>&6
21513 else
21514   cat > conftest.$ac_ext <<EOF
21515 #line 21516 "configure"
21516 #include "confdefs.h"
21517 #include <sys/types.h>
21518 #include <time.h>
21519 int main() {
21520 struct tm *tp; tp->tm_sec;
21521 ; return 0; }
21522 EOF
21523 if { (eval echo configure:21524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21524   rm -rf conftest*
21525   ac_cv_struct_tm=time.h
21526 else
21527   echo "configure: failed program was:" >&5
21528   cat conftest.$ac_ext >&5
21529   rm -rf conftest*
21530   ac_cv_struct_tm=sys/time.h
21531 fi
21532 rm -f conftest*
21533 fi
21534
21535 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21536 if test $ac_cv_struct_tm = sys/time.h; then
21537   cat >> confdefs.h <<\EOF
21538 #define TM_IN_SYS_TIME 1
21539 EOF
21540
21541 fi
21542
21543 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21544 echo "configure:21545: checking for uid_t in sys/types.h" >&5
21545 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21546   echo $ac_n "(cached) $ac_c" 1>&6
21547 else
21548   cat > conftest.$ac_ext <<EOF
21549 #line 21550 "configure"
21550 #include "confdefs.h"
21551 #include <sys/types.h>
21552 EOF
21553 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21554   egrep "uid_t" >/dev/null 2>&1; then
21555   rm -rf conftest*
21556   ac_cv_type_uid_t=yes
21557 else
21558   rm -rf conftest*
21559   ac_cv_type_uid_t=no
21560 fi
21561 rm -f conftest*
21562
21563 fi
21564
21565 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21566 if test $ac_cv_type_uid_t = no; then
21567   cat >> confdefs.h <<\EOF
21568 #define uid_t int
21569 EOF
21570
21571   cat >> confdefs.h <<\EOF
21572 #define gid_t int
21573 EOF
21574
21575 fi
21576
21577 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21578 echo "configure:21579: checking for sig_atomic_t" >&5
21579 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21580   echo $ac_n "(cached) $ac_c" 1>&6
21581 else
21582   cat > conftest.$ac_ext <<EOF
21583 #line 21584 "configure"
21584 #include "confdefs.h"
21585 #include <signal.h>
21586 int main() {
21587 sig_atomic_t atomic;
21588 ; return 0; }
21589 EOF
21590 if { (eval echo configure:21591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21591   rm -rf conftest*
21592   ol_cv_type_sig_atomic_t=yes
21593 else
21594   echo "configure: failed program was:" >&5
21595   cat conftest.$ac_ext >&5
21596   rm -rf conftest*
21597   ol_cv_type_sig_atomic_t=no
21598 fi
21599 rm -f conftest*
21600 fi
21601
21602 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21603   if test $ol_cv_type_sig_atomic_t = no; then
21604     cat >> confdefs.h <<\EOF
21605 #define sig_atomic_t int
21606 EOF
21607
21608   fi
21609  
21610
21611
21612 # test for pw_gecos in struct passwd
21613 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21614 echo "configure:21615: checking struct passwd for pw_gecos" >&5
21615 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21616   echo $ac_n "(cached) $ac_c" 1>&6
21617 else
21618   
21619         cat > conftest.$ac_ext <<EOF
21620 #line 21621 "configure"
21621 #include "confdefs.h"
21622 #include <pwd.h>
21623 int main() {
21624
21625         struct passwd pwd;
21626         pwd.pw_gecos = pwd.pw_name;
21627
21628 ; return 0; }
21629 EOF
21630 if { (eval echo configure:21631: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21631   rm -rf conftest*
21632   ol_cv_struct_passwd_pw_gecos=yes
21633 else
21634   echo "configure: failed program was:" >&5
21635   cat conftest.$ac_ext >&5
21636   rm -rf conftest*
21637   ol_cv_struct_passwd_pw_gecos=no
21638 fi
21639 rm -f conftest*
21640 fi
21641
21642 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21643 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21644         cat >> confdefs.h <<\EOF
21645 #define HAVE_PW_GECOS 1
21646 EOF
21647
21648 fi
21649
21650 # test for pw_passwd in struct passwd
21651 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21652 echo "configure:21653: checking struct passwd for pw_passwd" >&5
21653 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21654   echo $ac_n "(cached) $ac_c" 1>&6
21655 else
21656   
21657         cat > conftest.$ac_ext <<EOF
21658 #line 21659 "configure"
21659 #include "confdefs.h"
21660 #include <pwd.h>
21661 int main() {
21662
21663         struct passwd pwd;
21664         pwd.pw_passwd = pwd.pw_name;
21665
21666 ; return 0; }
21667 EOF
21668 if { (eval echo configure:21669: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21669   rm -rf conftest*
21670   ol_cv_struct_passwd_pw_passwd=yes
21671 else
21672   echo "configure: failed program was:" >&5
21673   cat conftest.$ac_ext >&5
21674   rm -rf conftest*
21675   ol_cv_struct_passwd_pw_passwd=no
21676 fi
21677 rm -f conftest*
21678 fi
21679
21680 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21681 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21682         cat >> confdefs.h <<\EOF
21683 #define HAVE_PW_PASSWD 1
21684 EOF
21685
21686 fi
21687
21688
21689 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21690 echo "configure:21691: checking if toupper() requires islower()" >&5
21691 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21692   echo $ac_n "(cached) $ac_c" 1>&6
21693 else
21694   
21695         if test "$cross_compiling" = yes; then
21696   ol_cv_c_upper_lower=safe
21697 else
21698   cat > conftest.$ac_ext <<EOF
21699 #line 21700 "configure"
21700 #include "confdefs.h"
21701
21702 #include <ctype.h>
21703 main()
21704 {
21705         if ('C' == toupper('C'))
21706                 exit(0);
21707         else
21708                 exit(1);
21709 }
21710 EOF
21711 if { (eval echo configure:21712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21712 then
21713   ol_cv_c_upper_lower=no
21714 else
21715   echo "configure: failed program was:" >&5
21716   cat conftest.$ac_ext >&5
21717   rm -fr conftest*
21718   ol_cv_c_upper_lower=yes
21719 fi
21720 rm -fr conftest*
21721 fi
21722
21723 fi
21724
21725 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21726 if test $ol_cv_c_upper_lower != no ; then
21727         cat >> confdefs.h <<\EOF
21728 #define C_UPPER_LOWER 1
21729 EOF
21730
21731 fi
21732
21733 echo $ac_n "checking for working const""... $ac_c" 1>&6
21734 echo "configure:21735: checking for working const" >&5
21735 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21736   echo $ac_n "(cached) $ac_c" 1>&6
21737 else
21738   cat > conftest.$ac_ext <<EOF
21739 #line 21740 "configure"
21740 #include "confdefs.h"
21741
21742 int main() {
21743
21744 /* Ultrix mips cc rejects this.  */
21745 typedef int charset[2]; const charset x;
21746 /* SunOS 4.1.1 cc rejects this.  */
21747 char const *const *ccp;
21748 char **p;
21749 /* NEC SVR4.0.2 mips cc rejects this.  */
21750 struct point {int x, y;};
21751 static struct point const zero = {0,0};
21752 /* AIX XL C 1.02.0.0 rejects this.
21753    It does not let you subtract one const X* pointer from another in an arm
21754    of an if-expression whose if-part is not a constant expression */
21755 const char *g = "string";
21756 ccp = &g + (g ? g-g : 0);
21757 /* HPUX 7.0 cc rejects these. */
21758 ++ccp;
21759 p = (char**) ccp;
21760 ccp = (char const *const *) p;
21761 { /* SCO 3.2v4 cc rejects this.  */
21762   char *t;
21763   char const *s = 0 ? (char *) 0 : (char const *) 0;
21764
21765   *t++ = 0;
21766 }
21767 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21768   int x[] = {25, 17};
21769   const int *foo = &x[0];
21770   ++foo;
21771 }
21772 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21773   typedef const int *iptr;
21774   iptr p = 0;
21775   ++p;
21776 }
21777 { /* AIX XL C 1.02.0.0 rejects this saying
21778      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21779   struct s { int j; const int *ap[3]; };
21780   struct s *b; b->j = 5;
21781 }
21782 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21783   const int foo = 10;
21784 }
21785
21786 ; return 0; }
21787 EOF
21788 if { (eval echo configure:21789: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21789   rm -rf conftest*
21790   ac_cv_c_const=yes
21791 else
21792   echo "configure: failed program was:" >&5
21793   cat conftest.$ac_ext >&5
21794   rm -rf conftest*
21795   ac_cv_c_const=no
21796 fi
21797 rm -f conftest*
21798 fi
21799
21800 echo "$ac_t""$ac_cv_c_const" 1>&6
21801 if test $ac_cv_c_const = no; then
21802   cat >> confdefs.h <<\EOF
21803 #define const 
21804 EOF
21805
21806 fi
21807
21808 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21809 echo "configure:21810: checking if compiler understands volatile" >&5
21810 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21811   echo $ac_n "(cached) $ac_c" 1>&6
21812 else
21813   cat > conftest.$ac_ext <<EOF
21814 #line 21815 "configure"
21815 #include "confdefs.h"
21816 int x, y, z;
21817 int main() {
21818 volatile int a; int * volatile b = x ? &y : &z;
21819       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21820       *b = 0;
21821 ; return 0; }
21822 EOF
21823 if { (eval echo configure:21824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21824   rm -rf conftest*
21825   ol_cv_c_volatile=yes
21826 else
21827   echo "configure: failed program was:" >&5
21828   cat conftest.$ac_ext >&5
21829   rm -rf conftest*
21830   ol_cv_c_volatile=no
21831 fi
21832 rm -f conftest*
21833 fi
21834
21835 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21836   if test $ol_cv_c_volatile = yes; then
21837     : 
21838   else
21839     cat >> confdefs.h <<\EOF
21840 #define volatile 
21841 EOF
21842
21843   fi
21844  
21845
21846 if test $cross_compiling = yes ; then
21847         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
21848         cat >> confdefs.h <<\EOF
21849 #define CROSS_COMPILING 1
21850 EOF
21851
21852 else
21853         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21854 echo "configure:21855: checking whether byte ordering is bigendian" >&5
21855 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21856   echo $ac_n "(cached) $ac_c" 1>&6
21857 else
21858   ac_cv_c_bigendian=unknown
21859 # See if sys/param.h defines the BYTE_ORDER macro.
21860 cat > conftest.$ac_ext <<EOF
21861 #line 21862 "configure"
21862 #include "confdefs.h"
21863 #include <sys/types.h>
21864 #include <sys/param.h>
21865 int main() {
21866
21867 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21868  bogus endian macros
21869 #endif
21870 ; return 0; }
21871 EOF
21872 if { (eval echo configure:21873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21873   rm -rf conftest*
21874   # It does; now see whether it defined to BIG_ENDIAN or not.
21875 cat > conftest.$ac_ext <<EOF
21876 #line 21877 "configure"
21877 #include "confdefs.h"
21878 #include <sys/types.h>
21879 #include <sys/param.h>
21880 int main() {
21881
21882 #if BYTE_ORDER != BIG_ENDIAN
21883  not big endian
21884 #endif
21885 ; return 0; }
21886 EOF
21887 if { (eval echo configure:21888: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21888   rm -rf conftest*
21889   ac_cv_c_bigendian=yes
21890 else
21891   echo "configure: failed program was:" >&5
21892   cat conftest.$ac_ext >&5
21893   rm -rf conftest*
21894   ac_cv_c_bigendian=no
21895 fi
21896 rm -f conftest*
21897 else
21898   echo "configure: failed program was:" >&5
21899   cat conftest.$ac_ext >&5
21900 fi
21901 rm -f conftest*
21902 if test $ac_cv_c_bigendian = unknown; then
21903 if test "$cross_compiling" = yes; then
21904     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21905 else
21906   cat > conftest.$ac_ext <<EOF
21907 #line 21908 "configure"
21908 #include "confdefs.h"
21909 main () {
21910   /* Are we little or big endian?  From Harbison&Steele.  */
21911   union
21912   {
21913     long l;
21914     char c[sizeof (long)];
21915   } u;
21916   u.l = 1;
21917   exit (u.c[sizeof (long) - 1] == 1);
21918 }
21919 EOF
21920 if { (eval echo configure:21921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21921 then
21922   ac_cv_c_bigendian=no
21923 else
21924   echo "configure: failed program was:" >&5
21925   cat conftest.$ac_ext >&5
21926   rm -fr conftest*
21927   ac_cv_c_bigendian=yes
21928 fi
21929 rm -fr conftest*
21930 fi
21931
21932 fi
21933 fi
21934
21935 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21936 if test $ac_cv_c_bigendian = yes; then
21937   cat >> confdefs.h <<\EOF
21938 #define WORDS_BIGENDIAN 1
21939 EOF
21940
21941 fi
21942
21943 fi
21944
21945 echo $ac_n "checking size of short""... $ac_c" 1>&6
21946 echo "configure:21947: checking size of short" >&5 
21947 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21948   echo $ac_n "(cached) $ac_c" 1>&6
21949 else
21950   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21951   cat > conftest.$ac_ext <<EOF
21952 #line 21953 "configure"
21953 #include "confdefs.h"
21954 #include "confdefs.h" 
21955 #include <stdlib.h>
21956 #include <sys/types.h> 
21957  
21958
21959 int main() {
21960 switch (0) case 0: case (sizeof (short) == $ac_size):;
21961 ; return 0; }
21962 EOF
21963 if { (eval echo configure:21964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21964   rm -rf conftest*
21965   ac_cv_sizeof_short=$ac_size
21966 else
21967   echo "configure: failed program was:" >&5
21968   cat conftest.$ac_ext >&5
21969 fi
21970 rm -f conftest* 
21971   if test x$ac_cv_sizeof_short != x ; then break; fi 
21972 done 
21973
21974 fi
21975  
21976 if test x$ac_cv_sizeof_short = x ; then 
21977   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21978 fi 
21979 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21980 cat >> confdefs.h <<EOF
21981 #define SIZEOF_SHORT $ac_cv_sizeof_short
21982 EOF
21983  
21984  
21985 echo $ac_n "checking size of int""... $ac_c" 1>&6
21986 echo "configure:21987: checking size of int" >&5 
21987 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21988   echo $ac_n "(cached) $ac_c" 1>&6
21989 else
21990   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21991   cat > conftest.$ac_ext <<EOF
21992 #line 21993 "configure"
21993 #include "confdefs.h"
21994 #include "confdefs.h" 
21995 #include <stdlib.h>
21996 #include <sys/types.h> 
21997  
21998
21999 int main() {
22000 switch (0) case 0: case (sizeof (int) == $ac_size):;
22001 ; return 0; }
22002 EOF
22003 if { (eval echo configure:22004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22004   rm -rf conftest*
22005   ac_cv_sizeof_int=$ac_size
22006 else
22007   echo "configure: failed program was:" >&5
22008   cat conftest.$ac_ext >&5
22009 fi
22010 rm -f conftest* 
22011   if test x$ac_cv_sizeof_int != x ; then break; fi 
22012 done 
22013
22014 fi
22015  
22016 if test x$ac_cv_sizeof_int = x ; then 
22017   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22018 fi 
22019 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22020 cat >> confdefs.h <<EOF
22021 #define SIZEOF_INT $ac_cv_sizeof_int
22022 EOF
22023  
22024  
22025 echo $ac_n "checking size of long""... $ac_c" 1>&6
22026 echo "configure:22027: checking size of long" >&5 
22027 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22028   echo $ac_n "(cached) $ac_c" 1>&6
22029 else
22030   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22031   cat > conftest.$ac_ext <<EOF
22032 #line 22033 "configure"
22033 #include "confdefs.h"
22034 #include "confdefs.h" 
22035 #include <stdlib.h>
22036 #include <sys/types.h> 
22037  
22038
22039 int main() {
22040 switch (0) case 0: case (sizeof (long) == $ac_size):;
22041 ; return 0; }
22042 EOF
22043 if { (eval echo configure:22044: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22044   rm -rf conftest*
22045   ac_cv_sizeof_long=$ac_size
22046 else
22047   echo "configure: failed program was:" >&5
22048   cat conftest.$ac_ext >&5
22049 fi
22050 rm -f conftest* 
22051   if test x$ac_cv_sizeof_long != x ; then break; fi 
22052 done 
22053
22054 fi
22055  
22056 if test x$ac_cv_sizeof_long = x ; then 
22057   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22058 fi 
22059 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22060 cat >> confdefs.h <<EOF
22061 #define SIZEOF_LONG $ac_cv_sizeof_long
22062 EOF
22063  
22064
22065 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
22066 echo "configure:22067: checking size of wchar_t" >&5 
22067 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
22068   echo $ac_n "(cached) $ac_c" 1>&6
22069 else
22070   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22071   cat > conftest.$ac_ext <<EOF
22072 #line 22073 "configure"
22073 #include "confdefs.h"
22074 #include "confdefs.h" 
22075 #include <stdlib.h>
22076 #include <sys/types.h> 
22077  
22078
22079 int main() {
22080 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
22081 ; return 0; }
22082 EOF
22083 if { (eval echo configure:22084: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22084   rm -rf conftest*
22085   ac_cv_sizeof_wchar_t=$ac_size
22086 else
22087   echo "configure: failed program was:" >&5
22088   cat conftest.$ac_ext >&5
22089 fi
22090 rm -f conftest* 
22091   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
22092 done 
22093
22094 fi
22095  
22096 if test x$ac_cv_sizeof_wchar_t = x ; then 
22097   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
22098 fi 
22099 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
22100 cat >> confdefs.h <<EOF
22101 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22102 EOF
22103  
22104
22105
22106 if test "$ac_cv_sizeof_int" -lt 4 ; then
22107         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22108
22109         cat >> confdefs.h <<\EOF
22110 #define LBER_INT_T long
22111 EOF
22112
22113 else
22114         cat >> confdefs.h <<\EOF
22115 #define LBER_INT_T int
22116 EOF
22117
22118 fi
22119
22120 cat >> confdefs.h <<\EOF
22121 #define LBER_LEN_T long
22122 EOF
22123
22124 cat >> confdefs.h <<\EOF
22125 #define LBER_SOCKET_T int
22126 EOF
22127
22128 cat >> confdefs.h <<\EOF
22129 #define LBER_TAG_T long
22130 EOF
22131
22132
22133 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22134 echo "configure:22135: checking for 8-bit clean memcmp" >&5
22135 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22136   echo $ac_n "(cached) $ac_c" 1>&6
22137 else
22138   if test "$cross_compiling" = yes; then
22139   ac_cv_func_memcmp_clean=no
22140 else
22141   cat > conftest.$ac_ext <<EOF
22142 #line 22143 "configure"
22143 #include "confdefs.h"
22144
22145 main()
22146 {
22147   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22148   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22149 }
22150
22151 EOF
22152 if { (eval echo configure:22153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22153 then
22154   ac_cv_func_memcmp_clean=yes
22155 else
22156   echo "configure: failed program was:" >&5
22157   cat conftest.$ac_ext >&5
22158   rm -fr conftest*
22159   ac_cv_func_memcmp_clean=no
22160 fi
22161 rm -fr conftest*
22162 fi
22163
22164 fi
22165
22166 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22167 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22168
22169 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22170 echo "configure:22171: checking for strftime" >&5
22171 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22172   echo $ac_n "(cached) $ac_c" 1>&6
22173 else
22174   cat > conftest.$ac_ext <<EOF
22175 #line 22176 "configure"
22176 #include "confdefs.h"
22177 /* System header to define __stub macros and hopefully few prototypes,
22178     which can conflict with char strftime(); below.  */
22179 #include <assert.h>
22180 /* Override any gcc2 internal prototype to avoid an error.  */
22181 /* We use char because int might match the return type of a gcc2
22182     builtin and then its argument prototype would still apply.  */
22183 char strftime();
22184 char (*f)();
22185
22186 int main() {
22187
22188 /* The GNU C library defines this for functions which it implements
22189     to always fail with ENOSYS.  Some functions are actually named
22190     something starting with __ and the normal name is an alias.  */
22191 #if defined (__stub_strftime) || defined (__stub___strftime)
22192 choke me
22193 #else
22194 f = strftime;
22195 #endif
22196
22197 ; return 0; }
22198 EOF
22199 if { (eval echo configure:22200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22200   rm -rf conftest*
22201   eval "ac_cv_func_strftime=yes"
22202 else
22203   echo "configure: failed program was:" >&5
22204   cat conftest.$ac_ext >&5
22205   rm -rf conftest*
22206   eval "ac_cv_func_strftime=no"
22207 fi
22208 rm -f conftest*
22209 fi
22210
22211 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22212   echo "$ac_t""yes" 1>&6
22213   cat >> confdefs.h <<\EOF
22214 #define HAVE_STRFTIME 1
22215 EOF
22216
22217 else
22218   echo "$ac_t""no" 1>&6
22219 # strftime is in -lintl on SCO UNIX.
22220 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22221 echo "configure:22222: checking for strftime in -lintl" >&5
22222 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22223 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22224   echo $ac_n "(cached) $ac_c" 1>&6
22225 else
22226   ac_save_LIBS="$LIBS"
22227 LIBS="-lintl  $LIBS"
22228 cat > conftest.$ac_ext <<EOF
22229 #line 22230 "configure"
22230 #include "confdefs.h"
22231 /* Override any gcc2 internal prototype to avoid an error.  */
22232 /* We use char because int might match the return type of a gcc2
22233     builtin and then its argument prototype would still apply.  */
22234 char strftime();
22235
22236 int main() {
22237 strftime()
22238 ; return 0; }
22239 EOF
22240 if { (eval echo configure:22241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22241   rm -rf conftest*
22242   eval "ac_cv_lib_$ac_lib_var=yes"
22243 else
22244   echo "configure: failed program was:" >&5
22245   cat conftest.$ac_ext >&5
22246   rm -rf conftest*
22247   eval "ac_cv_lib_$ac_lib_var=no"
22248 fi
22249 rm -f conftest*
22250 LIBS="$ac_save_LIBS"
22251
22252 fi
22253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22254   echo "$ac_t""yes" 1>&6
22255   cat >> confdefs.h <<\EOF
22256 #define HAVE_STRFTIME 1
22257 EOF
22258
22259 LIBS="-lintl $LIBS"
22260 else
22261   echo "$ac_t""no" 1>&6
22262 fi
22263
22264 fi
22265
22266
22267 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22268 echo "configure:22269: checking for inet_aton()" >&5
22269 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22270   echo $ac_n "(cached) $ac_c" 1>&6
22271 else
22272   cat > conftest.$ac_ext <<EOF
22273 #line 22274 "configure"
22274 #include "confdefs.h"
22275
22276 #ifdef HAVE_SYS_TYPES_H
22277 #       include <sys/types.h>
22278 #endif
22279 #ifdef HAVE_SYS_SOCKET_H
22280 #       include <sys/socket.h>
22281 #       ifdef HAVE_SYS_SELECT_H
22282 #               include <sys/select.h>
22283 #       endif
22284 #       include <netinet/in.h>
22285 #       ifdef HAVE_ARPA_INET_H
22286 #               include <arpa/inet.h>
22287 #       endif
22288 #endif
22289
22290 int main() {
22291 struct in_addr in;
22292 int rc = inet_aton( "255.255.255.255", &in );
22293 ; return 0; }
22294 EOF
22295 if { (eval echo configure:22296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22296   rm -rf conftest*
22297   ol_cv_func_inet_aton=yes
22298 else
22299   echo "configure: failed program was:" >&5
22300   cat conftest.$ac_ext >&5
22301   rm -rf conftest*
22302   ol_cv_func_inet_aton=no
22303 fi
22304 rm -f conftest*
22305 fi
22306
22307 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22308   if test $ol_cv_func_inet_aton != no; then
22309     cat >> confdefs.h <<\EOF
22310 #define HAVE_INET_ATON 1
22311 EOF
22312
22313   fi
22314  
22315
22316 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22317 echo "configure:22318: checking for _spawnlp" >&5
22318 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22319   echo $ac_n "(cached) $ac_c" 1>&6
22320 else
22321   cat > conftest.$ac_ext <<EOF
22322 #line 22323 "configure"
22323 #include "confdefs.h"
22324 /* System header to define __stub macros and hopefully few prototypes,
22325     which can conflict with char _spawnlp(); below.  */
22326 #include <assert.h>
22327 /* Override any gcc2 internal prototype to avoid an error.  */
22328 /* We use char because int might match the return type of a gcc2
22329     builtin and then its argument prototype would still apply.  */
22330 char _spawnlp();
22331 char (*f)();
22332
22333 int main() {
22334
22335 /* The GNU C library defines this for functions which it implements
22336     to always fail with ENOSYS.  Some functions are actually named
22337     something starting with __ and the normal name is an alias.  */
22338 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22339 choke me
22340 #else
22341 f = _spawnlp;
22342 #endif
22343
22344 ; return 0; }
22345 EOF
22346 if { (eval echo configure:22347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22347   rm -rf conftest*
22348   eval "ac_cv_func__spawnlp=yes"
22349 else
22350   echo "configure: failed program was:" >&5
22351   cat conftest.$ac_ext >&5
22352   rm -rf conftest*
22353   eval "ac_cv_func__spawnlp=no"
22354 fi
22355 rm -f conftest*
22356 fi
22357
22358 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22359   echo "$ac_t""yes" 1>&6
22360   cat >> confdefs.h <<\EOF
22361 #define HAVE_SPAWNLP 1
22362 EOF
22363
22364 else
22365   echo "$ac_t""no" 1>&6
22366 fi
22367
22368
22369 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22370 echo "configure:22371: checking for _snprintf" >&5
22371 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22372   echo $ac_n "(cached) $ac_c" 1>&6
22373 else
22374   cat > conftest.$ac_ext <<EOF
22375 #line 22376 "configure"
22376 #include "confdefs.h"
22377 /* System header to define __stub macros and hopefully few prototypes,
22378     which can conflict with char _snprintf(); below.  */
22379 #include <assert.h>
22380 /* Override any gcc2 internal prototype to avoid an error.  */
22381 /* We use char because int might match the return type of a gcc2
22382     builtin and then its argument prototype would still apply.  */
22383 char _snprintf();
22384 char (*f)();
22385
22386 int main() {
22387
22388 /* The GNU C library defines this for functions which it implements
22389     to always fail with ENOSYS.  Some functions are actually named
22390     something starting with __ and the normal name is an alias.  */
22391 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22392 choke me
22393 #else
22394 f = _snprintf;
22395 #endif
22396
22397 ; return 0; }
22398 EOF
22399 if { (eval echo configure:22400: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22400   rm -rf conftest*
22401   eval "ac_cv_func__snprintf=yes"
22402 else
22403   echo "configure: failed program was:" >&5
22404   cat conftest.$ac_ext >&5
22405   rm -rf conftest*
22406   eval "ac_cv_func__snprintf=no"
22407 fi
22408 rm -f conftest*
22409 fi
22410
22411 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22412   echo "$ac_t""yes" 1>&6
22413   ac_cv_func_snprintf=yes
22414         cat >> confdefs.h <<\EOF
22415 #define snprintf _snprintf
22416 EOF
22417
22418
22419 else
22420   echo "$ac_t""no" 1>&6
22421 fi
22422
22423
22424 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22425 echo "configure:22426: checking for _vsnprintf" >&5
22426 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22427   echo $ac_n "(cached) $ac_c" 1>&6
22428 else
22429   cat > conftest.$ac_ext <<EOF
22430 #line 22431 "configure"
22431 #include "confdefs.h"
22432 /* System header to define __stub macros and hopefully few prototypes,
22433     which can conflict with char _vsnprintf(); below.  */
22434 #include <assert.h>
22435 /* Override any gcc2 internal prototype to avoid an error.  */
22436 /* We use char because int might match the return type of a gcc2
22437     builtin and then its argument prototype would still apply.  */
22438 char _vsnprintf();
22439 char (*f)();
22440
22441 int main() {
22442
22443 /* The GNU C library defines this for functions which it implements
22444     to always fail with ENOSYS.  Some functions are actually named
22445     something starting with __ and the normal name is an alias.  */
22446 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22447 choke me
22448 #else
22449 f = _vsnprintf;
22450 #endif
22451
22452 ; return 0; }
22453 EOF
22454 if { (eval echo configure:22455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22455   rm -rf conftest*
22456   eval "ac_cv_func__vsnprintf=yes"
22457 else
22458   echo "configure: failed program was:" >&5
22459   cat conftest.$ac_ext >&5
22460   rm -rf conftest*
22461   eval "ac_cv_func__vsnprintf=no"
22462 fi
22463 rm -f conftest*
22464 fi
22465
22466 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22467   echo "$ac_t""yes" 1>&6
22468   ac_cv_func_vsnprintf=yes
22469         cat >> confdefs.h <<\EOF
22470 #define vsnprintf _vsnprintf
22471 EOF
22472
22473
22474 else
22475   echo "$ac_t""no" 1>&6
22476 fi
22477
22478
22479 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22480 echo "configure:22481: checking for vprintf" >&5
22481 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22482   echo $ac_n "(cached) $ac_c" 1>&6
22483 else
22484   cat > conftest.$ac_ext <<EOF
22485 #line 22486 "configure"
22486 #include "confdefs.h"
22487 /* System header to define __stub macros and hopefully few prototypes,
22488     which can conflict with char vprintf(); below.  */
22489 #include <assert.h>
22490 /* Override any gcc2 internal prototype to avoid an error.  */
22491 /* We use char because int might match the return type of a gcc2
22492     builtin and then its argument prototype would still apply.  */
22493 char vprintf();
22494 char (*f)();
22495
22496 int main() {
22497
22498 /* The GNU C library defines this for functions which it implements
22499     to always fail with ENOSYS.  Some functions are actually named
22500     something starting with __ and the normal name is an alias.  */
22501 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22502 choke me
22503 #else
22504 f = vprintf;
22505 #endif
22506
22507 ; return 0; }
22508 EOF
22509 if { (eval echo configure:22510: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22510   rm -rf conftest*
22511   eval "ac_cv_func_vprintf=yes"
22512 else
22513   echo "configure: failed program was:" >&5
22514   cat conftest.$ac_ext >&5
22515   rm -rf conftest*
22516   eval "ac_cv_func_vprintf=no"
22517 fi
22518 rm -f conftest*
22519 fi
22520
22521 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22522   echo "$ac_t""yes" 1>&6
22523   cat >> confdefs.h <<\EOF
22524 #define HAVE_VPRINTF 1
22525 EOF
22526
22527 else
22528   echo "$ac_t""no" 1>&6
22529 fi
22530
22531 if test "$ac_cv_func_vprintf" != yes; then
22532 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22533 echo "configure:22534: checking for _doprnt" >&5
22534 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22535   echo $ac_n "(cached) $ac_c" 1>&6
22536 else
22537   cat > conftest.$ac_ext <<EOF
22538 #line 22539 "configure"
22539 #include "confdefs.h"
22540 /* System header to define __stub macros and hopefully few prototypes,
22541     which can conflict with char _doprnt(); below.  */
22542 #include <assert.h>
22543 /* Override any gcc2 internal prototype to avoid an error.  */
22544 /* We use char because int might match the return type of a gcc2
22545     builtin and then its argument prototype would still apply.  */
22546 char _doprnt();
22547 char (*f)();
22548
22549 int main() {
22550
22551 /* The GNU C library defines this for functions which it implements
22552     to always fail with ENOSYS.  Some functions are actually named
22553     something starting with __ and the normal name is an alias.  */
22554 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22555 choke me
22556 #else
22557 f = _doprnt;
22558 #endif
22559
22560 ; return 0; }
22561 EOF
22562 if { (eval echo configure:22563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22563   rm -rf conftest*
22564   eval "ac_cv_func__doprnt=yes"
22565 else
22566   echo "configure: failed program was:" >&5
22567   cat conftest.$ac_ext >&5
22568   rm -rf conftest*
22569   eval "ac_cv_func__doprnt=no"
22570 fi
22571 rm -f conftest*
22572 fi
22573
22574 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22575   echo "$ac_t""yes" 1>&6
22576   cat >> confdefs.h <<\EOF
22577 #define HAVE_DOPRNT 1
22578 EOF
22579
22580 else
22581   echo "$ac_t""no" 1>&6
22582 fi
22583
22584 fi
22585
22586
22587 if test $ac_cv_func_vprintf = yes ; then
22588                 for ac_func in snprintf vsnprintf
22589 do
22590 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22591 echo "configure:22592: checking for $ac_func" >&5
22592 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22593   echo $ac_n "(cached) $ac_c" 1>&6
22594 else
22595   cat > conftest.$ac_ext <<EOF
22596 #line 22597 "configure"
22597 #include "confdefs.h"
22598 /* System header to define __stub macros and hopefully few prototypes,
22599     which can conflict with char $ac_func(); below.  */
22600 #include <assert.h>
22601 /* Override any gcc2 internal prototype to avoid an error.  */
22602 /* We use char because int might match the return type of a gcc2
22603     builtin and then its argument prototype would still apply.  */
22604 char $ac_func();
22605 char (*f)();
22606
22607 int main() {
22608
22609 /* The GNU C library defines this for functions which it implements
22610     to always fail with ENOSYS.  Some functions are actually named
22611     something starting with __ and the normal name is an alias.  */
22612 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22613 choke me
22614 #else
22615 f = $ac_func;
22616 #endif
22617
22618 ; return 0; }
22619 EOF
22620 if { (eval echo configure:22621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22621   rm -rf conftest*
22622   eval "ac_cv_func_$ac_func=yes"
22623 else
22624   echo "configure: failed program was:" >&5
22625   cat conftest.$ac_ext >&5
22626   rm -rf conftest*
22627   eval "ac_cv_func_$ac_func=no"
22628 fi
22629 rm -f conftest*
22630 fi
22631
22632 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22633   echo "$ac_t""yes" 1>&6
22634     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22635   cat >> confdefs.h <<EOF
22636 #define $ac_tr_func 1
22637 EOF
22638  
22639 else
22640   echo "$ac_t""no" 1>&6
22641 fi
22642 done
22643
22644 fi
22645
22646 for ac_func in \
22647         bcopy                   \
22648         closesocket             \
22649         chroot                  \
22650         endgrent                \
22651         endpwent                \
22652         fcntl                   \
22653         flock                   \
22654         fstat                   \
22655         getdtablesize   \
22656         getgrgid                \
22657         gethostname             \
22658         getpass                 \
22659         getpassphrase   \
22660         getpwuid                \
22661         getpwnam                \
22662         getspnam                \
22663         gettimeofday    \
22664         initgroups              \
22665         lockf                   \
22666         memcpy                  \
22667         memmove                 \
22668         mkstemp                 \
22669         mktemp                  \
22670         pipe                    \
22671         read                    \
22672         recv                    \
22673         recvfrom                \
22674         setpwfile               \
22675         setgid                  \
22676         setegid                 \
22677         setsid                  \
22678         setuid                  \
22679         seteuid                 \
22680         sigaction               \
22681         signal                  \
22682         sigset                  \
22683         strdup                  \
22684         strerror                \
22685         strpbrk                 \
22686         strrchr                 \
22687         strsep                  \
22688         strstr                  \
22689         strtol                  \
22690         strtoul                 \
22691         strtoq                  \
22692         strtouq                 \
22693         strtoll                 \
22694         strspn                  \
22695         sysconf                 \
22696         usleep                  \
22697         waitpid                 \
22698         wait4                   \
22699         write                   \
22700         send                    \
22701         sendmsg                 \
22702         sendto                  \
22703
22704 do
22705 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22706 echo "configure:22707: checking for $ac_func" >&5
22707 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22708   echo $ac_n "(cached) $ac_c" 1>&6
22709 else
22710   cat > conftest.$ac_ext <<EOF
22711 #line 22712 "configure"
22712 #include "confdefs.h"
22713 /* System header to define __stub macros and hopefully few prototypes,
22714     which can conflict with char $ac_func(); below.  */
22715 #include <assert.h>
22716 /* Override any gcc2 internal prototype to avoid an error.  */
22717 /* We use char because int might match the return type of a gcc2
22718     builtin and then its argument prototype would still apply.  */
22719 char $ac_func();
22720 char (*f)();
22721
22722 int main() {
22723
22724 /* The GNU C library defines this for functions which it implements
22725     to always fail with ENOSYS.  Some functions are actually named
22726     something starting with __ and the normal name is an alias.  */
22727 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22728 choke me
22729 #else
22730 f = $ac_func;
22731 #endif
22732
22733 ; return 0; }
22734 EOF
22735 if { (eval echo configure:22736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22736   rm -rf conftest*
22737   eval "ac_cv_func_$ac_func=yes"
22738 else
22739   echo "configure: failed program was:" >&5
22740   cat conftest.$ac_ext >&5
22741   rm -rf conftest*
22742   eval "ac_cv_func_$ac_func=no"
22743 fi
22744 rm -f conftest*
22745 fi
22746
22747 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22748   echo "$ac_t""yes" 1>&6
22749     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22750   cat >> confdefs.h <<EOF
22751 #define $ac_tr_func 1
22752 EOF
22753  
22754 else
22755   echo "$ac_t""no" 1>&6
22756 fi
22757 done
22758
22759
22760 for ac_func in getopt getpeereid
22761 do
22762 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22763 echo "configure:22764: checking for $ac_func" >&5
22764 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22765   echo $ac_n "(cached) $ac_c" 1>&6
22766 else
22767   cat > conftest.$ac_ext <<EOF
22768 #line 22769 "configure"
22769 #include "confdefs.h"
22770 /* System header to define __stub macros and hopefully few prototypes,
22771     which can conflict with char $ac_func(); below.  */
22772 #include <assert.h>
22773 /* Override any gcc2 internal prototype to avoid an error.  */
22774 /* We use char because int might match the return type of a gcc2
22775     builtin and then its argument prototype would still apply.  */
22776 char $ac_func();
22777 char (*f)();
22778
22779 int main() {
22780
22781 /* The GNU C library defines this for functions which it implements
22782     to always fail with ENOSYS.  Some functions are actually named
22783     something starting with __ and the normal name is an alias.  */
22784 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22785 choke me
22786 #else
22787 f = $ac_func;
22788 #endif
22789
22790 ; return 0; }
22791 EOF
22792 if { (eval echo configure:22793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22793   rm -rf conftest*
22794   eval "ac_cv_func_$ac_func=yes"
22795 else
22796   echo "configure: failed program was:" >&5
22797   cat conftest.$ac_ext >&5
22798   rm -rf conftest*
22799   eval "ac_cv_func_$ac_func=no"
22800 fi
22801 rm -f conftest*
22802 fi
22803
22804 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22805   echo "$ac_t""yes" 1>&6
22806     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22807   cat >> confdefs.h <<EOF
22808 #define $ac_tr_func 1
22809 EOF
22810  
22811 else
22812   echo "$ac_t""no" 1>&6
22813 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22814 fi
22815 done
22816
22817
22818
22819 if test "$ac_cv_func_getopt" != yes; then
22820         LIBSRCS="$LIBSRCS getopt.c"
22821 fi
22822 if test "$ac_cv_func_getpeereid" != yes; then
22823         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
22824 echo "configure:22825: checking for msg_accrights in msghdr" >&5
22825 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
22826   echo $ac_n "(cached) $ac_c" 1>&6
22827 else
22828   cat > conftest.$ac_ext <<EOF
22829 #line 22830 "configure"
22830 #include "confdefs.h"
22831 #include <sys/socket.h>
22832 int main() {
22833 struct msghdr m; m.msg_accrightslen=0
22834 ; return 0; }
22835 EOF
22836 if { (eval echo configure:22837: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22837   rm -rf conftest*
22838   ol_cv_msghdr_msg_accrights=yes
22839 else
22840   echo "configure: failed program was:" >&5
22841   cat conftest.$ac_ext >&5
22842   rm -rf conftest*
22843   ol_cv_msghdr_msg_accrights=no
22844 fi
22845 rm -f conftest*
22846         
22847 fi
22848
22849 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
22850   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
22851         cat >> confdefs.h <<\EOF
22852 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
22853 EOF
22854
22855   fi
22856
22857         LIBSRCS="$LIBSRCS getpeereid.c"
22858 fi
22859 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22860         if test "$ac_cv_func_snprintf" != yes; then
22861                 cat >> confdefs.h <<\EOF
22862 #define snprintf ber_pvt_snprintf
22863 EOF
22864
22865         fi
22866         if test "$ac_cv_func_vsnprintf" != yes; then
22867                 cat >> confdefs.h <<\EOF
22868 #define vsnprintf ber_pvt_vsnprintf
22869 EOF
22870
22871         fi
22872 fi
22873
22874 # Check Configuration
22875 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22876 echo "configure:22877: checking declaration of sys_errlist" >&5
22877 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22878   echo $ac_n "(cached) $ac_c" 1>&6
22879 else
22880   
22881         cat > conftest.$ac_ext <<EOF
22882 #line 22883 "configure"
22883 #include "confdefs.h"
22884
22885 #include <stdio.h>
22886 #include <sys/types.h>
22887 #include <errno.h>
22888 #ifdef WINNT
22889 #include <stdlib.h>
22890 #endif 
22891 int main() {
22892 char *c = (char *) *sys_errlist
22893 ; return 0; }
22894 EOF
22895 if { (eval echo configure:22896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22896   rm -rf conftest*
22897   ol_cv_dcl_sys_errlist=yes
22898         ol_cv_have_sys_errlist=yes
22899 else
22900   echo "configure: failed program was:" >&5
22901   cat conftest.$ac_ext >&5
22902   rm -rf conftest*
22903   ol_cv_dcl_sys_errlist=no
22904 fi
22905 rm -f conftest*
22906 fi
22907
22908 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22909 #
22910 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22911 if test $ol_cv_dcl_sys_errlist = no ; then
22912         cat >> confdefs.h <<\EOF
22913 #define DECL_SYS_ERRLIST 1
22914 EOF
22915
22916
22917         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22918 echo "configure:22919: checking existence of sys_errlist" >&5
22919 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22920   echo $ac_n "(cached) $ac_c" 1>&6
22921 else
22922   
22923                 cat > conftest.$ac_ext <<EOF
22924 #line 22925 "configure"
22925 #include "confdefs.h"
22926 #include <errno.h>
22927 int main() {
22928 char *c = (char *) *sys_errlist
22929 ; return 0; }
22930 EOF
22931 if { (eval echo configure:22932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22932   rm -rf conftest*
22933   ol_cv_have_sys_errlist=yes
22934 else
22935   echo "configure: failed program was:" >&5
22936   cat conftest.$ac_ext >&5
22937   rm -rf conftest*
22938   ol_cv_have_sys_errlist=no
22939 fi
22940 rm -f conftest*
22941 fi
22942
22943 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22944 fi
22945 if test $ol_cv_have_sys_errlist = yes ; then
22946         cat >> confdefs.h <<\EOF
22947 #define HAVE_SYS_ERRLIST 1
22948 EOF
22949
22950 fi
22951
22952
22953
22954 if test "$ol_enable_slapi" != no ; then
22955                         for ac_hdr in ltdl.h
22956 do
22957 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
22958 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
22959 echo "configure:22960: checking for $ac_hdr" >&5
22960 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
22961   echo $ac_n "(cached) $ac_c" 1>&6
22962 else
22963   cat > conftest.$ac_ext <<EOF
22964 #line 22965 "configure"
22965 #include "confdefs.h"
22966 #include <$ac_hdr>
22967 EOF
22968 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
22969 { (eval echo configure:22970: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
22970 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
22971 if test -z "$ac_err"; then
22972   rm -rf conftest*
22973   eval "ac_cv_header_$ac_safe=yes"
22974 else
22975   echo "$ac_err" >&5
22976   echo "configure: failed program was:" >&5
22977   cat conftest.$ac_ext >&5
22978   rm -rf conftest*
22979   eval "ac_cv_header_$ac_safe=no"
22980 fi
22981 rm -f conftest*
22982 fi
22983 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
22984   echo "$ac_t""yes" 1>&6
22985     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
22986   cat >> confdefs.h <<EOF
22987 #define $ac_tr_hdr 1
22988 EOF
22989  
22990 else
22991   echo "$ac_t""no" 1>&6
22992 fi
22993 done
22994
22995
22996         if test $ac_cv_header_ltdl_h != yes ; then
22997                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
22998         fi
22999         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23000 echo "configure:23001: checking for lt_dlinit in -lltdl" >&5
23001 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23002 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23003   echo $ac_n "(cached) $ac_c" 1>&6
23004 else
23005   ac_save_LIBS="$LIBS"
23006 LIBS="-lltdl  $LIBS"
23007 cat > conftest.$ac_ext <<EOF
23008 #line 23009 "configure"
23009 #include "confdefs.h"
23010 /* Override any gcc2 internal prototype to avoid an error.  */
23011 /* We use char because int might match the return type of a gcc2
23012     builtin and then its argument prototype would still apply.  */
23013 char lt_dlinit();
23014
23015 int main() {
23016 lt_dlinit()
23017 ; return 0; }
23018 EOF
23019 if { (eval echo configure:23020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23020   rm -rf conftest*
23021   eval "ac_cv_lib_$ac_lib_var=yes"
23022 else
23023   echo "configure: failed program was:" >&5
23024   cat conftest.$ac_ext >&5
23025   rm -rf conftest*
23026   eval "ac_cv_lib_$ac_lib_var=no"
23027 fi
23028 rm -f conftest*
23029 LIBS="$ac_save_LIBS"
23030
23031 fi
23032 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23033   echo "$ac_t""yes" 1>&6
23034   
23035                 SLAPI_LIBS=-lltdl
23036                 LIBSLAPI=libslapi.a
23037                 LIBSLAPITOOLS=../libslapi.a
23038                 cat >> confdefs.h <<\EOF
23039 #define HAVE_LIBLTDL 1
23040 EOF
23041
23042         
23043 else
23044   echo "$ac_t""no" 1>&6
23045 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23046 fi
23047
23048
23049         cat >> confdefs.h <<\EOF
23050 #define LDAP_SLAPI 1
23051 EOF
23052
23053 fi
23054
23055 if test "$ol_enable_debug" != no ; then
23056         cat >> confdefs.h <<\EOF
23057 #define LDAP_DEBUG 1
23058 EOF
23059
23060 fi
23061 if test "$ol_enable_syslog" = yes ; then
23062         cat >> confdefs.h <<\EOF
23063 #define LDAP_SYSLOG 1
23064 EOF
23065
23066 fi
23067 if test "$ol_link_kbind" != no ; then
23068         cat >> confdefs.h <<\EOF
23069 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23070 EOF
23071
23072 fi
23073 if test "$ol_enable_proctitle" != no ; then
23074         cat >> confdefs.h <<\EOF
23075 #define LDAP_PROCTITLE 1
23076 EOF
23077
23078 fi
23079 if test "$ol_enable_referrals" != no ; then
23080         cat >> confdefs.h <<\EOF
23081 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23082 EOF
23083
23084 fi
23085 if test "$ol_enable_local" != no; then
23086         cat >> confdefs.h <<\EOF
23087 #define LDAP_PF_LOCAL 1
23088 EOF
23089
23090 fi
23091 if test "$ol_link_ipv6" != no; then
23092         cat >> confdefs.h <<\EOF
23093 #define LDAP_PF_INET6 1
23094 EOF
23095
23096 fi
23097 if test "$ol_enable_cleartext" != no ; then
23098         cat >> confdefs.h <<\EOF
23099 #define SLAPD_CLEARTEXT 1
23100 EOF
23101
23102 fi
23103 if test "$ol_enable_crypt" != no ; then
23104         cat >> confdefs.h <<\EOF
23105 #define SLAPD_CRYPT 1
23106 EOF
23107
23108 fi
23109 if test "$ol_link_spasswd" != no ; then
23110         cat >> confdefs.h <<\EOF
23111 #define SLAPD_SPASSWD 1
23112 EOF
23113
23114 fi
23115 if test "$ol_enable_multimaster" != no ; then
23116         cat >> confdefs.h <<\EOF
23117 #define SLAPD_MULTIMASTER 1
23118 EOF
23119
23120 fi
23121 if test "$ol_enable_rlookups" != no ; then
23122         cat >> confdefs.h <<\EOF
23123 #define SLAPD_RLOOKUPS 1
23124 EOF
23125
23126 fi
23127 if test "$ol_enable_aci" != no ; then
23128         cat >> confdefs.h <<\EOF
23129 #define SLAPD_ACI_ENABLED 1
23130 EOF
23131
23132 fi
23133
23134 if test "$ol_link_modules" != no ; then
23135         cat >> confdefs.h <<\EOF
23136 #define SLAPD_MODULES 1
23137 EOF
23138
23139         BUILD_SLAPD=yes
23140         SLAPD_MODULES_LDFLAGS="-dlopen self"
23141 fi
23142
23143 cat >> confdefs.h <<\EOF
23144 #define SLAPD_MOD_STATIC 1
23145 EOF
23146
23147 cat >> confdefs.h <<\EOF
23148 #define SLAPD_MOD_DYNAMIC 2
23149 EOF
23150
23151
23152 if test "$ol_enable_bdb" != no ; then
23153         BUILD_SLAPD=yes
23154         BUILD_BDB=$ol_enable_bdb
23155         if test "$ol_enable_bdb" = mod ; then
23156                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23157                 MFLAG=SLAPD_MOD_DYNAMIC
23158         else
23159                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23160                 MFLAG=SLAPD_MOD_STATIC
23161         fi
23162         cat >> confdefs.h <<EOF
23163 #define SLAPD_BDB $MFLAG
23164 EOF
23165
23166 fi
23167
23168 if test "$ol_enable_dnssrv" != no ; then
23169         BUILD_SLAPD=yes
23170         BUILD_DNSSRV=$ol_enable_dnssrv
23171         if test "$ol_enable_dnssrv" = mod ; then
23172                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23173                 MFLAG=SLAPD_MOD_DYNAMIC
23174         else
23175                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23176                 MFLAG=SLAPD_MOD_STATIC
23177         fi
23178         cat >> confdefs.h <<EOF
23179 #define SLAPD_DNSSRV $MFLAG
23180 EOF
23181
23182 fi
23183
23184 if test "$ol_enable_hdb" != no ; then
23185         BUILD_SLAPD=yes
23186         BUILD_HDB=$ol_enable_hdb
23187         if test "$ol_enable_hdb" = mod ; then
23188                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23189                 MFLAG=SLAPD_MOD_DYNAMIC
23190         else
23191                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23192                 MFLAG=SLAPD_MOD_STATIC
23193         fi
23194         cat >> confdefs.h <<EOF
23195 #define SLAPD_HDB $MFLAG
23196 EOF
23197
23198 fi
23199
23200 if test "$ol_enable_ldap" != no ; then
23201         BUILD_SLAPD=yes
23202         BUILD_LDAP=$ol_enable_ldap
23203         if test "$ol_enable_ldap" = mod ; then
23204                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23205                 MFLAG=SLAPD_MOD_DYNAMIC
23206         else
23207                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23208                 MFLAG=SLAPD_MOD_STATIC
23209         fi
23210         cat >> confdefs.h <<EOF
23211 #define SLAPD_LDAP $MFLAG
23212 EOF
23213
23214 fi
23215
23216 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23217         BUILD_SLAPD=yes
23218         BUILD_LDBM=$ol_enable_ldbm
23219         if test "$ol_enable_ldbm" = mod ; then
23220                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23221                 MFLAG=SLAPD_MOD_DYNAMIC
23222         else
23223                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23224                 MFLAG=SLAPD_MOD_STATIC
23225         fi
23226         cat >> confdefs.h <<EOF
23227 #define SLAPD_LDBM $MFLAG
23228 EOF
23229
23230 fi
23231
23232 if test "$ol_enable_meta" != no ; then
23233         BUILD_SLAPD=yes
23234         BUILD_META=$ol_enable_meta
23235         BUILD_REWRITE=yes
23236         if test "$ol_enable_meta" = mod ; then
23237                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23238                 MFLAG=SLAPD_MOD_DYNAMIC
23239         else
23240                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23241                 MFLAG=SLAPD_MOD_STATIC
23242         fi
23243         cat >> confdefs.h <<EOF
23244 #define SLAPD_META $MFLAG
23245 EOF
23246
23247 fi
23248
23249 if test "$ol_enable_monitor" != no ; then
23250         BUILD_SLAPD=yes
23251         BUILD_MONITOR=$ol_enable_monitor
23252         if test "$ol_enable_monitor" = mod ; then
23253                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23254                 MFLAG=SLAPD_MOD_DYNAMIC
23255         else
23256                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23257                 MFLAG=SLAPD_MOD_STATIC
23258         fi
23259         cat >> confdefs.h <<EOF
23260 #define SLAPD_MONITOR $MFLAG
23261 EOF
23262
23263 fi
23264
23265 if test "$ol_enable_null" != no ; then
23266         BUILD_SLAPD=yes
23267         BUILD_NULL=$ol_enable_null
23268         if test "$ol_enable_null" = mod ; then
23269                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23270                 MFLAG=SLAPD_MOD_DYNAMIC
23271         else
23272                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23273                 MFLAG=SLAPD_MOD_STATIC
23274         fi
23275         cat >> confdefs.h <<EOF
23276 #define SLAPD_NULL $MFLAG
23277 EOF
23278
23279 fi
23280
23281 if test "$ol_enable_passwd" != no ; then
23282         BUILD_SLAPD=yes
23283         BUILD_PASSWD=$ol_enable_passwd
23284         if test "$ol_enable_passwd" = mod ; then
23285                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23286                 MFLAG=SLAPD_MOD_DYNAMIC
23287         else
23288                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23289                 MFLAG=SLAPD_MOD_STATIC
23290         fi
23291         cat >> confdefs.h <<EOF
23292 #define SLAPD_PASSWD $MFLAG
23293 EOF
23294
23295 fi
23296
23297 if test "$ol_link_perl" != no ; then
23298         BUILD_SLAPD=yes
23299         BUILD_PERL=$ol_enable_perl
23300         if test "$ol_enable_perl" = mod ; then
23301                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23302                 MFLAG=SLAPD_MOD_DYNAMIC
23303         else
23304                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23305                 MFLAG=SLAPD_MOD_STATIC
23306         fi
23307         cat >> confdefs.h <<EOF
23308 #define SLAPD_PERL $MFLAG
23309 EOF
23310
23311 fi
23312
23313 if test "$ol_enable_shell" != no ; then
23314         if test "$ol_link_thread" != no ; then
23315                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23316         fi
23317         BUILD_SLAPD=yes
23318         BUILD_SHELL=$ol_enable_shell
23319         if test "$ol_enable_shell" = mod ; then
23320                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23321                 MFLAG=SLAPD_MOD_DYNAMIC
23322         else
23323                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23324                 MFLAG=SLAPD_MOD_STATIC
23325         fi
23326         cat >> confdefs.h <<EOF
23327 #define SLAPD_SHELL $MFLAG
23328 EOF
23329
23330 fi
23331
23332 if test "$ol_link_sql" != no ; then
23333         BUILD_SLAPD=yes
23334         BUILD_SQL=$ol_enable_sql
23335         if test "$ol_enable_sql" = mod; then
23336                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23337                 MFLAG=SLAPD_MOD_DYNAMIC
23338         else
23339                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23340                 MFLAG=SLAPD_MOD_STATIC
23341         fi
23342         cat >> confdefs.h <<EOF
23343 #define SLAPD_SQL $MFLAG
23344 EOF
23345
23346 fi
23347
23348 if test "$ol_enable_dyngroup" != no ; then
23349         BUILD_DYNGROUP=$ol_enable_dyngroup
23350         if test "$ol_enable_dyngroup" = mod ; then
23351                 MFLAG=SLAPD_MOD_DYNAMIC
23352                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23353         else
23354                 MFLAG=SLAPD_MOD_STATIC
23355         fi
23356         cat >> confdefs.h <<EOF
23357 #define SLAPD_OVER_DYNGROUP $MFLAG
23358 EOF
23359
23360 fi
23361
23362 if test "$ol_enable_proxycache" != no ; then
23363         BUILD_PROXYCACHE=$ol_enable_proxycache
23364         if test "$ol_enable_proxycache" = mod ; then
23365                 MFLAG=SLAPD_MOD_DYNAMIC
23366                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23367         else
23368                 MFLAG=SLAPD_MOD_STATIC
23369         fi
23370         cat >> confdefs.h <<EOF
23371 #define SLAPD_OVER_PROXYCACHE $MFLAG
23372 EOF
23373
23374 fi
23375
23376 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23377         $BUILD_SLAPD = yes ; then
23378         BUILD_SLURPD=yes
23379 fi
23380
23381 if test "$ol_enable_rewrite" != no ; then
23382         cat >> confdefs.h <<\EOF
23383 #define ENABLE_REWRITE 1
23384 EOF
23385
23386         BUILD_REWRITE=yes
23387 fi
23388
23389 if test "$ol_enable_slapi" != no ; then
23390         cat >> confdefs.h <<\EOF
23391 #define ENABLE_SLAPI 1
23392 EOF
23393
23394         BUILD_SLAPI=yes
23395         SLAPD_SLAPI_DEPEND=libslapi.a
23396 fi
23397
23398
23399
23400 if test "$ac_cv_mingw32" = yes ; then
23401         PLAT=NT
23402         SLAPD_MODULES_LDFLAGS=
23403 else
23404         PLAT=UNIX
23405 fi
23406
23407 if test -z "$SLAPD_STATIC_BACKENDS"; then
23408         SLAPD_NO_STATIC='#'
23409 else
23410         SLAPD_NO_STATIC=
23411 fi
23412
23413
23414
23415
23416
23417
23418
23419   
23420   
23421   
23422   
23423   
23424   
23425   
23426   
23427   
23428   
23429   
23430   
23431   
23432   
23433   
23434   
23435
23436
23437
23438
23439
23440
23441
23442
23443
23444
23445
23446
23447
23448
23449
23450
23451
23452
23453
23454
23455
23456
23457
23458
23459
23460
23461
23462
23463
23464
23465
23466
23467
23468
23469
23470
23471
23472
23473 # Check whether --with-xxinstall or --without-xxinstall was given.
23474 if test "${with_xxinstall+set}" = set; then
23475   withval="$with_xxinstall"
23476   :
23477 fi
23478
23479
23480
23481 trap '' 1 2 15
23482
23483 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23484
23485 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23486 # Let make expand exec_prefix.
23487 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23488
23489 # Any assignment to VPATH causes Sun make to only execute
23490 # the first set of double-colon rules, so remove it if not needed.
23491 # If there is a colon in the path, we need to keep it.
23492 if test "x$srcdir" = x.; then
23493   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23494 fi
23495
23496 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23497
23498 DEFS=-DHAVE_CONFIG_H
23499
23500 # Without the "./", some shells look in PATH for config.status.
23501 : ${CONFIG_STATUS=./config.status}
23502
23503 echo creating $CONFIG_STATUS
23504 rm -f $CONFIG_STATUS
23505 cat > $CONFIG_STATUS <<EOF
23506 #! /bin/sh
23507 # Generated automatically by configure.
23508 # Run this file to recreate the current configuration.
23509 # This directory was configured as follows,
23510 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23511 #
23512 # $0 $ac_configure_args
23513 #
23514 # Compiler output produced by configure, useful for debugging
23515 # configure, is in ./config.log if it exists.
23516
23517 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23518 for ac_option
23519 do
23520   case "\$ac_option" in
23521   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23522     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23523     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23524   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23525     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23526     exit 0 ;;
23527   -help | --help | --hel | --he | --h)
23528     echo "\$ac_cs_usage"; exit 0 ;;
23529   *) echo "\$ac_cs_usage"; exit 1 ;;
23530   esac
23531 done
23532
23533 ac_given_srcdir=$srcdir
23534 ac_given_INSTALL="$INSTALL"
23535
23536 trap 'rm -fr `echo "\
23537 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23538 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23539 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23540 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23541 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23542 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23543 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23544 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23545 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23546 include/Makefile:build/top.mk:include/Makefile.in \
23547 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23548 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23549 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23550 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23551 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23552 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23553 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23554 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23555 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23556 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23557 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23558 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23559 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23560 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23561 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23562 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23563 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23564 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23565 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23566 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23567 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23568 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23569 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23570 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
23571 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23572 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23573 tests/run \
23574 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23575  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23576 EOF
23577 cat >> $CONFIG_STATUS <<EOF
23578
23579 # Protect against being on the right side of a sed subst in config.status.
23580 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23581  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23582 $ac_vpsub
23583 $extrasub
23584 s%@SHELL@%$SHELL%g
23585 s%@CFLAGS@%$CFLAGS%g
23586 s%@CPPFLAGS@%$CPPFLAGS%g
23587 s%@CXXFLAGS@%$CXXFLAGS%g
23588 s%@FFLAGS@%$FFLAGS%g
23589 s%@DEFS@%$DEFS%g
23590 s%@LDFLAGS@%$LDFLAGS%g
23591 s%@LIBS@%$LIBS%g
23592 s%@exec_prefix@%$exec_prefix%g
23593 s%@prefix@%$prefix%g
23594 s%@program_transform_name@%$program_transform_name%g
23595 s%@bindir@%$bindir%g
23596 s%@sbindir@%$sbindir%g
23597 s%@libexecdir@%$libexecdir%g
23598 s%@datadir@%$datadir%g
23599 s%@sysconfdir@%$sysconfdir%g
23600 s%@sharedstatedir@%$sharedstatedir%g
23601 s%@localstatedir@%$localstatedir%g
23602 s%@libdir@%$libdir%g
23603 s%@includedir@%$includedir%g
23604 s%@oldincludedir@%$oldincludedir%g
23605 s%@infodir@%$infodir%g
23606 s%@mandir@%$mandir%g
23607 s%@host@%$host%g
23608 s%@host_alias@%$host_alias%g
23609 s%@host_cpu@%$host_cpu%g
23610 s%@host_vendor@%$host_vendor%g
23611 s%@host_os@%$host_os%g
23612 s%@target@%$target%g
23613 s%@target_alias@%$target_alias%g
23614 s%@target_cpu@%$target_cpu%g
23615 s%@target_vendor@%$target_vendor%g
23616 s%@target_os@%$target_os%g
23617 s%@build@%$build%g
23618 s%@build_alias@%$build_alias%g
23619 s%@build_cpu@%$build_cpu%g
23620 s%@build_vendor@%$build_vendor%g
23621 s%@build_os@%$build_os%g
23622 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23623 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23624 s%@INSTALL_DATA@%$INSTALL_DATA%g
23625 s%@PACKAGE@%$PACKAGE%g
23626 s%@VERSION@%$VERSION%g
23627 s%@ACLOCAL@%$ACLOCAL%g
23628 s%@AUTOCONF@%$AUTOCONF%g
23629 s%@AUTOMAKE@%$AUTOMAKE%g
23630 s%@AUTOHEADER@%$AUTOHEADER%g
23631 s%@MAKEINFO@%$MAKEINFO%g
23632 s%@install_sh@%$install_sh%g
23633 s%@AMTAR@%$AMTAR%g
23634 s%@AWK@%$AWK%g
23635 s%@AMTARFLAGS@%$AMTARFLAGS%g
23636 s%@SET_MAKE@%$SET_MAKE%g
23637 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
23638 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23639 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23640 s%@top_builddir@%$top_builddir%g
23641 s%@ldap_subdir@%$ldap_subdir%g
23642 s%@CC@%$CC%g
23643 s%@AR@%$AR%g
23644 s%@LN_S@%$LN_S%g
23645 s%@OBJEXT@%$OBJEXT%g
23646 s%@EXEEXT@%$EXEEXT%g
23647 s%@ECHO@%$ECHO%g
23648 s%@RANLIB@%$RANLIB%g
23649 s%@STRIP@%$STRIP%g
23650 s%@DLLTOOL@%$DLLTOOL%g
23651 s%@AS@%$AS%g
23652 s%@OBJDUMP@%$OBJDUMP%g
23653 s%@CPP@%$CPP%g
23654 s%@LIBTOOL@%$LIBTOOL%g
23655 s%@LN_H@%$LN_H%g
23656 s%@PERLBIN@%$PERLBIN%g
23657 s%@OL_MKDEP@%$OL_MKDEP%g
23658 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23659 s%@LTSTATIC@%$LTSTATIC%g
23660 s%@LIBOBJS@%$LIBOBJS%g
23661 s%@LIBSRCS@%$LIBSRCS%g
23662 s%@PLAT@%$PLAT%g
23663 s%@WITH_TLS@%$WITH_TLS%g
23664 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23665 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23666 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23667 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23668 s%@BUILD_BDB@%$BUILD_BDB%g
23669 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23670 s%@BUILD_HDB@%$BUILD_HDB%g
23671 s%@BUILD_LDAP@%$BUILD_LDAP%g
23672 s%@BUILD_LDBM@%$BUILD_LDBM%g
23673 s%@BUILD_META@%$BUILD_META%g
23674 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23675 s%@BUILD_NULL@%$BUILD_NULL%g
23676 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23677 s%@BUILD_PERL@%$BUILD_PERL%g
23678 s%@BUILD_SHELL@%$BUILD_SHELL%g
23679 s%@BUILD_SQL@%$BUILD_SQL%g
23680 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
23681 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
23682 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23683 s%@LDAP_LIBS@%$LDAP_LIBS%g
23684 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23685 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23686 s%@LDBM_LIBS@%$LDBM_LIBS%g
23687 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23688 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23689 s%@WRAP_LIBS@%$WRAP_LIBS%g
23690 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23691 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23692 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
23693 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23694 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23695 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
23696 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23697 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23698 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23699 s%@KRB4_LIBS@%$KRB4_LIBS%g
23700 s%@KRB5_LIBS@%$KRB5_LIBS%g
23701 s%@SASL_LIBS@%$SASL_LIBS%g
23702 s%@TLS_LIBS@%$TLS_LIBS%g
23703 s%@MODULES_LIBS@%$MODULES_LIBS%g
23704 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
23705 s%@LIBSLAPI@%$LIBSLAPI%g
23706 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
23707 s%@AUTH_LIBS@%$AUTH_LIBS%g
23708 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23709 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23710 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23711 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23712
23713 CEOF
23714 EOF
23715
23716 cat >> $CONFIG_STATUS <<\EOF
23717
23718 # Split the substitutions into bite-sized pieces for seds with
23719 # small command number limits, like on Digital OSF/1 and HP-UX.
23720 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23721 ac_file=1 # Number of current file.
23722 ac_beg=1 # First line for current file.
23723 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23724 ac_more_lines=:
23725 ac_sed_cmds=""
23726 while $ac_more_lines; do
23727   if test $ac_beg -gt 1; then
23728     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23729   else
23730     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23731   fi
23732   if test ! -s conftest.s$ac_file; then
23733     ac_more_lines=false
23734     rm -f conftest.s$ac_file
23735   else
23736     if test -z "$ac_sed_cmds"; then
23737       ac_sed_cmds="sed -f conftest.s$ac_file"
23738     else
23739       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23740     fi
23741     ac_file=`expr $ac_file + 1`
23742     ac_beg=$ac_end
23743     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23744   fi
23745 done
23746 if test -z "$ac_sed_cmds"; then
23747   ac_sed_cmds=cat
23748 fi
23749 EOF
23750
23751 cat >> $CONFIG_STATUS <<EOF
23752
23753 CONFIG_FILES=\${CONFIG_FILES-"\
23754 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23755 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23756 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23757 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23758 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23759 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23760 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23761 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23762 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23763 include/Makefile:build/top.mk:include/Makefile.in \
23764 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23765 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23766 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23767 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23768 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23769 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23770 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23771 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23772 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23773 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23774 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23775 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23776 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23777 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23778 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23779 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23780 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23781 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23782 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23783 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23784 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23785 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23786 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23787 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
23788 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23789 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23790 tests/run \
23791 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23792 "}
23793 EOF
23794 cat >> $CONFIG_STATUS <<\EOF
23795 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23796   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23797   case "$ac_file" in
23798   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23799        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23800   *) ac_file_in="${ac_file}.in" ;;
23801   esac
23802
23803   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23804
23805   # Remove last slash and all that follows it.  Not all systems have dirname.
23806   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23807   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23808     # The file is in a subdirectory.
23809     test ! -d "$ac_dir" && mkdir "$ac_dir"
23810     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23811     # A "../" for each directory in $ac_dir_suffix.
23812     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23813   else
23814     ac_dir_suffix= ac_dots=
23815   fi
23816
23817   case "$ac_given_srcdir" in
23818   .)  srcdir=.
23819       if test -z "$ac_dots"; then top_srcdir=.
23820       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23821   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23822   *) # Relative path.
23823     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23824     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23825   esac
23826
23827   case "$ac_given_INSTALL" in
23828   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23829   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23830   esac
23831
23832   echo creating "$ac_file"
23833   rm -f "$ac_file"
23834   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23835   case "$ac_file" in
23836   *[Mm]akefile*) ac_comsub="1i\\
23837 # $configure_input" ;;
23838   *) ac_comsub= ;;
23839   esac
23840
23841   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23842   sed -e "$ac_comsub
23843 s%@configure_input@%$configure_input%g
23844 s%@srcdir@%$srcdir%g
23845 s%@top_srcdir@%$top_srcdir%g
23846 s%@INSTALL@%$INSTALL%g
23847 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23848 fi; done
23849 rm -f conftest.s*
23850
23851 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23852 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23853 #
23854 # ac_d sets the value in "#define NAME VALUE" lines.
23855 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23856 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23857 ac_dC='\3'
23858 ac_dD='%g'
23859 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23860 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23861 ac_uB='\([      ]\)%\1#\2define\3'
23862 ac_uC=' '
23863 ac_uD='\4%g'
23864 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23865 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23866 ac_eB='$%\1#\2define\3'
23867 ac_eC=' '
23868 ac_eD='%g'
23869
23870 if test "${CONFIG_HEADERS+set}" != set; then
23871 EOF
23872 cat >> $CONFIG_STATUS <<EOF
23873   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23874 EOF
23875 cat >> $CONFIG_STATUS <<\EOF
23876 fi
23877 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23878   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23879   case "$ac_file" in
23880   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23881        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23882   *) ac_file_in="${ac_file}.in" ;;
23883   esac
23884
23885   echo creating $ac_file
23886
23887   rm -f conftest.frag conftest.in conftest.out
23888   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23889   cat $ac_file_inputs > conftest.in
23890
23891 EOF
23892
23893 # Transform confdefs.h into a sed script conftest.vals that substitutes
23894 # the proper values into config.h.in to produce config.h.  And first:
23895 # Protect against being on the right side of a sed subst in config.status.
23896 # Protect against being in an unquoted here document in config.status.
23897 rm -f conftest.vals
23898 cat > conftest.hdr <<\EOF
23899 s/[\\&%]/\\&/g
23900 s%[\\$`]%\\&%g
23901 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23902 s%ac_d%ac_u%gp
23903 s%ac_u%ac_e%gp
23904 EOF
23905 sed -n -f conftest.hdr confdefs.h > conftest.vals
23906 rm -f conftest.hdr
23907
23908 # This sed command replaces #undef with comments.  This is necessary, for
23909 # example, in the case of _POSIX_SOURCE, which is predefined and required
23910 # on some systems where configure will not decide to define it.
23911 cat >> conftest.vals <<\EOF
23912 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23913 EOF
23914
23915 # Break up conftest.vals because some shells have a limit on
23916 # the size of here documents, and old seds have small limits too.
23917
23918 rm -f conftest.tail
23919 while :
23920 do
23921   ac_lines=`grep -c . conftest.vals`
23922   # grep -c gives empty output for an empty file on some AIX systems.
23923   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23924   # Write a limited-size here document to conftest.frag.
23925   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23926   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23927   echo 'CEOF
23928   sed -f conftest.frag conftest.in > conftest.out
23929   rm -f conftest.in
23930   mv conftest.out conftest.in
23931 ' >> $CONFIG_STATUS
23932   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23933   rm -f conftest.vals
23934   mv conftest.tail conftest.vals
23935 done
23936 rm -f conftest.vals
23937
23938 cat >> $CONFIG_STATUS <<\EOF
23939   rm -f conftest.frag conftest.h
23940   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23941   cat conftest.in >> conftest.h
23942   rm -f conftest.in
23943   if cmp -s $ac_file conftest.h 2>/dev/null; then
23944     echo "$ac_file is unchanged"
23945     rm -f conftest.h
23946   else
23947     # Remove last slash and all that follows it.  Not all systems have dirname.
23948       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23949       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23950       # The file is in a subdirectory.
23951       test ! -d "$ac_dir" && mkdir "$ac_dir"
23952     fi
23953     rm -f $ac_file
23954     mv conftest.h $ac_file
23955   fi
23956 fi; done
23957
23958 EOF
23959 cat >> $CONFIG_STATUS <<EOF
23960
23961 EOF
23962 cat >> $CONFIG_STATUS <<\EOF
23963
23964 chmod +x tests/run
23965 date > stamp-h
23966 echo Please run \"make depend\" to build dependencies
23967
23968 exit 0
23969 EOF
23970 chmod +x $CONFIG_STATUS
23971 rm -fr confdefs* $ac_clean_files
23972 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23973