]> git.sur5r.net Git - openldap/blob - configure
Added referential integrity and attribute uniqueness overlays
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.533 2004/04/17 06:45:29 hyc 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-relay        enable relay backend no|yes|mod [yes]"
113 ac_help="$ac_help
114     --enable-shell        enable shell backend no|yes|mod [no]"
115 ac_help="$ac_help
116     --enable-sql          enable sql backend no|yes|mod [no]"
117 ac_help="$ac_help
118
119 SLAPD Overlay Options:"
120 ac_help="$ac_help
121     --enable-chain        LDAP Chain Response no|yes|mod [no]"
122 ac_help="$ac_help
123     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
124 ac_help="$ac_help
125     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
126 ac_help="$ac_help
127     --enable-lastmod      Last Modification overlay no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
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 relay 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-relay
2113         # Check whether --enable-relay or --disable-relay was given.
2114 if test "${enable_relay+set}" = set; then
2115   enableval="$enable_relay"
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-relay" 1>&2; exit 1; }
2125         fi
2126         ol_enable_relay="$ol_arg"
2127
2128 else
2129         ol_enable_relay="yes"
2130 fi
2131 # end --enable-relay
2132 # OpenLDAP --enable-shell
2133         # Check whether --enable-shell or --disable-shell was given.
2134 if test "${enable_shell+set}" = set; then
2135   enableval="$enable_shell"
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-shell" 1>&2; exit 1; }
2145         fi
2146         ol_enable_shell="$ol_arg"
2147
2148 else
2149         ol_enable_shell="no"
2150 fi
2151 # end --enable-shell
2152 # OpenLDAP --enable-sql
2153         # Check whether --enable-sql or --disable-sql was given.
2154 if test "${enable_sql+set}" = set; then
2155   enableval="$enable_sql"
2156   
2157         ol_arg=invalid
2158         for ol_val in no yes mod ; do
2159                 if test "$enableval" = "$ol_val" ; then
2160                         ol_arg="$ol_val"
2161                 fi
2162         done
2163         if test "$ol_arg" = "invalid" ; then
2164                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2165         fi
2166         ol_enable_sql="$ol_arg"
2167
2168 else
2169         ol_enable_sql="no"
2170 fi
2171 # end --enable-sql
2172
2173 Overlays="chain denyop dyngroup lastmod ppolicy proxycache rwm \
2174         refint unique"
2175
2176 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2177 if test "${with_xxslapoverlays+set}" = set; then
2178   withval="$with_xxslapoverlays"
2179   :
2180 fi
2181
2182
2183 # OpenLDAP --enable-chain
2184         # Check whether --enable-chain or --disable-chain was given.
2185 if test "${enable_chain+set}" = set; then
2186   enableval="$enable_chain"
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-chain" 1>&2; exit 1; }
2196         fi
2197         ol_enable_chain="$ol_arg"
2198
2199 else
2200         ol_enable_chain="no"
2201 fi
2202 # end --enable-chain
2203
2204 # OpenLDAP --enable-denyop
2205         # Check whether --enable-denyop or --disable-denyop was given.
2206 if test "${enable_denyop+set}" = set; then
2207   enableval="$enable_denyop"
2208   
2209         ol_arg=invalid
2210         for ol_val in no yes mod ; do
2211                 if test "$enableval" = "$ol_val" ; then
2212                         ol_arg="$ol_val"
2213                 fi
2214         done
2215         if test "$ol_arg" = "invalid" ; then
2216                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2217         fi
2218         ol_enable_denyop="$ol_arg"
2219
2220 else
2221         ol_enable_denyop="no"
2222 fi
2223 # end --enable-denyop
2224
2225 # OpenLDAP --enable-dyngroup
2226         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2227 if test "${enable_dyngroup+set}" = set; then
2228   enableval="$enable_dyngroup"
2229   
2230         ol_arg=invalid
2231         for ol_val in no yes mod ; do
2232                 if test "$enableval" = "$ol_val" ; then
2233                         ol_arg="$ol_val"
2234                 fi
2235         done
2236         if test "$ol_arg" = "invalid" ; then
2237                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2238         fi
2239         ol_enable_dyngroup="$ol_arg"
2240
2241 else
2242         ol_enable_dyngroup="no"
2243 fi
2244 # end --enable-dyngroup
2245
2246 # OpenLDAP --enable-lastmod
2247         # Check whether --enable-lastmod or --disable-lastmod was given.
2248 if test "${enable_lastmod+set}" = set; then
2249   enableval="$enable_lastmod"
2250   
2251         ol_arg=invalid
2252         for ol_val in no yes mod ; do
2253                 if test "$enableval" = "$ol_val" ; then
2254                         ol_arg="$ol_val"
2255                 fi
2256         done
2257         if test "$ol_arg" = "invalid" ; then
2258                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2259         fi
2260         ol_enable_lastmod="$ol_arg"
2261
2262 else
2263         ol_enable_lastmod="no"
2264 fi
2265 # end --enable-lastmod
2266
2267 # OpenLDAP --enable-ppolicy
2268         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2269 if test "${enable_ppolicy+set}" = set; then
2270   enableval="$enable_ppolicy"
2271   
2272         ol_arg=invalid
2273         for ol_val in no yes mod ; do
2274                 if test "$enableval" = "$ol_val" ; then
2275                         ol_arg="$ol_val"
2276                 fi
2277         done
2278         if test "$ol_arg" = "invalid" ; then
2279                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2280         fi
2281         ol_enable_ppolicy="$ol_arg"
2282
2283 else
2284         ol_enable_ppolicy="no"
2285 fi
2286 # end --enable-ppolicy
2287
2288 # OpenLDAP --enable-proxycache
2289         # Check whether --enable-proxycache or --disable-proxycache was given.
2290 if test "${enable_proxycache+set}" = set; then
2291   enableval="$enable_proxycache"
2292   
2293         ol_arg=invalid
2294         for ol_val in # OpenLDAP --enable-refint
2295         ac_help="$ac_help
2296     --enable-refint       Referential Integrity overlay no|yes|mod no"
2297 # Check whether --enable-refint or --disable-refint was given.
2298 if test "${enable_refint+set}" = set; then
2299   enableval="$enable_refint"
2300   
2301         ol_arg=invalid
2302         for ol_val in no yes mod ; do
2303                 if test "$enableval" = "$ol_val" ; then
2304                         ol_arg="$ol_val"
2305                 fi
2306         done
2307         if test "$ol_arg" = "invalid" ; then
2308                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2309         fi
2310         ol_enable_refint="$ol_arg"
2311
2312 else
2313         ol_enable_refint="no"
2314 fi
2315 # end --enable-refint
2316
2317 # OpenLDAP --enable-rwm
2318         ac_help="$ac_help
2319     --enable-rwm          Rewrite/Remap overlay no|yes|mod no"
2320 # Check whether --enable-rwm or --disable-rwm was given.
2321 if test "${enable_rwm+set}" = set; then
2322   enableval="$enable_rwm"
2323   
2324         ol_arg=invalid
2325         for ol_val in # OpenLDAP --enable-unique
2326         ac_help="$ac_help
2327     --enable-unique               Attribute Uniqueness overlay no|yes|mod no"
2328 # Check whether --enable-unique or --disable-unique was given.
2329 if test "${enable_unique+set}" = set; then
2330   enableval="$enable_unique"
2331   
2332         ol_arg=invalid
2333         for ol_val in no yes mod ; do
2334                 if test "$enableval" = "$ol_val" ; then
2335                         ol_arg="$ol_val"
2336                 fi
2337         done
2338         if test "$ol_arg" = "invalid" ; then
2339                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2340         fi
2341         ol_enable_unique="$ol_arg"
2342
2343 else
2344         ol_enable_unique="no"
2345 fi
2346 # end --enable-unique
2347
2348
2349 ac_help="$ac_help
2350
2351 SLURPD (Replication Daemon) Options:"
2352 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2353 if test "${with_xxslurpdoptions+set}" = set; then
2354   withval="$with_xxslurpdoptions"
2355   :
2356 fi
2357
2358 # OpenLDAP --enable-slurpd
2359         ac_help="$ac_help
2360   --enable-slurpd         enable building slurpd auto"
2361 # Check whether --enable-slurpd or --disable-slurpd was given.
2362 if test "${enable_slurpd+set}" = set; then
2363   enableval="$enable_slurpd"
2364   
2365         ol_arg=invalid
2366         for ol_val in auto yes no ; do
2367                 if test "$enableval" = "$ol_val" ; then
2368                         ol_arg="$ol_val"
2369                 fi
2370         done
2371         if test "$ol_arg" = "invalid" ; then
2372                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2373         fi
2374         ol_enable_slurpd="$ol_arg"
2375
2376 else
2377         ol_enable_slurpd="auto"
2378 fi
2379 # end --enable-slurpd
2380
2381 ac_help="$ac_help
2382
2383 Library Generation & Linking Options"
2384 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2385 if test "${with_xxliboptions+set}" = set; then
2386   withval="$with_xxliboptions"
2387   :
2388 fi
2389
2390 ac_help="$ac_help
2391   --enable-static=PKGS  build static libraries default=yes"
2392 # Check whether --enable-static or --disable-static was given.
2393 if test "${enable_static+set}" = set; then
2394   enableval="$enable_static"
2395   p=${PACKAGE-default}
2396 case $enableval in
2397 yes ; do
2398                 if test "$enableval" = "$ol_val" ; then
2399                         ol_arg="$ol_val"
2400                 fi
2401         done
2402         if test "$ol_arg" = "invalid" ; then
2403                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2404         fi
2405         ol_enable_rwm="$ol_arg"
2406
2407 else
2408         ol_enable_rwm="no"
2409 fi
2410 # end --enable-rwm
2411  enable_static=yes ;;
2412 no ; do
2413                 if test "$enableval" = "$ol_val" ; then
2414                         ol_arg="$ol_val"
2415                 fi
2416         done
2417         if test "$ol_arg" = "invalid" ; then
2418                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2419         fi
2420         ol_enable_proxycache="$ol_arg"
2421
2422 else
2423         ol_enable_proxycache="no"
2424 fi
2425 # end --enable-proxycache
2426  enable_static=no ;;
2427 *)
2428   enable_static=no
2429   # Look at the argument we got.  We use all the common list separators.
2430   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2431   for pkg in $enableval; do
2432     if test "X$pkg" = "X$p"; then
2433       enable_static=yes
2434     fi
2435   done
2436   IFS="$ac_save_ifs"
2437   ;;
2438 esac
2439 else
2440   enable_static=yes
2441 fi
2442
2443 # Check whether --enable-shared or --disable-shared was given.
2444 if test "${enable_shared+set}" = set; then
2445   enableval="$enable_shared"
2446   p=${PACKAGE-default}
2447 case $enableval in
2448 yes) enable_shared=yes ;;
2449 no) enable_shared=no ;;
2450 *)
2451   enable_shared=no
2452   # Look at the argument we got.  We use all the common list separators.
2453   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2454   for pkg in $enableval; do
2455     if test "X$pkg" = "X$p"; then
2456       enable_shared=yes
2457     fi
2458   done
2459   IFS="$ac_save_ifs"
2460   ;;
2461 esac
2462 else
2463   enable_shared=yes
2464 fi
2465
2466
2467
2468 # validate options
2469 if test $ol_enable_slapd = no ; then
2470                 if test $ol_enable_slapi = yes ; then
2471                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2472         fi
2473         for i in $Backends; do
2474                 eval "ol_tmp=\$ol_enable_$i"
2475                 if test $ol_tmp != no ; then
2476                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2477                         eval "ol_enable_$i=no"
2478                 fi
2479         done
2480         if test $ol_enable_modules = yes ; then
2481                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2482         fi
2483         if test $ol_enable_multimaster = yes ; then
2484                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2485         fi
2486         if test $ol_enable_wrappers = yes ; then
2487                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2488         fi
2489         if test $ol_enable_rlookups = yes ; then
2490                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2491         fi
2492         if test $ol_enable_aci = yes ; then
2493                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2494         fi
2495         if test $ol_with_ldbm_api != auto ; then
2496                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2497         fi
2498         if test $ol_with_ldbm_type != auto ; then
2499                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2500         fi
2501         if test $ol_enable_slurpd = yes ; then
2502                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2503         fi
2504         if test $ol_enable_rewrite = yes ; then
2505                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2506         fi
2507                 for i in $Overlays; do
2508                 eval "ol_tmp=\$ol_enable_$i"
2509                 if test $ol_tmp != no ; then
2510                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2511                         eval "ol_enable_$i=no"
2512                 fi
2513         done
2514
2515         # force settings to no
2516         ol_enable_slapi=no
2517
2518         ol_enable_modules=no
2519         ol_enable_multimaster=no
2520         ol_enable_rlookups=no
2521         ol_enable_aci=no
2522         ol_enable_wrappers=no
2523
2524         ol_with_ldbm_api=no
2525         ol_with_ldbm_type=no
2526
2527         ol_enable_slurpd=no
2528
2529         ol_enable_rewrite=no
2530
2531 elif test $ol_enable_ldbm = no ; then
2532         
2533         if test $ol_with_ldbm_api != auto ; then
2534                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2535         fi
2536
2537         if test $ol_with_ldbm_type != auto ; then
2538                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2539         fi
2540
2541         if test $ol_enable_modules != yes -a \
2542                 $ol_enable_bdb = no -a \
2543                 $ol_enable_dnssrv = no -a \
2544                 $ol_enable_hdb = no -a \
2545                 $ol_enable_ldap = no -a \
2546                 $ol_enable_meta = no -a \
2547                 $ol_enable_monitor = no -a \
2548                 $ol_enable_null = no -a \
2549                 $ol_enable_passwd = no -a \
2550                 $ol_enable_perl = no -a \
2551                 $ol_enable_relay = no -a \
2552                 $ol_enable_shell = no -a \
2553                 $ol_enable_sql = no ; then
2554
2555                 if test $ol_enable_slapd = yes ; then
2556                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2557                 else
2558                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2559                         ol_enable_slapd=no
2560                 fi
2561         fi
2562
2563         ol_with_ldbm_api=no
2564         ol_with_ldbm_type=no
2565
2566         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2567                 ol_with_ldbm_api=berkeley
2568         fi
2569
2570 else
2571                 if test $ol_with_ldbm_api = gdbm -a \
2572                 $ol_with_ldbm_type = btree ; then
2573                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2574         fi
2575         if test $ol_with_ldbm_api = mdbm -a \
2576                 $ol_with_ldbm_type = btree ; then
2577                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2578         fi
2579         if test $ol_with_ldbm_api = ndbm -a \
2580                 $ol_with_ldbm_type = btree ; then
2581                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2582         fi
2583
2584         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2585                 if test $ol_with_ldbm_api = auto ; then
2586                         ol_with_ldbm_api=berkeley
2587                 elif test $ol_with_ldbm_api != berkeley ; then
2588                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2589                 fi
2590
2591         elif test $ol_enable_bdb = auto ; then
2592                 if test $ol_with_ldbm_api != berkeley \
2593                         -o $ol_with_ldbm_api != auto ; then
2594                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2595                         ol_enable_bdb=no
2596                 fi
2597         fi
2598 fi
2599
2600 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2601         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2602 fi
2603
2604 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2605         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2606 fi
2607
2608 if test $ol_enable_slurpd = yes ; then
2609                 if test $ol_with_threads = no ; then
2610                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2611         fi
2612 fi
2613
2614 if test $ol_enable_lmpasswd = yes ; then
2615         if test $ol_with_tls = no ; then
2616                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2617         fi
2618 fi
2619
2620 if test $ol_enable_kbind = yes ; then
2621         if test $ol_with_kerberos = no ; then
2622                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2623         elif test $ol_with_kerberos = auto ; then
2624                 ol_with_kerberos=yes
2625         fi
2626
2627 elif test $ol_enable_kbind = no ; then
2628         if test $ol_with_kerberos = auto ; then
2629                 ol_with_kerberos=no
2630         elif test $ol_with_kerberos != no ; then
2631                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2632                 ol_with_kerberos=no
2633         fi
2634 fi
2635
2636 if test $ol_enable_spasswd = yes ; then
2637         if test $ol_with_cyrus_sasl = no ; then
2638                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2639         fi
2640         ol_with_cyrus_sasl=yes
2641 fi
2642
2643 echo "$ac_t""done" 1>&6
2644
2645 LDAP_LIBS=
2646 LDBM_LIBS=
2647 LTHREAD_LIBS=
2648 LUTIL_LIBS=
2649
2650 SLAPD_LIBS=
2651 SLURPD_LIBS=
2652
2653 BUILD_SLAPD=no
2654 BUILD_SLURPD=no
2655
2656 BUILD_THREAD=no
2657
2658 BUILD_SLAPI=no
2659 SLAPD_SLAPI_DEPEND=
2660
2661 BUILD_BDB=no
2662 BUILD_DNSSRV=no
2663 BUILD_HDB=no
2664 BUILD_LDAP=no
2665 BUILD_LDBM=no
2666 BUILD_META=no
2667 BUILD_MONITOR=no
2668 BUILD_NULL=no
2669 BUILD_PASSWD=no
2670 BUILD_PERL=no
2671 BUILD_RELAY=no
2672 BUILD_SHELL=no
2673 BUILD_SQL=no
2674
2675 BUILD_CHAIN=no
2676 BUILD_DENYOP=no
2677 BUILD_DYNGROUP=no
2678 BUILD_LASTMOD=no
2679 BUILD_PPOLICY=no
2680 BUILD_PROXYCACHE=no
2681 BUILD_REFINT=no
2682 BUILD_RWM=no
2683 BUILD_UNIQUE=no
2684
2685 SLAPD_DYNAMIC_OVERLAYS=
2686
2687 SLAPD_MODULES_LDFLAGS=
2688 SLAPD_MODULES_CPPFLAGS=
2689
2690 SLAPD_STATIC_BACKENDS=
2691 SLAPD_DYNAMIC_BACKENDS=
2692
2693 SLAPD_PERL_LDFLAGS=
2694 MOD_PERL_LDFLAGS=
2695 PERL_CPPFLAGS=
2696
2697 SLAPD_SQL_LDFLAGS=
2698 SLAPD_SQL_LIBS=
2699 SLAPD_SQL_INCLUDES=
2700
2701 KRB4_LIBS=
2702 KRB5_LIBS=
2703 SASL_LIBS=
2704 TLS_LIBS=
2705 MODULES_LIBS=
2706 SLAPI_LIBS=
2707 LIBSLAPI=
2708 LIBSLAPITOOLS=
2709 AUTH_LIBS=
2710
2711 SLAPD_SLP_LIBS=
2712
2713
2714 # Find a good install program.  We prefer a C program (faster),
2715 # so one script is as good as another.  But avoid the broken or
2716 # incompatible versions:
2717 # SysV /etc/install, /usr/sbin/install
2718 # SunOS /usr/etc/install
2719 # IRIX /sbin/install
2720 # AIX /bin/install
2721 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2722 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2723 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2724 # ./install, which can be erroneously created by make from ./install.sh.
2725 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2726 echo "configure:2727: checking for a BSD compatible install" >&5
2727 if test -z "$INSTALL"; then
2728 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2729   echo $ac_n "(cached) $ac_c" 1>&6
2730 else
2731     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2732   for ac_dir in $PATH; do
2733     # Account for people who put trailing slashes in PATH elements.
2734     case "$ac_dir/" in
2735     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2736     *)
2737       # OSF1 and SCO ODT 3.0 have their own names for install.
2738       # Don't use installbsd from OSF since it installs stuff as root
2739       # by default.
2740       for ac_prog in ginstall scoinst install; do
2741         if test -f $ac_dir/$ac_prog; then
2742           if test $ac_prog = install &&
2743             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2744             # AIX install.  It has an incompatible calling convention.
2745             :
2746           elif test $ac_prog = install &&
2747             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2748             # program-specific install script used by HP pwplus--don't use.
2749             :
2750           else
2751             ac_cv_path_install="$ac_dir/$ac_prog -c"
2752             break 2
2753           fi
2754         fi
2755       done
2756       ;;
2757     esac
2758   done
2759   IFS="$ac_save_IFS"
2760
2761 fi
2762   if test "${ac_cv_path_install+set}" = set; then
2763     INSTALL="$ac_cv_path_install"
2764   else
2765     # As a last resort, use the slow shell script.  We don't cache a
2766     # path for INSTALL within a source directory, because that will
2767     # break other packages using the cache if that directory is
2768     # removed, or if the path is relative.
2769     INSTALL="$ac_install_sh"
2770   fi
2771 fi
2772 echo "$ac_t""$INSTALL" 1>&6
2773
2774 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2775 # It thinks the first close brace ends the variable substitution.
2776 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2777
2778 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2779
2780 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2781
2782
2783 cat >> confdefs.h <<\EOF
2784 #define HAVE_MKVERSION 1
2785 EOF
2786
2787
2788
2789
2790 ol_aix_threads=no
2791 case "$target" in
2792 *-*-aix*)       if test -z "$CC" ; then
2793                 case "$ol_with_threads" in
2794                 auto | yes |  posix) ol_aix_threads=yes ;;
2795                 esac
2796         fi
2797 ;;
2798 esac
2799
2800 if test $ol_aix_threads = yes ; then
2801         if test -z "${CC}" ; then
2802                 for ac_prog in cc_r xlc_r cc
2803 do
2804 # Extract the first word of "$ac_prog", so it can be a program name with args.
2805 set dummy $ac_prog; ac_word=$2
2806 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2807 echo "configure:2808: checking for $ac_word" >&5
2808 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2809   echo $ac_n "(cached) $ac_c" 1>&6
2810 else
2811   if test -n "$CC"; then
2812   ac_cv_prog_CC="$CC" # Let the user override the test.
2813 else
2814   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2815   ac_dummy="$PATH"
2816   for ac_dir in $ac_dummy; do
2817     test -z "$ac_dir" && ac_dir=.
2818     if test -f $ac_dir/$ac_word; then
2819       ac_cv_prog_CC="$ac_prog"
2820       break
2821     fi
2822   done
2823   IFS="$ac_save_ifs"
2824 fi
2825 fi
2826 CC="$ac_cv_prog_CC"
2827 if test -n "$CC"; then
2828   echo "$ac_t""$CC" 1>&6
2829 else
2830   echo "$ac_t""no" 1>&6
2831 fi
2832
2833 test -n "$CC" && break
2834 done
2835
2836
2837                 if test "$CC" = cc ; then
2838                                                 if test $ol_with_threads != auto ; then
2839                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2840                         else
2841                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2842                         fi
2843                         ol_with_threads=no
2844                 fi
2845         fi
2846
2847         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2848                 ol_with_threads=posix
2849                 ol_cv_pthread_create=yes
2850         fi
2851 fi
2852
2853 if test -z "${CC}"; then
2854         for ac_prog in cc gcc
2855 do
2856 # Extract the first word of "$ac_prog", so it can be a program name with args.
2857 set dummy $ac_prog; ac_word=$2
2858 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2859 echo "configure:2860: checking for $ac_word" >&5
2860 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2861   echo $ac_n "(cached) $ac_c" 1>&6
2862 else
2863   if test -n "$CC"; then
2864   ac_cv_prog_CC="$CC" # Let the user override the test.
2865 else
2866   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2867   ac_dummy="$PATH"
2868   for ac_dir in $ac_dummy; do
2869     test -z "$ac_dir" && ac_dir=.
2870     if test -f $ac_dir/$ac_word; then
2871       ac_cv_prog_CC="$ac_prog"
2872       break
2873     fi
2874   done
2875   IFS="$ac_save_ifs"
2876 fi
2877 fi
2878 CC="$ac_cv_prog_CC"
2879 if test -n "$CC"; then
2880   echo "$ac_t""$CC" 1>&6
2881 else
2882   echo "$ac_t""no" 1>&6
2883 fi
2884
2885 test -n "$CC" && break
2886 done
2887 test -n "$CC" || CC="missing"
2888
2889
2890         if test "${CC}" = "missing" ; then
2891                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2892         fi
2893 fi
2894
2895 if test -z "${AR}"; then
2896         for ac_prog in ar gar
2897 do
2898 # Extract the first word of "$ac_prog", so it can be a program name with args.
2899 set dummy $ac_prog; ac_word=$2
2900 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2901 echo "configure:2902: checking for $ac_word" >&5
2902 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2903   echo $ac_n "(cached) $ac_c" 1>&6
2904 else
2905   if test -n "$AR"; then
2906   ac_cv_prog_AR="$AR" # Let the user override the test.
2907 else
2908   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2909   ac_dummy="$PATH"
2910   for ac_dir in $ac_dummy; do
2911     test -z "$ac_dir" && ac_dir=.
2912     if test -f $ac_dir/$ac_word; then
2913       ac_cv_prog_AR="$ac_prog"
2914       break
2915     fi
2916   done
2917   IFS="$ac_save_ifs"
2918 fi
2919 fi
2920 AR="$ac_cv_prog_AR"
2921 if test -n "$AR"; then
2922   echo "$ac_t""$AR" 1>&6
2923 else
2924   echo "$ac_t""no" 1>&6
2925 fi
2926
2927 test -n "$AR" && break
2928 done
2929 test -n "$AR" || AR="missing"
2930
2931
2932         if test "${AR}" = "missing" ; then
2933                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
2934         fi
2935 fi
2936
2937
2938
2939 # Find the correct PATH separator.  Usually this is `:', but
2940 # DJGPP uses `;' like DOS.
2941 if test "X${PATH_SEPARATOR+set}" != Xset; then
2942   UNAME=${UNAME-`uname 2>/dev/null`}
2943   case X$UNAME in
2944     *-DOS) lt_cv_sys_path_separator=';' ;;
2945     *)     lt_cv_sys_path_separator=':' ;;
2946   esac
2947   PATH_SEPARATOR=$lt_cv_sys_path_separator
2948 fi
2949
2950 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2951 echo "configure:2952: checking for Cygwin environment" >&5
2952 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
2953   echo $ac_n "(cached) $ac_c" 1>&6
2954 else
2955   cat > conftest.$ac_ext <<EOF
2956 #line 2957 "configure"
2957 #include "confdefs.h"
2958
2959 int main() {
2960
2961 #ifndef __CYGWIN__
2962 #define __CYGWIN__ __CYGWIN32__
2963 #endif
2964 return __CYGWIN__;
2965 ; return 0; }
2966 EOF
2967 if { (eval echo configure:2968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2968   rm -rf conftest*
2969   ac_cv_cygwin=yes
2970 else
2971   echo "configure: failed program was:" >&5
2972   cat conftest.$ac_ext >&5
2973   rm -rf conftest*
2974   ac_cv_cygwin=no
2975 fi
2976 rm -f conftest*
2977 fi
2978
2979 echo "$ac_t""$ac_cv_cygwin" 1>&6
2980 CYGWIN=
2981 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2982 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2983 echo "configure:2984: checking for mingw32 environment" >&5
2984 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
2985   echo $ac_n "(cached) $ac_c" 1>&6
2986 else
2987   cat > conftest.$ac_ext <<EOF
2988 #line 2989 "configure"
2989 #include "confdefs.h"
2990
2991 int main() {
2992 return __MINGW32__;
2993 ; return 0; }
2994 EOF
2995 if { (eval echo configure:2996: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2996   rm -rf conftest*
2997   ac_cv_mingw32=yes
2998 else
2999   echo "configure: failed program was:" >&5
3000   cat conftest.$ac_ext >&5
3001   rm -rf conftest*
3002   ac_cv_mingw32=no
3003 fi
3004 rm -f conftest*
3005 fi
3006
3007 echo "$ac_t""$ac_cv_mingw32" 1>&6
3008 MINGW32=
3009 test "$ac_cv_mingw32" = yes && MINGW32=yes
3010 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3011 echo "configure:3012: checking for EMX OS/2 environment" >&5
3012 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3013   echo $ac_n "(cached) $ac_c" 1>&6
3014 else
3015   cat > conftest.$ac_ext <<EOF
3016 #line 3017 "configure"
3017 #include "confdefs.h"
3018
3019 int main() {
3020 return __EMX__;
3021 ; return 0; }
3022 EOF
3023 if { (eval echo configure:3024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3024   rm -rf conftest*
3025   ac_cv_emxos2=yes
3026 else
3027   echo "configure: failed program was:" >&5
3028   cat conftest.$ac_ext >&5
3029   rm -rf conftest*
3030   ac_cv_emxos2=no
3031 fi
3032 rm -f conftest*
3033 fi
3034
3035 echo "$ac_t""$ac_cv_emxos2" 1>&6
3036 EMXOS2=
3037 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3038 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3039 echo "configure:3040: checking how to run the C preprocessor" >&5
3040 # On Suns, sometimes $CPP names a directory.
3041 if test -n "$CPP" && test -d "$CPP"; then
3042   CPP=
3043 fi
3044 if test -z "$CPP"; then
3045 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3046   echo $ac_n "(cached) $ac_c" 1>&6
3047 else
3048     # This must be in double quotes, not single quotes, because CPP may get
3049   # substituted into the Makefile and "${CC-cc}" will confuse make.
3050   CPP="${CC-cc} -E"
3051   # On the NeXT, cc -E runs the code through the compiler's parser,
3052   # not just through cpp.
3053   cat > conftest.$ac_ext <<EOF
3054 #line 3055 "configure"
3055 #include "confdefs.h"
3056 #include <assert.h>
3057 Syntax Error
3058 EOF
3059 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3060 { (eval echo configure:3061: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3061 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3062 if test -z "$ac_err"; then
3063   :
3064 else
3065   echo "$ac_err" >&5
3066   echo "configure: failed program was:" >&5
3067   cat conftest.$ac_ext >&5
3068   rm -rf conftest*
3069   CPP="${CC-cc} -E -traditional-cpp"
3070   cat > conftest.$ac_ext <<EOF
3071 #line 3072 "configure"
3072 #include "confdefs.h"
3073 #include <assert.h>
3074 Syntax Error
3075 EOF
3076 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3077 { (eval echo configure:3078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3078 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3079 if test -z "$ac_err"; then
3080   :
3081 else
3082   echo "$ac_err" >&5
3083   echo "configure: failed program was:" >&5
3084   cat conftest.$ac_ext >&5
3085   rm -rf conftest*
3086   CPP="${CC-cc} -nologo -E"
3087   cat > conftest.$ac_ext <<EOF
3088 #line 3089 "configure"
3089 #include "confdefs.h"
3090 #include <assert.h>
3091 Syntax Error
3092 EOF
3093 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3094 { (eval echo configure:3095: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3095 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3096 if test -z "$ac_err"; then
3097   :
3098 else
3099   echo "$ac_err" >&5
3100   echo "configure: failed program was:" >&5
3101   cat conftest.$ac_ext >&5
3102   rm -rf conftest*
3103   CPP=/lib/cpp
3104 fi
3105 rm -f conftest*
3106 fi
3107 rm -f conftest*
3108 fi
3109 rm -f conftest*
3110   ac_cv_prog_CPP="$CPP"
3111 fi
3112   CPP="$ac_cv_prog_CPP"
3113 else
3114   ac_cv_prog_CPP="$CPP"
3115 fi
3116 echo "$ac_t""$CPP" 1>&6
3117
3118 # Check whether --enable-fast-install or --disable-fast-install was given.
3119 if test "${enable_fast_install+set}" = set; then
3120   enableval="$enable_fast_install"
3121   p=${PACKAGE-default}
3122 case $enableval in
3123 yes) enable_fast_install=yes ;;
3124 no) enable_fast_install=no ;;
3125 *)
3126   enable_fast_install=no
3127   # Look at the argument we got.  We use all the common list separators.
3128   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3129   for pkg in $enableval; do
3130     if test "X$pkg" = "X$p"; then
3131       enable_fast_install=yes
3132     fi
3133   done
3134   IFS="$ac_save_ifs"
3135   ;;
3136 esac
3137 else
3138   enable_fast_install=yes
3139 fi
3140
3141 # Extract the first word of "gcc", so it can be a program name with args.
3142 set dummy gcc; ac_word=$2
3143 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3144 echo "configure:3145: checking for $ac_word" >&5
3145 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3146   echo $ac_n "(cached) $ac_c" 1>&6
3147 else
3148   if test -n "$CC"; then
3149   ac_cv_prog_CC="$CC" # Let the user override the test.
3150 else
3151   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3152   ac_dummy="$PATH"
3153   for ac_dir in $ac_dummy; do
3154     test -z "$ac_dir" && ac_dir=.
3155     if test -f $ac_dir/$ac_word; then
3156       ac_cv_prog_CC="gcc"
3157       break
3158     fi
3159   done
3160   IFS="$ac_save_ifs"
3161 fi
3162 fi
3163 CC="$ac_cv_prog_CC"
3164 if test -n "$CC"; then
3165   echo "$ac_t""$CC" 1>&6
3166 else
3167   echo "$ac_t""no" 1>&6
3168 fi
3169
3170 if test -z "$CC"; then
3171   # Extract the first word of "cc", so it can be a program name with args.
3172 set dummy cc; ac_word=$2
3173 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3174 echo "configure:3175: checking for $ac_word" >&5
3175 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3176   echo $ac_n "(cached) $ac_c" 1>&6
3177 else
3178   if test -n "$CC"; then
3179   ac_cv_prog_CC="$CC" # Let the user override the test.
3180 else
3181   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3182   ac_prog_rejected=no
3183   ac_dummy="$PATH"
3184   for ac_dir in $ac_dummy; do
3185     test -z "$ac_dir" && ac_dir=.
3186     if test -f $ac_dir/$ac_word; then
3187       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3188         ac_prog_rejected=yes
3189         continue
3190       fi
3191       ac_cv_prog_CC="cc"
3192       break
3193     fi
3194   done
3195   IFS="$ac_save_ifs"
3196 if test $ac_prog_rejected = yes; then
3197   # We found a bogon in the path, so make sure we never use it.
3198   set dummy $ac_cv_prog_CC
3199   shift
3200   if test $# -gt 0; then
3201     # We chose a different compiler from the bogus one.
3202     # However, it has the same basename, so the bogon will be chosen
3203     # first if we set CC to just the basename; use the full file name.
3204     shift
3205     set dummy "$ac_dir/$ac_word" "$@"
3206     shift
3207     ac_cv_prog_CC="$@"
3208   fi
3209 fi
3210 fi
3211 fi
3212 CC="$ac_cv_prog_CC"
3213 if test -n "$CC"; then
3214   echo "$ac_t""$CC" 1>&6
3215 else
3216   echo "$ac_t""no" 1>&6
3217 fi
3218
3219   if test -z "$CC"; then
3220     case "`uname -s`" in
3221     *win32* | *WIN32* | *CYGWIN*)
3222       # Extract the first word of "cl", so it can be a program name with args.
3223 set dummy cl; ac_word=$2
3224 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3225 echo "configure:3226: checking for $ac_word" >&5
3226 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3227   echo $ac_n "(cached) $ac_c" 1>&6
3228 else
3229   if test -n "$CC"; then
3230   ac_cv_prog_CC="$CC" # Let the user override the test.
3231 else
3232   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3233   ac_dummy="$PATH"
3234   for ac_dir in $ac_dummy; do
3235     test -z "$ac_dir" && ac_dir=.
3236     if test -f $ac_dir/$ac_word; then
3237       ac_cv_prog_CC="cl"
3238       break
3239     fi
3240   done
3241   IFS="$ac_save_ifs"
3242 fi
3243 fi
3244 CC="$ac_cv_prog_CC"
3245 if test -n "$CC"; then
3246   echo "$ac_t""$CC" 1>&6
3247 else
3248   echo "$ac_t""no" 1>&6
3249 fi
3250  ;;
3251     esac
3252   fi
3253   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3254 fi
3255
3256 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3257 echo "configure:3258: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3258
3259 ac_ext=c
3260 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3261 ac_cpp='$CPP $CPPFLAGS'
3262 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3263 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3264 cross_compiling=$ac_cv_prog_cc_cross
3265
3266 cat > conftest.$ac_ext << EOF
3267
3268 #line 3269 "configure"
3269 #include "confdefs.h"
3270
3271 main(){return(0);}
3272 EOF
3273 if { (eval echo configure:3274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3274   ac_cv_prog_cc_works=yes
3275   # If we can't run a trivial program, we are probably using a cross compiler.
3276   if (./conftest; exit) 2>/dev/null; then
3277     ac_cv_prog_cc_cross=no
3278   else
3279     ac_cv_prog_cc_cross=yes
3280   fi
3281 else
3282   echo "configure: failed program was:" >&5
3283   cat conftest.$ac_ext >&5
3284   ac_cv_prog_cc_works=no
3285 fi
3286 rm -fr conftest*
3287 ac_ext=c
3288 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3289 ac_cpp='$CPP $CPPFLAGS'
3290 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3291 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3292 cross_compiling=$ac_cv_prog_cc_cross
3293
3294 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3295 if test $ac_cv_prog_cc_works = no; then
3296   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3297 fi
3298 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3299 echo "configure:3300: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3300 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3301 cross_compiling=$ac_cv_prog_cc_cross
3302
3303 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3304 echo "configure:3305: checking whether we are using GNU C" >&5
3305 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3306   echo $ac_n "(cached) $ac_c" 1>&6
3307 else
3308   cat > conftest.c <<EOF
3309 #ifdef __GNUC__
3310   yes;
3311 #endif
3312 EOF
3313 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3314: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3314   ac_cv_prog_gcc=yes
3315 else
3316   ac_cv_prog_gcc=no
3317 fi
3318 fi
3319
3320 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3321
3322 if test $ac_cv_prog_gcc = yes; then
3323   GCC=yes
3324 else
3325   GCC=
3326 fi
3327
3328 ac_test_CFLAGS="${CFLAGS+set}"
3329 ac_save_CFLAGS="$CFLAGS"
3330 CFLAGS=
3331 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3332 echo "configure:3333: checking whether ${CC-cc} accepts -g" >&5
3333 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3334   echo $ac_n "(cached) $ac_c" 1>&6
3335 else
3336   echo 'void f(){}' > conftest.c
3337 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3338   ac_cv_prog_cc_g=yes
3339 else
3340   ac_cv_prog_cc_g=no
3341 fi
3342 rm -f conftest*
3343
3344 fi
3345
3346 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3347 if test "$ac_test_CFLAGS" = set; then
3348   CFLAGS="$ac_save_CFLAGS"
3349 elif test $ac_cv_prog_cc_g = yes; then
3350   if test "$GCC" = yes; then
3351     CFLAGS="-g -O2"
3352   else
3353     CFLAGS="-g"
3354   fi
3355 else
3356   if test "$GCC" = yes; then
3357     CFLAGS="-O2"
3358   else
3359     CFLAGS=
3360   fi
3361 fi
3362
3363 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3364 if test "${with_gnu_ld+set}" = set; then
3365   withval="$with_gnu_ld"
3366   test "$withval" = no || with_gnu_ld=yes
3367 else
3368   with_gnu_ld=no
3369 fi
3370
3371 ac_prog=ld
3372 if test "$GCC" = yes; then
3373   # Check if gcc -print-prog-name=ld gives a path.
3374   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3375 echo "configure:3376: checking for ld used by GCC" >&5
3376   case $host in
3377   *-*-mingw*)
3378     # gcc leaves a trailing carriage return which upsets mingw
3379     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3380   *)
3381     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3382   esac
3383   case $ac_prog in
3384     # Accept absolute paths.
3385     [\\/]* | [A-Za-z]:[\\/]*)
3386       re_direlt='/[^/][^/]*/\.\./'
3387       # Canonicalize the path of ld
3388       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3389       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3390         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3391       done
3392       test -z "$LD" && LD="$ac_prog"
3393       ;;
3394   "")
3395     # If it fails, then pretend we aren't using GCC.
3396     ac_prog=ld
3397     ;;
3398   *)
3399     # If it is relative, then search for the first ld in PATH.
3400     with_gnu_ld=unknown
3401     ;;
3402   esac
3403 elif test "$with_gnu_ld" = yes; then
3404   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3405 echo "configure:3406: checking for GNU ld" >&5
3406 else
3407   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3408 echo "configure:3409: checking for non-GNU ld" >&5
3409 fi
3410 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3411   echo $ac_n "(cached) $ac_c" 1>&6
3412 else
3413   if test -z "$LD"; then
3414   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3415   for ac_dir in $PATH; do
3416     test -z "$ac_dir" && ac_dir=.
3417     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3418       lt_cv_path_LD="$ac_dir/$ac_prog"
3419       # Check to see if the program is GNU ld.  I'd rather use --version,
3420       # but apparently some GNU ld's only accept -v.
3421       # Break only if it was the GNU/non-GNU ld that we prefer.
3422       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3423         test "$with_gnu_ld" != no && break
3424       else
3425         test "$with_gnu_ld" != yes && break
3426       fi
3427     fi
3428   done
3429   IFS="$ac_save_ifs"
3430 else
3431   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3432 fi
3433 fi
3434
3435 LD="$lt_cv_path_LD"
3436 if test -n "$LD"; then
3437   echo "$ac_t""$LD" 1>&6
3438 else
3439   echo "$ac_t""no" 1>&6
3440 fi
3441 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3442 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3443 echo "configure:3444: checking if the linker ($LD) is GNU ld" >&5
3444 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3445   echo $ac_n "(cached) $ac_c" 1>&6
3446 else
3447   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3448 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3449   lt_cv_prog_gnu_ld=yes
3450 else
3451   lt_cv_prog_gnu_ld=no
3452 fi
3453 fi
3454
3455 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3456 with_gnu_ld=$lt_cv_prog_gnu_ld
3457
3458
3459 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3460 echo "configure:3461: checking for $LD option to reload object files" >&5
3461 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3462   echo $ac_n "(cached) $ac_c" 1>&6
3463 else
3464   lt_cv_ld_reload_flag='-r'
3465 fi
3466
3467 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3468 reload_flag=$lt_cv_ld_reload_flag
3469 test -n "$reload_flag" && reload_flag=" $reload_flag"
3470
3471 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3472 echo "configure:3473: checking for BSD-compatible nm" >&5
3473 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3474   echo $ac_n "(cached) $ac_c" 1>&6
3475 else
3476   if test -n "$NM"; then
3477   # Let the user override the test.
3478   lt_cv_path_NM="$NM"
3479 else
3480   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3481   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3482     test -z "$ac_dir" && ac_dir=.
3483     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3484     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3485       # Check to see if the nm accepts a BSD-compat flag.
3486       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3487       #   nm: unknown option "B" ignored
3488       # Tru64's nm complains that /dev/null is an invalid object file
3489       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3490         lt_cv_path_NM="$tmp_nm -B"
3491         break
3492       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3493         lt_cv_path_NM="$tmp_nm -p"
3494         break
3495       else
3496         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3497         continue # so that we can try to find one that supports BSD flags
3498       fi
3499     fi
3500   done
3501   IFS="$ac_save_ifs"
3502   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3503 fi
3504 fi
3505
3506 NM="$lt_cv_path_NM"
3507 echo "$ac_t""$NM" 1>&6
3508
3509 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3510 echo "configure:3511: checking for a sed that does not truncate output" >&5
3511 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3512   echo $ac_n "(cached) $ac_c" 1>&6
3513 else
3514   # Loop through the user's path and test for sed and gsed.
3515 # Then use that list of sed's as ones to test for truncation.
3516 as_executable_p="test -f"
3517 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3518 for as_dir in $PATH
3519 do
3520   IFS=$as_save_IFS
3521   test -z "$as_dir" && as_dir=.
3522   for ac_prog in sed gsed; do
3523     for ac_exec_ext in '' $ac_executable_extensions; do
3524       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3525         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3526       fi
3527     done
3528   done
3529 done
3530
3531   # Create a temporary directory, and hook for its removal unless debugging.
3532 $debug ||
3533 {
3534   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3535   trap '{ (exit 1); exit 1; }' 1 2 13 15
3536 }
3537
3538 # Create a (secure) tmp directory for tmp files.
3539 : ${TMPDIR=/tmp}
3540 {
3541   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3542   test -n "$tmp" && test -d "$tmp"
3543 }  ||
3544 {
3545   tmp=$TMPDIR/sed$$-$RANDOM
3546   (umask 077 && mkdir $tmp)
3547 } ||
3548 {
3549    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3550    { (exit 1); exit 1; }
3551 }
3552   _max=0
3553   _count=0
3554   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3555   # along with /bin/sed that truncates output.
3556   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3557     test ! -f ${_sed} && break
3558     cat /dev/null > "$tmp/sed.in"
3559     _count=0
3560     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3561     # Check for GNU sed and select it if it is found.
3562     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3563       lt_cv_path_SED=${_sed}
3564       break
3565     fi
3566     while true; do
3567       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3568       mv "$tmp/sed.tmp" "$tmp/sed.in"
3569       cp "$tmp/sed.in" "$tmp/sed.nl"
3570       echo >>"$tmp/sed.nl"
3571       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3572       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3573       # 40000 chars as input seems more than enough
3574       test $_count -gt 10 && break
3575       _count=`expr $_count + 1`
3576       if test $_count -gt $_max; then
3577         _max=$_count
3578         lt_cv_path_SED=$_sed
3579       fi
3580     done
3581   done
3582   rm -rf "$tmp"
3583
3584 fi
3585
3586 if test "X$SED" != "X"; then
3587   lt_cv_path_SED=$SED
3588 else
3589   SED=$lt_cv_path_SED
3590 fi
3591 echo "$ac_t""$SED" 1>&6
3592
3593 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3594 echo "configure:3595: checking whether ln -s works" >&5
3595 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3596   echo $ac_n "(cached) $ac_c" 1>&6
3597 else
3598   rm -f conftestdata
3599 if ln -s X conftestdata 2>/dev/null
3600 then
3601   rm -f conftestdata
3602   ac_cv_prog_LN_S="ln -s"
3603 else
3604   ac_cv_prog_LN_S=ln
3605 fi
3606 fi
3607 LN_S="$ac_cv_prog_LN_S"
3608 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3609   echo "$ac_t""yes" 1>&6
3610 else
3611   echo "$ac_t""no" 1>&6
3612 fi
3613
3614 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3615 echo "configure:3616: checking how to recognise dependent libraries" >&5
3616 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3617   echo $ac_n "(cached) $ac_c" 1>&6
3618 else
3619   lt_cv_file_magic_cmd='$MAGIC_CMD'
3620 lt_cv_file_magic_test_file=
3621 lt_cv_deplibs_check_method='unknown'
3622 # Need to set the preceding variable on all platforms that support
3623 # interlibrary dependencies.
3624 # 'none' -- dependencies not supported.
3625 # `unknown' -- same as none, but documents that we really don't know.
3626 # 'pass_all' -- all dependencies passed with no checks.
3627 # 'test_compile' -- check by making test program.
3628 # 'file_magic [[regex]]' -- check by looking for files in library path
3629 # which responds to the $file_magic_cmd with a given egrep regex.
3630 # If you have `file' or equivalent on your system and you're not sure
3631 # whether `pass_all' will *always* work, you probably want this one.
3632
3633 case $host_os in
3634 aix4* | aix5*)
3635   lt_cv_deplibs_check_method=pass_all
3636   ;;
3637
3638 beos*)
3639   lt_cv_deplibs_check_method=pass_all
3640   ;;
3641
3642 bsdi4*)
3643   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3644   lt_cv_file_magic_cmd='/usr/bin/file -L'
3645   lt_cv_file_magic_test_file=/shlib/libc.so
3646   ;;
3647
3648 cygwin* | mingw* | pw32*)
3649   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3650   lt_cv_file_magic_cmd='$OBJDUMP -f'
3651   ;;
3652
3653 darwin* | rhapsody*)
3654   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3655   lt_cv_file_magic_cmd='/usr/bin/file -L'
3656   case "$host_os" in
3657   rhapsody* | darwin1.[012])
3658     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3659     ;;
3660   *) # Darwin 1.3 on
3661     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3662     ;;
3663   esac
3664   ;;
3665
3666 freebsd*)
3667   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3668     case $host_cpu in
3669     i*86 )
3670       # Not sure whether the presence of OpenBSD here was a mistake.
3671       # Let's accept both of them until this is cleared up.
3672       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3673       lt_cv_file_magic_cmd=/usr/bin/file
3674       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3675       ;;
3676     esac
3677   else
3678     lt_cv_deplibs_check_method=pass_all
3679   fi
3680   ;;
3681
3682 gnu*)
3683   lt_cv_deplibs_check_method=pass_all
3684   ;;
3685
3686 hpux10.20*|hpux11*)
3687   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3688   lt_cv_file_magic_cmd=/usr/bin/file
3689   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3690   ;;
3691
3692 irix5* | irix6* | nonstopux*)
3693   case $host_os in
3694   irix5* | nonstopux*)
3695     # this will be overridden with pass_all, but let us keep it just in case
3696     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3697     ;;
3698   *)
3699     case $LD in
3700     *-32|*"-32 ") libmagic=32-bit;;
3701     *-n32|*"-n32 ") libmagic=N32;;
3702     *-64|*"-64 ") libmagic=64-bit;;
3703     *) libmagic=never-match;;
3704     esac
3705     # this will be overridden with pass_all, but let us keep it just in case
3706     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3707     ;;
3708   esac
3709   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3710   lt_cv_deplibs_check_method=pass_all
3711   ;;
3712
3713 # This must be Linux ELF.
3714 linux-gnu*)
3715   case $host_cpu in
3716   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3717     lt_cv_deplibs_check_method=pass_all ;;
3718   *)
3719     # glibc up to 2.1.1 does not perform some relocations on ARM
3720     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3721   esac
3722   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3723   ;;
3724
3725 netbsd*)
3726   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3727     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3728   else
3729     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3730   fi
3731   ;;
3732
3733 newos6*)
3734   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3735   lt_cv_file_magic_cmd=/usr/bin/file
3736   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3737   ;;
3738
3739 openbsd*)
3740   lt_cv_file_magic_cmd=/usr/bin/file
3741   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3742   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3743     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3744   else
3745     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3746   fi
3747   ;;
3748
3749 openedition*)
3750   lt_cv_deplibs_check_method=pass_all
3751   ;;
3752
3753 osf3* | osf4* | osf5*)
3754   # this will be overridden with pass_all, but let us keep it just in case
3755   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3756   lt_cv_file_magic_test_file=/shlib/libc.so
3757   lt_cv_deplibs_check_method=pass_all
3758   ;;
3759
3760 sco3.2v5*)
3761   lt_cv_deplibs_check_method=pass_all
3762   ;;
3763
3764 solaris*)
3765   lt_cv_deplibs_check_method=pass_all
3766   lt_cv_file_magic_test_file=/lib/libc.so
3767   ;;
3768
3769 sysv5uw[78]* | sysv4*uw2*)
3770   lt_cv_deplibs_check_method=pass_all
3771   ;;
3772
3773 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3774   case $host_vendor in
3775   motorola)
3776     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]'
3777     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3778     ;;
3779   ncr)
3780     lt_cv_deplibs_check_method=pass_all
3781     ;;
3782   sequent)
3783     lt_cv_file_magic_cmd='/bin/file'
3784     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3785     ;;
3786   sni)
3787     lt_cv_file_magic_cmd='/bin/file'
3788     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3789     lt_cv_file_magic_test_file=/lib/libc.so
3790     ;;
3791   siemens)
3792     lt_cv_deplibs_check_method=pass_all
3793     ;;
3794   esac
3795   ;;
3796 esac
3797
3798 fi
3799
3800 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3801 file_magic_cmd=$lt_cv_file_magic_cmd
3802 deplibs_check_method=$lt_cv_deplibs_check_method
3803
3804 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3805 echo "configure:3806: checking for object suffix" >&5
3806 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3807   echo $ac_n "(cached) $ac_c" 1>&6
3808 else
3809   rm -f conftest*
3810 echo 'int i = 1;' > conftest.$ac_ext
3811 if { (eval echo configure:3812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3812   for ac_file in conftest.*; do
3813     case $ac_file in
3814     *.c) ;;
3815     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3816     esac
3817   done
3818 else
3819   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3820 fi
3821 rm -f conftest*
3822 fi
3823
3824 echo "$ac_t""$ac_cv_objext" 1>&6
3825 OBJEXT=$ac_cv_objext
3826 ac_objext=$ac_cv_objext
3827
3828
3829
3830
3831 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3832 echo "configure:3833: checking for executable suffix" >&5
3833 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3834   echo $ac_n "(cached) $ac_c" 1>&6
3835 else
3836   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3837   ac_cv_exeext=.exe
3838 else
3839   rm -f conftest*
3840   echo 'int main () { return 0; }' > conftest.$ac_ext
3841   ac_cv_exeext=
3842   if { (eval echo configure:3843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3843     for file in conftest.*; do
3844       case $file in
3845       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3846       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3847       esac
3848     done
3849   else
3850     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3851   fi
3852   rm -f conftest*
3853   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3854 fi
3855 fi
3856
3857 EXEEXT=""
3858 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3859 echo "$ac_t""${ac_cv_exeext}" 1>&6
3860 ac_exeext=$EXEEXT
3861
3862 if test $host != $build; then
3863   ac_tool_prefix=${host_alias}-
3864 else
3865   ac_tool_prefix=
3866 fi
3867
3868
3869
3870
3871 # Check for command to grab the raw symbol name followed by C symbol from nm.
3872 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3873 echo "configure:3874: checking command to parse $NM output" >&5
3874 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3875   echo $ac_n "(cached) $ac_c" 1>&6
3876 else
3877   
3878 # These are sane defaults that work on at least a few old systems.
3879 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3880
3881 # Character class describing NM global symbol codes.
3882 symcode='[BCDEGRST]'
3883
3884 # Regexp to match symbols that can be accessed directly from C.
3885 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3886
3887 # Transform the above into a raw symbol and a C symbol.
3888 symxfrm='\1 \2\3 \3'
3889
3890 # Transform an extracted symbol line into a proper C declaration
3891 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3892
3893 # Transform an extracted symbol line into symbol name and symbol address
3894 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'"
3895
3896 # Define system-specific variables.
3897 case $host_os in
3898 aix*)
3899   symcode='[BCDT]'
3900   ;;
3901 cygwin* | mingw* | pw32*)
3902   symcode='[ABCDGISTW]'
3903   ;;
3904 hpux*) # Its linker distinguishes data from code symbols
3905   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3906   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'"
3907   ;;
3908 irix* | nonstopux*)
3909   symcode='[BCDEGRST]'
3910   ;;
3911 osf*)
3912   symcode='[BCDEGQRST]'
3913   ;;
3914 solaris* | sysv5*)
3915   symcode='[BDT]'
3916   ;;
3917 sysv4)
3918   symcode='[DFNSTU]'
3919   ;;
3920 esac
3921
3922 # Handle CRLF in mingw tool chain
3923 opt_cr=
3924 case $host_os in
3925 mingw*)
3926   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3927   ;;
3928 esac
3929
3930 # If we're using GNU nm, then use its standard symbol codes.
3931 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3932   symcode='[ABCDGISTW]'
3933 fi
3934
3935 # Try without a prefix undercore, then with it.
3936 for ac_symprfx in "" "_"; do
3937
3938   # Write the raw and C identifiers.
3939 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3940
3941   # Check to see that the pipe works correctly.
3942   pipe_works=no
3943   rm -f conftest*
3944   cat > conftest.$ac_ext <<EOF
3945 #ifdef __cplusplus
3946 extern "C" {
3947 #endif
3948 char nm_test_var;
3949 void nm_test_func(){}
3950 #ifdef __cplusplus
3951 }
3952 #endif
3953 int main(){nm_test_var='a';nm_test_func();return(0);}
3954 EOF
3955
3956   if { (eval echo configure:3957: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3957     # Now try to grab the symbols.
3958     nlist=conftest.nm
3959     if { (eval echo configure:3960: \"$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
3960       # Try sorting and uniquifying the output.
3961       if sort "$nlist" | uniq > "$nlist"T; then
3962         mv -f "$nlist"T "$nlist"
3963       else
3964         rm -f "$nlist"T
3965       fi
3966
3967       # Make sure that we snagged all the symbols we need.
3968       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3969         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3970           cat <<EOF > conftest.$ac_ext
3971 #ifdef __cplusplus
3972 extern "C" {
3973 #endif
3974
3975 EOF
3976           # Now generate the symbol file.
3977           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
3978
3979           cat <<EOF >> conftest.$ac_ext
3980 #if defined (__STDC__) && __STDC__
3981 # define lt_ptr void *
3982 #else
3983 # define lt_ptr char *
3984 # define const
3985 #endif
3986
3987 /* The mapping between symbol names and symbols. */
3988 const struct {
3989   const char *name;
3990   lt_ptr address;
3991 }
3992 lt_preloaded_symbols[] =
3993 {
3994 EOF
3995           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
3996           cat <<\EOF >> conftest.$ac_ext
3997   {0, (lt_ptr) 0}
3998 };
3999
4000 #ifdef __cplusplus
4001 }
4002 #endif
4003 EOF
4004           # Now try linking the two files.
4005           mv conftest.$ac_objext conftstm.$ac_objext
4006           save_LIBS="$LIBS"
4007           save_CFLAGS="$CFLAGS"
4008           LIBS="conftstm.$ac_objext"
4009           CFLAGS="$CFLAGS$no_builtin_flag"
4010           if { (eval echo configure:4011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4011             pipe_works=yes
4012           fi
4013           LIBS="$save_LIBS"
4014           CFLAGS="$save_CFLAGS"
4015         else
4016           echo "cannot find nm_test_func in $nlist" >&5
4017         fi
4018       else
4019         echo "cannot find nm_test_var in $nlist" >&5
4020       fi
4021     else
4022       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4023     fi
4024   else
4025     echo "$progname: failed program was:" >&5
4026     cat conftest.$ac_ext >&5
4027   fi
4028   rm -f conftest* conftst*
4029
4030   # Do not use the global_symbol_pipe unless it works.
4031   if test "$pipe_works" = yes; then
4032     break
4033   else
4034     lt_cv_sys_global_symbol_pipe=
4035   fi
4036 done
4037
4038 fi
4039
4040 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4041 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4042   global_symbol_to_cdecl=
4043   global_symbol_to_c_name_address=
4044 else
4045   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4046   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4047 fi
4048 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4049 then
4050   echo "$ac_t""failed" 1>&6
4051 else
4052   echo "$ac_t""ok" 1>&6
4053 fi
4054
4055 for ac_hdr in dlfcn.h
4056 do
4057 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4058 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4059 echo "configure:4060: checking for $ac_hdr" >&5
4060 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4061   echo $ac_n "(cached) $ac_c" 1>&6
4062 else
4063   cat > conftest.$ac_ext <<EOF
4064 #line 4065 "configure"
4065 #include "confdefs.h"
4066 #include <$ac_hdr>
4067 EOF
4068 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4069 { (eval echo configure:4070: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4070 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4071 if test -z "$ac_err"; then
4072   rm -rf conftest*
4073   eval "ac_cv_header_$ac_safe=yes"
4074 else
4075   echo "$ac_err" >&5
4076   echo "configure: failed program was:" >&5
4077   cat conftest.$ac_ext >&5
4078   rm -rf conftest*
4079   eval "ac_cv_header_$ac_safe=no"
4080 fi
4081 rm -f conftest*
4082 fi
4083 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4084   echo "$ac_t""yes" 1>&6
4085     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4086   cat >> confdefs.h <<EOF
4087 #define $ac_tr_hdr 1
4088 EOF
4089  
4090 else
4091   echo "$ac_t""no" 1>&6
4092 fi
4093 done
4094
4095
4096
4097
4098
4099
4100 # Only perform the check for file, if the check method requires it
4101 case $deplibs_check_method in
4102 file_magic*)
4103   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4104     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4105 echo "configure:4106: checking for ${ac_tool_prefix}file" >&5
4106 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4107   echo $ac_n "(cached) $ac_c" 1>&6
4108 else
4109   case $MAGIC_CMD in
4110   /*)
4111   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4112   ;;
4113   ?:/*)
4114   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4115   ;;
4116   *)
4117   ac_save_MAGIC_CMD="$MAGIC_CMD"
4118   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4119   ac_dummy="/usr/bin:$PATH"
4120   for ac_dir in $ac_dummy; do
4121     test -z "$ac_dir" && ac_dir=.
4122     if test -f $ac_dir/${ac_tool_prefix}file; then
4123       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4124       if test -n "$file_magic_test_file"; then
4125         case $deplibs_check_method in
4126         "file_magic "*)
4127           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4128           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4129           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4130             egrep "$file_magic_regex" > /dev/null; then
4131             :
4132           else
4133             cat <<EOF 1>&2
4134
4135 *** Warning: the command libtool uses to detect shared libraries,
4136 *** $file_magic_cmd, produces output that libtool cannot recognize.
4137 *** The result is that libtool may fail to recognize shared libraries
4138 *** as such.  This will affect the creation of libtool libraries that
4139 *** depend on shared libraries, but programs linked with such libtool
4140 *** libraries will work regardless of this problem.  Nevertheless, you
4141 *** may want to report the problem to your system manager and/or to
4142 *** bug-libtool@gnu.org
4143
4144 EOF
4145           fi ;;
4146         esac
4147       fi
4148       break
4149     fi
4150   done
4151   IFS="$ac_save_ifs"
4152   MAGIC_CMD="$ac_save_MAGIC_CMD"
4153   ;;
4154 esac
4155 fi
4156
4157 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4158 if test -n "$MAGIC_CMD"; then
4159   echo "$ac_t""$MAGIC_CMD" 1>&6
4160 else
4161   echo "$ac_t""no" 1>&6
4162 fi
4163
4164 if test -z "$lt_cv_path_MAGIC_CMD"; then
4165   if test -n "$ac_tool_prefix"; then
4166     echo $ac_n "checking for file""... $ac_c" 1>&6
4167 echo "configure:4168: checking for file" >&5
4168 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4169   echo $ac_n "(cached) $ac_c" 1>&6
4170 else
4171   case $MAGIC_CMD in
4172   /*)
4173   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4174   ;;
4175   ?:/*)
4176   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4177   ;;
4178   *)
4179   ac_save_MAGIC_CMD="$MAGIC_CMD"
4180   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4181   ac_dummy="/usr/bin:$PATH"
4182   for ac_dir in $ac_dummy; do
4183     test -z "$ac_dir" && ac_dir=.
4184     if test -f $ac_dir/file; then
4185       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4186       if test -n "$file_magic_test_file"; then
4187         case $deplibs_check_method in
4188         "file_magic "*)
4189           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4190           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4191           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4192             egrep "$file_magic_regex" > /dev/null; then
4193             :
4194           else
4195             cat <<EOF 1>&2
4196
4197 *** Warning: the command libtool uses to detect shared libraries,
4198 *** $file_magic_cmd, produces output that libtool cannot recognize.
4199 *** The result is that libtool may fail to recognize shared libraries
4200 *** as such.  This will affect the creation of libtool libraries that
4201 *** depend on shared libraries, but programs linked with such libtool
4202 *** libraries will work regardless of this problem.  Nevertheless, you
4203 *** may want to report the problem to your system manager and/or to
4204 *** bug-libtool@gnu.org
4205
4206 EOF
4207           fi ;;
4208         esac
4209       fi
4210       break
4211     fi
4212   done
4213   IFS="$ac_save_ifs"
4214   MAGIC_CMD="$ac_save_MAGIC_CMD"
4215   ;;
4216 esac
4217 fi
4218
4219 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4220 if test -n "$MAGIC_CMD"; then
4221   echo "$ac_t""$MAGIC_CMD" 1>&6
4222 else
4223   echo "$ac_t""no" 1>&6
4224 fi
4225
4226   else
4227     MAGIC_CMD=:
4228   fi
4229 fi
4230
4231   fi
4232   ;;
4233 esac
4234
4235 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4236 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4237 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4238 echo "configure:4239: checking for $ac_word" >&5
4239 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4240   echo $ac_n "(cached) $ac_c" 1>&6
4241 else
4242   if test -n "$RANLIB"; then
4243   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4244 else
4245   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4246   ac_dummy="$PATH"
4247   for ac_dir in $ac_dummy; do
4248     test -z "$ac_dir" && ac_dir=.
4249     if test -f $ac_dir/$ac_word; then
4250       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4251       break
4252     fi
4253   done
4254   IFS="$ac_save_ifs"
4255 fi
4256 fi
4257 RANLIB="$ac_cv_prog_RANLIB"
4258 if test -n "$RANLIB"; then
4259   echo "$ac_t""$RANLIB" 1>&6
4260 else
4261   echo "$ac_t""no" 1>&6
4262 fi
4263
4264
4265 if test -z "$ac_cv_prog_RANLIB"; then
4266 if test -n "$ac_tool_prefix"; then
4267   # Extract the first word of "ranlib", so it can be a program name with args.
4268 set dummy ranlib; ac_word=$2
4269 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4270 echo "configure:4271: checking for $ac_word" >&5
4271 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4272   echo $ac_n "(cached) $ac_c" 1>&6
4273 else
4274   if test -n "$RANLIB"; then
4275   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4276 else
4277   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4278   ac_dummy="$PATH"
4279   for ac_dir in $ac_dummy; do
4280     test -z "$ac_dir" && ac_dir=.
4281     if test -f $ac_dir/$ac_word; then
4282       ac_cv_prog_RANLIB="ranlib"
4283       break
4284     fi
4285   done
4286   IFS="$ac_save_ifs"
4287   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4288 fi
4289 fi
4290 RANLIB="$ac_cv_prog_RANLIB"
4291 if test -n "$RANLIB"; then
4292   echo "$ac_t""$RANLIB" 1>&6
4293 else
4294   echo "$ac_t""no" 1>&6
4295 fi
4296
4297 else
4298   RANLIB=":"
4299 fi
4300 fi
4301
4302 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4303 set dummy ${ac_tool_prefix}strip; ac_word=$2
4304 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4305 echo "configure:4306: checking for $ac_word" >&5
4306 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4307   echo $ac_n "(cached) $ac_c" 1>&6
4308 else
4309   if test -n "$STRIP"; then
4310   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4311 else
4312   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4313   ac_dummy="$PATH"
4314   for ac_dir in $ac_dummy; do
4315     test -z "$ac_dir" && ac_dir=.
4316     if test -f $ac_dir/$ac_word; then
4317       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4318       break
4319     fi
4320   done
4321   IFS="$ac_save_ifs"
4322 fi
4323 fi
4324 STRIP="$ac_cv_prog_STRIP"
4325 if test -n "$STRIP"; then
4326   echo "$ac_t""$STRIP" 1>&6
4327 else
4328   echo "$ac_t""no" 1>&6
4329 fi
4330
4331
4332 if test -z "$ac_cv_prog_STRIP"; then
4333 if test -n "$ac_tool_prefix"; then
4334   # Extract the first word of "strip", so it can be a program name with args.
4335 set dummy strip; ac_word=$2
4336 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4337 echo "configure:4338: checking for $ac_word" >&5
4338 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4339   echo $ac_n "(cached) $ac_c" 1>&6
4340 else
4341   if test -n "$STRIP"; then
4342   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4343 else
4344   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4345   ac_dummy="$PATH"
4346   for ac_dir in $ac_dummy; do
4347     test -z "$ac_dir" && ac_dir=.
4348     if test -f $ac_dir/$ac_word; then
4349       ac_cv_prog_STRIP="strip"
4350       break
4351     fi
4352   done
4353   IFS="$ac_save_ifs"
4354   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4355 fi
4356 fi
4357 STRIP="$ac_cv_prog_STRIP"
4358 if test -n "$STRIP"; then
4359   echo "$ac_t""$STRIP" 1>&6
4360 else
4361   echo "$ac_t""no" 1>&6
4362 fi
4363
4364 else
4365   STRIP=":"
4366 fi
4367 fi
4368
4369
4370 enable_dlopen=yes
4371 enable_win32_dll=yes
4372
4373 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4374 if test "${enable_libtool_lock+set}" = set; then
4375   enableval="$enable_libtool_lock"
4376   :
4377 fi
4378
4379 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4380
4381 # Some flags need to be propagated to the compiler or linker for good
4382 # libtool support.
4383 case $host in
4384 *-*-irix6*)
4385   # Find out which ABI we are using.
4386   echo '#line 4387 "configure"' > conftest.$ac_ext
4387   if { (eval echo configure:4388: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4388     case `/usr/bin/file conftest.$ac_objext` in
4389     *32-bit*)
4390       LD="${LD-ld} -32"
4391       ;;
4392     *N32*)
4393       LD="${LD-ld} -n32"
4394       ;;
4395     *64-bit*)
4396       LD="${LD-ld} -64"
4397       ;;
4398     esac
4399   fi
4400   rm -rf conftest*
4401   ;;
4402
4403 *-*-sco3.2v5*)
4404   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4405   SAVE_CFLAGS="$CFLAGS"
4406   CFLAGS="$CFLAGS -belf"
4407   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4408 echo "configure:4409: checking whether the C compiler needs -belf" >&5
4409 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4410   echo $ac_n "(cached) $ac_c" 1>&6
4411 else
4412   
4413      ac_ext=c
4414 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4415 ac_cpp='$CPP $CPPFLAGS'
4416 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4417 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4418 cross_compiling=$ac_cv_prog_cc_cross
4419
4420      cat > conftest.$ac_ext <<EOF
4421 #line 4422 "configure"
4422 #include "confdefs.h"
4423
4424 int main() {
4425
4426 ; return 0; }
4427 EOF
4428 if { (eval echo configure:4429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4429   rm -rf conftest*
4430   lt_cv_cc_needs_belf=yes
4431 else
4432   echo "configure: failed program was:" >&5
4433   cat conftest.$ac_ext >&5
4434   rm -rf conftest*
4435   lt_cv_cc_needs_belf=no
4436 fi
4437 rm -f conftest*
4438      ac_ext=c
4439 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4440 ac_cpp='$CPP $CPPFLAGS'
4441 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4442 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4443 cross_compiling=$ac_cv_prog_cc_cross
4444
4445 fi
4446
4447 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4448   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4449     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4450     CFLAGS="$SAVE_CFLAGS"
4451   fi
4452   ;;
4453
4454 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4455   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4456 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4457 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4458 echo "configure:4459: checking for $ac_word" >&5
4459 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4460   echo $ac_n "(cached) $ac_c" 1>&6
4461 else
4462   if test -n "$DLLTOOL"; then
4463   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4464 else
4465   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4466   ac_dummy="$PATH"
4467   for ac_dir in $ac_dummy; do
4468     test -z "$ac_dir" && ac_dir=.
4469     if test -f $ac_dir/$ac_word; then
4470       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4471       break
4472     fi
4473   done
4474   IFS="$ac_save_ifs"
4475 fi
4476 fi
4477 DLLTOOL="$ac_cv_prog_DLLTOOL"
4478 if test -n "$DLLTOOL"; then
4479   echo "$ac_t""$DLLTOOL" 1>&6
4480 else
4481   echo "$ac_t""no" 1>&6
4482 fi
4483
4484
4485 if test -z "$ac_cv_prog_DLLTOOL"; then
4486 if test -n "$ac_tool_prefix"; then
4487   # Extract the first word of "dlltool", so it can be a program name with args.
4488 set dummy dlltool; ac_word=$2
4489 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4490 echo "configure:4491: checking for $ac_word" >&5
4491 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4492   echo $ac_n "(cached) $ac_c" 1>&6
4493 else
4494   if test -n "$DLLTOOL"; then
4495   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4496 else
4497   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4498   ac_dummy="$PATH"
4499   for ac_dir in $ac_dummy; do
4500     test -z "$ac_dir" && ac_dir=.
4501     if test -f $ac_dir/$ac_word; then
4502       ac_cv_prog_DLLTOOL="dlltool"
4503       break
4504     fi
4505   done
4506   IFS="$ac_save_ifs"
4507   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4508 fi
4509 fi
4510 DLLTOOL="$ac_cv_prog_DLLTOOL"
4511 if test -n "$DLLTOOL"; then
4512   echo "$ac_t""$DLLTOOL" 1>&6
4513 else
4514   echo "$ac_t""no" 1>&6
4515 fi
4516
4517 else
4518   DLLTOOL="false"
4519 fi
4520 fi
4521
4522   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4523 set dummy ${ac_tool_prefix}as; ac_word=$2
4524 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4525 echo "configure:4526: checking for $ac_word" >&5
4526 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4527   echo $ac_n "(cached) $ac_c" 1>&6
4528 else
4529   if test -n "$AS"; then
4530   ac_cv_prog_AS="$AS" # Let the user override the test.
4531 else
4532   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4533   ac_dummy="$PATH"
4534   for ac_dir in $ac_dummy; do
4535     test -z "$ac_dir" && ac_dir=.
4536     if test -f $ac_dir/$ac_word; then
4537       ac_cv_prog_AS="${ac_tool_prefix}as"
4538       break
4539     fi
4540   done
4541   IFS="$ac_save_ifs"
4542 fi
4543 fi
4544 AS="$ac_cv_prog_AS"
4545 if test -n "$AS"; then
4546   echo "$ac_t""$AS" 1>&6
4547 else
4548   echo "$ac_t""no" 1>&6
4549 fi
4550
4551
4552 if test -z "$ac_cv_prog_AS"; then
4553 if test -n "$ac_tool_prefix"; then
4554   # Extract the first word of "as", so it can be a program name with args.
4555 set dummy as; ac_word=$2
4556 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4557 echo "configure:4558: checking for $ac_word" >&5
4558 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4559   echo $ac_n "(cached) $ac_c" 1>&6
4560 else
4561   if test -n "$AS"; then
4562   ac_cv_prog_AS="$AS" # Let the user override the test.
4563 else
4564   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4565   ac_dummy="$PATH"
4566   for ac_dir in $ac_dummy; do
4567     test -z "$ac_dir" && ac_dir=.
4568     if test -f $ac_dir/$ac_word; then
4569       ac_cv_prog_AS="as"
4570       break
4571     fi
4572   done
4573   IFS="$ac_save_ifs"
4574   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4575 fi
4576 fi
4577 AS="$ac_cv_prog_AS"
4578 if test -n "$AS"; then
4579   echo "$ac_t""$AS" 1>&6
4580 else
4581   echo "$ac_t""no" 1>&6
4582 fi
4583
4584 else
4585   AS="false"
4586 fi
4587 fi
4588
4589   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4590 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4591 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4592 echo "configure:4593: checking for $ac_word" >&5
4593 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4594   echo $ac_n "(cached) $ac_c" 1>&6
4595 else
4596   if test -n "$OBJDUMP"; then
4597   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4598 else
4599   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4600   ac_dummy="$PATH"
4601   for ac_dir in $ac_dummy; do
4602     test -z "$ac_dir" && ac_dir=.
4603     if test -f $ac_dir/$ac_word; then
4604       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4605       break
4606     fi
4607   done
4608   IFS="$ac_save_ifs"
4609 fi
4610 fi
4611 OBJDUMP="$ac_cv_prog_OBJDUMP"
4612 if test -n "$OBJDUMP"; then
4613   echo "$ac_t""$OBJDUMP" 1>&6
4614 else
4615   echo "$ac_t""no" 1>&6
4616 fi
4617
4618
4619 if test -z "$ac_cv_prog_OBJDUMP"; then
4620 if test -n "$ac_tool_prefix"; then
4621   # Extract the first word of "objdump", so it can be a program name with args.
4622 set dummy objdump; ac_word=$2
4623 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4624 echo "configure:4625: checking for $ac_word" >&5
4625 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4626   echo $ac_n "(cached) $ac_c" 1>&6
4627 else
4628   if test -n "$OBJDUMP"; then
4629   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4630 else
4631   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4632   ac_dummy="$PATH"
4633   for ac_dir in $ac_dummy; do
4634     test -z "$ac_dir" && ac_dir=.
4635     if test -f $ac_dir/$ac_word; then
4636       ac_cv_prog_OBJDUMP="objdump"
4637       break
4638     fi
4639   done
4640   IFS="$ac_save_ifs"
4641   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4642 fi
4643 fi
4644 OBJDUMP="$ac_cv_prog_OBJDUMP"
4645 if test -n "$OBJDUMP"; then
4646   echo "$ac_t""$OBJDUMP" 1>&6
4647 else
4648   echo "$ac_t""no" 1>&6
4649 fi
4650
4651 else
4652   OBJDUMP="false"
4653 fi
4654 fi
4655
4656
4657   # recent cygwin and mingw systems supply a stub DllMain which the user
4658   # can override, but on older systems we have to supply one
4659   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4660 echo "configure:4661: checking if libtool should supply DllMain function" >&5
4661 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4662   echo $ac_n "(cached) $ac_c" 1>&6
4663 else
4664   cat > conftest.$ac_ext <<EOF
4665 #line 4666 "configure"
4666 #include "confdefs.h"
4667
4668 int main() {
4669 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4670       DllMain (0, 0, 0);
4671 ; return 0; }
4672 EOF
4673 if { (eval echo configure:4674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4674   rm -rf conftest*
4675   lt_cv_need_dllmain=no
4676 else
4677   echo "configure: failed program was:" >&5
4678   cat conftest.$ac_ext >&5
4679   rm -rf conftest*
4680   lt_cv_need_dllmain=yes
4681 fi
4682 rm -f conftest*
4683 fi
4684
4685 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4686
4687   case $host/$CC in
4688   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4689     # old mingw systems require "-dll" to link a DLL, while more recent ones
4690     # require "-mdll"
4691     SAVE_CFLAGS="$CFLAGS"
4692     CFLAGS="$CFLAGS -mdll"
4693     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4694 echo "configure:4695: checking how to link DLLs" >&5
4695 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4696   echo $ac_n "(cached) $ac_c" 1>&6
4697 else
4698   cat > conftest.$ac_ext <<EOF
4699 #line 4700 "configure"
4700 #include "confdefs.h"
4701
4702 int main() {
4703
4704 ; return 0; }
4705 EOF
4706 if { (eval echo configure:4707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4707   rm -rf conftest*
4708   lt_cv_cc_dll_switch=-mdll
4709 else
4710   echo "configure: failed program was:" >&5
4711   cat conftest.$ac_ext >&5
4712   rm -rf conftest*
4713   lt_cv_cc_dll_switch=-dll
4714 fi
4715 rm -f conftest*
4716 fi
4717
4718 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4719     CFLAGS="$SAVE_CFLAGS" ;;
4720   *-*-cygwin* | *-*-pw32*)
4721     # cygwin systems need to pass --dll to the linker, and not link
4722     # crt.o which will require a WinMain@16 definition.
4723     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4724   esac
4725   ;;
4726   
4727 esac
4728
4729 # Sed substitution that helps us do robust quoting.  It backslashifies
4730 # metacharacters that are still active within double-quoted strings.
4731 Xsed='sed -e s/^X//'
4732 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4733
4734 # Same as above, but do not quote variable references.
4735 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4736
4737 # Sed substitution to delay expansion of an escaped shell variable in a
4738 # double_quote_subst'ed string.
4739 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4740
4741 # Constants:
4742 rm="rm -f"
4743
4744 # Global variables:
4745 default_ofile=libtool
4746 can_build_shared=yes
4747
4748 # All known linkers require a `.a' archive for static linking (except M$VC,
4749 # which needs '.lib').
4750 libext=a
4751 ltmain="$ac_aux_dir/ltmain.sh"
4752 ofile="$default_ofile"
4753 with_gnu_ld="$lt_cv_prog_gnu_ld"
4754 need_locks="$enable_libtool_lock"
4755
4756 old_CC="$CC"
4757 old_CFLAGS="$CFLAGS"
4758
4759 # Set sane defaults for various variables
4760 test -z "$AR" && AR=ar
4761 test -z "$AR_FLAGS" && AR_FLAGS=cru
4762 test -z "$AS" && AS=as
4763 test -z "$CC" && CC=cc
4764 test -z "$DLLTOOL" && DLLTOOL=dlltool
4765 test -z "$LD" && LD=ld
4766 test -z "$LN_S" && LN_S="ln -s"
4767 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4768 test -z "$NM" && NM=nm
4769 test -z "$OBJDUMP" && OBJDUMP=objdump
4770 test -z "$RANLIB" && RANLIB=:
4771 test -z "$STRIP" && STRIP=:
4772 test -z "$ac_objext" && ac_objext=o
4773
4774 if test x"$host" != x"$build"; then
4775   ac_tool_prefix=${host_alias}-
4776 else
4777   ac_tool_prefix=
4778 fi
4779
4780 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4781 case $host_os in
4782 linux-gnu*) ;;
4783 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4784 esac
4785
4786 case $host_os in
4787 aix3*)
4788   # AIX sometimes has problems with the GCC collect2 program.  For some
4789   # reason, if we set the COLLECT_NAMES environment variable, the problems
4790   # vanish in a puff of smoke.
4791   if test "X${COLLECT_NAMES+set}" != Xset; then
4792     COLLECT_NAMES=
4793     export COLLECT_NAMES
4794   fi
4795   ;;
4796 esac
4797
4798 # Determine commands to create old-style static archives.
4799 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4800 old_postinstall_cmds='chmod 644 $oldlib'
4801 old_postuninstall_cmds=
4802
4803 if test -n "$RANLIB"; then
4804   case $host_os in
4805   openbsd*)
4806     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4807     ;;
4808   *)
4809     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4810     ;;
4811   esac
4812   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4813 fi
4814
4815 # Allow CC to be a program name with arguments.
4816 set dummy $CC
4817 compiler="$2"
4818
4819 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4820 echo "configure:4821: checking for objdir" >&5
4821 rm -f .libs 2>/dev/null
4822 mkdir .libs 2>/dev/null
4823 if test -d .libs; then
4824   objdir=.libs
4825 else
4826   # MS-DOS does not allow filenames that begin with a dot.
4827   objdir=_libs
4828 fi
4829 rmdir .libs 2>/dev/null
4830 echo "$ac_t""$objdir" 1>&6
4831
4832
4833 # Check whether --with-pic or --without-pic was given.
4834 if test "${with_pic+set}" = set; then
4835   withval="$with_pic"
4836   pic_mode="$withval"
4837 else
4838   pic_mode=default
4839 fi
4840
4841 test -z "$pic_mode" && pic_mode=default
4842
4843 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4844 # in isolation, and that seeing it set (from the cache) indicates that
4845 # the associated values are set (in the cache) correctly too.
4846 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4847 echo "configure:4848: checking for $compiler option to produce PIC" >&5
4848 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4849   echo $ac_n "(cached) $ac_c" 1>&6
4850 else
4851    lt_cv_prog_cc_pic=
4852   lt_cv_prog_cc_shlib=
4853   lt_cv_prog_cc_wl=
4854   lt_cv_prog_cc_static=
4855   lt_cv_prog_cc_no_builtin=
4856   lt_cv_prog_cc_can_build_shared=$can_build_shared
4857
4858   if test "$GCC" = yes; then
4859     lt_cv_prog_cc_wl='-Wl,'
4860     lt_cv_prog_cc_static='-static'
4861
4862     case $host_os in
4863     aix*)
4864       # Below there is a dirty hack to force normal static linking with -ldl
4865       # The problem is because libdl dynamically linked with both libc and
4866       # libC (AIX C++ library), which obviously doesn't included in libraries
4867       # list by gcc. This cause undefined symbols with -static flags.
4868       # This hack allows C programs to be linked with "-static -ldl", but
4869       # not sure about C++ programs.
4870       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4871       ;;
4872     amigaos*)
4873       # FIXME: we need at least 68020 code to build shared libraries, but
4874       # adding the `-m68020' flag to GCC prevents building anything better,
4875       # like `-m68040'.
4876       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4877       ;;
4878     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4879       # PIC is the default for these OSes.
4880       ;;
4881     darwin* | rhapsody*)
4882       # PIC is the default on this platform
4883       # Common symbols not allowed in MH_DYLIB files
4884       lt_cv_prog_cc_pic='-fno-common'
4885       ;;
4886     cygwin* | mingw* | pw32* | os2*)
4887       # This hack is so that the source file can tell whether it is being
4888       # built for inclusion in a dll (and should export symbols for example).
4889       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4890       ;;
4891     sysv4*MP*)
4892       if test -d /usr/nec; then
4893          lt_cv_prog_cc_pic=-Kconform_pic
4894       fi
4895       ;;
4896     *)
4897       lt_cv_prog_cc_pic='-fPIC'
4898       ;;
4899     esac
4900   else
4901     # PORTME Check for PIC flags for the system compiler.
4902     case $host_os in
4903     aix3* | aix4* | aix5*)
4904       lt_cv_prog_cc_wl='-Wl,'
4905       # All AIX code is PIC.
4906       if test "$host_cpu" = ia64; then
4907         # AIX 5 now supports IA64 processor
4908         lt_cv_prog_cc_static='-Bstatic'
4909       else
4910         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4911       fi
4912       ;;
4913
4914     hpux9* | hpux10* | hpux11*)
4915       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4916       lt_cv_prog_cc_wl='-Wl,'
4917       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4918       lt_cv_prog_cc_pic='+Z'
4919       ;;
4920
4921     irix5* | irix6* | nonstopux*)
4922       lt_cv_prog_cc_wl='-Wl,'
4923       lt_cv_prog_cc_static='-non_shared'
4924       # PIC (with -KPIC) is the default.
4925       ;;
4926
4927     cygwin* | mingw* | pw32* | os2*)
4928       # This hack is so that the source file can tell whether it is being
4929       # built for inclusion in a dll (and should export symbols for example).
4930       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4931       ;;
4932
4933     newsos6)
4934       lt_cv_prog_cc_pic='-KPIC'
4935       lt_cv_prog_cc_static='-Bstatic'
4936       ;;
4937     
4938     openedition)
4939       # XPLINK code is PIC by default
4940       ;;
4941
4942     osf3* | osf4* | osf5*)
4943       # All OSF/1 code is PIC.
4944       lt_cv_prog_cc_wl='-Wl,'
4945       lt_cv_prog_cc_static='-non_shared'
4946       ;;
4947
4948     sco3.2v5*)
4949       lt_cv_prog_cc_pic='-Kpic'
4950       lt_cv_prog_cc_static='-dn'
4951       lt_cv_prog_cc_shlib='-belf'
4952       ;;
4953
4954     solaris*)
4955       lt_cv_prog_cc_pic='-KPIC'
4956       lt_cv_prog_cc_static='-Bstatic'
4957       lt_cv_prog_cc_wl='-Wl,'
4958       ;;
4959
4960     sunos4*)
4961       lt_cv_prog_cc_pic='-PIC'
4962       lt_cv_prog_cc_static='-Bstatic'
4963       lt_cv_prog_cc_wl='-Qoption ld '
4964       ;;
4965
4966     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4967       lt_cv_prog_cc_pic='-KPIC'
4968       lt_cv_prog_cc_static='-Bstatic'
4969       lt_cv_prog_cc_wl='-Wl,'
4970       ;;
4971
4972     uts4*)
4973       lt_cv_prog_cc_pic='-pic'
4974       lt_cv_prog_cc_static='-Bstatic'
4975       ;;
4976
4977     sysv4*MP*)
4978       if test -d /usr/nec ;then
4979         lt_cv_prog_cc_pic='-Kconform_pic'
4980         lt_cv_prog_cc_static='-Bstatic'
4981       fi
4982       ;;
4983
4984     *)
4985       lt_cv_prog_cc_can_build_shared=no
4986       ;;
4987     esac
4988   fi
4989
4990 fi
4991
4992 if test -z "$lt_cv_prog_cc_pic"; then
4993   echo "$ac_t""none" 1>&6
4994 else
4995   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
4996
4997   # Check to make sure the pic_flag actually works.
4998   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
4999 echo "configure:5000: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5000   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5001   echo $ac_n "(cached) $ac_c" 1>&6
5002 else
5003       save_CFLAGS="$CFLAGS"
5004     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5005     cat > conftest.$ac_ext <<EOF
5006 #line 5007 "configure"
5007 #include "confdefs.h"
5008
5009 int main() {
5010
5011 ; return 0; }
5012 EOF
5013 if { (eval echo configure:5014: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5014   rm -rf conftest*
5015         case $host_os in
5016       hpux9* | hpux10* | hpux11*)
5017         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5018         # they create non-PIC objects.  So, if there were any warnings, we
5019         # assume that PIC is not supported.
5020         if test -s conftest.err; then
5021           lt_cv_prog_cc_pic_works=no
5022         else
5023           lt_cv_prog_cc_pic_works=yes
5024         fi
5025         ;;
5026       *)
5027         lt_cv_prog_cc_pic_works=yes
5028         ;;
5029       esac
5030     
5031 else
5032   echo "configure: failed program was:" >&5
5033   cat conftest.$ac_ext >&5
5034   rm -rf conftest*
5035         lt_cv_prog_cc_pic_works=no
5036     
5037 fi
5038 rm -f conftest*
5039     CFLAGS="$save_CFLAGS"
5040   
5041 fi
5042
5043
5044   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5045     lt_cv_prog_cc_pic=
5046     lt_cv_prog_cc_can_build_shared=no
5047   else
5048     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5049   fi
5050
5051   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5052 fi
5053
5054 # Check for any special shared library compilation flags.
5055 if test -n "$lt_cv_prog_cc_shlib"; then
5056   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5057   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5058   else
5059    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5060     lt_cv_prog_cc_can_build_shared=no
5061   fi
5062 fi
5063
5064 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5065 echo "configure:5066: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5066 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5067   echo $ac_n "(cached) $ac_c" 1>&6
5068 else
5069     lt_cv_prog_cc_static_works=no
5070   save_LDFLAGS="$LDFLAGS"
5071   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5072   cat > conftest.$ac_ext <<EOF
5073 #line 5074 "configure"
5074 #include "confdefs.h"
5075
5076 int main() {
5077
5078 ; return 0; }
5079 EOF
5080 if { (eval echo configure:5081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5081   rm -rf conftest*
5082   lt_cv_prog_cc_static_works=yes
5083 else
5084   echo "configure: failed program was:" >&5
5085   cat conftest.$ac_ext >&5
5086 fi
5087 rm -f conftest*
5088   LDFLAGS="$save_LDFLAGS"
5089
5090 fi
5091
5092
5093 # Belt *and* braces to stop my trousers falling down:
5094 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5095 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5096
5097 pic_flag="$lt_cv_prog_cc_pic"
5098 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5099 wl="$lt_cv_prog_cc_wl"
5100 link_static_flag="$lt_cv_prog_cc_static"
5101 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5102 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5103
5104
5105 # Check to see if options -o and -c are simultaneously supported by compiler
5106 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5107 echo "configure:5108: checking if $compiler supports -c -o file.$ac_objext" >&5
5108 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5109   echo $ac_n "(cached) $ac_c" 1>&6
5110 else
5111   
5112 $rm -r conftest 2>/dev/null
5113 mkdir conftest
5114 cd conftest
5115 echo "int some_variable = 0;" > conftest.$ac_ext
5116 mkdir out
5117 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5118 # that will create temporary files in the current directory regardless of
5119 # the output directory.  Thus, making CWD read-only will cause this test
5120 # to fail, enabling locking or at least warning the user not to do parallel
5121 # builds.
5122 chmod -w .
5123 save_CFLAGS="$CFLAGS"
5124 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5125 compiler_c_o=no
5126 if { (eval echo configure:5127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5127   # The compiler can only warn and ignore the option if not recognized
5128   # So say no if there are warnings
5129   if test -s out/conftest.err; then
5130     lt_cv_compiler_c_o=no
5131   else
5132     lt_cv_compiler_c_o=yes
5133   fi
5134 else
5135   # Append any errors to the config.log.
5136   cat out/conftest.err 1>&5
5137   lt_cv_compiler_c_o=no
5138 fi
5139 CFLAGS="$save_CFLAGS"
5140 chmod u+w .
5141 $rm conftest* out/*
5142 rmdir out
5143 cd ..
5144 rmdir conftest
5145 $rm -r conftest 2>/dev/null
5146
5147 fi
5148
5149 compiler_c_o=$lt_cv_compiler_c_o
5150 echo "$ac_t""$compiler_c_o" 1>&6
5151
5152 if test x"$compiler_c_o" = x"yes"; then
5153   # Check to see if we can write to a .lo
5154   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5155 echo "configure:5156: checking if $compiler supports -c -o file.lo" >&5
5156   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5157   echo $ac_n "(cached) $ac_c" 1>&6
5158 else
5159   
5160   lt_cv_compiler_o_lo=no
5161   save_CFLAGS="$CFLAGS"
5162   CFLAGS="$CFLAGS -c -o conftest.lo"
5163   save_objext="$ac_objext"
5164   ac_objext=lo
5165   cat > conftest.$ac_ext <<EOF
5166 #line 5167 "configure"
5167 #include "confdefs.h"
5168
5169 int main() {
5170 int some_variable = 0;
5171 ; return 0; }
5172 EOF
5173 if { (eval echo configure:5174: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5174   rm -rf conftest*
5175       # The compiler can only warn and ignore the option if not recognized
5176     # So say no if there are warnings
5177     if test -s conftest.err; then
5178       lt_cv_compiler_o_lo=no
5179     else
5180       lt_cv_compiler_o_lo=yes
5181     fi
5182   
5183 else
5184   echo "configure: failed program was:" >&5
5185   cat conftest.$ac_ext >&5
5186 fi
5187 rm -f conftest*
5188   ac_objext="$save_objext"
5189   CFLAGS="$save_CFLAGS"
5190   
5191 fi
5192
5193   compiler_o_lo=$lt_cv_compiler_o_lo
5194   echo "$ac_t""$compiler_o_lo" 1>&6
5195 else
5196   compiler_o_lo=no
5197 fi
5198
5199 # Check to see if we can do hard links to lock some files if needed
5200 hard_links="nottested"
5201 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5202   # do not overwrite the value of need_locks provided by the user
5203   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5204 echo "configure:5205: checking if we can lock with hard links" >&5
5205   hard_links=yes
5206   $rm conftest*
5207   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5208   touch conftest.a
5209   ln conftest.a conftest.b 2>&5 || hard_links=no
5210   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5211   echo "$ac_t""$hard_links" 1>&6
5212   if test "$hard_links" = no; then
5213     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5214     need_locks=warn
5215   fi
5216 else
5217   need_locks=no
5218 fi
5219
5220 if test "$GCC" = yes; then
5221   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5222   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5223 echo "configure:5224: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5224   echo "int some_variable = 0;" > conftest.$ac_ext
5225   save_CFLAGS="$CFLAGS"
5226   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5227   compiler_rtti_exceptions=no
5228   cat > conftest.$ac_ext <<EOF
5229 #line 5230 "configure"
5230 #include "confdefs.h"
5231
5232 int main() {
5233 int some_variable = 0;
5234 ; return 0; }
5235 EOF
5236 if { (eval echo configure:5237: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5237   rm -rf conftest*
5238       # The compiler can only warn and ignore the option if not recognized
5239     # So say no if there are warnings
5240     if test -s conftest.err; then
5241       compiler_rtti_exceptions=no
5242     else
5243       compiler_rtti_exceptions=yes
5244     fi
5245   
5246 else
5247   echo "configure: failed program was:" >&5
5248   cat conftest.$ac_ext >&5
5249 fi
5250 rm -f conftest*
5251   CFLAGS="$save_CFLAGS"
5252   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5253
5254   if test "$compiler_rtti_exceptions" = "yes"; then
5255     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5256   else
5257     no_builtin_flag=' -fno-builtin'
5258   fi
5259 fi
5260
5261 # See if the linker supports building shared libraries.
5262 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5263 echo "configure:5264: checking whether the linker ($LD) supports shared libraries" >&5
5264
5265 allow_undefined_flag=
5266 no_undefined_flag=
5267 need_lib_prefix=unknown
5268 need_version=unknown
5269 # when you set need_version to no, make sure it does not cause -set_version
5270 # flags to be left without arguments
5271 archive_cmds=
5272 archive_expsym_cmds=
5273 old_archive_from_new_cmds=
5274 old_archive_from_expsyms_cmds=
5275 export_dynamic_flag_spec=
5276 whole_archive_flag_spec=
5277 thread_safe_flag_spec=
5278 hardcode_into_libs=no
5279 hardcode_libdir_flag_spec=
5280 hardcode_libdir_separator=
5281 hardcode_direct=no
5282 hardcode_minus_L=no
5283 hardcode_shlibpath_var=unsupported
5284 runpath_var=
5285 link_all_deplibs=unknown
5286 always_export_symbols=no
5287 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5288 # include_expsyms should be a list of space-separated symbols to be *always*
5289 # included in the symbol list
5290 include_expsyms=
5291 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5292 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5293 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5294 # as well as any symbol that contains `d'.
5295 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5296 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5297 # platforms (ab)use it in PIC code, but their linkers get confused if
5298 # the symbol is explicitly referenced.  Since portable code cannot
5299 # rely on this symbol name, it's probably fine to never include it in
5300 # preloaded symbol tables.
5301 extract_expsyms_cmds=
5302
5303 case $host_os in
5304 cygwin* | mingw* | pw32*)
5305   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5306   # When not using gcc, we currently assume that we are using
5307   # Microsoft Visual C++.
5308   if test "$GCC" != yes; then
5309     with_gnu_ld=no
5310   fi
5311   ;;
5312 openbsd*)
5313   with_gnu_ld=no
5314   ;;
5315 esac
5316
5317 ld_shlibs=yes
5318 if test "$with_gnu_ld" = yes; then
5319   # If archive_cmds runs LD, not CC, wlarc should be empty
5320   wlarc='${wl}'
5321
5322   # See if GNU ld supports shared libraries.
5323   case $host_os in
5324   aix3* | aix4* | aix5*)
5325     # On AIX, the GNU linker is very broken
5326     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5327     ld_shlibs=no
5328     cat <<EOF 1>&2
5329
5330 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5331 *** to be unable to reliably create shared libraries on AIX.
5332 *** Therefore, libtool is disabling shared libraries support.  If you
5333 *** really care for shared libraries, you may want to modify your PATH
5334 *** so that a non-GNU linker is found, and then restart.
5335
5336 EOF
5337     ;;
5338
5339   amigaos*)
5340     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)'
5341     hardcode_libdir_flag_spec='-L$libdir'
5342     hardcode_minus_L=yes
5343
5344     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5345     # that the semantics of dynamic libraries on AmigaOS, at least up
5346     # to version 4, is to share data among multiple programs linked
5347     # with the same dynamic library.  Since this doesn't match the
5348     # behavior of shared libraries on other platforms, we can use
5349     # them.
5350     ld_shlibs=no
5351     ;;
5352
5353   beos*)
5354     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5355       allow_undefined_flag=unsupported
5356       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5357       # support --undefined.  This deserves some investigation.  FIXME
5358       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5359     else
5360       ld_shlibs=no
5361     fi
5362     ;;
5363
5364   cygwin* | mingw* | pw32*)
5365     # hardcode_libdir_flag_spec is actually meaningless, as there is
5366     # no search path for DLLs.
5367     hardcode_libdir_flag_spec='-L$libdir'
5368     allow_undefined_flag=unsupported
5369     always_export_symbols=yes
5370
5371     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5372       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5373       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5374       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5375       else $CC -o impgen impgen.c ; fi)~
5376       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5377
5378     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5379
5380     # cygwin and mingw dlls have different entry points and sets of symbols
5381     # to exclude.
5382     # FIXME: what about values for MSVC?
5383     dll_entry=__cygwin_dll_entry@12
5384     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5385     case $host_os in
5386     mingw*)
5387       # mingw values
5388       dll_entry=_DllMainCRTStartup@12
5389       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5390       ;;
5391     esac
5392
5393     # mingw and cygwin differ, and it's simplest to just exclude the union
5394     # of the two symbol sets.
5395     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5396
5397     # recent cygwin and mingw systems supply a stub DllMain which the user
5398     # can override, but on older systems we have to supply one (in ltdll.c)
5399     if test "x$lt_cv_need_dllmain" = "xyes"; then
5400       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5401       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~
5402         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5403     else
5404       ltdll_obj=
5405       ltdll_cmds=
5406     fi
5407
5408     # Extract the symbol export list from an `--export-all' def file,
5409     # then regenerate the def file from the symbol export list, so that
5410     # the compiled dll only exports the symbol export list.
5411     # Be careful not to strip the DATA tag left be newer dlltools.
5412     export_symbols_cmds="$ltdll_cmds"'
5413       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5414       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5415
5416     # If the export-symbols file already is a .def file (1st line
5417     # is EXPORTS), use it as is.
5418     # If DATA tags from a recent dlltool are present, honour them!
5419     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5420         cp $export_symbols $output_objdir/$soname-def;
5421       else
5422         echo EXPORTS > $output_objdir/$soname-def;
5423         _lt_hint=1;
5424         cat $export_symbols | while read symbol; do
5425          set dummy \$symbol;
5426          case \$# in
5427            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5428            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5429            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5430          esac;
5431          _lt_hint=`expr 1 + \$_lt_hint`;
5432         done;
5433       fi~
5434       '"$ltdll_cmds"'
5435       $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~
5436       $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~
5437       $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~
5438       $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~
5439       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5440     ;;
5441
5442   netbsd*)
5443     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5444       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5445       wlarc=
5446     else
5447       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5448       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5449     fi
5450     ;;
5451
5452   solaris* | sysv5*)
5453     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5454       ld_shlibs=no
5455       cat <<EOF 1>&2
5456
5457 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5458 *** create shared libraries on Solaris systems.  Therefore, libtool
5459 *** is disabling shared libraries support.  We urge you to upgrade GNU
5460 *** binutils to release 2.9.1 or newer.  Another option is to modify
5461 *** your PATH or compiler configuration so that the native linker is
5462 *** used, and then restart.
5463
5464 EOF
5465     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5466       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5467       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5468     else
5469       ld_shlibs=no
5470     fi
5471     ;;
5472
5473   sunos4*)
5474     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5475     wlarc=
5476     hardcode_direct=yes
5477     hardcode_shlibpath_var=no
5478     ;;
5479
5480   *)
5481     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5482       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5483       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5484     else
5485       ld_shlibs=no
5486     fi
5487     ;;
5488   esac
5489
5490   if test "$ld_shlibs" = yes; then
5491     runpath_var=LD_RUN_PATH
5492     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5493     export_dynamic_flag_spec='${wl}--export-dynamic'
5494     case $host_os in
5495     cygwin* | mingw* | pw32*)
5496       # dlltool doesn't understand --whole-archive et. al.
5497       whole_archive_flag_spec=
5498       ;;
5499     *)
5500       # ancient GNU ld didn't support --whole-archive et. al.
5501       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5502         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5503       else
5504         whole_archive_flag_spec=
5505       fi
5506       ;;
5507     esac
5508   fi
5509 else
5510   # PORTME fill in a description of your system's linker (not GNU ld)
5511   case $host_os in
5512   aix3*)
5513     allow_undefined_flag=unsupported
5514     always_export_symbols=yes
5515     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'
5516     # Note: this linker hardcodes the directories in LIBPATH if there
5517     # are no directories specified by -L.
5518     hardcode_minus_L=yes
5519     if test "$GCC" = yes && test -z "$link_static_flag"; then
5520       # Neither direct hardcoding nor static linking is supported with a
5521       # broken collect2.
5522       hardcode_direct=unsupported
5523     fi
5524     ;;
5525
5526   aix4* | aix5*)
5527     if test "$host_cpu" = ia64; then
5528       # On IA64, the linker does run time linking by default, so we don't
5529       # have to do anything special.
5530       aix_use_runtimelinking=no
5531       exp_sym_flag='-Bexport'
5532       no_entry_flag=""
5533     else
5534       aix_use_runtimelinking=no
5535
5536       # Test if we are trying to use run time linking or normal
5537       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5538       # need to do runtime linking.
5539       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5540         for ld_flag in $LDFLAGS; do
5541           case $ld_flag in
5542           *-brtl*)
5543             aix_use_runtimelinking=yes
5544             break
5545           ;;
5546           esac
5547         done
5548       esac
5549
5550       exp_sym_flag='-bexport'
5551       no_entry_flag='-bnoentry'
5552     fi
5553
5554     # When large executables or shared objects are built, AIX ld can
5555     # have problems creating the table of contents.  If linking a library
5556     # or program results in "error TOC overflow" add -mminimal-toc to
5557     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5558     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5559
5560     hardcode_direct=yes
5561     archive_cmds=''
5562     hardcode_libdir_separator=':'
5563     if test "$GCC" = yes; then
5564       case $host_os in aix4.[012]|aix4.[012].*)
5565         collect2name=`${CC} -print-prog-name=collect2`
5566         if test -f "$collect2name" && \
5567           strings "$collect2name" | grep resolve_lib_name >/dev/null
5568         then
5569           # We have reworked collect2
5570           hardcode_direct=yes
5571         else
5572           # We have old collect2
5573           hardcode_direct=unsupported
5574           # It fails to find uninstalled libraries when the uninstalled
5575           # path is not listed in the libpath.  Setting hardcode_minus_L
5576           # to unsupported forces relinking
5577           hardcode_minus_L=yes
5578           hardcode_libdir_flag_spec='-L$libdir'
5579           hardcode_libdir_separator=
5580         fi
5581       esac
5582
5583       shared_flag='-shared'
5584     else
5585       # not using gcc
5586       if test "$host_cpu" = ia64; then
5587         shared_flag='${wl}-G'
5588       else
5589         if test "$aix_use_runtimelinking" = yes; then
5590           shared_flag='${wl}-G'
5591         else
5592           shared_flag='${wl}-bM:SRE'
5593         fi
5594       fi
5595     fi
5596
5597     # It seems that -bexpall can do strange things, so it is better to
5598     # generate a list of symbols to export.
5599     always_export_symbols=yes
5600     if test "$aix_use_runtimelinking" = yes; then
5601       # Warning - without using the other runtime loading flags (-brtl),
5602       # -berok will link without error, but may produce a broken library.
5603       allow_undefined_flag='-berok'
5604       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5605       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"
5606     else
5607       if test "$host_cpu" = ia64; then
5608         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5609         allow_undefined_flag="-z nodefs"
5610         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"
5611       else
5612         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5613         # Warning - without using the other run time loading flags,
5614         # -berok will link without error, but may produce a broken library.
5615         allow_undefined_flag='${wl}-berok'
5616         # This is a bit strange, but is similar to how AIX traditionally builds
5617         # it's shared libraries.
5618         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'
5619       fi
5620     fi
5621     ;;
5622
5623   amigaos*)
5624     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)'
5625     hardcode_libdir_flag_spec='-L$libdir'
5626     hardcode_minus_L=yes
5627     # see comment about different semantics on the GNU ld section
5628     ld_shlibs=no
5629     ;;
5630
5631   cygwin* | mingw* | pw32*)
5632     # When not using gcc, we currently assume that we are using
5633     # Microsoft Visual C++.
5634     # hardcode_libdir_flag_spec is actually meaningless, as there is
5635     # no search path for DLLs.
5636     hardcode_libdir_flag_spec=' '
5637     allow_undefined_flag=unsupported
5638     # Tell ltmain to make .lib files, not .a files.
5639     libext=lib
5640     # FIXME: Setting linknames here is a bad hack.
5641     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5642     # The linker will automatically build a .lib file if we build a DLL.
5643     old_archive_from_new_cmds='true'
5644     # FIXME: Should let the user specify the lib program.
5645     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5646     fix_srcfile_path='`cygpath -w "$srcfile"`'
5647     ;;
5648
5649   darwin* | rhapsody*)
5650     case "$host_os" in
5651     rhapsody* | darwin1.[012])
5652       allow_undefined_flag='-undefined suppress'
5653       ;;
5654     *) # Darwin 1.3 on
5655       allow_undefined_flag='-flat_namespace -undefined suppress'
5656       ;;
5657     esac
5658     # FIXME: Relying on posixy $() will cause problems for
5659     #        cross-compilation, but unfortunately the echo tests do not
5660     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5661     #        `"' quotes if we put them in here... so don't!
5662     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)'
5663     # We need to add '_' to the symbols in $export_symbols first
5664     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5665     hardcode_direct=yes
5666     hardcode_shlibpath_var=no
5667     whole_archive_flag_spec='-all_load $convenience'
5668     ;;
5669
5670   freebsd1*)
5671     ld_shlibs=no
5672     ;;
5673
5674   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5675   # support.  Future versions do this automatically, but an explicit c++rt0.o
5676   # does not break anything, and helps significantly (at the cost of a little
5677   # extra space).
5678   freebsd2.2*)
5679     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5680     hardcode_libdir_flag_spec='-R$libdir'
5681     hardcode_direct=yes
5682     hardcode_shlibpath_var=no
5683     ;;
5684
5685   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5686   freebsd2*)
5687     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5688     hardcode_direct=yes
5689     hardcode_minus_L=yes
5690     hardcode_shlibpath_var=no
5691     ;;
5692
5693   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5694   freebsd*)
5695     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5696     hardcode_libdir_flag_spec='-R$libdir'
5697     hardcode_direct=yes
5698     hardcode_shlibpath_var=no
5699     ;;
5700
5701   hpux9* | hpux10* | hpux11*)
5702     case $host_os in
5703     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' ;;
5704     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5705     esac
5706     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5707     hardcode_libdir_separator=:
5708     hardcode_direct=yes
5709     hardcode_minus_L=yes # Not in the search PATH, but as the default
5710                          # location of the library.
5711     export_dynamic_flag_spec='${wl}-E'
5712     ;;
5713
5714   irix5* | irix6* | nonstopux*)
5715     if test "$GCC" = yes; then
5716       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'
5717       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5718     else
5719       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'
5720       hardcode_libdir_flag_spec='-rpath $libdir'
5721     fi
5722     hardcode_libdir_separator=:
5723     link_all_deplibs=yes
5724     ;;
5725
5726   netbsd*)
5727     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5728       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5729     else
5730       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5731     fi
5732     hardcode_libdir_flag_spec='-R$libdir'
5733     hardcode_direct=yes
5734     hardcode_shlibpath_var=no
5735     ;;
5736
5737   newsos6)
5738     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5739     hardcode_direct=yes
5740     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5741     hardcode_libdir_separator=:
5742     hardcode_shlibpath_var=no
5743     ;;
5744
5745   openbsd*)
5746     hardcode_direct=yes
5747     hardcode_shlibpath_var=no
5748     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5749       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5750       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5751       export_dynamic_flag_spec='${wl}-E'
5752     else
5753       case "$host_os" in
5754       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5755         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5756         hardcode_libdir_flag_spec='-R$libdir'
5757         ;;
5758       *)
5759         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5760         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5761         ;;
5762       esac
5763     fi
5764     ;;
5765
5766   openedition*)
5767     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5768         cp \$linknames \$output_objdir && linknames=''"
5769     export_dynamic_flag_spec="-Wl,DLL"
5770     ;;
5771
5772   os2*)
5773     hardcode_libdir_flag_spec='-L$libdir'
5774     hardcode_minus_L=yes
5775     allow_undefined_flag=unsupported
5776     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'
5777     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5778     ;;
5779
5780   osf3*)
5781     if test "$GCC" = yes; then
5782       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5783       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'
5784     else
5785       allow_undefined_flag=' -expect_unresolved \*'
5786       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'
5787     fi
5788     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5789     hardcode_libdir_separator=:
5790     ;;
5791
5792   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5793     if test "$GCC" = yes; then
5794       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5795       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'
5796       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5797     else
5798       allow_undefined_flag=' -expect_unresolved \*'
5799       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'
5800       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5801       $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'
5802
5803       #Both c and cxx compiler support -rpath directly
5804       hardcode_libdir_flag_spec='-rpath $libdir'
5805     fi
5806     hardcode_libdir_separator=:
5807     ;;
5808
5809   sco3.2v5*)
5810     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5811     hardcode_shlibpath_var=no
5812     runpath_var=LD_RUN_PATH
5813     hardcode_runpath_var=yes
5814     export_dynamic_flag_spec='${wl}-Bexport'
5815     ;;
5816
5817   solaris*)
5818     # gcc --version < 3.0 without binutils cannot create self contained
5819     # shared libraries reliably, requiring libgcc.a to resolve some of
5820     # the object symbols generated in some cases.  Libraries that use
5821     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5822     # a copy of libgcc.a into every shared library to guarantee resolving
5823     # such symbols causes other problems:  According to Tim Van Holder
5824     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5825     # (to the application) exception stack for one thing.
5826     no_undefined_flag=' -z defs'
5827     if test "$GCC" = yes; then
5828       case `$CC --version 2>/dev/null` in
5829       [12].*)
5830         cat <<EOF 1>&2
5831
5832 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5833 *** create self contained shared libraries on Solaris systems, without
5834 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5835 *** -no-undefined support, which will at least allow you to build shared
5836 *** libraries.  However, you may find that when you link such libraries
5837 *** into an application without using GCC, you have to manually add
5838 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5839 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5840 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5841
5842 EOF
5843         no_undefined_flag=
5844         ;;
5845       esac
5846     fi
5847     # $CC -shared without GNU ld will not create a library from C++
5848     # object files and a static libstdc++, better avoid it by now
5849     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5850     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5851                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5852     hardcode_libdir_flag_spec='-R$libdir'
5853     hardcode_shlibpath_var=no
5854     case $host_os in
5855     solaris2.[0-5] | solaris2.[0-5].*) ;;
5856     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5857       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5858     esac
5859     link_all_deplibs=yes
5860     ;;
5861
5862   sunos4*)
5863     if test "x$host_vendor" = xsequent; then
5864       # Use $CC to link under sequent, because it throws in some extra .o
5865       # files that make .init and .fini sections work.
5866       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5867     else
5868       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5869     fi
5870     hardcode_libdir_flag_spec='-L$libdir'
5871     hardcode_direct=yes
5872     hardcode_minus_L=yes
5873     hardcode_shlibpath_var=no
5874     ;;
5875
5876   sysv4)
5877     case $host_vendor in
5878       sni)
5879         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5880         hardcode_direct=yes # is this really true???
5881         ;;
5882       siemens)
5883         ## LD is ld it makes a PLAMLIB
5884         ## CC just makes a GrossModule.
5885         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5886         reload_cmds='$CC -r -o $output$reload_objs'
5887         hardcode_direct=no
5888         ;;
5889       motorola)
5890         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5891         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5892         ;;
5893     esac
5894     runpath_var='LD_RUN_PATH'
5895     hardcode_shlibpath_var=no
5896     ;;
5897
5898   sysv4.3*)
5899     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5900     hardcode_shlibpath_var=no
5901     export_dynamic_flag_spec='-Bexport'
5902     ;;
5903
5904   sysv5*)
5905     no_undefined_flag=' -z text'
5906     # $CC -shared without GNU ld will not create a library from C++
5907     # object files and a static libstdc++, better avoid it by now
5908     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5909     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5910                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5911     hardcode_libdir_flag_spec=
5912     hardcode_shlibpath_var=no
5913     runpath_var='LD_RUN_PATH'
5914     ;;
5915
5916   uts4*)
5917     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5918     hardcode_libdir_flag_spec='-L$libdir'
5919     hardcode_shlibpath_var=no
5920     ;;
5921
5922   dgux*)
5923     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5924     hardcode_libdir_flag_spec='-L$libdir'
5925     hardcode_shlibpath_var=no
5926     ;;
5927
5928   sysv4*MP*)
5929     if test -d /usr/nec; then
5930       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5931       hardcode_shlibpath_var=no
5932       runpath_var=LD_RUN_PATH
5933       hardcode_runpath_var=yes
5934       ld_shlibs=yes
5935     fi
5936     ;;
5937
5938   sysv4.2uw2*)
5939     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5940     hardcode_direct=yes
5941     hardcode_minus_L=no
5942     hardcode_shlibpath_var=no
5943     hardcode_runpath_var=yes
5944     runpath_var=LD_RUN_PATH
5945     ;;
5946
5947   sysv5uw7* | unixware7*)
5948     no_undefined_flag='${wl}-z ${wl}text'
5949     if test "$GCC" = yes; then
5950       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5951     else
5952       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5953     fi
5954     runpath_var='LD_RUN_PATH'
5955     hardcode_shlibpath_var=no
5956     ;;
5957
5958   *)
5959     ld_shlibs=no
5960     ;;
5961   esac
5962 fi
5963 echo "$ac_t""$ld_shlibs" 1>&6
5964 test "$ld_shlibs" = no && can_build_shared=no
5965
5966 # Check hardcoding attributes.
5967 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
5968 echo "configure:5969: checking how to hardcode library paths into programs" >&5
5969 hardcode_action=
5970 if test -n "$hardcode_libdir_flag_spec" || \
5971    test -n "$runpath_var"; then
5972
5973   # We can hardcode non-existant directories.
5974   if test "$hardcode_direct" != no &&
5975      # If the only mechanism to avoid hardcoding is shlibpath_var, we
5976      # have to relink, otherwise we might link with an installed library
5977      # when we should be linking with a yet-to-be-installed one
5978      ## test "$hardcode_shlibpath_var" != no &&
5979      test "$hardcode_minus_L" != no; then
5980     # Linking always hardcodes the temporary library directory.
5981     hardcode_action=relink
5982   else
5983     # We can link without hardcoding, and we can hardcode nonexisting dirs.
5984     hardcode_action=immediate
5985   fi
5986 else
5987   # We cannot hardcode anything, or else we can only hardcode existing
5988   # directories.
5989   hardcode_action=unsupported
5990 fi
5991 echo "$ac_t""$hardcode_action" 1>&6
5992
5993 striplib=
5994 old_striplib=
5995 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
5996 echo "configure:5997: checking whether stripping libraries is possible" >&5
5997 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
5998   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
5999   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6000   echo "$ac_t""yes" 1>&6
6001 else
6002   echo "$ac_t""no" 1>&6
6003 fi
6004
6005 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6006 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6007
6008 # PORTME Fill in your ld.so characteristics
6009 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6010 echo "configure:6011: checking dynamic linker characteristics" >&5
6011 library_names_spec=
6012 libname_spec='lib$name'
6013 soname_spec=
6014 postinstall_cmds=
6015 postuninstall_cmds=
6016 finish_cmds=
6017 finish_eval=
6018 shlibpath_var=
6019 shlibpath_overrides_runpath=unknown
6020 version_type=none
6021 dynamic_linker="$host_os ld.so"
6022 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6023 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6024
6025 case $host_os in
6026 aix3*)
6027   version_type=linux
6028   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6029   shlibpath_var=LIBPATH
6030
6031   # AIX has no versioning support, so we append a major version to the name.
6032   soname_spec='${libname}${release}.so$major'
6033   ;;
6034
6035 aix4* | aix5*)
6036   version_type=linux
6037   need_lib_prefix=no
6038   need_version=no
6039   hardcode_into_libs=yes
6040   if test "$host_cpu" = ia64; then
6041     # AIX 5 supports IA64
6042     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6043     shlibpath_var=LD_LIBRARY_PATH
6044   else
6045     # With GCC up to 2.95.x, collect2 would create an import file
6046     # for dependence libraries.  The import file would start with
6047     # the line `#! .'.  This would cause the generated library to
6048     # depend on `.', always an invalid library.  This was fixed in
6049     # development snapshots of GCC prior to 3.0.
6050     case $host_os in
6051       aix4 | aix4.[01] | aix4.[01].*)
6052         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6053              echo ' yes '
6054              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6055           :
6056         else
6057           can_build_shared=no
6058         fi
6059         ;;
6060     esac
6061     # AIX (on Power*) has no versioning support, so currently we can
6062     # not hardcode correct soname into executable. Probably we can
6063     # add versioning support to collect2, so additional links can
6064     # be useful in future.
6065     if test "$aix_use_runtimelinking" = yes; then
6066       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6067       # instead of lib<name>.a to let people know that these are not
6068       # typical AIX shared libraries.
6069       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6070     else
6071       # We preserve .a as extension for shared libraries through AIX4.2
6072       # and later when we are not doing run time linking.
6073       library_names_spec='${libname}${release}.a $libname.a'
6074       soname_spec='${libname}${release}.so$major'
6075     fi
6076     shlibpath_var=LIBPATH
6077   fi
6078   hardcode_into_libs=yes
6079   ;;
6080
6081 amigaos*)
6082   library_names_spec='$libname.ixlibrary $libname.a'
6083   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6084   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'
6085   ;;
6086
6087 beos*)
6088   library_names_spec='${libname}.so'
6089   dynamic_linker="$host_os ld.so"
6090   shlibpath_var=LIBRARY_PATH
6091   ;;
6092
6093 bsdi4*)
6094   version_type=linux
6095   need_version=no
6096   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6097   soname_spec='${libname}${release}.so$major'
6098   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6099   shlibpath_var=LD_LIBRARY_PATH
6100   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6101   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6102   export_dynamic_flag_spec=-rdynamic
6103   # the default ld.so.conf also contains /usr/contrib/lib and
6104   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6105   # libtool to hard-code these into programs
6106   ;;
6107
6108 cygwin* | mingw* | pw32*)
6109   version_type=windows
6110   need_version=no
6111   need_lib_prefix=no
6112   case $GCC,$host_os in
6113   yes,cygwin*)
6114     library_names_spec='$libname.dll.a'
6115     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6116     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6117       dldir=$destdir/`dirname \$dlpath`~
6118       test -d \$dldir || mkdir -p \$dldir~
6119       $install_prog .libs/$dlname \$dldir/$dlname'
6120     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6121       dlpath=$dir/\$dldll~
6122        $rm \$dlpath'
6123     ;;
6124   yes,mingw*)
6125     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6126     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6127     ;;
6128   yes,pw32*)
6129     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6130     ;;
6131   *)
6132     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6133     ;;
6134   esac
6135   dynamic_linker='Win32 ld.exe'
6136   # FIXME: first we should search . and the directory the executable is in
6137   shlibpath_var=PATH
6138   ;;
6139
6140 darwin* | rhapsody*)
6141   dynamic_linker="$host_os dyld"
6142   version_type=darwin
6143   need_lib_prefix=no
6144   need_version=no
6145   # FIXME: Relying on posixy $() will cause problems for
6146   #        cross-compilation, but unfortunately the echo tests do not
6147   #        yet detect zsh echo's removal of \ escapes.
6148   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)'
6149   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6150   shlibpath_overrides_runpath=yes
6151   shlibpath_var=DYLD_LIBRARY_PATH
6152   ;;
6153
6154 freebsd1*)
6155   dynamic_linker=no
6156   ;;
6157
6158 freebsd*)
6159   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6160   version_type=freebsd-$objformat
6161   case $version_type in
6162     freebsd-elf*)
6163       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6164       need_version=no
6165       need_lib_prefix=no
6166       ;;
6167     freebsd-*)
6168       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6169       need_version=yes
6170       ;;
6171   esac
6172   shlibpath_var=LD_LIBRARY_PATH
6173   case $host_os in
6174   freebsd2*)
6175     shlibpath_overrides_runpath=yes
6176     ;;
6177   *)
6178     shlibpath_overrides_runpath=no
6179     hardcode_into_libs=yes
6180     ;;
6181   esac
6182   ;;
6183
6184 gnu*)
6185   version_type=linux
6186   need_lib_prefix=no
6187   need_version=no
6188   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6189   soname_spec='${libname}${release}.so$major'
6190   shlibpath_var=LD_LIBRARY_PATH
6191   hardcode_into_libs=yes
6192   ;;
6193
6194 hpux9* | hpux10* | hpux11*)
6195   # Give a soname corresponding to the major version so that dld.sl refuses to
6196   # link against other versions.
6197   dynamic_linker="$host_os dld.sl"
6198   version_type=sunos
6199   need_lib_prefix=no
6200   need_version=no
6201   shlibpath_var=SHLIB_PATH
6202   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6203   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6204   soname_spec='${libname}${release}.sl$major'
6205   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6206   postinstall_cmds='chmod 555 $lib'
6207   ;;
6208
6209 irix5* | irix6* | nonstopux*)
6210   case $host_os in
6211     nonstopux*) version_type=nonstopux ;;
6212     *)          version_type=irix ;;
6213   esac
6214   need_lib_prefix=no
6215   need_version=no
6216   soname_spec='${libname}${release}.so$major'
6217   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6218   case $host_os in
6219   irix5* | nonstopux*)
6220     libsuff= shlibsuff=
6221     ;;
6222   *)
6223     case $LD in # libtool.m4 will add one of these switches to LD
6224     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6225     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6226     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6227     *) libsuff= shlibsuff= libmagic=never-match;;
6228     esac
6229     ;;
6230   esac
6231   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6232   shlibpath_overrides_runpath=no
6233   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6234   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6235   ;;
6236
6237 # No shared lib support for Linux oldld, aout, or coff.
6238 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6239   dynamic_linker=no
6240   ;;
6241
6242 # This must be Linux ELF.
6243 linux-gnu*)
6244   version_type=linux
6245   need_lib_prefix=no
6246   need_version=no
6247   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6248   soname_spec='${libname}${release}.so$major'
6249   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6250   shlibpath_var=LD_LIBRARY_PATH
6251   shlibpath_overrides_runpath=no
6252   # This implies no fast_install, which is unacceptable.
6253   # Some rework will be needed to allow for fast_install
6254   # before this can be enabled.
6255   hardcode_into_libs=yes
6256
6257   # We used to test for /lib/ld.so.1 and disable shared libraries on
6258   # powerpc, because MkLinux only supported shared libraries with the
6259   # GNU dynamic linker.  Since this was broken with cross compilers,
6260   # most powerpc-linux boxes support dynamic linking these days and
6261   # people can always --disable-shared, the test was removed, and we
6262   # assume the GNU/Linux dynamic linker is in use.
6263   dynamic_linker='GNU/Linux ld.so'
6264   ;;
6265
6266 netbsd*)
6267   version_type=sunos
6268   need_lib_prefix=no
6269   need_version=no
6270   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6271     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6272     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6273     dynamic_linker='NetBSD (a.out) ld.so'
6274   else
6275     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6276     soname_spec='${libname}${release}.so$major'
6277     dynamic_linker='NetBSD ld.elf_so'
6278   fi
6279   shlibpath_var=LD_LIBRARY_PATH
6280   shlibpath_overrides_runpath=yes
6281   hardcode_into_libs=yes
6282   ;;
6283
6284 newsos6)
6285   version_type=linux
6286   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6287   shlibpath_var=LD_LIBRARY_PATH
6288   shlibpath_overrides_runpath=yes
6289   ;;
6290
6291 openbsd*)
6292   version_type=sunos
6293   need_lib_prefix=no
6294   need_version=no
6295   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6296     case "$host_os" in
6297     openbsd2.[89] | openbsd2.[89].*)
6298       shlibpath_overrides_runpath=no
6299       ;;
6300     *)
6301       shlibpath_overrides_runpath=yes
6302       ;;
6303     esac
6304   else
6305     shlibpath_overrides_runpath=yes
6306   fi
6307   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6308   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6309   shlibpath_var=LD_LIBRARY_PATH
6310   ;;
6311
6312 openedition*)
6313   need_lib_prefix=no
6314   need_version=no
6315   shlibpath_overrides_runpath=yes
6316   shlibpath_var=LIBPATH
6317   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6318   # the library's exports are in libname.x; this is the file that must
6319   # actually be linked with to use a DLL.
6320   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6321   ;;
6322
6323 os2*)
6324   libname_spec='$name'
6325   need_lib_prefix=no
6326   library_names_spec='$libname.dll $libname.a'
6327   dynamic_linker='OS/2 ld.exe'
6328   shlibpath_var=LIBPATH
6329   ;;
6330
6331 osf3* | osf4* | osf5*)
6332   version_type=osf
6333   need_version=no
6334   soname_spec='${libname}${release}.so$major'
6335   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6336   shlibpath_var=LD_LIBRARY_PATH
6337   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6338   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6339   hardcode_into_libs=yes
6340   ;;
6341
6342 sco3.2v5*)
6343   version_type=osf
6344   soname_spec='${libname}${release}.so$major'
6345   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6346   shlibpath_var=LD_LIBRARY_PATH
6347   ;;
6348
6349 solaris*)
6350   version_type=linux
6351   need_lib_prefix=no
6352   need_version=no
6353   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6354   soname_spec='${libname}${release}.so$major'
6355   shlibpath_var=LD_LIBRARY_PATH
6356   shlibpath_overrides_runpath=yes
6357   hardcode_into_libs=yes
6358   # ldd complains unless libraries are executable
6359   postinstall_cmds='chmod +x $lib'
6360   ;;
6361
6362 sunos4*)
6363   version_type=sunos
6364   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6365   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6366   shlibpath_var=LD_LIBRARY_PATH
6367   shlibpath_overrides_runpath=yes
6368   if test "$with_gnu_ld" = yes; then
6369     need_lib_prefix=no
6370   fi
6371   need_version=yes
6372   ;;
6373
6374 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6375   version_type=linux
6376   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6377   soname_spec='${libname}${release}.so$major'
6378   shlibpath_var=LD_LIBRARY_PATH
6379   case $host_vendor in
6380     sni)
6381       shlibpath_overrides_runpath=no
6382       need_lib_prefix=no
6383       export_dynamic_flag_spec='${wl}-Blargedynsym'
6384       runpath_var=LD_RUN_PATH
6385       ;;
6386     siemens)
6387       need_lib_prefix=no
6388       ;;
6389     motorola)
6390       need_lib_prefix=no
6391       need_version=no
6392       shlibpath_overrides_runpath=no
6393       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6394       ;;
6395   esac
6396   ;;
6397
6398 uts4*)
6399   version_type=linux
6400   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6401   soname_spec='${libname}${release}.so$major'
6402   shlibpath_var=LD_LIBRARY_PATH
6403   ;;
6404
6405 dgux*)
6406   version_type=linux
6407   need_lib_prefix=no
6408   need_version=no
6409   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6410   soname_spec='${libname}${release}.so$major'
6411   shlibpath_var=LD_LIBRARY_PATH
6412   ;;
6413
6414 sysv4*MP*)
6415   if test -d /usr/nec ;then
6416     version_type=linux
6417     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6418     soname_spec='$libname.so.$major'
6419     shlibpath_var=LD_LIBRARY_PATH
6420   fi
6421   ;;
6422
6423 *)
6424   dynamic_linker=no
6425   ;;
6426 esac
6427 echo "$ac_t""$dynamic_linker" 1>&6
6428 test "$dynamic_linker" = no && can_build_shared=no
6429
6430 # Report the final consequences.
6431 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6432 echo "configure:6433: checking if libtool supports shared libraries" >&5
6433 echo "$ac_t""$can_build_shared" 1>&6
6434
6435 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6436 echo "configure:6437: checking whether to build shared libraries" >&5
6437 test "$can_build_shared" = "no" && enable_shared=no
6438
6439 # On AIX, shared libraries and static libraries use the same namespace, and
6440 # are all built from PIC.
6441 case "$host_os" in
6442 aix3*)
6443   test "$enable_shared" = yes && enable_static=no
6444   if test -n "$RANLIB"; then
6445     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6446     postinstall_cmds='$RANLIB $lib'
6447   fi
6448   ;;
6449
6450 aix4*)
6451   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6452     test "$enable_shared" = yes && enable_static=no
6453   fi
6454   ;;
6455 esac
6456 echo "$ac_t""$enable_shared" 1>&6
6457
6458 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6459 echo "configure:6460: checking whether to build static libraries" >&5
6460 # Make sure either enable_shared or enable_static is yes.
6461 test "$enable_shared" = yes || enable_static=yes
6462 echo "$ac_t""$enable_static" 1>&6
6463
6464 if test "$hardcode_action" = relink; then
6465   # Fast installation is not supported
6466   enable_fast_install=no
6467 elif test "$shlibpath_overrides_runpath" = yes ||
6468      test "$enable_shared" = no; then
6469   # Fast installation is not necessary
6470   enable_fast_install=needless
6471 fi
6472
6473 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6474 if test "$GCC" = yes; then
6475   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6476 fi
6477
6478 if test "x$enable_dlopen" != xyes; then
6479   enable_dlopen=unknown
6480   enable_dlopen_self=unknown
6481   enable_dlopen_self_static=unknown
6482 else
6483   lt_cv_dlopen=no
6484   lt_cv_dlopen_libs=
6485
6486   case $host_os in
6487   beos*)
6488     lt_cv_dlopen="load_add_on"
6489     lt_cv_dlopen_libs=
6490     lt_cv_dlopen_self=yes
6491     ;;
6492
6493   cygwin* | mingw* | pw32*)
6494     lt_cv_dlopen="LoadLibrary"
6495     lt_cv_dlopen_libs=
6496    ;;
6497
6498   *)
6499     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6500 echo "configure:6501: checking for dllload" >&5
6501 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6502   echo $ac_n "(cached) $ac_c" 1>&6
6503 else
6504   cat > conftest.$ac_ext <<EOF
6505 #line 6506 "configure"
6506 #include "confdefs.h"
6507 /* System header to define __stub macros and hopefully few prototypes,
6508     which can conflict with char dllload(); below.  */
6509 #include <assert.h>
6510 /* Override any gcc2 internal prototype to avoid an error.  */
6511 /* We use char because int might match the return type of a gcc2
6512     builtin and then its argument prototype would still apply.  */
6513 char dllload();
6514 char (*f)();
6515
6516 int main() {
6517
6518 /* The GNU C library defines this for functions which it implements
6519     to always fail with ENOSYS.  Some functions are actually named
6520     something starting with __ and the normal name is an alias.  */
6521 #if defined (__stub_dllload) || defined (__stub___dllload)
6522 choke me
6523 #else
6524 f = dllload;
6525 #endif
6526
6527 ; return 0; }
6528 EOF
6529 if { (eval echo configure:6530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6530   rm -rf conftest*
6531   eval "ac_cv_func_dllload=yes"
6532 else
6533   echo "configure: failed program was:" >&5
6534   cat conftest.$ac_ext >&5
6535   rm -rf conftest*
6536   eval "ac_cv_func_dllload=no"
6537 fi
6538 rm -f conftest*
6539 fi
6540
6541 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6542   echo "$ac_t""yes" 1>&6
6543   lt_cv_dlopen="dllload"
6544 else
6545   echo "$ac_t""no" 1>&6
6546 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6547 echo "configure:6548: checking for shl_load" >&5
6548 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6549   echo $ac_n "(cached) $ac_c" 1>&6
6550 else
6551   cat > conftest.$ac_ext <<EOF
6552 #line 6553 "configure"
6553 #include "confdefs.h"
6554 /* System header to define __stub macros and hopefully few prototypes,
6555     which can conflict with char shl_load(); below.  */
6556 #include <assert.h>
6557 /* Override any gcc2 internal prototype to avoid an error.  */
6558 /* We use char because int might match the return type of a gcc2
6559     builtin and then its argument prototype would still apply.  */
6560 char shl_load();
6561 char (*f)();
6562
6563 int main() {
6564
6565 /* The GNU C library defines this for functions which it implements
6566     to always fail with ENOSYS.  Some functions are actually named
6567     something starting with __ and the normal name is an alias.  */
6568 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6569 choke me
6570 #else
6571 f = shl_load;
6572 #endif
6573
6574 ; return 0; }
6575 EOF
6576 if { (eval echo configure:6577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6577   rm -rf conftest*
6578   eval "ac_cv_func_shl_load=yes"
6579 else
6580   echo "configure: failed program was:" >&5
6581   cat conftest.$ac_ext >&5
6582   rm -rf conftest*
6583   eval "ac_cv_func_shl_load=no"
6584 fi
6585 rm -f conftest*
6586 fi
6587
6588 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6589   echo "$ac_t""yes" 1>&6
6590   lt_cv_dlopen="shl_load"
6591 else
6592   echo "$ac_t""no" 1>&6
6593 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6594 echo "configure:6595: checking for shl_load in -ldld" >&5
6595 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6596 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6597   echo $ac_n "(cached) $ac_c" 1>&6
6598 else
6599   ac_save_LIBS="$LIBS"
6600 LIBS="-ldld  $LIBS"
6601 cat > conftest.$ac_ext <<EOF
6602 #line 6603 "configure"
6603 #include "confdefs.h"
6604 /* Override any gcc2 internal prototype to avoid an error.  */
6605 /* We use char because int might match the return type of a gcc2
6606     builtin and then its argument prototype would still apply.  */
6607 char shl_load();
6608
6609 int main() {
6610 shl_load()
6611 ; return 0; }
6612 EOF
6613 if { (eval echo configure:6614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6614   rm -rf conftest*
6615   eval "ac_cv_lib_$ac_lib_var=yes"
6616 else
6617   echo "configure: failed program was:" >&5
6618   cat conftest.$ac_ext >&5
6619   rm -rf conftest*
6620   eval "ac_cv_lib_$ac_lib_var=no"
6621 fi
6622 rm -f conftest*
6623 LIBS="$ac_save_LIBS"
6624
6625 fi
6626 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6627   echo "$ac_t""yes" 1>&6
6628   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6629 else
6630   echo "$ac_t""no" 1>&6
6631 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6632 echo "configure:6633: checking for dlopen" >&5
6633 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6634   echo $ac_n "(cached) $ac_c" 1>&6
6635 else
6636   cat > conftest.$ac_ext <<EOF
6637 #line 6638 "configure"
6638 #include "confdefs.h"
6639 /* System header to define __stub macros and hopefully few prototypes,
6640     which can conflict with char dlopen(); below.  */
6641 #include <assert.h>
6642 /* Override any gcc2 internal prototype to avoid an error.  */
6643 /* We use char because int might match the return type of a gcc2
6644     builtin and then its argument prototype would still apply.  */
6645 char dlopen();
6646 char (*f)();
6647
6648 int main() {
6649
6650 /* The GNU C library defines this for functions which it implements
6651     to always fail with ENOSYS.  Some functions are actually named
6652     something starting with __ and the normal name is an alias.  */
6653 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6654 choke me
6655 #else
6656 f = dlopen;
6657 #endif
6658
6659 ; return 0; }
6660 EOF
6661 if { (eval echo configure:6662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6662   rm -rf conftest*
6663   eval "ac_cv_func_dlopen=yes"
6664 else
6665   echo "configure: failed program was:" >&5
6666   cat conftest.$ac_ext >&5
6667   rm -rf conftest*
6668   eval "ac_cv_func_dlopen=no"
6669 fi
6670 rm -f conftest*
6671 fi
6672
6673 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6674   echo "$ac_t""yes" 1>&6
6675   lt_cv_dlopen="dlopen"
6676 else
6677   echo "$ac_t""no" 1>&6
6678 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6679 echo "configure:6680: checking for dlopen in -ldl" >&5
6680 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6681 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6682   echo $ac_n "(cached) $ac_c" 1>&6
6683 else
6684   ac_save_LIBS="$LIBS"
6685 LIBS="-ldl  $LIBS"
6686 cat > conftest.$ac_ext <<EOF
6687 #line 6688 "configure"
6688 #include "confdefs.h"
6689 /* Override any gcc2 internal prototype to avoid an error.  */
6690 /* We use char because int might match the return type of a gcc2
6691     builtin and then its argument prototype would still apply.  */
6692 char dlopen();
6693
6694 int main() {
6695 dlopen()
6696 ; return 0; }
6697 EOF
6698 if { (eval echo configure:6699: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6699   rm -rf conftest*
6700   eval "ac_cv_lib_$ac_lib_var=yes"
6701 else
6702   echo "configure: failed program was:" >&5
6703   cat conftest.$ac_ext >&5
6704   rm -rf conftest*
6705   eval "ac_cv_lib_$ac_lib_var=no"
6706 fi
6707 rm -f conftest*
6708 LIBS="$ac_save_LIBS"
6709
6710 fi
6711 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6712   echo "$ac_t""yes" 1>&6
6713   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6714 else
6715   echo "$ac_t""no" 1>&6
6716 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6717 echo "configure:6718: checking for dlopen in -lsvld" >&5
6718 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6719 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6720   echo $ac_n "(cached) $ac_c" 1>&6
6721 else
6722   ac_save_LIBS="$LIBS"
6723 LIBS="-lsvld  $LIBS"
6724 cat > conftest.$ac_ext <<EOF
6725 #line 6726 "configure"
6726 #include "confdefs.h"
6727 /* Override any gcc2 internal prototype to avoid an error.  */
6728 /* We use char because int might match the return type of a gcc2
6729     builtin and then its argument prototype would still apply.  */
6730 char dlopen();
6731
6732 int main() {
6733 dlopen()
6734 ; return 0; }
6735 EOF
6736 if { (eval echo configure:6737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6737   rm -rf conftest*
6738   eval "ac_cv_lib_$ac_lib_var=yes"
6739 else
6740   echo "configure: failed program was:" >&5
6741   cat conftest.$ac_ext >&5
6742   rm -rf conftest*
6743   eval "ac_cv_lib_$ac_lib_var=no"
6744 fi
6745 rm -f conftest*
6746 LIBS="$ac_save_LIBS"
6747
6748 fi
6749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6750   echo "$ac_t""yes" 1>&6
6751   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6752 else
6753   echo "$ac_t""no" 1>&6
6754 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6755 echo "configure:6756: checking for dld_link in -ldld" >&5
6756 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6757 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6758   echo $ac_n "(cached) $ac_c" 1>&6
6759 else
6760   ac_save_LIBS="$LIBS"
6761 LIBS="-ldld  $LIBS"
6762 cat > conftest.$ac_ext <<EOF
6763 #line 6764 "configure"
6764 #include "confdefs.h"
6765 /* Override any gcc2 internal prototype to avoid an error.  */
6766 /* We use char because int might match the return type of a gcc2
6767     builtin and then its argument prototype would still apply.  */
6768 char dld_link();
6769
6770 int main() {
6771 dld_link()
6772 ; return 0; }
6773 EOF
6774 if { (eval echo configure:6775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6775   rm -rf conftest*
6776   eval "ac_cv_lib_$ac_lib_var=yes"
6777 else
6778   echo "configure: failed program was:" >&5
6779   cat conftest.$ac_ext >&5
6780   rm -rf conftest*
6781   eval "ac_cv_lib_$ac_lib_var=no"
6782 fi
6783 rm -f conftest*
6784 LIBS="$ac_save_LIBS"
6785
6786 fi
6787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6788   echo "$ac_t""yes" 1>&6
6789   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6790 else
6791   echo "$ac_t""no" 1>&6
6792 fi
6793
6794               
6795 fi
6796
6797             
6798 fi
6799
6800           
6801 fi
6802
6803         
6804 fi
6805
6806       
6807 fi
6808
6809     
6810 fi
6811
6812     ;;
6813   esac
6814
6815   if test "x$lt_cv_dlopen" != xno; then
6816     enable_dlopen=yes
6817   else
6818     enable_dlopen=no
6819   fi
6820
6821   case $lt_cv_dlopen in
6822   dlopen)
6823     save_CPPFLAGS="$CPPFLAGS"
6824         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6825
6826     save_LDFLAGS="$LDFLAGS"
6827     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6828
6829     save_LIBS="$LIBS"
6830     LIBS="$lt_cv_dlopen_libs $LIBS"
6831
6832     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6833 echo "configure:6834: checking whether a program can dlopen itself" >&5
6834 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6835   echo $ac_n "(cached) $ac_c" 1>&6
6836 else
6837           if test "$cross_compiling" = yes; then :
6838   lt_cv_dlopen_self=cross
6839 else
6840     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6841   lt_status=$lt_dlunknown
6842   cat > conftest.$ac_ext <<EOF
6843 #line 6844 "configure"
6844 #include "confdefs.h"
6845
6846 #if HAVE_DLFCN_H
6847 #include <dlfcn.h>
6848 #endif
6849
6850 #include <stdio.h>
6851
6852 #ifdef RTLD_GLOBAL
6853 #  define LT_DLGLOBAL           RTLD_GLOBAL
6854 #else
6855 #  ifdef DL_GLOBAL
6856 #    define LT_DLGLOBAL         DL_GLOBAL
6857 #  else
6858 #    define LT_DLGLOBAL         0
6859 #  endif
6860 #endif
6861
6862 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6863    find out it does not work in some platform. */
6864 #ifndef LT_DLLAZY_OR_NOW
6865 #  ifdef RTLD_LAZY
6866 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6867 #  else
6868 #    ifdef DL_LAZY
6869 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6870 #    else
6871 #      ifdef RTLD_NOW
6872 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6873 #      else
6874 #        ifdef DL_NOW
6875 #          define LT_DLLAZY_OR_NOW      DL_NOW
6876 #        else
6877 #          define LT_DLLAZY_OR_NOW      0
6878 #        endif
6879 #      endif
6880 #    endif
6881 #  endif
6882 #endif
6883
6884 #ifdef __cplusplus
6885 extern "C" void exit (int);
6886 #endif
6887
6888 void fnord() { int i=42;}
6889 int main ()
6890 {
6891   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6892   int status = $lt_dlunknown;
6893
6894   if (self)
6895     {
6896       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6897       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6898       /* dlclose (self); */
6899     }
6900
6901     exit (status);
6902 }
6903 EOF
6904   if { (eval echo configure:6905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6905     (./conftest; exit; ) 2>/dev/null
6906     lt_status=$?
6907     case x$lt_status in
6908       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6909       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6910       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6911     esac
6912   else :
6913     # compilation failed
6914     lt_cv_dlopen_self=no
6915   fi
6916 fi
6917 rm -fr conftest*
6918
6919     
6920 fi
6921
6922 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6923
6924     if test "x$lt_cv_dlopen_self" = xyes; then
6925       LDFLAGS="$LDFLAGS $link_static_flag"
6926       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6927 echo "configure:6928: checking whether a statically linked program can dlopen itself" >&5
6928 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6929   echo $ac_n "(cached) $ac_c" 1>&6
6930 else
6931           if test "$cross_compiling" = yes; then :
6932   lt_cv_dlopen_self_static=cross
6933 else
6934     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6935   lt_status=$lt_dlunknown
6936   cat > conftest.$ac_ext <<EOF
6937 #line 6938 "configure"
6938 #include "confdefs.h"
6939
6940 #if HAVE_DLFCN_H
6941 #include <dlfcn.h>
6942 #endif
6943
6944 #include <stdio.h>
6945
6946 #ifdef RTLD_GLOBAL
6947 #  define LT_DLGLOBAL           RTLD_GLOBAL
6948 #else
6949 #  ifdef DL_GLOBAL
6950 #    define LT_DLGLOBAL         DL_GLOBAL
6951 #  else
6952 #    define LT_DLGLOBAL         0
6953 #  endif
6954 #endif
6955
6956 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6957    find out it does not work in some platform. */
6958 #ifndef LT_DLLAZY_OR_NOW
6959 #  ifdef RTLD_LAZY
6960 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6961 #  else
6962 #    ifdef DL_LAZY
6963 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6964 #    else
6965 #      ifdef RTLD_NOW
6966 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6967 #      else
6968 #        ifdef DL_NOW
6969 #          define LT_DLLAZY_OR_NOW      DL_NOW
6970 #        else
6971 #          define LT_DLLAZY_OR_NOW      0
6972 #        endif
6973 #      endif
6974 #    endif
6975 #  endif
6976 #endif
6977
6978 #ifdef __cplusplus
6979 extern "C" void exit (int);
6980 #endif
6981
6982 void fnord() { int i=42;}
6983 int main ()
6984 {
6985   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6986   int status = $lt_dlunknown;
6987
6988   if (self)
6989     {
6990       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6991       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6992       /* dlclose (self); */
6993     }
6994
6995     exit (status);
6996 }
6997 EOF
6998   if { (eval echo configure:6999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6999     (./conftest; exit; ) 2>/dev/null
7000     lt_status=$?
7001     case x$lt_status in
7002       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7003       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7004       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7005     esac
7006   else :
7007     # compilation failed
7008     lt_cv_dlopen_self_static=no
7009   fi
7010 fi
7011 rm -fr conftest*
7012
7013       
7014 fi
7015
7016 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7017     fi
7018
7019     CPPFLAGS="$save_CPPFLAGS"
7020     LDFLAGS="$save_LDFLAGS"
7021     LIBS="$save_LIBS"
7022     ;;
7023   esac
7024
7025   case $lt_cv_dlopen_self in
7026   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7027   *) enable_dlopen_self=unknown ;;
7028   esac
7029
7030   case $lt_cv_dlopen_self_static in
7031   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7032   *) enable_dlopen_self_static=unknown ;;
7033   esac
7034 fi
7035
7036
7037 if test "$enable_shared" = yes && test "$GCC" = yes; then
7038   case $archive_cmds in
7039   *'~'*)
7040     # FIXME: we may have to deal with multi-command sequences.
7041     ;;
7042   '$CC '*)
7043     # Test whether the compiler implicitly links with -lc since on some
7044     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7045     # to ld, don't add -lc before -lgcc.
7046     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7047 echo "configure:7048: checking whether -lc should be explicitly linked in" >&5
7048     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7049   echo $ac_n "(cached) $ac_c" 1>&6
7050 else
7051   $rm conftest*
7052     echo 'static int dummy;' > conftest.$ac_ext
7053
7054     if { (eval echo configure:7055: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7055       soname=conftest
7056       lib=conftest
7057       libobjs=conftest.$ac_objext
7058       deplibs=
7059       wl=$lt_cv_prog_cc_wl
7060       compiler_flags=-v
7061       linker_flags=-v
7062       verstring=
7063       output_objdir=.
7064       libname=conftest
7065       save_allow_undefined_flag=$allow_undefined_flag
7066       allow_undefined_flag=
7067       if { (eval echo configure:7068: \"$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; }
7068       then
7069         lt_cv_archive_cmds_need_lc=no
7070       else
7071         lt_cv_archive_cmds_need_lc=yes
7072       fi
7073       allow_undefined_flag=$save_allow_undefined_flag
7074     else
7075       cat conftest.err 1>&5
7076     fi
7077 fi
7078
7079     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7080     ;;
7081   esac
7082 fi
7083 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7084
7085 # The second clause should only fire when bootstrapping the
7086 # libtool distribution, otherwise you forgot to ship ltmain.sh
7087 # with your package, and you will get complaints that there are
7088 # no rules to generate ltmain.sh.
7089 if test -f "$ltmain"; then
7090   :
7091 else
7092   # If there is no Makefile yet, we rely on a make rule to execute
7093   # `config.status --recheck' to rerun these tests and create the
7094   # libtool script then.
7095   test -f Makefile && make "$ltmain"
7096 fi
7097
7098 if test -f "$ltmain"; then
7099   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7100   $rm -f "${ofile}T"
7101
7102   echo creating $ofile
7103
7104   # Now quote all the things that may contain metacharacters while being
7105   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7106   # variables and quote the copies for generation of the libtool script.
7107   for var in echo old_CC old_CFLAGS SED \
7108     AR AR_FLAGS CC LD LN_S NM SHELL \
7109     reload_flag reload_cmds wl \
7110     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7111     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7112     library_names_spec soname_spec \
7113     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7114     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7115     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7116     old_striplib striplib file_magic_cmd export_symbols_cmds \
7117     deplibs_check_method allow_undefined_flag no_undefined_flag \
7118     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7119     global_symbol_to_c_name_address \
7120     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7121     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7122     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7123
7124     case $var in
7125     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7126     old_postinstall_cmds | old_postuninstall_cmds | \
7127     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7128     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7129     postinstall_cmds | postuninstall_cmds | \
7130     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7131       # Double-quote double-evaled strings.
7132       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7133       ;;
7134     *)
7135       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7136       ;;
7137     esac
7138   done
7139
7140   cat <<__EOF__ > "${ofile}T"
7141 #! $SHELL
7142
7143 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7144 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7145 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7146 #
7147 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7148 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7149 #
7150 # This program is free software; you can redistribute it and/or modify
7151 # it under the terms of the GNU General Public License as published by
7152 # the Free Software Foundation; either version 2 of the License, or
7153 # (at your option) any later version.
7154 #
7155 # This program is distributed in the hope that it will be useful, but
7156 # WITHOUT ANY WARRANTY; without even the implied warranty of
7157 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7158 # General Public License for more details.
7159 #
7160 # You should have received a copy of the GNU General Public License
7161 # along with this program; if not, write to the Free Software
7162 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7163 #
7164 # As a special exception to the GNU General Public License, if you
7165 # distribute this file as part of a program that contains a
7166 # configuration script generated by Autoconf, you may include it under
7167 # the same distribution terms that you use for the rest of that program.
7168
7169 # A sed that does not truncate output.
7170 SED=$lt_SED
7171
7172 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7173 Xsed="${SED} -e s/^X//"
7174
7175 # The HP-UX ksh and POSIX shell print the target directory to stdout
7176 # if CDPATH is set.
7177 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7178
7179 # ### BEGIN LIBTOOL CONFIG
7180
7181 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7182
7183 # Shell to use when invoking shell scripts.
7184 SHELL=$lt_SHELL
7185
7186 # Whether or not to build shared libraries.
7187 build_libtool_libs=$enable_shared
7188
7189 # Whether or not to build static libraries.
7190 build_old_libs=$enable_static
7191
7192 # Whether or not to add -lc for building shared libraries.
7193 build_libtool_need_lc=$need_lc
7194
7195 # Whether or not to optimize for fast installation.
7196 fast_install=$enable_fast_install
7197
7198 # The host system.
7199 host_alias=$host_alias
7200 host=$host
7201
7202 # An echo program that does not interpret backslashes.
7203 echo=$lt_echo
7204
7205 # The archiver.
7206 AR=$lt_AR
7207 AR_FLAGS=$lt_AR_FLAGS
7208
7209 # The default C compiler.
7210 CC=$lt_CC
7211
7212 # Is the compiler the GNU C compiler?
7213 with_gcc=$GCC
7214
7215 # The linker used to build libraries.
7216 LD=$lt_LD
7217
7218 # Whether we need hard or soft links.
7219 LN_S=$lt_LN_S
7220
7221 # A BSD-compatible nm program.
7222 NM=$lt_NM
7223
7224 # A symbol stripping program
7225 STRIP=$STRIP
7226
7227 # Used to examine libraries when file_magic_cmd begins "file"
7228 MAGIC_CMD=$MAGIC_CMD
7229
7230 # Used on cygwin: DLL creation program.
7231 DLLTOOL="$DLLTOOL"
7232
7233 # Used on cygwin: object dumper.
7234 OBJDUMP="$OBJDUMP"
7235
7236 # Used on cygwin: assembler.
7237 AS="$AS"
7238
7239 # The name of the directory that contains temporary libtool files.
7240 objdir=$objdir
7241
7242 # How to create reloadable object files.
7243 reload_flag=$lt_reload_flag
7244 reload_cmds=$lt_reload_cmds
7245
7246 # How to pass a linker flag through the compiler.
7247 wl=$lt_wl
7248
7249 # Object file suffix (normally "o").
7250 objext="$ac_objext"
7251
7252 # Old archive suffix (normally "a").
7253 libext="$libext"
7254
7255 # Executable file suffix (normally "").
7256 exeext="$exeext"
7257
7258 # Additional compiler flags for building library objects.
7259 pic_flag=$lt_pic_flag
7260 pic_mode=$pic_mode
7261
7262 # Does compiler simultaneously support -c and -o options?
7263 compiler_c_o=$lt_compiler_c_o
7264
7265 # Can we write directly to a .lo ?
7266 compiler_o_lo=$lt_compiler_o_lo
7267
7268 # Must we lock files when doing compilation ?
7269 need_locks=$lt_need_locks
7270
7271 # Do we need the lib prefix for modules?
7272 need_lib_prefix=$need_lib_prefix
7273
7274 # Do we need a version for libraries?
7275 need_version=$need_version
7276
7277 # Whether dlopen is supported.
7278 dlopen_support=$enable_dlopen
7279
7280 # Whether dlopen of programs is supported.
7281 dlopen_self=$enable_dlopen_self
7282
7283 # Whether dlopen of statically linked programs is supported.
7284 dlopen_self_static=$enable_dlopen_self_static
7285
7286 # Compiler flag to prevent dynamic linking.
7287 link_static_flag=$lt_link_static_flag
7288
7289 # Compiler flag to turn off builtin functions.
7290 no_builtin_flag=$lt_no_builtin_flag
7291
7292 # Compiler flag to allow reflexive dlopens.
7293 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7294
7295 # Compiler flag to generate shared objects directly from archives.
7296 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7297
7298 # Compiler flag to generate thread-safe objects.
7299 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7300
7301 # Library versioning type.
7302 version_type=$version_type
7303
7304 # Format of library name prefix.
7305 libname_spec=$lt_libname_spec
7306
7307 # List of archive names.  First name is the real one, the rest are links.
7308 # The last name is the one that the linker finds with -lNAME.
7309 library_names_spec=$lt_library_names_spec
7310
7311 # The coded name of the library, if different from the real name.
7312 soname_spec=$lt_soname_spec
7313
7314 # Commands used to build and install an old-style archive.
7315 RANLIB=$lt_RANLIB
7316 old_archive_cmds=$lt_old_archive_cmds
7317 old_postinstall_cmds=$lt_old_postinstall_cmds
7318 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7319
7320 # Create an old-style archive from a shared archive.
7321 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7322
7323 # Create a temporary old-style archive to link instead of a shared archive.
7324 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7325
7326 # Commands used to build and install a shared archive.
7327 archive_cmds=$lt_archive_cmds
7328 archive_expsym_cmds=$lt_archive_expsym_cmds
7329 postinstall_cmds=$lt_postinstall_cmds
7330 postuninstall_cmds=$lt_postuninstall_cmds
7331
7332 # Commands to strip libraries.
7333 old_striplib=$lt_old_striplib
7334 striplib=$lt_striplib
7335
7336 # Method to check whether dependent libraries are shared objects.
7337 deplibs_check_method=$lt_deplibs_check_method
7338
7339 # Command to use when deplibs_check_method == file_magic.
7340 file_magic_cmd=$lt_file_magic_cmd
7341
7342 # Flag that allows shared libraries with undefined symbols to be built.
7343 allow_undefined_flag=$lt_allow_undefined_flag
7344
7345 # Flag that forces no undefined symbols.
7346 no_undefined_flag=$lt_no_undefined_flag
7347
7348 # Commands used to finish a libtool library installation in a directory.
7349 finish_cmds=$lt_finish_cmds
7350
7351 # Same as above, but a single script fragment to be evaled but not shown.
7352 finish_eval=$lt_finish_eval
7353
7354 # Take the output of nm and produce a listing of raw symbols and C names.
7355 global_symbol_pipe=$lt_global_symbol_pipe
7356
7357 # Transform the output of nm in a proper C declaration
7358 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7359
7360 # Transform the output of nm in a C name address pair
7361 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7362
7363 # This is the shared library runtime path variable.
7364 runpath_var=$runpath_var
7365
7366 # This is the shared library path variable.
7367 shlibpath_var=$shlibpath_var
7368
7369 # Is shlibpath searched before the hard-coded library search path?
7370 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7371
7372 # How to hardcode a shared library path into an executable.
7373 hardcode_action=$hardcode_action
7374
7375 # Whether we should hardcode library paths into libraries.
7376 hardcode_into_libs=$hardcode_into_libs
7377
7378 # Flag to hardcode \$libdir into a binary during linking.
7379 # This must work even if \$libdir does not exist.
7380 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7381
7382 # Whether we need a single -rpath flag with a separated argument.
7383 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7384
7385 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7386 # resulting binary.
7387 hardcode_direct=$hardcode_direct
7388
7389 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7390 # resulting binary.
7391 hardcode_minus_L=$hardcode_minus_L
7392
7393 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7394 # the resulting binary.
7395 hardcode_shlibpath_var=$hardcode_shlibpath_var
7396
7397 # Variables whose values should be saved in libtool wrapper scripts and
7398 # restored at relink time.
7399 variables_saved_for_relink="$variables_saved_for_relink"
7400
7401 # Whether libtool must link a program against all its dependency libraries.
7402 link_all_deplibs=$link_all_deplibs
7403
7404 # Compile-time system search path for libraries
7405 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7406
7407 # Run-time system search path for libraries
7408 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7409
7410 # Fix the shell variable \$srcfile for the compiler.
7411 fix_srcfile_path="$fix_srcfile_path"
7412
7413 # Set to yes if exported symbols are required.
7414 always_export_symbols=$always_export_symbols
7415
7416 # The commands to list exported symbols.
7417 export_symbols_cmds=$lt_export_symbols_cmds
7418
7419 # The commands to extract the exported symbol list from a shared archive.
7420 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7421
7422 # Symbols that should not be listed in the preloaded symbols.
7423 exclude_expsyms=$lt_exclude_expsyms
7424
7425 # Symbols that must always be exported.
7426 include_expsyms=$lt_include_expsyms
7427
7428 # ### END LIBTOOL CONFIG
7429
7430 __EOF__
7431
7432   case $host_os in
7433   aix3*)
7434     cat <<\EOF >> "${ofile}T"
7435
7436 # AIX sometimes has problems with the GCC collect2 program.  For some
7437 # reason, if we set the COLLECT_NAMES environment variable, the problems
7438 # vanish in a puff of smoke.
7439 if test "X${COLLECT_NAMES+set}" != Xset; then
7440   COLLECT_NAMES=
7441   export COLLECT_NAMES
7442 fi
7443 EOF
7444     ;;
7445   esac
7446
7447   case $host_os in
7448   cygwin* | mingw* | pw32* | os2*)
7449     cat <<'EOF' >> "${ofile}T"
7450       # This is a source program that is used to create dlls on Windows
7451       # Don't remove nor modify the starting and closing comments
7452 # /* ltdll.c starts here */
7453 # #define WIN32_LEAN_AND_MEAN
7454 # #include <windows.h>
7455 # #undef WIN32_LEAN_AND_MEAN
7456 # #include <stdio.h>
7457 #
7458 # #ifndef __CYGWIN__
7459 # #  ifdef __CYGWIN32__
7460 # #    define __CYGWIN__ __CYGWIN32__
7461 # #  endif
7462 # #endif
7463 #
7464 # #ifdef __cplusplus
7465 # extern "C" {
7466 # #endif
7467 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7468 # #ifdef __cplusplus
7469 # }
7470 # #endif
7471 #
7472 # #ifdef __CYGWIN__
7473 # #include <cygwin/cygwin_dll.h>
7474 # DECLARE_CYGWIN_DLL( DllMain );
7475 # #endif
7476 # HINSTANCE __hDllInstance_base;
7477 #
7478 # BOOL APIENTRY
7479 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7480 # {
7481 #   __hDllInstance_base = hInst;
7482 #   return TRUE;
7483 # }
7484 # /* ltdll.c ends here */
7485         # This is a source program that is used to create import libraries
7486         # on Windows for dlls which lack them. Don't remove nor modify the
7487         # starting and closing comments
7488 # /* impgen.c starts here */
7489 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7490 #
7491 #  This file is part of GNU libtool.
7492 #
7493 #  This program is free software; you can redistribute it and/or modify
7494 #  it under the terms of the GNU General Public License as published by
7495 #  the Free Software Foundation; either version 2 of the License, or
7496 #  (at your option) any later version.
7497 #
7498 #  This program is distributed in the hope that it will be useful,
7499 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7500 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7501 #  GNU General Public License for more details.
7502 #
7503 #  You should have received a copy of the GNU General Public License
7504 #  along with this program; if not, write to the Free Software
7505 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7506 #  */
7507 #
7508 # #include <stdio.h>            /* for printf() */
7509 # #include <unistd.h>           /* for open(), lseek(), read() */
7510 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7511 # #include <string.h>           /* for strdup() */
7512 #
7513 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7514 # #ifndef O_BINARY
7515 # #define O_BINARY 0
7516 # #endif
7517 #
7518 # static unsigned int
7519 # pe_get16 (fd, offset)
7520 #      int fd;
7521 #      int offset;
7522 # {
7523 #   unsigned char b[2];
7524 #   lseek (fd, offset, SEEK_SET);
7525 #   read (fd, b, 2);
7526 #   return b[0] + (b[1]<<8);
7527 # }
7528 #
7529 # static unsigned int
7530 # pe_get32 (fd, offset)
7531 #     int fd;
7532 #     int offset;
7533 # {
7534 #   unsigned char b[4];
7535 #   lseek (fd, offset, SEEK_SET);
7536 #   read (fd, b, 4);
7537 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7538 # }
7539 #
7540 # static unsigned int
7541 # pe_as32 (ptr)
7542 #      void *ptr;
7543 # {
7544 #   unsigned char *b = ptr;
7545 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7546 # }
7547 #
7548 # int
7549 # main (argc, argv)
7550 #     int argc;
7551 #     char *argv[];
7552 # {
7553 #     int dll;
7554 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7555 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7556 #     unsigned long name_rvas, nexp;
7557 #     unsigned char *expdata, *erva;
7558 #     char *filename, *dll_name;
7559 #
7560 #     filename = argv[1];
7561 #
7562 #     dll = open(filename, O_RDONLY|O_BINARY);
7563 #     if (dll < 1)
7564 #       return 1;
7565 #
7566 #     dll_name = filename;
7567 #
7568 #     for (i=0; filename[i]; i++)
7569 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7570 #           dll_name = filename + i +1;
7571 #
7572 #     pe_header_offset = pe_get32 (dll, 0x3c);
7573 #     opthdr_ofs = pe_header_offset + 4 + 20;
7574 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7575 #
7576 #     if (num_entries < 1) /* no exports */
7577 #       return 1;
7578 #
7579 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7580 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7581 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7582 #     secptr = (pe_header_offset + 4 + 20 +
7583 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7584 #
7585 #     expptr = 0;
7586 #     for (i = 0; i < nsections; i++)
7587 #     {
7588 #       char sname[8];
7589 #       unsigned long secptr1 = secptr + 40 * i;
7590 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7591 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7592 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7593 #       lseek(dll, secptr1, SEEK_SET);
7594 #       read(dll, sname, 8);
7595 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7596 #       {
7597 #           expptr = fptr + (export_rva - vaddr);
7598 #           if (export_rva + export_size > vaddr + vsize)
7599 #               export_size = vsize - (export_rva - vaddr);
7600 #           break;
7601 #       }
7602 #     }
7603 #
7604 #     expdata = (unsigned char*)malloc(export_size);
7605 #     lseek (dll, expptr, SEEK_SET);
7606 #     read (dll, expdata, export_size);
7607 #     erva = expdata - export_rva;
7608 #
7609 #     nexp = pe_as32 (expdata+24);
7610 #     name_rvas = pe_as32 (expdata+32);
7611 #
7612 #     printf ("EXPORTS\n");
7613 #     for (i = 0; i<nexp; i++)
7614 #     {
7615 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7616 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7617 #     }
7618 #
7619 #     return 0;
7620 # }
7621 # /* impgen.c ends here */
7622
7623 EOF
7624     ;;
7625   esac
7626
7627   # We use sed instead of cat because bash on DJGPP gets confused if
7628   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7629   # text mode, it properly converts lines to CR/LF.  This bash problem
7630   # is reportedly fixed, but why not run on old versions too?
7631   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7632
7633   mv -f "${ofile}T" "$ofile" || \
7634     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7635   chmod +x "$ofile"
7636 fi
7637
7638
7639
7640
7641
7642 # This can be used to rebuild libtool when needed
7643 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7644
7645 # Always use our own libtool.
7646 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7647
7648 # Prevent multiple expansion
7649
7650
7651
7652 # test for ln hardlink support
7653 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7654 echo "configure:7655: checking whether ln works" >&5
7655 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7656   echo $ac_n "(cached) $ac_c" 1>&6
7657 else
7658   rm -f conftest.src conftest.dst
7659 echo "conftest" > conftest.src
7660 if ln conftest.src conftest.dst 2>/dev/null
7661 then
7662   ol_cv_prog_LN_H="ln"
7663 else
7664   ol_cv_prog_LN_H="cp"
7665 fi
7666 rm -f conftest.src conftest.dst
7667
7668 fi
7669 LN_H="$ol_cv_prog_LN_H"
7670 if test "$ol_cv_prog_LN_H" = "ln"; then
7671         echo "$ac_t""yes" 1>&6
7672 else
7673         echo "$ac_t""no" 1>&6
7674 fi
7675
7676 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7677 echo "configure:7678: checking whether ln -s works" >&5
7678 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7679   echo $ac_n "(cached) $ac_c" 1>&6
7680 else
7681   rm -f conftestdata
7682 if ln -s X conftestdata 2>/dev/null
7683 then
7684   rm -f conftestdata
7685   ac_cv_prog_LN_S="ln -s"
7686 else
7687   ac_cv_prog_LN_S=ln
7688 fi
7689 fi
7690 LN_S="$ac_cv_prog_LN_S"
7691 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7692   echo "$ac_t""yes" 1>&6
7693 else
7694   echo "$ac_t""no" 1>&6
7695 fi
7696
7697
7698 ol_link_perl=no
7699 if test $ol_enable_perl != no ; then
7700         # Extract the first word of "perl", so it can be a program name with args.
7701 set dummy perl; ac_word=$2
7702 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7703 echo "configure:7704: checking for $ac_word" >&5
7704 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7705   echo $ac_n "(cached) $ac_c" 1>&6
7706 else
7707   case "$PERLBIN" in
7708   /*)
7709   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7710   ;;
7711   ?:/*)
7712   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7713   ;;
7714   *)
7715   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7716   ac_dummy="$PATH"
7717   for ac_dir in $ac_dummy; do 
7718     test -z "$ac_dir" && ac_dir=.
7719     if test -f $ac_dir/$ac_word; then
7720       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7721       break
7722     fi
7723   done
7724   IFS="$ac_save_ifs"
7725   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7726   ;;
7727 esac
7728 fi
7729 PERLBIN="$ac_cv_path_PERLBIN"
7730 if test -n "$PERLBIN"; then
7731   echo "$ac_t""$PERLBIN" 1>&6
7732 else
7733   echo "$ac_t""no" 1>&6
7734 fi
7735
7736
7737         if test "no$PERLBIN" = "no" ; then
7738                 if test $ol_enable_perl = yes ; then
7739                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7740                 fi
7741
7742         else
7743                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7744                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7745
7746                 if test x"$ol_enable_perl" = "xyes" ; then
7747                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7748                 else
7749                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7750                 fi
7751                                 ol_link_perl=yes
7752         fi
7753 fi
7754
7755 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7756 echo "configure:7757: checking how to run the C preprocessor" >&5
7757 # On Suns, sometimes $CPP names a directory.
7758 if test -n "$CPP" && test -d "$CPP"; then
7759   CPP=
7760 fi
7761 if test -z "$CPP"; then
7762 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7763   echo $ac_n "(cached) $ac_c" 1>&6
7764 else
7765     # This must be in double quotes, not single quotes, because CPP may get
7766   # substituted into the Makefile and "${CC-cc}" will confuse make.
7767   CPP="${CC-cc} -E"
7768   # On the NeXT, cc -E runs the code through the compiler's parser,
7769   # not just through cpp.
7770   cat > conftest.$ac_ext <<EOF
7771 #line 7772 "configure"
7772 #include "confdefs.h"
7773 #include <assert.h>
7774 Syntax Error
7775 EOF
7776 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7777 { (eval echo configure:7778: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7778 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7779 if test -z "$ac_err"; then
7780   :
7781 else
7782   echo "$ac_err" >&5
7783   echo "configure: failed program was:" >&5
7784   cat conftest.$ac_ext >&5
7785   rm -rf conftest*
7786   CPP="${CC-cc} -E -traditional-cpp"
7787   cat > conftest.$ac_ext <<EOF
7788 #line 7789 "configure"
7789 #include "confdefs.h"
7790 #include <assert.h>
7791 Syntax Error
7792 EOF
7793 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7794 { (eval echo configure:7795: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7795 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7796 if test -z "$ac_err"; then
7797   :
7798 else
7799   echo "$ac_err" >&5
7800   echo "configure: failed program was:" >&5
7801   cat conftest.$ac_ext >&5
7802   rm -rf conftest*
7803   CPP="${CC-cc} -nologo -E"
7804   cat > conftest.$ac_ext <<EOF
7805 #line 7806 "configure"
7806 #include "confdefs.h"
7807 #include <assert.h>
7808 Syntax Error
7809 EOF
7810 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7811 { (eval echo configure:7812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7812 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7813 if test -z "$ac_err"; then
7814   :
7815 else
7816   echo "$ac_err" >&5
7817   echo "configure: failed program was:" >&5
7818   cat conftest.$ac_ext >&5
7819   rm -rf conftest*
7820   CPP=/lib/cpp
7821 fi
7822 rm -f conftest*
7823 fi
7824 rm -f conftest*
7825 fi
7826 rm -f conftest*
7827   ac_cv_prog_CPP="$CPP"
7828 fi
7829   CPP="$ac_cv_prog_CPP"
7830 else
7831   ac_cv_prog_CPP="$CPP"
7832 fi
7833 echo "$ac_t""$CPP" 1>&6
7834
7835
7836
7837 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7838 echo "configure:7839: checking for Cygwin environment" >&5
7839 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7840   echo $ac_n "(cached) $ac_c" 1>&6
7841 else
7842   cat > conftest.$ac_ext <<EOF
7843 #line 7844 "configure"
7844 #include "confdefs.h"
7845
7846 int main() {
7847
7848 #ifndef __CYGWIN__
7849 #define __CYGWIN__ __CYGWIN32__
7850 #endif
7851 return __CYGWIN__;
7852 ; return 0; }
7853 EOF
7854 if { (eval echo configure:7855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7855   rm -rf conftest*
7856   ac_cv_cygwin=yes
7857 else
7858   echo "configure: failed program was:" >&5
7859   cat conftest.$ac_ext >&5
7860   rm -rf conftest*
7861   ac_cv_cygwin=no
7862 fi
7863 rm -f conftest*
7864 fi
7865
7866 echo "$ac_t""$ac_cv_cygwin" 1>&6
7867 CYGWIN=
7868 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7869 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7870 echo "configure:7871: checking for mingw32 environment" >&5
7871 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7872   echo $ac_n "(cached) $ac_c" 1>&6
7873 else
7874   cat > conftest.$ac_ext <<EOF
7875 #line 7876 "configure"
7876 #include "confdefs.h"
7877
7878 int main() {
7879 return __MINGW32__;
7880 ; return 0; }
7881 EOF
7882 if { (eval echo configure:7883: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7883   rm -rf conftest*
7884   ac_cv_mingw32=yes
7885 else
7886   echo "configure: failed program was:" >&5
7887   cat conftest.$ac_ext >&5
7888   rm -rf conftest*
7889   ac_cv_mingw32=no
7890 fi
7891 rm -f conftest*
7892 fi
7893
7894 echo "$ac_t""$ac_cv_mingw32" 1>&6
7895 MINGW32=
7896 test "$ac_cv_mingw32" = yes && MINGW32=yes
7897
7898
7899
7900 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7901 echo "configure:7902: checking for executable suffix" >&5
7902 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7903   echo $ac_n "(cached) $ac_c" 1>&6
7904 else
7905   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7906   ac_cv_exeext=.exe
7907 else
7908   rm -f conftest*
7909   echo 'int main () { return 0; }' > conftest.$ac_ext
7910   ac_cv_exeext=
7911   if { (eval echo configure:7912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7912     for file in conftest.*; do
7913       case $file in
7914       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7915       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7916       esac
7917     done
7918   else
7919     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7920   fi
7921   rm -f conftest*
7922   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7923 fi
7924 fi
7925
7926 EXEEXT=""
7927 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7928 echo "$ac_t""${ac_cv_exeext}" 1>&6
7929 ac_exeext=$EXEEXT
7930
7931 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7932 echo "configure:7933: checking for object suffix" >&5
7933 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7934   echo $ac_n "(cached) $ac_c" 1>&6
7935 else
7936   rm -f conftest*
7937 echo 'int i = 1;' > conftest.$ac_ext
7938 if { (eval echo configure:7939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7939   for ac_file in conftest.*; do
7940     case $ac_file in
7941     *.c) ;;
7942     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7943     esac
7944   done
7945 else
7946   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7947 fi
7948 rm -f conftest*
7949 fi
7950
7951 echo "$ac_t""$ac_cv_objext" 1>&6
7952 OBJEXT=$ac_cv_objext
7953 ac_objext=$ac_cv_objext
7954
7955
7956 cat >> confdefs.h <<EOF
7957 #define EXEEXT "${EXEEXT}"
7958 EOF
7959
7960
7961 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7962 echo "configure:7963: checking for be_app in -lbe" >&5
7963 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7964 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7965   echo $ac_n "(cached) $ac_c" 1>&6
7966 else
7967   ac_save_LIBS="$LIBS"
7968 LIBS="-lbe -lroot -lnet $LIBS"
7969 cat > conftest.$ac_ext <<EOF
7970 #line 7971 "configure"
7971 #include "confdefs.h"
7972 /* Override any gcc2 internal prototype to avoid an error.  */
7973 /* We use char because int might match the return type of a gcc2
7974     builtin and then its argument prototype would still apply.  */
7975 char be_app();
7976
7977 int main() {
7978 be_app()
7979 ; return 0; }
7980 EOF
7981 if { (eval echo configure:7982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7982   rm -rf conftest*
7983   eval "ac_cv_lib_$ac_lib_var=yes"
7984 else
7985   echo "configure: failed program was:" >&5
7986   cat conftest.$ac_ext >&5
7987   rm -rf conftest*
7988   eval "ac_cv_lib_$ac_lib_var=no"
7989 fi
7990 rm -f conftest*
7991 LIBS="$ac_save_LIBS"
7992
7993 fi
7994 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7995   echo "$ac_t""yes" 1>&6
7996   LIBS="$LIBS -lbe -lroot -lnet"
7997 else
7998   echo "$ac_t""no" 1>&6
7999 :
8000 fi
8001
8002
8003
8004
8005
8006 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8007 echo "configure:8008: checking for ${CC-cc} option to accept ANSI C" >&5
8008 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8009   echo $ac_n "(cached) $ac_c" 1>&6
8010 else
8011   am_cv_prog_cc_stdc=no
8012 ac_save_CC="$CC"
8013 # Don't try gcc -ansi; that turns off useful extensions and
8014 # breaks some systems' header files.
8015 # AIX                   -qlanglvl=ansi
8016 # Ultrix and OSF/1      -std1
8017 # HP-UX 10.20 and later -Ae
8018 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8019 # SVR4                  -Xc -D__EXTENSIONS__
8020 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8021 do
8022   CC="$ac_save_CC $ac_arg"
8023   cat > conftest.$ac_ext <<EOF
8024 #line 8025 "configure"
8025 #include "confdefs.h"
8026 #include <stdarg.h>
8027 #include <stdio.h>
8028 #include <sys/types.h>
8029 #include <sys/stat.h>
8030 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8031 struct buf { int x; };
8032 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8033 static char *e (p, i)
8034      char **p;
8035      int i;
8036 {
8037   return p[i];
8038 }
8039 static char *f (char * (*g) (char **, int), char **p, ...)
8040 {
8041   char *s;
8042   va_list v;
8043   va_start (v,p);
8044   s = g (p, va_arg (v,int));
8045   va_end (v);
8046   return s;
8047 }
8048 int test (int i, double x);
8049 struct s1 {int (*f) (int a);};
8050 struct s2 {int (*f) (double a);};
8051 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8052 int argc;
8053 char **argv;
8054
8055 int main() {
8056
8057 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8058
8059 ; return 0; }
8060 EOF
8061 if { (eval echo configure:8062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8062   rm -rf conftest*
8063   am_cv_prog_cc_stdc="$ac_arg"; break
8064 else
8065   echo "configure: failed program was:" >&5
8066   cat conftest.$ac_ext >&5
8067 fi
8068 rm -f conftest*
8069 done
8070 CC="$ac_save_CC"
8071
8072 fi
8073
8074 if test -z "$am_cv_prog_cc_stdc"; then
8075   echo "$ac_t""none needed" 1>&6
8076 else
8077   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8078 fi
8079 case "x$am_cv_prog_cc_stdc" in
8080   x|xno) ;;
8081   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8082 esac
8083
8084 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8085         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8086 fi
8087
8088 # test for make depend flag
8089 OL_MKDEP=
8090 OL_MKDEP_FLAGS=
8091 if test -z "${MKDEP}"; then
8092         OL_MKDEP="${CC-cc}"
8093         if test -z "${MKDEP_FLAGS}"; then
8094                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8095 echo "configure:8096: checking for ${OL_MKDEP} depend flag" >&5
8096 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8097   echo $ac_n "(cached) $ac_c" 1>&6
8098 else
8099   
8100                         ol_cv_mkdep=no
8101                         for flag in "-M" "-xM"; do
8102                                 cat > conftest.c <<EOF
8103  noCode;
8104 EOF
8105                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8106: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8106                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8107                                 then
8108                                         if test ! -f conftest."${ac_object}" ; then
8109                                                 ol_cv_mkdep=$flag
8110                                                 OL_MKDEP_FLAGS="$flag"
8111                                                 break
8112                                         fi
8113                                 fi
8114                         done
8115                         rm -f conftest*
8116                 
8117 fi
8118
8119 echo "$ac_t""$ol_cv_mkdep" 1>&6
8120         else
8121                 cc_cv_mkdep=yes
8122                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8123         fi
8124 else
8125         cc_cv_mkdep=yes
8126         OL_MKDEP="${MKDEP}"
8127         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8128 fi
8129
8130
8131
8132 if test "${ol_cv_mkdep}" = no ; then
8133         # this will soon become an error
8134         echo "configure: warning: do not know how to generate dependencies" 1>&2
8135 fi
8136
8137 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8138 echo "configure:8139: checking for afopen in -ls" >&5
8139 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8140 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8141   echo $ac_n "(cached) $ac_c" 1>&6
8142 else
8143   ac_save_LIBS="$LIBS"
8144 LIBS="-ls  $LIBS"
8145 cat > conftest.$ac_ext <<EOF
8146 #line 8147 "configure"
8147 #include "confdefs.h"
8148 /* Override any gcc2 internal prototype to avoid an error.  */
8149 /* We use char because int might match the return type of a gcc2
8150     builtin and then its argument prototype would still apply.  */
8151 char afopen();
8152
8153 int main() {
8154 afopen()
8155 ; return 0; }
8156 EOF
8157 if { (eval echo configure:8158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8158   rm -rf conftest*
8159   eval "ac_cv_lib_$ac_lib_var=yes"
8160 else
8161   echo "configure: failed program was:" >&5
8162   cat conftest.$ac_ext >&5
8163   rm -rf conftest*
8164   eval "ac_cv_lib_$ac_lib_var=no"
8165 fi
8166 rm -f conftest*
8167 LIBS="$ac_save_LIBS"
8168
8169 fi
8170 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8171   echo "$ac_t""yes" 1>&6
8172   
8173         AUTH_LIBS=-ls
8174         cat >> confdefs.h <<\EOF
8175 #define HAVE_AIX_SECURITY 1
8176 EOF
8177
8178
8179 else
8180   echo "$ac_t""no" 1>&6
8181 fi
8182
8183
8184 case "$target" in
8185 *-ibm-openedition)
8186         ac_cv_func_getopt=no
8187         cat >> confdefs.h <<\EOF
8188 #define BOTH_STRINGS_H 1
8189 EOF
8190
8191         ;;
8192 esac
8193
8194 ol_link_modules=no
8195 if test $ol_enable_modules != no ; then
8196         for ac_hdr in ltdl.h
8197 do
8198 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8199 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8200 echo "configure:8201: checking for $ac_hdr" >&5
8201 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8202   echo $ac_n "(cached) $ac_c" 1>&6
8203 else
8204   cat > conftest.$ac_ext <<EOF
8205 #line 8206 "configure"
8206 #include "confdefs.h"
8207 #include <$ac_hdr>
8208 EOF
8209 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8210 { (eval echo configure:8211: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8211 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8212 if test -z "$ac_err"; then
8213   rm -rf conftest*
8214   eval "ac_cv_header_$ac_safe=yes"
8215 else
8216   echo "$ac_err" >&5
8217   echo "configure: failed program was:" >&5
8218   cat conftest.$ac_ext >&5
8219   rm -rf conftest*
8220   eval "ac_cv_header_$ac_safe=no"
8221 fi
8222 rm -f conftest*
8223 fi
8224 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8225   echo "$ac_t""yes" 1>&6
8226     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8227   cat >> confdefs.h <<EOF
8228 #define $ac_tr_hdr 1
8229 EOF
8230  
8231 else
8232   echo "$ac_t""no" 1>&6
8233 fi
8234 done
8235
8236
8237         if test $ac_cv_header_ltdl_h = no ; then
8238                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8239         fi
8240
8241         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8242 echo "configure:8243: checking for lt_dlinit in -lltdl" >&5
8243 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8244 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8245   echo $ac_n "(cached) $ac_c" 1>&6
8246 else
8247   ac_save_LIBS="$LIBS"
8248 LIBS="-lltdl  $LIBS"
8249 cat > conftest.$ac_ext <<EOF
8250 #line 8251 "configure"
8251 #include "confdefs.h"
8252 /* Override any gcc2 internal prototype to avoid an error.  */
8253 /* We use char because int might match the return type of a gcc2
8254     builtin and then its argument prototype would still apply.  */
8255 char lt_dlinit();
8256
8257 int main() {
8258 lt_dlinit()
8259 ; return 0; }
8260 EOF
8261 if { (eval echo configure:8262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8262   rm -rf conftest*
8263   eval "ac_cv_lib_$ac_lib_var=yes"
8264 else
8265   echo "configure: failed program was:" >&5
8266   cat conftest.$ac_ext >&5
8267   rm -rf conftest*
8268   eval "ac_cv_lib_$ac_lib_var=no"
8269 fi
8270 rm -f conftest*
8271 LIBS="$ac_save_LIBS"
8272
8273 fi
8274 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8275   echo "$ac_t""yes" 1>&6
8276   
8277                 MODULES_LIBS=-lltdl
8278                 cat >> confdefs.h <<\EOF
8279 #define HAVE_LIBLTDL 1
8280 EOF
8281
8282         
8283 else
8284   echo "$ac_t""no" 1>&6
8285 fi
8286
8287
8288         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8289                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8290         fi
8291         ol_link_modules=yes
8292
8293 else
8294         for i in $Backends; do
8295                 eval "ol_tmp=\$ol_enable_$i"
8296                 if test $ol_tmp = mod ; then
8297                         echo "configure: warning: building static $i backend" 1>&2
8298                         eval "ol_enable_$i=yes"
8299                 fi
8300         done
8301         for i in $Overlays; do
8302                 eval "ol_tmp=\$ol_enable_$i"
8303                 if test $ol_tmp = mod ; then
8304                         echo "configure: warning: building static $i overlay" 1>&2
8305                         eval "ol_enable_$i=yes"
8306                 fi
8307         done
8308 fi
8309
8310 # test for EBCDIC
8311 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8312 echo "configure:8313: checking for EBCDIC" >&5
8313 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8314   echo $ac_n "(cached) $ac_c" 1>&6
8315 else
8316   
8317         cat > conftest.$ac_ext <<EOF
8318 #line 8319 "configure"
8319 #include "confdefs.h"
8320
8321 #if !('M' == 0xd4)
8322 #include <__ASCII__/generate_error.h>
8323 #endif
8324
8325 EOF
8326 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8327 { (eval echo configure:8328: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8328 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8329 if test -z "$ac_err"; then
8330   rm -rf conftest*
8331   ol_cv_cpp_ebcdic=yes
8332 else
8333   echo "$ac_err" >&5
8334   echo "configure: failed program was:" >&5
8335   cat conftest.$ac_ext >&5
8336   rm -rf conftest*
8337   ol_cv_cpp_ebcdic=no
8338 fi
8339 rm -f conftest*
8340 fi
8341
8342 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8343 if test $ol_cv_cpp_ebcdic = yes ; then
8344         cat >> confdefs.h <<\EOF
8345 #define HAVE_EBCDIC 1
8346 EOF
8347
8348 fi
8349
8350 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8351 echo "configure:8352: checking for ANSI C header files" >&5
8352 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8353   echo $ac_n "(cached) $ac_c" 1>&6
8354 else
8355   cat > conftest.$ac_ext <<EOF
8356 #line 8357 "configure"
8357 #include "confdefs.h"
8358 #include <stdlib.h>
8359 #include <stdarg.h>
8360 #include <string.h>
8361 #include <float.h>
8362 EOF
8363 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8364 { (eval echo configure:8365: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8365 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8366 if test -z "$ac_err"; then
8367   rm -rf conftest*
8368   ol_cv_header_stdc=yes
8369 else
8370   echo "$ac_err" >&5
8371   echo "configure: failed program was:" >&5
8372   cat conftest.$ac_ext >&5
8373   rm -rf conftest*
8374   ol_cv_header_stdc=no
8375 fi
8376 rm -f conftest*
8377
8378 if test $ol_cv_header_stdc = yes; then
8379   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8380 cat > conftest.$ac_ext <<EOF
8381 #line 8382 "configure"
8382 #include "confdefs.h"
8383 #include <string.h>
8384 EOF
8385 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8386   egrep "memchr" >/dev/null 2>&1; then
8387   :
8388 else
8389   rm -rf conftest*
8390   ol_cv_header_stdc=no
8391 fi
8392 rm -f conftest*
8393
8394 fi
8395
8396 if test $ol_cv_header_stdc = yes; then
8397   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8398 cat > conftest.$ac_ext <<EOF
8399 #line 8400 "configure"
8400 #include "confdefs.h"
8401 #include <stdlib.h>
8402 EOF
8403 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8404   egrep "free" >/dev/null 2>&1; then
8405   :
8406 else
8407   rm -rf conftest*
8408   ol_cv_header_stdc=no
8409 fi
8410 rm -f conftest*
8411
8412 fi
8413
8414 if test $ol_cv_header_stdc = yes; then
8415   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8416 if test "$cross_compiling" = yes; then
8417   :
8418 else
8419   cat > conftest.$ac_ext <<EOF
8420 #line 8421 "configure"
8421 #include "confdefs.h"
8422 #include <ctype.h>
8423 #ifndef HAVE_EBCDIC
8424 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8425 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8426 #else
8427 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8428                 || ('j' <= (c) && (c) <= 'r') \
8429                 || ('s' <= (c) && (c) <= 'z'))
8430 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8431 #endif
8432 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8433 int main () { int i; for (i = 0; i < 256; i++)
8434 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8435 exit (0); }
8436
8437 EOF
8438 if { (eval echo configure:8439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8439 then
8440   :
8441 else
8442   echo "configure: failed program was:" >&5
8443   cat conftest.$ac_ext >&5
8444   rm -fr conftest*
8445   ol_cv_header_stdc=no
8446 fi
8447 rm -fr conftest*
8448 fi
8449
8450 fi
8451 fi
8452
8453 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8454 if test $ol_cv_header_stdc = yes; then
8455   cat >> confdefs.h <<\EOF
8456 #define STDC_HEADERS 1
8457 EOF
8458
8459 fi
8460 ac_cv_header_stdc=disable
8461
8462
8463 if test $ol_cv_header_stdc != yes; then
8464         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8465 fi
8466
8467 ac_header_dirent=no
8468 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8469 do
8470 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8471 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8472 echo "configure:8473: checking for $ac_hdr that defines DIR" >&5
8473 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8474   echo $ac_n "(cached) $ac_c" 1>&6
8475 else
8476   cat > conftest.$ac_ext <<EOF
8477 #line 8478 "configure"
8478 #include "confdefs.h"
8479 #include <sys/types.h>
8480 #include <$ac_hdr>
8481 int main() {
8482 DIR *dirp = 0;
8483 ; return 0; }
8484 EOF
8485 if { (eval echo configure:8486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8486   rm -rf conftest*
8487   eval "ac_cv_header_dirent_$ac_safe=yes"
8488 else
8489   echo "configure: failed program was:" >&5
8490   cat conftest.$ac_ext >&5
8491   rm -rf conftest*
8492   eval "ac_cv_header_dirent_$ac_safe=no"
8493 fi
8494 rm -f conftest*
8495 fi
8496 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8497   echo "$ac_t""yes" 1>&6
8498     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8499   cat >> confdefs.h <<EOF
8500 #define $ac_tr_hdr 1
8501 EOF
8502  ac_header_dirent=$ac_hdr; break
8503 else
8504   echo "$ac_t""no" 1>&6
8505 fi
8506 done
8507 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8508 if test $ac_header_dirent = dirent.h; then
8509 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8510 echo "configure:8511: checking for opendir in -ldir" >&5
8511 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8512 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8513   echo $ac_n "(cached) $ac_c" 1>&6
8514 else
8515   ac_save_LIBS="$LIBS"
8516 LIBS="-ldir  $LIBS"
8517 cat > conftest.$ac_ext <<EOF
8518 #line 8519 "configure"
8519 #include "confdefs.h"
8520 /* Override any gcc2 internal prototype to avoid an error.  */
8521 /* We use char because int might match the return type of a gcc2
8522     builtin and then its argument prototype would still apply.  */
8523 char opendir();
8524
8525 int main() {
8526 opendir()
8527 ; return 0; }
8528 EOF
8529 if { (eval echo configure:8530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8530   rm -rf conftest*
8531   eval "ac_cv_lib_$ac_lib_var=yes"
8532 else
8533   echo "configure: failed program was:" >&5
8534   cat conftest.$ac_ext >&5
8535   rm -rf conftest*
8536   eval "ac_cv_lib_$ac_lib_var=no"
8537 fi
8538 rm -f conftest*
8539 LIBS="$ac_save_LIBS"
8540
8541 fi
8542 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8543   echo "$ac_t""yes" 1>&6
8544   LIBS="$LIBS -ldir"
8545 else
8546   echo "$ac_t""no" 1>&6
8547 fi
8548
8549 else
8550 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8551 echo "configure:8552: checking for opendir in -lx" >&5
8552 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8553 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8554   echo $ac_n "(cached) $ac_c" 1>&6
8555 else
8556   ac_save_LIBS="$LIBS"
8557 LIBS="-lx  $LIBS"
8558 cat > conftest.$ac_ext <<EOF
8559 #line 8560 "configure"
8560 #include "confdefs.h"
8561 /* Override any gcc2 internal prototype to avoid an error.  */
8562 /* We use char because int might match the return type of a gcc2
8563     builtin and then its argument prototype would still apply.  */
8564 char opendir();
8565
8566 int main() {
8567 opendir()
8568 ; return 0; }
8569 EOF
8570 if { (eval echo configure:8571: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8571   rm -rf conftest*
8572   eval "ac_cv_lib_$ac_lib_var=yes"
8573 else
8574   echo "configure: failed program was:" >&5
8575   cat conftest.$ac_ext >&5
8576   rm -rf conftest*
8577   eval "ac_cv_lib_$ac_lib_var=no"
8578 fi
8579 rm -f conftest*
8580 LIBS="$ac_save_LIBS"
8581
8582 fi
8583 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8584   echo "$ac_t""yes" 1>&6
8585   LIBS="$LIBS -lx"
8586 else
8587   echo "$ac_t""no" 1>&6
8588 fi
8589
8590 fi
8591
8592 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8593 echo "configure:8594: checking for sys/wait.h that is POSIX.1 compatible" >&5
8594 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8595   echo $ac_n "(cached) $ac_c" 1>&6
8596 else
8597   cat > conftest.$ac_ext <<EOF
8598 #line 8599 "configure"
8599 #include "confdefs.h"
8600 #include <sys/types.h>
8601 #include <sys/wait.h>
8602 #ifndef WEXITSTATUS
8603 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8604 #endif
8605 #ifndef WIFEXITED
8606 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8607 #endif
8608 int main() {
8609 int s;
8610 wait (&s);
8611 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8612 ; return 0; }
8613 EOF
8614 if { (eval echo configure:8615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8615   rm -rf conftest*
8616   ac_cv_header_sys_wait_h=yes
8617 else
8618   echo "configure: failed program was:" >&5
8619   cat conftest.$ac_ext >&5
8620   rm -rf conftest*
8621   ac_cv_header_sys_wait_h=no
8622 fi
8623 rm -f conftest*
8624 fi
8625
8626 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8627 if test $ac_cv_header_sys_wait_h = yes; then
8628   cat >> confdefs.h <<\EOF
8629 #define HAVE_SYS_WAIT_H 1
8630 EOF
8631
8632 fi
8633
8634 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8635 echo "configure:8636: checking POSIX termios" >&5
8636 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8637   echo $ac_n "(cached) $ac_c" 1>&6
8638 else
8639   cat > conftest.$ac_ext <<EOF
8640 #line 8641 "configure"
8641 #include "confdefs.h"
8642 #include <sys/types.h>
8643 #include <unistd.h>
8644 #include <termios.h>
8645 int main() {
8646 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8647    tcgetattr(0, 0);
8648 ; return 0; }
8649 EOF
8650 if { (eval echo configure:8651: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8651   rm -rf conftest*
8652   am_cv_sys_posix_termios=yes
8653 else
8654   echo "configure: failed program was:" >&5
8655   cat conftest.$ac_ext >&5
8656   rm -rf conftest*
8657   am_cv_sys_posix_termios=no
8658 fi
8659 rm -f conftest*
8660 fi
8661
8662 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8663
8664
8665  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8666 echo "configure:8667: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8667 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8668   echo $ac_n "(cached) $ac_c" 1>&6
8669 else
8670   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8671
8672   gwinsz_in_termios_h=no
8673   if test $am_cv_sys_posix_termios = yes; then
8674     cat > conftest.$ac_ext <<EOF
8675 #line 8676 "configure"
8676 #include "confdefs.h"
8677 #include <sys/types.h>
8678 #     include <termios.h>
8679 #     ifdef TIOCGWINSZ
8680         yes
8681 #     endif
8682     
8683 EOF
8684 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8685   egrep "yes" >/dev/null 2>&1; then
8686   rm -rf conftest*
8687   gwinsz_in_termios_h=yes
8688 fi
8689 rm -f conftest*
8690
8691   fi
8692
8693   if test $gwinsz_in_termios_h = no; then
8694     cat > conftest.$ac_ext <<EOF
8695 #line 8696 "configure"
8696 #include "confdefs.h"
8697 #include <sys/types.h>
8698 #     include <sys/ioctl.h>
8699 #     ifdef TIOCGWINSZ
8700         yes
8701 #     endif
8702     
8703 EOF
8704 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8705   egrep "yes" >/dev/null 2>&1; then
8706   rm -rf conftest*
8707   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8708 fi
8709 rm -f conftest*
8710
8711   fi
8712   
8713 fi
8714
8715 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8716   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8717     cat >> confdefs.h <<\EOF
8718 #define GWINSZ_IN_SYS_IOCTL 1
8719 EOF
8720
8721   fi
8722
8723 if test $am_cv_sys_posix_termios = yes ; then
8724         cat >> confdefs.h <<\EOF
8725 #define HAVE_POSIX_TERMIOS 1
8726 EOF
8727
8728 fi
8729
8730 for ac_hdr in \
8731         arpa/inet.h             \
8732         arpa/nameser.h  \
8733         assert.h                \
8734         bits/types.h    \
8735         conio.h                 \
8736         crypt.h                 \
8737         direct.h                \
8738         errno.h                 \
8739         fcntl.h                 \
8740         filio.h                 \
8741         getopt.h                \
8742         grp.h                   \
8743         io.h                    \
8744         libutil.h               \
8745         limits.h                \
8746         locale.h                \
8747         netinet/tcp.h   \
8748         malloc.h                \
8749         memory.h                \
8750         psap.h                  \
8751         pwd.h                   \
8752         process.h               \
8753         resolv.h                \
8754         sgtty.h                 \
8755         shadow.h                \
8756         stddef.h                \
8757         string.h                \
8758         strings.h               \
8759         sysexits.h              \
8760         sys/file.h              \
8761         sys/filio.h             \
8762         sys/errno.h             \
8763         sys/ioctl.h             \
8764         sys/param.h             \
8765         sys/resource.h  \
8766         sys/select.h    \
8767         sys/socket.h    \
8768         sys/stat.h              \
8769         sys/syslog.h    \
8770         sys/time.h              \
8771         sys/types.h             \
8772         sys/ucred.h             \
8773         sys/uio.h               \
8774         syslog.h                \
8775         termios.h               \
8776         unistd.h                \
8777         winsock.h               \
8778         winsock2.h              \
8779
8780 do
8781 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8782 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8783 echo "configure:8784: checking for $ac_hdr" >&5
8784 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8785   echo $ac_n "(cached) $ac_c" 1>&6
8786 else
8787   cat > conftest.$ac_ext <<EOF
8788 #line 8789 "configure"
8789 #include "confdefs.h"
8790 #include <$ac_hdr>
8791 EOF
8792 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8793 { (eval echo configure:8794: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8794 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8795 if test -z "$ac_err"; then
8796   rm -rf conftest*
8797   eval "ac_cv_header_$ac_safe=yes"
8798 else
8799   echo "$ac_err" >&5
8800   echo "configure: failed program was:" >&5
8801   cat conftest.$ac_ext >&5
8802   rm -rf conftest*
8803   eval "ac_cv_header_$ac_safe=no"
8804 fi
8805 rm -f conftest*
8806 fi
8807 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8808   echo "$ac_t""yes" 1>&6
8809     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8810   cat >> confdefs.h <<EOF
8811 #define $ac_tr_hdr 1
8812 EOF
8813  
8814 else
8815   echo "$ac_t""no" 1>&6
8816 fi
8817 done
8818
8819
8820
8821
8822 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8823 echo "configure:8824: checking for sigset in -lV3" >&5
8824 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8825 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8826   echo $ac_n "(cached) $ac_c" 1>&6
8827 else
8828   ac_save_LIBS="$LIBS"
8829 LIBS="-lV3  $LIBS"
8830 cat > conftest.$ac_ext <<EOF
8831 #line 8832 "configure"
8832 #include "confdefs.h"
8833 /* Override any gcc2 internal prototype to avoid an error.  */
8834 /* We use char because int might match the return type of a gcc2
8835     builtin and then its argument prototype would still apply.  */
8836 char sigset();
8837
8838 int main() {
8839 sigset()
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 V3 | 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="-lV3 $LIBS"
8864
8865 else
8866   echo "$ac_t""no" 1>&6
8867 fi
8868
8869
8870 if test "$ac_cv_header_winsock_h" = yes; then
8871 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8872 echo "configure:8873: checking for winsock" >&5
8873 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8874   echo $ac_n "(cached) $ac_c" 1>&6
8875 else
8876   save_LIBS="$LIBS"
8877 for curlib in ws2_32 wsock32; do
8878         LIBS="$LIBS -l$curlib"
8879         cat > conftest.$ac_ext <<EOF
8880 #line 8881 "configure"
8881 #include "confdefs.h"
8882 #include <winsock.h>
8883                         
8884 int main() {
8885
8886                         socket(0,0,0);
8887                         select(0,NULL,NULL,NULL,NULL);
8888                         closesocket(0);
8889                         gethostname(NULL,0);
8890                         
8891 ; return 0; }
8892 EOF
8893 if { (eval echo configure:8894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8894   rm -rf conftest*
8895   ol_cv_winsock=yes
8896 else
8897   echo "configure: failed program was:" >&5
8898   cat conftest.$ac_ext >&5
8899   rm -rf conftest*
8900   ol_cv_winsock=no
8901 fi
8902 rm -f conftest*
8903
8904         if test $ol_cv_winsock = yes; then
8905                 cat >> confdefs.h <<\EOF
8906 #define HAVE_WINSOCK 1
8907 EOF
8908
8909                 ac_cv_func_socket=yes
8910                 ac_cv_func_select=yes
8911                 ac_cv_func_closesocket=yes
8912                 ac_cv_func_gethostname=yes
8913                 if test $curlib = ws2_32; then
8914                         ol_cv_winsock=winsock2
8915                         cat >> confdefs.h <<\EOF
8916 #define HAVE_WINSOCK2 1
8917 EOF
8918
8919                 fi
8920                 break
8921         fi
8922         LIBS="$save_LIBS"
8923 done
8924 fi
8925
8926 echo "$ac_t""$ol_cv_winsock" 1>&6
8927 fi
8928
8929
8930 echo $ac_n "checking for socket""... $ac_c" 1>&6
8931 echo "configure:8932: checking for socket" >&5
8932 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
8933   echo $ac_n "(cached) $ac_c" 1>&6
8934 else
8935   cat > conftest.$ac_ext <<EOF
8936 #line 8937 "configure"
8937 #include "confdefs.h"
8938 /* System header to define __stub macros and hopefully few prototypes,
8939     which can conflict with char socket(); below.  */
8940 #include <assert.h>
8941 /* Override any gcc2 internal prototype to avoid an error.  */
8942 /* We use char because int might match the return type of a gcc2
8943     builtin and then its argument prototype would still apply.  */
8944 char socket();
8945 char (*f)();
8946
8947 int main() {
8948
8949 /* The GNU C library defines this for functions which it implements
8950     to always fail with ENOSYS.  Some functions are actually named
8951     something starting with __ and the normal name is an alias.  */
8952 #if defined (__stub_socket) || defined (__stub___socket)
8953 choke me
8954 #else
8955 f = socket;
8956 #endif
8957
8958 ; return 0; }
8959 EOF
8960 if { (eval echo configure:8961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8961   rm -rf conftest*
8962   eval "ac_cv_func_socket=yes"
8963 else
8964   echo "configure: failed program was:" >&5
8965   cat conftest.$ac_ext >&5
8966   rm -rf conftest*
8967   eval "ac_cv_func_socket=no"
8968 fi
8969 rm -f conftest*
8970 fi
8971
8972 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8973   echo "$ac_t""yes" 1>&6
8974   :
8975 else
8976   echo "$ac_t""no" 1>&6
8977         
8978         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
8979 echo "configure:8980: checking for main in -lsocket" >&5
8980 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
8981 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8982   echo $ac_n "(cached) $ac_c" 1>&6
8983 else
8984   ac_save_LIBS="$LIBS"
8985 LIBS="-lsocket  $LIBS"
8986 cat > conftest.$ac_ext <<EOF
8987 #line 8988 "configure"
8988 #include "confdefs.h"
8989
8990 int main() {
8991 main()
8992 ; return 0; }
8993 EOF
8994 if { (eval echo configure:8995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8995   rm -rf conftest*
8996   eval "ac_cv_lib_$ac_lib_var=yes"
8997 else
8998   echo "configure: failed program was:" >&5
8999   cat conftest.$ac_ext >&5
9000   rm -rf conftest*
9001   eval "ac_cv_lib_$ac_lib_var=no"
9002 fi
9003 rm -f conftest*
9004 LIBS="$ac_save_LIBS"
9005
9006 fi
9007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9008   echo "$ac_t""yes" 1>&6
9009     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9010     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9011   cat >> confdefs.h <<EOF
9012 #define $ac_tr_lib 1
9013 EOF
9014
9015   LIBS="-lsocket $LIBS"
9016
9017 else
9018   echo "$ac_t""no" 1>&6
9019 fi
9020
9021         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9022 echo "configure:9023: checking for main in -lnet" >&5
9023 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9024 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9025   echo $ac_n "(cached) $ac_c" 1>&6
9026 else
9027   ac_save_LIBS="$LIBS"
9028 LIBS="-lnet  $LIBS"
9029 cat > conftest.$ac_ext <<EOF
9030 #line 9031 "configure"
9031 #include "confdefs.h"
9032
9033 int main() {
9034 main()
9035 ; return 0; }
9036 EOF
9037 if { (eval echo configure:9038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9038   rm -rf conftest*
9039   eval "ac_cv_lib_$ac_lib_var=yes"
9040 else
9041   echo "configure: failed program was:" >&5
9042   cat conftest.$ac_ext >&5
9043   rm -rf conftest*
9044   eval "ac_cv_lib_$ac_lib_var=no"
9045 fi
9046 rm -f conftest*
9047 LIBS="$ac_save_LIBS"
9048
9049 fi
9050 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9051   echo "$ac_t""yes" 1>&6
9052     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9053     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9054   cat >> confdefs.h <<EOF
9055 #define $ac_tr_lib 1
9056 EOF
9057
9058   LIBS="-lnet $LIBS"
9059
9060 else
9061   echo "$ac_t""no" 1>&6
9062 fi
9063
9064         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9065 echo "configure:9066: checking for main in -lnsl_s" >&5
9066 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9067 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9068   echo $ac_n "(cached) $ac_c" 1>&6
9069 else
9070   ac_save_LIBS="$LIBS"
9071 LIBS="-lnsl_s  $LIBS"
9072 cat > conftest.$ac_ext <<EOF
9073 #line 9074 "configure"
9074 #include "confdefs.h"
9075
9076 int main() {
9077 main()
9078 ; return 0; }
9079 EOF
9080 if { (eval echo configure:9081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9081   rm -rf conftest*
9082   eval "ac_cv_lib_$ac_lib_var=yes"
9083 else
9084   echo "configure: failed program was:" >&5
9085   cat conftest.$ac_ext >&5
9086   rm -rf conftest*
9087   eval "ac_cv_lib_$ac_lib_var=no"
9088 fi
9089 rm -f conftest*
9090 LIBS="$ac_save_LIBS"
9091
9092 fi
9093 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9094   echo "$ac_t""yes" 1>&6
9095     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9096     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9097   cat >> confdefs.h <<EOF
9098 #define $ac_tr_lib 1
9099 EOF
9100
9101   LIBS="-lnsl_s $LIBS"
9102
9103 else
9104   echo "$ac_t""no" 1>&6
9105 fi
9106
9107         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9108 echo "configure:9109: checking for main in -lnsl" >&5
9109 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9110 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9111   echo $ac_n "(cached) $ac_c" 1>&6
9112 else
9113   ac_save_LIBS="$LIBS"
9114 LIBS="-lnsl  $LIBS"
9115 cat > conftest.$ac_ext <<EOF
9116 #line 9117 "configure"
9117 #include "confdefs.h"
9118
9119 int main() {
9120 main()
9121 ; return 0; }
9122 EOF
9123 if { (eval echo configure:9124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9124   rm -rf conftest*
9125   eval "ac_cv_lib_$ac_lib_var=yes"
9126 else
9127   echo "configure: failed program was:" >&5
9128   cat conftest.$ac_ext >&5
9129   rm -rf conftest*
9130   eval "ac_cv_lib_$ac_lib_var=no"
9131 fi
9132 rm -f conftest*
9133 LIBS="$ac_save_LIBS"
9134
9135 fi
9136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9137   echo "$ac_t""yes" 1>&6
9138     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9139     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9140   cat >> confdefs.h <<EOF
9141 #define $ac_tr_lib 1
9142 EOF
9143
9144   LIBS="-lnsl $LIBS"
9145
9146 else
9147   echo "$ac_t""no" 1>&6
9148 fi
9149
9150         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9151 echo "configure:9152: checking for socket in -linet" >&5
9152 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9153 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9154   echo $ac_n "(cached) $ac_c" 1>&6
9155 else
9156   ac_save_LIBS="$LIBS"
9157 LIBS="-linet  $LIBS"
9158 cat > conftest.$ac_ext <<EOF
9159 #line 9160 "configure"
9160 #include "confdefs.h"
9161 /* Override any gcc2 internal prototype to avoid an error.  */
9162 /* We use char because int might match the return type of a gcc2
9163     builtin and then its argument prototype would still apply.  */
9164 char socket();
9165
9166 int main() {
9167 socket()
9168 ; return 0; }
9169 EOF
9170 if { (eval echo configure:9171: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9171   rm -rf conftest*
9172   eval "ac_cv_lib_$ac_lib_var=yes"
9173 else
9174   echo "configure: failed program was:" >&5
9175   cat conftest.$ac_ext >&5
9176   rm -rf conftest*
9177   eval "ac_cv_lib_$ac_lib_var=no"
9178 fi
9179 rm -f conftest*
9180 LIBS="$ac_save_LIBS"
9181
9182 fi
9183 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9184   echo "$ac_t""yes" 1>&6
9185     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9186     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9187   cat >> confdefs.h <<EOF
9188 #define $ac_tr_lib 1
9189 EOF
9190
9191   LIBS="-linet $LIBS"
9192
9193 else
9194   echo "$ac_t""no" 1>&6
9195 fi
9196
9197         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9198 echo "configure:9199: checking for main in -lgen" >&5
9199 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9200 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9201   echo $ac_n "(cached) $ac_c" 1>&6
9202 else
9203   ac_save_LIBS="$LIBS"
9204 LIBS="-lgen  $LIBS"
9205 cat > conftest.$ac_ext <<EOF
9206 #line 9207 "configure"
9207 #include "confdefs.h"
9208
9209 int main() {
9210 main()
9211 ; return 0; }
9212 EOF
9213 if { (eval echo configure:9214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9214   rm -rf conftest*
9215   eval "ac_cv_lib_$ac_lib_var=yes"
9216 else
9217   echo "configure: failed program was:" >&5
9218   cat conftest.$ac_ext >&5
9219   rm -rf conftest*
9220   eval "ac_cv_lib_$ac_lib_var=no"
9221 fi
9222 rm -f conftest*
9223 LIBS="$ac_save_LIBS"
9224
9225 fi
9226 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9227   echo "$ac_t""yes" 1>&6
9228     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9229     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9230   cat >> confdefs.h <<EOF
9231 #define $ac_tr_lib 1
9232 EOF
9233
9234   LIBS="-lgen $LIBS"
9235
9236 else
9237   echo "$ac_t""no" 1>&6
9238 fi
9239
9240
9241 fi
9242
9243
9244 echo $ac_n "checking for select""... $ac_c" 1>&6
9245 echo "configure:9246: checking for select" >&5
9246 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9247   echo $ac_n "(cached) $ac_c" 1>&6
9248 else
9249   cat > conftest.$ac_ext <<EOF
9250 #line 9251 "configure"
9251 #include "confdefs.h"
9252 /* System header to define __stub macros and hopefully few prototypes,
9253     which can conflict with char select(); below.  */
9254 #include <assert.h>
9255 /* Override any gcc2 internal prototype to avoid an error.  */
9256 /* We use char because int might match the return type of a gcc2
9257     builtin and then its argument prototype would still apply.  */
9258 char select();
9259 char (*f)();
9260
9261 int main() {
9262
9263 /* The GNU C library defines this for functions which it implements
9264     to always fail with ENOSYS.  Some functions are actually named
9265     something starting with __ and the normal name is an alias.  */
9266 #if defined (__stub_select) || defined (__stub___select)
9267 choke me
9268 #else
9269 f = select;
9270 #endif
9271
9272 ; return 0; }
9273 EOF
9274 if { (eval echo configure:9275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9275   rm -rf conftest*
9276   eval "ac_cv_func_select=yes"
9277 else
9278   echo "configure: failed program was:" >&5
9279   cat conftest.$ac_ext >&5
9280   rm -rf conftest*
9281   eval "ac_cv_func_select=no"
9282 fi
9283 rm -f conftest*
9284 fi
9285
9286 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9287   echo "$ac_t""yes" 1>&6
9288   :
9289 else
9290   echo "$ac_t""no" 1>&6
9291 { echo "configure: error: select() required." 1>&2; exit 1; }
9292 fi
9293
9294
9295 if test "${ac_cv_header_winsock_h}" != yes; then
9296                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9297 echo "configure:9298: checking types of arguments for select()" >&5
9298  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9299   echo $ac_n "(cached) $ac_c" 1>&6
9300 else
9301    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9302   echo $ac_n "(cached) $ac_c" 1>&6
9303 else
9304     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9305   echo $ac_n "(cached) $ac_c" 1>&6
9306 else
9307      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9308      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9309       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9310        cat > conftest.$ac_ext <<EOF
9311 #line 9312 "configure"
9312 #include "confdefs.h"
9313 #ifdef HAVE_SYS_TYPES_H
9314 #include <sys/types.h>
9315 #endif
9316 #ifdef HAVE_SYS_TIME_H
9317 #include <sys/time.h>
9318 #endif
9319 #ifdef HAVE_SYS_SELECT_H
9320 #include <sys/select.h>
9321 #endif
9322 #ifdef HAVE_SYS_SOCKET_H
9323 #include <sys/socket.h>
9324 #endif
9325 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);
9326 int main() {
9327
9328 ; return 0; }
9329 EOF
9330 if { (eval echo configure:9331: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9331   rm -rf conftest*
9332           ac_not_found=no ; break 3
9333 else
9334   echo "configure: failed program was:" >&5
9335   cat conftest.$ac_ext >&5
9336   rm -rf conftest*
9337   ac_not_found=yes
9338 fi
9339 rm -f conftest*
9340       done
9341      done
9342     done
9343    
9344 fi
9345   
9346 fi
9347  
9348 fi
9349  if test "$ac_not_found" = yes; then
9350   ac_cv_func_select_arg1=int 
9351   ac_cv_func_select_arg234='int *' 
9352   ac_cv_func_select_arg5='struct timeval *'
9353  fi
9354  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9355  cat >> confdefs.h <<EOF
9356 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9357 EOF
9358
9359  cat >> confdefs.h <<EOF
9360 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9361 EOF
9362
9363  cat >> confdefs.h <<EOF
9364 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9365 EOF
9366
9367
9368 fi
9369
9370
9371 for ac_hdr in regex.h 
9372 do
9373 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9374 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9375 echo "configure:9376: checking for $ac_hdr" >&5
9376 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9377   echo $ac_n "(cached) $ac_c" 1>&6
9378 else
9379   cat > conftest.$ac_ext <<EOF
9380 #line 9381 "configure"
9381 #include "confdefs.h"
9382 #include <$ac_hdr>
9383 EOF
9384 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9385 { (eval echo configure:9386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9386 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9387 if test -z "$ac_err"; then
9388   rm -rf conftest*
9389   eval "ac_cv_header_$ac_safe=yes"
9390 else
9391   echo "$ac_err" >&5
9392   echo "configure: failed program was:" >&5
9393   cat conftest.$ac_ext >&5
9394   rm -rf conftest*
9395   eval "ac_cv_header_$ac_safe=no"
9396 fi
9397 rm -f conftest*
9398 fi
9399 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9400   echo "$ac_t""yes" 1>&6
9401     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9402   cat >> confdefs.h <<EOF
9403 #define $ac_tr_hdr 1
9404 EOF
9405  
9406 else
9407   echo "$ac_t""no" 1>&6
9408 fi
9409 done
9410
9411 if test "$ac_cv_header_regex_h" != yes ; then
9412         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9413 fi
9414
9415 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9416 echo "configure:9417: checking for library containing regfree" >&5
9417 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9418   echo $ac_n "(cached) $ac_c" 1>&6
9419 else
9420   ac_func_search_save_LIBS="$LIBS"
9421 ac_cv_search_regfree="no"
9422 cat > conftest.$ac_ext <<EOF
9423 #line 9424 "configure"
9424 #include "confdefs.h"
9425 /* Override any gcc2 internal prototype to avoid an error.  */
9426 /* We use char because int might match the return type of a gcc2
9427     builtin and then its argument prototype would still apply.  */
9428 char regfree();
9429
9430 int main() {
9431 regfree()
9432 ; return 0; }
9433 EOF
9434 if { (eval echo configure:9435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9435   rm -rf conftest*
9436   ac_cv_search_regfree="none required"
9437 else
9438   echo "configure: failed program was:" >&5
9439   cat conftest.$ac_ext >&5
9440 fi
9441 rm -f conftest*
9442 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9443 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9444 cat > conftest.$ac_ext <<EOF
9445 #line 9446 "configure"
9446 #include "confdefs.h"
9447 /* Override any gcc2 internal prototype to avoid an error.  */
9448 /* We use char because int might match the return type of a gcc2
9449     builtin and then its argument prototype would still apply.  */
9450 char regfree();
9451
9452 int main() {
9453 regfree()
9454 ; return 0; }
9455 EOF
9456 if { (eval echo configure:9457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9457   rm -rf conftest*
9458   ac_cv_search_regfree="-l$ac_lib"
9459 break
9460 else
9461   echo "configure: failed program was:" >&5
9462   cat conftest.$ac_ext >&5
9463 fi
9464 rm -f conftest*
9465 done
9466 LIBS="$ac_func_search_save_LIBS"
9467 fi
9468
9469 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9470 if test "$ac_cv_search_regfree" != "no"; then
9471   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9472   :
9473 else :
9474   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9475 fi
9476
9477
9478 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9479 echo "configure:9480: checking for compatible POSIX regex" >&5
9480 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9481   echo $ac_n "(cached) $ac_c" 1>&6
9482 else
9483   
9484         if test "$cross_compiling" = yes; then
9485   ol_cv_c_posix_regex=cross
9486 else
9487   cat > conftest.$ac_ext <<EOF
9488 #line 9489 "configure"
9489 #include "confdefs.h"
9490
9491 #include <sys/types.h>
9492 #include <regex.h>
9493 static char *pattern, *string;
9494 main()
9495 {
9496         int rc;
9497         regex_t re;
9498
9499         pattern = "^A";
9500
9501         if(regcomp(&re, pattern, 0)) {
9502                 return -1;
9503         }
9504         
9505         string = "ALL MATCH";
9506         
9507         rc = regexec(&re, string, 0, (void*)0, 0);
9508
9509         regfree(&re);
9510
9511         return rc;
9512 }
9513 EOF
9514 if { (eval echo configure:9515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9515 then
9516   ol_cv_c_posix_regex=yes
9517 else
9518   echo "configure: failed program was:" >&5
9519   cat conftest.$ac_ext >&5
9520   rm -fr conftest*
9521   ol_cv_c_posix_regex=no
9522 fi
9523 rm -fr conftest*
9524 fi
9525
9526 fi
9527
9528 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9529
9530 if test "$ol_cv_c_posix_regex" = no ; then
9531         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9532 fi
9533
9534
9535 have_uuid=no
9536 for ac_hdr in sys/uuid.h
9537 do
9538 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9539 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9540 echo "configure:9541: checking for $ac_hdr" >&5
9541 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9542   echo $ac_n "(cached) $ac_c" 1>&6
9543 else
9544   cat > conftest.$ac_ext <<EOF
9545 #line 9546 "configure"
9546 #include "confdefs.h"
9547 #include <$ac_hdr>
9548 EOF
9549 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9550 { (eval echo configure:9551: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9551 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9552 if test -z "$ac_err"; then
9553   rm -rf conftest*
9554   eval "ac_cv_header_$ac_safe=yes"
9555 else
9556   echo "$ac_err" >&5
9557   echo "configure: failed program was:" >&5
9558   cat conftest.$ac_ext >&5
9559   rm -rf conftest*
9560   eval "ac_cv_header_$ac_safe=no"
9561 fi
9562 rm -f conftest*
9563 fi
9564 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9565   echo "$ac_t""yes" 1>&6
9566     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9567   cat >> confdefs.h <<EOF
9568 #define $ac_tr_hdr 1
9569 EOF
9570  
9571 else
9572   echo "$ac_t""no" 1>&6
9573 fi
9574 done
9575
9576 if test $ac_cv_header_sys_uuid_h = yes ; then
9577         save_LIBS="$LIBS"
9578         
9579 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9580 echo "configure:9581: checking for library containing uuid_to_str" >&5
9581 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9582   echo $ac_n "(cached) $ac_c" 1>&6
9583 else
9584   ac_func_search_save_LIBS="$LIBS"
9585 ac_cv_search_uuid_to_str="no"
9586 cat > conftest.$ac_ext <<EOF
9587 #line 9588 "configure"
9588 #include "confdefs.h"
9589 /* Override any gcc2 internal prototype to avoid an error.  */
9590 /* We use char because int might match the return type of a gcc2
9591     builtin and then its argument prototype would still apply.  */
9592 char uuid_to_str();
9593
9594 int main() {
9595 uuid_to_str()
9596 ; return 0; }
9597 EOF
9598 if { (eval echo configure:9599: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9599   rm -rf conftest*
9600   ac_cv_search_uuid_to_str="none required"
9601 else
9602   echo "configure: failed program was:" >&5
9603   cat conftest.$ac_ext >&5
9604 fi
9605 rm -f conftest*
9606 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9607 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9608 cat > conftest.$ac_ext <<EOF
9609 #line 9610 "configure"
9610 #include "confdefs.h"
9611 /* Override any gcc2 internal prototype to avoid an error.  */
9612 /* We use char because int might match the return type of a gcc2
9613     builtin and then its argument prototype would still apply.  */
9614 char uuid_to_str();
9615
9616 int main() {
9617 uuid_to_str()
9618 ; return 0; }
9619 EOF
9620 if { (eval echo configure:9621: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9621   rm -rf conftest*
9622   ac_cv_search_uuid_to_str="-l$ac_lib"
9623 break
9624 else
9625   echo "configure: failed program was:" >&5
9626   cat conftest.$ac_ext >&5
9627 fi
9628 rm -f conftest*
9629 done
9630 LIBS="$ac_func_search_save_LIBS"
9631 fi
9632
9633 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9634 if test "$ac_cv_search_uuid_to_str" != "no"; then
9635   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9636   have_uuid=yes
9637 else :
9638   :
9639 fi
9640         LIBS="$save_LIBS"
9641
9642         if test have_uuid = yes ; then
9643                 cat >> confdefs.h <<\EOF
9644 #define HAVE_UUID_TO_STR 1
9645 EOF
9646
9647
9648                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9649                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9650         fi
9651 fi
9652
9653 if test $have_uuid = no ; then
9654         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9655 echo "configure:9656: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9656         save_LIBS="$LIBS"
9657         LIBS="$LIBS -lrpcrt4"
9658         cat > conftest.$ac_ext <<EOF
9659 #line 9660 "configure"
9660 #include "confdefs.h"
9661
9662                 int __stdcall UuidCreate(void *);
9663                 int __stdcall UuidToStringA(void *,void **);
9664                 
9665 int main() {
9666
9667                 UuidCreate(0);
9668                 UuidToStringA(0,0);
9669                 
9670 ; return 0; }
9671 EOF
9672 if { (eval echo configure:9673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9673   rm -rf conftest*
9674   need_rpcrt=yes
9675 else
9676   echo "configure: failed program was:" >&5
9677   cat conftest.$ac_ext >&5
9678   rm -rf conftest*
9679   need_rpcrt=no
9680 fi
9681 rm -f conftest*
9682         if test $need_rpcrt = yes; then
9683                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9684         fi
9685         LIBS="$save_LIBS"
9686         echo "$ac_t""$need_rpcrt" 1>&6
9687 fi
9688
9689 ol_link_dnssrv=no
9690 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9691 echo "configure:9692: checking for res_query" >&5
9692 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9693   echo $ac_n "(cached) $ac_c" 1>&6
9694 else
9695   cat > conftest.$ac_ext <<EOF
9696 #line 9697 "configure"
9697 #include "confdefs.h"
9698 /* System header to define __stub macros and hopefully few prototypes,
9699     which can conflict with char res_query(); below.  */
9700 #include <assert.h>
9701 /* Override any gcc2 internal prototype to avoid an error.  */
9702 /* We use char because int might match the return type of a gcc2
9703     builtin and then its argument prototype would still apply.  */
9704 char res_query();
9705 char (*f)();
9706
9707 int main() {
9708
9709 /* The GNU C library defines this for functions which it implements
9710     to always fail with ENOSYS.  Some functions are actually named
9711     something starting with __ and the normal name is an alias.  */
9712 #if defined (__stub_res_query) || defined (__stub___res_query)
9713 choke me
9714 #else
9715 f = res_query;
9716 #endif
9717
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_func_res_query=yes"
9723 else
9724   echo "configure: failed program was:" >&5
9725   cat conftest.$ac_ext >&5
9726   rm -rf conftest*
9727   eval "ac_cv_func_res_query=no"
9728 fi
9729 rm -f conftest*
9730 fi
9731
9732 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9733   echo "$ac_t""yes" 1>&6
9734   :
9735 else
9736   echo "$ac_t""no" 1>&6
9737 fi
9738
9739 if test $ac_cv_func_res_query = no ; then 
9740         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9741 echo "configure:9742: checking for __res_query" >&5
9742 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9743   echo $ac_n "(cached) $ac_c" 1>&6
9744 else
9745   cat > conftest.$ac_ext <<EOF
9746 #line 9747 "configure"
9747 #include "confdefs.h"
9748 /* System header to define __stub macros and hopefully few prototypes,
9749     which can conflict with char __res_query(); below.  */
9750 #include <assert.h>
9751 /* Override any gcc2 internal prototype to avoid an error.  */
9752 /* We use char because int might match the return type of a gcc2
9753     builtin and then its argument prototype would still apply.  */
9754 char __res_query();
9755 char (*f)();
9756
9757 int main() {
9758
9759 /* The GNU C library defines this for functions which it implements
9760     to always fail with ENOSYS.  Some functions are actually named
9761     something starting with __ and the normal name is an alias.  */
9762 #if defined (__stub___res_query) || defined (__stub_____res_query)
9763 choke me
9764 #else
9765 f = __res_query;
9766 #endif
9767
9768 ; return 0; }
9769 EOF
9770 if { (eval echo configure:9771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9771   rm -rf conftest*
9772   eval "ac_cv_func___res_query=yes"
9773 else
9774   echo "configure: failed program was:" >&5
9775   cat conftest.$ac_ext >&5
9776   rm -rf conftest*
9777   eval "ac_cv_func___res_query=no"
9778 fi
9779 rm -f conftest*
9780 fi
9781
9782 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9783   echo "$ac_t""yes" 1>&6
9784   :
9785 else
9786   echo "$ac_t""no" 1>&6
9787 fi
9788
9789         ac_cv_func_res_query=$ac_cv_func___res_query
9790 fi
9791
9792 if test $ac_cv_func_res_query = no ; then 
9793         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9794 echo "configure:9795: checking for res_query in -lbind" >&5
9795 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9796 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9797   echo $ac_n "(cached) $ac_c" 1>&6
9798 else
9799   ac_save_LIBS="$LIBS"
9800 LIBS="-lbind  $LIBS"
9801 cat > conftest.$ac_ext <<EOF
9802 #line 9803 "configure"
9803 #include "confdefs.h"
9804 /* Override any gcc2 internal prototype to avoid an error.  */
9805 /* We use char because int might match the return type of a gcc2
9806     builtin and then its argument prototype would still apply.  */
9807 char res_query();
9808
9809 int main() {
9810 res_query()
9811 ; return 0; }
9812 EOF
9813 if { (eval echo configure:9814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9814   rm -rf conftest*
9815   eval "ac_cv_lib_$ac_lib_var=yes"
9816 else
9817   echo "configure: failed program was:" >&5
9818   cat conftest.$ac_ext >&5
9819   rm -rf conftest*
9820   eval "ac_cv_lib_$ac_lib_var=no"
9821 fi
9822 rm -f conftest*
9823 LIBS="$ac_save_LIBS"
9824
9825 fi
9826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9827   echo "$ac_t""yes" 1>&6
9828     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9829     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9830   cat >> confdefs.h <<EOF
9831 #define $ac_tr_lib 1
9832 EOF
9833
9834   LIBS="-lbind $LIBS"
9835
9836 else
9837   echo "$ac_t""no" 1>&6
9838 fi
9839
9840         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9841 fi
9842
9843 if test $ac_cv_func_res_query = no ; then 
9844         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9845 echo "configure:9846: checking for __res_query in -lbind" >&5
9846 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9847 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9848   echo $ac_n "(cached) $ac_c" 1>&6
9849 else
9850   ac_save_LIBS="$LIBS"
9851 LIBS="-lbind  $LIBS"
9852 cat > conftest.$ac_ext <<EOF
9853 #line 9854 "configure"
9854 #include "confdefs.h"
9855 /* Override any gcc2 internal prototype to avoid an error.  */
9856 /* We use char because int might match the return type of a gcc2
9857     builtin and then its argument prototype would still apply.  */
9858 char __res_query();
9859
9860 int main() {
9861 __res_query()
9862 ; return 0; }
9863 EOF
9864 if { (eval echo configure:9865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9865   rm -rf conftest*
9866   eval "ac_cv_lib_$ac_lib_var=yes"
9867 else
9868   echo "configure: failed program was:" >&5
9869   cat conftest.$ac_ext >&5
9870   rm -rf conftest*
9871   eval "ac_cv_lib_$ac_lib_var=no"
9872 fi
9873 rm -f conftest*
9874 LIBS="$ac_save_LIBS"
9875
9876 fi
9877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9878   echo "$ac_t""yes" 1>&6
9879     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9880     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9881   cat >> confdefs.h <<EOF
9882 #define $ac_tr_lib 1
9883 EOF
9884
9885   LIBS="-lbind $LIBS"
9886
9887 else
9888   echo "$ac_t""no" 1>&6
9889 fi
9890
9891         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
9892 fi
9893
9894 if test $ac_cv_func_res_query = no ; then 
9895         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
9896 echo "configure:9897: checking for res_query in -lresolv" >&5
9897 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
9898 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9899   echo $ac_n "(cached) $ac_c" 1>&6
9900 else
9901   ac_save_LIBS="$LIBS"
9902 LIBS="-lresolv  $LIBS"
9903 cat > conftest.$ac_ext <<EOF
9904 #line 9905 "configure"
9905 #include "confdefs.h"
9906 /* Override any gcc2 internal prototype to avoid an error.  */
9907 /* We use char because int might match the return type of a gcc2
9908     builtin and then its argument prototype would still apply.  */
9909 char res_query();
9910
9911 int main() {
9912 res_query()
9913 ; return 0; }
9914 EOF
9915 if { (eval echo configure:9916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9916   rm -rf conftest*
9917   eval "ac_cv_lib_$ac_lib_var=yes"
9918 else
9919   echo "configure: failed program was:" >&5
9920   cat conftest.$ac_ext >&5
9921   rm -rf conftest*
9922   eval "ac_cv_lib_$ac_lib_var=no"
9923 fi
9924 rm -f conftest*
9925 LIBS="$ac_save_LIBS"
9926
9927 fi
9928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9929   echo "$ac_t""yes" 1>&6
9930     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9931     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9932   cat >> confdefs.h <<EOF
9933 #define $ac_tr_lib 1
9934 EOF
9935
9936   LIBS="-lresolv $LIBS"
9937
9938 else
9939   echo "$ac_t""no" 1>&6
9940 fi
9941
9942         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
9943 fi
9944
9945 if test $ac_cv_func_res_query = no ; then 
9946         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
9947 echo "configure:9948: checking for __res_query in -lresolv" >&5
9948 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
9949 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9950   echo $ac_n "(cached) $ac_c" 1>&6
9951 else
9952   ac_save_LIBS="$LIBS"
9953 LIBS="-lresolv  $LIBS"
9954 cat > conftest.$ac_ext <<EOF
9955 #line 9956 "configure"
9956 #include "confdefs.h"
9957 /* Override any gcc2 internal prototype to avoid an error.  */
9958 /* We use char because int might match the return type of a gcc2
9959     builtin and then its argument prototype would still apply.  */
9960 char __res_query();
9961
9962 int main() {
9963 __res_query()
9964 ; return 0; }
9965 EOF
9966 if { (eval echo configure:9967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9967   rm -rf conftest*
9968   eval "ac_cv_lib_$ac_lib_var=yes"
9969 else
9970   echo "configure: failed program was:" >&5
9971   cat conftest.$ac_ext >&5
9972   rm -rf conftest*
9973   eval "ac_cv_lib_$ac_lib_var=no"
9974 fi
9975 rm -f conftest*
9976 LIBS="$ac_save_LIBS"
9977
9978 fi
9979 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9980   echo "$ac_t""yes" 1>&6
9981     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9982     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9983   cat >> confdefs.h <<EOF
9984 #define $ac_tr_lib 1
9985 EOF
9986
9987   LIBS="-lresolv $LIBS"
9988
9989 else
9990   echo "$ac_t""no" 1>&6
9991 fi
9992
9993         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
9994 fi
9995
9996 if test "$ac_cv_func_res_query" = yes ; then
9997         cat >> confdefs.h <<\EOF
9998 #define HAVE_RES_QUERY 1
9999 EOF
10000
10001
10002         if test $ol_enable_dnssrv != no ; then
10003                 ol_link_dnssrv=yes
10004         fi
10005 fi
10006
10007 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10008         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10009 fi
10010
10011 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10012 do
10013 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10014 echo "configure:10015: checking for $ac_func" >&5
10015 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10016   echo $ac_n "(cached) $ac_c" 1>&6
10017 else
10018   cat > conftest.$ac_ext <<EOF
10019 #line 10020 "configure"
10020 #include "confdefs.h"
10021 /* System header to define __stub macros and hopefully few prototypes,
10022     which can conflict with char $ac_func(); below.  */
10023 #include <assert.h>
10024 /* Override any gcc2 internal prototype to avoid an error.  */
10025 /* We use char because int might match the return type of a gcc2
10026     builtin and then its argument prototype would still apply.  */
10027 char $ac_func();
10028 char (*f)();
10029
10030 int main() {
10031
10032 /* The GNU C library defines this for functions which it implements
10033     to always fail with ENOSYS.  Some functions are actually named
10034     something starting with __ and the normal name is an alias.  */
10035 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10036 choke me
10037 #else
10038 f = $ac_func;
10039 #endif
10040
10041 ; return 0; }
10042 EOF
10043 if { (eval echo configure:10044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10044   rm -rf conftest*
10045   eval "ac_cv_func_$ac_func=yes"
10046 else
10047   echo "configure: failed program was:" >&5
10048   cat conftest.$ac_ext >&5
10049   rm -rf conftest*
10050   eval "ac_cv_func_$ac_func=no"
10051 fi
10052 rm -f conftest*
10053 fi
10054
10055 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10056   echo "$ac_t""yes" 1>&6
10057     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10058   cat >> confdefs.h <<EOF
10059 #define $ac_tr_func 1
10060 EOF
10061  
10062 else
10063   echo "$ac_t""no" 1>&6
10064 fi
10065 done
10066
10067
10068 ol_link_ipv6=no
10069 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10070         if test $ol_enable_ipv6 = yes ; then
10071                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10072         fi
10073 elif test $ol_enable_ipv6 != no ; then
10074         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10075 echo "configure:10076: checking INET6_ADDRSTRLEN" >&5
10076 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10077   echo $ac_n "(cached) $ac_c" 1>&6
10078 else
10079   
10080                 cat > conftest.$ac_ext <<EOF
10081 #line 10082 "configure"
10082 #include "confdefs.h"
10083
10084 #                       include <netinet/in.h>
10085 #                       ifdef INET6_ADDRSTRLEN
10086                                 __has_inet6_addrstrlen__;
10087 #                       endif
10088                 
10089 EOF
10090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10091   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10092   rm -rf conftest*
10093   ol_cv_inet6_addrstrlen=yes
10094 else
10095   rm -rf conftest*
10096   ol_cv_inet6_addrstrlen=no
10097 fi
10098 rm -f conftest*
10099
10100 fi
10101
10102 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10103
10104
10105         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10106 echo "configure:10107: checking struct sockaddr_storage" >&5
10107 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10108   echo $ac_n "(cached) $ac_c" 1>&6
10109 else
10110   
10111                 cat > conftest.$ac_ext <<EOF
10112 #line 10113 "configure"
10113 #include "confdefs.h"
10114
10115 #include <sys/types.h>
10116 #include <sys/socket.h>
10117
10118 int main() {
10119
10120                         struct sockaddr_storage ss;
10121
10122 ; return 0; }
10123 EOF
10124 if { (eval echo configure:10125: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10125   rm -rf conftest*
10126   ol_cv_struct_sockaddr_storage=yes
10127 else
10128   echo "configure: failed program was:" >&5
10129   cat conftest.$ac_ext >&5
10130   rm -rf conftest*
10131   ol_cv_struct_sockaddr_storage=no
10132 fi
10133 rm -f conftest*
10134 fi
10135
10136 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10137
10138         if test $ol_cv_inet6_addrstrlen = yes \
10139                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10140                 ol_link_ipv6=yes
10141         elif test $ol_enable_ipv6 = yes \
10142                         -a $ol_cv_inet6_addrstrlen = no ; then
10143                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10144         elif test $ol_enable_ipv6 = yes \
10145                         -a $ol_cv_struct_sockaddr_storage = no ; then
10146                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10147         fi
10148 fi
10149
10150 if test $ol_enable_local != no ; then
10151         for ac_hdr in sys/un.h 
10152 do
10153 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10154 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10155 echo "configure:10156: checking for $ac_hdr" >&5
10156 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10157   echo $ac_n "(cached) $ac_c" 1>&6
10158 else
10159   cat > conftest.$ac_ext <<EOF
10160 #line 10161 "configure"
10161 #include "confdefs.h"
10162 #include <$ac_hdr>
10163 EOF
10164 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10165 { (eval echo configure:10166: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10166 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10167 if test -z "$ac_err"; then
10168   rm -rf conftest*
10169   eval "ac_cv_header_$ac_safe=yes"
10170 else
10171   echo "$ac_err" >&5
10172   echo "configure: failed program was:" >&5
10173   cat conftest.$ac_ext >&5
10174   rm -rf conftest*
10175   eval "ac_cv_header_$ac_safe=no"
10176 fi
10177 rm -f conftest*
10178 fi
10179 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10180   echo "$ac_t""yes" 1>&6
10181     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10182   cat >> confdefs.h <<EOF
10183 #define $ac_tr_hdr 1
10184 EOF
10185  
10186 else
10187   echo "$ac_t""no" 1>&6
10188 fi
10189 done
10190
10191
10192         if test $ol_enable_local = auto ; then
10193                 ol_enable_local=$ac_cv_header_sys_un_h
10194         elif test $ac_cv_header_sys_un_h = no ; then
10195                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10196         fi
10197 fi
10198
10199 ol_link_kbind=no
10200 ol_link_krb5=no
10201 ol_link_krb4=no
10202
10203 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10204         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10205         -o $ol_with_kerberos = k425 ; then
10206
10207         for ac_hdr in krb5.h
10208 do
10209 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10210 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10211 echo "configure:10212: checking for $ac_hdr" >&5
10212 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10213   echo $ac_n "(cached) $ac_c" 1>&6
10214 else
10215   cat > conftest.$ac_ext <<EOF
10216 #line 10217 "configure"
10217 #include "confdefs.h"
10218 #include <$ac_hdr>
10219 EOF
10220 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10221 { (eval echo configure:10222: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10222 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10223 if test -z "$ac_err"; then
10224   rm -rf conftest*
10225   eval "ac_cv_header_$ac_safe=yes"
10226 else
10227   echo "$ac_err" >&5
10228   echo "configure: failed program was:" >&5
10229   cat conftest.$ac_ext >&5
10230   rm -rf conftest*
10231   eval "ac_cv_header_$ac_safe=no"
10232 fi
10233 rm -f conftest*
10234 fi
10235 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10236   echo "$ac_t""yes" 1>&6
10237     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10238   cat >> confdefs.h <<EOF
10239 #define $ac_tr_hdr 1
10240 EOF
10241  
10242 else
10243   echo "$ac_t""no" 1>&6
10244 fi
10245 done
10246
10247
10248         if test $ac_cv_header_krb5_h = yes ; then
10249                                 for ac_hdr in heim_err.h
10250 do
10251 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10252 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10253 echo "configure:10254: checking for $ac_hdr" >&5
10254 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10255   echo $ac_n "(cached) $ac_c" 1>&6
10256 else
10257   cat > conftest.$ac_ext <<EOF
10258 #line 10259 "configure"
10259 #include "confdefs.h"
10260 #include <$ac_hdr>
10261 EOF
10262 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10263 { (eval echo configure:10264: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10264 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10265 if test -z "$ac_err"; then
10266   rm -rf conftest*
10267   eval "ac_cv_header_$ac_safe=yes"
10268 else
10269   echo "$ac_err" >&5
10270   echo "configure: failed program was:" >&5
10271   cat conftest.$ac_ext >&5
10272   rm -rf conftest*
10273   eval "ac_cv_header_$ac_safe=no"
10274 fi
10275 rm -f conftest*
10276 fi
10277 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10278   echo "$ac_t""yes" 1>&6
10279     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10280   cat >> confdefs.h <<EOF
10281 #define $ac_tr_hdr 1
10282 EOF
10283  
10284 else
10285   echo "$ac_t""no" 1>&6
10286 fi
10287 done
10288
10289                 if test $ac_cv_header_heim_err_h = yes ; then
10290                         krb5_impl=heimdal
10291                 else
10292                         krb5_impl=mit
10293                 fi
10294
10295                 if test $krb5_impl = mit; then
10296                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10297 echo "configure:10298: checking for main in -lk5crypto" >&5
10298 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10299 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10300   echo $ac_n "(cached) $ac_c" 1>&6
10301 else
10302   ac_save_LIBS="$LIBS"
10303 LIBS="-lk5crypto  $LIBS"
10304 cat > conftest.$ac_ext <<EOF
10305 #line 10306 "configure"
10306 #include "confdefs.h"
10307
10308 int main() {
10309 main()
10310 ; return 0; }
10311 EOF
10312 if { (eval echo configure:10313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10313   rm -rf conftest*
10314   eval "ac_cv_lib_$ac_lib_var=yes"
10315 else
10316   echo "configure: failed program was:" >&5
10317   cat conftest.$ac_ext >&5
10318   rm -rf conftest*
10319   eval "ac_cv_lib_$ac_lib_var=no"
10320 fi
10321 rm -f conftest*
10322 LIBS="$ac_save_LIBS"
10323
10324 fi
10325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10326   echo "$ac_t""yes" 1>&6
10327   krb5crypto=k5crypto
10328 else
10329   echo "$ac_t""no" 1>&6
10330 krb5crypto=crypto
10331 fi
10332
10333
10334                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10335 echo "configure:10336: checking for main in -lkrb5" >&5
10336 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10337 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10338   echo $ac_n "(cached) $ac_c" 1>&6
10339 else
10340   ac_save_LIBS="$LIBS"
10341 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10342 cat > conftest.$ac_ext <<EOF
10343 #line 10344 "configure"
10344 #include "confdefs.h"
10345
10346 int main() {
10347 main()
10348 ; return 0; }
10349 EOF
10350 if { (eval echo configure:10351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10351   rm -rf conftest*
10352   eval "ac_cv_lib_$ac_lib_var=yes"
10353 else
10354   echo "configure: failed program was:" >&5
10355   cat conftest.$ac_ext >&5
10356   rm -rf conftest*
10357   eval "ac_cv_lib_$ac_lib_var=no"
10358 fi
10359 rm -f conftest*
10360 LIBS="$ac_save_LIBS"
10361
10362 fi
10363 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10364   echo "$ac_t""yes" 1>&6
10365   have_krb5=yes
10366                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10367 else
10368   echo "$ac_t""no" 1>&6
10369 have_krb5=no
10370 fi
10371
10372
10373                 elif test $krb5_impl = heimdal; then
10374                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10375 echo "configure:10376: checking for main in -ldes" >&5
10376 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10377 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10378   echo $ac_n "(cached) $ac_c" 1>&6
10379 else
10380   ac_save_LIBS="$LIBS"
10381 LIBS="-ldes  $LIBS"
10382 cat > conftest.$ac_ext <<EOF
10383 #line 10384 "configure"
10384 #include "confdefs.h"
10385
10386 int main() {
10387 main()
10388 ; return 0; }
10389 EOF
10390 if { (eval echo configure:10391: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10391   rm -rf conftest*
10392   eval "ac_cv_lib_$ac_lib_var=yes"
10393 else
10394   echo "configure: failed program was:" >&5
10395   cat conftest.$ac_ext >&5
10396   rm -rf conftest*
10397   eval "ac_cv_lib_$ac_lib_var=no"
10398 fi
10399 rm -f conftest*
10400 LIBS="$ac_save_LIBS"
10401
10402 fi
10403 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10404   echo "$ac_t""yes" 1>&6
10405   krb5crypto=des
10406 else
10407   echo "$ac_t""no" 1>&6
10408 krb5crypto=crypto
10409 fi
10410
10411
10412                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10413 echo "configure:10414: checking for main in -lkrb5" >&5
10414 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10415 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10416   echo $ac_n "(cached) $ac_c" 1>&6
10417 else
10418   ac_save_LIBS="$LIBS"
10419 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10420 cat > conftest.$ac_ext <<EOF
10421 #line 10422 "configure"
10422 #include "confdefs.h"
10423
10424 int main() {
10425 main()
10426 ; return 0; }
10427 EOF
10428 if { (eval echo configure:10429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10429   rm -rf conftest*
10430   eval "ac_cv_lib_$ac_lib_var=yes"
10431 else
10432   echo "configure: failed program was:" >&5
10433   cat conftest.$ac_ext >&5
10434   rm -rf conftest*
10435   eval "ac_cv_lib_$ac_lib_var=no"
10436 fi
10437 rm -f conftest*
10438 LIBS="$ac_save_LIBS"
10439
10440 fi
10441 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10442   echo "$ac_t""yes" 1>&6
10443   have_krb5=yes
10444                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10445 else
10446   echo "$ac_t""no" 1>&6
10447 have_krb5=no
10448 fi
10449
10450
10451                         cat >> confdefs.h <<\EOF
10452 #define HAVE_HEIMDAL_KERBEROS 1
10453 EOF
10454
10455
10456                 else
10457                         have_krb5=no
10458                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10459                 fi
10460
10461                 if test $have_krb5 = yes ; then
10462                         ol_link_krb5=yes
10463
10464                         cat >> confdefs.h <<\EOF
10465 #define HAVE_KRB5 1
10466 EOF
10467
10468
10469                         if test $ol_with_kerberos = k5only ; then
10470                                 ol_with_kerberos=found
10471                         fi
10472
10473                 elif test $ol_with_kerberos != auto ; then
10474                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10475                 fi
10476
10477         fi
10478 fi
10479
10480 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10481         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10482
10483         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10484 do
10485 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10486 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10487 echo "configure:10488: checking for $ac_hdr" >&5
10488 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10489   echo $ac_n "(cached) $ac_c" 1>&6
10490 else
10491   cat > conftest.$ac_ext <<EOF
10492 #line 10493 "configure"
10493 #include "confdefs.h"
10494 #include <$ac_hdr>
10495 EOF
10496 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10497 { (eval echo configure:10498: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10498 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10499 if test -z "$ac_err"; then
10500   rm -rf conftest*
10501   eval "ac_cv_header_$ac_safe=yes"
10502 else
10503   echo "$ac_err" >&5
10504   echo "configure: failed program was:" >&5
10505   cat conftest.$ac_ext >&5
10506   rm -rf conftest*
10507   eval "ac_cv_header_$ac_safe=no"
10508 fi
10509 rm -f conftest*
10510 fi
10511 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10512   echo "$ac_t""yes" 1>&6
10513     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10514   cat >> confdefs.h <<EOF
10515 #define $ac_tr_hdr 1
10516 EOF
10517  
10518 else
10519   echo "$ac_t""no" 1>&6
10520 fi
10521 done
10522
10523
10524         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10525                 if test $krb5_impl = mit; then
10526                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10527 echo "configure:10528: checking for main in -lkrb4" >&5
10528 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10529 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10530   echo $ac_n "(cached) $ac_c" 1>&6
10531 else
10532   ac_save_LIBS="$LIBS"
10533 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10534 cat > conftest.$ac_ext <<EOF
10535 #line 10536 "configure"
10536 #include "confdefs.h"
10537
10538 int main() {
10539 main()
10540 ; return 0; }
10541 EOF
10542 if { (eval echo configure:10543: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10543   rm -rf conftest*
10544   eval "ac_cv_lib_$ac_lib_var=yes"
10545 else
10546   echo "configure: failed program was:" >&5
10547   cat conftest.$ac_ext >&5
10548   rm -rf conftest*
10549   eval "ac_cv_lib_$ac_lib_var=no"
10550 fi
10551 rm -f conftest*
10552 LIBS="$ac_save_LIBS"
10553
10554 fi
10555 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10556   echo "$ac_t""yes" 1>&6
10557   have_k425=yes
10558                                 KRB4_LIBS="-lkrb4 -ldes425"
10559 else
10560   echo "$ac_t""no" 1>&6
10561 have_k425=no
10562 fi
10563
10564
10565                 elif test $krb5_impl = heimdal; then
10566                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10567 echo "configure:10568: checking for main in -lkrb4" >&5
10568 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10569 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10570   echo $ac_n "(cached) $ac_c" 1>&6
10571 else
10572   ac_save_LIBS="$LIBS"
10573 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10574 cat > conftest.$ac_ext <<EOF
10575 #line 10576 "configure"
10576 #include "confdefs.h"
10577
10578 int main() {
10579 main()
10580 ; return 0; }
10581 EOF
10582 if { (eval echo configure:10583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10583   rm -rf conftest*
10584   eval "ac_cv_lib_$ac_lib_var=yes"
10585 else
10586   echo "configure: failed program was:" >&5
10587   cat conftest.$ac_ext >&5
10588   rm -rf conftest*
10589   eval "ac_cv_lib_$ac_lib_var=no"
10590 fi
10591 rm -f conftest*
10592 LIBS="$ac_save_LIBS"
10593
10594 fi
10595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10596   echo "$ac_t""yes" 1>&6
10597   have_k425=yes
10598                                 KRB4_LIBS="-lkrb4"
10599 else
10600   echo "$ac_t""no" 1>&6
10601 have_k425=no
10602 fi
10603
10604
10605                 else
10606                         have_425=no
10607                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10608                 fi
10609
10610                 if test $have_k425 = yes ; then
10611                         ol_with_kerberos=found
10612                         ol_link_krb4=yes
10613
10614                         cat >> confdefs.h <<\EOF
10615 #define HAVE_KRB425 1
10616 EOF
10617
10618                         cat >> confdefs.h <<\EOF
10619 #define HAVE_KRB4 1
10620 EOF
10621
10622
10623                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10624 echo "configure:10625: checking for des_debug in Kerberos libraries" >&5
10625 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10626   echo $ac_n "(cached) $ac_c" 1>&6
10627 else
10628   
10629                                                                 save_LIBS="$LIBS"
10630                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10631                                 cat > conftest.$ac_ext <<EOF
10632 #line 10633 "configure"
10633 #include "confdefs.h"
10634
10635 #include <kerberosIV/krb.h>
10636 #include <kerberosIV/des.h>
10637 extern int des_debug;
10638
10639 int main() {
10640
10641 des_debug = 1;
10642
10643 ; return 0; }
10644 EOF
10645 if { (eval echo configure:10646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10646   rm -rf conftest*
10647   ol_cv_var_des_debug=yes
10648 else
10649   echo "configure: failed program was:" >&5
10650   cat conftest.$ac_ext >&5
10651   rm -rf conftest*
10652   ol_cv_var_des_debug=no
10653 fi
10654 rm -f conftest*
10655                                                                 LIBS="$save_LIBS"
10656                         
10657 fi
10658
10659 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10660
10661                         if test $ol_cv_var_des_debug = yes ; then
10662                                 cat >> confdefs.h <<\EOF
10663 #define HAVE_DES_DEBUG 1
10664 EOF
10665
10666                         fi
10667
10668                         LIBS="$save_LIBS"
10669                 fi
10670         fi
10671 fi
10672
10673 if test $ol_link_krb5 = yes ; then
10674         ol_with_kerberos=found
10675 fi
10676
10677 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10678         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10679
10680         for ac_hdr in krb.h des.h krb-archaeology.h 
10681 do
10682 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10683 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10684 echo "configure:10685: checking for $ac_hdr" >&5
10685 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10686   echo $ac_n "(cached) $ac_c" 1>&6
10687 else
10688   cat > conftest.$ac_ext <<EOF
10689 #line 10690 "configure"
10690 #include "confdefs.h"
10691 #include <$ac_hdr>
10692 EOF
10693 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10694 { (eval echo configure:10695: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10695 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10696 if test -z "$ac_err"; then
10697   rm -rf conftest*
10698   eval "ac_cv_header_$ac_safe=yes"
10699 else
10700   echo "$ac_err" >&5
10701   echo "configure: failed program was:" >&5
10702   cat conftest.$ac_ext >&5
10703   rm -rf conftest*
10704   eval "ac_cv_header_$ac_safe=no"
10705 fi
10706 rm -f conftest*
10707 fi
10708 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10709   echo "$ac_t""yes" 1>&6
10710     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10711   cat >> confdefs.h <<EOF
10712 #define $ac_tr_hdr 1
10713 EOF
10714  
10715 else
10716   echo "$ac_t""no" 1>&6
10717 fi
10718 done
10719
10720
10721         if test $ac_cv_header_krb_h = yes ; then
10722                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10723 echo "configure:10724: checking for main in -lkrb" >&5
10724 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10725 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10726   echo $ac_n "(cached) $ac_c" 1>&6
10727 else
10728   ac_save_LIBS="$LIBS"
10729 LIBS="-lkrb -ldes $LIBS"
10730 cat > conftest.$ac_ext <<EOF
10731 #line 10732 "configure"
10732 #include "confdefs.h"
10733
10734 int main() {
10735 main()
10736 ; return 0; }
10737 EOF
10738 if { (eval echo configure:10739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10739   rm -rf conftest*
10740   eval "ac_cv_lib_$ac_lib_var=yes"
10741 else
10742   echo "configure: failed program was:" >&5
10743   cat conftest.$ac_ext >&5
10744   rm -rf conftest*
10745   eval "ac_cv_lib_$ac_lib_var=no"
10746 fi
10747 rm -f conftest*
10748 LIBS="$ac_save_LIBS"
10749
10750 fi
10751 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10752   echo "$ac_t""yes" 1>&6
10753   have_k4=yes
10754 else
10755   echo "$ac_t""no" 1>&6
10756 have_k4=no
10757 fi
10758
10759
10760                 if test $have_k4 = yes ; then
10761                         ol_with_kerberos=found
10762                         ol_link_krb4=yes
10763
10764                         cat >> confdefs.h <<\EOF
10765 #define HAVE_KRB4 1
10766 EOF
10767
10768
10769                         KRB4_LIBS="-lkrb -ldes"
10770
10771                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10772                                 cat >> confdefs.h <<\EOF
10773 #define HAVE_KTH_KERBEROS 1
10774 EOF
10775
10776                         fi
10777                 fi
10778         fi
10779 fi
10780
10781 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10782         ol_link_kbind=yes
10783
10784 elif test $ol_enable_kbind = yes ; then
10785         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10786 fi
10787
10788 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10789         cat >> confdefs.h <<\EOF
10790 #define HAVE_KERBEROS 1
10791 EOF
10792
10793
10794 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10795         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10796 fi
10797
10798 ol_link_tls=no
10799 if test $ol_with_tls != no ; then
10800         for ac_hdr in openssl/ssl.h ssl.h
10801 do
10802 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10803 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10804 echo "configure:10805: checking for $ac_hdr" >&5
10805 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10806   echo $ac_n "(cached) $ac_c" 1>&6
10807 else
10808   cat > conftest.$ac_ext <<EOF
10809 #line 10810 "configure"
10810 #include "confdefs.h"
10811 #include <$ac_hdr>
10812 EOF
10813 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10814 { (eval echo configure:10815: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10815 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10816 if test -z "$ac_err"; then
10817   rm -rf conftest*
10818   eval "ac_cv_header_$ac_safe=yes"
10819 else
10820   echo "$ac_err" >&5
10821   echo "configure: failed program was:" >&5
10822   cat conftest.$ac_ext >&5
10823   rm -rf conftest*
10824   eval "ac_cv_header_$ac_safe=no"
10825 fi
10826 rm -f conftest*
10827 fi
10828 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10829   echo "$ac_t""yes" 1>&6
10830     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10831   cat >> confdefs.h <<EOF
10832 #define $ac_tr_hdr 1
10833 EOF
10834  
10835 else
10836   echo "$ac_t""no" 1>&6
10837 fi
10838 done
10839
10840         
10841         if test $ac_cv_header_openssl_ssl_h = yes \
10842                 -o $ac_cv_header_ssl_h = yes ; then
10843                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10844 echo "configure:10845: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10845 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10846 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10847   echo $ac_n "(cached) $ac_c" 1>&6
10848 else
10849   ac_save_LIBS="$LIBS"
10850 LIBS="-lssl -lcrypto $LIBS"
10851 cat > conftest.$ac_ext <<EOF
10852 #line 10853 "configure"
10853 #include "confdefs.h"
10854 /* Override any gcc2 internal prototype to avoid an error.  */
10855 /* We use char because int might match the return type of a gcc2
10856     builtin and then its argument prototype would still apply.  */
10857 char SSLeay_add_ssl_algorithms();
10858
10859 int main() {
10860 SSLeay_add_ssl_algorithms()
10861 ; return 0; }
10862 EOF
10863 if { (eval echo configure:10864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10864   rm -rf conftest*
10865   eval "ac_cv_lib_$ac_lib_var=yes"
10866 else
10867   echo "configure: failed program was:" >&5
10868   cat conftest.$ac_ext >&5
10869   rm -rf conftest*
10870   eval "ac_cv_lib_$ac_lib_var=no"
10871 fi
10872 rm -f conftest*
10873 LIBS="$ac_save_LIBS"
10874
10875 fi
10876 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10877   echo "$ac_t""yes" 1>&6
10878   have_ssleay=yes
10879                         need_rsaref=no
10880 else
10881   echo "$ac_t""no" 1>&6
10882 have_ssleay=no
10883 fi
10884
10885                         
10886                 if test $have_ssleay = no ; then
10887                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
10888 echo "configure:10889: checking for SSL_library_init in -lssl" >&5
10889 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
10890 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10891   echo $ac_n "(cached) $ac_c" 1>&6
10892 else
10893   ac_save_LIBS="$LIBS"
10894 LIBS="-lssl -lcrypto $LIBS"
10895 cat > conftest.$ac_ext <<EOF
10896 #line 10897 "configure"
10897 #include "confdefs.h"
10898 /* Override any gcc2 internal prototype to avoid an error.  */
10899 /* We use char because int might match the return type of a gcc2
10900     builtin and then its argument prototype would still apply.  */
10901 char SSL_library_init();
10902
10903 int main() {
10904 SSL_library_init()
10905 ; return 0; }
10906 EOF
10907 if { (eval echo configure:10908: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10908   rm -rf conftest*
10909   eval "ac_cv_lib_$ac_lib_var=yes"
10910 else
10911   echo "configure: failed program was:" >&5
10912   cat conftest.$ac_ext >&5
10913   rm -rf conftest*
10914   eval "ac_cv_lib_$ac_lib_var=no"
10915 fi
10916 rm -f conftest*
10917 LIBS="$ac_save_LIBS"
10918
10919 fi
10920 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10921   echo "$ac_t""yes" 1>&6
10922   have_ssleay=yes
10923                                 need_rsaref=no
10924 else
10925   echo "$ac_t""no" 1>&6
10926 have_ssleay=no
10927 fi
10928
10929                 fi
10930
10931                 if test $have_ssleay = no ; then
10932                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
10933 echo "configure:10934: checking for ssl3_accept in -lssl" >&5
10934 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
10935 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10936   echo $ac_n "(cached) $ac_c" 1>&6
10937 else
10938   ac_save_LIBS="$LIBS"
10939 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
10940 cat > conftest.$ac_ext <<EOF
10941 #line 10942 "configure"
10942 #include "confdefs.h"
10943 /* Override any gcc2 internal prototype to avoid an error.  */
10944 /* We use char because int might match the return type of a gcc2
10945     builtin and then its argument prototype would still apply.  */
10946 char ssl3_accept();
10947
10948 int main() {
10949 ssl3_accept()
10950 ; return 0; }
10951 EOF
10952 if { (eval echo configure:10953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10953   rm -rf conftest*
10954   eval "ac_cv_lib_$ac_lib_var=yes"
10955 else
10956   echo "configure: failed program was:" >&5
10957   cat conftest.$ac_ext >&5
10958   rm -rf conftest*
10959   eval "ac_cv_lib_$ac_lib_var=no"
10960 fi
10961 rm -f conftest*
10962 LIBS="$ac_save_LIBS"
10963
10964 fi
10965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10966   echo "$ac_t""yes" 1>&6
10967   have_ssleay=yes
10968                                 need_rsaref=yes
10969 else
10970   echo "$ac_t""no" 1>&6
10971 have_ssleay=no
10972 fi
10973
10974                 fi
10975
10976                 if test $have_ssleay = yes ; then
10977                         ol_with_tls=found
10978                         ol_link_tls=yes
10979
10980                         cat >> confdefs.h <<\EOF
10981 #define HAVE_SSLEAY 1
10982 EOF
10983
10984
10985                         if test $need_rsaref = yes; then
10986                                 cat >> confdefs.h <<\EOF
10987 #define HAVE_RSAREF 1
10988 EOF
10989
10990
10991                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
10992                         else
10993                                 TLS_LIBS="-lssl -lcrypto"
10994                         fi
10995                 fi
10996         fi
10997
10998 else
10999         echo "configure: warning: TLS data protection not supported!" 1>&2
11000 fi
11001
11002 WITH_TLS=no
11003 if test $ol_link_tls = yes ; then
11004         cat >> confdefs.h <<\EOF
11005 #define HAVE_TLS 1
11006 EOF
11007
11008         WITH_TLS=yes
11009
11010 elif test $ol_with_tls = auto ; then
11011         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11012         echo "configure: warning: TLS data protection not supported!" 1>&2
11013
11014 elif test $ol_with_tls != no ; then
11015         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11016 fi
11017
11018 if test $ol_enable_lmpasswd != no; then
11019         if test $ol_link_tls != yes ; then
11020                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11021         fi
11022
11023         cat >> confdefs.h <<\EOF
11024 #define SLAPD_LMHASH 1
11025 EOF
11026
11027 fi
11028
11029 ol_link_threads=no
11030
11031 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11032         -o $ol_with_threads = nt ; then
11033
11034         
11035         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11036 echo "configure:11037: checking for _beginthread" >&5
11037 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11038   echo $ac_n "(cached) $ac_c" 1>&6
11039 else
11040   cat > conftest.$ac_ext <<EOF
11041 #line 11042 "configure"
11042 #include "confdefs.h"
11043 /* System header to define __stub macros and hopefully few prototypes,
11044     which can conflict with char _beginthread(); below.  */
11045 #include <assert.h>
11046 /* Override any gcc2 internal prototype to avoid an error.  */
11047 /* We use char because int might match the return type of a gcc2
11048     builtin and then its argument prototype would still apply.  */
11049 char _beginthread();
11050 char (*f)();
11051
11052 int main() {
11053
11054 /* The GNU C library defines this for functions which it implements
11055     to always fail with ENOSYS.  Some functions are actually named
11056     something starting with __ and the normal name is an alias.  */
11057 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11058 choke me
11059 #else
11060 f = _beginthread;
11061 #endif
11062
11063 ; return 0; }
11064 EOF
11065 if { (eval echo configure:11066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11066   rm -rf conftest*
11067   eval "ac_cv_func__beginthread=yes"
11068 else
11069   echo "configure: failed program was:" >&5
11070   cat conftest.$ac_ext >&5
11071   rm -rf conftest*
11072   eval "ac_cv_func__beginthread=no"
11073 fi
11074 rm -f conftest*
11075 fi
11076
11077 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11078   echo "$ac_t""yes" 1>&6
11079   :
11080 else
11081   echo "$ac_t""no" 1>&6
11082 fi
11083
11084
11085         if test $ac_cv_func__beginthread = yes ; then
11086                 cat >> confdefs.h <<\EOF
11087 #define HAVE_NT_THREADS 1
11088 EOF
11089
11090                 ol_cv_nt_threads=yes
11091         fi
11092
11093
11094         if test "$ol_cv_nt_threads" = yes ; then
11095                 ol_link_threads=nt
11096                 ol_with_threads=found
11097                 ol_with_yielding_select=yes
11098
11099                 cat >> confdefs.h <<\EOF
11100 #define HAVE_NT_SERVICE_MANAGER 1
11101 EOF
11102
11103                 cat >> confdefs.h <<\EOF
11104 #define HAVE_NT_EVENT_LOG 1
11105 EOF
11106
11107         fi
11108
11109         if test $ol_with_threads = nt ; then
11110                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11111         fi
11112 fi
11113
11114 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11115         -o $ol_with_threads = posix ; then
11116
11117         for ac_hdr in pthread.h
11118 do
11119 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11120 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11121 echo "configure:11122: checking for $ac_hdr" >&5
11122 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11123   echo $ac_n "(cached) $ac_c" 1>&6
11124 else
11125   cat > conftest.$ac_ext <<EOF
11126 #line 11127 "configure"
11127 #include "confdefs.h"
11128 #include <$ac_hdr>
11129 EOF
11130 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11131 { (eval echo configure:11132: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11132 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11133 if test -z "$ac_err"; then
11134   rm -rf conftest*
11135   eval "ac_cv_header_$ac_safe=yes"
11136 else
11137   echo "$ac_err" >&5
11138   echo "configure: failed program was:" >&5
11139   cat conftest.$ac_ext >&5
11140   rm -rf conftest*
11141   eval "ac_cv_header_$ac_safe=no"
11142 fi
11143 rm -f conftest*
11144 fi
11145 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11146   echo "$ac_t""yes" 1>&6
11147     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11148   cat >> confdefs.h <<EOF
11149 #define $ac_tr_hdr 1
11150 EOF
11151  
11152 else
11153   echo "$ac_t""no" 1>&6
11154 fi
11155 done
11156
11157
11158         if test $ac_cv_header_pthread_h = yes ; then
11159                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11160 echo "configure:11161: checking POSIX thread version" >&5
11161 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11162   echo $ac_n "(cached) $ac_c" 1>&6
11163 else
11164   
11165         cat > conftest.$ac_ext <<EOF
11166 #line 11167 "configure"
11167 #include "confdefs.h"
11168
11169 #               include <pthread.h>
11170         
11171 int main() {
11172
11173                 int i = PTHREAD_CREATE_JOINABLE;
11174         
11175 ; return 0; }
11176 EOF
11177 if { (eval echo configure:11178: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11178   rm -rf conftest*
11179   
11180         cat > conftest.$ac_ext <<EOF
11181 #line 11182 "configure"
11182 #include "confdefs.h"
11183 #include <pthread.h>
11184 EOF
11185 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11186   egrep "pthread_detach" >/dev/null 2>&1; then
11187   rm -rf conftest*
11188   ol_cv_pthread_version=10
11189 else
11190   rm -rf conftest*
11191   ol_cv_pthread_version=8
11192 fi
11193 rm -f conftest*
11194
11195 else
11196   echo "configure: failed program was:" >&5
11197   cat conftest.$ac_ext >&5
11198   rm -rf conftest*
11199   
11200         cat > conftest.$ac_ext <<EOF
11201 #line 11202 "configure"
11202 #include "confdefs.h"
11203
11204 #               include <pthread.h>
11205 #               ifdef PTHREAD_CREATE_UNDETACHED
11206                 draft7
11207 #               endif
11208         
11209 EOF
11210 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11211   egrep "draft7" >/dev/null 2>&1; then
11212   rm -rf conftest*
11213   ol_cv_pthread_version=7
11214 else
11215   rm -rf conftest*
11216   
11217         cat > conftest.$ac_ext <<EOF
11218 #line 11219 "configure"
11219 #include "confdefs.h"
11220 #include <pthread.h>
11221 EOF
11222 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11223   egrep "pthread_attr_init" >/dev/null 2>&1; then
11224   rm -rf conftest*
11225   ol_cv_pthread_version=6
11226 else
11227   rm -rf conftest*
11228   
11229         cat > conftest.$ac_ext <<EOF
11230 #line 11231 "configure"
11231 #include "confdefs.h"
11232
11233 #               include <pthread.h>
11234 #ifdef          PTHREAD_MUTEX_INITIALIZER
11235                 draft5
11236 #endif
11237         
11238 EOF
11239 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11240   egrep "draft5" >/dev/null 2>&1; then
11241   rm -rf conftest*
11242   ol_cv_pthread_version=5
11243 else
11244   rm -rf conftest*
11245   ol_cv_pthread_version=4
11246 fi
11247 rm -f conftest*
11248  
11249 fi
11250 rm -f conftest*
11251  
11252 fi
11253 rm -f conftest*
11254  
11255 fi
11256 rm -f conftest*
11257
11258 fi
11259
11260 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11261
11262
11263                 if test $ol_cv_pthread_version != 0 ; then
11264                         cat >> confdefs.h <<EOF
11265 #define HAVE_PTHREADS $ol_cv_pthread_version
11266 EOF
11267
11268                 else
11269                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11270                 fi
11271
11272                 # consider threads found
11273                 ol_with_threads=found
11274
11275                 
11276         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11277 echo "configure:11278: checking for LinuxThreads pthread.h" >&5
11278 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11279   echo $ac_n "(cached) $ac_c" 1>&6
11280 else
11281   cat > conftest.$ac_ext <<EOF
11282 #line 11283 "configure"
11283 #include "confdefs.h"
11284 #include <pthread.h>
11285 EOF
11286 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11287   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11288   rm -rf conftest*
11289   ol_cv_header_linux_threads=yes
11290 else
11291   rm -rf conftest*
11292   ol_cv_header_linux_threads=no
11293 fi
11294 rm -f conftest*
11295
11296                 
11297 fi
11298
11299 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11300         if test $ol_cv_header_linux_threads = yes; then
11301                 cat >> confdefs.h <<\EOF
11302 #define HAVE_LINUX_THREADS 1
11303 EOF
11304
11305         fi
11306
11307                 
11308         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11309 echo "configure:11310: checking for GNU Pth pthread.h" >&5
11310 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11311   echo $ac_n "(cached) $ac_c" 1>&6
11312 else
11313   cat > conftest.$ac_ext <<EOF
11314 #line 11315 "configure"
11315 #include "confdefs.h"
11316 #include <pthread.h>
11317 #ifdef _POSIX_THREAD_IS_GNU_PTH
11318         __gnu_pth__;
11319 #endif
11320
11321 EOF
11322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11323   egrep "__gnu_pth__" >/dev/null 2>&1; then
11324   rm -rf conftest*
11325   ol_cv_header_gnu_pth_pthread_h=yes
11326 else
11327   rm -rf conftest*
11328   ol_cv_header_gnu_pth_pthread_h=no
11329 fi
11330 rm -f conftest*
11331
11332                 
11333 fi
11334
11335 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11336
11337
11338                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11339                         for ac_hdr in sched.h
11340 do
11341 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11342 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11343 echo "configure:11344: checking for $ac_hdr" >&5
11344 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11345   echo $ac_n "(cached) $ac_c" 1>&6
11346 else
11347   cat > conftest.$ac_ext <<EOF
11348 #line 11349 "configure"
11349 #include "confdefs.h"
11350 #include <$ac_hdr>
11351 EOF
11352 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11353 { (eval echo configure:11354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11354 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11355 if test -z "$ac_err"; then
11356   rm -rf conftest*
11357   eval "ac_cv_header_$ac_safe=yes"
11358 else
11359   echo "$ac_err" >&5
11360   echo "configure: failed program was:" >&5
11361   cat conftest.$ac_ext >&5
11362   rm -rf conftest*
11363   eval "ac_cv_header_$ac_safe=no"
11364 fi
11365 rm -f conftest*
11366 fi
11367 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11368   echo "$ac_t""yes" 1>&6
11369     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11370   cat >> confdefs.h <<EOF
11371 #define $ac_tr_hdr 1
11372 EOF
11373  
11374 else
11375   echo "$ac_t""no" 1>&6
11376 fi
11377 done
11378
11379                 fi
11380
11381                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11382                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11383 echo "configure:11384: checking for pthread_create in default libraries" >&5
11384 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11385   echo $ac_n "(cached) $ac_c" 1>&6
11386 else
11387   
11388                 if test "$cross_compiling" = yes; then
11389   cat > conftest.$ac_ext <<EOF
11390 #line 11391 "configure"
11391 #include "confdefs.h"
11392 /* pthread test headers */
11393 #include <pthread.h>
11394 #if HAVE_PTHREADS < 7
11395 #include <errno.h>
11396 #endif
11397 #ifndef NULL
11398 #define NULL (void*)0
11399 #endif
11400
11401 static void *task(p)
11402         void *p;
11403 {
11404         return (void *) (p == NULL);
11405 }
11406
11407 int main() {
11408
11409         /* pthread test function */
11410 #ifndef PTHREAD_CREATE_DETACHED
11411 #define PTHREAD_CREATE_DETACHED 1
11412 #endif
11413         pthread_t t;
11414         int status;
11415         int detach = PTHREAD_CREATE_DETACHED;
11416
11417 #if HAVE_PTHREADS > 4
11418         /* Final pthreads */
11419         pthread_attr_t attr;
11420
11421         status = pthread_attr_init(&attr);
11422         if( status ) return status;
11423
11424 #if HAVE_PTHREADS < 7
11425         status = pthread_attr_setdetachstate(&attr, &detach);
11426         if( status < 0 ) status = errno;
11427 #else
11428         status = pthread_attr_setdetachstate(&attr, detach);
11429 #endif
11430         if( status ) return status;
11431         status = pthread_create( &t, &attr, task, NULL );
11432 #if HAVE_PTHREADS < 7
11433         if( status < 0 ) status = errno;
11434 #endif
11435         if( status ) return status;
11436 #else
11437         /* Draft 4 pthreads */
11438         status = pthread_create( &t, pthread_attr_default, task, NULL );
11439         if( status ) return errno;
11440
11441         /* give thread a chance to complete */
11442         /* it should remain joinable and hence detachable */
11443         sleep( 1 );
11444
11445         status = pthread_detach( &t );
11446         if( status ) return errno;
11447 #endif
11448
11449 #ifdef HAVE_LINUX_THREADS
11450         pthread_kill_other_threads_np();
11451 #endif
11452
11453         return 0;
11454
11455 ; return 0; }
11456 EOF
11457 if { (eval echo configure:11458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11458   rm -rf conftest*
11459   ol_cv_pthread_create=yes
11460 else
11461   echo "configure: failed program was:" >&5
11462   cat conftest.$ac_ext >&5
11463   rm -rf conftest*
11464   ol_cv_pthread_create=no
11465 fi
11466 rm -f conftest*
11467 else
11468   cat > conftest.$ac_ext <<EOF
11469 #line 11470 "configure"
11470 #include "confdefs.h"
11471 /* pthread test headers */
11472 #include <pthread.h>
11473 #if HAVE_PTHREADS < 7
11474 #include <errno.h>
11475 #endif
11476 #ifndef NULL
11477 #define NULL (void*)0
11478 #endif
11479
11480 static void *task(p)
11481         void *p;
11482 {
11483         return (void *) (p == NULL);
11484 }
11485
11486
11487 int main(argc, argv)
11488         int argc;
11489         char **argv;
11490 {
11491
11492         /* pthread test function */
11493 #ifndef PTHREAD_CREATE_DETACHED
11494 #define PTHREAD_CREATE_DETACHED 1
11495 #endif
11496         pthread_t t;
11497         int status;
11498         int detach = PTHREAD_CREATE_DETACHED;
11499
11500 #if HAVE_PTHREADS > 4
11501         /* Final pthreads */
11502         pthread_attr_t attr;
11503
11504         status = pthread_attr_init(&attr);
11505         if( status ) return status;
11506
11507 #if HAVE_PTHREADS < 7
11508         status = pthread_attr_setdetachstate(&attr, &detach);
11509         if( status < 0 ) status = errno;
11510 #else
11511         status = pthread_attr_setdetachstate(&attr, detach);
11512 #endif
11513         if( status ) return status;
11514         status = pthread_create( &t, &attr, task, NULL );
11515 #if HAVE_PTHREADS < 7
11516         if( status < 0 ) status = errno;
11517 #endif
11518         if( status ) return status;
11519 #else
11520         /* Draft 4 pthreads */
11521         status = pthread_create( &t, pthread_attr_default, task, NULL );
11522         if( status ) return errno;
11523
11524         /* give thread a chance to complete */
11525         /* it should remain joinable and hence detachable */
11526         sleep( 1 );
11527
11528         status = pthread_detach( &t );
11529         if( status ) return errno;
11530 #endif
11531
11532 #ifdef HAVE_LINUX_THREADS
11533         pthread_kill_other_threads_np();
11534 #endif
11535
11536         return 0;
11537
11538 }
11539
11540 EOF
11541 if { (eval echo configure:11542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11542 then
11543   ol_cv_pthread_create=yes
11544 else
11545   echo "configure: failed program was:" >&5
11546   cat conftest.$ac_ext >&5
11547   rm -fr conftest*
11548   ol_cv_pthread_create=no
11549 fi
11550 rm -fr conftest*
11551 fi
11552
11553 fi
11554
11555 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11556
11557                 if test $ol_cv_pthread_create != no ; then
11558                         ol_link_threads=posix
11559                         ol_link_pthreads=""
11560                 fi
11561                 
11562                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11563 if test "$ol_link_threads" = no ; then
11564         # try -kthread
11565         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11566 echo "configure:11567: checking for pthread link with -kthread" >&5
11567 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11568   echo $ac_n "(cached) $ac_c" 1>&6
11569 else
11570   
11571                 # save the flags
11572                 ol_LIBS="$LIBS"
11573                 LIBS="-kthread $LIBS"
11574
11575                 if test "$cross_compiling" = yes; then
11576   cat > conftest.$ac_ext <<EOF
11577 #line 11578 "configure"
11578 #include "confdefs.h"
11579 /* pthread test headers */
11580 #include <pthread.h>
11581 #if HAVE_PTHREADS < 7
11582 #include <errno.h>
11583 #endif
11584 #ifndef NULL
11585 #define NULL (void*)0
11586 #endif
11587
11588 static void *task(p)
11589         void *p;
11590 {
11591         return (void *) (p == NULL);
11592 }
11593
11594 int main() {
11595
11596         /* pthread test function */
11597 #ifndef PTHREAD_CREATE_DETACHED
11598 #define PTHREAD_CREATE_DETACHED 1
11599 #endif
11600         pthread_t t;
11601         int status;
11602         int detach = PTHREAD_CREATE_DETACHED;
11603
11604 #if HAVE_PTHREADS > 4
11605         /* Final pthreads */
11606         pthread_attr_t attr;
11607
11608         status = pthread_attr_init(&attr);
11609         if( status ) return status;
11610
11611 #if HAVE_PTHREADS < 7
11612         status = pthread_attr_setdetachstate(&attr, &detach);
11613         if( status < 0 ) status = errno;
11614 #else
11615         status = pthread_attr_setdetachstate(&attr, detach);
11616 #endif
11617         if( status ) return status;
11618         status = pthread_create( &t, &attr, task, NULL );
11619 #if HAVE_PTHREADS < 7
11620         if( status < 0 ) status = errno;
11621 #endif
11622         if( status ) return status;
11623 #else
11624         /* Draft 4 pthreads */
11625         status = pthread_create( &t, pthread_attr_default, task, NULL );
11626         if( status ) return errno;
11627
11628         /* give thread a chance to complete */
11629         /* it should remain joinable and hence detachable */
11630         sleep( 1 );
11631
11632         status = pthread_detach( &t );
11633         if( status ) return errno;
11634 #endif
11635
11636 #ifdef HAVE_LINUX_THREADS
11637         pthread_kill_other_threads_np();
11638 #endif
11639
11640         return 0;
11641
11642 ; return 0; }
11643 EOF
11644 if { (eval echo configure:11645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11645   rm -rf conftest*
11646   ol_cv_pthread_kthread=yes
11647 else
11648   echo "configure: failed program was:" >&5
11649   cat conftest.$ac_ext >&5
11650   rm -rf conftest*
11651   ol_cv_pthread_kthread=no
11652 fi
11653 rm -f conftest*
11654 else
11655   cat > conftest.$ac_ext <<EOF
11656 #line 11657 "configure"
11657 #include "confdefs.h"
11658 /* pthread test headers */
11659 #include <pthread.h>
11660 #if HAVE_PTHREADS < 7
11661 #include <errno.h>
11662 #endif
11663 #ifndef NULL
11664 #define NULL (void*)0
11665 #endif
11666
11667 static void *task(p)
11668         void *p;
11669 {
11670         return (void *) (p == NULL);
11671 }
11672
11673
11674 int main(argc, argv)
11675         int argc;
11676         char **argv;
11677 {
11678
11679         /* pthread test function */
11680 #ifndef PTHREAD_CREATE_DETACHED
11681 #define PTHREAD_CREATE_DETACHED 1
11682 #endif
11683         pthread_t t;
11684         int status;
11685         int detach = PTHREAD_CREATE_DETACHED;
11686
11687 #if HAVE_PTHREADS > 4
11688         /* Final pthreads */
11689         pthread_attr_t attr;
11690
11691         status = pthread_attr_init(&attr);
11692         if( status ) return status;
11693
11694 #if HAVE_PTHREADS < 7
11695         status = pthread_attr_setdetachstate(&attr, &detach);
11696         if( status < 0 ) status = errno;
11697 #else
11698         status = pthread_attr_setdetachstate(&attr, detach);
11699 #endif
11700         if( status ) return status;
11701         status = pthread_create( &t, &attr, task, NULL );
11702 #if HAVE_PTHREADS < 7
11703         if( status < 0 ) status = errno;
11704 #endif
11705         if( status ) return status;
11706 #else
11707         /* Draft 4 pthreads */
11708         status = pthread_create( &t, pthread_attr_default, task, NULL );
11709         if( status ) return errno;
11710
11711         /* give thread a chance to complete */
11712         /* it should remain joinable and hence detachable */
11713         sleep( 1 );
11714
11715         status = pthread_detach( &t );
11716         if( status ) return errno;
11717 #endif
11718
11719 #ifdef HAVE_LINUX_THREADS
11720         pthread_kill_other_threads_np();
11721 #endif
11722
11723         return 0;
11724
11725 }
11726
11727 EOF
11728 if { (eval echo configure:11729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11729 then
11730   ol_cv_pthread_kthread=yes
11731 else
11732   echo "configure: failed program was:" >&5
11733   cat conftest.$ac_ext >&5
11734   rm -fr conftest*
11735   ol_cv_pthread_kthread=no
11736 fi
11737 rm -fr conftest*
11738 fi
11739
11740
11741                 # restore the LIBS
11742                 LIBS="$ol_LIBS"
11743         
11744 fi
11745
11746 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11747
11748         if test $ol_cv_pthread_kthread = yes ; then
11749                 ol_link_pthreads="-kthread"
11750                 ol_link_threads=posix
11751         fi
11752 fi
11753
11754                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11755 if test "$ol_link_threads" = no ; then
11756         # try -pthread
11757         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11758 echo "configure:11759: checking for pthread link with -pthread" >&5
11759 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11760   echo $ac_n "(cached) $ac_c" 1>&6
11761 else
11762   
11763                 # save the flags
11764                 ol_LIBS="$LIBS"
11765                 LIBS="-pthread $LIBS"
11766
11767                 if test "$cross_compiling" = yes; then
11768   cat > conftest.$ac_ext <<EOF
11769 #line 11770 "configure"
11770 #include "confdefs.h"
11771 /* pthread test headers */
11772 #include <pthread.h>
11773 #if HAVE_PTHREADS < 7
11774 #include <errno.h>
11775 #endif
11776 #ifndef NULL
11777 #define NULL (void*)0
11778 #endif
11779
11780 static void *task(p)
11781         void *p;
11782 {
11783         return (void *) (p == NULL);
11784 }
11785
11786 int main() {
11787
11788         /* pthread test function */
11789 #ifndef PTHREAD_CREATE_DETACHED
11790 #define PTHREAD_CREATE_DETACHED 1
11791 #endif
11792         pthread_t t;
11793         int status;
11794         int detach = PTHREAD_CREATE_DETACHED;
11795
11796 #if HAVE_PTHREADS > 4
11797         /* Final pthreads */
11798         pthread_attr_t attr;
11799
11800         status = pthread_attr_init(&attr);
11801         if( status ) return status;
11802
11803 #if HAVE_PTHREADS < 7
11804         status = pthread_attr_setdetachstate(&attr, &detach);
11805         if( status < 0 ) status = errno;
11806 #else
11807         status = pthread_attr_setdetachstate(&attr, detach);
11808 #endif
11809         if( status ) return status;
11810         status = pthread_create( &t, &attr, task, NULL );
11811 #if HAVE_PTHREADS < 7
11812         if( status < 0 ) status = errno;
11813 #endif
11814         if( status ) return status;
11815 #else
11816         /* Draft 4 pthreads */
11817         status = pthread_create( &t, pthread_attr_default, task, NULL );
11818         if( status ) return errno;
11819
11820         /* give thread a chance to complete */
11821         /* it should remain joinable and hence detachable */
11822         sleep( 1 );
11823
11824         status = pthread_detach( &t );
11825         if( status ) return errno;
11826 #endif
11827
11828 #ifdef HAVE_LINUX_THREADS
11829         pthread_kill_other_threads_np();
11830 #endif
11831
11832         return 0;
11833
11834 ; return 0; }
11835 EOF
11836 if { (eval echo configure:11837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11837   rm -rf conftest*
11838   ol_cv_pthread_pthread=yes
11839 else
11840   echo "configure: failed program was:" >&5
11841   cat conftest.$ac_ext >&5
11842   rm -rf conftest*
11843   ol_cv_pthread_pthread=no
11844 fi
11845 rm -f conftest*
11846 else
11847   cat > conftest.$ac_ext <<EOF
11848 #line 11849 "configure"
11849 #include "confdefs.h"
11850 /* pthread test headers */
11851 #include <pthread.h>
11852 #if HAVE_PTHREADS < 7
11853 #include <errno.h>
11854 #endif
11855 #ifndef NULL
11856 #define NULL (void*)0
11857 #endif
11858
11859 static void *task(p)
11860         void *p;
11861 {
11862         return (void *) (p == NULL);
11863 }
11864
11865
11866 int main(argc, argv)
11867         int argc;
11868         char **argv;
11869 {
11870
11871         /* pthread test function */
11872 #ifndef PTHREAD_CREATE_DETACHED
11873 #define PTHREAD_CREATE_DETACHED 1
11874 #endif
11875         pthread_t t;
11876         int status;
11877         int detach = PTHREAD_CREATE_DETACHED;
11878
11879 #if HAVE_PTHREADS > 4
11880         /* Final pthreads */
11881         pthread_attr_t attr;
11882
11883         status = pthread_attr_init(&attr);
11884         if( status ) return status;
11885
11886 #if HAVE_PTHREADS < 7
11887         status = pthread_attr_setdetachstate(&attr, &detach);
11888         if( status < 0 ) status = errno;
11889 #else
11890         status = pthread_attr_setdetachstate(&attr, detach);
11891 #endif
11892         if( status ) return status;
11893         status = pthread_create( &t, &attr, task, NULL );
11894 #if HAVE_PTHREADS < 7
11895         if( status < 0 ) status = errno;
11896 #endif
11897         if( status ) return status;
11898 #else
11899         /* Draft 4 pthreads */
11900         status = pthread_create( &t, pthread_attr_default, task, NULL );
11901         if( status ) return errno;
11902
11903         /* give thread a chance to complete */
11904         /* it should remain joinable and hence detachable */
11905         sleep( 1 );
11906
11907         status = pthread_detach( &t );
11908         if( status ) return errno;
11909 #endif
11910
11911 #ifdef HAVE_LINUX_THREADS
11912         pthread_kill_other_threads_np();
11913 #endif
11914
11915         return 0;
11916
11917 }
11918
11919 EOF
11920 if { (eval echo configure:11921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11921 then
11922   ol_cv_pthread_pthread=yes
11923 else
11924   echo "configure: failed program was:" >&5
11925   cat conftest.$ac_ext >&5
11926   rm -fr conftest*
11927   ol_cv_pthread_pthread=no
11928 fi
11929 rm -fr conftest*
11930 fi
11931
11932
11933                 # restore the LIBS
11934                 LIBS="$ol_LIBS"
11935         
11936 fi
11937
11938 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
11939
11940         if test $ol_cv_pthread_pthread = yes ; then
11941                 ol_link_pthreads="-pthread"
11942                 ol_link_threads=posix
11943         fi
11944 fi
11945
11946                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
11947 if test "$ol_link_threads" = no ; then
11948         # try -pthreads
11949         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
11950 echo "configure:11951: checking for pthread link with -pthreads" >&5
11951 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
11952   echo $ac_n "(cached) $ac_c" 1>&6
11953 else
11954   
11955                 # save the flags
11956                 ol_LIBS="$LIBS"
11957                 LIBS="-pthreads $LIBS"
11958
11959                 if test "$cross_compiling" = yes; then
11960   cat > conftest.$ac_ext <<EOF
11961 #line 11962 "configure"
11962 #include "confdefs.h"
11963 /* pthread test headers */
11964 #include <pthread.h>
11965 #if HAVE_PTHREADS < 7
11966 #include <errno.h>
11967 #endif
11968 #ifndef NULL
11969 #define NULL (void*)0
11970 #endif
11971
11972 static void *task(p)
11973         void *p;
11974 {
11975         return (void *) (p == NULL);
11976 }
11977
11978 int main() {
11979
11980         /* pthread test function */
11981 #ifndef PTHREAD_CREATE_DETACHED
11982 #define PTHREAD_CREATE_DETACHED 1
11983 #endif
11984         pthread_t t;
11985         int status;
11986         int detach = PTHREAD_CREATE_DETACHED;
11987
11988 #if HAVE_PTHREADS > 4
11989         /* Final pthreads */
11990         pthread_attr_t attr;
11991
11992         status = pthread_attr_init(&attr);
11993         if( status ) return status;
11994
11995 #if HAVE_PTHREADS < 7
11996         status = pthread_attr_setdetachstate(&attr, &detach);
11997         if( status < 0 ) status = errno;
11998 #else
11999         status = pthread_attr_setdetachstate(&attr, detach);
12000 #endif
12001         if( status ) return status;
12002         status = pthread_create( &t, &attr, task, NULL );
12003 #if HAVE_PTHREADS < 7
12004         if( status < 0 ) status = errno;
12005 #endif
12006         if( status ) return status;
12007 #else
12008         /* Draft 4 pthreads */
12009         status = pthread_create( &t, pthread_attr_default, task, NULL );
12010         if( status ) return errno;
12011
12012         /* give thread a chance to complete */
12013         /* it should remain joinable and hence detachable */
12014         sleep( 1 );
12015
12016         status = pthread_detach( &t );
12017         if( status ) return errno;
12018 #endif
12019
12020 #ifdef HAVE_LINUX_THREADS
12021         pthread_kill_other_threads_np();
12022 #endif
12023
12024         return 0;
12025
12026 ; return 0; }
12027 EOF
12028 if { (eval echo configure:12029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12029   rm -rf conftest*
12030   ol_cv_pthread_pthreads=yes
12031 else
12032   echo "configure: failed program was:" >&5
12033   cat conftest.$ac_ext >&5
12034   rm -rf conftest*
12035   ol_cv_pthread_pthreads=no
12036 fi
12037 rm -f conftest*
12038 else
12039   cat > conftest.$ac_ext <<EOF
12040 #line 12041 "configure"
12041 #include "confdefs.h"
12042 /* pthread test headers */
12043 #include <pthread.h>
12044 #if HAVE_PTHREADS < 7
12045 #include <errno.h>
12046 #endif
12047 #ifndef NULL
12048 #define NULL (void*)0
12049 #endif
12050
12051 static void *task(p)
12052         void *p;
12053 {
12054         return (void *) (p == NULL);
12055 }
12056
12057
12058 int main(argc, argv)
12059         int argc;
12060         char **argv;
12061 {
12062
12063         /* pthread test function */
12064 #ifndef PTHREAD_CREATE_DETACHED
12065 #define PTHREAD_CREATE_DETACHED 1
12066 #endif
12067         pthread_t t;
12068         int status;
12069         int detach = PTHREAD_CREATE_DETACHED;
12070
12071 #if HAVE_PTHREADS > 4
12072         /* Final pthreads */
12073         pthread_attr_t attr;
12074
12075         status = pthread_attr_init(&attr);
12076         if( status ) return status;
12077
12078 #if HAVE_PTHREADS < 7
12079         status = pthread_attr_setdetachstate(&attr, &detach);
12080         if( status < 0 ) status = errno;
12081 #else
12082         status = pthread_attr_setdetachstate(&attr, detach);
12083 #endif
12084         if( status ) return status;
12085         status = pthread_create( &t, &attr, task, NULL );
12086 #if HAVE_PTHREADS < 7
12087         if( status < 0 ) status = errno;
12088 #endif
12089         if( status ) return status;
12090 #else
12091         /* Draft 4 pthreads */
12092         status = pthread_create( &t, pthread_attr_default, task, NULL );
12093         if( status ) return errno;
12094
12095         /* give thread a chance to complete */
12096         /* it should remain joinable and hence detachable */
12097         sleep( 1 );
12098
12099         status = pthread_detach( &t );
12100         if( status ) return errno;
12101 #endif
12102
12103 #ifdef HAVE_LINUX_THREADS
12104         pthread_kill_other_threads_np();
12105 #endif
12106
12107         return 0;
12108
12109 }
12110
12111 EOF
12112 if { (eval echo configure:12113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12113 then
12114   ol_cv_pthread_pthreads=yes
12115 else
12116   echo "configure: failed program was:" >&5
12117   cat conftest.$ac_ext >&5
12118   rm -fr conftest*
12119   ol_cv_pthread_pthreads=no
12120 fi
12121 rm -fr conftest*
12122 fi
12123
12124
12125                 # restore the LIBS
12126                 LIBS="$ol_LIBS"
12127         
12128 fi
12129
12130 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12131
12132         if test $ol_cv_pthread_pthreads = yes ; then
12133                 ol_link_pthreads="-pthreads"
12134                 ol_link_threads=posix
12135         fi
12136 fi
12137
12138                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12139 if test "$ol_link_threads" = no ; then
12140         # try -mthreads
12141         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12142 echo "configure:12143: checking for pthread link with -mthreads" >&5
12143 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12144   echo $ac_n "(cached) $ac_c" 1>&6
12145 else
12146   
12147                 # save the flags
12148                 ol_LIBS="$LIBS"
12149                 LIBS="-mthreads $LIBS"
12150
12151                 if test "$cross_compiling" = yes; then
12152   cat > conftest.$ac_ext <<EOF
12153 #line 12154 "configure"
12154 #include "confdefs.h"
12155 /* pthread test headers */
12156 #include <pthread.h>
12157 #if HAVE_PTHREADS < 7
12158 #include <errno.h>
12159 #endif
12160 #ifndef NULL
12161 #define NULL (void*)0
12162 #endif
12163
12164 static void *task(p)
12165         void *p;
12166 {
12167         return (void *) (p == NULL);
12168 }
12169
12170 int main() {
12171
12172         /* pthread test function */
12173 #ifndef PTHREAD_CREATE_DETACHED
12174 #define PTHREAD_CREATE_DETACHED 1
12175 #endif
12176         pthread_t t;
12177         int status;
12178         int detach = PTHREAD_CREATE_DETACHED;
12179
12180 #if HAVE_PTHREADS > 4
12181         /* Final pthreads */
12182         pthread_attr_t attr;
12183
12184         status = pthread_attr_init(&attr);
12185         if( status ) return status;
12186
12187 #if HAVE_PTHREADS < 7
12188         status = pthread_attr_setdetachstate(&attr, &detach);
12189         if( status < 0 ) status = errno;
12190 #else
12191         status = pthread_attr_setdetachstate(&attr, detach);
12192 #endif
12193         if( status ) return status;
12194         status = pthread_create( &t, &attr, task, NULL );
12195 #if HAVE_PTHREADS < 7
12196         if( status < 0 ) status = errno;
12197 #endif
12198         if( status ) return status;
12199 #else
12200         /* Draft 4 pthreads */
12201         status = pthread_create( &t, pthread_attr_default, task, NULL );
12202         if( status ) return errno;
12203
12204         /* give thread a chance to complete */
12205         /* it should remain joinable and hence detachable */
12206         sleep( 1 );
12207
12208         status = pthread_detach( &t );
12209         if( status ) return errno;
12210 #endif
12211
12212 #ifdef HAVE_LINUX_THREADS
12213         pthread_kill_other_threads_np();
12214 #endif
12215
12216         return 0;
12217
12218 ; return 0; }
12219 EOF
12220 if { (eval echo configure:12221: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12221   rm -rf conftest*
12222   ol_cv_pthread_mthreads=yes
12223 else
12224   echo "configure: failed program was:" >&5
12225   cat conftest.$ac_ext >&5
12226   rm -rf conftest*
12227   ol_cv_pthread_mthreads=no
12228 fi
12229 rm -f conftest*
12230 else
12231   cat > conftest.$ac_ext <<EOF
12232 #line 12233 "configure"
12233 #include "confdefs.h"
12234 /* pthread test headers */
12235 #include <pthread.h>
12236 #if HAVE_PTHREADS < 7
12237 #include <errno.h>
12238 #endif
12239 #ifndef NULL
12240 #define NULL (void*)0
12241 #endif
12242
12243 static void *task(p)
12244         void *p;
12245 {
12246         return (void *) (p == NULL);
12247 }
12248
12249
12250 int main(argc, argv)
12251         int argc;
12252         char **argv;
12253 {
12254
12255         /* pthread test function */
12256 #ifndef PTHREAD_CREATE_DETACHED
12257 #define PTHREAD_CREATE_DETACHED 1
12258 #endif
12259         pthread_t t;
12260         int status;
12261         int detach = PTHREAD_CREATE_DETACHED;
12262
12263 #if HAVE_PTHREADS > 4
12264         /* Final pthreads */
12265         pthread_attr_t attr;
12266
12267         status = pthread_attr_init(&attr);
12268         if( status ) return status;
12269
12270 #if HAVE_PTHREADS < 7
12271         status = pthread_attr_setdetachstate(&attr, &detach);
12272         if( status < 0 ) status = errno;
12273 #else
12274         status = pthread_attr_setdetachstate(&attr, detach);
12275 #endif
12276         if( status ) return status;
12277         status = pthread_create( &t, &attr, task, NULL );
12278 #if HAVE_PTHREADS < 7
12279         if( status < 0 ) status = errno;
12280 #endif
12281         if( status ) return status;
12282 #else
12283         /* Draft 4 pthreads */
12284         status = pthread_create( &t, pthread_attr_default, task, NULL );
12285         if( status ) return errno;
12286
12287         /* give thread a chance to complete */
12288         /* it should remain joinable and hence detachable */
12289         sleep( 1 );
12290
12291         status = pthread_detach( &t );
12292         if( status ) return errno;
12293 #endif
12294
12295 #ifdef HAVE_LINUX_THREADS
12296         pthread_kill_other_threads_np();
12297 #endif
12298
12299         return 0;
12300
12301 }
12302
12303 EOF
12304 if { (eval echo configure:12305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12305 then
12306   ol_cv_pthread_mthreads=yes
12307 else
12308   echo "configure: failed program was:" >&5
12309   cat conftest.$ac_ext >&5
12310   rm -fr conftest*
12311   ol_cv_pthread_mthreads=no
12312 fi
12313 rm -fr conftest*
12314 fi
12315
12316
12317                 # restore the LIBS
12318                 LIBS="$ol_LIBS"
12319         
12320 fi
12321
12322 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12323
12324         if test $ol_cv_pthread_mthreads = yes ; then
12325                 ol_link_pthreads="-mthreads"
12326                 ol_link_threads=posix
12327         fi
12328 fi
12329
12330                 # Pthread try link: -thread (ol_cv_pthread_thread)
12331 if test "$ol_link_threads" = no ; then
12332         # try -thread
12333         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12334 echo "configure:12335: checking for pthread link with -thread" >&5
12335 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12336   echo $ac_n "(cached) $ac_c" 1>&6
12337 else
12338   
12339                 # save the flags
12340                 ol_LIBS="$LIBS"
12341                 LIBS="-thread $LIBS"
12342
12343                 if test "$cross_compiling" = yes; then
12344   cat > conftest.$ac_ext <<EOF
12345 #line 12346 "configure"
12346 #include "confdefs.h"
12347 /* pthread test headers */
12348 #include <pthread.h>
12349 #if HAVE_PTHREADS < 7
12350 #include <errno.h>
12351 #endif
12352 #ifndef NULL
12353 #define NULL (void*)0
12354 #endif
12355
12356 static void *task(p)
12357         void *p;
12358 {
12359         return (void *) (p == NULL);
12360 }
12361
12362 int main() {
12363
12364         /* pthread test function */
12365 #ifndef PTHREAD_CREATE_DETACHED
12366 #define PTHREAD_CREATE_DETACHED 1
12367 #endif
12368         pthread_t t;
12369         int status;
12370         int detach = PTHREAD_CREATE_DETACHED;
12371
12372 #if HAVE_PTHREADS > 4
12373         /* Final pthreads */
12374         pthread_attr_t attr;
12375
12376         status = pthread_attr_init(&attr);
12377         if( status ) return status;
12378
12379 #if HAVE_PTHREADS < 7
12380         status = pthread_attr_setdetachstate(&attr, &detach);
12381         if( status < 0 ) status = errno;
12382 #else
12383         status = pthread_attr_setdetachstate(&attr, detach);
12384 #endif
12385         if( status ) return status;
12386         status = pthread_create( &t, &attr, task, NULL );
12387 #if HAVE_PTHREADS < 7
12388         if( status < 0 ) status = errno;
12389 #endif
12390         if( status ) return status;
12391 #else
12392         /* Draft 4 pthreads */
12393         status = pthread_create( &t, pthread_attr_default, task, NULL );
12394         if( status ) return errno;
12395
12396         /* give thread a chance to complete */
12397         /* it should remain joinable and hence detachable */
12398         sleep( 1 );
12399
12400         status = pthread_detach( &t );
12401         if( status ) return errno;
12402 #endif
12403
12404 #ifdef HAVE_LINUX_THREADS
12405         pthread_kill_other_threads_np();
12406 #endif
12407
12408         return 0;
12409
12410 ; return 0; }
12411 EOF
12412 if { (eval echo configure:12413: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12413   rm -rf conftest*
12414   ol_cv_pthread_thread=yes
12415 else
12416   echo "configure: failed program was:" >&5
12417   cat conftest.$ac_ext >&5
12418   rm -rf conftest*
12419   ol_cv_pthread_thread=no
12420 fi
12421 rm -f conftest*
12422 else
12423   cat > conftest.$ac_ext <<EOF
12424 #line 12425 "configure"
12425 #include "confdefs.h"
12426 /* pthread test headers */
12427 #include <pthread.h>
12428 #if HAVE_PTHREADS < 7
12429 #include <errno.h>
12430 #endif
12431 #ifndef NULL
12432 #define NULL (void*)0
12433 #endif
12434
12435 static void *task(p)
12436         void *p;
12437 {
12438         return (void *) (p == NULL);
12439 }
12440
12441
12442 int main(argc, argv)
12443         int argc;
12444         char **argv;
12445 {
12446
12447         /* pthread test function */
12448 #ifndef PTHREAD_CREATE_DETACHED
12449 #define PTHREAD_CREATE_DETACHED 1
12450 #endif
12451         pthread_t t;
12452         int status;
12453         int detach = PTHREAD_CREATE_DETACHED;
12454
12455 #if HAVE_PTHREADS > 4
12456         /* Final pthreads */
12457         pthread_attr_t attr;
12458
12459         status = pthread_attr_init(&attr);
12460         if( status ) return status;
12461
12462 #if HAVE_PTHREADS < 7
12463         status = pthread_attr_setdetachstate(&attr, &detach);
12464         if( status < 0 ) status = errno;
12465 #else
12466         status = pthread_attr_setdetachstate(&attr, detach);
12467 #endif
12468         if( status ) return status;
12469         status = pthread_create( &t, &attr, task, NULL );
12470 #if HAVE_PTHREADS < 7
12471         if( status < 0 ) status = errno;
12472 #endif
12473         if( status ) return status;
12474 #else
12475         /* Draft 4 pthreads */
12476         status = pthread_create( &t, pthread_attr_default, task, NULL );
12477         if( status ) return errno;
12478
12479         /* give thread a chance to complete */
12480         /* it should remain joinable and hence detachable */
12481         sleep( 1 );
12482
12483         status = pthread_detach( &t );
12484         if( status ) return errno;
12485 #endif
12486
12487 #ifdef HAVE_LINUX_THREADS
12488         pthread_kill_other_threads_np();
12489 #endif
12490
12491         return 0;
12492
12493 }
12494
12495 EOF
12496 if { (eval echo configure:12497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12497 then
12498   ol_cv_pthread_thread=yes
12499 else
12500   echo "configure: failed program was:" >&5
12501   cat conftest.$ac_ext >&5
12502   rm -fr conftest*
12503   ol_cv_pthread_thread=no
12504 fi
12505 rm -fr conftest*
12506 fi
12507
12508
12509                 # restore the LIBS
12510                 LIBS="$ol_LIBS"
12511         
12512 fi
12513
12514 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12515
12516         if test $ol_cv_pthread_thread = yes ; then
12517                 ol_link_pthreads="-thread"
12518                 ol_link_threads=posix
12519         fi
12520 fi
12521
12522
12523                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12524 if test "$ol_link_threads" = no ; then
12525         # try -lpthread -lmach -lexc -lc_r
12526         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12527 echo "configure:12528: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12528 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12529   echo $ac_n "(cached) $ac_c" 1>&6
12530 else
12531   
12532                 # save the flags
12533                 ol_LIBS="$LIBS"
12534                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12535
12536                 if test "$cross_compiling" = yes; then
12537   cat > conftest.$ac_ext <<EOF
12538 #line 12539 "configure"
12539 #include "confdefs.h"
12540 /* pthread test headers */
12541 #include <pthread.h>
12542 #if HAVE_PTHREADS < 7
12543 #include <errno.h>
12544 #endif
12545 #ifndef NULL
12546 #define NULL (void*)0
12547 #endif
12548
12549 static void *task(p)
12550         void *p;
12551 {
12552         return (void *) (p == NULL);
12553 }
12554
12555 int main() {
12556
12557         /* pthread test function */
12558 #ifndef PTHREAD_CREATE_DETACHED
12559 #define PTHREAD_CREATE_DETACHED 1
12560 #endif
12561         pthread_t t;
12562         int status;
12563         int detach = PTHREAD_CREATE_DETACHED;
12564
12565 #if HAVE_PTHREADS > 4
12566         /* Final pthreads */
12567         pthread_attr_t attr;
12568
12569         status = pthread_attr_init(&attr);
12570         if( status ) return status;
12571
12572 #if HAVE_PTHREADS < 7
12573         status = pthread_attr_setdetachstate(&attr, &detach);
12574         if( status < 0 ) status = errno;
12575 #else
12576         status = pthread_attr_setdetachstate(&attr, detach);
12577 #endif
12578         if( status ) return status;
12579         status = pthread_create( &t, &attr, task, NULL );
12580 #if HAVE_PTHREADS < 7
12581         if( status < 0 ) status = errno;
12582 #endif
12583         if( status ) return status;
12584 #else
12585         /* Draft 4 pthreads */
12586         status = pthread_create( &t, pthread_attr_default, task, NULL );
12587         if( status ) return errno;
12588
12589         /* give thread a chance to complete */
12590         /* it should remain joinable and hence detachable */
12591         sleep( 1 );
12592
12593         status = pthread_detach( &t );
12594         if( status ) return errno;
12595 #endif
12596
12597 #ifdef HAVE_LINUX_THREADS
12598         pthread_kill_other_threads_np();
12599 #endif
12600
12601         return 0;
12602
12603 ; return 0; }
12604 EOF
12605 if { (eval echo configure:12606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12606   rm -rf conftest*
12607   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12608 else
12609   echo "configure: failed program was:" >&5
12610   cat conftest.$ac_ext >&5
12611   rm -rf conftest*
12612   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12613 fi
12614 rm -f conftest*
12615 else
12616   cat > conftest.$ac_ext <<EOF
12617 #line 12618 "configure"
12618 #include "confdefs.h"
12619 /* pthread test headers */
12620 #include <pthread.h>
12621 #if HAVE_PTHREADS < 7
12622 #include <errno.h>
12623 #endif
12624 #ifndef NULL
12625 #define NULL (void*)0
12626 #endif
12627
12628 static void *task(p)
12629         void *p;
12630 {
12631         return (void *) (p == NULL);
12632 }
12633
12634
12635 int main(argc, argv)
12636         int argc;
12637         char **argv;
12638 {
12639
12640         /* pthread test function */
12641 #ifndef PTHREAD_CREATE_DETACHED
12642 #define PTHREAD_CREATE_DETACHED 1
12643 #endif
12644         pthread_t t;
12645         int status;
12646         int detach = PTHREAD_CREATE_DETACHED;
12647
12648 #if HAVE_PTHREADS > 4
12649         /* Final pthreads */
12650         pthread_attr_t attr;
12651
12652         status = pthread_attr_init(&attr);
12653         if( status ) return status;
12654
12655 #if HAVE_PTHREADS < 7
12656         status = pthread_attr_setdetachstate(&attr, &detach);
12657         if( status < 0 ) status = errno;
12658 #else
12659         status = pthread_attr_setdetachstate(&attr, detach);
12660 #endif
12661         if( status ) return status;
12662         status = pthread_create( &t, &attr, task, NULL );
12663 #if HAVE_PTHREADS < 7
12664         if( status < 0 ) status = errno;
12665 #endif
12666         if( status ) return status;
12667 #else
12668         /* Draft 4 pthreads */
12669         status = pthread_create( &t, pthread_attr_default, task, NULL );
12670         if( status ) return errno;
12671
12672         /* give thread a chance to complete */
12673         /* it should remain joinable and hence detachable */
12674         sleep( 1 );
12675
12676         status = pthread_detach( &t );
12677         if( status ) return errno;
12678 #endif
12679
12680 #ifdef HAVE_LINUX_THREADS
12681         pthread_kill_other_threads_np();
12682 #endif
12683
12684         return 0;
12685
12686 }
12687
12688 EOF
12689 if { (eval echo configure:12690: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12690 then
12691   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12692 else
12693   echo "configure: failed program was:" >&5
12694   cat conftest.$ac_ext >&5
12695   rm -fr conftest*
12696   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12697 fi
12698 rm -fr conftest*
12699 fi
12700
12701
12702                 # restore the LIBS
12703                 LIBS="$ol_LIBS"
12704         
12705 fi
12706
12707 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12708
12709         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12710                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12711                 ol_link_threads=posix
12712         fi
12713 fi
12714
12715                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12716 if test "$ol_link_threads" = no ; then
12717         # try -lpthread -lmach -lexc
12718         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12719 echo "configure:12720: checking for pthread link with -lpthread -lmach -lexc" >&5
12720 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12721   echo $ac_n "(cached) $ac_c" 1>&6
12722 else
12723   
12724                 # save the flags
12725                 ol_LIBS="$LIBS"
12726                 LIBS="-lpthread -lmach -lexc $LIBS"
12727
12728                 if test "$cross_compiling" = yes; then
12729   cat > conftest.$ac_ext <<EOF
12730 #line 12731 "configure"
12731 #include "confdefs.h"
12732 /* pthread test headers */
12733 #include <pthread.h>
12734 #if HAVE_PTHREADS < 7
12735 #include <errno.h>
12736 #endif
12737 #ifndef NULL
12738 #define NULL (void*)0
12739 #endif
12740
12741 static void *task(p)
12742         void *p;
12743 {
12744         return (void *) (p == NULL);
12745 }
12746
12747 int main() {
12748
12749         /* pthread test function */
12750 #ifndef PTHREAD_CREATE_DETACHED
12751 #define PTHREAD_CREATE_DETACHED 1
12752 #endif
12753         pthread_t t;
12754         int status;
12755         int detach = PTHREAD_CREATE_DETACHED;
12756
12757 #if HAVE_PTHREADS > 4
12758         /* Final pthreads */
12759         pthread_attr_t attr;
12760
12761         status = pthread_attr_init(&attr);
12762         if( status ) return status;
12763
12764 #if HAVE_PTHREADS < 7
12765         status = pthread_attr_setdetachstate(&attr, &detach);
12766         if( status < 0 ) status = errno;
12767 #else
12768         status = pthread_attr_setdetachstate(&attr, detach);
12769 #endif
12770         if( status ) return status;
12771         status = pthread_create( &t, &attr, task, NULL );
12772 #if HAVE_PTHREADS < 7
12773         if( status < 0 ) status = errno;
12774 #endif
12775         if( status ) return status;
12776 #else
12777         /* Draft 4 pthreads */
12778         status = pthread_create( &t, pthread_attr_default, task, NULL );
12779         if( status ) return errno;
12780
12781         /* give thread a chance to complete */
12782         /* it should remain joinable and hence detachable */
12783         sleep( 1 );
12784
12785         status = pthread_detach( &t );
12786         if( status ) return errno;
12787 #endif
12788
12789 #ifdef HAVE_LINUX_THREADS
12790         pthread_kill_other_threads_np();
12791 #endif
12792
12793         return 0;
12794
12795 ; return 0; }
12796 EOF
12797 if { (eval echo configure:12798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12798   rm -rf conftest*
12799   ol_cv_pthread_lpthread_lmach_lexc=yes
12800 else
12801   echo "configure: failed program was:" >&5
12802   cat conftest.$ac_ext >&5
12803   rm -rf conftest*
12804   ol_cv_pthread_lpthread_lmach_lexc=no
12805 fi
12806 rm -f conftest*
12807 else
12808   cat > conftest.$ac_ext <<EOF
12809 #line 12810 "configure"
12810 #include "confdefs.h"
12811 /* pthread test headers */
12812 #include <pthread.h>
12813 #if HAVE_PTHREADS < 7
12814 #include <errno.h>
12815 #endif
12816 #ifndef NULL
12817 #define NULL (void*)0
12818 #endif
12819
12820 static void *task(p)
12821         void *p;
12822 {
12823         return (void *) (p == NULL);
12824 }
12825
12826
12827 int main(argc, argv)
12828         int argc;
12829         char **argv;
12830 {
12831
12832         /* pthread test function */
12833 #ifndef PTHREAD_CREATE_DETACHED
12834 #define PTHREAD_CREATE_DETACHED 1
12835 #endif
12836         pthread_t t;
12837         int status;
12838         int detach = PTHREAD_CREATE_DETACHED;
12839
12840 #if HAVE_PTHREADS > 4
12841         /* Final pthreads */
12842         pthread_attr_t attr;
12843
12844         status = pthread_attr_init(&attr);
12845         if( status ) return status;
12846
12847 #if HAVE_PTHREADS < 7
12848         status = pthread_attr_setdetachstate(&attr, &detach);
12849         if( status < 0 ) status = errno;
12850 #else
12851         status = pthread_attr_setdetachstate(&attr, detach);
12852 #endif
12853         if( status ) return status;
12854         status = pthread_create( &t, &attr, task, NULL );
12855 #if HAVE_PTHREADS < 7
12856         if( status < 0 ) status = errno;
12857 #endif
12858         if( status ) return status;
12859 #else
12860         /* Draft 4 pthreads */
12861         status = pthread_create( &t, pthread_attr_default, task, NULL );
12862         if( status ) return errno;
12863
12864         /* give thread a chance to complete */
12865         /* it should remain joinable and hence detachable */
12866         sleep( 1 );
12867
12868         status = pthread_detach( &t );
12869         if( status ) return errno;
12870 #endif
12871
12872 #ifdef HAVE_LINUX_THREADS
12873         pthread_kill_other_threads_np();
12874 #endif
12875
12876         return 0;
12877
12878 }
12879
12880 EOF
12881 if { (eval echo configure:12882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12882 then
12883   ol_cv_pthread_lpthread_lmach_lexc=yes
12884 else
12885   echo "configure: failed program was:" >&5
12886   cat conftest.$ac_ext >&5
12887   rm -fr conftest*
12888   ol_cv_pthread_lpthread_lmach_lexc=no
12889 fi
12890 rm -fr conftest*
12891 fi
12892
12893
12894                 # restore the LIBS
12895                 LIBS="$ol_LIBS"
12896         
12897 fi
12898
12899 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
12900
12901         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
12902                 ol_link_pthreads="-lpthread -lmach -lexc"
12903                 ol_link_threads=posix
12904         fi
12905 fi
12906
12907
12908                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
12909 if test "$ol_link_threads" = no ; then
12910         # try -lpthread -Wl,-woff,85
12911         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
12912 echo "configure:12913: checking for pthread link with -lpthread -Wl,-woff,85" >&5
12913 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
12914   echo $ac_n "(cached) $ac_c" 1>&6
12915 else
12916   
12917                 # save the flags
12918                 ol_LIBS="$LIBS"
12919                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
12920
12921                 if test "$cross_compiling" = yes; then
12922   cat > conftest.$ac_ext <<EOF
12923 #line 12924 "configure"
12924 #include "confdefs.h"
12925 /* pthread test headers */
12926 #include <pthread.h>
12927 #if HAVE_PTHREADS < 7
12928 #include <errno.h>
12929 #endif
12930 #ifndef NULL
12931 #define NULL (void*)0
12932 #endif
12933
12934 static void *task(p)
12935         void *p;
12936 {
12937         return (void *) (p == NULL);
12938 }
12939
12940 int main() {
12941
12942         /* pthread test function */
12943 #ifndef PTHREAD_CREATE_DETACHED
12944 #define PTHREAD_CREATE_DETACHED 1
12945 #endif
12946         pthread_t t;
12947         int status;
12948         int detach = PTHREAD_CREATE_DETACHED;
12949
12950 #if HAVE_PTHREADS > 4
12951         /* Final pthreads */
12952         pthread_attr_t attr;
12953
12954         status = pthread_attr_init(&attr);
12955         if( status ) return status;
12956
12957 #if HAVE_PTHREADS < 7
12958         status = pthread_attr_setdetachstate(&attr, &detach);
12959         if( status < 0 ) status = errno;
12960 #else
12961         status = pthread_attr_setdetachstate(&attr, detach);
12962 #endif
12963         if( status ) return status;
12964         status = pthread_create( &t, &attr, task, NULL );
12965 #if HAVE_PTHREADS < 7
12966         if( status < 0 ) status = errno;
12967 #endif
12968         if( status ) return status;
12969 #else
12970         /* Draft 4 pthreads */
12971         status = pthread_create( &t, pthread_attr_default, task, NULL );
12972         if( status ) return errno;
12973
12974         /* give thread a chance to complete */
12975         /* it should remain joinable and hence detachable */
12976         sleep( 1 );
12977
12978         status = pthread_detach( &t );
12979         if( status ) return errno;
12980 #endif
12981
12982 #ifdef HAVE_LINUX_THREADS
12983         pthread_kill_other_threads_np();
12984 #endif
12985
12986         return 0;
12987
12988 ; return 0; }
12989 EOF
12990 if { (eval echo configure:12991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12991   rm -rf conftest*
12992   ol_cv_pthread_lib_lpthread_woff=yes
12993 else
12994   echo "configure: failed program was:" >&5
12995   cat conftest.$ac_ext >&5
12996   rm -rf conftest*
12997   ol_cv_pthread_lib_lpthread_woff=no
12998 fi
12999 rm -f conftest*
13000 else
13001   cat > conftest.$ac_ext <<EOF
13002 #line 13003 "configure"
13003 #include "confdefs.h"
13004 /* pthread test headers */
13005 #include <pthread.h>
13006 #if HAVE_PTHREADS < 7
13007 #include <errno.h>
13008 #endif
13009 #ifndef NULL
13010 #define NULL (void*)0
13011 #endif
13012
13013 static void *task(p)
13014         void *p;
13015 {
13016         return (void *) (p == NULL);
13017 }
13018
13019
13020 int main(argc, argv)
13021         int argc;
13022         char **argv;
13023 {
13024
13025         /* pthread test function */
13026 #ifndef PTHREAD_CREATE_DETACHED
13027 #define PTHREAD_CREATE_DETACHED 1
13028 #endif
13029         pthread_t t;
13030         int status;
13031         int detach = PTHREAD_CREATE_DETACHED;
13032
13033 #if HAVE_PTHREADS > 4
13034         /* Final pthreads */
13035         pthread_attr_t attr;
13036
13037         status = pthread_attr_init(&attr);
13038         if( status ) return status;
13039
13040 #if HAVE_PTHREADS < 7
13041         status = pthread_attr_setdetachstate(&attr, &detach);
13042         if( status < 0 ) status = errno;
13043 #else
13044         status = pthread_attr_setdetachstate(&attr, detach);
13045 #endif
13046         if( status ) return status;
13047         status = pthread_create( &t, &attr, task, NULL );
13048 #if HAVE_PTHREADS < 7
13049         if( status < 0 ) status = errno;
13050 #endif
13051         if( status ) return status;
13052 #else
13053         /* Draft 4 pthreads */
13054         status = pthread_create( &t, pthread_attr_default, task, NULL );
13055         if( status ) return errno;
13056
13057         /* give thread a chance to complete */
13058         /* it should remain joinable and hence detachable */
13059         sleep( 1 );
13060
13061         status = pthread_detach( &t );
13062         if( status ) return errno;
13063 #endif
13064
13065 #ifdef HAVE_LINUX_THREADS
13066         pthread_kill_other_threads_np();
13067 #endif
13068
13069         return 0;
13070
13071 }
13072
13073 EOF
13074 if { (eval echo configure:13075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13075 then
13076   ol_cv_pthread_lib_lpthread_woff=yes
13077 else
13078   echo "configure: failed program was:" >&5
13079   cat conftest.$ac_ext >&5
13080   rm -fr conftest*
13081   ol_cv_pthread_lib_lpthread_woff=no
13082 fi
13083 rm -fr conftest*
13084 fi
13085
13086
13087                 # restore the LIBS
13088                 LIBS="$ol_LIBS"
13089         
13090 fi
13091
13092 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13093
13094         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13095                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13096                 ol_link_threads=posix
13097         fi
13098 fi
13099
13100
13101                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13102 if test "$ol_link_threads" = no ; then
13103         # try -lpthread
13104         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13105 echo "configure:13106: checking for pthread link with -lpthread" >&5
13106 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13107   echo $ac_n "(cached) $ac_c" 1>&6
13108 else
13109   
13110                 # save the flags
13111                 ol_LIBS="$LIBS"
13112                 LIBS="-lpthread $LIBS"
13113
13114                 if test "$cross_compiling" = yes; then
13115   cat > conftest.$ac_ext <<EOF
13116 #line 13117 "configure"
13117 #include "confdefs.h"
13118 /* pthread test headers */
13119 #include <pthread.h>
13120 #if HAVE_PTHREADS < 7
13121 #include <errno.h>
13122 #endif
13123 #ifndef NULL
13124 #define NULL (void*)0
13125 #endif
13126
13127 static void *task(p)
13128         void *p;
13129 {
13130         return (void *) (p == NULL);
13131 }
13132
13133 int main() {
13134
13135         /* pthread test function */
13136 #ifndef PTHREAD_CREATE_DETACHED
13137 #define PTHREAD_CREATE_DETACHED 1
13138 #endif
13139         pthread_t t;
13140         int status;
13141         int detach = PTHREAD_CREATE_DETACHED;
13142
13143 #if HAVE_PTHREADS > 4
13144         /* Final pthreads */
13145         pthread_attr_t attr;
13146
13147         status = pthread_attr_init(&attr);
13148         if( status ) return status;
13149
13150 #if HAVE_PTHREADS < 7
13151         status = pthread_attr_setdetachstate(&attr, &detach);
13152         if( status < 0 ) status = errno;
13153 #else
13154         status = pthread_attr_setdetachstate(&attr, detach);
13155 #endif
13156         if( status ) return status;
13157         status = pthread_create( &t, &attr, task, NULL );
13158 #if HAVE_PTHREADS < 7
13159         if( status < 0 ) status = errno;
13160 #endif
13161         if( status ) return status;
13162 #else
13163         /* Draft 4 pthreads */
13164         status = pthread_create( &t, pthread_attr_default, task, NULL );
13165         if( status ) return errno;
13166
13167         /* give thread a chance to complete */
13168         /* it should remain joinable and hence detachable */
13169         sleep( 1 );
13170
13171         status = pthread_detach( &t );
13172         if( status ) return errno;
13173 #endif
13174
13175 #ifdef HAVE_LINUX_THREADS
13176         pthread_kill_other_threads_np();
13177 #endif
13178
13179         return 0;
13180
13181 ; return 0; }
13182 EOF
13183 if { (eval echo configure:13184: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13184   rm -rf conftest*
13185   ol_cv_pthread_lpthread=yes
13186 else
13187   echo "configure: failed program was:" >&5
13188   cat conftest.$ac_ext >&5
13189   rm -rf conftest*
13190   ol_cv_pthread_lpthread=no
13191 fi
13192 rm -f conftest*
13193 else
13194   cat > conftest.$ac_ext <<EOF
13195 #line 13196 "configure"
13196 #include "confdefs.h"
13197 /* pthread test headers */
13198 #include <pthread.h>
13199 #if HAVE_PTHREADS < 7
13200 #include <errno.h>
13201 #endif
13202 #ifndef NULL
13203 #define NULL (void*)0
13204 #endif
13205
13206 static void *task(p)
13207         void *p;
13208 {
13209         return (void *) (p == NULL);
13210 }
13211
13212
13213 int main(argc, argv)
13214         int argc;
13215         char **argv;
13216 {
13217
13218         /* pthread test function */
13219 #ifndef PTHREAD_CREATE_DETACHED
13220 #define PTHREAD_CREATE_DETACHED 1
13221 #endif
13222         pthread_t t;
13223         int status;
13224         int detach = PTHREAD_CREATE_DETACHED;
13225
13226 #if HAVE_PTHREADS > 4
13227         /* Final pthreads */
13228         pthread_attr_t attr;
13229
13230         status = pthread_attr_init(&attr);
13231         if( status ) return status;
13232
13233 #if HAVE_PTHREADS < 7
13234         status = pthread_attr_setdetachstate(&attr, &detach);
13235         if( status < 0 ) status = errno;
13236 #else
13237         status = pthread_attr_setdetachstate(&attr, detach);
13238 #endif
13239         if( status ) return status;
13240         status = pthread_create( &t, &attr, task, NULL );
13241 #if HAVE_PTHREADS < 7
13242         if( status < 0 ) status = errno;
13243 #endif
13244         if( status ) return status;
13245 #else
13246         /* Draft 4 pthreads */
13247         status = pthread_create( &t, pthread_attr_default, task, NULL );
13248         if( status ) return errno;
13249
13250         /* give thread a chance to complete */
13251         /* it should remain joinable and hence detachable */
13252         sleep( 1 );
13253
13254         status = pthread_detach( &t );
13255         if( status ) return errno;
13256 #endif
13257
13258 #ifdef HAVE_LINUX_THREADS
13259         pthread_kill_other_threads_np();
13260 #endif
13261
13262         return 0;
13263
13264 }
13265
13266 EOF
13267 if { (eval echo configure:13268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13268 then
13269   ol_cv_pthread_lpthread=yes
13270 else
13271   echo "configure: failed program was:" >&5
13272   cat conftest.$ac_ext >&5
13273   rm -fr conftest*
13274   ol_cv_pthread_lpthread=no
13275 fi
13276 rm -fr conftest*
13277 fi
13278
13279
13280                 # restore the LIBS
13281                 LIBS="$ol_LIBS"
13282         
13283 fi
13284
13285 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13286
13287         if test $ol_cv_pthread_lpthread = yes ; then
13288                 ol_link_pthreads="-lpthread"
13289                 ol_link_threads=posix
13290         fi
13291 fi
13292
13293                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13294 if test "$ol_link_threads" = no ; then
13295         # try -lc_r
13296         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13297 echo "configure:13298: checking for pthread link with -lc_r" >&5
13298 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13299   echo $ac_n "(cached) $ac_c" 1>&6
13300 else
13301   
13302                 # save the flags
13303                 ol_LIBS="$LIBS"
13304                 LIBS="-lc_r $LIBS"
13305
13306                 if test "$cross_compiling" = yes; then
13307   cat > conftest.$ac_ext <<EOF
13308 #line 13309 "configure"
13309 #include "confdefs.h"
13310 /* pthread test headers */
13311 #include <pthread.h>
13312 #if HAVE_PTHREADS < 7
13313 #include <errno.h>
13314 #endif
13315 #ifndef NULL
13316 #define NULL (void*)0
13317 #endif
13318
13319 static void *task(p)
13320         void *p;
13321 {
13322         return (void *) (p == NULL);
13323 }
13324
13325 int main() {
13326
13327         /* pthread test function */
13328 #ifndef PTHREAD_CREATE_DETACHED
13329 #define PTHREAD_CREATE_DETACHED 1
13330 #endif
13331         pthread_t t;
13332         int status;
13333         int detach = PTHREAD_CREATE_DETACHED;
13334
13335 #if HAVE_PTHREADS > 4
13336         /* Final pthreads */
13337         pthread_attr_t attr;
13338
13339         status = pthread_attr_init(&attr);
13340         if( status ) return status;
13341
13342 #if HAVE_PTHREADS < 7
13343         status = pthread_attr_setdetachstate(&attr, &detach);
13344         if( status < 0 ) status = errno;
13345 #else
13346         status = pthread_attr_setdetachstate(&attr, detach);
13347 #endif
13348         if( status ) return status;
13349         status = pthread_create( &t, &attr, task, NULL );
13350 #if HAVE_PTHREADS < 7
13351         if( status < 0 ) status = errno;
13352 #endif
13353         if( status ) return status;
13354 #else
13355         /* Draft 4 pthreads */
13356         status = pthread_create( &t, pthread_attr_default, task, NULL );
13357         if( status ) return errno;
13358
13359         /* give thread a chance to complete */
13360         /* it should remain joinable and hence detachable */
13361         sleep( 1 );
13362
13363         status = pthread_detach( &t );
13364         if( status ) return errno;
13365 #endif
13366
13367 #ifdef HAVE_LINUX_THREADS
13368         pthread_kill_other_threads_np();
13369 #endif
13370
13371         return 0;
13372
13373 ; return 0; }
13374 EOF
13375 if { (eval echo configure:13376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13376   rm -rf conftest*
13377   ol_cv_pthread_lc_r=yes
13378 else
13379   echo "configure: failed program was:" >&5
13380   cat conftest.$ac_ext >&5
13381   rm -rf conftest*
13382   ol_cv_pthread_lc_r=no
13383 fi
13384 rm -f conftest*
13385 else
13386   cat > conftest.$ac_ext <<EOF
13387 #line 13388 "configure"
13388 #include "confdefs.h"
13389 /* pthread test headers */
13390 #include <pthread.h>
13391 #if HAVE_PTHREADS < 7
13392 #include <errno.h>
13393 #endif
13394 #ifndef NULL
13395 #define NULL (void*)0
13396 #endif
13397
13398 static void *task(p)
13399         void *p;
13400 {
13401         return (void *) (p == NULL);
13402 }
13403
13404
13405 int main(argc, argv)
13406         int argc;
13407         char **argv;
13408 {
13409
13410         /* pthread test function */
13411 #ifndef PTHREAD_CREATE_DETACHED
13412 #define PTHREAD_CREATE_DETACHED 1
13413 #endif
13414         pthread_t t;
13415         int status;
13416         int detach = PTHREAD_CREATE_DETACHED;
13417
13418 #if HAVE_PTHREADS > 4
13419         /* Final pthreads */
13420         pthread_attr_t attr;
13421
13422         status = pthread_attr_init(&attr);
13423         if( status ) return status;
13424
13425 #if HAVE_PTHREADS < 7
13426         status = pthread_attr_setdetachstate(&attr, &detach);
13427         if( status < 0 ) status = errno;
13428 #else
13429         status = pthread_attr_setdetachstate(&attr, detach);
13430 #endif
13431         if( status ) return status;
13432         status = pthread_create( &t, &attr, task, NULL );
13433 #if HAVE_PTHREADS < 7
13434         if( status < 0 ) status = errno;
13435 #endif
13436         if( status ) return status;
13437 #else
13438         /* Draft 4 pthreads */
13439         status = pthread_create( &t, pthread_attr_default, task, NULL );
13440         if( status ) return errno;
13441
13442         /* give thread a chance to complete */
13443         /* it should remain joinable and hence detachable */
13444         sleep( 1 );
13445
13446         status = pthread_detach( &t );
13447         if( status ) return errno;
13448 #endif
13449
13450 #ifdef HAVE_LINUX_THREADS
13451         pthread_kill_other_threads_np();
13452 #endif
13453
13454         return 0;
13455
13456 }
13457
13458 EOF
13459 if { (eval echo configure:13460: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13460 then
13461   ol_cv_pthread_lc_r=yes
13462 else
13463   echo "configure: failed program was:" >&5
13464   cat conftest.$ac_ext >&5
13465   rm -fr conftest*
13466   ol_cv_pthread_lc_r=no
13467 fi
13468 rm -fr conftest*
13469 fi
13470
13471
13472                 # restore the LIBS
13473                 LIBS="$ol_LIBS"
13474         
13475 fi
13476
13477 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13478
13479         if test $ol_cv_pthread_lc_r = yes ; then
13480                 ol_link_pthreads="-lc_r"
13481                 ol_link_threads=posix
13482         fi
13483 fi
13484
13485
13486                 # Pthread try link: -threads (ol_cv_pthread_threads)
13487 if test "$ol_link_threads" = no ; then
13488         # try -threads
13489         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13490 echo "configure:13491: checking for pthread link with -threads" >&5
13491 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13492   echo $ac_n "(cached) $ac_c" 1>&6
13493 else
13494   
13495                 # save the flags
13496                 ol_LIBS="$LIBS"
13497                 LIBS="-threads $LIBS"
13498
13499                 if test "$cross_compiling" = yes; then
13500   cat > conftest.$ac_ext <<EOF
13501 #line 13502 "configure"
13502 #include "confdefs.h"
13503 /* pthread test headers */
13504 #include <pthread.h>
13505 #if HAVE_PTHREADS < 7
13506 #include <errno.h>
13507 #endif
13508 #ifndef NULL
13509 #define NULL (void*)0
13510 #endif
13511
13512 static void *task(p)
13513         void *p;
13514 {
13515         return (void *) (p == NULL);
13516 }
13517
13518 int main() {
13519
13520         /* pthread test function */
13521 #ifndef PTHREAD_CREATE_DETACHED
13522 #define PTHREAD_CREATE_DETACHED 1
13523 #endif
13524         pthread_t t;
13525         int status;
13526         int detach = PTHREAD_CREATE_DETACHED;
13527
13528 #if HAVE_PTHREADS > 4
13529         /* Final pthreads */
13530         pthread_attr_t attr;
13531
13532         status = pthread_attr_init(&attr);
13533         if( status ) return status;
13534
13535 #if HAVE_PTHREADS < 7
13536         status = pthread_attr_setdetachstate(&attr, &detach);
13537         if( status < 0 ) status = errno;
13538 #else
13539         status = pthread_attr_setdetachstate(&attr, detach);
13540 #endif
13541         if( status ) return status;
13542         status = pthread_create( &t, &attr, task, NULL );
13543 #if HAVE_PTHREADS < 7
13544         if( status < 0 ) status = errno;
13545 #endif
13546         if( status ) return status;
13547 #else
13548         /* Draft 4 pthreads */
13549         status = pthread_create( &t, pthread_attr_default, task, NULL );
13550         if( status ) return errno;
13551
13552         /* give thread a chance to complete */
13553         /* it should remain joinable and hence detachable */
13554         sleep( 1 );
13555
13556         status = pthread_detach( &t );
13557         if( status ) return errno;
13558 #endif
13559
13560 #ifdef HAVE_LINUX_THREADS
13561         pthread_kill_other_threads_np();
13562 #endif
13563
13564         return 0;
13565
13566 ; return 0; }
13567 EOF
13568 if { (eval echo configure:13569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13569   rm -rf conftest*
13570   ol_cv_pthread_threads=yes
13571 else
13572   echo "configure: failed program was:" >&5
13573   cat conftest.$ac_ext >&5
13574   rm -rf conftest*
13575   ol_cv_pthread_threads=no
13576 fi
13577 rm -f conftest*
13578 else
13579   cat > conftest.$ac_ext <<EOF
13580 #line 13581 "configure"
13581 #include "confdefs.h"
13582 /* pthread test headers */
13583 #include <pthread.h>
13584 #if HAVE_PTHREADS < 7
13585 #include <errno.h>
13586 #endif
13587 #ifndef NULL
13588 #define NULL (void*)0
13589 #endif
13590
13591 static void *task(p)
13592         void *p;
13593 {
13594         return (void *) (p == NULL);
13595 }
13596
13597
13598 int main(argc, argv)
13599         int argc;
13600         char **argv;
13601 {
13602
13603         /* pthread test function */
13604 #ifndef PTHREAD_CREATE_DETACHED
13605 #define PTHREAD_CREATE_DETACHED 1
13606 #endif
13607         pthread_t t;
13608         int status;
13609         int detach = PTHREAD_CREATE_DETACHED;
13610
13611 #if HAVE_PTHREADS > 4
13612         /* Final pthreads */
13613         pthread_attr_t attr;
13614
13615         status = pthread_attr_init(&attr);
13616         if( status ) return status;
13617
13618 #if HAVE_PTHREADS < 7
13619         status = pthread_attr_setdetachstate(&attr, &detach);
13620         if( status < 0 ) status = errno;
13621 #else
13622         status = pthread_attr_setdetachstate(&attr, detach);
13623 #endif
13624         if( status ) return status;
13625         status = pthread_create( &t, &attr, task, NULL );
13626 #if HAVE_PTHREADS < 7
13627         if( status < 0 ) status = errno;
13628 #endif
13629         if( status ) return status;
13630 #else
13631         /* Draft 4 pthreads */
13632         status = pthread_create( &t, pthread_attr_default, task, NULL );
13633         if( status ) return errno;
13634
13635         /* give thread a chance to complete */
13636         /* it should remain joinable and hence detachable */
13637         sleep( 1 );
13638
13639         status = pthread_detach( &t );
13640         if( status ) return errno;
13641 #endif
13642
13643 #ifdef HAVE_LINUX_THREADS
13644         pthread_kill_other_threads_np();
13645 #endif
13646
13647         return 0;
13648
13649 }
13650
13651 EOF
13652 if { (eval echo configure:13653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13653 then
13654   ol_cv_pthread_threads=yes
13655 else
13656   echo "configure: failed program was:" >&5
13657   cat conftest.$ac_ext >&5
13658   rm -fr conftest*
13659   ol_cv_pthread_threads=no
13660 fi
13661 rm -fr conftest*
13662 fi
13663
13664
13665                 # restore the LIBS
13666                 LIBS="$ol_LIBS"
13667         
13668 fi
13669
13670 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13671
13672         if test $ol_cv_pthread_threads = yes ; then
13673                 ol_link_pthreads="-threads"
13674                 ol_link_threads=posix
13675         fi
13676 fi
13677
13678
13679                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13680 if test "$ol_link_threads" = no ; then
13681         # try -lpthreads -lmach -lexc -lc_r
13682         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13683 echo "configure:13684: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13684 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13685   echo $ac_n "(cached) $ac_c" 1>&6
13686 else
13687   
13688                 # save the flags
13689                 ol_LIBS="$LIBS"
13690                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13691
13692                 if test "$cross_compiling" = yes; then
13693   cat > conftest.$ac_ext <<EOF
13694 #line 13695 "configure"
13695 #include "confdefs.h"
13696 /* pthread test headers */
13697 #include <pthread.h>
13698 #if HAVE_PTHREADS < 7
13699 #include <errno.h>
13700 #endif
13701 #ifndef NULL
13702 #define NULL (void*)0
13703 #endif
13704
13705 static void *task(p)
13706         void *p;
13707 {
13708         return (void *) (p == NULL);
13709 }
13710
13711 int main() {
13712
13713         /* pthread test function */
13714 #ifndef PTHREAD_CREATE_DETACHED
13715 #define PTHREAD_CREATE_DETACHED 1
13716 #endif
13717         pthread_t t;
13718         int status;
13719         int detach = PTHREAD_CREATE_DETACHED;
13720
13721 #if HAVE_PTHREADS > 4
13722         /* Final pthreads */
13723         pthread_attr_t attr;
13724
13725         status = pthread_attr_init(&attr);
13726         if( status ) return status;
13727
13728 #if HAVE_PTHREADS < 7
13729         status = pthread_attr_setdetachstate(&attr, &detach);
13730         if( status < 0 ) status = errno;
13731 #else
13732         status = pthread_attr_setdetachstate(&attr, detach);
13733 #endif
13734         if( status ) return status;
13735         status = pthread_create( &t, &attr, task, NULL );
13736 #if HAVE_PTHREADS < 7
13737         if( status < 0 ) status = errno;
13738 #endif
13739         if( status ) return status;
13740 #else
13741         /* Draft 4 pthreads */
13742         status = pthread_create( &t, pthread_attr_default, task, NULL );
13743         if( status ) return errno;
13744
13745         /* give thread a chance to complete */
13746         /* it should remain joinable and hence detachable */
13747         sleep( 1 );
13748
13749         status = pthread_detach( &t );
13750         if( status ) return errno;
13751 #endif
13752
13753 #ifdef HAVE_LINUX_THREADS
13754         pthread_kill_other_threads_np();
13755 #endif
13756
13757         return 0;
13758
13759 ; return 0; }
13760 EOF
13761 if { (eval echo configure:13762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13762   rm -rf conftest*
13763   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13764 else
13765   echo "configure: failed program was:" >&5
13766   cat conftest.$ac_ext >&5
13767   rm -rf conftest*
13768   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13769 fi
13770 rm -f conftest*
13771 else
13772   cat > conftest.$ac_ext <<EOF
13773 #line 13774 "configure"
13774 #include "confdefs.h"
13775 /* pthread test headers */
13776 #include <pthread.h>
13777 #if HAVE_PTHREADS < 7
13778 #include <errno.h>
13779 #endif
13780 #ifndef NULL
13781 #define NULL (void*)0
13782 #endif
13783
13784 static void *task(p)
13785         void *p;
13786 {
13787         return (void *) (p == NULL);
13788 }
13789
13790
13791 int main(argc, argv)
13792         int argc;
13793         char **argv;
13794 {
13795
13796         /* pthread test function */
13797 #ifndef PTHREAD_CREATE_DETACHED
13798 #define PTHREAD_CREATE_DETACHED 1
13799 #endif
13800         pthread_t t;
13801         int status;
13802         int detach = PTHREAD_CREATE_DETACHED;
13803
13804 #if HAVE_PTHREADS > 4
13805         /* Final pthreads */
13806         pthread_attr_t attr;
13807
13808         status = pthread_attr_init(&attr);
13809         if( status ) return status;
13810
13811 #if HAVE_PTHREADS < 7
13812         status = pthread_attr_setdetachstate(&attr, &detach);
13813         if( status < 0 ) status = errno;
13814 #else
13815         status = pthread_attr_setdetachstate(&attr, detach);
13816 #endif
13817         if( status ) return status;
13818         status = pthread_create( &t, &attr, task, NULL );
13819 #if HAVE_PTHREADS < 7
13820         if( status < 0 ) status = errno;
13821 #endif
13822         if( status ) return status;
13823 #else
13824         /* Draft 4 pthreads */
13825         status = pthread_create( &t, pthread_attr_default, task, NULL );
13826         if( status ) return errno;
13827
13828         /* give thread a chance to complete */
13829         /* it should remain joinable and hence detachable */
13830         sleep( 1 );
13831
13832         status = pthread_detach( &t );
13833         if( status ) return errno;
13834 #endif
13835
13836 #ifdef HAVE_LINUX_THREADS
13837         pthread_kill_other_threads_np();
13838 #endif
13839
13840         return 0;
13841
13842 }
13843
13844 EOF
13845 if { (eval echo configure:13846: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13846 then
13847   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13848 else
13849   echo "configure: failed program was:" >&5
13850   cat conftest.$ac_ext >&5
13851   rm -fr conftest*
13852   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13853 fi
13854 rm -fr conftest*
13855 fi
13856
13857
13858                 # restore the LIBS
13859                 LIBS="$ol_LIBS"
13860         
13861 fi
13862
13863 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
13864
13865         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
13866                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
13867                 ol_link_threads=posix
13868         fi
13869 fi
13870
13871                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
13872 if test "$ol_link_threads" = no ; then
13873         # try -lpthreads -lmach -lexc
13874         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
13875 echo "configure:13876: checking for pthread link with -lpthreads -lmach -lexc" >&5
13876 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
13877   echo $ac_n "(cached) $ac_c" 1>&6
13878 else
13879   
13880                 # save the flags
13881                 ol_LIBS="$LIBS"
13882                 LIBS="-lpthreads -lmach -lexc $LIBS"
13883
13884                 if test "$cross_compiling" = yes; then
13885   cat > conftest.$ac_ext <<EOF
13886 #line 13887 "configure"
13887 #include "confdefs.h"
13888 /* pthread test headers */
13889 #include <pthread.h>
13890 #if HAVE_PTHREADS < 7
13891 #include <errno.h>
13892 #endif
13893 #ifndef NULL
13894 #define NULL (void*)0
13895 #endif
13896
13897 static void *task(p)
13898         void *p;
13899 {
13900         return (void *) (p == NULL);
13901 }
13902
13903 int main() {
13904
13905         /* pthread test function */
13906 #ifndef PTHREAD_CREATE_DETACHED
13907 #define PTHREAD_CREATE_DETACHED 1
13908 #endif
13909         pthread_t t;
13910         int status;
13911         int detach = PTHREAD_CREATE_DETACHED;
13912
13913 #if HAVE_PTHREADS > 4
13914         /* Final pthreads */
13915         pthread_attr_t attr;
13916
13917         status = pthread_attr_init(&attr);
13918         if( status ) return status;
13919
13920 #if HAVE_PTHREADS < 7
13921         status = pthread_attr_setdetachstate(&attr, &detach);
13922         if( status < 0 ) status = errno;
13923 #else
13924         status = pthread_attr_setdetachstate(&attr, detach);
13925 #endif
13926         if( status ) return status;
13927         status = pthread_create( &t, &attr, task, NULL );
13928 #if HAVE_PTHREADS < 7
13929         if( status < 0 ) status = errno;
13930 #endif
13931         if( status ) return status;
13932 #else
13933         /* Draft 4 pthreads */
13934         status = pthread_create( &t, pthread_attr_default, task, NULL );
13935         if( status ) return errno;
13936
13937         /* give thread a chance to complete */
13938         /* it should remain joinable and hence detachable */
13939         sleep( 1 );
13940
13941         status = pthread_detach( &t );
13942         if( status ) return errno;
13943 #endif
13944
13945 #ifdef HAVE_LINUX_THREADS
13946         pthread_kill_other_threads_np();
13947 #endif
13948
13949         return 0;
13950
13951 ; return 0; }
13952 EOF
13953 if { (eval echo configure:13954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13954   rm -rf conftest*
13955   ol_cv_pthread_lpthreads_lmach_lexc=yes
13956 else
13957   echo "configure: failed program was:" >&5
13958   cat conftest.$ac_ext >&5
13959   rm -rf conftest*
13960   ol_cv_pthread_lpthreads_lmach_lexc=no
13961 fi
13962 rm -f conftest*
13963 else
13964   cat > conftest.$ac_ext <<EOF
13965 #line 13966 "configure"
13966 #include "confdefs.h"
13967 /* pthread test headers */
13968 #include <pthread.h>
13969 #if HAVE_PTHREADS < 7
13970 #include <errno.h>
13971 #endif
13972 #ifndef NULL
13973 #define NULL (void*)0
13974 #endif
13975
13976 static void *task(p)
13977         void *p;
13978 {
13979         return (void *) (p == NULL);
13980 }
13981
13982
13983 int main(argc, argv)
13984         int argc;
13985         char **argv;
13986 {
13987
13988         /* pthread test function */
13989 #ifndef PTHREAD_CREATE_DETACHED
13990 #define PTHREAD_CREATE_DETACHED 1
13991 #endif
13992         pthread_t t;
13993         int status;
13994         int detach = PTHREAD_CREATE_DETACHED;
13995
13996 #if HAVE_PTHREADS > 4
13997         /* Final pthreads */
13998         pthread_attr_t attr;
13999
14000         status = pthread_attr_init(&attr);
14001         if( status ) return status;
14002
14003 #if HAVE_PTHREADS < 7
14004         status = pthread_attr_setdetachstate(&attr, &detach);
14005         if( status < 0 ) status = errno;
14006 #else
14007         status = pthread_attr_setdetachstate(&attr, detach);
14008 #endif
14009         if( status ) return status;
14010         status = pthread_create( &t, &attr, task, NULL );
14011 #if HAVE_PTHREADS < 7
14012         if( status < 0 ) status = errno;
14013 #endif
14014         if( status ) return status;
14015 #else
14016         /* Draft 4 pthreads */
14017         status = pthread_create( &t, pthread_attr_default, task, NULL );
14018         if( status ) return errno;
14019
14020         /* give thread a chance to complete */
14021         /* it should remain joinable and hence detachable */
14022         sleep( 1 );
14023
14024         status = pthread_detach( &t );
14025         if( status ) return errno;
14026 #endif
14027
14028 #ifdef HAVE_LINUX_THREADS
14029         pthread_kill_other_threads_np();
14030 #endif
14031
14032         return 0;
14033
14034 }
14035
14036 EOF
14037 if { (eval echo configure:14038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14038 then
14039   ol_cv_pthread_lpthreads_lmach_lexc=yes
14040 else
14041   echo "configure: failed program was:" >&5
14042   cat conftest.$ac_ext >&5
14043   rm -fr conftest*
14044   ol_cv_pthread_lpthreads_lmach_lexc=no
14045 fi
14046 rm -fr conftest*
14047 fi
14048
14049
14050                 # restore the LIBS
14051                 LIBS="$ol_LIBS"
14052         
14053 fi
14054
14055 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14056
14057         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14058                 ol_link_pthreads="-lpthreads -lmach -lexc"
14059                 ol_link_threads=posix
14060         fi
14061 fi
14062
14063                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14064 if test "$ol_link_threads" = no ; then
14065         # try -lpthreads -lexc
14066         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14067 echo "configure:14068: checking for pthread link with -lpthreads -lexc" >&5
14068 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14069   echo $ac_n "(cached) $ac_c" 1>&6
14070 else
14071   
14072                 # save the flags
14073                 ol_LIBS="$LIBS"
14074                 LIBS="-lpthreads -lexc $LIBS"
14075
14076                 if test "$cross_compiling" = yes; then
14077   cat > conftest.$ac_ext <<EOF
14078 #line 14079 "configure"
14079 #include "confdefs.h"
14080 /* pthread test headers */
14081 #include <pthread.h>
14082 #if HAVE_PTHREADS < 7
14083 #include <errno.h>
14084 #endif
14085 #ifndef NULL
14086 #define NULL (void*)0
14087 #endif
14088
14089 static void *task(p)
14090         void *p;
14091 {
14092         return (void *) (p == NULL);
14093 }
14094
14095 int main() {
14096
14097         /* pthread test function */
14098 #ifndef PTHREAD_CREATE_DETACHED
14099 #define PTHREAD_CREATE_DETACHED 1
14100 #endif
14101         pthread_t t;
14102         int status;
14103         int detach = PTHREAD_CREATE_DETACHED;
14104
14105 #if HAVE_PTHREADS > 4
14106         /* Final pthreads */
14107         pthread_attr_t attr;
14108
14109         status = pthread_attr_init(&attr);
14110         if( status ) return status;
14111
14112 #if HAVE_PTHREADS < 7
14113         status = pthread_attr_setdetachstate(&attr, &detach);
14114         if( status < 0 ) status = errno;
14115 #else
14116         status = pthread_attr_setdetachstate(&attr, detach);
14117 #endif
14118         if( status ) return status;
14119         status = pthread_create( &t, &attr, task, NULL );
14120 #if HAVE_PTHREADS < 7
14121         if( status < 0 ) status = errno;
14122 #endif
14123         if( status ) return status;
14124 #else
14125         /* Draft 4 pthreads */
14126         status = pthread_create( &t, pthread_attr_default, task, NULL );
14127         if( status ) return errno;
14128
14129         /* give thread a chance to complete */
14130         /* it should remain joinable and hence detachable */
14131         sleep( 1 );
14132
14133         status = pthread_detach( &t );
14134         if( status ) return errno;
14135 #endif
14136
14137 #ifdef HAVE_LINUX_THREADS
14138         pthread_kill_other_threads_np();
14139 #endif
14140
14141         return 0;
14142
14143 ; return 0; }
14144 EOF
14145 if { (eval echo configure:14146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14146   rm -rf conftest*
14147   ol_cv_pthread_lpthreads_lexc=yes
14148 else
14149   echo "configure: failed program was:" >&5
14150   cat conftest.$ac_ext >&5
14151   rm -rf conftest*
14152   ol_cv_pthread_lpthreads_lexc=no
14153 fi
14154 rm -f conftest*
14155 else
14156   cat > conftest.$ac_ext <<EOF
14157 #line 14158 "configure"
14158 #include "confdefs.h"
14159 /* pthread test headers */
14160 #include <pthread.h>
14161 #if HAVE_PTHREADS < 7
14162 #include <errno.h>
14163 #endif
14164 #ifndef NULL
14165 #define NULL (void*)0
14166 #endif
14167
14168 static void *task(p)
14169         void *p;
14170 {
14171         return (void *) (p == NULL);
14172 }
14173
14174
14175 int main(argc, argv)
14176         int argc;
14177         char **argv;
14178 {
14179
14180         /* pthread test function */
14181 #ifndef PTHREAD_CREATE_DETACHED
14182 #define PTHREAD_CREATE_DETACHED 1
14183 #endif
14184         pthread_t t;
14185         int status;
14186         int detach = PTHREAD_CREATE_DETACHED;
14187
14188 #if HAVE_PTHREADS > 4
14189         /* Final pthreads */
14190         pthread_attr_t attr;
14191
14192         status = pthread_attr_init(&attr);
14193         if( status ) return status;
14194
14195 #if HAVE_PTHREADS < 7
14196         status = pthread_attr_setdetachstate(&attr, &detach);
14197         if( status < 0 ) status = errno;
14198 #else
14199         status = pthread_attr_setdetachstate(&attr, detach);
14200 #endif
14201         if( status ) return status;
14202         status = pthread_create( &t, &attr, task, NULL );
14203 #if HAVE_PTHREADS < 7
14204         if( status < 0 ) status = errno;
14205 #endif
14206         if( status ) return status;
14207 #else
14208         /* Draft 4 pthreads */
14209         status = pthread_create( &t, pthread_attr_default, task, NULL );
14210         if( status ) return errno;
14211
14212         /* give thread a chance to complete */
14213         /* it should remain joinable and hence detachable */
14214         sleep( 1 );
14215
14216         status = pthread_detach( &t );
14217         if( status ) return errno;
14218 #endif
14219
14220 #ifdef HAVE_LINUX_THREADS
14221         pthread_kill_other_threads_np();
14222 #endif
14223
14224         return 0;
14225
14226 }
14227
14228 EOF
14229 if { (eval echo configure:14230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14230 then
14231   ol_cv_pthread_lpthreads_lexc=yes
14232 else
14233   echo "configure: failed program was:" >&5
14234   cat conftest.$ac_ext >&5
14235   rm -fr conftest*
14236   ol_cv_pthread_lpthreads_lexc=no
14237 fi
14238 rm -fr conftest*
14239 fi
14240
14241
14242                 # restore the LIBS
14243                 LIBS="$ol_LIBS"
14244         
14245 fi
14246
14247 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14248
14249         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14250                 ol_link_pthreads="-lpthreads -lexc"
14251                 ol_link_threads=posix
14252         fi
14253 fi
14254
14255
14256                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14257 if test "$ol_link_threads" = no ; then
14258         # try -lpthreads
14259         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14260 echo "configure:14261: checking for pthread link with -lpthreads" >&5
14261 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14262   echo $ac_n "(cached) $ac_c" 1>&6
14263 else
14264   
14265                 # save the flags
14266                 ol_LIBS="$LIBS"
14267                 LIBS="-lpthreads $LIBS"
14268
14269                 if test "$cross_compiling" = yes; then
14270   cat > conftest.$ac_ext <<EOF
14271 #line 14272 "configure"
14272 #include "confdefs.h"
14273 /* pthread test headers */
14274 #include <pthread.h>
14275 #if HAVE_PTHREADS < 7
14276 #include <errno.h>
14277 #endif
14278 #ifndef NULL
14279 #define NULL (void*)0
14280 #endif
14281
14282 static void *task(p)
14283         void *p;
14284 {
14285         return (void *) (p == NULL);
14286 }
14287
14288 int main() {
14289
14290         /* pthread test function */
14291 #ifndef PTHREAD_CREATE_DETACHED
14292 #define PTHREAD_CREATE_DETACHED 1
14293 #endif
14294         pthread_t t;
14295         int status;
14296         int detach = PTHREAD_CREATE_DETACHED;
14297
14298 #if HAVE_PTHREADS > 4
14299         /* Final pthreads */
14300         pthread_attr_t attr;
14301
14302         status = pthread_attr_init(&attr);
14303         if( status ) return status;
14304
14305 #if HAVE_PTHREADS < 7
14306         status = pthread_attr_setdetachstate(&attr, &detach);
14307         if( status < 0 ) status = errno;
14308 #else
14309         status = pthread_attr_setdetachstate(&attr, detach);
14310 #endif
14311         if( status ) return status;
14312         status = pthread_create( &t, &attr, task, NULL );
14313 #if HAVE_PTHREADS < 7
14314         if( status < 0 ) status = errno;
14315 #endif
14316         if( status ) return status;
14317 #else
14318         /* Draft 4 pthreads */
14319         status = pthread_create( &t, pthread_attr_default, task, NULL );
14320         if( status ) return errno;
14321
14322         /* give thread a chance to complete */
14323         /* it should remain joinable and hence detachable */
14324         sleep( 1 );
14325
14326         status = pthread_detach( &t );
14327         if( status ) return errno;
14328 #endif
14329
14330 #ifdef HAVE_LINUX_THREADS
14331         pthread_kill_other_threads_np();
14332 #endif
14333
14334         return 0;
14335
14336 ; return 0; }
14337 EOF
14338 if { (eval echo configure:14339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14339   rm -rf conftest*
14340   ol_cv_pthread_lib_lpthreads=yes
14341 else
14342   echo "configure: failed program was:" >&5
14343   cat conftest.$ac_ext >&5
14344   rm -rf conftest*
14345   ol_cv_pthread_lib_lpthreads=no
14346 fi
14347 rm -f conftest*
14348 else
14349   cat > conftest.$ac_ext <<EOF
14350 #line 14351 "configure"
14351 #include "confdefs.h"
14352 /* pthread test headers */
14353 #include <pthread.h>
14354 #if HAVE_PTHREADS < 7
14355 #include <errno.h>
14356 #endif
14357 #ifndef NULL
14358 #define NULL (void*)0
14359 #endif
14360
14361 static void *task(p)
14362         void *p;
14363 {
14364         return (void *) (p == NULL);
14365 }
14366
14367
14368 int main(argc, argv)
14369         int argc;
14370         char **argv;
14371 {
14372
14373         /* pthread test function */
14374 #ifndef PTHREAD_CREATE_DETACHED
14375 #define PTHREAD_CREATE_DETACHED 1
14376 #endif
14377         pthread_t t;
14378         int status;
14379         int detach = PTHREAD_CREATE_DETACHED;
14380
14381 #if HAVE_PTHREADS > 4
14382         /* Final pthreads */
14383         pthread_attr_t attr;
14384
14385         status = pthread_attr_init(&attr);
14386         if( status ) return status;
14387
14388 #if HAVE_PTHREADS < 7
14389         status = pthread_attr_setdetachstate(&attr, &detach);
14390         if( status < 0 ) status = errno;
14391 #else
14392         status = pthread_attr_setdetachstate(&attr, detach);
14393 #endif
14394         if( status ) return status;
14395         status = pthread_create( &t, &attr, task, NULL );
14396 #if HAVE_PTHREADS < 7
14397         if( status < 0 ) status = errno;
14398 #endif
14399         if( status ) return status;
14400 #else
14401         /* Draft 4 pthreads */
14402         status = pthread_create( &t, pthread_attr_default, task, NULL );
14403         if( status ) return errno;
14404
14405         /* give thread a chance to complete */
14406         /* it should remain joinable and hence detachable */
14407         sleep( 1 );
14408
14409         status = pthread_detach( &t );
14410         if( status ) return errno;
14411 #endif
14412
14413 #ifdef HAVE_LINUX_THREADS
14414         pthread_kill_other_threads_np();
14415 #endif
14416
14417         return 0;
14418
14419 }
14420
14421 EOF
14422 if { (eval echo configure:14423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14423 then
14424   ol_cv_pthread_lib_lpthreads=yes
14425 else
14426   echo "configure: failed program was:" >&5
14427   cat conftest.$ac_ext >&5
14428   rm -fr conftest*
14429   ol_cv_pthread_lib_lpthreads=no
14430 fi
14431 rm -fr conftest*
14432 fi
14433
14434
14435                 # restore the LIBS
14436                 LIBS="$ol_LIBS"
14437         
14438 fi
14439
14440 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14441
14442         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14443                 ol_link_pthreads="-lpthreads"
14444                 ol_link_threads=posix
14445         fi
14446 fi
14447
14448
14449                 if test $ol_link_threads != no ; then
14450                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14451
14452                                                 save_CPPFLAGS="$CPPFLAGS"
14453                         save_LIBS="$LIBS"
14454                         LIBS="$LTHREAD_LIBS $LIBS"
14455
14456                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14457 do
14458 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14459 echo "configure:14460: checking for $ac_func" >&5
14460 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14461   echo $ac_n "(cached) $ac_c" 1>&6
14462 else
14463   cat > conftest.$ac_ext <<EOF
14464 #line 14465 "configure"
14465 #include "confdefs.h"
14466 /* System header to define __stub macros and hopefully few prototypes,
14467     which can conflict with char $ac_func(); below.  */
14468 #include <assert.h>
14469 /* Override any gcc2 internal prototype to avoid an error.  */
14470 /* We use char because int might match the return type of a gcc2
14471     builtin and then its argument prototype would still apply.  */
14472 char $ac_func();
14473 char (*f)();
14474
14475 int main() {
14476
14477 /* The GNU C library defines this for functions which it implements
14478     to always fail with ENOSYS.  Some functions are actually named
14479     something starting with __ and the normal name is an alias.  */
14480 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14481 choke me
14482 #else
14483 f = $ac_func;
14484 #endif
14485
14486 ; return 0; }
14487 EOF
14488 if { (eval echo configure:14489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14489   rm -rf conftest*
14490   eval "ac_cv_func_$ac_func=yes"
14491 else
14492   echo "configure: failed program was:" >&5
14493   cat conftest.$ac_ext >&5
14494   rm -rf conftest*
14495   eval "ac_cv_func_$ac_func=no"
14496 fi
14497 rm -f conftest*
14498 fi
14499
14500 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14501   echo "$ac_t""yes" 1>&6
14502     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14503   cat >> confdefs.h <<EOF
14504 #define $ac_tr_func 1
14505 EOF
14506  
14507 else
14508   echo "$ac_t""no" 1>&6
14509 fi
14510 done
14511
14512
14513                         if test $ac_cv_func_sched_yield = no -a \
14514                                 $ac_cv_func_pthread_yield = no -a \
14515                                 $ac_cv_func_thr_yield = no ; then
14516                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14517 echo "configure:14518: checking for sched_yield in -lrt" >&5
14518 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14519 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14520   echo $ac_n "(cached) $ac_c" 1>&6
14521 else
14522   ac_save_LIBS="$LIBS"
14523 LIBS="-lrt  $LIBS"
14524 cat > conftest.$ac_ext <<EOF
14525 #line 14526 "configure"
14526 #include "confdefs.h"
14527 /* Override any gcc2 internal prototype to avoid an error.  */
14528 /* We use char because int might match the return type of a gcc2
14529     builtin and then its argument prototype would still apply.  */
14530 char sched_yield();
14531
14532 int main() {
14533 sched_yield()
14534 ; return 0; }
14535 EOF
14536 if { (eval echo configure:14537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14537   rm -rf conftest*
14538   eval "ac_cv_lib_$ac_lib_var=yes"
14539 else
14540   echo "configure: failed program was:" >&5
14541   cat conftest.$ac_ext >&5
14542   rm -rf conftest*
14543   eval "ac_cv_lib_$ac_lib_var=no"
14544 fi
14545 rm -f conftest*
14546 LIBS="$ac_save_LIBS"
14547
14548 fi
14549 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14550   echo "$ac_t""yes" 1>&6
14551   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14552                                         cat >> confdefs.h <<\EOF
14553 #define HAVE_SCHED_YIELD 1
14554 EOF
14555
14556                                         ac_cv_func_sched_yield=yes
14557 else
14558   echo "$ac_t""no" 1>&6
14559 ac_cv_func_sched_yield=no
14560 fi
14561
14562                         fi
14563                         if test $ac_cv_func_sched_yield = no -a \
14564                                 $ac_cv_func_pthread_yield = no -a \
14565                                 "$ac_cv_func_thr_yield" = no ; then
14566                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14567                         fi
14568
14569                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14570 do
14571 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14572 echo "configure:14573: checking for $ac_func" >&5
14573 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14574   echo $ac_n "(cached) $ac_c" 1>&6
14575 else
14576   cat > conftest.$ac_ext <<EOF
14577 #line 14578 "configure"
14578 #include "confdefs.h"
14579 /* System header to define __stub macros and hopefully few prototypes,
14580     which can conflict with char $ac_func(); below.  */
14581 #include <assert.h>
14582 /* Override any gcc2 internal prototype to avoid an error.  */
14583 /* We use char because int might match the return type of a gcc2
14584     builtin and then its argument prototype would still apply.  */
14585 char $ac_func();
14586 char (*f)();
14587
14588 int main() {
14589
14590 /* The GNU C library defines this for functions which it implements
14591     to always fail with ENOSYS.  Some functions are actually named
14592     something starting with __ and the normal name is an alias.  */
14593 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14594 choke me
14595 #else
14596 f = $ac_func;
14597 #endif
14598
14599 ; return 0; }
14600 EOF
14601 if { (eval echo configure:14602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14602   rm -rf conftest*
14603   eval "ac_cv_func_$ac_func=yes"
14604 else
14605   echo "configure: failed program was:" >&5
14606   cat conftest.$ac_ext >&5
14607   rm -rf conftest*
14608   eval "ac_cv_func_$ac_func=no"
14609 fi
14610 rm -f conftest*
14611 fi
14612
14613 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14614   echo "$ac_t""yes" 1>&6
14615     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14616   cat >> confdefs.h <<EOF
14617 #define $ac_tr_func 1
14618 EOF
14619  
14620 else
14621   echo "$ac_t""no" 1>&6
14622 fi
14623 done
14624
14625
14626                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14627 echo "configure:14628: checking for pthread_detach with <pthread.h>" >&5
14628 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14629   echo $ac_n "(cached) $ac_c" 1>&6
14630 else
14631   
14632                                                                 cat > conftest.$ac_ext <<EOF
14633 #line 14634 "configure"
14634 #include "confdefs.h"
14635
14636 #include <pthread.h>
14637 #ifndef NULL
14638 #define NULL (void*)0
14639 #endif
14640
14641 int main() {
14642 pthread_detach(NULL);
14643 ; return 0; }
14644 EOF
14645 if { (eval echo configure:14646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14646   rm -rf conftest*
14647   ol_cv_func_pthread_detach=yes
14648 else
14649   echo "configure: failed program was:" >&5
14650   cat conftest.$ac_ext >&5
14651   rm -rf conftest*
14652   ol_cv_func_pthread_detach=no
14653 fi
14654 rm -f conftest*
14655                         
14656 fi
14657
14658 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14659
14660                         if test $ol_cv_func_pthread_detach = no ; then
14661                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14662                         fi
14663
14664                         cat >> confdefs.h <<\EOF
14665 #define HAVE_PTHREAD_DETACH 1
14666 EOF
14667
14668
14669                                                 for ac_func in \
14670                                 pthread_setconcurrency \
14671                                 pthread_getconcurrency \
14672                                 thr_setconcurrency \
14673                                 thr_getconcurrency \
14674                         
14675 do
14676 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14677 echo "configure:14678: checking for $ac_func" >&5
14678 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14679   echo $ac_n "(cached) $ac_c" 1>&6
14680 else
14681   cat > conftest.$ac_ext <<EOF
14682 #line 14683 "configure"
14683 #include "confdefs.h"
14684 /* System header to define __stub macros and hopefully few prototypes,
14685     which can conflict with char $ac_func(); below.  */
14686 #include <assert.h>
14687 /* Override any gcc2 internal prototype to avoid an error.  */
14688 /* We use char because int might match the return type of a gcc2
14689     builtin and then its argument prototype would still apply.  */
14690 char $ac_func();
14691 char (*f)();
14692
14693 int main() {
14694
14695 /* The GNU C library defines this for functions which it implements
14696     to always fail with ENOSYS.  Some functions are actually named
14697     something starting with __ and the normal name is an alias.  */
14698 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14699 choke me
14700 #else
14701 f = $ac_func;
14702 #endif
14703
14704 ; return 0; }
14705 EOF
14706 if { (eval echo configure:14707: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14707   rm -rf conftest*
14708   eval "ac_cv_func_$ac_func=yes"
14709 else
14710   echo "configure: failed program was:" >&5
14711   cat conftest.$ac_ext >&5
14712   rm -rf conftest*
14713   eval "ac_cv_func_$ac_func=no"
14714 fi
14715 rm -f conftest*
14716 fi
14717
14718 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14719   echo "$ac_t""yes" 1>&6
14720     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14721   cat >> confdefs.h <<EOF
14722 #define $ac_tr_func 1
14723 EOF
14724  
14725 else
14726   echo "$ac_t""no" 1>&6
14727 fi
14728 done
14729
14730
14731                         
14732         for ac_func in pthread_kill_other_threads_np
14733 do
14734 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14735 echo "configure:14736: checking for $ac_func" >&5
14736 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14737   echo $ac_n "(cached) $ac_c" 1>&6
14738 else
14739   cat > conftest.$ac_ext <<EOF
14740 #line 14741 "configure"
14741 #include "confdefs.h"
14742 /* System header to define __stub macros and hopefully few prototypes,
14743     which can conflict with char $ac_func(); below.  */
14744 #include <assert.h>
14745 /* Override any gcc2 internal prototype to avoid an error.  */
14746 /* We use char because int might match the return type of a gcc2
14747     builtin and then its argument prototype would still apply.  */
14748 char $ac_func();
14749 char (*f)();
14750
14751 int main() {
14752
14753 /* The GNU C library defines this for functions which it implements
14754     to always fail with ENOSYS.  Some functions are actually named
14755     something starting with __ and the normal name is an alias.  */
14756 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14757 choke me
14758 #else
14759 f = $ac_func;
14760 #endif
14761
14762 ; return 0; }
14763 EOF
14764 if { (eval echo configure:14765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14765   rm -rf conftest*
14766   eval "ac_cv_func_$ac_func=yes"
14767 else
14768   echo "configure: failed program was:" >&5
14769   cat conftest.$ac_ext >&5
14770   rm -rf conftest*
14771   eval "ac_cv_func_$ac_func=no"
14772 fi
14773 rm -f conftest*
14774 fi
14775
14776 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14777   echo "$ac_t""yes" 1>&6
14778     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14779   cat >> confdefs.h <<EOF
14780 #define $ac_tr_func 1
14781 EOF
14782  
14783 else
14784   echo "$ac_t""no" 1>&6
14785 fi
14786 done
14787
14788         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
14789 echo "configure:14790: checking for LinuxThreads implementation" >&5
14790 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
14791   echo $ac_n "(cached) $ac_c" 1>&6
14792 else
14793   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
14794 fi
14795
14796 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
14797
14798                         
14799         
14800         
14801         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
14802 echo "configure:14803: checking for LinuxThreads consistency" >&5
14803 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
14804   echo $ac_n "(cached) $ac_c" 1>&6
14805 else
14806   
14807                 if test $ol_cv_header_linux_threads = yes -a \
14808                         $ol_cv_sys_linux_threads = yes; then
14809                         ol_cv_linux_threads=yes
14810                 elif test $ol_cv_header_linux_threads = no -a \
14811                         $ol_cv_sys_linux_threads = no; then
14812                         ol_cv_linux_threads=no
14813                 else
14814                         ol_cv_linux_threads=error
14815                 fi
14816         
14817 fi
14818
14819 echo "$ac_t""$ol_cv_linux_threads" 1>&6
14820
14821
14822                         if test $ol_cv_linux_threads = error; then
14823                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
14824                         fi
14825
14826                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
14827 echo "configure:14828: checking if pthread_create() works" >&5
14828 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
14829   echo $ac_n "(cached) $ac_c" 1>&6
14830 else
14831   
14832                         if test "$cross_compiling" = yes; then
14833                                 ol_cv_pthread_create_works=yes
14834 else
14835   cat > conftest.$ac_ext <<EOF
14836 #line 14837 "configure"
14837 #include "confdefs.h"
14838 /* pthread test headers */
14839 #include <pthread.h>
14840 #if HAVE_PTHREADS < 7
14841 #include <errno.h>
14842 #endif
14843 #ifndef NULL
14844 #define NULL (void*)0
14845 #endif
14846
14847 static void *task(p)
14848         void *p;
14849 {
14850         return (void *) (p == NULL);
14851 }
14852
14853
14854 int main(argc, argv)
14855         int argc;
14856         char **argv;
14857 {
14858
14859         /* pthread test function */
14860 #ifndef PTHREAD_CREATE_DETACHED
14861 #define PTHREAD_CREATE_DETACHED 1
14862 #endif
14863         pthread_t t;
14864         int status;
14865         int detach = PTHREAD_CREATE_DETACHED;
14866
14867 #if HAVE_PTHREADS > 4
14868         /* Final pthreads */
14869         pthread_attr_t attr;
14870
14871         status = pthread_attr_init(&attr);
14872         if( status ) return status;
14873
14874 #if HAVE_PTHREADS < 7
14875         status = pthread_attr_setdetachstate(&attr, &detach);
14876         if( status < 0 ) status = errno;
14877 #else
14878         status = pthread_attr_setdetachstate(&attr, detach);
14879 #endif
14880         if( status ) return status;
14881         status = pthread_create( &t, &attr, task, NULL );
14882 #if HAVE_PTHREADS < 7
14883         if( status < 0 ) status = errno;
14884 #endif
14885         if( status ) return status;
14886 #else
14887         /* Draft 4 pthreads */
14888         status = pthread_create( &t, pthread_attr_default, task, NULL );
14889         if( status ) return errno;
14890
14891         /* give thread a chance to complete */
14892         /* it should remain joinable and hence detachable */
14893         sleep( 1 );
14894
14895         status = pthread_detach( &t );
14896         if( status ) return errno;
14897 #endif
14898
14899 #ifdef HAVE_LINUX_THREADS
14900         pthread_kill_other_threads_np();
14901 #endif
14902
14903         return 0;
14904
14905 }
14906
14907 EOF
14908 if { (eval echo configure:14909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14909 then
14910   ol_cv_pthread_create_works=yes
14911 else
14912   echo "configure: failed program was:" >&5
14913   cat conftest.$ac_ext >&5
14914   rm -fr conftest*
14915   ol_cv_pthread_create_works=no
14916 fi
14917 rm -fr conftest*
14918 fi
14919
14920 fi
14921
14922 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
14923
14924                         if test $ol_cv_pthread_create_works = no ; then
14925                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
14926                         fi
14927
14928                                                 if test $ol_with_yielding_select = auto ; then
14929                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
14930 echo "configure:14931: checking if select yields when using pthreads" >&5
14931 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
14932   echo $ac_n "(cached) $ac_c" 1>&6
14933 else
14934   
14935                                 if test "$cross_compiling" = yes; then
14936   ol_cv_pthread_select_yields=cross
14937 else
14938   cat > conftest.$ac_ext <<EOF
14939 #line 14940 "configure"
14940 #include "confdefs.h"
14941
14942 #include <sys/types.h>
14943 #include <sys/time.h>
14944 #include <unistd.h>
14945 #include <pthread.h>
14946 #ifndef NULL
14947 #define NULL (void*) 0
14948 #endif
14949
14950 static int fildes[2];
14951
14952 static void *task(p)
14953         void *p;
14954 {
14955         int i;
14956         struct timeval tv;
14957
14958         fd_set rfds;
14959
14960         tv.tv_sec=10;
14961         tv.tv_usec=0;
14962
14963         FD_ZERO(&rfds);
14964         FD_SET(fildes[0], &rfds);
14965
14966         /* we're not interested in any fds */
14967         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
14968
14969         if(i < 0) {
14970                 perror("select");
14971                 exit(10);
14972         }
14973
14974         exit(0); /* if we exit here, the select blocked the whole process */
14975 }
14976
14977 int main(argc, argv)
14978         int argc;
14979         char **argv;
14980 {
14981         pthread_t t;
14982
14983         /* create a pipe to select */
14984         if(pipe(&fildes[0])) {
14985                 perror("select");
14986                 exit(1);
14987         }
14988
14989 #ifdef HAVE_PTHREAD_SETCONCURRENCY
14990         (void) pthread_setconcurrency(2);
14991 #else
14992 #ifdef HAVE_THR_SETCONCURRENCY
14993         /* Set Solaris LWP concurrency to 2 */
14994         thr_setconcurrency(2);
14995 #endif
14996 #endif
14997
14998 #if HAVE_PTHREADS < 6
14999         pthread_create(&t, pthread_attr_default, task, NULL);
15000 #else
15001         pthread_create(&t, NULL, task, NULL);
15002 #endif
15003
15004         /* make sure task runs first */
15005 #if HAVE_THR_YIELD
15006         thr_yield();
15007 #elif defined( HAVE_SCHED_YIELD )
15008         sched_yield();
15009 #elif defined( HAVE_PTHREAD_YIELD )
15010         pthread_yield();
15011 #endif
15012
15013         exit(2);
15014 }
15015 EOF
15016 if { (eval echo configure:15017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15017 then
15018   ol_cv_pthread_select_yields=no
15019 else
15020   echo "configure: failed program was:" >&5
15021   cat conftest.$ac_ext >&5
15022   rm -fr conftest*
15023   ol_cv_pthread_select_yields=yes
15024 fi
15025 rm -fr conftest*
15026 fi
15027
15028 fi
15029
15030 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15031
15032                                 if test $ol_cv_pthread_select_yields = cross ; then
15033                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15034                                 fi
15035
15036                                 if test $ol_cv_pthread_select_yields = yes ; then
15037                                         ol_with_yielding_select=yes
15038                                 fi
15039                         fi
15040
15041                                                 CPPFLAGS="$save_CPPFLAGS"
15042                         LIBS="$save_LIBS"
15043                 else
15044                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15045                 fi
15046         fi
15047
15048         if test $ol_with_threads = posix ; then
15049                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15050         fi
15051 fi
15052
15053 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15054         -o $ol_with_threads = mach ; then
15055
15056                 for ac_hdr in mach/cthreads.h cthreads.h
15057 do
15058 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15059 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15060 echo "configure:15061: checking for $ac_hdr" >&5
15061 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15062   echo $ac_n "(cached) $ac_c" 1>&6
15063 else
15064   cat > conftest.$ac_ext <<EOF
15065 #line 15066 "configure"
15066 #include "confdefs.h"
15067 #include <$ac_hdr>
15068 EOF
15069 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15070 { (eval echo configure:15071: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15071 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15072 if test -z "$ac_err"; then
15073   rm -rf conftest*
15074   eval "ac_cv_header_$ac_safe=yes"
15075 else
15076   echo "$ac_err" >&5
15077   echo "configure: failed program was:" >&5
15078   cat conftest.$ac_ext >&5
15079   rm -rf conftest*
15080   eval "ac_cv_header_$ac_safe=no"
15081 fi
15082 rm -f conftest*
15083 fi
15084 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15085   echo "$ac_t""yes" 1>&6
15086     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15087   cat >> confdefs.h <<EOF
15088 #define $ac_tr_hdr 1
15089 EOF
15090  
15091 else
15092   echo "$ac_t""no" 1>&6
15093 fi
15094 done
15095
15096         if test $ac_cv_header_mach_cthreads_h = yes ; then
15097                 ol_with_threads=found
15098
15099                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15100 echo "configure:15101: checking for cthread_fork" >&5
15101 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15102   echo $ac_n "(cached) $ac_c" 1>&6
15103 else
15104   cat > conftest.$ac_ext <<EOF
15105 #line 15106 "configure"
15106 #include "confdefs.h"
15107 /* System header to define __stub macros and hopefully few prototypes,
15108     which can conflict with char cthread_fork(); below.  */
15109 #include <assert.h>
15110 /* Override any gcc2 internal prototype to avoid an error.  */
15111 /* We use char because int might match the return type of a gcc2
15112     builtin and then its argument prototype would still apply.  */
15113 char cthread_fork();
15114 char (*f)();
15115
15116 int main() {
15117
15118 /* The GNU C library defines this for functions which it implements
15119     to always fail with ENOSYS.  Some functions are actually named
15120     something starting with __ and the normal name is an alias.  */
15121 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15122 choke me
15123 #else
15124 f = cthread_fork;
15125 #endif
15126
15127 ; return 0; }
15128 EOF
15129 if { (eval echo configure:15130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15130   rm -rf conftest*
15131   eval "ac_cv_func_cthread_fork=yes"
15132 else
15133   echo "configure: failed program was:" >&5
15134   cat conftest.$ac_ext >&5
15135   rm -rf conftest*
15136   eval "ac_cv_func_cthread_fork=no"
15137 fi
15138 rm -f conftest*
15139 fi
15140
15141 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15142   echo "$ac_t""yes" 1>&6
15143   ol_link_threads=yes
15144 else
15145   echo "$ac_t""no" 1>&6
15146 fi
15147
15148
15149                 if test $ol_link_threads = no ; then
15150                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15151 echo "configure:15152: checking for cthread_fork with -all_load" >&5
15152 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15153   echo $ac_n "(cached) $ac_c" 1>&6
15154 else
15155   
15156                                                                 save_LIBS="$LIBS"
15157                                 LIBS="-all_load $LIBS"
15158                                 cat > conftest.$ac_ext <<EOF
15159 #line 15160 "configure"
15160 #include "confdefs.h"
15161 #include <mach/cthreads.h>
15162 int main() {
15163
15164                                         cthread_fork((void *)0, (void *)0);
15165                                         
15166 ; return 0; }
15167 EOF
15168 if { (eval echo configure:15169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15169   rm -rf conftest*
15170   ol_cv_cthread_all_load=yes
15171 else
15172   echo "configure: failed program was:" >&5
15173   cat conftest.$ac_ext >&5
15174   rm -rf conftest*
15175   ol_cv_cthread_all_load=no
15176 fi
15177 rm -f conftest*
15178                                                                 LIBS="$save_LIBS"
15179                         
15180 fi
15181
15182 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15183
15184                         if test $ol_cv_cthread_all_load = yes ; then
15185                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15186                                 ol_link_threads=mach
15187                                 ol_with_threads=found
15188                         fi
15189                 fi
15190
15191         elif test $ac_cv_header_cthreads_h = yes ; then
15192                                 
15193                 ol_with_threads=found
15194  
15195                                 save_LIBS="$LIBS"
15196                 LIBS="$LIBS -lthreads"
15197                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15198 echo "configure:15199: checking for cthread_fork" >&5
15199 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15200   echo $ac_n "(cached) $ac_c" 1>&6
15201 else
15202   cat > conftest.$ac_ext <<EOF
15203 #line 15204 "configure"
15204 #include "confdefs.h"
15205 /* System header to define __stub macros and hopefully few prototypes,
15206     which can conflict with char cthread_fork(); below.  */
15207 #include <assert.h>
15208 /* Override any gcc2 internal prototype to avoid an error.  */
15209 /* We use char because int might match the return type of a gcc2
15210     builtin and then its argument prototype would still apply.  */
15211 char cthread_fork();
15212 char (*f)();
15213
15214 int main() {
15215
15216 /* The GNU C library defines this for functions which it implements
15217     to always fail with ENOSYS.  Some functions are actually named
15218     something starting with __ and the normal name is an alias.  */
15219 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15220 choke me
15221 #else
15222 f = cthread_fork;
15223 #endif
15224
15225 ; return 0; }
15226 EOF
15227 if { (eval echo configure:15228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15228   rm -rf conftest*
15229   eval "ac_cv_func_cthread_fork=yes"
15230 else
15231   echo "configure: failed program was:" >&5
15232   cat conftest.$ac_ext >&5
15233   rm -rf conftest*
15234   eval "ac_cv_func_cthread_fork=no"
15235 fi
15236 rm -f conftest*
15237 fi
15238
15239 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15240   echo "$ac_t""yes" 1>&6
15241   ol_link_threads=yes
15242 else
15243   echo "$ac_t""no" 1>&6
15244 fi
15245
15246                 LIBS="$save_LIBS"
15247
15248                 if test $ol_link_threads = yes ; then
15249                         LTHREAD_LIBS="-lthreads"
15250                         ol_link_threads=mach
15251                         ol_with_threads=found
15252                 else
15253                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15254                 fi
15255
15256         elif test $ol_with_threads = mach ; then
15257                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15258         fi
15259
15260         if test $ol_link_threads = mach ; then
15261                 cat >> confdefs.h <<\EOF
15262 #define HAVE_MACH_CTHREADS 1
15263 EOF
15264
15265         elif test $ol_with_threads = found ; then
15266                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15267         fi
15268 fi
15269
15270 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15271         -o $ol_with_threads = pth ; then
15272
15273         for ac_hdr in pth.h
15274 do
15275 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15276 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15277 echo "configure:15278: checking for $ac_hdr" >&5
15278 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15279   echo $ac_n "(cached) $ac_c" 1>&6
15280 else
15281   cat > conftest.$ac_ext <<EOF
15282 #line 15283 "configure"
15283 #include "confdefs.h"
15284 #include <$ac_hdr>
15285 EOF
15286 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15287 { (eval echo configure:15288: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15288 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15289 if test -z "$ac_err"; then
15290   rm -rf conftest*
15291   eval "ac_cv_header_$ac_safe=yes"
15292 else
15293   echo "$ac_err" >&5
15294   echo "configure: failed program was:" >&5
15295   cat conftest.$ac_ext >&5
15296   rm -rf conftest*
15297   eval "ac_cv_header_$ac_safe=no"
15298 fi
15299 rm -f conftest*
15300 fi
15301 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15302   echo "$ac_t""yes" 1>&6
15303     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15304   cat >> confdefs.h <<EOF
15305 #define $ac_tr_hdr 1
15306 EOF
15307  
15308 else
15309   echo "$ac_t""no" 1>&6
15310 fi
15311 done
15312
15313
15314         if test $ac_cv_header_pth_h = yes ; then
15315                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15316 echo "configure:15317: checking for pth_version in -lpth" >&5
15317 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15318 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15319   echo $ac_n "(cached) $ac_c" 1>&6
15320 else
15321   ac_save_LIBS="$LIBS"
15322 LIBS="-lpth  $LIBS"
15323 cat > conftest.$ac_ext <<EOF
15324 #line 15325 "configure"
15325 #include "confdefs.h"
15326 /* Override any gcc2 internal prototype to avoid an error.  */
15327 /* We use char because int might match the return type of a gcc2
15328     builtin and then its argument prototype would still apply.  */
15329 char pth_version();
15330
15331 int main() {
15332 pth_version()
15333 ; return 0; }
15334 EOF
15335 if { (eval echo configure:15336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15336   rm -rf conftest*
15337   eval "ac_cv_lib_$ac_lib_var=yes"
15338 else
15339   echo "configure: failed program was:" >&5
15340   cat conftest.$ac_ext >&5
15341   rm -rf conftest*
15342   eval "ac_cv_lib_$ac_lib_var=no"
15343 fi
15344 rm -f conftest*
15345 LIBS="$ac_save_LIBS"
15346
15347 fi
15348 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15349   echo "$ac_t""yes" 1>&6
15350   have_pth=yes
15351 else
15352   echo "$ac_t""no" 1>&6
15353 have_pth=no
15354 fi
15355
15356
15357                 if test $have_pth = yes ; then
15358                         cat >> confdefs.h <<\EOF
15359 #define HAVE_GNU_PTH 1
15360 EOF
15361
15362                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15363                         ol_link_threads=pth
15364                         ol_with_threads=found
15365
15366                         if test $ol_with_yielding_select = auto ; then
15367                                 ol_with_yielding_select=yes
15368                         fi
15369                 fi
15370         fi
15371 fi
15372
15373 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15374         -o $ol_with_threads = lwp ; then
15375
15376                 for ac_hdr in thread.h synch.h
15377 do
15378 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15379 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15380 echo "configure:15381: checking for $ac_hdr" >&5
15381 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15382   echo $ac_n "(cached) $ac_c" 1>&6
15383 else
15384   cat > conftest.$ac_ext <<EOF
15385 #line 15386 "configure"
15386 #include "confdefs.h"
15387 #include <$ac_hdr>
15388 EOF
15389 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15390 { (eval echo configure:15391: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15391 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15392 if test -z "$ac_err"; then
15393   rm -rf conftest*
15394   eval "ac_cv_header_$ac_safe=yes"
15395 else
15396   echo "$ac_err" >&5
15397   echo "configure: failed program was:" >&5
15398   cat conftest.$ac_ext >&5
15399   rm -rf conftest*
15400   eval "ac_cv_header_$ac_safe=no"
15401 fi
15402 rm -f conftest*
15403 fi
15404 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15405   echo "$ac_t""yes" 1>&6
15406     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15407   cat >> confdefs.h <<EOF
15408 #define $ac_tr_hdr 1
15409 EOF
15410  
15411 else
15412   echo "$ac_t""no" 1>&6
15413 fi
15414 done
15415
15416         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15417                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15418 echo "configure:15419: checking for thr_create in -lthread" >&5
15419 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15420 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15421   echo $ac_n "(cached) $ac_c" 1>&6
15422 else
15423   ac_save_LIBS="$LIBS"
15424 LIBS="-lthread  $LIBS"
15425 cat > conftest.$ac_ext <<EOF
15426 #line 15427 "configure"
15427 #include "confdefs.h"
15428 /* Override any gcc2 internal prototype to avoid an error.  */
15429 /* We use char because int might match the return type of a gcc2
15430     builtin and then its argument prototype would still apply.  */
15431 char thr_create();
15432
15433 int main() {
15434 thr_create()
15435 ; return 0; }
15436 EOF
15437 if { (eval echo configure:15438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15438   rm -rf conftest*
15439   eval "ac_cv_lib_$ac_lib_var=yes"
15440 else
15441   echo "configure: failed program was:" >&5
15442   cat conftest.$ac_ext >&5
15443   rm -rf conftest*
15444   eval "ac_cv_lib_$ac_lib_var=no"
15445 fi
15446 rm -f conftest*
15447 LIBS="$ac_save_LIBS"
15448
15449 fi
15450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15451   echo "$ac_t""yes" 1>&6
15452   have_thr=yes
15453 else
15454   echo "$ac_t""no" 1>&6
15455 have_thr=no
15456 fi
15457
15458
15459                 if test $have_thr = yes ; then
15460                         cat >> confdefs.h <<\EOF
15461 #define HAVE_THR 1
15462 EOF
15463
15464                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15465                         ol_link_threads=thr
15466
15467                         if test $ol_with_yielding_select = auto ; then
15468                                 ol_with_yielding_select=yes
15469                         fi
15470
15471                                                 for ac_func in \
15472                                 thr_setconcurrency \
15473                                 thr_getconcurrency \
15474                         
15475 do
15476 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15477 echo "configure:15478: checking for $ac_func" >&5
15478 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15479   echo $ac_n "(cached) $ac_c" 1>&6
15480 else
15481   cat > conftest.$ac_ext <<EOF
15482 #line 15483 "configure"
15483 #include "confdefs.h"
15484 /* System header to define __stub macros and hopefully few prototypes,
15485     which can conflict with char $ac_func(); below.  */
15486 #include <assert.h>
15487 /* Override any gcc2 internal prototype to avoid an error.  */
15488 /* We use char because int might match the return type of a gcc2
15489     builtin and then its argument prototype would still apply.  */
15490 char $ac_func();
15491 char (*f)();
15492
15493 int main() {
15494
15495 /* The GNU C library defines this for functions which it implements
15496     to always fail with ENOSYS.  Some functions are actually named
15497     something starting with __ and the normal name is an alias.  */
15498 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15499 choke me
15500 #else
15501 f = $ac_func;
15502 #endif
15503
15504 ; return 0; }
15505 EOF
15506 if { (eval echo configure:15507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15507   rm -rf conftest*
15508   eval "ac_cv_func_$ac_func=yes"
15509 else
15510   echo "configure: failed program was:" >&5
15511   cat conftest.$ac_ext >&5
15512   rm -rf conftest*
15513   eval "ac_cv_func_$ac_func=no"
15514 fi
15515 rm -f conftest*
15516 fi
15517
15518 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15519   echo "$ac_t""yes" 1>&6
15520     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15521   cat >> confdefs.h <<EOF
15522 #define $ac_tr_func 1
15523 EOF
15524  
15525 else
15526   echo "$ac_t""no" 1>&6
15527 fi
15528 done
15529
15530                 fi
15531         fi
15532
15533                 for ac_hdr in lwp/lwp.h
15534 do
15535 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15536 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15537 echo "configure:15538: checking for $ac_hdr" >&5
15538 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15539   echo $ac_n "(cached) $ac_c" 1>&6
15540 else
15541   cat > conftest.$ac_ext <<EOF
15542 #line 15543 "configure"
15543 #include "confdefs.h"
15544 #include <$ac_hdr>
15545 EOF
15546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15547 { (eval echo configure:15548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15549 if test -z "$ac_err"; then
15550   rm -rf conftest*
15551   eval "ac_cv_header_$ac_safe=yes"
15552 else
15553   echo "$ac_err" >&5
15554   echo "configure: failed program was:" >&5
15555   cat conftest.$ac_ext >&5
15556   rm -rf conftest*
15557   eval "ac_cv_header_$ac_safe=no"
15558 fi
15559 rm -f conftest*
15560 fi
15561 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15562   echo "$ac_t""yes" 1>&6
15563     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15564   cat >> confdefs.h <<EOF
15565 #define $ac_tr_hdr 1
15566 EOF
15567  
15568 else
15569   echo "$ac_t""no" 1>&6
15570 fi
15571 done
15572
15573         if test $ac_cv_header_lwp_lwp_h = yes ; then
15574                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15575 echo "configure:15576: checking for lwp_create in -llwp" >&5
15576 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15577 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15578   echo $ac_n "(cached) $ac_c" 1>&6
15579 else
15580   ac_save_LIBS="$LIBS"
15581 LIBS="-llwp  $LIBS"
15582 cat > conftest.$ac_ext <<EOF
15583 #line 15584 "configure"
15584 #include "confdefs.h"
15585 /* Override any gcc2 internal prototype to avoid an error.  */
15586 /* We use char because int might match the return type of a gcc2
15587     builtin and then its argument prototype would still apply.  */
15588 char lwp_create();
15589
15590 int main() {
15591 lwp_create()
15592 ; return 0; }
15593 EOF
15594 if { (eval echo configure:15595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15595   rm -rf conftest*
15596   eval "ac_cv_lib_$ac_lib_var=yes"
15597 else
15598   echo "configure: failed program was:" >&5
15599   cat conftest.$ac_ext >&5
15600   rm -rf conftest*
15601   eval "ac_cv_lib_$ac_lib_var=no"
15602 fi
15603 rm -f conftest*
15604 LIBS="$ac_save_LIBS"
15605
15606 fi
15607 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15608   echo "$ac_t""yes" 1>&6
15609   have_lwp=yes
15610 else
15611   echo "$ac_t""no" 1>&6
15612 have_lwp=no
15613 fi
15614
15615
15616                 if test $have_lwp = yes ; then
15617                         cat >> confdefs.h <<\EOF
15618 #define HAVE_LWP 1
15619 EOF
15620
15621                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15622                         ol_link_threads=lwp
15623
15624                         if test $ol_with_yielding_select = auto ; then
15625                                 ol_with_yielding_select=no
15626                         fi
15627                 fi
15628         fi
15629 fi
15630
15631 if test $ol_with_yielding_select = yes ; then
15632         cat >> confdefs.h <<\EOF
15633 #define HAVE_YIELDING_SELECT 1
15634 EOF
15635
15636 fi
15637
15638 if test $ol_with_threads = manual ; then
15639                 ol_link_threads=yes
15640
15641         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15642
15643         for ac_hdr in pthread.h sched.h
15644 do
15645 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15646 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15647 echo "configure:15648: checking for $ac_hdr" >&5
15648 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15649   echo $ac_n "(cached) $ac_c" 1>&6
15650 else
15651   cat > conftest.$ac_ext <<EOF
15652 #line 15653 "configure"
15653 #include "confdefs.h"
15654 #include <$ac_hdr>
15655 EOF
15656 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15657 { (eval echo configure:15658: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15658 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15659 if test -z "$ac_err"; then
15660   rm -rf conftest*
15661   eval "ac_cv_header_$ac_safe=yes"
15662 else
15663   echo "$ac_err" >&5
15664   echo "configure: failed program was:" >&5
15665   cat conftest.$ac_ext >&5
15666   rm -rf conftest*
15667   eval "ac_cv_header_$ac_safe=no"
15668 fi
15669 rm -f conftest*
15670 fi
15671 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15672   echo "$ac_t""yes" 1>&6
15673     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15674   cat >> confdefs.h <<EOF
15675 #define $ac_tr_hdr 1
15676 EOF
15677  
15678 else
15679   echo "$ac_t""no" 1>&6
15680 fi
15681 done
15682
15683         for ac_func in sched_yield pthread_yield
15684 do
15685 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15686 echo "configure:15687: checking for $ac_func" >&5
15687 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15688   echo $ac_n "(cached) $ac_c" 1>&6
15689 else
15690   cat > conftest.$ac_ext <<EOF
15691 #line 15692 "configure"
15692 #include "confdefs.h"
15693 /* System header to define __stub macros and hopefully few prototypes,
15694     which can conflict with char $ac_func(); below.  */
15695 #include <assert.h>
15696 /* Override any gcc2 internal prototype to avoid an error.  */
15697 /* We use char because int might match the return type of a gcc2
15698     builtin and then its argument prototype would still apply.  */
15699 char $ac_func();
15700 char (*f)();
15701
15702 int main() {
15703
15704 /* The GNU C library defines this for functions which it implements
15705     to always fail with ENOSYS.  Some functions are actually named
15706     something starting with __ and the normal name is an alias.  */
15707 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15708 choke me
15709 #else
15710 f = $ac_func;
15711 #endif
15712
15713 ; return 0; }
15714 EOF
15715 if { (eval echo configure:15716: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15716   rm -rf conftest*
15717   eval "ac_cv_func_$ac_func=yes"
15718 else
15719   echo "configure: failed program was:" >&5
15720   cat conftest.$ac_ext >&5
15721   rm -rf conftest*
15722   eval "ac_cv_func_$ac_func=no"
15723 fi
15724 rm -f conftest*
15725 fi
15726
15727 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15728   echo "$ac_t""yes" 1>&6
15729     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15730   cat >> confdefs.h <<EOF
15731 #define $ac_tr_func 1
15732 EOF
15733  
15734 else
15735   echo "$ac_t""no" 1>&6
15736 fi
15737 done
15738
15739         
15740         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15741 echo "configure:15742: checking for LinuxThreads pthread.h" >&5
15742 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15743   echo $ac_n "(cached) $ac_c" 1>&6
15744 else
15745   cat > conftest.$ac_ext <<EOF
15746 #line 15747 "configure"
15747 #include "confdefs.h"
15748 #include <pthread.h>
15749 EOF
15750 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15751   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15752   rm -rf conftest*
15753   ol_cv_header_linux_threads=yes
15754 else
15755   rm -rf conftest*
15756   ol_cv_header_linux_threads=no
15757 fi
15758 rm -f conftest*
15759
15760                 
15761 fi
15762
15763 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15764         if test $ol_cv_header_linux_threads = yes; then
15765                 cat >> confdefs.h <<\EOF
15766 #define HAVE_LINUX_THREADS 1
15767 EOF
15768
15769         fi
15770
15771
15772         for ac_hdr in mach/cthreads.h
15773 do
15774 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15775 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15776 echo "configure:15777: checking for $ac_hdr" >&5
15777 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15778   echo $ac_n "(cached) $ac_c" 1>&6
15779 else
15780   cat > conftest.$ac_ext <<EOF
15781 #line 15782 "configure"
15782 #include "confdefs.h"
15783 #include <$ac_hdr>
15784 EOF
15785 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15786 { (eval echo configure:15787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15787 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15788 if test -z "$ac_err"; then
15789   rm -rf conftest*
15790   eval "ac_cv_header_$ac_safe=yes"
15791 else
15792   echo "$ac_err" >&5
15793   echo "configure: failed program was:" >&5
15794   cat conftest.$ac_ext >&5
15795   rm -rf conftest*
15796   eval "ac_cv_header_$ac_safe=no"
15797 fi
15798 rm -f conftest*
15799 fi
15800 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15801   echo "$ac_t""yes" 1>&6
15802     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15803   cat >> confdefs.h <<EOF
15804 #define $ac_tr_hdr 1
15805 EOF
15806  
15807 else
15808   echo "$ac_t""no" 1>&6
15809 fi
15810 done
15811
15812         for ac_hdr in lwp/lwp.h
15813 do
15814 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15815 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15816 echo "configure:15817: checking for $ac_hdr" >&5
15817 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15818   echo $ac_n "(cached) $ac_c" 1>&6
15819 else
15820   cat > conftest.$ac_ext <<EOF
15821 #line 15822 "configure"
15822 #include "confdefs.h"
15823 #include <$ac_hdr>
15824 EOF
15825 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15826 { (eval echo configure:15827: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15827 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15828 if test -z "$ac_err"; then
15829   rm -rf conftest*
15830   eval "ac_cv_header_$ac_safe=yes"
15831 else
15832   echo "$ac_err" >&5
15833   echo "configure: failed program was:" >&5
15834   cat conftest.$ac_ext >&5
15835   rm -rf conftest*
15836   eval "ac_cv_header_$ac_safe=no"
15837 fi
15838 rm -f conftest*
15839 fi
15840 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15841   echo "$ac_t""yes" 1>&6
15842     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15843   cat >> confdefs.h <<EOF
15844 #define $ac_tr_hdr 1
15845 EOF
15846  
15847 else
15848   echo "$ac_t""no" 1>&6
15849 fi
15850 done
15851
15852         for ac_hdr in thread.h synch.h
15853 do
15854 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15855 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15856 echo "configure:15857: checking for $ac_hdr" >&5
15857 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15858   echo $ac_n "(cached) $ac_c" 1>&6
15859 else
15860   cat > conftest.$ac_ext <<EOF
15861 #line 15862 "configure"
15862 #include "confdefs.h"
15863 #include <$ac_hdr>
15864 EOF
15865 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15866 { (eval echo configure:15867: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15867 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15868 if test -z "$ac_err"; then
15869   rm -rf conftest*
15870   eval "ac_cv_header_$ac_safe=yes"
15871 else
15872   echo "$ac_err" >&5
15873   echo "configure: failed program was:" >&5
15874   cat conftest.$ac_ext >&5
15875   rm -rf conftest*
15876   eval "ac_cv_header_$ac_safe=no"
15877 fi
15878 rm -f conftest*
15879 fi
15880 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15881   echo "$ac_t""yes" 1>&6
15882     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15883   cat >> confdefs.h <<EOF
15884 #define $ac_tr_hdr 1
15885 EOF
15886  
15887 else
15888   echo "$ac_t""no" 1>&6
15889 fi
15890 done
15891
15892 fi
15893
15894 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
15895                         cat >> confdefs.h <<\EOF
15896 #define REENTRANT 1
15897 EOF
15898
15899         cat >> confdefs.h <<\EOF
15900 #define _REENTRANT 1
15901 EOF
15902
15903         cat >> confdefs.h <<\EOF
15904 #define THREAD_SAFE 1
15905 EOF
15906
15907         cat >> confdefs.h <<\EOF
15908 #define _THREAD_SAFE 1
15909 EOF
15910
15911         cat >> confdefs.h <<\EOF
15912 #define THREADSAFE 1
15913 EOF
15914
15915         cat >> confdefs.h <<\EOF
15916 #define _THREADSAFE 1
15917 EOF
15918
15919         cat >> confdefs.h <<\EOF
15920 #define _SGI_MP_SOURCE 1
15921 EOF
15922
15923
15924                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
15925 echo "configure:15926: checking for thread specific errno" >&5
15926 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
15927   echo $ac_n "(cached) $ac_c" 1>&6
15928 else
15929   
15930                 cat > conftest.$ac_ext <<EOF
15931 #line 15932 "configure"
15932 #include "confdefs.h"
15933 #include <errno.h>
15934 int main() {
15935 errno = 0;
15936 ; return 0; }
15937 EOF
15938 if { (eval echo configure:15939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15939   rm -rf conftest*
15940   ol_cv_errno_thread_specific=yes
15941 else
15942   echo "configure: failed program was:" >&5
15943   cat conftest.$ac_ext >&5
15944   rm -rf conftest*
15945   ol_cv_errno_thread_specific=no
15946 fi
15947 rm -f conftest*
15948         
15949 fi
15950
15951 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
15952
15953                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
15954 echo "configure:15955: checking for thread specific h_errno" >&5
15955 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
15956   echo $ac_n "(cached) $ac_c" 1>&6
15957 else
15958   
15959                 cat > conftest.$ac_ext <<EOF
15960 #line 15961 "configure"
15961 #include "confdefs.h"
15962 #include <netdb.h>
15963 int main() {
15964 h_errno = 0;
15965 ; return 0; }
15966 EOF
15967 if { (eval echo configure:15968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15968   rm -rf conftest*
15969   ol_cv_h_errno_thread_specific=yes
15970 else
15971   echo "configure: failed program was:" >&5
15972   cat conftest.$ac_ext >&5
15973   rm -rf conftest*
15974   ol_cv_h_errno_thread_specific=no
15975 fi
15976 rm -f conftest*
15977         
15978 fi
15979
15980 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
15981
15982         if test $ol_cv_errno_thread_specific != yes \
15983                 -o $ol_cv_h_errno_thread_specific != yes ; then
15984                 LIBS="$LTHREAD_LIBS $LIBS"
15985                 LTHREAD_LIBS=""
15986         fi
15987
15988 fi  
15989
15990 if test $ol_link_threads = no ; then
15991         if test $ol_with_threads = yes ; then
15992                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
15993         fi
15994
15995         if test $ol_with_threads = auto ; then
15996                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
15997                 ol_with_threads=no
15998         fi
15999
16000         cat >> confdefs.h <<\EOF
16001 #define NO_THREADS 1
16002 EOF
16003
16004         LTHREAD_LIBS=""
16005 fi
16006
16007 if test $ol_link_threads != no ; then
16008         cat >> confdefs.h <<\EOF
16009 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16010 EOF
16011
16012 fi
16013
16014 for ac_func in \
16015         ctime_r                 \
16016         gethostbyname_r gethostbyaddr_r \
16017
16018 do
16019 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16020 echo "configure:16021: checking for $ac_func" >&5
16021 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16022   echo $ac_n "(cached) $ac_c" 1>&6
16023 else
16024   cat > conftest.$ac_ext <<EOF
16025 #line 16026 "configure"
16026 #include "confdefs.h"
16027 /* System header to define __stub macros and hopefully few prototypes,
16028     which can conflict with char $ac_func(); below.  */
16029 #include <assert.h>
16030 /* Override any gcc2 internal prototype to avoid an error.  */
16031 /* We use char because int might match the return type of a gcc2
16032     builtin and then its argument prototype would still apply.  */
16033 char $ac_func();
16034 char (*f)();
16035
16036 int main() {
16037
16038 /* The GNU C library defines this for functions which it implements
16039     to always fail with ENOSYS.  Some functions are actually named
16040     something starting with __ and the normal name is an alias.  */
16041 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16042 choke me
16043 #else
16044 f = $ac_func;
16045 #endif
16046
16047 ; return 0; }
16048 EOF
16049 if { (eval echo configure:16050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16050   rm -rf conftest*
16051   eval "ac_cv_func_$ac_func=yes"
16052 else
16053   echo "configure: failed program was:" >&5
16054   cat conftest.$ac_ext >&5
16055   rm -rf conftest*
16056   eval "ac_cv_func_$ac_func=no"
16057 fi
16058 rm -f conftest*
16059 fi
16060
16061 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16062   echo "$ac_t""yes" 1>&6
16063     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16064   cat >> confdefs.h <<EOF
16065 #define $ac_tr_func 1
16066 EOF
16067  
16068 else
16069   echo "$ac_t""no" 1>&6
16070 fi
16071 done
16072
16073
16074 if test "$ac_cv_func_ctime_r" = no ; then
16075         ol_cv_func_ctime_r_nargs=0
16076 else
16077         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16078 echo "configure:16079: checking number of arguments of ctime_r" >&5
16079 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16080   echo $ac_n "(cached) $ac_c" 1>&6
16081 else
16082   cat > conftest.$ac_ext <<EOF
16083 #line 16084 "configure"
16084 #include "confdefs.h"
16085 #include <time.h>
16086 int main() {
16087 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16088 ; return 0; }
16089 EOF
16090 if { (eval echo configure:16091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16091   rm -rf conftest*
16092   ol_cv_func_ctime_r_nargs3=yes
16093 else
16094   echo "configure: failed program was:" >&5
16095   cat conftest.$ac_ext >&5
16096   rm -rf conftest*
16097   ol_cv_func_ctime_r_nargs3=no
16098 fi
16099 rm -f conftest*
16100
16101         cat > conftest.$ac_ext <<EOF
16102 #line 16103 "configure"
16103 #include "confdefs.h"
16104 #include <time.h>
16105 int main() {
16106 time_t ti; char *buffer; ctime_r(&ti,buffer);
16107 ; return 0; }
16108 EOF
16109 if { (eval echo configure:16110: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16110   rm -rf conftest*
16111   ol_cv_func_ctime_r_nargs2=yes
16112 else
16113   echo "configure: failed program was:" >&5
16114   cat conftest.$ac_ext >&5
16115   rm -rf conftest*
16116   ol_cv_func_ctime_r_nargs2=no
16117 fi
16118 rm -f conftest*
16119
16120         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16121                 $ol_cv_func_ctime_r_nargs2 = no ; then
16122
16123                 ol_cv_func_ctime_r_nargs=3
16124
16125         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16126                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16127
16128                 ol_cv_func_ctime_r_nargs=2
16129
16130         else
16131                 ol_cv_func_ctime_r_nargs=0
16132         fi
16133   
16134 fi
16135
16136 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16137
16138   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16139         cat >> confdefs.h <<EOF
16140 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16141 EOF
16142
16143   fi
16144
16145 fi
16146
16147 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16148         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16149 echo "configure:16150: checking number of arguments of gethostbyname_r" >&5
16150 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16151   echo $ac_n "(cached) $ac_c" 1>&6
16152 else
16153   cat > conftest.$ac_ext <<EOF
16154 #line 16155 "configure"
16155 #include "confdefs.h"
16156 #include <sys/types.h>
16157 #include <sys/socket.h>
16158 #include <netinet/in.h>
16159 #include <netdb.h>
16160 #define BUFSIZE (sizeof(struct hostent)+10)
16161 int main() {
16162 struct hostent hent; char buffer[BUFSIZE];
16163                 int bufsize=BUFSIZE;int h_errno;
16164                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16165                         buffer, bufsize, &h_errno);
16166 ; return 0; }
16167 EOF
16168 if { (eval echo configure:16169: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16169   rm -rf conftest*
16170   ol_cv_func_gethostbyname_r_nargs5=yes
16171 else
16172   echo "configure: failed program was:" >&5
16173   cat conftest.$ac_ext >&5
16174   rm -rf conftest*
16175   ol_cv_func_gethostbyname_r_nargs5=no
16176 fi
16177 rm -f conftest*
16178
16179         cat > conftest.$ac_ext <<EOF
16180 #line 16181 "configure"
16181 #include "confdefs.h"
16182 #include <sys/types.h>
16183 #include <sys/socket.h>
16184 #include <netinet/in.h>
16185 #include <netdb.h>
16186 #define BUFSIZE (sizeof(struct hostent)+10)
16187 int main() {
16188 struct hostent hent;struct hostent *rhent;
16189                 char buffer[BUFSIZE];
16190                 int bufsize=BUFSIZE;int h_errno;
16191                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16192                         &rhent, &h_errno);
16193 ; return 0; }
16194 EOF
16195 if { (eval echo configure:16196: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16196   rm -rf conftest*
16197   ol_cv_func_gethostbyname_r_nargs6=yes
16198 else
16199   echo "configure: failed program was:" >&5
16200   cat conftest.$ac_ext >&5
16201   rm -rf conftest*
16202   ol_cv_func_gethostbyname_r_nargs6=no
16203 fi
16204 rm -f conftest*
16205
16206         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16207                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16208
16209                 ol_cv_func_gethostbyname_r_nargs=5
16210
16211         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16212                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16213
16214                 ol_cv_func_gethostbyname_r_nargs=6
16215
16216         else
16217                 ol_cv_func_gethostbyname_r_nargs=0
16218         fi
16219   
16220 fi
16221
16222 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16223   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16224         cat >> confdefs.h <<EOF
16225 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16226 EOF
16227
16228   fi
16229
16230 else
16231         ol_cv_func_gethostbyname_r_nargs=0
16232 fi
16233  
16234 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16235         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16236 echo "configure:16237: checking number of arguments of gethostbyaddr_r" >&5
16237 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16238   echo $ac_n "(cached) $ac_c" 1>&6
16239 else
16240   cat > conftest.$ac_ext <<EOF
16241 #line 16242 "configure"
16242 #include "confdefs.h"
16243 #include <sys/types.h>
16244 #include <sys/socket.h>
16245 #include <netinet/in.h>
16246 #include <netdb.h>
16247 #define BUFSIZE (sizeof(struct hostent)+10)
16248 int main() {
16249 struct hostent hent; char buffer[BUFSIZE]; 
16250             struct in_addr add;
16251             size_t alen=sizeof(struct in_addr);
16252             int bufsize=BUFSIZE;int h_errno;
16253                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16254                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16255 ; return 0; }
16256 EOF
16257 if { (eval echo configure:16258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16258   rm -rf conftest*
16259   ol_cv_func_gethostbyaddr_r_nargs7=yes
16260 else
16261   echo "configure: failed program was:" >&5
16262   cat conftest.$ac_ext >&5
16263   rm -rf conftest*
16264   ol_cv_func_gethostbyaddr_r_nargs7=no
16265 fi
16266 rm -f conftest*
16267
16268         cat > conftest.$ac_ext <<EOF
16269 #line 16270 "configure"
16270 #include "confdefs.h"
16271 #include <sys/types.h>
16272 #include <sys/socket.h>
16273 #include <netinet/in.h>
16274 #include <netdb.h>
16275 #define BUFSIZE (sizeof(struct hostent)+10)
16276 int main() {
16277 struct hostent hent;
16278                 struct hostent *rhent; char buffer[BUFSIZE]; 
16279                 struct in_addr add;
16280                 size_t alen=sizeof(struct in_addr);
16281                 int bufsize=BUFSIZE;int h_errno;
16282                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16283                         alen, AF_INET, &hent, buffer, bufsize, 
16284                         &rhent, &h_errno);
16285 ; return 0; }
16286 EOF
16287 if { (eval echo configure:16288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16288   rm -rf conftest*
16289   ol_cv_func_gethostbyaddr_r_nargs8=yes
16290 else
16291   echo "configure: failed program was:" >&5
16292   cat conftest.$ac_ext >&5
16293   rm -rf conftest*
16294   ol_cv_func_gethostbyaddr_r_nargs8=no
16295 fi
16296 rm -f conftest*
16297
16298         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16299                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16300
16301                 ol_cv_func_gethostbyaddr_r_nargs=7
16302
16303         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16304                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16305
16306                 ol_cv_func_gethostbyaddr_r_nargs=8
16307
16308         else
16309                 ol_cv_func_gethostbyaddr_r_nargs=0
16310         fi
16311   
16312 fi
16313
16314 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16315   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16316     cat >> confdefs.h <<EOF
16317 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16318 EOF
16319
16320   fi
16321
16322 else
16323         ol_cv_func_gethostbyaddr_r_nargs=0
16324 fi
16325
16326 ol_link_ldbm=no 
16327
16328 if test $ol_with_ldbm_api = auto \
16329         -o $ol_with_ldbm_api = berkeley \
16330         -o $ol_with_ldbm_api = bcompat ; then
16331
16332         if test $ol_with_ldbm_api = bcompat; then \
16333                 for ac_hdr in db_185.h db.h
16334 do
16335 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16336 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16337 echo "configure:16338: checking for $ac_hdr" >&5
16338 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16339   echo $ac_n "(cached) $ac_c" 1>&6
16340 else
16341   cat > conftest.$ac_ext <<EOF
16342 #line 16343 "configure"
16343 #include "confdefs.h"
16344 #include <$ac_hdr>
16345 EOF
16346 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16347 { (eval echo configure:16348: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16348 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16349 if test -z "$ac_err"; then
16350   rm -rf conftest*
16351   eval "ac_cv_header_$ac_safe=yes"
16352 else
16353   echo "$ac_err" >&5
16354   echo "configure: failed program was:" >&5
16355   cat conftest.$ac_ext >&5
16356   rm -rf conftest*
16357   eval "ac_cv_header_$ac_safe=no"
16358 fi
16359 rm -f conftest*
16360 fi
16361 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16362   echo "$ac_t""yes" 1>&6
16363     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16364   cat >> confdefs.h <<EOF
16365 #define $ac_tr_hdr 1
16366 EOF
16367  
16368 else
16369   echo "$ac_t""no" 1>&6
16370 fi
16371 done
16372
16373 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16374         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16375 echo "configure:16376: checking if Berkeley DB header compatibility" >&5
16376 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16377   echo $ac_n "(cached) $ac_c" 1>&6
16378 else
16379   
16380                 cat > conftest.$ac_ext <<EOF
16381 #line 16382 "configure"
16382 #include "confdefs.h"
16383
16384 #if HAVE_DB_185_H
16385 #       include <db_185.h>
16386 #else
16387 #       include <db.h>
16388 #endif
16389
16390  /* this check could be improved */
16391 #ifndef DB_VERSION_MAJOR
16392 #       define DB_VERSION_MAJOR 1
16393 #endif
16394
16395 #if DB_VERSION_MAJOR == 1 
16396         __db_version_1
16397 #endif
16398
16399 EOF
16400 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16401   egrep "__db_version_1" >/dev/null 2>&1; then
16402   rm -rf conftest*
16403   ol_cv_header_db1=yes
16404 else
16405   rm -rf conftest*
16406   ol_cv_header_db1=no
16407 fi
16408 rm -f conftest*
16409
16410 fi
16411
16412 echo "$ac_t""$ol_cv_header_db1" 1>&6
16413
16414         if test $ol_cv_header_db1 = yes ; then
16415                 ol_cv_lib_db=no
16416 if test $ol_cv_lib_db = no ; then
16417         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16418 echo "configure:16419: checking for Berkeley DB link (default)" >&5
16419 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16420   echo $ac_n "(cached) $ac_c" 1>&6
16421 else
16422   
16423         ol_DB_LIB=
16424         ol_LIBS=$LIBS
16425         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16426
16427         cat > conftest.$ac_ext <<EOF
16428 #line 16429 "configure"
16429 #include "confdefs.h"
16430
16431 #ifdef HAVE_DB_185_H
16432 # include <db_185.h>
16433 #else
16434 # include <db.h>
16435 #endif
16436
16437 #ifndef DB_VERSION_MAJOR
16438 # define DB_VERSION_MAJOR 1
16439 #endif
16440
16441 #ifndef NULL
16442 #define NULL ((void*)0)
16443 #endif
16444
16445 int main() {
16446
16447 #if DB_VERSION_MAJOR > 1
16448         {
16449                 char *version;
16450                 int major, minor, patch;
16451
16452                 version = db_version( &major, &minor, &patch );
16453
16454                 if( major != DB_VERSION_MAJOR ||
16455                         minor < DB_VERSION_MINOR )
16456                 {
16457                         printf("Berkeley DB version mismatch\n"
16458                                 "\texpected: %s\n\tgot: %s\n",
16459                                 DB_VERSION_STRING, version);
16460                         return 1;
16461                 }
16462         }
16463 #endif
16464
16465 #if DB_VERSION_MAJOR > 2
16466         db_env_create( NULL, 0 );
16467 #elif DB_VERSION_MAJOR > 1
16468         db_appexit( NULL );
16469 #else
16470         (void) dbopen( NULL, 0, 0, 0, NULL);
16471 #endif
16472
16473 ; return 0; }
16474 EOF
16475 if { (eval echo configure:16476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16476   rm -rf conftest*
16477   ol_cv_db_none=yes
16478 else
16479   echo "configure: failed program was:" >&5
16480   cat conftest.$ac_ext >&5
16481   rm -rf conftest*
16482   ol_cv_db_none=no
16483 fi
16484 rm -f conftest*
16485
16486         LIBS="$ol_LIBS"
16487
16488 fi
16489
16490 echo "$ac_t""$ol_cv_db_none" 1>&6
16491
16492         if test $ol_cv_db_none = yes ; then
16493                 ol_cv_lib_db=yes
16494         fi
16495 fi
16496
16497 if test $ol_cv_lib_db = no ; then
16498         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16499 echo "configure:16500: checking for Berkeley DB link (-ldb42)" >&5
16500 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16501   echo $ac_n "(cached) $ac_c" 1>&6
16502 else
16503   
16504         ol_DB_LIB=-ldb42
16505         ol_LIBS=$LIBS
16506         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16507
16508         cat > conftest.$ac_ext <<EOF
16509 #line 16510 "configure"
16510 #include "confdefs.h"
16511
16512 #ifdef HAVE_DB_185_H
16513 # include <db_185.h>
16514 #else
16515 # include <db.h>
16516 #endif
16517
16518 #ifndef DB_VERSION_MAJOR
16519 # define DB_VERSION_MAJOR 1
16520 #endif
16521
16522 #ifndef NULL
16523 #define NULL ((void*)0)
16524 #endif
16525
16526 int main() {
16527
16528 #if DB_VERSION_MAJOR > 1
16529         {
16530                 char *version;
16531                 int major, minor, patch;
16532
16533                 version = db_version( &major, &minor, &patch );
16534
16535                 if( major != DB_VERSION_MAJOR ||
16536                         minor < DB_VERSION_MINOR )
16537                 {
16538                         printf("Berkeley DB version mismatch\n"
16539                                 "\texpected: %s\n\tgot: %s\n",
16540                                 DB_VERSION_STRING, version);
16541                         return 1;
16542                 }
16543         }
16544 #endif
16545
16546 #if DB_VERSION_MAJOR > 2
16547         db_env_create( NULL, 0 );
16548 #elif DB_VERSION_MAJOR > 1
16549         db_appexit( NULL );
16550 #else
16551         (void) dbopen( NULL, 0, 0, 0, NULL);
16552 #endif
16553
16554 ; return 0; }
16555 EOF
16556 if { (eval echo configure:16557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16557   rm -rf conftest*
16558   ol_cv_db_db42=yes
16559 else
16560   echo "configure: failed program was:" >&5
16561   cat conftest.$ac_ext >&5
16562   rm -rf conftest*
16563   ol_cv_db_db42=no
16564 fi
16565 rm -f conftest*
16566
16567         LIBS="$ol_LIBS"
16568
16569 fi
16570
16571 echo "$ac_t""$ol_cv_db_db42" 1>&6
16572
16573         if test $ol_cv_db_db42 = yes ; then
16574                 ol_cv_lib_db=-ldb42
16575         fi
16576 fi
16577
16578 if test $ol_cv_lib_db = no ; then
16579         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16580 echo "configure:16581: checking for Berkeley DB link (-ldb-42)" >&5
16581 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16582   echo $ac_n "(cached) $ac_c" 1>&6
16583 else
16584   
16585         ol_DB_LIB=-ldb-42
16586         ol_LIBS=$LIBS
16587         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16588
16589         cat > conftest.$ac_ext <<EOF
16590 #line 16591 "configure"
16591 #include "confdefs.h"
16592
16593 #ifdef HAVE_DB_185_H
16594 # include <db_185.h>
16595 #else
16596 # include <db.h>
16597 #endif
16598
16599 #ifndef DB_VERSION_MAJOR
16600 # define DB_VERSION_MAJOR 1
16601 #endif
16602
16603 #ifndef NULL
16604 #define NULL ((void*)0)
16605 #endif
16606
16607 int main() {
16608
16609 #if DB_VERSION_MAJOR > 1
16610         {
16611                 char *version;
16612                 int major, minor, patch;
16613
16614                 version = db_version( &major, &minor, &patch );
16615
16616                 if( major != DB_VERSION_MAJOR ||
16617                         minor < DB_VERSION_MINOR )
16618                 {
16619                         printf("Berkeley DB version mismatch\n"
16620                                 "\texpected: %s\n\tgot: %s\n",
16621                                 DB_VERSION_STRING, version);
16622                         return 1;
16623                 }
16624         }
16625 #endif
16626
16627 #if DB_VERSION_MAJOR > 2
16628         db_env_create( NULL, 0 );
16629 #elif DB_VERSION_MAJOR > 1
16630         db_appexit( NULL );
16631 #else
16632         (void) dbopen( NULL, 0, 0, 0, NULL);
16633 #endif
16634
16635 ; return 0; }
16636 EOF
16637 if { (eval echo configure:16638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16638   rm -rf conftest*
16639   ol_cv_db_db_42=yes
16640 else
16641   echo "configure: failed program was:" >&5
16642   cat conftest.$ac_ext >&5
16643   rm -rf conftest*
16644   ol_cv_db_db_42=no
16645 fi
16646 rm -f conftest*
16647
16648         LIBS="$ol_LIBS"
16649
16650 fi
16651
16652 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16653
16654         if test $ol_cv_db_db_42 = yes ; then
16655                 ol_cv_lib_db=-ldb-42
16656         fi
16657 fi
16658
16659 if test $ol_cv_lib_db = no ; then
16660         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16661 echo "configure:16662: checking for Berkeley DB link (-ldb-4.2)" >&5
16662 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16663   echo $ac_n "(cached) $ac_c" 1>&6
16664 else
16665   
16666         ol_DB_LIB=-ldb-4.2
16667         ol_LIBS=$LIBS
16668         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16669
16670         cat > conftest.$ac_ext <<EOF
16671 #line 16672 "configure"
16672 #include "confdefs.h"
16673
16674 #ifdef HAVE_DB_185_H
16675 # include <db_185.h>
16676 #else
16677 # include <db.h>
16678 #endif
16679
16680 #ifndef DB_VERSION_MAJOR
16681 # define DB_VERSION_MAJOR 1
16682 #endif
16683
16684 #ifndef NULL
16685 #define NULL ((void*)0)
16686 #endif
16687
16688 int main() {
16689
16690 #if DB_VERSION_MAJOR > 1
16691         {
16692                 char *version;
16693                 int major, minor, patch;
16694
16695                 version = db_version( &major, &minor, &patch );
16696
16697                 if( major != DB_VERSION_MAJOR ||
16698                         minor < DB_VERSION_MINOR )
16699                 {
16700                         printf("Berkeley DB version mismatch\n"
16701                                 "\texpected: %s\n\tgot: %s\n",
16702                                 DB_VERSION_STRING, version);
16703                         return 1;
16704                 }
16705         }
16706 #endif
16707
16708 #if DB_VERSION_MAJOR > 2
16709         db_env_create( NULL, 0 );
16710 #elif DB_VERSION_MAJOR > 1
16711         db_appexit( NULL );
16712 #else
16713         (void) dbopen( NULL, 0, 0, 0, NULL);
16714 #endif
16715
16716 ; return 0; }
16717 EOF
16718 if { (eval echo configure:16719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16719   rm -rf conftest*
16720   ol_cv_db_db_4_dot_2=yes
16721 else
16722   echo "configure: failed program was:" >&5
16723   cat conftest.$ac_ext >&5
16724   rm -rf conftest*
16725   ol_cv_db_db_4_dot_2=no
16726 fi
16727 rm -f conftest*
16728
16729         LIBS="$ol_LIBS"
16730
16731 fi
16732
16733 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16734
16735         if test $ol_cv_db_db_4_dot_2 = yes ; then
16736                 ol_cv_lib_db=-ldb-4.2
16737         fi
16738 fi
16739
16740 if test $ol_cv_lib_db = no ; then
16741         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16742 echo "configure:16743: checking for Berkeley DB link (-ldb-4-2)" >&5
16743 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16744   echo $ac_n "(cached) $ac_c" 1>&6
16745 else
16746   
16747         ol_DB_LIB=-ldb-4-2
16748         ol_LIBS=$LIBS
16749         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16750
16751         cat > conftest.$ac_ext <<EOF
16752 #line 16753 "configure"
16753 #include "confdefs.h"
16754
16755 #ifdef HAVE_DB_185_H
16756 # include <db_185.h>
16757 #else
16758 # include <db.h>
16759 #endif
16760
16761 #ifndef DB_VERSION_MAJOR
16762 # define DB_VERSION_MAJOR 1
16763 #endif
16764
16765 #ifndef NULL
16766 #define NULL ((void*)0)
16767 #endif
16768
16769 int main() {
16770
16771 #if DB_VERSION_MAJOR > 1
16772         {
16773                 char *version;
16774                 int major, minor, patch;
16775
16776                 version = db_version( &major, &minor, &patch );
16777
16778                 if( major != DB_VERSION_MAJOR ||
16779                         minor < DB_VERSION_MINOR )
16780                 {
16781                         printf("Berkeley DB version mismatch\n"
16782                                 "\texpected: %s\n\tgot: %s\n",
16783                                 DB_VERSION_STRING, version);
16784                         return 1;
16785                 }
16786         }
16787 #endif
16788
16789 #if DB_VERSION_MAJOR > 2
16790         db_env_create( NULL, 0 );
16791 #elif DB_VERSION_MAJOR > 1
16792         db_appexit( NULL );
16793 #else
16794         (void) dbopen( NULL, 0, 0, 0, NULL);
16795 #endif
16796
16797 ; return 0; }
16798 EOF
16799 if { (eval echo configure:16800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16800   rm -rf conftest*
16801   ol_cv_db_db_4_2=yes
16802 else
16803   echo "configure: failed program was:" >&5
16804   cat conftest.$ac_ext >&5
16805   rm -rf conftest*
16806   ol_cv_db_db_4_2=no
16807 fi
16808 rm -f conftest*
16809
16810         LIBS="$ol_LIBS"
16811
16812 fi
16813
16814 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
16815
16816         if test $ol_cv_db_db_4_2 = yes ; then
16817                 ol_cv_lib_db=-ldb-4-2
16818         fi
16819 fi
16820
16821 if test $ol_cv_lib_db = no ; then
16822         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16823 echo "configure:16824: checking for Berkeley DB link (-ldb-4)" >&5
16824 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
16825   echo $ac_n "(cached) $ac_c" 1>&6
16826 else
16827   
16828         ol_DB_LIB=-ldb-4
16829         ol_LIBS=$LIBS
16830         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16831
16832         cat > conftest.$ac_ext <<EOF
16833 #line 16834 "configure"
16834 #include "confdefs.h"
16835
16836 #ifdef HAVE_DB_185_H
16837 # include <db_185.h>
16838 #else
16839 # include <db.h>
16840 #endif
16841
16842 #ifndef DB_VERSION_MAJOR
16843 # define DB_VERSION_MAJOR 1
16844 #endif
16845
16846 #ifndef NULL
16847 #define NULL ((void*)0)
16848 #endif
16849
16850 int main() {
16851
16852 #if DB_VERSION_MAJOR > 1
16853         {
16854                 char *version;
16855                 int major, minor, patch;
16856
16857                 version = db_version( &major, &minor, &patch );
16858
16859                 if( major != DB_VERSION_MAJOR ||
16860                         minor < DB_VERSION_MINOR )
16861                 {
16862                         printf("Berkeley DB version mismatch\n"
16863                                 "\texpected: %s\n\tgot: %s\n",
16864                                 DB_VERSION_STRING, version);
16865                         return 1;
16866                 }
16867         }
16868 #endif
16869
16870 #if DB_VERSION_MAJOR > 2
16871         db_env_create( NULL, 0 );
16872 #elif DB_VERSION_MAJOR > 1
16873         db_appexit( NULL );
16874 #else
16875         (void) dbopen( NULL, 0, 0, 0, NULL);
16876 #endif
16877
16878 ; return 0; }
16879 EOF
16880 if { (eval echo configure:16881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16881   rm -rf conftest*
16882   ol_cv_db_db_4=yes
16883 else
16884   echo "configure: failed program was:" >&5
16885   cat conftest.$ac_ext >&5
16886   rm -rf conftest*
16887   ol_cv_db_db_4=no
16888 fi
16889 rm -f conftest*
16890
16891         LIBS="$ol_LIBS"
16892
16893 fi
16894
16895 echo "$ac_t""$ol_cv_db_db_4" 1>&6
16896
16897         if test $ol_cv_db_db_4 = yes ; then
16898                 ol_cv_lib_db=-ldb-4
16899         fi
16900 fi
16901
16902 if test $ol_cv_lib_db = no ; then
16903         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16904 echo "configure:16905: checking for Berkeley DB link (-ldb4)" >&5
16905 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16906   echo $ac_n "(cached) $ac_c" 1>&6
16907 else
16908   
16909         ol_DB_LIB=-ldb4
16910         ol_LIBS=$LIBS
16911         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16912
16913         cat > conftest.$ac_ext <<EOF
16914 #line 16915 "configure"
16915 #include "confdefs.h"
16916
16917 #ifdef HAVE_DB_185_H
16918 # include <db_185.h>
16919 #else
16920 # include <db.h>
16921 #endif
16922
16923 #ifndef DB_VERSION_MAJOR
16924 # define DB_VERSION_MAJOR 1
16925 #endif
16926
16927 #ifndef NULL
16928 #define NULL ((void*)0)
16929 #endif
16930
16931 int main() {
16932
16933 #if DB_VERSION_MAJOR > 1
16934         {
16935                 char *version;
16936                 int major, minor, patch;
16937
16938                 version = db_version( &major, &minor, &patch );
16939
16940                 if( major != DB_VERSION_MAJOR ||
16941                         minor < DB_VERSION_MINOR )
16942                 {
16943                         printf("Berkeley DB version mismatch\n"
16944                                 "\texpected: %s\n\tgot: %s\n",
16945                                 DB_VERSION_STRING, version);
16946                         return 1;
16947                 }
16948         }
16949 #endif
16950
16951 #if DB_VERSION_MAJOR > 2
16952         db_env_create( NULL, 0 );
16953 #elif DB_VERSION_MAJOR > 1
16954         db_appexit( NULL );
16955 #else
16956         (void) dbopen( NULL, 0, 0, 0, NULL);
16957 #endif
16958
16959 ; return 0; }
16960 EOF
16961 if { (eval echo configure:16962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16962   rm -rf conftest*
16963   ol_cv_db_db4=yes
16964 else
16965   echo "configure: failed program was:" >&5
16966   cat conftest.$ac_ext >&5
16967   rm -rf conftest*
16968   ol_cv_db_db4=no
16969 fi
16970 rm -f conftest*
16971
16972         LIBS="$ol_LIBS"
16973
16974 fi
16975
16976 echo "$ac_t""$ol_cv_db_db4" 1>&6
16977
16978         if test $ol_cv_db_db4 = yes ; then
16979                 ol_cv_lib_db=-ldb4
16980         fi
16981 fi
16982
16983 if test $ol_cv_lib_db = no ; then
16984         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
16985 echo "configure:16986: checking for Berkeley DB link (-ldb)" >&5
16986 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
16987   echo $ac_n "(cached) $ac_c" 1>&6
16988 else
16989   
16990         ol_DB_LIB=-ldb
16991         ol_LIBS=$LIBS
16992         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16993
16994         cat > conftest.$ac_ext <<EOF
16995 #line 16996 "configure"
16996 #include "confdefs.h"
16997
16998 #ifdef HAVE_DB_185_H
16999 # include <db_185.h>
17000 #else
17001 # include <db.h>
17002 #endif
17003
17004 #ifndef DB_VERSION_MAJOR
17005 # define DB_VERSION_MAJOR 1
17006 #endif
17007
17008 #ifndef NULL
17009 #define NULL ((void*)0)
17010 #endif
17011
17012 int main() {
17013
17014 #if DB_VERSION_MAJOR > 1
17015         {
17016                 char *version;
17017                 int major, minor, patch;
17018
17019                 version = db_version( &major, &minor, &patch );
17020
17021                 if( major != DB_VERSION_MAJOR ||
17022                         minor < DB_VERSION_MINOR )
17023                 {
17024                         printf("Berkeley DB version mismatch\n"
17025                                 "\texpected: %s\n\tgot: %s\n",
17026                                 DB_VERSION_STRING, version);
17027                         return 1;
17028                 }
17029         }
17030 #endif
17031
17032 #if DB_VERSION_MAJOR > 2
17033         db_env_create( NULL, 0 );
17034 #elif DB_VERSION_MAJOR > 1
17035         db_appexit( NULL );
17036 #else
17037         (void) dbopen( NULL, 0, 0, 0, NULL);
17038 #endif
17039
17040 ; return 0; }
17041 EOF
17042 if { (eval echo configure:17043: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17043   rm -rf conftest*
17044   ol_cv_db_db=yes
17045 else
17046   echo "configure: failed program was:" >&5
17047   cat conftest.$ac_ext >&5
17048   rm -rf conftest*
17049   ol_cv_db_db=no
17050 fi
17051 rm -f conftest*
17052
17053         LIBS="$ol_LIBS"
17054
17055 fi
17056
17057 echo "$ac_t""$ol_cv_db_db" 1>&6
17058
17059         if test $ol_cv_db_db = yes ; then
17060                 ol_cv_lib_db=-ldb
17061         fi
17062 fi
17063
17064 if test $ol_cv_lib_db = no ; then
17065         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17066 echo "configure:17067: checking for Berkeley DB link (-ldb41)" >&5
17067 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17068   echo $ac_n "(cached) $ac_c" 1>&6
17069 else
17070   
17071         ol_DB_LIB=-ldb41
17072         ol_LIBS=$LIBS
17073         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17074
17075         cat > conftest.$ac_ext <<EOF
17076 #line 17077 "configure"
17077 #include "confdefs.h"
17078
17079 #ifdef HAVE_DB_185_H
17080 # include <db_185.h>
17081 #else
17082 # include <db.h>
17083 #endif
17084
17085 #ifndef DB_VERSION_MAJOR
17086 # define DB_VERSION_MAJOR 1
17087 #endif
17088
17089 #ifndef NULL
17090 #define NULL ((void*)0)
17091 #endif
17092
17093 int main() {
17094
17095 #if DB_VERSION_MAJOR > 1
17096         {
17097                 char *version;
17098                 int major, minor, patch;
17099
17100                 version = db_version( &major, &minor, &patch );
17101
17102                 if( major != DB_VERSION_MAJOR ||
17103                         minor < DB_VERSION_MINOR )
17104                 {
17105                         printf("Berkeley DB version mismatch\n"
17106                                 "\texpected: %s\n\tgot: %s\n",
17107                                 DB_VERSION_STRING, version);
17108                         return 1;
17109                 }
17110         }
17111 #endif
17112
17113 #if DB_VERSION_MAJOR > 2
17114         db_env_create( NULL, 0 );
17115 #elif DB_VERSION_MAJOR > 1
17116         db_appexit( NULL );
17117 #else
17118         (void) dbopen( NULL, 0, 0, 0, NULL);
17119 #endif
17120
17121 ; return 0; }
17122 EOF
17123 if { (eval echo configure:17124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17124   rm -rf conftest*
17125   ol_cv_db_db41=yes
17126 else
17127   echo "configure: failed program was:" >&5
17128   cat conftest.$ac_ext >&5
17129   rm -rf conftest*
17130   ol_cv_db_db41=no
17131 fi
17132 rm -f conftest*
17133
17134         LIBS="$ol_LIBS"
17135
17136 fi
17137
17138 echo "$ac_t""$ol_cv_db_db41" 1>&6
17139
17140         if test $ol_cv_db_db41 = yes ; then
17141                 ol_cv_lib_db=-ldb41
17142         fi
17143 fi
17144
17145 if test $ol_cv_lib_db = no ; then
17146         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17147 echo "configure:17148: checking for Berkeley DB link (-ldb-41)" >&5
17148 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17149   echo $ac_n "(cached) $ac_c" 1>&6
17150 else
17151   
17152         ol_DB_LIB=-ldb-41
17153         ol_LIBS=$LIBS
17154         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17155
17156         cat > conftest.$ac_ext <<EOF
17157 #line 17158 "configure"
17158 #include "confdefs.h"
17159
17160 #ifdef HAVE_DB_185_H
17161 # include <db_185.h>
17162 #else
17163 # include <db.h>
17164 #endif
17165
17166 #ifndef DB_VERSION_MAJOR
17167 # define DB_VERSION_MAJOR 1
17168 #endif
17169
17170 #ifndef NULL
17171 #define NULL ((void*)0)
17172 #endif
17173
17174 int main() {
17175
17176 #if DB_VERSION_MAJOR > 1
17177         {
17178                 char *version;
17179                 int major, minor, patch;
17180
17181                 version = db_version( &major, &minor, &patch );
17182
17183                 if( major != DB_VERSION_MAJOR ||
17184                         minor < DB_VERSION_MINOR )
17185                 {
17186                         printf("Berkeley DB version mismatch\n"
17187                                 "\texpected: %s\n\tgot: %s\n",
17188                                 DB_VERSION_STRING, version);
17189                         return 1;
17190                 }
17191         }
17192 #endif
17193
17194 #if DB_VERSION_MAJOR > 2
17195         db_env_create( NULL, 0 );
17196 #elif DB_VERSION_MAJOR > 1
17197         db_appexit( NULL );
17198 #else
17199         (void) dbopen( NULL, 0, 0, 0, NULL);
17200 #endif
17201
17202 ; return 0; }
17203 EOF
17204 if { (eval echo configure:17205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17205   rm -rf conftest*
17206   ol_cv_db_db_41=yes
17207 else
17208   echo "configure: failed program was:" >&5
17209   cat conftest.$ac_ext >&5
17210   rm -rf conftest*
17211   ol_cv_db_db_41=no
17212 fi
17213 rm -f conftest*
17214
17215         LIBS="$ol_LIBS"
17216
17217 fi
17218
17219 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17220
17221         if test $ol_cv_db_db_41 = yes ; then
17222                 ol_cv_lib_db=-ldb-41
17223         fi
17224 fi
17225
17226 if test $ol_cv_lib_db = no ; then
17227         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17228 echo "configure:17229: checking for Berkeley DB link (-ldb-4.1)" >&5
17229 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17230   echo $ac_n "(cached) $ac_c" 1>&6
17231 else
17232   
17233         ol_DB_LIB=-ldb-4.1
17234         ol_LIBS=$LIBS
17235         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17236
17237         cat > conftest.$ac_ext <<EOF
17238 #line 17239 "configure"
17239 #include "confdefs.h"
17240
17241 #ifdef HAVE_DB_185_H
17242 # include <db_185.h>
17243 #else
17244 # include <db.h>
17245 #endif
17246
17247 #ifndef DB_VERSION_MAJOR
17248 # define DB_VERSION_MAJOR 1
17249 #endif
17250
17251 #ifndef NULL
17252 #define NULL ((void*)0)
17253 #endif
17254
17255 int main() {
17256
17257 #if DB_VERSION_MAJOR > 1
17258         {
17259                 char *version;
17260                 int major, minor, patch;
17261
17262                 version = db_version( &major, &minor, &patch );
17263
17264                 if( major != DB_VERSION_MAJOR ||
17265                         minor < DB_VERSION_MINOR )
17266                 {
17267                         printf("Berkeley DB version mismatch\n"
17268                                 "\texpected: %s\n\tgot: %s\n",
17269                                 DB_VERSION_STRING, version);
17270                         return 1;
17271                 }
17272         }
17273 #endif
17274
17275 #if DB_VERSION_MAJOR > 2
17276         db_env_create( NULL, 0 );
17277 #elif DB_VERSION_MAJOR > 1
17278         db_appexit( NULL );
17279 #else
17280         (void) dbopen( NULL, 0, 0, 0, NULL);
17281 #endif
17282
17283 ; return 0; }
17284 EOF
17285 if { (eval echo configure:17286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17286   rm -rf conftest*
17287   ol_cv_db_db_4_dot_1=yes
17288 else
17289   echo "configure: failed program was:" >&5
17290   cat conftest.$ac_ext >&5
17291   rm -rf conftest*
17292   ol_cv_db_db_4_dot_1=no
17293 fi
17294 rm -f conftest*
17295
17296         LIBS="$ol_LIBS"
17297
17298 fi
17299
17300 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17301
17302         if test $ol_cv_db_db_4_dot_1 = yes ; then
17303                 ol_cv_lib_db=-ldb-4.1
17304         fi
17305 fi
17306
17307 if test $ol_cv_lib_db = no ; then
17308         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17309 echo "configure:17310: checking for Berkeley DB link (-ldb-4-1)" >&5
17310 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17311   echo $ac_n "(cached) $ac_c" 1>&6
17312 else
17313   
17314         ol_DB_LIB=-ldb-4-1
17315         ol_LIBS=$LIBS
17316         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17317
17318         cat > conftest.$ac_ext <<EOF
17319 #line 17320 "configure"
17320 #include "confdefs.h"
17321
17322 #ifdef HAVE_DB_185_H
17323 # include <db_185.h>
17324 #else
17325 # include <db.h>
17326 #endif
17327
17328 #ifndef DB_VERSION_MAJOR
17329 # define DB_VERSION_MAJOR 1
17330 #endif
17331
17332 #ifndef NULL
17333 #define NULL ((void*)0)
17334 #endif
17335
17336 int main() {
17337
17338 #if DB_VERSION_MAJOR > 1
17339         {
17340                 char *version;
17341                 int major, minor, patch;
17342
17343                 version = db_version( &major, &minor, &patch );
17344
17345                 if( major != DB_VERSION_MAJOR ||
17346                         minor < DB_VERSION_MINOR )
17347                 {
17348                         printf("Berkeley DB version mismatch\n"
17349                                 "\texpected: %s\n\tgot: %s\n",
17350                                 DB_VERSION_STRING, version);
17351                         return 1;
17352                 }
17353         }
17354 #endif
17355
17356 #if DB_VERSION_MAJOR > 2
17357         db_env_create( NULL, 0 );
17358 #elif DB_VERSION_MAJOR > 1
17359         db_appexit( NULL );
17360 #else
17361         (void) dbopen( NULL, 0, 0, 0, NULL);
17362 #endif
17363
17364 ; return 0; }
17365 EOF
17366 if { (eval echo configure:17367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17367   rm -rf conftest*
17368   ol_cv_db_db_4_1=yes
17369 else
17370   echo "configure: failed program was:" >&5
17371   cat conftest.$ac_ext >&5
17372   rm -rf conftest*
17373   ol_cv_db_db_4_1=no
17374 fi
17375 rm -f conftest*
17376
17377         LIBS="$ol_LIBS"
17378
17379 fi
17380
17381 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17382
17383         if test $ol_cv_db_db_4_1 = yes ; then
17384                 ol_cv_lib_db=-ldb-4-1
17385         fi
17386 fi
17387
17388 if test $ol_cv_lib_db = no ; then
17389         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17390 echo "configure:17391: checking for Berkeley DB link (-ldb3)" >&5
17391 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17392   echo $ac_n "(cached) $ac_c" 1>&6
17393 else
17394   
17395         ol_DB_LIB=-ldb3
17396         ol_LIBS=$LIBS
17397         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17398
17399         cat > conftest.$ac_ext <<EOF
17400 #line 17401 "configure"
17401 #include "confdefs.h"
17402
17403 #ifdef HAVE_DB_185_H
17404 # include <db_185.h>
17405 #else
17406 # include <db.h>
17407 #endif
17408
17409 #ifndef DB_VERSION_MAJOR
17410 # define DB_VERSION_MAJOR 1
17411 #endif
17412
17413 #ifndef NULL
17414 #define NULL ((void*)0)
17415 #endif
17416
17417 int main() {
17418
17419 #if DB_VERSION_MAJOR > 1
17420         {
17421                 char *version;
17422                 int major, minor, patch;
17423
17424                 version = db_version( &major, &minor, &patch );
17425
17426                 if( major != DB_VERSION_MAJOR ||
17427                         minor < DB_VERSION_MINOR )
17428                 {
17429                         printf("Berkeley DB version mismatch\n"
17430                                 "\texpected: %s\n\tgot: %s\n",
17431                                 DB_VERSION_STRING, version);
17432                         return 1;
17433                 }
17434         }
17435 #endif
17436
17437 #if DB_VERSION_MAJOR > 2
17438         db_env_create( NULL, 0 );
17439 #elif DB_VERSION_MAJOR > 1
17440         db_appexit( NULL );
17441 #else
17442         (void) dbopen( NULL, 0, 0, 0, NULL);
17443 #endif
17444
17445 ; return 0; }
17446 EOF
17447 if { (eval echo configure:17448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17448   rm -rf conftest*
17449   ol_cv_db_db3=yes
17450 else
17451   echo "configure: failed program was:" >&5
17452   cat conftest.$ac_ext >&5
17453   rm -rf conftest*
17454   ol_cv_db_db3=no
17455 fi
17456 rm -f conftest*
17457
17458         LIBS="$ol_LIBS"
17459
17460 fi
17461
17462 echo "$ac_t""$ol_cv_db_db3" 1>&6
17463
17464         if test $ol_cv_db_db3 = yes ; then
17465                 ol_cv_lib_db=-ldb3
17466         fi
17467 fi
17468
17469 if test $ol_cv_lib_db = no ; then
17470         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17471 echo "configure:17472: checking for Berkeley DB link (-ldb-3)" >&5
17472 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17473   echo $ac_n "(cached) $ac_c" 1>&6
17474 else
17475   
17476         ol_DB_LIB=-ldb-3
17477         ol_LIBS=$LIBS
17478         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17479
17480         cat > conftest.$ac_ext <<EOF
17481 #line 17482 "configure"
17482 #include "confdefs.h"
17483
17484 #ifdef HAVE_DB_185_H
17485 # include <db_185.h>
17486 #else
17487 # include <db.h>
17488 #endif
17489
17490 #ifndef DB_VERSION_MAJOR
17491 # define DB_VERSION_MAJOR 1
17492 #endif
17493
17494 #ifndef NULL
17495 #define NULL ((void*)0)
17496 #endif
17497
17498 int main() {
17499
17500 #if DB_VERSION_MAJOR > 1
17501         {
17502                 char *version;
17503                 int major, minor, patch;
17504
17505                 version = db_version( &major, &minor, &patch );
17506
17507                 if( major != DB_VERSION_MAJOR ||
17508                         minor < DB_VERSION_MINOR )
17509                 {
17510                         printf("Berkeley DB version mismatch\n"
17511                                 "\texpected: %s\n\tgot: %s\n",
17512                                 DB_VERSION_STRING, version);
17513                         return 1;
17514                 }
17515         }
17516 #endif
17517
17518 #if DB_VERSION_MAJOR > 2
17519         db_env_create( NULL, 0 );
17520 #elif DB_VERSION_MAJOR > 1
17521         db_appexit( NULL );
17522 #else
17523         (void) dbopen( NULL, 0, 0, 0, NULL);
17524 #endif
17525
17526 ; return 0; }
17527 EOF
17528 if { (eval echo configure:17529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17529   rm -rf conftest*
17530   ol_cv_db_db_3=yes
17531 else
17532   echo "configure: failed program was:" >&5
17533   cat conftest.$ac_ext >&5
17534   rm -rf conftest*
17535   ol_cv_db_db_3=no
17536 fi
17537 rm -f conftest*
17538
17539         LIBS="$ol_LIBS"
17540
17541 fi
17542
17543 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17544
17545         if test $ol_cv_db_db_3 = yes ; then
17546                 ol_cv_lib_db=-ldb-3
17547         fi
17548 fi
17549
17550 if test $ol_cv_lib_db = no ; then
17551         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17552 echo "configure:17553: checking for Berkeley DB link (-ldb2)" >&5
17553 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17554   echo $ac_n "(cached) $ac_c" 1>&6
17555 else
17556   
17557         ol_DB_LIB=-ldb2
17558         ol_LIBS=$LIBS
17559         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17560
17561         cat > conftest.$ac_ext <<EOF
17562 #line 17563 "configure"
17563 #include "confdefs.h"
17564
17565 #ifdef HAVE_DB_185_H
17566 # include <db_185.h>
17567 #else
17568 # include <db.h>
17569 #endif
17570
17571 #ifndef DB_VERSION_MAJOR
17572 # define DB_VERSION_MAJOR 1
17573 #endif
17574
17575 #ifndef NULL
17576 #define NULL ((void*)0)
17577 #endif
17578
17579 int main() {
17580
17581 #if DB_VERSION_MAJOR > 1
17582         {
17583                 char *version;
17584                 int major, minor, patch;
17585
17586                 version = db_version( &major, &minor, &patch );
17587
17588                 if( major != DB_VERSION_MAJOR ||
17589                         minor < DB_VERSION_MINOR )
17590                 {
17591                         printf("Berkeley DB version mismatch\n"
17592                                 "\texpected: %s\n\tgot: %s\n",
17593                                 DB_VERSION_STRING, version);
17594                         return 1;
17595                 }
17596         }
17597 #endif
17598
17599 #if DB_VERSION_MAJOR > 2
17600         db_env_create( NULL, 0 );
17601 #elif DB_VERSION_MAJOR > 1
17602         db_appexit( NULL );
17603 #else
17604         (void) dbopen( NULL, 0, 0, 0, NULL);
17605 #endif
17606
17607 ; return 0; }
17608 EOF
17609 if { (eval echo configure:17610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17610   rm -rf conftest*
17611   ol_cv_db_db2=yes
17612 else
17613   echo "configure: failed program was:" >&5
17614   cat conftest.$ac_ext >&5
17615   rm -rf conftest*
17616   ol_cv_db_db2=no
17617 fi
17618 rm -f conftest*
17619
17620         LIBS="$ol_LIBS"
17621
17622 fi
17623
17624 echo "$ac_t""$ol_cv_db_db2" 1>&6
17625
17626         if test $ol_cv_db_db2 = yes ; then
17627                 ol_cv_lib_db=-ldb2
17628         fi
17629 fi
17630
17631 if test $ol_cv_lib_db = no ; then
17632         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17633 echo "configure:17634: checking for Berkeley DB link (-ldb-2)" >&5
17634 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17635   echo $ac_n "(cached) $ac_c" 1>&6
17636 else
17637   
17638         ol_DB_LIB=-ldb-2
17639         ol_LIBS=$LIBS
17640         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17641
17642         cat > conftest.$ac_ext <<EOF
17643 #line 17644 "configure"
17644 #include "confdefs.h"
17645
17646 #ifdef HAVE_DB_185_H
17647 # include <db_185.h>
17648 #else
17649 # include <db.h>
17650 #endif
17651
17652 #ifndef DB_VERSION_MAJOR
17653 # define DB_VERSION_MAJOR 1
17654 #endif
17655
17656 #ifndef NULL
17657 #define NULL ((void*)0)
17658 #endif
17659
17660 int main() {
17661
17662 #if DB_VERSION_MAJOR > 1
17663         {
17664                 char *version;
17665                 int major, minor, patch;
17666
17667                 version = db_version( &major, &minor, &patch );
17668
17669                 if( major != DB_VERSION_MAJOR ||
17670                         minor < DB_VERSION_MINOR )
17671                 {
17672                         printf("Berkeley DB version mismatch\n"
17673                                 "\texpected: %s\n\tgot: %s\n",
17674                                 DB_VERSION_STRING, version);
17675                         return 1;
17676                 }
17677         }
17678 #endif
17679
17680 #if DB_VERSION_MAJOR > 2
17681         db_env_create( NULL, 0 );
17682 #elif DB_VERSION_MAJOR > 1
17683         db_appexit( NULL );
17684 #else
17685         (void) dbopen( NULL, 0, 0, 0, NULL);
17686 #endif
17687
17688 ; return 0; }
17689 EOF
17690 if { (eval echo configure:17691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17691   rm -rf conftest*
17692   ol_cv_db_db_2=yes
17693 else
17694   echo "configure: failed program was:" >&5
17695   cat conftest.$ac_ext >&5
17696   rm -rf conftest*
17697   ol_cv_db_db_2=no
17698 fi
17699 rm -f conftest*
17700
17701         LIBS="$ol_LIBS"
17702
17703 fi
17704
17705 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17706
17707         if test $ol_cv_db_db_2 = yes ; then
17708                 ol_cv_lib_db=-ldb-2
17709         fi
17710 fi
17711
17712 if test $ol_cv_lib_db = no ; then
17713         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17714 echo "configure:17715: checking for Berkeley DB link (-ldb1)" >&5
17715 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17716   echo $ac_n "(cached) $ac_c" 1>&6
17717 else
17718   
17719         ol_DB_LIB=-ldb1
17720         ol_LIBS=$LIBS
17721         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17722
17723         cat > conftest.$ac_ext <<EOF
17724 #line 17725 "configure"
17725 #include "confdefs.h"
17726
17727 #ifdef HAVE_DB_185_H
17728 # include <db_185.h>
17729 #else
17730 # include <db.h>
17731 #endif
17732
17733 #ifndef DB_VERSION_MAJOR
17734 # define DB_VERSION_MAJOR 1
17735 #endif
17736
17737 #ifndef NULL
17738 #define NULL ((void*)0)
17739 #endif
17740
17741 int main() {
17742
17743 #if DB_VERSION_MAJOR > 1
17744         {
17745                 char *version;
17746                 int major, minor, patch;
17747
17748                 version = db_version( &major, &minor, &patch );
17749
17750                 if( major != DB_VERSION_MAJOR ||
17751                         minor < DB_VERSION_MINOR )
17752                 {
17753                         printf("Berkeley DB version mismatch\n"
17754                                 "\texpected: %s\n\tgot: %s\n",
17755                                 DB_VERSION_STRING, version);
17756                         return 1;
17757                 }
17758         }
17759 #endif
17760
17761 #if DB_VERSION_MAJOR > 2
17762         db_env_create( NULL, 0 );
17763 #elif DB_VERSION_MAJOR > 1
17764         db_appexit( NULL );
17765 #else
17766         (void) dbopen( NULL, 0, 0, 0, NULL);
17767 #endif
17768
17769 ; return 0; }
17770 EOF
17771 if { (eval echo configure:17772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17772   rm -rf conftest*
17773   ol_cv_db_db1=yes
17774 else
17775   echo "configure: failed program was:" >&5
17776   cat conftest.$ac_ext >&5
17777   rm -rf conftest*
17778   ol_cv_db_db1=no
17779 fi
17780 rm -f conftest*
17781
17782         LIBS="$ol_LIBS"
17783
17784 fi
17785
17786 echo "$ac_t""$ol_cv_db_db1" 1>&6
17787
17788         if test $ol_cv_db_db1 = yes ; then
17789                 ol_cv_lib_db=-ldb1
17790         fi
17791 fi
17792
17793 if test $ol_cv_lib_db = no ; then
17794         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17795 echo "configure:17796: checking for Berkeley DB link (-ldb-1)" >&5
17796 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17797   echo $ac_n "(cached) $ac_c" 1>&6
17798 else
17799   
17800         ol_DB_LIB=-ldb-1
17801         ol_LIBS=$LIBS
17802         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17803
17804         cat > conftest.$ac_ext <<EOF
17805 #line 17806 "configure"
17806 #include "confdefs.h"
17807
17808 #ifdef HAVE_DB_185_H
17809 # include <db_185.h>
17810 #else
17811 # include <db.h>
17812 #endif
17813
17814 #ifndef DB_VERSION_MAJOR
17815 # define DB_VERSION_MAJOR 1
17816 #endif
17817
17818 #ifndef NULL
17819 #define NULL ((void*)0)
17820 #endif
17821
17822 int main() {
17823
17824 #if DB_VERSION_MAJOR > 1
17825         {
17826                 char *version;
17827                 int major, minor, patch;
17828
17829                 version = db_version( &major, &minor, &patch );
17830
17831                 if( major != DB_VERSION_MAJOR ||
17832                         minor < DB_VERSION_MINOR )
17833                 {
17834                         printf("Berkeley DB version mismatch\n"
17835                                 "\texpected: %s\n\tgot: %s\n",
17836                                 DB_VERSION_STRING, version);
17837                         return 1;
17838                 }
17839         }
17840 #endif
17841
17842 #if DB_VERSION_MAJOR > 2
17843         db_env_create( NULL, 0 );
17844 #elif DB_VERSION_MAJOR > 1
17845         db_appexit( NULL );
17846 #else
17847         (void) dbopen( NULL, 0, 0, 0, NULL);
17848 #endif
17849
17850 ; return 0; }
17851 EOF
17852 if { (eval echo configure:17853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17853   rm -rf conftest*
17854   ol_cv_db_db_1=yes
17855 else
17856   echo "configure: failed program was:" >&5
17857   cat conftest.$ac_ext >&5
17858   rm -rf conftest*
17859   ol_cv_db_db_1=no
17860 fi
17861 rm -f conftest*
17862
17863         LIBS="$ol_LIBS"
17864
17865 fi
17866
17867 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17868
17869         if test $ol_cv_db_db_1 = yes ; then
17870                 ol_cv_lib_db=-ldb-1
17871         fi
17872 fi
17873
17874
17875                 if test "$ol_cv_lib_db" != no ; then
17876                         ol_cv_berkeley_db=yes
17877                 fi
17878         fi
17879 fi
17880
17881         else
17882                 ol_cv_berkeley_db=no
17883 for ac_hdr in db.h
17884 do
17885 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17886 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17887 echo "configure:17888: checking for $ac_hdr" >&5
17888 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17889   echo $ac_n "(cached) $ac_c" 1>&6
17890 else
17891   cat > conftest.$ac_ext <<EOF
17892 #line 17893 "configure"
17893 #include "confdefs.h"
17894 #include <$ac_hdr>
17895 EOF
17896 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17897 { (eval echo configure:17898: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17898 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17899 if test -z "$ac_err"; then
17900   rm -rf conftest*
17901   eval "ac_cv_header_$ac_safe=yes"
17902 else
17903   echo "$ac_err" >&5
17904   echo "configure: failed program was:" >&5
17905   cat conftest.$ac_ext >&5
17906   rm -rf conftest*
17907   eval "ac_cv_header_$ac_safe=no"
17908 fi
17909 rm -f conftest*
17910 fi
17911 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17912   echo "$ac_t""yes" 1>&6
17913     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17914   cat >> confdefs.h <<EOF
17915 #define $ac_tr_hdr 1
17916 EOF
17917  
17918 else
17919   echo "$ac_t""no" 1>&6
17920 fi
17921 done
17922
17923 if test $ac_cv_header_db_h = yes; then
17924         ol_cv_lib_db=no
17925 if test $ol_cv_lib_db = no ; then
17926         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17927 echo "configure:17928: checking for Berkeley DB link (default)" >&5
17928 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17929   echo $ac_n "(cached) $ac_c" 1>&6
17930 else
17931   
17932         ol_DB_LIB=
17933         ol_LIBS=$LIBS
17934         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17935
17936         cat > conftest.$ac_ext <<EOF
17937 #line 17938 "configure"
17938 #include "confdefs.h"
17939
17940 #ifdef HAVE_DB_185_H
17941 # include <db_185.h>
17942 #else
17943 # include <db.h>
17944 #endif
17945
17946 #ifndef DB_VERSION_MAJOR
17947 # define DB_VERSION_MAJOR 1
17948 #endif
17949
17950 #ifndef NULL
17951 #define NULL ((void*)0)
17952 #endif
17953
17954 int main() {
17955
17956 #if DB_VERSION_MAJOR > 1
17957         {
17958                 char *version;
17959                 int major, minor, patch;
17960
17961                 version = db_version( &major, &minor, &patch );
17962
17963                 if( major != DB_VERSION_MAJOR ||
17964                         minor < DB_VERSION_MINOR )
17965                 {
17966                         printf("Berkeley DB version mismatch\n"
17967                                 "\texpected: %s\n\tgot: %s\n",
17968                                 DB_VERSION_STRING, version);
17969                         return 1;
17970                 }
17971         }
17972 #endif
17973
17974 #if DB_VERSION_MAJOR > 2
17975         db_env_create( NULL, 0 );
17976 #elif DB_VERSION_MAJOR > 1
17977         db_appexit( NULL );
17978 #else
17979         (void) dbopen( NULL, 0, 0, 0, NULL);
17980 #endif
17981
17982 ; return 0; }
17983 EOF
17984 if { (eval echo configure:17985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17985   rm -rf conftest*
17986   ol_cv_db_none=yes
17987 else
17988   echo "configure: failed program was:" >&5
17989   cat conftest.$ac_ext >&5
17990   rm -rf conftest*
17991   ol_cv_db_none=no
17992 fi
17993 rm -f conftest*
17994
17995         LIBS="$ol_LIBS"
17996
17997 fi
17998
17999 echo "$ac_t""$ol_cv_db_none" 1>&6
18000
18001         if test $ol_cv_db_none = yes ; then
18002                 ol_cv_lib_db=yes
18003         fi
18004 fi
18005
18006 if test $ol_cv_lib_db = no ; then
18007         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18008 echo "configure:18009: checking for Berkeley DB link (-ldb42)" >&5
18009 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18010   echo $ac_n "(cached) $ac_c" 1>&6
18011 else
18012   
18013         ol_DB_LIB=-ldb42
18014         ol_LIBS=$LIBS
18015         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18016
18017         cat > conftest.$ac_ext <<EOF
18018 #line 18019 "configure"
18019 #include "confdefs.h"
18020
18021 #ifdef HAVE_DB_185_H
18022 # include <db_185.h>
18023 #else
18024 # include <db.h>
18025 #endif
18026
18027 #ifndef DB_VERSION_MAJOR
18028 # define DB_VERSION_MAJOR 1
18029 #endif
18030
18031 #ifndef NULL
18032 #define NULL ((void*)0)
18033 #endif
18034
18035 int main() {
18036
18037 #if DB_VERSION_MAJOR > 1
18038         {
18039                 char *version;
18040                 int major, minor, patch;
18041
18042                 version = db_version( &major, &minor, &patch );
18043
18044                 if( major != DB_VERSION_MAJOR ||
18045                         minor < DB_VERSION_MINOR )
18046                 {
18047                         printf("Berkeley DB version mismatch\n"
18048                                 "\texpected: %s\n\tgot: %s\n",
18049                                 DB_VERSION_STRING, version);
18050                         return 1;
18051                 }
18052         }
18053 #endif
18054
18055 #if DB_VERSION_MAJOR > 2
18056         db_env_create( NULL, 0 );
18057 #elif DB_VERSION_MAJOR > 1
18058         db_appexit( NULL );
18059 #else
18060         (void) dbopen( NULL, 0, 0, 0, NULL);
18061 #endif
18062
18063 ; return 0; }
18064 EOF
18065 if { (eval echo configure:18066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18066   rm -rf conftest*
18067   ol_cv_db_db42=yes
18068 else
18069   echo "configure: failed program was:" >&5
18070   cat conftest.$ac_ext >&5
18071   rm -rf conftest*
18072   ol_cv_db_db42=no
18073 fi
18074 rm -f conftest*
18075
18076         LIBS="$ol_LIBS"
18077
18078 fi
18079
18080 echo "$ac_t""$ol_cv_db_db42" 1>&6
18081
18082         if test $ol_cv_db_db42 = yes ; then
18083                 ol_cv_lib_db=-ldb42
18084         fi
18085 fi
18086
18087 if test $ol_cv_lib_db = no ; then
18088         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18089 echo "configure:18090: checking for Berkeley DB link (-ldb-42)" >&5
18090 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18091   echo $ac_n "(cached) $ac_c" 1>&6
18092 else
18093   
18094         ol_DB_LIB=-ldb-42
18095         ol_LIBS=$LIBS
18096         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18097
18098         cat > conftest.$ac_ext <<EOF
18099 #line 18100 "configure"
18100 #include "confdefs.h"
18101
18102 #ifdef HAVE_DB_185_H
18103 # include <db_185.h>
18104 #else
18105 # include <db.h>
18106 #endif
18107
18108 #ifndef DB_VERSION_MAJOR
18109 # define DB_VERSION_MAJOR 1
18110 #endif
18111
18112 #ifndef NULL
18113 #define NULL ((void*)0)
18114 #endif
18115
18116 int main() {
18117
18118 #if DB_VERSION_MAJOR > 1
18119         {
18120                 char *version;
18121                 int major, minor, patch;
18122
18123                 version = db_version( &major, &minor, &patch );
18124
18125                 if( major != DB_VERSION_MAJOR ||
18126                         minor < DB_VERSION_MINOR )
18127                 {
18128                         printf("Berkeley DB version mismatch\n"
18129                                 "\texpected: %s\n\tgot: %s\n",
18130                                 DB_VERSION_STRING, version);
18131                         return 1;
18132                 }
18133         }
18134 #endif
18135
18136 #if DB_VERSION_MAJOR > 2
18137         db_env_create( NULL, 0 );
18138 #elif DB_VERSION_MAJOR > 1
18139         db_appexit( NULL );
18140 #else
18141         (void) dbopen( NULL, 0, 0, 0, NULL);
18142 #endif
18143
18144 ; return 0; }
18145 EOF
18146 if { (eval echo configure:18147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18147   rm -rf conftest*
18148   ol_cv_db_db_42=yes
18149 else
18150   echo "configure: failed program was:" >&5
18151   cat conftest.$ac_ext >&5
18152   rm -rf conftest*
18153   ol_cv_db_db_42=no
18154 fi
18155 rm -f conftest*
18156
18157         LIBS="$ol_LIBS"
18158
18159 fi
18160
18161 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18162
18163         if test $ol_cv_db_db_42 = yes ; then
18164                 ol_cv_lib_db=-ldb-42
18165         fi
18166 fi
18167
18168 if test $ol_cv_lib_db = no ; then
18169         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18170 echo "configure:18171: checking for Berkeley DB link (-ldb-4.2)" >&5
18171 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18172   echo $ac_n "(cached) $ac_c" 1>&6
18173 else
18174   
18175         ol_DB_LIB=-ldb-4.2
18176         ol_LIBS=$LIBS
18177         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18178
18179         cat > conftest.$ac_ext <<EOF
18180 #line 18181 "configure"
18181 #include "confdefs.h"
18182
18183 #ifdef HAVE_DB_185_H
18184 # include <db_185.h>
18185 #else
18186 # include <db.h>
18187 #endif
18188
18189 #ifndef DB_VERSION_MAJOR
18190 # define DB_VERSION_MAJOR 1
18191 #endif
18192
18193 #ifndef NULL
18194 #define NULL ((void*)0)
18195 #endif
18196
18197 int main() {
18198
18199 #if DB_VERSION_MAJOR > 1
18200         {
18201                 char *version;
18202                 int major, minor, patch;
18203
18204                 version = db_version( &major, &minor, &patch );
18205
18206                 if( major != DB_VERSION_MAJOR ||
18207                         minor < DB_VERSION_MINOR )
18208                 {
18209                         printf("Berkeley DB version mismatch\n"
18210                                 "\texpected: %s\n\tgot: %s\n",
18211                                 DB_VERSION_STRING, version);
18212                         return 1;
18213                 }
18214         }
18215 #endif
18216
18217 #if DB_VERSION_MAJOR > 2
18218         db_env_create( NULL, 0 );
18219 #elif DB_VERSION_MAJOR > 1
18220         db_appexit( NULL );
18221 #else
18222         (void) dbopen( NULL, 0, 0, 0, NULL);
18223 #endif
18224
18225 ; return 0; }
18226 EOF
18227 if { (eval echo configure:18228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18228   rm -rf conftest*
18229   ol_cv_db_db_4_dot_2=yes
18230 else
18231   echo "configure: failed program was:" >&5
18232   cat conftest.$ac_ext >&5
18233   rm -rf conftest*
18234   ol_cv_db_db_4_dot_2=no
18235 fi
18236 rm -f conftest*
18237
18238         LIBS="$ol_LIBS"
18239
18240 fi
18241
18242 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18243
18244         if test $ol_cv_db_db_4_dot_2 = yes ; then
18245                 ol_cv_lib_db=-ldb-4.2
18246         fi
18247 fi
18248
18249 if test $ol_cv_lib_db = no ; then
18250         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18251 echo "configure:18252: checking for Berkeley DB link (-ldb-4-2)" >&5
18252 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18253   echo $ac_n "(cached) $ac_c" 1>&6
18254 else
18255   
18256         ol_DB_LIB=-ldb-4-2
18257         ol_LIBS=$LIBS
18258         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18259
18260         cat > conftest.$ac_ext <<EOF
18261 #line 18262 "configure"
18262 #include "confdefs.h"
18263
18264 #ifdef HAVE_DB_185_H
18265 # include <db_185.h>
18266 #else
18267 # include <db.h>
18268 #endif
18269
18270 #ifndef DB_VERSION_MAJOR
18271 # define DB_VERSION_MAJOR 1
18272 #endif
18273
18274 #ifndef NULL
18275 #define NULL ((void*)0)
18276 #endif
18277
18278 int main() {
18279
18280 #if DB_VERSION_MAJOR > 1
18281         {
18282                 char *version;
18283                 int major, minor, patch;
18284
18285                 version = db_version( &major, &minor, &patch );
18286
18287                 if( major != DB_VERSION_MAJOR ||
18288                         minor < DB_VERSION_MINOR )
18289                 {
18290                         printf("Berkeley DB version mismatch\n"
18291                                 "\texpected: %s\n\tgot: %s\n",
18292                                 DB_VERSION_STRING, version);
18293                         return 1;
18294                 }
18295         }
18296 #endif
18297
18298 #if DB_VERSION_MAJOR > 2
18299         db_env_create( NULL, 0 );
18300 #elif DB_VERSION_MAJOR > 1
18301         db_appexit( NULL );
18302 #else
18303         (void) dbopen( NULL, 0, 0, 0, NULL);
18304 #endif
18305
18306 ; return 0; }
18307 EOF
18308 if { (eval echo configure:18309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18309   rm -rf conftest*
18310   ol_cv_db_db_4_2=yes
18311 else
18312   echo "configure: failed program was:" >&5
18313   cat conftest.$ac_ext >&5
18314   rm -rf conftest*
18315   ol_cv_db_db_4_2=no
18316 fi
18317 rm -f conftest*
18318
18319         LIBS="$ol_LIBS"
18320
18321 fi
18322
18323 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18324
18325         if test $ol_cv_db_db_4_2 = yes ; then
18326                 ol_cv_lib_db=-ldb-4-2
18327         fi
18328 fi
18329
18330 if test $ol_cv_lib_db = no ; then
18331         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18332 echo "configure:18333: checking for Berkeley DB link (-ldb-4)" >&5
18333 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18334   echo $ac_n "(cached) $ac_c" 1>&6
18335 else
18336   
18337         ol_DB_LIB=-ldb-4
18338         ol_LIBS=$LIBS
18339         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18340
18341         cat > conftest.$ac_ext <<EOF
18342 #line 18343 "configure"
18343 #include "confdefs.h"
18344
18345 #ifdef HAVE_DB_185_H
18346 # include <db_185.h>
18347 #else
18348 # include <db.h>
18349 #endif
18350
18351 #ifndef DB_VERSION_MAJOR
18352 # define DB_VERSION_MAJOR 1
18353 #endif
18354
18355 #ifndef NULL
18356 #define NULL ((void*)0)
18357 #endif
18358
18359 int main() {
18360
18361 #if DB_VERSION_MAJOR > 1
18362         {
18363                 char *version;
18364                 int major, minor, patch;
18365
18366                 version = db_version( &major, &minor, &patch );
18367
18368                 if( major != DB_VERSION_MAJOR ||
18369                         minor < DB_VERSION_MINOR )
18370                 {
18371                         printf("Berkeley DB version mismatch\n"
18372                                 "\texpected: %s\n\tgot: %s\n",
18373                                 DB_VERSION_STRING, version);
18374                         return 1;
18375                 }
18376         }
18377 #endif
18378
18379 #if DB_VERSION_MAJOR > 2
18380         db_env_create( NULL, 0 );
18381 #elif DB_VERSION_MAJOR > 1
18382         db_appexit( NULL );
18383 #else
18384         (void) dbopen( NULL, 0, 0, 0, NULL);
18385 #endif
18386
18387 ; return 0; }
18388 EOF
18389 if { (eval echo configure:18390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18390   rm -rf conftest*
18391   ol_cv_db_db_4=yes
18392 else
18393   echo "configure: failed program was:" >&5
18394   cat conftest.$ac_ext >&5
18395   rm -rf conftest*
18396   ol_cv_db_db_4=no
18397 fi
18398 rm -f conftest*
18399
18400         LIBS="$ol_LIBS"
18401
18402 fi
18403
18404 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18405
18406         if test $ol_cv_db_db_4 = yes ; then
18407                 ol_cv_lib_db=-ldb-4
18408         fi
18409 fi
18410
18411 if test $ol_cv_lib_db = no ; then
18412         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18413 echo "configure:18414: checking for Berkeley DB link (-ldb4)" >&5
18414 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18415   echo $ac_n "(cached) $ac_c" 1>&6
18416 else
18417   
18418         ol_DB_LIB=-ldb4
18419         ol_LIBS=$LIBS
18420         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18421
18422         cat > conftest.$ac_ext <<EOF
18423 #line 18424 "configure"
18424 #include "confdefs.h"
18425
18426 #ifdef HAVE_DB_185_H
18427 # include <db_185.h>
18428 #else
18429 # include <db.h>
18430 #endif
18431
18432 #ifndef DB_VERSION_MAJOR
18433 # define DB_VERSION_MAJOR 1
18434 #endif
18435
18436 #ifndef NULL
18437 #define NULL ((void*)0)
18438 #endif
18439
18440 int main() {
18441
18442 #if DB_VERSION_MAJOR > 1
18443         {
18444                 char *version;
18445                 int major, minor, patch;
18446
18447                 version = db_version( &major, &minor, &patch );
18448
18449                 if( major != DB_VERSION_MAJOR ||
18450                         minor < DB_VERSION_MINOR )
18451                 {
18452                         printf("Berkeley DB version mismatch\n"
18453                                 "\texpected: %s\n\tgot: %s\n",
18454                                 DB_VERSION_STRING, version);
18455                         return 1;
18456                 }
18457         }
18458 #endif
18459
18460 #if DB_VERSION_MAJOR > 2
18461         db_env_create( NULL, 0 );
18462 #elif DB_VERSION_MAJOR > 1
18463         db_appexit( NULL );
18464 #else
18465         (void) dbopen( NULL, 0, 0, 0, NULL);
18466 #endif
18467
18468 ; return 0; }
18469 EOF
18470 if { (eval echo configure:18471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18471   rm -rf conftest*
18472   ol_cv_db_db4=yes
18473 else
18474   echo "configure: failed program was:" >&5
18475   cat conftest.$ac_ext >&5
18476   rm -rf conftest*
18477   ol_cv_db_db4=no
18478 fi
18479 rm -f conftest*
18480
18481         LIBS="$ol_LIBS"
18482
18483 fi
18484
18485 echo "$ac_t""$ol_cv_db_db4" 1>&6
18486
18487         if test $ol_cv_db_db4 = yes ; then
18488                 ol_cv_lib_db=-ldb4
18489         fi
18490 fi
18491
18492 if test $ol_cv_lib_db = no ; then
18493         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18494 echo "configure:18495: checking for Berkeley DB link (-ldb)" >&5
18495 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18496   echo $ac_n "(cached) $ac_c" 1>&6
18497 else
18498   
18499         ol_DB_LIB=-ldb
18500         ol_LIBS=$LIBS
18501         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18502
18503         cat > conftest.$ac_ext <<EOF
18504 #line 18505 "configure"
18505 #include "confdefs.h"
18506
18507 #ifdef HAVE_DB_185_H
18508 # include <db_185.h>
18509 #else
18510 # include <db.h>
18511 #endif
18512
18513 #ifndef DB_VERSION_MAJOR
18514 # define DB_VERSION_MAJOR 1
18515 #endif
18516
18517 #ifndef NULL
18518 #define NULL ((void*)0)
18519 #endif
18520
18521 int main() {
18522
18523 #if DB_VERSION_MAJOR > 1
18524         {
18525                 char *version;
18526                 int major, minor, patch;
18527
18528                 version = db_version( &major, &minor, &patch );
18529
18530                 if( major != DB_VERSION_MAJOR ||
18531                         minor < DB_VERSION_MINOR )
18532                 {
18533                         printf("Berkeley DB version mismatch\n"
18534                                 "\texpected: %s\n\tgot: %s\n",
18535                                 DB_VERSION_STRING, version);
18536                         return 1;
18537                 }
18538         }
18539 #endif
18540
18541 #if DB_VERSION_MAJOR > 2
18542         db_env_create( NULL, 0 );
18543 #elif DB_VERSION_MAJOR > 1
18544         db_appexit( NULL );
18545 #else
18546         (void) dbopen( NULL, 0, 0, 0, NULL);
18547 #endif
18548
18549 ; return 0; }
18550 EOF
18551 if { (eval echo configure:18552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18552   rm -rf conftest*
18553   ol_cv_db_db=yes
18554 else
18555   echo "configure: failed program was:" >&5
18556   cat conftest.$ac_ext >&5
18557   rm -rf conftest*
18558   ol_cv_db_db=no
18559 fi
18560 rm -f conftest*
18561
18562         LIBS="$ol_LIBS"
18563
18564 fi
18565
18566 echo "$ac_t""$ol_cv_db_db" 1>&6
18567
18568         if test $ol_cv_db_db = yes ; then
18569                 ol_cv_lib_db=-ldb
18570         fi
18571 fi
18572
18573 if test $ol_cv_lib_db = no ; then
18574         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18575 echo "configure:18576: checking for Berkeley DB link (-ldb41)" >&5
18576 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18577   echo $ac_n "(cached) $ac_c" 1>&6
18578 else
18579   
18580         ol_DB_LIB=-ldb41
18581         ol_LIBS=$LIBS
18582         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18583
18584         cat > conftest.$ac_ext <<EOF
18585 #line 18586 "configure"
18586 #include "confdefs.h"
18587
18588 #ifdef HAVE_DB_185_H
18589 # include <db_185.h>
18590 #else
18591 # include <db.h>
18592 #endif
18593
18594 #ifndef DB_VERSION_MAJOR
18595 # define DB_VERSION_MAJOR 1
18596 #endif
18597
18598 #ifndef NULL
18599 #define NULL ((void*)0)
18600 #endif
18601
18602 int main() {
18603
18604 #if DB_VERSION_MAJOR > 1
18605         {
18606                 char *version;
18607                 int major, minor, patch;
18608
18609                 version = db_version( &major, &minor, &patch );
18610
18611                 if( major != DB_VERSION_MAJOR ||
18612                         minor < DB_VERSION_MINOR )
18613                 {
18614                         printf("Berkeley DB version mismatch\n"
18615                                 "\texpected: %s\n\tgot: %s\n",
18616                                 DB_VERSION_STRING, version);
18617                         return 1;
18618                 }
18619         }
18620 #endif
18621
18622 #if DB_VERSION_MAJOR > 2
18623         db_env_create( NULL, 0 );
18624 #elif DB_VERSION_MAJOR > 1
18625         db_appexit( NULL );
18626 #else
18627         (void) dbopen( NULL, 0, 0, 0, NULL);
18628 #endif
18629
18630 ; return 0; }
18631 EOF
18632 if { (eval echo configure:18633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18633   rm -rf conftest*
18634   ol_cv_db_db41=yes
18635 else
18636   echo "configure: failed program was:" >&5
18637   cat conftest.$ac_ext >&5
18638   rm -rf conftest*
18639   ol_cv_db_db41=no
18640 fi
18641 rm -f conftest*
18642
18643         LIBS="$ol_LIBS"
18644
18645 fi
18646
18647 echo "$ac_t""$ol_cv_db_db41" 1>&6
18648
18649         if test $ol_cv_db_db41 = yes ; then
18650                 ol_cv_lib_db=-ldb41
18651         fi
18652 fi
18653
18654 if test $ol_cv_lib_db = no ; then
18655         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18656 echo "configure:18657: checking for Berkeley DB link (-ldb-41)" >&5
18657 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18658   echo $ac_n "(cached) $ac_c" 1>&6
18659 else
18660   
18661         ol_DB_LIB=-ldb-41
18662         ol_LIBS=$LIBS
18663         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18664
18665         cat > conftest.$ac_ext <<EOF
18666 #line 18667 "configure"
18667 #include "confdefs.h"
18668
18669 #ifdef HAVE_DB_185_H
18670 # include <db_185.h>
18671 #else
18672 # include <db.h>
18673 #endif
18674
18675 #ifndef DB_VERSION_MAJOR
18676 # define DB_VERSION_MAJOR 1
18677 #endif
18678
18679 #ifndef NULL
18680 #define NULL ((void*)0)
18681 #endif
18682
18683 int main() {
18684
18685 #if DB_VERSION_MAJOR > 1
18686         {
18687                 char *version;
18688                 int major, minor, patch;
18689
18690                 version = db_version( &major, &minor, &patch );
18691
18692                 if( major != DB_VERSION_MAJOR ||
18693                         minor < DB_VERSION_MINOR )
18694                 {
18695                         printf("Berkeley DB version mismatch\n"
18696                                 "\texpected: %s\n\tgot: %s\n",
18697                                 DB_VERSION_STRING, version);
18698                         return 1;
18699                 }
18700         }
18701 #endif
18702
18703 #if DB_VERSION_MAJOR > 2
18704         db_env_create( NULL, 0 );
18705 #elif DB_VERSION_MAJOR > 1
18706         db_appexit( NULL );
18707 #else
18708         (void) dbopen( NULL, 0, 0, 0, NULL);
18709 #endif
18710
18711 ; return 0; }
18712 EOF
18713 if { (eval echo configure:18714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18714   rm -rf conftest*
18715   ol_cv_db_db_41=yes
18716 else
18717   echo "configure: failed program was:" >&5
18718   cat conftest.$ac_ext >&5
18719   rm -rf conftest*
18720   ol_cv_db_db_41=no
18721 fi
18722 rm -f conftest*
18723
18724         LIBS="$ol_LIBS"
18725
18726 fi
18727
18728 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18729
18730         if test $ol_cv_db_db_41 = yes ; then
18731                 ol_cv_lib_db=-ldb-41
18732         fi
18733 fi
18734
18735 if test $ol_cv_lib_db = no ; then
18736         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18737 echo "configure:18738: checking for Berkeley DB link (-ldb-4.1)" >&5
18738 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18739   echo $ac_n "(cached) $ac_c" 1>&6
18740 else
18741   
18742         ol_DB_LIB=-ldb-4.1
18743         ol_LIBS=$LIBS
18744         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18745
18746         cat > conftest.$ac_ext <<EOF
18747 #line 18748 "configure"
18748 #include "confdefs.h"
18749
18750 #ifdef HAVE_DB_185_H
18751 # include <db_185.h>
18752 #else
18753 # include <db.h>
18754 #endif
18755
18756 #ifndef DB_VERSION_MAJOR
18757 # define DB_VERSION_MAJOR 1
18758 #endif
18759
18760 #ifndef NULL
18761 #define NULL ((void*)0)
18762 #endif
18763
18764 int main() {
18765
18766 #if DB_VERSION_MAJOR > 1
18767         {
18768                 char *version;
18769                 int major, minor, patch;
18770
18771                 version = db_version( &major, &minor, &patch );
18772
18773                 if( major != DB_VERSION_MAJOR ||
18774                         minor < DB_VERSION_MINOR )
18775                 {
18776                         printf("Berkeley DB version mismatch\n"
18777                                 "\texpected: %s\n\tgot: %s\n",
18778                                 DB_VERSION_STRING, version);
18779                         return 1;
18780                 }
18781         }
18782 #endif
18783
18784 #if DB_VERSION_MAJOR > 2
18785         db_env_create( NULL, 0 );
18786 #elif DB_VERSION_MAJOR > 1
18787         db_appexit( NULL );
18788 #else
18789         (void) dbopen( NULL, 0, 0, 0, NULL);
18790 #endif
18791
18792 ; return 0; }
18793 EOF
18794 if { (eval echo configure:18795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18795   rm -rf conftest*
18796   ol_cv_db_db_4_dot_1=yes
18797 else
18798   echo "configure: failed program was:" >&5
18799   cat conftest.$ac_ext >&5
18800   rm -rf conftest*
18801   ol_cv_db_db_4_dot_1=no
18802 fi
18803 rm -f conftest*
18804
18805         LIBS="$ol_LIBS"
18806
18807 fi
18808
18809 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
18810
18811         if test $ol_cv_db_db_4_dot_1 = yes ; then
18812                 ol_cv_lib_db=-ldb-4.1
18813         fi
18814 fi
18815
18816 if test $ol_cv_lib_db = no ; then
18817         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
18818 echo "configure:18819: checking for Berkeley DB link (-ldb-4-1)" >&5
18819 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
18820   echo $ac_n "(cached) $ac_c" 1>&6
18821 else
18822   
18823         ol_DB_LIB=-ldb-4-1
18824         ol_LIBS=$LIBS
18825         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18826
18827         cat > conftest.$ac_ext <<EOF
18828 #line 18829 "configure"
18829 #include "confdefs.h"
18830
18831 #ifdef HAVE_DB_185_H
18832 # include <db_185.h>
18833 #else
18834 # include <db.h>
18835 #endif
18836
18837 #ifndef DB_VERSION_MAJOR
18838 # define DB_VERSION_MAJOR 1
18839 #endif
18840
18841 #ifndef NULL
18842 #define NULL ((void*)0)
18843 #endif
18844
18845 int main() {
18846
18847 #if DB_VERSION_MAJOR > 1
18848         {
18849                 char *version;
18850                 int major, minor, patch;
18851
18852                 version = db_version( &major, &minor, &patch );
18853
18854                 if( major != DB_VERSION_MAJOR ||
18855                         minor < DB_VERSION_MINOR )
18856                 {
18857                         printf("Berkeley DB version mismatch\n"
18858                                 "\texpected: %s\n\tgot: %s\n",
18859                                 DB_VERSION_STRING, version);
18860                         return 1;
18861                 }
18862         }
18863 #endif
18864
18865 #if DB_VERSION_MAJOR > 2
18866         db_env_create( NULL, 0 );
18867 #elif DB_VERSION_MAJOR > 1
18868         db_appexit( NULL );
18869 #else
18870         (void) dbopen( NULL, 0, 0, 0, NULL);
18871 #endif
18872
18873 ; return 0; }
18874 EOF
18875 if { (eval echo configure:18876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18876   rm -rf conftest*
18877   ol_cv_db_db_4_1=yes
18878 else
18879   echo "configure: failed program was:" >&5
18880   cat conftest.$ac_ext >&5
18881   rm -rf conftest*
18882   ol_cv_db_db_4_1=no
18883 fi
18884 rm -f conftest*
18885
18886         LIBS="$ol_LIBS"
18887
18888 fi
18889
18890 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
18891
18892         if test $ol_cv_db_db_4_1 = yes ; then
18893                 ol_cv_lib_db=-ldb-4-1
18894         fi
18895 fi
18896
18897 if test $ol_cv_lib_db = no ; then
18898         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18899 echo "configure:18900: checking for Berkeley DB link (-ldb3)" >&5
18900 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18901   echo $ac_n "(cached) $ac_c" 1>&6
18902 else
18903   
18904         ol_DB_LIB=-ldb3
18905         ol_LIBS=$LIBS
18906         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18907
18908         cat > conftest.$ac_ext <<EOF
18909 #line 18910 "configure"
18910 #include "confdefs.h"
18911
18912 #ifdef HAVE_DB_185_H
18913 # include <db_185.h>
18914 #else
18915 # include <db.h>
18916 #endif
18917
18918 #ifndef DB_VERSION_MAJOR
18919 # define DB_VERSION_MAJOR 1
18920 #endif
18921
18922 #ifndef NULL
18923 #define NULL ((void*)0)
18924 #endif
18925
18926 int main() {
18927
18928 #if DB_VERSION_MAJOR > 1
18929         {
18930                 char *version;
18931                 int major, minor, patch;
18932
18933                 version = db_version( &major, &minor, &patch );
18934
18935                 if( major != DB_VERSION_MAJOR ||
18936                         minor < DB_VERSION_MINOR )
18937                 {
18938                         printf("Berkeley DB version mismatch\n"
18939                                 "\texpected: %s\n\tgot: %s\n",
18940                                 DB_VERSION_STRING, version);
18941                         return 1;
18942                 }
18943         }
18944 #endif
18945
18946 #if DB_VERSION_MAJOR > 2
18947         db_env_create( NULL, 0 );
18948 #elif DB_VERSION_MAJOR > 1
18949         db_appexit( NULL );
18950 #else
18951         (void) dbopen( NULL, 0, 0, 0, NULL);
18952 #endif
18953
18954 ; return 0; }
18955 EOF
18956 if { (eval echo configure:18957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18957   rm -rf conftest*
18958   ol_cv_db_db3=yes
18959 else
18960   echo "configure: failed program was:" >&5
18961   cat conftest.$ac_ext >&5
18962   rm -rf conftest*
18963   ol_cv_db_db3=no
18964 fi
18965 rm -f conftest*
18966
18967         LIBS="$ol_LIBS"
18968
18969 fi
18970
18971 echo "$ac_t""$ol_cv_db_db3" 1>&6
18972
18973         if test $ol_cv_db_db3 = yes ; then
18974                 ol_cv_lib_db=-ldb3
18975         fi
18976 fi
18977
18978 if test $ol_cv_lib_db = no ; then
18979         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18980 echo "configure:18981: checking for Berkeley DB link (-ldb-3)" >&5
18981 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18982   echo $ac_n "(cached) $ac_c" 1>&6
18983 else
18984   
18985         ol_DB_LIB=-ldb-3
18986         ol_LIBS=$LIBS
18987         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18988
18989         cat > conftest.$ac_ext <<EOF
18990 #line 18991 "configure"
18991 #include "confdefs.h"
18992
18993 #ifdef HAVE_DB_185_H
18994 # include <db_185.h>
18995 #else
18996 # include <db.h>
18997 #endif
18998
18999 #ifndef DB_VERSION_MAJOR
19000 # define DB_VERSION_MAJOR 1
19001 #endif
19002
19003 #ifndef NULL
19004 #define NULL ((void*)0)
19005 #endif
19006
19007 int main() {
19008
19009 #if DB_VERSION_MAJOR > 1
19010         {
19011                 char *version;
19012                 int major, minor, patch;
19013
19014                 version = db_version( &major, &minor, &patch );
19015
19016                 if( major != DB_VERSION_MAJOR ||
19017                         minor < DB_VERSION_MINOR )
19018                 {
19019                         printf("Berkeley DB version mismatch\n"
19020                                 "\texpected: %s\n\tgot: %s\n",
19021                                 DB_VERSION_STRING, version);
19022                         return 1;
19023                 }
19024         }
19025 #endif
19026
19027 #if DB_VERSION_MAJOR > 2
19028         db_env_create( NULL, 0 );
19029 #elif DB_VERSION_MAJOR > 1
19030         db_appexit( NULL );
19031 #else
19032         (void) dbopen( NULL, 0, 0, 0, NULL);
19033 #endif
19034
19035 ; return 0; }
19036 EOF
19037 if { (eval echo configure:19038: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19038   rm -rf conftest*
19039   ol_cv_db_db_3=yes
19040 else
19041   echo "configure: failed program was:" >&5
19042   cat conftest.$ac_ext >&5
19043   rm -rf conftest*
19044   ol_cv_db_db_3=no
19045 fi
19046 rm -f conftest*
19047
19048         LIBS="$ol_LIBS"
19049
19050 fi
19051
19052 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19053
19054         if test $ol_cv_db_db_3 = yes ; then
19055                 ol_cv_lib_db=-ldb-3
19056         fi
19057 fi
19058
19059 if test $ol_cv_lib_db = no ; then
19060         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19061 echo "configure:19062: checking for Berkeley DB link (-ldb2)" >&5
19062 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19063   echo $ac_n "(cached) $ac_c" 1>&6
19064 else
19065   
19066         ol_DB_LIB=-ldb2
19067         ol_LIBS=$LIBS
19068         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19069
19070         cat > conftest.$ac_ext <<EOF
19071 #line 19072 "configure"
19072 #include "confdefs.h"
19073
19074 #ifdef HAVE_DB_185_H
19075 # include <db_185.h>
19076 #else
19077 # include <db.h>
19078 #endif
19079
19080 #ifndef DB_VERSION_MAJOR
19081 # define DB_VERSION_MAJOR 1
19082 #endif
19083
19084 #ifndef NULL
19085 #define NULL ((void*)0)
19086 #endif
19087
19088 int main() {
19089
19090 #if DB_VERSION_MAJOR > 1
19091         {
19092                 char *version;
19093                 int major, minor, patch;
19094
19095                 version = db_version( &major, &minor, &patch );
19096
19097                 if( major != DB_VERSION_MAJOR ||
19098                         minor < DB_VERSION_MINOR )
19099                 {
19100                         printf("Berkeley DB version mismatch\n"
19101                                 "\texpected: %s\n\tgot: %s\n",
19102                                 DB_VERSION_STRING, version);
19103                         return 1;
19104                 }
19105         }
19106 #endif
19107
19108 #if DB_VERSION_MAJOR > 2
19109         db_env_create( NULL, 0 );
19110 #elif DB_VERSION_MAJOR > 1
19111         db_appexit( NULL );
19112 #else
19113         (void) dbopen( NULL, 0, 0, 0, NULL);
19114 #endif
19115
19116 ; return 0; }
19117 EOF
19118 if { (eval echo configure:19119: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19119   rm -rf conftest*
19120   ol_cv_db_db2=yes
19121 else
19122   echo "configure: failed program was:" >&5
19123   cat conftest.$ac_ext >&5
19124   rm -rf conftest*
19125   ol_cv_db_db2=no
19126 fi
19127 rm -f conftest*
19128
19129         LIBS="$ol_LIBS"
19130
19131 fi
19132
19133 echo "$ac_t""$ol_cv_db_db2" 1>&6
19134
19135         if test $ol_cv_db_db2 = yes ; then
19136                 ol_cv_lib_db=-ldb2
19137         fi
19138 fi
19139
19140 if test $ol_cv_lib_db = no ; then
19141         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19142 echo "configure:19143: checking for Berkeley DB link (-ldb-2)" >&5
19143 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19144   echo $ac_n "(cached) $ac_c" 1>&6
19145 else
19146   
19147         ol_DB_LIB=-ldb-2
19148         ol_LIBS=$LIBS
19149         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19150
19151         cat > conftest.$ac_ext <<EOF
19152 #line 19153 "configure"
19153 #include "confdefs.h"
19154
19155 #ifdef HAVE_DB_185_H
19156 # include <db_185.h>
19157 #else
19158 # include <db.h>
19159 #endif
19160
19161 #ifndef DB_VERSION_MAJOR
19162 # define DB_VERSION_MAJOR 1
19163 #endif
19164
19165 #ifndef NULL
19166 #define NULL ((void*)0)
19167 #endif
19168
19169 int main() {
19170
19171 #if DB_VERSION_MAJOR > 1
19172         {
19173                 char *version;
19174                 int major, minor, patch;
19175
19176                 version = db_version( &major, &minor, &patch );
19177
19178                 if( major != DB_VERSION_MAJOR ||
19179                         minor < DB_VERSION_MINOR )
19180                 {
19181                         printf("Berkeley DB version mismatch\n"
19182                                 "\texpected: %s\n\tgot: %s\n",
19183                                 DB_VERSION_STRING, version);
19184                         return 1;
19185                 }
19186         }
19187 #endif
19188
19189 #if DB_VERSION_MAJOR > 2
19190         db_env_create( NULL, 0 );
19191 #elif DB_VERSION_MAJOR > 1
19192         db_appexit( NULL );
19193 #else
19194         (void) dbopen( NULL, 0, 0, 0, NULL);
19195 #endif
19196
19197 ; return 0; }
19198 EOF
19199 if { (eval echo configure:19200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19200   rm -rf conftest*
19201   ol_cv_db_db_2=yes
19202 else
19203   echo "configure: failed program was:" >&5
19204   cat conftest.$ac_ext >&5
19205   rm -rf conftest*
19206   ol_cv_db_db_2=no
19207 fi
19208 rm -f conftest*
19209
19210         LIBS="$ol_LIBS"
19211
19212 fi
19213
19214 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19215
19216         if test $ol_cv_db_db_2 = yes ; then
19217                 ol_cv_lib_db=-ldb-2
19218         fi
19219 fi
19220
19221 if test $ol_cv_lib_db = no ; then
19222         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19223 echo "configure:19224: checking for Berkeley DB link (-ldb1)" >&5
19224 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19225   echo $ac_n "(cached) $ac_c" 1>&6
19226 else
19227   
19228         ol_DB_LIB=-ldb1
19229         ol_LIBS=$LIBS
19230         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19231
19232         cat > conftest.$ac_ext <<EOF
19233 #line 19234 "configure"
19234 #include "confdefs.h"
19235
19236 #ifdef HAVE_DB_185_H
19237 # include <db_185.h>
19238 #else
19239 # include <db.h>
19240 #endif
19241
19242 #ifndef DB_VERSION_MAJOR
19243 # define DB_VERSION_MAJOR 1
19244 #endif
19245
19246 #ifndef NULL
19247 #define NULL ((void*)0)
19248 #endif
19249
19250 int main() {
19251
19252 #if DB_VERSION_MAJOR > 1
19253         {
19254                 char *version;
19255                 int major, minor, patch;
19256
19257                 version = db_version( &major, &minor, &patch );
19258
19259                 if( major != DB_VERSION_MAJOR ||
19260                         minor < DB_VERSION_MINOR )
19261                 {
19262                         printf("Berkeley DB version mismatch\n"
19263                                 "\texpected: %s\n\tgot: %s\n",
19264                                 DB_VERSION_STRING, version);
19265                         return 1;
19266                 }
19267         }
19268 #endif
19269
19270 #if DB_VERSION_MAJOR > 2
19271         db_env_create( NULL, 0 );
19272 #elif DB_VERSION_MAJOR > 1
19273         db_appexit( NULL );
19274 #else
19275         (void) dbopen( NULL, 0, 0, 0, NULL);
19276 #endif
19277
19278 ; return 0; }
19279 EOF
19280 if { (eval echo configure:19281: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19281   rm -rf conftest*
19282   ol_cv_db_db1=yes
19283 else
19284   echo "configure: failed program was:" >&5
19285   cat conftest.$ac_ext >&5
19286   rm -rf conftest*
19287   ol_cv_db_db1=no
19288 fi
19289 rm -f conftest*
19290
19291         LIBS="$ol_LIBS"
19292
19293 fi
19294
19295 echo "$ac_t""$ol_cv_db_db1" 1>&6
19296
19297         if test $ol_cv_db_db1 = yes ; then
19298                 ol_cv_lib_db=-ldb1
19299         fi
19300 fi
19301
19302 if test $ol_cv_lib_db = no ; then
19303         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19304 echo "configure:19305: checking for Berkeley DB link (-ldb-1)" >&5
19305 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19306   echo $ac_n "(cached) $ac_c" 1>&6
19307 else
19308   
19309         ol_DB_LIB=-ldb-1
19310         ol_LIBS=$LIBS
19311         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19312
19313         cat > conftest.$ac_ext <<EOF
19314 #line 19315 "configure"
19315 #include "confdefs.h"
19316
19317 #ifdef HAVE_DB_185_H
19318 # include <db_185.h>
19319 #else
19320 # include <db.h>
19321 #endif
19322
19323 #ifndef DB_VERSION_MAJOR
19324 # define DB_VERSION_MAJOR 1
19325 #endif
19326
19327 #ifndef NULL
19328 #define NULL ((void*)0)
19329 #endif
19330
19331 int main() {
19332
19333 #if DB_VERSION_MAJOR > 1
19334         {
19335                 char *version;
19336                 int major, minor, patch;
19337
19338                 version = db_version( &major, &minor, &patch );
19339
19340                 if( major != DB_VERSION_MAJOR ||
19341                         minor < DB_VERSION_MINOR )
19342                 {
19343                         printf("Berkeley DB version mismatch\n"
19344                                 "\texpected: %s\n\tgot: %s\n",
19345                                 DB_VERSION_STRING, version);
19346                         return 1;
19347                 }
19348         }
19349 #endif
19350
19351 #if DB_VERSION_MAJOR > 2
19352         db_env_create( NULL, 0 );
19353 #elif DB_VERSION_MAJOR > 1
19354         db_appexit( NULL );
19355 #else
19356         (void) dbopen( NULL, 0, 0, 0, NULL);
19357 #endif
19358
19359 ; return 0; }
19360 EOF
19361 if { (eval echo configure:19362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19362   rm -rf conftest*
19363   ol_cv_db_db_1=yes
19364 else
19365   echo "configure: failed program was:" >&5
19366   cat conftest.$ac_ext >&5
19367   rm -rf conftest*
19368   ol_cv_db_db_1=no
19369 fi
19370 rm -f conftest*
19371
19372         LIBS="$ol_LIBS"
19373
19374 fi
19375
19376 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19377
19378         if test $ol_cv_db_db_1 = yes ; then
19379                 ol_cv_lib_db=-ldb-1
19380         fi
19381 fi
19382
19383
19384         if test "$ol_cv_lib_db" != no ; then
19385                 ol_cv_berkeley_db=yes
19386                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19387 echo "configure:19388: checking for Berkeley DB thread support" >&5
19388 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19389   echo $ac_n "(cached) $ac_c" 1>&6
19390 else
19391   
19392         ol_LIBS="$LIBS"
19393         LIBS="$LTHREAD_LIBS $LIBS"
19394         if test $ol_cv_lib_db != yes ; then
19395                 LIBS="$ol_cv_lib_db $LIBS"
19396         fi
19397
19398         if test "$cross_compiling" = yes; then
19399   ol_cv_berkeley_db_thread=cross
19400 else
19401   cat > conftest.$ac_ext <<EOF
19402 #line 19403 "configure"
19403 #include "confdefs.h"
19404
19405 #ifdef HAVE_DB_185_H
19406         choke me;
19407 #else
19408 #include <db.h>
19409 #endif
19410 #ifndef NULL
19411 #define NULL ((void *)0)
19412 #endif
19413 main()
19414 {
19415         int rc;
19416         u_int32_t flags = DB_CREATE |
19417 #ifdef DB_PRIVATE
19418                 DB_PRIVATE |
19419 #endif
19420                 DB_THREAD;
19421
19422 #if DB_VERSION_MAJOR > 2
19423         DB_ENV *env = NULL;
19424
19425         rc = db_env_create( &env, 0 );
19426
19427         flags |= DB_INIT_MPOOL;
19428 #ifdef DB_MPOOL_PRIVATE
19429         flags |= DB_MPOOL_PRIVATE;
19430 #endif
19431
19432         if( rc ) {
19433                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19434                 return rc;
19435         }
19436
19437 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19438         rc = env->open( env, NULL, flags, 0 );
19439 #else
19440         rc = env->open( env, NULL, NULL, flags, 0 );
19441 #endif
19442
19443         if ( rc == 0 ) {
19444                 rc = env->close( env, 0 );
19445         }
19446
19447         if( rc ) {
19448                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19449                 return rc;
19450         }
19451
19452 #else
19453         DB_ENV env;
19454         memset( &env, '\0', sizeof(env) );
19455
19456         rc = db_appinit( NULL, NULL, &env, flags );
19457
19458         if( rc == 0 ) {
19459                 db_appexit( &env );
19460         }
19461
19462         unlink("__db_mpool.share");
19463         unlink("__db_lock.share");
19464 #endif
19465
19466         return rc;
19467 }
19468 EOF
19469 if { (eval echo configure:19470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19470 then
19471   ol_cv_berkeley_db_thread=yes
19472 else
19473   echo "configure: failed program was:" >&5
19474   cat conftest.$ac_ext >&5
19475   rm -fr conftest*
19476   ol_cv_berkeley_db_thread=no
19477 fi
19478 rm -fr conftest*
19479 fi
19480
19481
19482         LIBS="$ol_LIBS"
19483
19484 fi
19485
19486 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19487
19488         if test $ol_cv_berkeley_db_thread != no ; then
19489                 cat >> confdefs.h <<\EOF
19490 #define HAVE_BERKELEY_DB_THREAD 1
19491 EOF
19492
19493         fi
19494
19495         fi
19496 fi
19497
19498         fi
19499
19500         if test $ol_cv_berkeley_db != no ; then
19501                 cat >> confdefs.h <<\EOF
19502 #define HAVE_BERKELEY_DB 1
19503 EOF
19504
19505
19506                 ol_link_ldbm=berkeley
19507                 ol_with_ldbm_api=berkeley
19508
19509                 if test $ol_with_ldbm_type = hash ; then
19510                         cat >> confdefs.h <<\EOF
19511 #define LDBM_USE_DBHASH 1
19512 EOF
19513
19514                 else
19515                         cat >> confdefs.h <<\EOF
19516 #define LDBM_USE_DBBTREE 1
19517 EOF
19518
19519                 fi
19520
19521                                                 if test $ol_cv_lib_db != yes ; then
19522                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19523                 fi
19524         fi
19525 fi
19526
19527 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19528         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19529 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19530         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19531 echo "configure:19532: checking Berkeley DB version for BDB backend" >&5
19532 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19533   echo $ac_n "(cached) $ac_c" 1>&6
19534 else
19535   
19536         cat > conftest.$ac_ext <<EOF
19537 #line 19538 "configure"
19538 #include "confdefs.h"
19539
19540 #include <db.h>
19541
19542  /* this check could be improved */
19543 #ifndef DB_VERSION_MAJOR
19544 #       define DB_VERSION_MAJOR 1
19545 #endif
19546 #ifndef DB_VERSION_MINOR
19547 #       define DB_VERSION_MINOR 0
19548 #endif
19549
19550 /* require 4.2 or later */
19551 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19552         __db_version_compat
19553 #endif
19554         
19555 EOF
19556 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19557   egrep "__db_version_compat" >/dev/null 2>&1; then
19558   rm -rf conftest*
19559   ol_cv_bdb_compat=yes
19560 else
19561   rm -rf conftest*
19562   ol_cv_bdb_compat=no
19563 fi
19564 rm -f conftest*
19565
19566 fi
19567
19568 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19569
19570
19571         if test $ol_cv_bdb_compat = yes ; then
19572                 ol_enable_bdb=yes
19573         elif test $ol_enable_bdb = yes ; then
19574                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19575         else
19576                 ol_enable_bdb=no
19577         fi
19578 fi
19579 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19580         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19581 fi
19582
19583 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19584         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19585         ol_with_ldbm_api=none
19586 fi
19587
19588 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19589         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19590 echo "configure:19591: checking for MDBM library" >&5
19591 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19592   echo $ac_n "(cached) $ac_c" 1>&6
19593 else
19594         ol_LIBS="$LIBS"
19595         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19596 echo "configure:19597: checking for mdbm_set_chain" >&5
19597 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19598   echo $ac_n "(cached) $ac_c" 1>&6
19599 else
19600   cat > conftest.$ac_ext <<EOF
19601 #line 19602 "configure"
19602 #include "confdefs.h"
19603 /* System header to define __stub macros and hopefully few prototypes,
19604     which can conflict with char mdbm_set_chain(); below.  */
19605 #include <assert.h>
19606 /* Override any gcc2 internal prototype to avoid an error.  */
19607 /* We use char because int might match the return type of a gcc2
19608     builtin and then its argument prototype would still apply.  */
19609 char mdbm_set_chain();
19610 char (*f)();
19611
19612 int main() {
19613
19614 /* The GNU C library defines this for functions which it implements
19615     to always fail with ENOSYS.  Some functions are actually named
19616     something starting with __ and the normal name is an alias.  */
19617 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
19618 choke me
19619 #else
19620 f = mdbm_set_chain;
19621 #endif
19622
19623 ; return 0; }
19624 EOF
19625 if { (eval echo configure:19626: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19626   rm -rf conftest*
19627   eval "ac_cv_func_mdbm_set_chain=yes"
19628 else
19629   echo "configure: failed program was:" >&5
19630   cat conftest.$ac_ext >&5
19631   rm -rf conftest*
19632   eval "ac_cv_func_mdbm_set_chain=no"
19633 fi
19634 rm -f conftest*
19635 fi
19636
19637 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
19638   echo "$ac_t""yes" 1>&6
19639   ol_cv_lib_mdbm=yes
19640 else
19641   echo "$ac_t""no" 1>&6
19642
19643                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
19644 echo "configure:19645: checking for mdbm_set_chain in -lmdbm" >&5
19645 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
19646 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19647   echo $ac_n "(cached) $ac_c" 1>&6
19648 else
19649   ac_save_LIBS="$LIBS"
19650 LIBS="-lmdbm  $LIBS"
19651 cat > conftest.$ac_ext <<EOF
19652 #line 19653 "configure"
19653 #include "confdefs.h"
19654 /* Override any gcc2 internal prototype to avoid an error.  */
19655 /* We use char because int might match the return type of a gcc2
19656     builtin and then its argument prototype would still apply.  */
19657 char mdbm_set_chain();
19658
19659 int main() {
19660 mdbm_set_chain()
19661 ; return 0; }
19662 EOF
19663 if { (eval echo configure:19664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19664   rm -rf conftest*
19665   eval "ac_cv_lib_$ac_lib_var=yes"
19666 else
19667   echo "configure: failed program was:" >&5
19668   cat conftest.$ac_ext >&5
19669   rm -rf conftest*
19670   eval "ac_cv_lib_$ac_lib_var=no"
19671 fi
19672 rm -f conftest*
19673 LIBS="$ac_save_LIBS"
19674
19675 fi
19676 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19677   echo "$ac_t""yes" 1>&6
19678   ol_cv_lib_mdbm=-lmdbm
19679 else
19680   echo "$ac_t""no" 1>&6
19681 ol_cv_lib_mdbm=no
19682 fi
19683
19684         
19685 fi
19686
19687         LIBS="$ol_LIBS"
19688
19689 fi
19690
19691 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19692
19693
19694  for ac_hdr in mdbm.h
19695 do
19696 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19697 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19698 echo "configure:19699: checking for $ac_hdr" >&5
19699 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19700   echo $ac_n "(cached) $ac_c" 1>&6
19701 else
19702   cat > conftest.$ac_ext <<EOF
19703 #line 19704 "configure"
19704 #include "confdefs.h"
19705 #include <$ac_hdr>
19706 EOF
19707 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19708 { (eval echo configure:19709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19709 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19710 if test -z "$ac_err"; then
19711   rm -rf conftest*
19712   eval "ac_cv_header_$ac_safe=yes"
19713 else
19714   echo "$ac_err" >&5
19715   echo "configure: failed program was:" >&5
19716   cat conftest.$ac_ext >&5
19717   rm -rf conftest*
19718   eval "ac_cv_header_$ac_safe=no"
19719 fi
19720 rm -f conftest*
19721 fi
19722 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19723   echo "$ac_t""yes" 1>&6
19724     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19725   cat >> confdefs.h <<EOF
19726 #define $ac_tr_hdr 1
19727 EOF
19728  
19729 else
19730   echo "$ac_t""no" 1>&6
19731 fi
19732 done
19733
19734  echo $ac_n "checking for db""... $ac_c" 1>&6
19735 echo "configure:19736: checking for db" >&5
19736 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19737   echo $ac_n "(cached) $ac_c" 1>&6
19738 else
19739   
19740         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19741                 ol_cv_mdbm=no
19742         else
19743                 ol_cv_mdbm=yes
19744         fi
19745
19746 fi
19747
19748 echo "$ac_t""$ol_cv_mdbm" 1>&6
19749  if test $ol_cv_mdbm = yes ; then
19750         cat >> confdefs.h <<\EOF
19751 #define HAVE_MDBM 1
19752 EOF
19753
19754  fi
19755
19756
19757         if test $ol_cv_mdbm = yes ; then
19758                 ol_link_ldbm=mdbm
19759                 ol_with_ldbm_api=mdbm
19760                 if test $ol_cv_lib_mdbm != yes ; then
19761                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19762                 fi
19763         fi
19764 fi
19765
19766 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19767         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19768 echo "configure:19769: checking for GDBM library" >&5
19769 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19770   echo $ac_n "(cached) $ac_c" 1>&6
19771 else
19772         ol_LIBS="$LIBS"
19773         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19774 echo "configure:19775: checking for gdbm_open" >&5
19775 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19776   echo $ac_n "(cached) $ac_c" 1>&6
19777 else
19778   cat > conftest.$ac_ext <<EOF
19779 #line 19780 "configure"
19780 #include "confdefs.h"
19781 /* System header to define __stub macros and hopefully few prototypes,
19782     which can conflict with char gdbm_open(); below.  */
19783 #include <assert.h>
19784 /* Override any gcc2 internal prototype to avoid an error.  */
19785 /* We use char because int might match the return type of a gcc2
19786     builtin and then its argument prototype would still apply.  */
19787 char gdbm_open();
19788 char (*f)();
19789
19790 int main() {
19791
19792 /* The GNU C library defines this for functions which it implements
19793     to always fail with ENOSYS.  Some functions are actually named
19794     something starting with __ and the normal name is an alias.  */
19795 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19796 choke me
19797 #else
19798 f = gdbm_open;
19799 #endif
19800
19801 ; return 0; }
19802 EOF
19803 if { (eval echo configure:19804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19804   rm -rf conftest*
19805   eval "ac_cv_func_gdbm_open=yes"
19806 else
19807   echo "configure: failed program was:" >&5
19808   cat conftest.$ac_ext >&5
19809   rm -rf conftest*
19810   eval "ac_cv_func_gdbm_open=no"
19811 fi
19812 rm -f conftest*
19813 fi
19814
19815 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19816   echo "$ac_t""yes" 1>&6
19817   ol_cv_lib_gdbm=yes
19818 else
19819   echo "$ac_t""no" 1>&6
19820
19821                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19822 echo "configure:19823: checking for gdbm_open in -lgdbm" >&5
19823 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19824 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19825   echo $ac_n "(cached) $ac_c" 1>&6
19826 else
19827   ac_save_LIBS="$LIBS"
19828 LIBS="-lgdbm  $LIBS"
19829 cat > conftest.$ac_ext <<EOF
19830 #line 19831 "configure"
19831 #include "confdefs.h"
19832 /* Override any gcc2 internal prototype to avoid an error.  */
19833 /* We use char because int might match the return type of a gcc2
19834     builtin and then its argument prototype would still apply.  */
19835 char gdbm_open();
19836
19837 int main() {
19838 gdbm_open()
19839 ; return 0; }
19840 EOF
19841 if { (eval echo configure:19842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19842   rm -rf conftest*
19843   eval "ac_cv_lib_$ac_lib_var=yes"
19844 else
19845   echo "configure: failed program was:" >&5
19846   cat conftest.$ac_ext >&5
19847   rm -rf conftest*
19848   eval "ac_cv_lib_$ac_lib_var=no"
19849 fi
19850 rm -f conftest*
19851 LIBS="$ac_save_LIBS"
19852
19853 fi
19854 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19855   echo "$ac_t""yes" 1>&6
19856   ol_cv_lib_gdbm=-lgdbm
19857 else
19858   echo "$ac_t""no" 1>&6
19859 ol_cv_lib_gdbm=no
19860 fi
19861
19862         
19863 fi
19864
19865         LIBS="$ol_LIBS"
19866
19867 fi
19868
19869 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19870
19871
19872  for ac_hdr in gdbm.h
19873 do
19874 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19875 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19876 echo "configure:19877: checking for $ac_hdr" >&5
19877 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19878   echo $ac_n "(cached) $ac_c" 1>&6
19879 else
19880   cat > conftest.$ac_ext <<EOF
19881 #line 19882 "configure"
19882 #include "confdefs.h"
19883 #include <$ac_hdr>
19884 EOF
19885 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19886 { (eval echo configure:19887: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19887 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19888 if test -z "$ac_err"; then
19889   rm -rf conftest*
19890   eval "ac_cv_header_$ac_safe=yes"
19891 else
19892   echo "$ac_err" >&5
19893   echo "configure: failed program was:" >&5
19894   cat conftest.$ac_ext >&5
19895   rm -rf conftest*
19896   eval "ac_cv_header_$ac_safe=no"
19897 fi
19898 rm -f conftest*
19899 fi
19900 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19901   echo "$ac_t""yes" 1>&6
19902     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19903   cat >> confdefs.h <<EOF
19904 #define $ac_tr_hdr 1
19905 EOF
19906  
19907 else
19908   echo "$ac_t""no" 1>&6
19909 fi
19910 done
19911
19912  echo $ac_n "checking for db""... $ac_c" 1>&6
19913 echo "configure:19914: checking for db" >&5
19914 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19915   echo $ac_n "(cached) $ac_c" 1>&6
19916 else
19917   
19918         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19919                 ol_cv_gdbm=no
19920         else
19921                 ol_cv_gdbm=yes
19922         fi
19923
19924 fi
19925
19926 echo "$ac_t""$ol_cv_gdbm" 1>&6
19927  if test $ol_cv_gdbm = yes ; then
19928         cat >> confdefs.h <<\EOF
19929 #define HAVE_GDBM 1
19930 EOF
19931
19932  fi
19933
19934
19935         if test $ol_cv_gdbm = yes ; then
19936                 ol_link_ldbm=gdbm
19937                 ol_with_ldbm_api=gdbm
19938
19939                 if test $ol_cv_lib_gdbm != yes ; then
19940                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19941                 fi
19942         fi
19943 fi
19944
19945 if test $ol_with_ldbm_api = ndbm ; then
19946         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19947 echo "configure:19948: checking for NDBM library" >&5
19948 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19949   echo $ac_n "(cached) $ac_c" 1>&6
19950 else
19951         ol_LIBS="$LIBS"
19952         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19953 echo "configure:19954: checking for dbm_open" >&5
19954 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19955   echo $ac_n "(cached) $ac_c" 1>&6
19956 else
19957   cat > conftest.$ac_ext <<EOF
19958 #line 19959 "configure"
19959 #include "confdefs.h"
19960 /* System header to define __stub macros and hopefully few prototypes,
19961     which can conflict with char dbm_open(); below.  */
19962 #include <assert.h>
19963 /* Override any gcc2 internal prototype to avoid an error.  */
19964 /* We use char because int might match the return type of a gcc2
19965     builtin and then its argument prototype would still apply.  */
19966 char dbm_open();
19967 char (*f)();
19968
19969 int main() {
19970
19971 /* The GNU C library defines this for functions which it implements
19972     to always fail with ENOSYS.  Some functions are actually named
19973     something starting with __ and the normal name is an alias.  */
19974 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19975 choke me
19976 #else
19977 f = dbm_open;
19978 #endif
19979
19980 ; return 0; }
19981 EOF
19982 if { (eval echo configure:19983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19983   rm -rf conftest*
19984   eval "ac_cv_func_dbm_open=yes"
19985 else
19986   echo "configure: failed program was:" >&5
19987   cat conftest.$ac_ext >&5
19988   rm -rf conftest*
19989   eval "ac_cv_func_dbm_open=no"
19990 fi
19991 rm -f conftest*
19992 fi
19993
19994 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19995   echo "$ac_t""yes" 1>&6
19996   ol_cv_lib_ndbm=yes
19997 else
19998   echo "$ac_t""no" 1>&6
19999
20000                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20001 echo "configure:20002: checking for dbm_open in -lndbm" >&5
20002 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20003 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20004   echo $ac_n "(cached) $ac_c" 1>&6
20005 else
20006   ac_save_LIBS="$LIBS"
20007 LIBS="-lndbm  $LIBS"
20008 cat > conftest.$ac_ext <<EOF
20009 #line 20010 "configure"
20010 #include "confdefs.h"
20011 /* Override any gcc2 internal prototype to avoid an error.  */
20012 /* We use char because int might match the return type of a gcc2
20013     builtin and then its argument prototype would still apply.  */
20014 char dbm_open();
20015
20016 int main() {
20017 dbm_open()
20018 ; return 0; }
20019 EOF
20020 if { (eval echo configure:20021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20021   rm -rf conftest*
20022   eval "ac_cv_lib_$ac_lib_var=yes"
20023 else
20024   echo "configure: failed program was:" >&5
20025   cat conftest.$ac_ext >&5
20026   rm -rf conftest*
20027   eval "ac_cv_lib_$ac_lib_var=no"
20028 fi
20029 rm -f conftest*
20030 LIBS="$ac_save_LIBS"
20031
20032 fi
20033 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20034   echo "$ac_t""yes" 1>&6
20035   ol_cv_lib_ndbm=-lndbm
20036 else
20037   echo "$ac_t""no" 1>&6
20038
20039                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20040 echo "configure:20041: checking for dbm_open in -ldbm" >&5
20041 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20042 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20043   echo $ac_n "(cached) $ac_c" 1>&6
20044 else
20045   ac_save_LIBS="$LIBS"
20046 LIBS="-ldbm  $LIBS"
20047 cat > conftest.$ac_ext <<EOF
20048 #line 20049 "configure"
20049 #include "confdefs.h"
20050 /* Override any gcc2 internal prototype to avoid an error.  */
20051 /* We use char because int might match the return type of a gcc2
20052     builtin and then its argument prototype would still apply.  */
20053 char dbm_open();
20054
20055 int main() {
20056 dbm_open()
20057 ; return 0; }
20058 EOF
20059 if { (eval echo configure:20060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20060   rm -rf conftest*
20061   eval "ac_cv_lib_$ac_lib_var=yes"
20062 else
20063   echo "configure: failed program was:" >&5
20064   cat conftest.$ac_ext >&5
20065   rm -rf conftest*
20066   eval "ac_cv_lib_$ac_lib_var=no"
20067 fi
20068 rm -f conftest*
20069 LIBS="$ac_save_LIBS"
20070
20071 fi
20072 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20073   echo "$ac_t""yes" 1>&6
20074   ol_cv_lib_ndbm=-ldbm
20075 else
20076   echo "$ac_t""no" 1>&6
20077 ol_cv_lib_ndbm=no
20078 fi
20079                 
20080 fi
20081
20082         
20083 fi
20084
20085         LIBS="$ol_LIBS"
20086
20087 fi
20088
20089 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20090
20091
20092  for ac_hdr in ndbm.h
20093 do
20094 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20095 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20096 echo "configure:20097: checking for $ac_hdr" >&5
20097 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20098   echo $ac_n "(cached) $ac_c" 1>&6
20099 else
20100   cat > conftest.$ac_ext <<EOF
20101 #line 20102 "configure"
20102 #include "confdefs.h"
20103 #include <$ac_hdr>
20104 EOF
20105 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20106 { (eval echo configure:20107: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20107 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20108 if test -z "$ac_err"; then
20109   rm -rf conftest*
20110   eval "ac_cv_header_$ac_safe=yes"
20111 else
20112   echo "$ac_err" >&5
20113   echo "configure: failed program was:" >&5
20114   cat conftest.$ac_ext >&5
20115   rm -rf conftest*
20116   eval "ac_cv_header_$ac_safe=no"
20117 fi
20118 rm -f conftest*
20119 fi
20120 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20121   echo "$ac_t""yes" 1>&6
20122     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20123   cat >> confdefs.h <<EOF
20124 #define $ac_tr_hdr 1
20125 EOF
20126  
20127 else
20128   echo "$ac_t""no" 1>&6
20129 fi
20130 done
20131
20132  echo $ac_n "checking for db""... $ac_c" 1>&6
20133 echo "configure:20134: checking for db" >&5
20134 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20135   echo $ac_n "(cached) $ac_c" 1>&6
20136 else
20137   
20138         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20139                 ol_cv_ndbm=no
20140         else
20141                 ol_cv_ndbm=yes
20142         fi
20143
20144 fi
20145
20146 echo "$ac_t""$ol_cv_ndbm" 1>&6
20147  if test $ol_cv_ndbm = yes ; then
20148         cat >> confdefs.h <<\EOF
20149 #define HAVE_NDBM 1
20150 EOF
20151
20152  fi
20153
20154
20155         if test $ol_cv_ndbm = yes ; then
20156                 ol_link_ldbm=ndbm
20157                 ol_with_ldbm_api=ndbm
20158
20159                 if test $ol_cv_lib_ndbm != yes ; then
20160                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20161                 fi
20162         fi
20163 fi
20164
20165 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20166         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20167         if test $ol_enable_ldbm = yes ; then
20168                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20169         fi
20170
20171         echo "configure: warning: disabling LDBM" 1>&2
20172         ol_enable_ldbm=no
20173 fi
20174
20175
20176 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20177         BUILD_LIBS_DYNAMIC=shared
20178         cat >> confdefs.h <<\EOF
20179 #define LDAP_LIBS_DYNAMIC 1
20180 EOF
20181
20182         LTSTATIC=""
20183 else
20184         BUILD_LIBS_DYNAMIC=static
20185         LTSTATIC="-static"
20186 fi
20187
20188 if test $ol_enable_wrappers != no ; then
20189         for ac_hdr in tcpd.h
20190 do
20191 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20192 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20193 echo "configure:20194: checking for $ac_hdr" >&5
20194 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20195   echo $ac_n "(cached) $ac_c" 1>&6
20196 else
20197   cat > conftest.$ac_ext <<EOF
20198 #line 20199 "configure"
20199 #include "confdefs.h"
20200 #include <$ac_hdr>
20201 EOF
20202 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20203 { (eval echo configure:20204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20204 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20205 if test -z "$ac_err"; then
20206   rm -rf conftest*
20207   eval "ac_cv_header_$ac_safe=yes"
20208 else
20209   echo "$ac_err" >&5
20210   echo "configure: failed program was:" >&5
20211   cat conftest.$ac_ext >&5
20212   rm -rf conftest*
20213   eval "ac_cv_header_$ac_safe=no"
20214 fi
20215 rm -f conftest*
20216 fi
20217 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20218   echo "$ac_t""yes" 1>&6
20219     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20220   cat >> confdefs.h <<EOF
20221 #define $ac_tr_hdr 1
20222 EOF
20223  
20224                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20225 echo "configure:20226: checking for TCP wrappers library" >&5
20226                 save_LIBS="$LIBS"
20227                 LIBS="$LIBS -lwrap"
20228                 cat > conftest.$ac_ext <<EOF
20229 #line 20230 "configure"
20230 #include "confdefs.h"
20231
20232 #include <tcpd.h>
20233 int allow_severity = 0;
20234 int deny_severity  = 0;
20235
20236 struct request_info *req;
20237                 
20238 int main() {
20239
20240 hosts_access(req)
20241                 
20242 ; return 0; }
20243 EOF
20244 if { (eval echo configure:20245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20245   rm -rf conftest*
20246   echo "$ac_t""-lwrap" 1>&6
20247                 have_wrappers=yes
20248                 LIBS="$save_LIBS"
20249 else
20250   echo "configure: failed program was:" >&5
20251   cat conftest.$ac_ext >&5
20252   rm -rf conftest*
20253   
20254                                 LIBS="$LIBS -lnsl"
20255                 cat > conftest.$ac_ext <<EOF
20256 #line 20257 "configure"
20257 #include "confdefs.h"
20258
20259 #include <tcpd.h>
20260 int allow_severity = 0;
20261 int deny_severity  = 0;
20262
20263 struct request_info *req;
20264                 
20265 int main() {
20266
20267 hosts_access(req)
20268                 
20269 ; return 0; }
20270 EOF
20271 if { (eval echo configure:20272: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20272   rm -rf conftest*
20273   echo "$ac_t""-lwrap -lnsl" 1>&6
20274                 have_wrappers=yes
20275                 LIBS="$save_LIBS -lnsl"
20276 else
20277   echo "configure: failed program was:" >&5
20278   cat conftest.$ac_ext >&5
20279   rm -rf conftest*
20280   
20281                 echo "$ac_t""no" 1>&6
20282                 have_wrappers=no
20283                 LIBS=$save_LIBS
20284 fi
20285 rm -f conftest*
20286 fi
20287 rm -f conftest*
20288 else
20289   echo "$ac_t""no" 1>&6
20290 have_wrappers=no
20291 fi
20292 done
20293
20294
20295         if test $have_wrappers = yes ; then
20296                 cat >> confdefs.h <<\EOF
20297 #define HAVE_TCPD 1
20298 EOF
20299
20300                 WRAP_LIBS="-lwrap"
20301         elif test $ol_enable_wrappers = yes ; then
20302                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20303         else
20304                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20305                 WRAP_LIBS=""
20306         fi
20307 fi
20308
20309 if test $ol_enable_syslog != no ; then
20310         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20311 echo "configure:20312: checking for openlog" >&5
20312 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20313   echo $ac_n "(cached) $ac_c" 1>&6
20314 else
20315   cat > conftest.$ac_ext <<EOF
20316 #line 20317 "configure"
20317 #include "confdefs.h"
20318 /* System header to define __stub macros and hopefully few prototypes,
20319     which can conflict with char openlog(); below.  */
20320 #include <assert.h>
20321 /* Override any gcc2 internal prototype to avoid an error.  */
20322 /* We use char because int might match the return type of a gcc2
20323     builtin and then its argument prototype would still apply.  */
20324 char openlog();
20325 char (*f)();
20326
20327 int main() {
20328
20329 /* The GNU C library defines this for functions which it implements
20330     to always fail with ENOSYS.  Some functions are actually named
20331     something starting with __ and the normal name is an alias.  */
20332 #if defined (__stub_openlog) || defined (__stub___openlog)
20333 choke me
20334 #else
20335 f = openlog;
20336 #endif
20337
20338 ; return 0; }
20339 EOF
20340 if { (eval echo configure:20341: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20341   rm -rf conftest*
20342   eval "ac_cv_func_openlog=yes"
20343 else
20344   echo "configure: failed program was:" >&5
20345   cat conftest.$ac_ext >&5
20346   rm -rf conftest*
20347   eval "ac_cv_func_openlog=no"
20348 fi
20349 rm -f conftest*
20350 fi
20351
20352 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20353   echo "$ac_t""yes" 1>&6
20354   :
20355 else
20356   echo "$ac_t""no" 1>&6
20357 fi
20358
20359         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20360                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20361         fi
20362         ol_enable_syslog=$ac_cv_func_openlog
20363 fi
20364
20365
20366 ol_link_sql=no
20367 if test $ol_enable_sql != no ; then
20368         for ac_hdr in sql.h sqlext.h
20369 do
20370 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20371 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20372 echo "configure:20373: checking for $ac_hdr" >&5
20373 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20374   echo $ac_n "(cached) $ac_c" 1>&6
20375 else
20376   cat > conftest.$ac_ext <<EOF
20377 #line 20378 "configure"
20378 #include "confdefs.h"
20379 #include <$ac_hdr>
20380 EOF
20381 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20382 { (eval echo configure:20383: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20383 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20384 if test -z "$ac_err"; then
20385   rm -rf conftest*
20386   eval "ac_cv_header_$ac_safe=yes"
20387 else
20388   echo "$ac_err" >&5
20389   echo "configure: failed program was:" >&5
20390   cat conftest.$ac_ext >&5
20391   rm -rf conftest*
20392   eval "ac_cv_header_$ac_safe=no"
20393 fi
20394 rm -f conftest*
20395 fi
20396 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20397   echo "$ac_t""yes" 1>&6
20398     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20399   cat >> confdefs.h <<EOF
20400 #define $ac_tr_hdr 1
20401 EOF
20402  
20403 else
20404   echo "$ac_t""no" 1>&6
20405 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20406         
20407 fi
20408 done
20409
20410
20411         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20412 echo "configure:20413: checking for SQLDriverConnect in -liodbc" >&5
20413 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20414 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20415   echo $ac_n "(cached) $ac_c" 1>&6
20416 else
20417   ac_save_LIBS="$LIBS"
20418 LIBS="-liodbc  $LIBS"
20419 cat > conftest.$ac_ext <<EOF
20420 #line 20421 "configure"
20421 #include "confdefs.h"
20422 /* Override any gcc2 internal prototype to avoid an error.  */
20423 /* We use char because int might match the return type of a gcc2
20424     builtin and then its argument prototype would still apply.  */
20425 char SQLDriverConnect();
20426
20427 int main() {
20428 SQLDriverConnect()
20429 ; return 0; }
20430 EOF
20431 if { (eval echo configure:20432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20432   rm -rf conftest*
20433   eval "ac_cv_lib_$ac_lib_var=yes"
20434 else
20435   echo "configure: failed program was:" >&5
20436   cat conftest.$ac_ext >&5
20437   rm -rf conftest*
20438   eval "ac_cv_lib_$ac_lib_var=no"
20439 fi
20440 rm -f conftest*
20441 LIBS="$ac_save_LIBS"
20442
20443 fi
20444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20445   echo "$ac_t""yes" 1>&6
20446   have_iodbc=yes
20447 else
20448   echo "$ac_t""no" 1>&6
20449 have_iodbc=no
20450 fi
20451
20452         if test $have_iodbc = yes ; then
20453                 ol_link_sql="-liodbc"
20454         else
20455                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20456 echo "configure:20457: checking for SQLDriverConnect in -lodbc" >&5
20457 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20458 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20459   echo $ac_n "(cached) $ac_c" 1>&6
20460 else
20461   ac_save_LIBS="$LIBS"
20462 LIBS="-lodbc  $LIBS"
20463 cat > conftest.$ac_ext <<EOF
20464 #line 20465 "configure"
20465 #include "confdefs.h"
20466 /* Override any gcc2 internal prototype to avoid an error.  */
20467 /* We use char because int might match the return type of a gcc2
20468     builtin and then its argument prototype would still apply.  */
20469 char SQLDriverConnect();
20470
20471 int main() {
20472 SQLDriverConnect()
20473 ; return 0; }
20474 EOF
20475 if { (eval echo configure:20476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20476   rm -rf conftest*
20477   eval "ac_cv_lib_$ac_lib_var=yes"
20478 else
20479   echo "configure: failed program was:" >&5
20480   cat conftest.$ac_ext >&5
20481   rm -rf conftest*
20482   eval "ac_cv_lib_$ac_lib_var=no"
20483 fi
20484 rm -f conftest*
20485 LIBS="$ac_save_LIBS"
20486
20487 fi
20488 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20489   echo "$ac_t""yes" 1>&6
20490   have_odbc=yes
20491 else
20492   echo "$ac_t""no" 1>&6
20493 have_odbc=no
20494 fi
20495
20496                 if test $have_odbc = yes ; then
20497                         ol_link_sql="-lodbc"
20498                 fi
20499         fi
20500
20501         if test $ol_link_sql != no ; then
20502                 SLAPD_SQL_LIBS="$ol_link_sql"
20503
20504         elif test $ol_enable_sql != auto ; then
20505                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20506         fi
20507 fi
20508
20509 ol_link_sasl=no
20510 ol_link_spasswd=no
20511 if test $ol_with_cyrus_sasl != no ; then
20512         for ac_hdr in sasl/sasl.h sasl.h
20513 do
20514 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20515 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20516 echo "configure:20517: checking for $ac_hdr" >&5
20517 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20518   echo $ac_n "(cached) $ac_c" 1>&6
20519 else
20520   cat > conftest.$ac_ext <<EOF
20521 #line 20522 "configure"
20522 #include "confdefs.h"
20523 #include <$ac_hdr>
20524 EOF
20525 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20526 { (eval echo configure:20527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20527 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20528 if test -z "$ac_err"; then
20529   rm -rf conftest*
20530   eval "ac_cv_header_$ac_safe=yes"
20531 else
20532   echo "$ac_err" >&5
20533   echo "configure: failed program was:" >&5
20534   cat conftest.$ac_ext >&5
20535   rm -rf conftest*
20536   eval "ac_cv_header_$ac_safe=no"
20537 fi
20538 rm -f conftest*
20539 fi
20540 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20541   echo "$ac_t""yes" 1>&6
20542     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20543   cat >> confdefs.h <<EOF
20544 #define $ac_tr_hdr 1
20545 EOF
20546  
20547 else
20548   echo "$ac_t""no" 1>&6
20549 fi
20550 done
20551
20552
20553         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20554                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20555 echo "configure:20556: checking for sasl_client_init in -lsasl2" >&5
20556 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20557 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20558   echo $ac_n "(cached) $ac_c" 1>&6
20559 else
20560   ac_save_LIBS="$LIBS"
20561 LIBS="-lsasl2  $LIBS"
20562 cat > conftest.$ac_ext <<EOF
20563 #line 20564 "configure"
20564 #include "confdefs.h"
20565 /* Override any gcc2 internal prototype to avoid an error.  */
20566 /* We use char because int might match the return type of a gcc2
20567     builtin and then its argument prototype would still apply.  */
20568 char sasl_client_init();
20569
20570 int main() {
20571 sasl_client_init()
20572 ; return 0; }
20573 EOF
20574 if { (eval echo configure:20575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20575   rm -rf conftest*
20576   eval "ac_cv_lib_$ac_lib_var=yes"
20577 else
20578   echo "configure: failed program was:" >&5
20579   cat conftest.$ac_ext >&5
20580   rm -rf conftest*
20581   eval "ac_cv_lib_$ac_lib_var=no"
20582 fi
20583 rm -f conftest*
20584 LIBS="$ac_save_LIBS"
20585
20586 fi
20587 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20588   echo "$ac_t""yes" 1>&6
20589   ol_link_sasl="-lsasl2"
20590 else
20591   echo "$ac_t""no" 1>&6
20592 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20593 echo "configure:20594: checking for sasl_client_init in -lsasl" >&5
20594 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20595 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20596   echo $ac_n "(cached) $ac_c" 1>&6
20597 else
20598   ac_save_LIBS="$LIBS"
20599 LIBS="-lsasl  $LIBS"
20600 cat > conftest.$ac_ext <<EOF
20601 #line 20602 "configure"
20602 #include "confdefs.h"
20603 /* Override any gcc2 internal prototype to avoid an error.  */
20604 /* We use char because int might match the return type of a gcc2
20605     builtin and then its argument prototype would still apply.  */
20606 char sasl_client_init();
20607
20608 int main() {
20609 sasl_client_init()
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   eval "ac_cv_lib_$ac_lib_var=yes"
20615 else
20616   echo "configure: failed program was:" >&5
20617   cat conftest.$ac_ext >&5
20618   rm -rf conftest*
20619   eval "ac_cv_lib_$ac_lib_var=no"
20620 fi
20621 rm -f conftest*
20622 LIBS="$ac_save_LIBS"
20623
20624 fi
20625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20626   echo "$ac_t""yes" 1>&6
20627   ol_link_sasl="-lsasl"
20628 else
20629   echo "$ac_t""no" 1>&6
20630 fi
20631
20632 fi
20633
20634         fi
20635
20636         if test $ol_link_sasl = no ; then
20637                 if test $ol_with_cyrus_sasl != auto ; then
20638                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20639                 else
20640                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20641                         echo "configure: warning: SASL authentication not supported!" 1>&2
20642                         if test $ol_link_tls = no ; then
20643                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20644                         fi
20645                 fi
20646         else
20647                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20648 echo "configure:20649: checking Cyrus SASL library version" >&5
20649 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20650   echo $ac_n "(cached) $ac_c" 1>&6
20651 else
20652   
20653         cat > conftest.$ac_ext <<EOF
20654 #line 20655 "configure"
20655 #include "confdefs.h"
20656
20657 #ifdef HAVE_SASL_SASL_H
20658 #include <sasl/sasl.h>
20659 #else
20660 #include <sasl.h>
20661 #endif
20662
20663 /* Require 2.1.15+ */
20664 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20665         char *__sasl_compat = "2.2+ or better okay (we guess)";
20666 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20667         && SASL_VERSION_STEP >=15
20668         char *__sasl_compat = "2.1.15+ or better okay";
20669 #endif
20670         
20671 EOF
20672 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20673   egrep "__sasl_compat" >/dev/null 2>&1; then
20674   rm -rf conftest*
20675   ol_cv_sasl_compat=yes
20676 else
20677   rm -rf conftest*
20678   ol_cv_sasl_compat=no
20679 fi
20680 rm -f conftest*
20681
20682 fi
20683
20684 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20685
20686                 if test $ol_cv_sasl_compat = no ; then
20687                         ol_link_sasl=no
20688                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
20689                 fi
20690
20691                 cat >> confdefs.h <<\EOF
20692 #define HAVE_CYRUS_SASL 1
20693 EOF
20694
20695                 SASL_LIBS="$ol_link_sasl"
20696                 if test $ol_enable_spasswd != no ; then
20697                         ol_link_spasswd=yes
20698                 fi
20699
20700                 ac_save_LIBS="$LIBS"
20701                 LIBS="$LIBS $ol_link_sasl"
20702                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
20703 echo "configure:20704: checking for sasl_version" >&5
20704 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
20705   echo $ac_n "(cached) $ac_c" 1>&6
20706 else
20707   cat > conftest.$ac_ext <<EOF
20708 #line 20709 "configure"
20709 #include "confdefs.h"
20710 /* System header to define __stub macros and hopefully few prototypes,
20711     which can conflict with char sasl_version(); below.  */
20712 #include <assert.h>
20713 /* Override any gcc2 internal prototype to avoid an error.  */
20714 /* We use char because int might match the return type of a gcc2
20715     builtin and then its argument prototype would still apply.  */
20716 char sasl_version();
20717 char (*f)();
20718
20719 int main() {
20720
20721 /* The GNU C library defines this for functions which it implements
20722     to always fail with ENOSYS.  Some functions are actually named
20723     something starting with __ and the normal name is an alias.  */
20724 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
20725 choke me
20726 #else
20727 f = sasl_version;
20728 #endif
20729
20730 ; return 0; }
20731 EOF
20732 if { (eval echo configure:20733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20733   rm -rf conftest*
20734   eval "ac_cv_func_sasl_version=yes"
20735 else
20736   echo "configure: failed program was:" >&5
20737   cat conftest.$ac_ext >&5
20738   rm -rf conftest*
20739   eval "ac_cv_func_sasl_version=no"
20740 fi
20741 rm -f conftest*
20742 fi
20743
20744 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
20745   echo "$ac_t""yes" 1>&6
20746   cat >> confdefs.h <<\EOF
20747 #define HAVE_SASL_VERSION 1
20748 EOF
20749
20750 else
20751   echo "$ac_t""no" 1>&6
20752 fi
20753
20754                 LIBS="$ac_save_LIBS"
20755         fi
20756
20757 else
20758         echo "configure: warning: SASL authentication not supported!" 1>&2
20759         if test $ol_link_tls = no ; then
20760                 echo "configure: warning: Strong authentication not supported!" 1>&2
20761         fi
20762 fi
20763
20764 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20765         dev=no
20766         if test -r /dev/urandom ; then
20767                 dev="/dev/urandom";
20768         elif test -r /idev/urandom ; then
20769                 dev="/idev/urandom";
20770         elif test -r /dev/srandom ; then
20771                 dev="/dev/srandom";
20772         elif test -r /dev/random ; then
20773                 dev="/dev/random";
20774         elif test -r /idev/random ; then
20775                 dev="/idev/random";
20776         fi
20777
20778         if test $dev != no ; then
20779                 cat >> confdefs.h <<EOF
20780 #define URANDOM_DEVICE "$dev"
20781 EOF
20782
20783         fi
20784 fi
20785
20786 ol_link_fetch=no
20787 if test $ol_with_fetch != no ; then
20788         ol_LIBS=$LIBS
20789 LIBS="-lfetch -lcom_err $LIBS"
20790 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20791 echo "configure:20792: checking fetch(3) library" >&5
20792 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20793   echo $ac_n "(cached) $ac_c" 1>&6
20794 else
20795   
20796         cat > conftest.$ac_ext <<EOF
20797 #line 20798 "configure"
20798 #include "confdefs.h"
20799
20800 #include <sys/param.h>
20801 #include <stdio.h>
20802 #include <fetch.h>
20803 int main() {
20804 struct url *u = fetchParseURL("file:///"); 
20805 ; return 0; }
20806 EOF
20807 if { (eval echo configure:20808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20808   rm -rf conftest*
20809   ol_cv_lib_fetch=yes
20810 else
20811   echo "configure: failed program was:" >&5
20812   cat conftest.$ac_ext >&5
20813   rm -rf conftest*
20814   ol_cv_lib_fetch=no
20815 fi
20816 rm -f conftest*
20817 fi
20818
20819 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20820 LIBS=$ol_LIBS
20821 if test $ol_cv_lib_fetch != no ; then
20822         ol_link_fetch="-lfetch -lcom_err"
20823         cat >> confdefs.h <<\EOF
20824 #define HAVE_FETCH 1
20825 EOF
20826
20827 fi
20828
20829
20830         if test $ol_cv_lib_fetch != no ; then
20831                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
20832                 ol_link_fetch=freebsd
20833
20834         elif test $ol_with_fetch != auto ; then
20835                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20836         fi 
20837 fi
20838
20839 if test $ol_enable_crypt != no ; then
20840         save_LIBS="$LIBS"
20841         LIBS="$TLS_LIBS $LIBS"
20842
20843         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20844 echo "configure:20845: checking for crypt" >&5
20845 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20846   echo $ac_n "(cached) $ac_c" 1>&6
20847 else
20848   cat > conftest.$ac_ext <<EOF
20849 #line 20850 "configure"
20850 #include "confdefs.h"
20851 /* System header to define __stub macros and hopefully few prototypes,
20852     which can conflict with char crypt(); below.  */
20853 #include <assert.h>
20854 /* Override any gcc2 internal prototype to avoid an error.  */
20855 /* We use char because int might match the return type of a gcc2
20856     builtin and then its argument prototype would still apply.  */
20857 char crypt();
20858 char (*f)();
20859
20860 int main() {
20861
20862 /* The GNU C library defines this for functions which it implements
20863     to always fail with ENOSYS.  Some functions are actually named
20864     something starting with __ and the normal name is an alias.  */
20865 #if defined (__stub_crypt) || defined (__stub___crypt)
20866 choke me
20867 #else
20868 f = crypt;
20869 #endif
20870
20871 ; return 0; }
20872 EOF
20873 if { (eval echo configure:20874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20874   rm -rf conftest*
20875   eval "ac_cv_func_crypt=yes"
20876 else
20877   echo "configure: failed program was:" >&5
20878   cat conftest.$ac_ext >&5
20879   rm -rf conftest*
20880   eval "ac_cv_func_crypt=no"
20881 fi
20882 rm -f conftest*
20883 fi
20884
20885 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20886   echo "$ac_t""yes" 1>&6
20887   have_crypt=yes
20888 else
20889   echo "$ac_t""no" 1>&6
20890
20891                 LIBS="$save_LIBS"
20892                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20893 echo "configure:20894: checking for crypt in -lcrypt" >&5
20894 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20895 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20896   echo $ac_n "(cached) $ac_c" 1>&6
20897 else
20898   ac_save_LIBS="$LIBS"
20899 LIBS="-lcrypt  $LIBS"
20900 cat > conftest.$ac_ext <<EOF
20901 #line 20902 "configure"
20902 #include "confdefs.h"
20903 /* Override any gcc2 internal prototype to avoid an error.  */
20904 /* We use char because int might match the return type of a gcc2
20905     builtin and then its argument prototype would still apply.  */
20906 char crypt();
20907
20908 int main() {
20909 crypt()
20910 ; return 0; }
20911 EOF
20912 if { (eval echo configure:20913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20913   rm -rf conftest*
20914   eval "ac_cv_lib_$ac_lib_var=yes"
20915 else
20916   echo "configure: failed program was:" >&5
20917   cat conftest.$ac_ext >&5
20918   rm -rf conftest*
20919   eval "ac_cv_lib_$ac_lib_var=no"
20920 fi
20921 rm -f conftest*
20922 LIBS="$ac_save_LIBS"
20923
20924 fi
20925 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20926   echo "$ac_t""yes" 1>&6
20927   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20928                         have_crypt=yes
20929 else
20930   echo "$ac_t""no" 1>&6
20931 have_crypt=no
20932 fi
20933
20934 fi
20935
20936
20937         LIBS="$save_LIBS"
20938
20939         if test $have_crypt = yes ; then
20940                 cat >> confdefs.h <<\EOF
20941 #define HAVE_CRYPT 1
20942 EOF
20943
20944         else
20945                 echo "configure: warning: could not find crypt" 1>&2
20946                 if test $ol_enable_crypt = yes ; then
20947                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
20948                 fi
20949
20950                 echo "configure: warning: disabling crypt support" 1>&2
20951                 ol_enable_crypt=no
20952         fi
20953 fi
20954
20955 if test $ol_enable_proctitle != no ; then
20956         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20957 echo "configure:20958: checking for setproctitle" >&5
20958 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20959   echo $ac_n "(cached) $ac_c" 1>&6
20960 else
20961   cat > conftest.$ac_ext <<EOF
20962 #line 20963 "configure"
20963 #include "confdefs.h"
20964 /* System header to define __stub macros and hopefully few prototypes,
20965     which can conflict with char setproctitle(); below.  */
20966 #include <assert.h>
20967 /* Override any gcc2 internal prototype to avoid an error.  */
20968 /* We use char because int might match the return type of a gcc2
20969     builtin and then its argument prototype would still apply.  */
20970 char setproctitle();
20971 char (*f)();
20972
20973 int main() {
20974
20975 /* The GNU C library defines this for functions which it implements
20976     to always fail with ENOSYS.  Some functions are actually named
20977     something starting with __ and the normal name is an alias.  */
20978 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20979 choke me
20980 #else
20981 f = setproctitle;
20982 #endif
20983
20984 ; return 0; }
20985 EOF
20986 if { (eval echo configure:20987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20987   rm -rf conftest*
20988   eval "ac_cv_func_setproctitle=yes"
20989 else
20990   echo "configure: failed program was:" >&5
20991   cat conftest.$ac_ext >&5
20992   rm -rf conftest*
20993   eval "ac_cv_func_setproctitle=no"
20994 fi
20995 rm -f conftest*
20996 fi
20997
20998 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20999   echo "$ac_t""yes" 1>&6
21000   have_setproctitle=yes
21001 else
21002   echo "$ac_t""no" 1>&6
21003
21004                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21005 echo "configure:21006: checking for setproctitle in -lutil" >&5
21006 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21007 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21008   echo $ac_n "(cached) $ac_c" 1>&6
21009 else
21010   ac_save_LIBS="$LIBS"
21011 LIBS="-lutil  $LIBS"
21012 cat > conftest.$ac_ext <<EOF
21013 #line 21014 "configure"
21014 #include "confdefs.h"
21015 /* Override any gcc2 internal prototype to avoid an error.  */
21016 /* We use char because int might match the return type of a gcc2
21017     builtin and then its argument prototype would still apply.  */
21018 char setproctitle();
21019
21020 int main() {
21021 setproctitle()
21022 ; return 0; }
21023 EOF
21024 if { (eval echo configure:21025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21025   rm -rf conftest*
21026   eval "ac_cv_lib_$ac_lib_var=yes"
21027 else
21028   echo "configure: failed program was:" >&5
21029   cat conftest.$ac_ext >&5
21030   rm -rf conftest*
21031   eval "ac_cv_lib_$ac_lib_var=no"
21032 fi
21033 rm -f conftest*
21034 LIBS="$ac_save_LIBS"
21035
21036 fi
21037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21038   echo "$ac_t""yes" 1>&6
21039   have_setproctitle=yes
21040                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21041 else
21042   echo "$ac_t""no" 1>&6
21043 have_setproctitle=no
21044                         LIBOBJS="$LIBOBJS setproctitle.o"
21045                         LIBSRCS="$LIBSRCS setproctitle.c"
21046 fi
21047
21048 fi
21049
21050
21051         if test $have_setproctitle = yes ; then
21052                 cat >> confdefs.h <<\EOF
21053 #define HAVE_SETPROCTITLE 1
21054 EOF
21055
21056         fi
21057 fi
21058
21059 if test $ol_enable_slp != no ; then
21060         for ac_hdr in slp.h 
21061 do
21062 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21063 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21064 echo "configure:21065: checking for $ac_hdr" >&5
21065 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21066   echo $ac_n "(cached) $ac_c" 1>&6
21067 else
21068   cat > conftest.$ac_ext <<EOF
21069 #line 21070 "configure"
21070 #include "confdefs.h"
21071 #include <$ac_hdr>
21072 EOF
21073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21074 { (eval echo configure:21075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21075 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21076 if test -z "$ac_err"; then
21077   rm -rf conftest*
21078   eval "ac_cv_header_$ac_safe=yes"
21079 else
21080   echo "$ac_err" >&5
21081   echo "configure: failed program was:" >&5
21082   cat conftest.$ac_ext >&5
21083   rm -rf conftest*
21084   eval "ac_cv_header_$ac_safe=no"
21085 fi
21086 rm -f conftest*
21087 fi
21088 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21089   echo "$ac_t""yes" 1>&6
21090     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21091   cat >> confdefs.h <<EOF
21092 #define $ac_tr_hdr 1
21093 EOF
21094  
21095 else
21096   echo "$ac_t""no" 1>&6
21097 fi
21098 done
21099
21100
21101         if test $ac_cv_header_slp_h = yes ; then
21102                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21103 echo "configure:21104: checking for SLPOpen in -lslp" >&5
21104 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21105 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21106   echo $ac_n "(cached) $ac_c" 1>&6
21107 else
21108   ac_save_LIBS="$LIBS"
21109 LIBS="-lslp  $LIBS"
21110 cat > conftest.$ac_ext <<EOF
21111 #line 21112 "configure"
21112 #include "confdefs.h"
21113 /* Override any gcc2 internal prototype to avoid an error.  */
21114 /* We use char because int might match the return type of a gcc2
21115     builtin and then its argument prototype would still apply.  */
21116 char SLPOpen();
21117
21118 int main() {
21119 SLPOpen()
21120 ; return 0; }
21121 EOF
21122 if { (eval echo configure:21123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21123   rm -rf conftest*
21124   eval "ac_cv_lib_$ac_lib_var=yes"
21125 else
21126   echo "configure: failed program was:" >&5
21127   cat conftest.$ac_ext >&5
21128   rm -rf conftest*
21129   eval "ac_cv_lib_$ac_lib_var=no"
21130 fi
21131 rm -f conftest*
21132 LIBS="$ac_save_LIBS"
21133
21134 fi
21135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21136   echo "$ac_t""yes" 1>&6
21137   have_slp=yes
21138 else
21139   echo "$ac_t""no" 1>&6
21140 have_slp=no
21141 fi
21142
21143                 if test $have_slp = yes ; then
21144                         cat >> confdefs.h <<\EOF
21145 #define HAVE_SLP 1
21146 EOF
21147
21148                         SLAPD_SLP_LIBS=-lslp
21149                 fi
21150
21151         elif test $ol_enable_slp = yes ; then
21152                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21153         fi
21154 fi
21155
21156
21157 echo $ac_n "checking long long""... $ac_c" 1>&6
21158 echo "configure:21159: checking long long" >&5
21159 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21160   echo $ac_n "(cached) $ac_c" 1>&6
21161 else
21162   
21163         cat > conftest.$ac_ext <<EOF
21164 #line 21165 "configure"
21165 #include "confdefs.h"
21166
21167 int main() {
21168 long long x;
21169 ; return 0; }
21170 EOF
21171 if { (eval echo configure:21172: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21172   rm -rf conftest*
21173   ol_cv_type_long_long=yes
21174 else
21175   echo "configure: failed program was:" >&5
21176   cat conftest.$ac_ext >&5
21177   rm -rf conftest*
21178   ol_cv_type_long_long=no
21179 fi
21180 rm -f conftest*
21181 fi
21182
21183 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21184 if test $ol_cv_type_long_long = yes; then
21185         cat >> confdefs.h <<\EOF
21186 #define HAVE_LONG_LONG 1
21187 EOF
21188
21189 fi
21190
21191 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21192 echo "configure:21193: checking for ANSI C header files" >&5
21193 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21194   echo $ac_n "(cached) $ac_c" 1>&6
21195 else
21196   cat > conftest.$ac_ext <<EOF
21197 #line 21198 "configure"
21198 #include "confdefs.h"
21199 #include <stdlib.h>
21200 #include <stdarg.h>
21201 #include <string.h>
21202 #include <float.h>
21203 EOF
21204 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21205 { (eval echo configure:21206: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21206 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21207 if test -z "$ac_err"; then
21208   rm -rf conftest*
21209   ac_cv_header_stdc=yes
21210 else
21211   echo "$ac_err" >&5
21212   echo "configure: failed program was:" >&5
21213   cat conftest.$ac_ext >&5
21214   rm -rf conftest*
21215   ac_cv_header_stdc=no
21216 fi
21217 rm -f conftest*
21218
21219 if test $ac_cv_header_stdc = yes; then
21220   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21221 cat > conftest.$ac_ext <<EOF
21222 #line 21223 "configure"
21223 #include "confdefs.h"
21224 #include <string.h>
21225 EOF
21226 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21227   egrep "memchr" >/dev/null 2>&1; then
21228   :
21229 else
21230   rm -rf conftest*
21231   ac_cv_header_stdc=no
21232 fi
21233 rm -f conftest*
21234
21235 fi
21236
21237 if test $ac_cv_header_stdc = yes; then
21238   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21239 cat > conftest.$ac_ext <<EOF
21240 #line 21241 "configure"
21241 #include "confdefs.h"
21242 #include <stdlib.h>
21243 EOF
21244 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21245   egrep "free" >/dev/null 2>&1; then
21246   :
21247 else
21248   rm -rf conftest*
21249   ac_cv_header_stdc=no
21250 fi
21251 rm -f conftest*
21252
21253 fi
21254
21255 if test $ac_cv_header_stdc = yes; then
21256   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21257 if test "$cross_compiling" = yes; then
21258   :
21259 else
21260   cat > conftest.$ac_ext <<EOF
21261 #line 21262 "configure"
21262 #include "confdefs.h"
21263 #include <ctype.h>
21264 #if ((' ' & 0x0FF) == 0x020)
21265 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21266 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21267 #else
21268 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21269  || ('j' <= (c) && (c) <= 'r') \
21270  || ('s' <= (c) && (c) <= 'z'))
21271 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21272 #endif
21273 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21274 int main () { int i; for (i = 0; i < 256; i++)
21275 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21276 exit (0); }
21277
21278 EOF
21279 if { (eval echo configure:21280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21280 then
21281   :
21282 else
21283   echo "configure: failed program was:" >&5
21284   cat conftest.$ac_ext >&5
21285   rm -fr conftest*
21286   ac_cv_header_stdc=no
21287 fi
21288 rm -fr conftest*
21289 fi
21290
21291 fi
21292 fi
21293
21294 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21295 if test $ac_cv_header_stdc = yes; then
21296   cat >> confdefs.h <<\EOF
21297 #define STDC_HEADERS 1
21298 EOF
21299
21300 fi
21301
21302 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21303 echo "configure:21304: checking for mode_t" >&5
21304 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21305   echo $ac_n "(cached) $ac_c" 1>&6
21306 else
21307   cat > conftest.$ac_ext <<EOF
21308 #line 21309 "configure"
21309 #include "confdefs.h"
21310 #include <sys/types.h>
21311 #if STDC_HEADERS
21312 #include <stdlib.h>
21313 #include <stddef.h>
21314 #endif
21315
21316 EOF
21317 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21318   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21319   rm -rf conftest*
21320   eval "ac_cv_type_mode_t=yes"
21321 else
21322   rm -rf conftest*
21323   eval "ac_cv_type_mode_t=no"
21324 fi
21325 rm -f conftest*
21326
21327 fi
21328 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21329   echo "$ac_t""yes" 1>&6
21330 else
21331   echo "$ac_t""no" 1>&6
21332   cat >> confdefs.h <<EOF
21333 #define mode_t int
21334 EOF
21335
21336 fi
21337
21338 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21339 echo "configure:21340: checking for off_t" >&5
21340 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21341   echo $ac_n "(cached) $ac_c" 1>&6
21342 else
21343   cat > conftest.$ac_ext <<EOF
21344 #line 21345 "configure"
21345 #include "confdefs.h"
21346 #include <sys/types.h>
21347 #if STDC_HEADERS
21348 #include <stdlib.h>
21349 #include <stddef.h>
21350 #endif
21351
21352 EOF
21353 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21354   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21355   rm -rf conftest*
21356   eval "ac_cv_type_off_t=yes"
21357 else
21358   rm -rf conftest*
21359   eval "ac_cv_type_off_t=no"
21360 fi
21361 rm -f conftest*
21362
21363 fi
21364 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21365   echo "$ac_t""yes" 1>&6
21366 else
21367   echo "$ac_t""no" 1>&6
21368   cat >> confdefs.h <<EOF
21369 #define off_t long
21370 EOF
21371
21372 fi
21373
21374 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21375 echo "configure:21376: checking for pid_t" >&5
21376 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21377   echo $ac_n "(cached) $ac_c" 1>&6
21378 else
21379   cat > conftest.$ac_ext <<EOF
21380 #line 21381 "configure"
21381 #include "confdefs.h"
21382 #include <sys/types.h>
21383 #if STDC_HEADERS
21384 #include <stdlib.h>
21385 #include <stddef.h>
21386 #endif
21387
21388 EOF
21389 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21390   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21391   rm -rf conftest*
21392   eval "ac_cv_type_pid_t=yes"
21393 else
21394   rm -rf conftest*
21395   eval "ac_cv_type_pid_t=no"
21396 fi
21397 rm -f conftest*
21398
21399 fi
21400 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21401   echo "$ac_t""yes" 1>&6
21402 else
21403   echo "$ac_t""no" 1>&6
21404   cat >> confdefs.h <<EOF
21405 #define pid_t int
21406 EOF
21407
21408 fi
21409
21410 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21411 echo "configure:21412: checking for ptrdiff_t" >&5
21412 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21413   echo $ac_n "(cached) $ac_c" 1>&6
21414 else
21415   cat > conftest.$ac_ext <<EOF
21416 #line 21417 "configure"
21417 #include "confdefs.h"
21418 #include <stddef.h>
21419 int main() {
21420 ptrdiff_t p
21421 ; return 0; }
21422 EOF
21423 if { (eval echo configure:21424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21424   rm -rf conftest*
21425   am_cv_type_ptrdiff_t=yes
21426 else
21427   echo "configure: failed program was:" >&5
21428   cat conftest.$ac_ext >&5
21429   rm -rf conftest*
21430   am_cv_type_ptrdiff_t=no
21431 fi
21432 rm -f conftest*
21433 fi
21434
21435 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21436    if test $am_cv_type_ptrdiff_t = yes; then
21437      cat >> confdefs.h <<\EOF
21438 #define HAVE_PTRDIFF_T 1
21439 EOF
21440
21441    fi
21442
21443 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21444 echo "configure:21445: checking return type of signal handlers" >&5
21445 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21446   echo $ac_n "(cached) $ac_c" 1>&6
21447 else
21448   cat > conftest.$ac_ext <<EOF
21449 #line 21450 "configure"
21450 #include "confdefs.h"
21451 #include <sys/types.h>
21452 #include <signal.h>
21453 #ifdef signal
21454 #undef signal
21455 #endif
21456 #ifdef __cplusplus
21457 extern "C" void (*signal (int, void (*)(int)))(int);
21458 #else
21459 void (*signal ()) ();
21460 #endif
21461
21462 int main() {
21463 int i;
21464 ; return 0; }
21465 EOF
21466 if { (eval echo configure:21467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21467   rm -rf conftest*
21468   ac_cv_type_signal=void
21469 else
21470   echo "configure: failed program was:" >&5
21471   cat conftest.$ac_ext >&5
21472   rm -rf conftest*
21473   ac_cv_type_signal=int
21474 fi
21475 rm -f conftest*
21476 fi
21477
21478 echo "$ac_t""$ac_cv_type_signal" 1>&6
21479 cat >> confdefs.h <<EOF
21480 #define RETSIGTYPE $ac_cv_type_signal
21481 EOF
21482
21483
21484 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21485 echo "configure:21486: checking for size_t" >&5
21486 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21487   echo $ac_n "(cached) $ac_c" 1>&6
21488 else
21489   cat > conftest.$ac_ext <<EOF
21490 #line 21491 "configure"
21491 #include "confdefs.h"
21492 #include <sys/types.h>
21493 #if STDC_HEADERS
21494 #include <stdlib.h>
21495 #include <stddef.h>
21496 #endif
21497
21498 EOF
21499 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21500   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21501   rm -rf conftest*
21502   eval "ac_cv_type_size_t=yes"
21503 else
21504   rm -rf conftest*
21505   eval "ac_cv_type_size_t=no"
21506 fi
21507 rm -f conftest*
21508
21509 fi
21510 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21511   echo "$ac_t""yes" 1>&6
21512 else
21513   echo "$ac_t""no" 1>&6
21514   cat >> confdefs.h <<EOF
21515 #define size_t unsigned
21516 EOF
21517
21518 fi
21519
21520
21521 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21522 echo "configure:21523: checking for ssize_t" >&5
21523 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21524   echo $ac_n "(cached) $ac_c" 1>&6
21525 else
21526   cat > conftest.$ac_ext <<EOF
21527 #line 21528 "configure"
21528 #include "confdefs.h"
21529 #include <sys/types.h>
21530 #if STDC_HEADERS
21531 #include <stdlib.h>
21532 #include <stddef.h>
21533 #endif
21534
21535 EOF
21536 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21537   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21538   rm -rf conftest*
21539   eval "ac_cv_type_ssize_t=yes"
21540 else
21541   rm -rf conftest*
21542   eval "ac_cv_type_ssize_t=no"
21543 fi
21544 rm -f conftest*
21545
21546 fi
21547 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21548   echo "$ac_t""yes" 1>&6
21549 else
21550   echo "$ac_t""no" 1>&6
21551   cat >> confdefs.h <<EOF
21552 #define ssize_t signed int
21553 EOF
21554
21555 fi
21556
21557 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21558 echo "configure:21559: checking for caddr_t" >&5
21559 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21560   echo $ac_n "(cached) $ac_c" 1>&6
21561 else
21562   cat > conftest.$ac_ext <<EOF
21563 #line 21564 "configure"
21564 #include "confdefs.h"
21565 #include <sys/types.h>
21566 #if STDC_HEADERS
21567 #include <stdlib.h>
21568 #include <stddef.h>
21569 #endif
21570
21571 EOF
21572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21573   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21574   rm -rf conftest*
21575   eval "ac_cv_type_caddr_t=yes"
21576 else
21577   rm -rf conftest*
21578   eval "ac_cv_type_caddr_t=no"
21579 fi
21580 rm -f conftest*
21581
21582 fi
21583 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21584   echo "$ac_t""yes" 1>&6
21585 else
21586   echo "$ac_t""no" 1>&6
21587   cat >> confdefs.h <<EOF
21588 #define caddr_t char *
21589 EOF
21590
21591 fi
21592
21593
21594 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21595 echo "configure:21596: checking for socklen_t" >&5
21596 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21597   echo $ac_n "(cached) $ac_c" 1>&6
21598 else
21599   cat > conftest.$ac_ext <<EOF
21600 #line 21601 "configure"
21601 #include "confdefs.h"
21602
21603 #ifdef HAVE_SYS_TYPES_H
21604 #include <sys/types.h>
21605 #endif
21606 #ifdef HAVE_SYS_SOCKET_H
21607 #include <sys/socket.h>
21608 #endif
21609
21610 int main() {
21611 socklen_t len;
21612 ; return 0; }
21613 EOF
21614 if { (eval echo configure:21615: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21615   rm -rf conftest*
21616   ol_cv_type_socklen_t=yes
21617 else
21618   echo "configure: failed program was:" >&5
21619   cat conftest.$ac_ext >&5
21620   rm -rf conftest*
21621   ol_cv_type_socklen_t=no
21622 fi
21623 rm -f conftest*
21624 fi
21625
21626 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21627   if test $ol_cv_type_socklen_t = no; then
21628     cat >> confdefs.h <<\EOF
21629 #define socklen_t int
21630 EOF
21631
21632   fi
21633  
21634 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21635 echo "configure:21636: checking for member st_blksize in aggregate type struct stat" >&5
21636 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21637   echo $ac_n "(cached) $ac_c" 1>&6
21638 else
21639   cat > conftest.$ac_ext <<EOF
21640 #line 21641 "configure"
21641 #include "confdefs.h"
21642 #include <sys/types.h>
21643 #include <sys/stat.h>
21644 int main() {
21645 struct stat foo; foo.st_blksize;
21646 ; return 0; }
21647 EOF
21648 if { (eval echo configure:21649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21649   rm -rf conftest*
21650   ac_cv_c_struct_member_st_blksize=yes
21651 else
21652   echo "configure: failed program was:" >&5
21653   cat conftest.$ac_ext >&5
21654   rm -rf conftest*
21655   ac_cv_c_struct_member_st_blksize=no
21656 fi
21657 rm -f conftest*
21658 fi
21659
21660 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21661 st_blksize="$ac_cv_c_struct_member_st_blksize"
21662 if test $ac_cv_c_struct_member_st_blksize = yes; then
21663   cat >> confdefs.h <<\EOF
21664 #define HAVE_ST_BLKSIZE 1
21665 EOF
21666
21667 fi
21668
21669 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21670 echo "configure:21671: checking whether time.h and sys/time.h may both be included" >&5
21671 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21672   echo $ac_n "(cached) $ac_c" 1>&6
21673 else
21674   cat > conftest.$ac_ext <<EOF
21675 #line 21676 "configure"
21676 #include "confdefs.h"
21677 #include <sys/types.h>
21678 #include <sys/time.h>
21679 #include <time.h>
21680 int main() {
21681 struct tm *tp;
21682 ; return 0; }
21683 EOF
21684 if { (eval echo configure:21685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21685   rm -rf conftest*
21686   ac_cv_header_time=yes
21687 else
21688   echo "configure: failed program was:" >&5
21689   cat conftest.$ac_ext >&5
21690   rm -rf conftest*
21691   ac_cv_header_time=no
21692 fi
21693 rm -f conftest*
21694 fi
21695
21696 echo "$ac_t""$ac_cv_header_time" 1>&6
21697 if test $ac_cv_header_time = yes; then
21698   cat >> confdefs.h <<\EOF
21699 #define TIME_WITH_SYS_TIME 1
21700 EOF
21701
21702 fi
21703
21704 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21705 echo "configure:21706: checking whether struct tm is in sys/time.h or time.h" >&5
21706 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21707   echo $ac_n "(cached) $ac_c" 1>&6
21708 else
21709   cat > conftest.$ac_ext <<EOF
21710 #line 21711 "configure"
21711 #include "confdefs.h"
21712 #include <sys/types.h>
21713 #include <time.h>
21714 int main() {
21715 struct tm *tp; tp->tm_sec;
21716 ; return 0; }
21717 EOF
21718 if { (eval echo configure:21719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21719   rm -rf conftest*
21720   ac_cv_struct_tm=time.h
21721 else
21722   echo "configure: failed program was:" >&5
21723   cat conftest.$ac_ext >&5
21724   rm -rf conftest*
21725   ac_cv_struct_tm=sys/time.h
21726 fi
21727 rm -f conftest*
21728 fi
21729
21730 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21731 if test $ac_cv_struct_tm = sys/time.h; then
21732   cat >> confdefs.h <<\EOF
21733 #define TM_IN_SYS_TIME 1
21734 EOF
21735
21736 fi
21737
21738 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21739 echo "configure:21740: checking for uid_t in sys/types.h" >&5
21740 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21741   echo $ac_n "(cached) $ac_c" 1>&6
21742 else
21743   cat > conftest.$ac_ext <<EOF
21744 #line 21745 "configure"
21745 #include "confdefs.h"
21746 #include <sys/types.h>
21747 EOF
21748 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21749   egrep "uid_t" >/dev/null 2>&1; then
21750   rm -rf conftest*
21751   ac_cv_type_uid_t=yes
21752 else
21753   rm -rf conftest*
21754   ac_cv_type_uid_t=no
21755 fi
21756 rm -f conftest*
21757
21758 fi
21759
21760 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21761 if test $ac_cv_type_uid_t = no; then
21762   cat >> confdefs.h <<\EOF
21763 #define uid_t int
21764 EOF
21765
21766   cat >> confdefs.h <<\EOF
21767 #define gid_t int
21768 EOF
21769
21770 fi
21771
21772 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21773 echo "configure:21774: checking for sig_atomic_t" >&5
21774 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21775   echo $ac_n "(cached) $ac_c" 1>&6
21776 else
21777   cat > conftest.$ac_ext <<EOF
21778 #line 21779 "configure"
21779 #include "confdefs.h"
21780 #include <signal.h>
21781 int main() {
21782 sig_atomic_t atomic;
21783 ; return 0; }
21784 EOF
21785 if { (eval echo configure:21786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21786   rm -rf conftest*
21787   ol_cv_type_sig_atomic_t=yes
21788 else
21789   echo "configure: failed program was:" >&5
21790   cat conftest.$ac_ext >&5
21791   rm -rf conftest*
21792   ol_cv_type_sig_atomic_t=no
21793 fi
21794 rm -f conftest*
21795 fi
21796
21797 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21798   if test $ol_cv_type_sig_atomic_t = no; then
21799     cat >> confdefs.h <<\EOF
21800 #define sig_atomic_t int
21801 EOF
21802
21803   fi
21804  
21805
21806
21807 # test for pw_gecos in struct passwd
21808 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21809 echo "configure:21810: checking struct passwd for pw_gecos" >&5
21810 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21811   echo $ac_n "(cached) $ac_c" 1>&6
21812 else
21813   
21814         cat > conftest.$ac_ext <<EOF
21815 #line 21816 "configure"
21816 #include "confdefs.h"
21817 #include <pwd.h>
21818 int main() {
21819
21820         struct passwd pwd;
21821         pwd.pw_gecos = pwd.pw_name;
21822
21823 ; return 0; }
21824 EOF
21825 if { (eval echo configure:21826: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21826   rm -rf conftest*
21827   ol_cv_struct_passwd_pw_gecos=yes
21828 else
21829   echo "configure: failed program was:" >&5
21830   cat conftest.$ac_ext >&5
21831   rm -rf conftest*
21832   ol_cv_struct_passwd_pw_gecos=no
21833 fi
21834 rm -f conftest*
21835 fi
21836
21837 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21838 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21839         cat >> confdefs.h <<\EOF
21840 #define HAVE_PW_GECOS 1
21841 EOF
21842
21843 fi
21844
21845 # test for pw_passwd in struct passwd
21846 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21847 echo "configure:21848: checking struct passwd for pw_passwd" >&5
21848 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21849   echo $ac_n "(cached) $ac_c" 1>&6
21850 else
21851   
21852         cat > conftest.$ac_ext <<EOF
21853 #line 21854 "configure"
21854 #include "confdefs.h"
21855 #include <pwd.h>
21856 int main() {
21857
21858         struct passwd pwd;
21859         pwd.pw_passwd = pwd.pw_name;
21860
21861 ; return 0; }
21862 EOF
21863 if { (eval echo configure:21864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21864   rm -rf conftest*
21865   ol_cv_struct_passwd_pw_passwd=yes
21866 else
21867   echo "configure: failed program was:" >&5
21868   cat conftest.$ac_ext >&5
21869   rm -rf conftest*
21870   ol_cv_struct_passwd_pw_passwd=no
21871 fi
21872 rm -f conftest*
21873 fi
21874
21875 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21876 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21877         cat >> confdefs.h <<\EOF
21878 #define HAVE_PW_PASSWD 1
21879 EOF
21880
21881 fi
21882
21883
21884 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21885 echo "configure:21886: checking if toupper() requires islower()" >&5
21886 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21887   echo $ac_n "(cached) $ac_c" 1>&6
21888 else
21889   
21890         if test "$cross_compiling" = yes; then
21891   ol_cv_c_upper_lower=safe
21892 else
21893   cat > conftest.$ac_ext <<EOF
21894 #line 21895 "configure"
21895 #include "confdefs.h"
21896
21897 #include <ctype.h>
21898 main()
21899 {
21900         if ('C' == toupper('C'))
21901                 exit(0);
21902         else
21903                 exit(1);
21904 }
21905 EOF
21906 if { (eval echo configure:21907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21907 then
21908   ol_cv_c_upper_lower=no
21909 else
21910   echo "configure: failed program was:" >&5
21911   cat conftest.$ac_ext >&5
21912   rm -fr conftest*
21913   ol_cv_c_upper_lower=yes
21914 fi
21915 rm -fr conftest*
21916 fi
21917
21918 fi
21919
21920 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21921 if test $ol_cv_c_upper_lower != no ; then
21922         cat >> confdefs.h <<\EOF
21923 #define C_UPPER_LOWER 1
21924 EOF
21925
21926 fi
21927
21928 echo $ac_n "checking for working const""... $ac_c" 1>&6
21929 echo "configure:21930: checking for working const" >&5
21930 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21931   echo $ac_n "(cached) $ac_c" 1>&6
21932 else
21933   cat > conftest.$ac_ext <<EOF
21934 #line 21935 "configure"
21935 #include "confdefs.h"
21936
21937 int main() {
21938
21939 /* Ultrix mips cc rejects this.  */
21940 typedef int charset[2]; const charset x;
21941 /* SunOS 4.1.1 cc rejects this.  */
21942 char const *const *ccp;
21943 char **p;
21944 /* NEC SVR4.0.2 mips cc rejects this.  */
21945 struct point {int x, y;};
21946 static struct point const zero = {0,0};
21947 /* AIX XL C 1.02.0.0 rejects this.
21948    It does not let you subtract one const X* pointer from another in an arm
21949    of an if-expression whose if-part is not a constant expression */
21950 const char *g = "string";
21951 ccp = &g + (g ? g-g : 0);
21952 /* HPUX 7.0 cc rejects these. */
21953 ++ccp;
21954 p = (char**) ccp;
21955 ccp = (char const *const *) p;
21956 { /* SCO 3.2v4 cc rejects this.  */
21957   char *t;
21958   char const *s = 0 ? (char *) 0 : (char const *) 0;
21959
21960   *t++ = 0;
21961 }
21962 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21963   int x[] = {25, 17};
21964   const int *foo = &x[0];
21965   ++foo;
21966 }
21967 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21968   typedef const int *iptr;
21969   iptr p = 0;
21970   ++p;
21971 }
21972 { /* AIX XL C 1.02.0.0 rejects this saying
21973      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21974   struct s { int j; const int *ap[3]; };
21975   struct s *b; b->j = 5;
21976 }
21977 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21978   const int foo = 10;
21979 }
21980
21981 ; return 0; }
21982 EOF
21983 if { (eval echo configure:21984: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21984   rm -rf conftest*
21985   ac_cv_c_const=yes
21986 else
21987   echo "configure: failed program was:" >&5
21988   cat conftest.$ac_ext >&5
21989   rm -rf conftest*
21990   ac_cv_c_const=no
21991 fi
21992 rm -f conftest*
21993 fi
21994
21995 echo "$ac_t""$ac_cv_c_const" 1>&6
21996 if test $ac_cv_c_const = no; then
21997   cat >> confdefs.h <<\EOF
21998 #define const 
21999 EOF
22000
22001 fi
22002
22003 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22004 echo "configure:22005: checking if compiler understands volatile" >&5
22005 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22006   echo $ac_n "(cached) $ac_c" 1>&6
22007 else
22008   cat > conftest.$ac_ext <<EOF
22009 #line 22010 "configure"
22010 #include "confdefs.h"
22011 int x, y, z;
22012 int main() {
22013 volatile int a; int * volatile b = x ? &y : &z;
22014       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22015       *b = 0;
22016 ; return 0; }
22017 EOF
22018 if { (eval echo configure:22019: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22019   rm -rf conftest*
22020   ol_cv_c_volatile=yes
22021 else
22022   echo "configure: failed program was:" >&5
22023   cat conftest.$ac_ext >&5
22024   rm -rf conftest*
22025   ol_cv_c_volatile=no
22026 fi
22027 rm -f conftest*
22028 fi
22029
22030 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22031   if test $ol_cv_c_volatile = yes; then
22032     : 
22033   else
22034     cat >> confdefs.h <<\EOF
22035 #define volatile 
22036 EOF
22037
22038   fi
22039  
22040
22041 if test $cross_compiling = yes ; then
22042         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
22043         cat >> confdefs.h <<\EOF
22044 #define CROSS_COMPILING 1
22045 EOF
22046
22047 else
22048         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22049 echo "configure:22050: checking whether byte ordering is bigendian" >&5
22050 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22051   echo $ac_n "(cached) $ac_c" 1>&6
22052 else
22053   ac_cv_c_bigendian=unknown
22054 # See if sys/param.h defines the BYTE_ORDER macro.
22055 cat > conftest.$ac_ext <<EOF
22056 #line 22057 "configure"
22057 #include "confdefs.h"
22058 #include <sys/types.h>
22059 #include <sys/param.h>
22060 int main() {
22061
22062 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22063  bogus endian macros
22064 #endif
22065 ; return 0; }
22066 EOF
22067 if { (eval echo configure:22068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22068   rm -rf conftest*
22069   # It does; now see whether it defined to BIG_ENDIAN or not.
22070 cat > conftest.$ac_ext <<EOF
22071 #line 22072 "configure"
22072 #include "confdefs.h"
22073 #include <sys/types.h>
22074 #include <sys/param.h>
22075 int main() {
22076
22077 #if BYTE_ORDER != BIG_ENDIAN
22078  not big endian
22079 #endif
22080 ; return 0; }
22081 EOF
22082 if { (eval echo configure:22083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22083   rm -rf conftest*
22084   ac_cv_c_bigendian=yes
22085 else
22086   echo "configure: failed program was:" >&5
22087   cat conftest.$ac_ext >&5
22088   rm -rf conftest*
22089   ac_cv_c_bigendian=no
22090 fi
22091 rm -f conftest*
22092 else
22093   echo "configure: failed program was:" >&5
22094   cat conftest.$ac_ext >&5
22095 fi
22096 rm -f conftest*
22097 if test $ac_cv_c_bigendian = unknown; then
22098 if test "$cross_compiling" = yes; then
22099     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22100 else
22101   cat > conftest.$ac_ext <<EOF
22102 #line 22103 "configure"
22103 #include "confdefs.h"
22104 main () {
22105   /* Are we little or big endian?  From Harbison&Steele.  */
22106   union
22107   {
22108     long l;
22109     char c[sizeof (long)];
22110   } u;
22111   u.l = 1;
22112   exit (u.c[sizeof (long) - 1] == 1);
22113 }
22114 EOF
22115 if { (eval echo configure:22116: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22116 then
22117   ac_cv_c_bigendian=no
22118 else
22119   echo "configure: failed program was:" >&5
22120   cat conftest.$ac_ext >&5
22121   rm -fr conftest*
22122   ac_cv_c_bigendian=yes
22123 fi
22124 rm -fr conftest*
22125 fi
22126
22127 fi
22128 fi
22129
22130 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22131 if test $ac_cv_c_bigendian = yes; then
22132   cat >> confdefs.h <<\EOF
22133 #define WORDS_BIGENDIAN 1
22134 EOF
22135
22136 fi
22137
22138 fi
22139
22140 echo $ac_n "checking size of short""... $ac_c" 1>&6
22141 echo "configure:22142: checking size of short" >&5 
22142 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22143   echo $ac_n "(cached) $ac_c" 1>&6
22144 else
22145   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22146   cat > conftest.$ac_ext <<EOF
22147 #line 22148 "configure"
22148 #include "confdefs.h"
22149 #include "confdefs.h" 
22150 #include <stdlib.h>
22151 #include <sys/types.h> 
22152  
22153
22154 int main() {
22155 switch (0) case 0: case (sizeof (short) == $ac_size):;
22156 ; return 0; }
22157 EOF
22158 if { (eval echo configure:22159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22159   rm -rf conftest*
22160   ac_cv_sizeof_short=$ac_size
22161 else
22162   echo "configure: failed program was:" >&5
22163   cat conftest.$ac_ext >&5
22164 fi
22165 rm -f conftest* 
22166   if test x$ac_cv_sizeof_short != x ; then break; fi 
22167 done 
22168
22169 fi
22170  
22171 if test x$ac_cv_sizeof_short = x ; then 
22172   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22173 fi 
22174 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22175 cat >> confdefs.h <<EOF
22176 #define SIZEOF_SHORT $ac_cv_sizeof_short
22177 EOF
22178  
22179  
22180 echo $ac_n "checking size of int""... $ac_c" 1>&6
22181 echo "configure:22182: checking size of int" >&5 
22182 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22183   echo $ac_n "(cached) $ac_c" 1>&6
22184 else
22185   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22186   cat > conftest.$ac_ext <<EOF
22187 #line 22188 "configure"
22188 #include "confdefs.h"
22189 #include "confdefs.h" 
22190 #include <stdlib.h>
22191 #include <sys/types.h> 
22192  
22193
22194 int main() {
22195 switch (0) case 0: case (sizeof (int) == $ac_size):;
22196 ; return 0; }
22197 EOF
22198 if { (eval echo configure:22199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22199   rm -rf conftest*
22200   ac_cv_sizeof_int=$ac_size
22201 else
22202   echo "configure: failed program was:" >&5
22203   cat conftest.$ac_ext >&5
22204 fi
22205 rm -f conftest* 
22206   if test x$ac_cv_sizeof_int != x ; then break; fi 
22207 done 
22208
22209 fi
22210  
22211 if test x$ac_cv_sizeof_int = x ; then 
22212   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22213 fi 
22214 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22215 cat >> confdefs.h <<EOF
22216 #define SIZEOF_INT $ac_cv_sizeof_int
22217 EOF
22218  
22219  
22220 echo $ac_n "checking size of long""... $ac_c" 1>&6
22221 echo "configure:22222: checking size of long" >&5 
22222 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22223   echo $ac_n "(cached) $ac_c" 1>&6
22224 else
22225   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22226   cat > conftest.$ac_ext <<EOF
22227 #line 22228 "configure"
22228 #include "confdefs.h"
22229 #include "confdefs.h" 
22230 #include <stdlib.h>
22231 #include <sys/types.h> 
22232  
22233
22234 int main() {
22235 switch (0) case 0: case (sizeof (long) == $ac_size):;
22236 ; return 0; }
22237 EOF
22238 if { (eval echo configure:22239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22239   rm -rf conftest*
22240   ac_cv_sizeof_long=$ac_size
22241 else
22242   echo "configure: failed program was:" >&5
22243   cat conftest.$ac_ext >&5
22244 fi
22245 rm -f conftest* 
22246   if test x$ac_cv_sizeof_long != x ; then break; fi 
22247 done 
22248
22249 fi
22250  
22251 if test x$ac_cv_sizeof_long = x ; then 
22252   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22253 fi 
22254 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22255 cat >> confdefs.h <<EOF
22256 #define SIZEOF_LONG $ac_cv_sizeof_long
22257 EOF
22258  
22259
22260 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
22261 echo "configure:22262: checking size of wchar_t" >&5 
22262 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
22263   echo $ac_n "(cached) $ac_c" 1>&6
22264 else
22265   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22266   cat > conftest.$ac_ext <<EOF
22267 #line 22268 "configure"
22268 #include "confdefs.h"
22269 #include "confdefs.h" 
22270 #include <stdlib.h>
22271 #include <sys/types.h> 
22272  
22273
22274 int main() {
22275 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
22276 ; return 0; }
22277 EOF
22278 if { (eval echo configure:22279: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22279   rm -rf conftest*
22280   ac_cv_sizeof_wchar_t=$ac_size
22281 else
22282   echo "configure: failed program was:" >&5
22283   cat conftest.$ac_ext >&5
22284 fi
22285 rm -f conftest* 
22286   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
22287 done 
22288
22289 fi
22290  
22291 if test x$ac_cv_sizeof_wchar_t = x ; then 
22292   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
22293 fi 
22294 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
22295 cat >> confdefs.h <<EOF
22296 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22297 EOF
22298  
22299
22300
22301 if test "$ac_cv_sizeof_int" -lt 4 ; then
22302         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22303
22304         cat >> confdefs.h <<\EOF
22305 #define LBER_INT_T long
22306 EOF
22307
22308 else
22309         cat >> confdefs.h <<\EOF
22310 #define LBER_INT_T int
22311 EOF
22312
22313 fi
22314
22315 cat >> confdefs.h <<\EOF
22316 #define LBER_LEN_T long
22317 EOF
22318
22319 cat >> confdefs.h <<\EOF
22320 #define LBER_SOCKET_T int
22321 EOF
22322
22323 cat >> confdefs.h <<\EOF
22324 #define LBER_TAG_T long
22325 EOF
22326
22327
22328 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22329 echo "configure:22330: checking for 8-bit clean memcmp" >&5
22330 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22331   echo $ac_n "(cached) $ac_c" 1>&6
22332 else
22333   if test "$cross_compiling" = yes; then
22334   ac_cv_func_memcmp_clean=no
22335 else
22336   cat > conftest.$ac_ext <<EOF
22337 #line 22338 "configure"
22338 #include "confdefs.h"
22339
22340 main()
22341 {
22342   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22343   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22344 }
22345
22346 EOF
22347 if { (eval echo configure:22348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22348 then
22349   ac_cv_func_memcmp_clean=yes
22350 else
22351   echo "configure: failed program was:" >&5
22352   cat conftest.$ac_ext >&5
22353   rm -fr conftest*
22354   ac_cv_func_memcmp_clean=no
22355 fi
22356 rm -fr conftest*
22357 fi
22358
22359 fi
22360
22361 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22362 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22363
22364 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22365 echo "configure:22366: checking for strftime" >&5
22366 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22367   echo $ac_n "(cached) $ac_c" 1>&6
22368 else
22369   cat > conftest.$ac_ext <<EOF
22370 #line 22371 "configure"
22371 #include "confdefs.h"
22372 /* System header to define __stub macros and hopefully few prototypes,
22373     which can conflict with char strftime(); below.  */
22374 #include <assert.h>
22375 /* Override any gcc2 internal prototype to avoid an error.  */
22376 /* We use char because int might match the return type of a gcc2
22377     builtin and then its argument prototype would still apply.  */
22378 char strftime();
22379 char (*f)();
22380
22381 int main() {
22382
22383 /* The GNU C library defines this for functions which it implements
22384     to always fail with ENOSYS.  Some functions are actually named
22385     something starting with __ and the normal name is an alias.  */
22386 #if defined (__stub_strftime) || defined (__stub___strftime)
22387 choke me
22388 #else
22389 f = strftime;
22390 #endif
22391
22392 ; return 0; }
22393 EOF
22394 if { (eval echo configure:22395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22395   rm -rf conftest*
22396   eval "ac_cv_func_strftime=yes"
22397 else
22398   echo "configure: failed program was:" >&5
22399   cat conftest.$ac_ext >&5
22400   rm -rf conftest*
22401   eval "ac_cv_func_strftime=no"
22402 fi
22403 rm -f conftest*
22404 fi
22405
22406 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22407   echo "$ac_t""yes" 1>&6
22408   cat >> confdefs.h <<\EOF
22409 #define HAVE_STRFTIME 1
22410 EOF
22411
22412 else
22413   echo "$ac_t""no" 1>&6
22414 # strftime is in -lintl on SCO UNIX.
22415 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22416 echo "configure:22417: checking for strftime in -lintl" >&5
22417 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22418 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22419   echo $ac_n "(cached) $ac_c" 1>&6
22420 else
22421   ac_save_LIBS="$LIBS"
22422 LIBS="-lintl  $LIBS"
22423 cat > conftest.$ac_ext <<EOF
22424 #line 22425 "configure"
22425 #include "confdefs.h"
22426 /* Override any gcc2 internal prototype to avoid an error.  */
22427 /* We use char because int might match the return type of a gcc2
22428     builtin and then its argument prototype would still apply.  */
22429 char strftime();
22430
22431 int main() {
22432 strftime()
22433 ; return 0; }
22434 EOF
22435 if { (eval echo configure:22436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22436   rm -rf conftest*
22437   eval "ac_cv_lib_$ac_lib_var=yes"
22438 else
22439   echo "configure: failed program was:" >&5
22440   cat conftest.$ac_ext >&5
22441   rm -rf conftest*
22442   eval "ac_cv_lib_$ac_lib_var=no"
22443 fi
22444 rm -f conftest*
22445 LIBS="$ac_save_LIBS"
22446
22447 fi
22448 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22449   echo "$ac_t""yes" 1>&6
22450   cat >> confdefs.h <<\EOF
22451 #define HAVE_STRFTIME 1
22452 EOF
22453
22454 LIBS="-lintl $LIBS"
22455 else
22456   echo "$ac_t""no" 1>&6
22457 fi
22458
22459 fi
22460
22461
22462 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22463 echo "configure:22464: checking for inet_aton()" >&5
22464 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22465   echo $ac_n "(cached) $ac_c" 1>&6
22466 else
22467   cat > conftest.$ac_ext <<EOF
22468 #line 22469 "configure"
22469 #include "confdefs.h"
22470
22471 #ifdef HAVE_SYS_TYPES_H
22472 #       include <sys/types.h>
22473 #endif
22474 #ifdef HAVE_SYS_SOCKET_H
22475 #       include <sys/socket.h>
22476 #       ifdef HAVE_SYS_SELECT_H
22477 #               include <sys/select.h>
22478 #       endif
22479 #       include <netinet/in.h>
22480 #       ifdef HAVE_ARPA_INET_H
22481 #               include <arpa/inet.h>
22482 #       endif
22483 #endif
22484
22485 int main() {
22486 struct in_addr in;
22487 int rc = inet_aton( "255.255.255.255", &in );
22488 ; return 0; }
22489 EOF
22490 if { (eval echo configure:22491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22491   rm -rf conftest*
22492   ol_cv_func_inet_aton=yes
22493 else
22494   echo "configure: failed program was:" >&5
22495   cat conftest.$ac_ext >&5
22496   rm -rf conftest*
22497   ol_cv_func_inet_aton=no
22498 fi
22499 rm -f conftest*
22500 fi
22501
22502 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22503   if test $ol_cv_func_inet_aton != no; then
22504     cat >> confdefs.h <<\EOF
22505 #define HAVE_INET_ATON 1
22506 EOF
22507
22508   fi
22509  
22510
22511 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22512 echo "configure:22513: checking for _spawnlp" >&5
22513 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22514   echo $ac_n "(cached) $ac_c" 1>&6
22515 else
22516   cat > conftest.$ac_ext <<EOF
22517 #line 22518 "configure"
22518 #include "confdefs.h"
22519 /* System header to define __stub macros and hopefully few prototypes,
22520     which can conflict with char _spawnlp(); below.  */
22521 #include <assert.h>
22522 /* Override any gcc2 internal prototype to avoid an error.  */
22523 /* We use char because int might match the return type of a gcc2
22524     builtin and then its argument prototype would still apply.  */
22525 char _spawnlp();
22526 char (*f)();
22527
22528 int main() {
22529
22530 /* The GNU C library defines this for functions which it implements
22531     to always fail with ENOSYS.  Some functions are actually named
22532     something starting with __ and the normal name is an alias.  */
22533 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22534 choke me
22535 #else
22536 f = _spawnlp;
22537 #endif
22538
22539 ; return 0; }
22540 EOF
22541 if { (eval echo configure:22542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22542   rm -rf conftest*
22543   eval "ac_cv_func__spawnlp=yes"
22544 else
22545   echo "configure: failed program was:" >&5
22546   cat conftest.$ac_ext >&5
22547   rm -rf conftest*
22548   eval "ac_cv_func__spawnlp=no"
22549 fi
22550 rm -f conftest*
22551 fi
22552
22553 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22554   echo "$ac_t""yes" 1>&6
22555   cat >> confdefs.h <<\EOF
22556 #define HAVE_SPAWNLP 1
22557 EOF
22558
22559 else
22560   echo "$ac_t""no" 1>&6
22561 fi
22562
22563
22564 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22565 echo "configure:22566: checking for _snprintf" >&5
22566 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22567   echo $ac_n "(cached) $ac_c" 1>&6
22568 else
22569   cat > conftest.$ac_ext <<EOF
22570 #line 22571 "configure"
22571 #include "confdefs.h"
22572 /* System header to define __stub macros and hopefully few prototypes,
22573     which can conflict with char _snprintf(); below.  */
22574 #include <assert.h>
22575 /* Override any gcc2 internal prototype to avoid an error.  */
22576 /* We use char because int might match the return type of a gcc2
22577     builtin and then its argument prototype would still apply.  */
22578 char _snprintf();
22579 char (*f)();
22580
22581 int main() {
22582
22583 /* The GNU C library defines this for functions which it implements
22584     to always fail with ENOSYS.  Some functions are actually named
22585     something starting with __ and the normal name is an alias.  */
22586 #if defined (__stub__snprintf) || defined (__stub____snprintf)
22587 choke me
22588 #else
22589 f = _snprintf;
22590 #endif
22591
22592 ; return 0; }
22593 EOF
22594 if { (eval echo configure:22595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22595   rm -rf conftest*
22596   eval "ac_cv_func__snprintf=yes"
22597 else
22598   echo "configure: failed program was:" >&5
22599   cat conftest.$ac_ext >&5
22600   rm -rf conftest*
22601   eval "ac_cv_func__snprintf=no"
22602 fi
22603 rm -f conftest*
22604 fi
22605
22606 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22607   echo "$ac_t""yes" 1>&6
22608   ac_cv_func_snprintf=yes
22609         cat >> confdefs.h <<\EOF
22610 #define snprintf _snprintf
22611 EOF
22612
22613
22614 else
22615   echo "$ac_t""no" 1>&6
22616 fi
22617
22618
22619 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22620 echo "configure:22621: checking for _vsnprintf" >&5
22621 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22622   echo $ac_n "(cached) $ac_c" 1>&6
22623 else
22624   cat > conftest.$ac_ext <<EOF
22625 #line 22626 "configure"
22626 #include "confdefs.h"
22627 /* System header to define __stub macros and hopefully few prototypes,
22628     which can conflict with char _vsnprintf(); below.  */
22629 #include <assert.h>
22630 /* Override any gcc2 internal prototype to avoid an error.  */
22631 /* We use char because int might match the return type of a gcc2
22632     builtin and then its argument prototype would still apply.  */
22633 char _vsnprintf();
22634 char (*f)();
22635
22636 int main() {
22637
22638 /* The GNU C library defines this for functions which it implements
22639     to always fail with ENOSYS.  Some functions are actually named
22640     something starting with __ and the normal name is an alias.  */
22641 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22642 choke me
22643 #else
22644 f = _vsnprintf;
22645 #endif
22646
22647 ; return 0; }
22648 EOF
22649 if { (eval echo configure:22650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22650   rm -rf conftest*
22651   eval "ac_cv_func__vsnprintf=yes"
22652 else
22653   echo "configure: failed program was:" >&5
22654   cat conftest.$ac_ext >&5
22655   rm -rf conftest*
22656   eval "ac_cv_func__vsnprintf=no"
22657 fi
22658 rm -f conftest*
22659 fi
22660
22661 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22662   echo "$ac_t""yes" 1>&6
22663   ac_cv_func_vsnprintf=yes
22664         cat >> confdefs.h <<\EOF
22665 #define vsnprintf _vsnprintf
22666 EOF
22667
22668
22669 else
22670   echo "$ac_t""no" 1>&6
22671 fi
22672
22673
22674 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22675 echo "configure:22676: checking for vprintf" >&5
22676 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22677   echo $ac_n "(cached) $ac_c" 1>&6
22678 else
22679   cat > conftest.$ac_ext <<EOF
22680 #line 22681 "configure"
22681 #include "confdefs.h"
22682 /* System header to define __stub macros and hopefully few prototypes,
22683     which can conflict with char vprintf(); below.  */
22684 #include <assert.h>
22685 /* Override any gcc2 internal prototype to avoid an error.  */
22686 /* We use char because int might match the return type of a gcc2
22687     builtin and then its argument prototype would still apply.  */
22688 char vprintf();
22689 char (*f)();
22690
22691 int main() {
22692
22693 /* The GNU C library defines this for functions which it implements
22694     to always fail with ENOSYS.  Some functions are actually named
22695     something starting with __ and the normal name is an alias.  */
22696 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22697 choke me
22698 #else
22699 f = vprintf;
22700 #endif
22701
22702 ; return 0; }
22703 EOF
22704 if { (eval echo configure:22705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22705   rm -rf conftest*
22706   eval "ac_cv_func_vprintf=yes"
22707 else
22708   echo "configure: failed program was:" >&5
22709   cat conftest.$ac_ext >&5
22710   rm -rf conftest*
22711   eval "ac_cv_func_vprintf=no"
22712 fi
22713 rm -f conftest*
22714 fi
22715
22716 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22717   echo "$ac_t""yes" 1>&6
22718   cat >> confdefs.h <<\EOF
22719 #define HAVE_VPRINTF 1
22720 EOF
22721
22722 else
22723   echo "$ac_t""no" 1>&6
22724 fi
22725
22726 if test "$ac_cv_func_vprintf" != yes; then
22727 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22728 echo "configure:22729: checking for _doprnt" >&5
22729 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22730   echo $ac_n "(cached) $ac_c" 1>&6
22731 else
22732   cat > conftest.$ac_ext <<EOF
22733 #line 22734 "configure"
22734 #include "confdefs.h"
22735 /* System header to define __stub macros and hopefully few prototypes,
22736     which can conflict with char _doprnt(); below.  */
22737 #include <assert.h>
22738 /* Override any gcc2 internal prototype to avoid an error.  */
22739 /* We use char because int might match the return type of a gcc2
22740     builtin and then its argument prototype would still apply.  */
22741 char _doprnt();
22742 char (*f)();
22743
22744 int main() {
22745
22746 /* The GNU C library defines this for functions which it implements
22747     to always fail with ENOSYS.  Some functions are actually named
22748     something starting with __ and the normal name is an alias.  */
22749 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22750 choke me
22751 #else
22752 f = _doprnt;
22753 #endif
22754
22755 ; return 0; }
22756 EOF
22757 if { (eval echo configure:22758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22758   rm -rf conftest*
22759   eval "ac_cv_func__doprnt=yes"
22760 else
22761   echo "configure: failed program was:" >&5
22762   cat conftest.$ac_ext >&5
22763   rm -rf conftest*
22764   eval "ac_cv_func__doprnt=no"
22765 fi
22766 rm -f conftest*
22767 fi
22768
22769 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22770   echo "$ac_t""yes" 1>&6
22771   cat >> confdefs.h <<\EOF
22772 #define HAVE_DOPRNT 1
22773 EOF
22774
22775 else
22776   echo "$ac_t""no" 1>&6
22777 fi
22778
22779 fi
22780
22781
22782 if test $ac_cv_func_vprintf = yes ; then
22783                 for ac_func in snprintf vsnprintf
22784 do
22785 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22786 echo "configure:22787: checking for $ac_func" >&5
22787 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22788   echo $ac_n "(cached) $ac_c" 1>&6
22789 else
22790   cat > conftest.$ac_ext <<EOF
22791 #line 22792 "configure"
22792 #include "confdefs.h"
22793 /* System header to define __stub macros and hopefully few prototypes,
22794     which can conflict with char $ac_func(); below.  */
22795 #include <assert.h>
22796 /* Override any gcc2 internal prototype to avoid an error.  */
22797 /* We use char because int might match the return type of a gcc2
22798     builtin and then its argument prototype would still apply.  */
22799 char $ac_func();
22800 char (*f)();
22801
22802 int main() {
22803
22804 /* The GNU C library defines this for functions which it implements
22805     to always fail with ENOSYS.  Some functions are actually named
22806     something starting with __ and the normal name is an alias.  */
22807 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22808 choke me
22809 #else
22810 f = $ac_func;
22811 #endif
22812
22813 ; return 0; }
22814 EOF
22815 if { (eval echo configure:22816: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22816   rm -rf conftest*
22817   eval "ac_cv_func_$ac_func=yes"
22818 else
22819   echo "configure: failed program was:" >&5
22820   cat conftest.$ac_ext >&5
22821   rm -rf conftest*
22822   eval "ac_cv_func_$ac_func=no"
22823 fi
22824 rm -f conftest*
22825 fi
22826
22827 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22828   echo "$ac_t""yes" 1>&6
22829     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22830   cat >> confdefs.h <<EOF
22831 #define $ac_tr_func 1
22832 EOF
22833  
22834 else
22835   echo "$ac_t""no" 1>&6
22836 fi
22837 done
22838
22839 fi
22840
22841 for ac_func in \
22842         bcopy                   \
22843         closesocket             \
22844         chroot                  \
22845         endgrent                \
22846         endpwent                \
22847         fcntl                   \
22848         flock                   \
22849         fstat                   \
22850         getdtablesize   \
22851         getgrgid                \
22852         gethostname             \
22853         getpass                 \
22854         getpassphrase   \
22855         getpwuid                \
22856         getpwnam                \
22857         getspnam                \
22858         gettimeofday    \
22859         initgroups              \
22860         lockf                   \
22861         memcpy                  \
22862         memmove                 \
22863         mkstemp                 \
22864         mktemp                  \
22865         pipe                    \
22866         read                    \
22867         recv                    \
22868         recvfrom                \
22869         setpwfile               \
22870         setgid                  \
22871         setegid                 \
22872         setsid                  \
22873         setuid                  \
22874         seteuid                 \
22875         sigaction               \
22876         signal                  \
22877         sigset                  \
22878         strdup                  \
22879         strerror                \
22880         strpbrk                 \
22881         strrchr                 \
22882         strsep                  \
22883         strstr                  \
22884         strtol                  \
22885         strtoul                 \
22886         strtoq                  \
22887         strtouq                 \
22888         strtoll                 \
22889         strspn                  \
22890         sysconf                 \
22891         usleep                  \
22892         waitpid                 \
22893         wait4                   \
22894         write                   \
22895         send                    \
22896         sendmsg                 \
22897         sendto                  \
22898
22899 do
22900 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22901 echo "configure:22902: checking for $ac_func" >&5
22902 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22903   echo $ac_n "(cached) $ac_c" 1>&6
22904 else
22905   cat > conftest.$ac_ext <<EOF
22906 #line 22907 "configure"
22907 #include "confdefs.h"
22908 /* System header to define __stub macros and hopefully few prototypes,
22909     which can conflict with char $ac_func(); below.  */
22910 #include <assert.h>
22911 /* Override any gcc2 internal prototype to avoid an error.  */
22912 /* We use char because int might match the return type of a gcc2
22913     builtin and then its argument prototype would still apply.  */
22914 char $ac_func();
22915 char (*f)();
22916
22917 int main() {
22918
22919 /* The GNU C library defines this for functions which it implements
22920     to always fail with ENOSYS.  Some functions are actually named
22921     something starting with __ and the normal name is an alias.  */
22922 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22923 choke me
22924 #else
22925 f = $ac_func;
22926 #endif
22927
22928 ; return 0; }
22929 EOF
22930 if { (eval echo configure:22931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22931   rm -rf conftest*
22932   eval "ac_cv_func_$ac_func=yes"
22933 else
22934   echo "configure: failed program was:" >&5
22935   cat conftest.$ac_ext >&5
22936   rm -rf conftest*
22937   eval "ac_cv_func_$ac_func=no"
22938 fi
22939 rm -f conftest*
22940 fi
22941
22942 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22943   echo "$ac_t""yes" 1>&6
22944     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22945   cat >> confdefs.h <<EOF
22946 #define $ac_tr_func 1
22947 EOF
22948  
22949 else
22950   echo "$ac_t""no" 1>&6
22951 fi
22952 done
22953
22954
22955 for ac_func in getopt getpeereid
22956 do
22957 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22958 echo "configure:22959: checking for $ac_func" >&5
22959 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22960   echo $ac_n "(cached) $ac_c" 1>&6
22961 else
22962   cat > conftest.$ac_ext <<EOF
22963 #line 22964 "configure"
22964 #include "confdefs.h"
22965 /* System header to define __stub macros and hopefully few prototypes,
22966     which can conflict with char $ac_func(); below.  */
22967 #include <assert.h>
22968 /* Override any gcc2 internal prototype to avoid an error.  */
22969 /* We use char because int might match the return type of a gcc2
22970     builtin and then its argument prototype would still apply.  */
22971 char $ac_func();
22972 char (*f)();
22973
22974 int main() {
22975
22976 /* The GNU C library defines this for functions which it implements
22977     to always fail with ENOSYS.  Some functions are actually named
22978     something starting with __ and the normal name is an alias.  */
22979 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22980 choke me
22981 #else
22982 f = $ac_func;
22983 #endif
22984
22985 ; return 0; }
22986 EOF
22987 if { (eval echo configure:22988: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22988   rm -rf conftest*
22989   eval "ac_cv_func_$ac_func=yes"
22990 else
22991   echo "configure: failed program was:" >&5
22992   cat conftest.$ac_ext >&5
22993   rm -rf conftest*
22994   eval "ac_cv_func_$ac_func=no"
22995 fi
22996 rm -f conftest*
22997 fi
22998
22999 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23000   echo "$ac_t""yes" 1>&6
23001     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23002   cat >> confdefs.h <<EOF
23003 #define $ac_tr_func 1
23004 EOF
23005  
23006 else
23007   echo "$ac_t""no" 1>&6
23008 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23009 fi
23010 done
23011
23012
23013
23014 if test "$ac_cv_func_getopt" != yes; then
23015         LIBSRCS="$LIBSRCS getopt.c"
23016 fi
23017 if test "$ac_cv_func_getpeereid" != yes; then
23018         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23019 echo "configure:23020: checking for msg_accrights in msghdr" >&5
23020 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23021   echo $ac_n "(cached) $ac_c" 1>&6
23022 else
23023   cat > conftest.$ac_ext <<EOF
23024 #line 23025 "configure"
23025 #include "confdefs.h"
23026 #include <sys/socket.h>
23027 int main() {
23028 struct msghdr m; m.msg_accrightslen=0
23029 ; return 0; }
23030 EOF
23031 if { (eval echo configure:23032: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23032   rm -rf conftest*
23033   ol_cv_msghdr_msg_accrights=yes
23034 else
23035   echo "configure: failed program was:" >&5
23036   cat conftest.$ac_ext >&5
23037   rm -rf conftest*
23038   ol_cv_msghdr_msg_accrights=no
23039 fi
23040 rm -f conftest*
23041         
23042 fi
23043
23044 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23045   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23046         cat >> confdefs.h <<\EOF
23047 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23048 EOF
23049
23050   fi
23051
23052         LIBSRCS="$LIBSRCS getpeereid.c"
23053 fi
23054 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23055         if test "$ac_cv_func_snprintf" != yes; then
23056                 cat >> confdefs.h <<\EOF
23057 #define snprintf ber_pvt_snprintf
23058 EOF
23059
23060         fi
23061         if test "$ac_cv_func_vsnprintf" != yes; then
23062                 cat >> confdefs.h <<\EOF
23063 #define vsnprintf ber_pvt_vsnprintf
23064 EOF
23065
23066         fi
23067 fi
23068
23069 # Check Configuration
23070 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23071 echo "configure:23072: checking declaration of sys_errlist" >&5
23072 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23073   echo $ac_n "(cached) $ac_c" 1>&6
23074 else
23075   
23076         cat > conftest.$ac_ext <<EOF
23077 #line 23078 "configure"
23078 #include "confdefs.h"
23079
23080 #include <stdio.h>
23081 #include <sys/types.h>
23082 #include <errno.h>
23083 #ifdef WINNT
23084 #include <stdlib.h>
23085 #endif 
23086 int main() {
23087 char *c = (char *) *sys_errlist
23088 ; return 0; }
23089 EOF
23090 if { (eval echo configure:23091: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23091   rm -rf conftest*
23092   ol_cv_dcl_sys_errlist=yes
23093         ol_cv_have_sys_errlist=yes
23094 else
23095   echo "configure: failed program was:" >&5
23096   cat conftest.$ac_ext >&5
23097   rm -rf conftest*
23098   ol_cv_dcl_sys_errlist=no
23099 fi
23100 rm -f conftest*
23101 fi
23102
23103 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23104 #
23105 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23106 if test $ol_cv_dcl_sys_errlist = no ; then
23107         cat >> confdefs.h <<\EOF
23108 #define DECL_SYS_ERRLIST 1
23109 EOF
23110
23111
23112         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23113 echo "configure:23114: checking existence of sys_errlist" >&5
23114 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23115   echo $ac_n "(cached) $ac_c" 1>&6
23116 else
23117   
23118                 cat > conftest.$ac_ext <<EOF
23119 #line 23120 "configure"
23120 #include "confdefs.h"
23121 #include <errno.h>
23122 int main() {
23123 char *c = (char *) *sys_errlist
23124 ; return 0; }
23125 EOF
23126 if { (eval echo configure:23127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23127   rm -rf conftest*
23128   ol_cv_have_sys_errlist=yes
23129 else
23130   echo "configure: failed program was:" >&5
23131   cat conftest.$ac_ext >&5
23132   rm -rf conftest*
23133   ol_cv_have_sys_errlist=no
23134 fi
23135 rm -f conftest*
23136 fi
23137
23138 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23139 fi
23140 if test $ol_cv_have_sys_errlist = yes ; then
23141         cat >> confdefs.h <<\EOF
23142 #define HAVE_SYS_ERRLIST 1
23143 EOF
23144
23145 fi
23146
23147
23148
23149 if test "$ol_enable_slapi" != no ; then
23150                         for ac_hdr in ltdl.h
23151 do
23152 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23153 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23154 echo "configure:23155: checking for $ac_hdr" >&5
23155 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23156   echo $ac_n "(cached) $ac_c" 1>&6
23157 else
23158   cat > conftest.$ac_ext <<EOF
23159 #line 23160 "configure"
23160 #include "confdefs.h"
23161 #include <$ac_hdr>
23162 EOF
23163 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23164 { (eval echo configure:23165: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23165 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23166 if test -z "$ac_err"; then
23167   rm -rf conftest*
23168   eval "ac_cv_header_$ac_safe=yes"
23169 else
23170   echo "$ac_err" >&5
23171   echo "configure: failed program was:" >&5
23172   cat conftest.$ac_ext >&5
23173   rm -rf conftest*
23174   eval "ac_cv_header_$ac_safe=no"
23175 fi
23176 rm -f conftest*
23177 fi
23178 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23179   echo "$ac_t""yes" 1>&6
23180     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23181   cat >> confdefs.h <<EOF
23182 #define $ac_tr_hdr 1
23183 EOF
23184  
23185 else
23186   echo "$ac_t""no" 1>&6
23187 fi
23188 done
23189
23190
23191         if test $ac_cv_header_ltdl_h != yes ; then
23192                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23193         fi
23194         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23195 echo "configure:23196: checking for lt_dlinit in -lltdl" >&5
23196 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23197 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23198   echo $ac_n "(cached) $ac_c" 1>&6
23199 else
23200   ac_save_LIBS="$LIBS"
23201 LIBS="-lltdl  $LIBS"
23202 cat > conftest.$ac_ext <<EOF
23203 #line 23204 "configure"
23204 #include "confdefs.h"
23205 /* Override any gcc2 internal prototype to avoid an error.  */
23206 /* We use char because int might match the return type of a gcc2
23207     builtin and then its argument prototype would still apply.  */
23208 char lt_dlinit();
23209
23210 int main() {
23211 lt_dlinit()
23212 ; return 0; }
23213 EOF
23214 if { (eval echo configure:23215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23215   rm -rf conftest*
23216   eval "ac_cv_lib_$ac_lib_var=yes"
23217 else
23218   echo "configure: failed program was:" >&5
23219   cat conftest.$ac_ext >&5
23220   rm -rf conftest*
23221   eval "ac_cv_lib_$ac_lib_var=no"
23222 fi
23223 rm -f conftest*
23224 LIBS="$ac_save_LIBS"
23225
23226 fi
23227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23228   echo "$ac_t""yes" 1>&6
23229   
23230                 SLAPI_LIBS=-lltdl
23231                 LIBSLAPI=libslapi.a
23232                 LIBSLAPITOOLS=../libslapi.a
23233                 cat >> confdefs.h <<\EOF
23234 #define HAVE_LIBLTDL 1
23235 EOF
23236
23237         
23238 else
23239   echo "$ac_t""no" 1>&6
23240 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23241 fi
23242
23243
23244         cat >> confdefs.h <<\EOF
23245 #define LDAP_SLAPI 1
23246 EOF
23247
23248 fi
23249
23250 if test "$ol_enable_debug" != no ; then
23251         cat >> confdefs.h <<\EOF
23252 #define LDAP_DEBUG 1
23253 EOF
23254
23255 fi
23256 if test "$ol_enable_syslog" = yes ; then
23257         cat >> confdefs.h <<\EOF
23258 #define LDAP_SYSLOG 1
23259 EOF
23260
23261 fi
23262 if test "$ol_link_kbind" != no ; then
23263         cat >> confdefs.h <<\EOF
23264 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23265 EOF
23266
23267 fi
23268 if test "$ol_enable_proctitle" != no ; then
23269         cat >> confdefs.h <<\EOF
23270 #define LDAP_PROCTITLE 1
23271 EOF
23272
23273 fi
23274 if test "$ol_enable_referrals" != no ; then
23275         cat >> confdefs.h <<\EOF
23276 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23277 EOF
23278
23279 fi
23280 if test "$ol_enable_local" != no; then
23281         cat >> confdefs.h <<\EOF
23282 #define LDAP_PF_LOCAL 1
23283 EOF
23284
23285 fi
23286 if test "$ol_link_ipv6" != no; then
23287         cat >> confdefs.h <<\EOF
23288 #define LDAP_PF_INET6 1
23289 EOF
23290
23291 fi
23292 if test "$ol_enable_cleartext" != no ; then
23293         cat >> confdefs.h <<\EOF
23294 #define SLAPD_CLEARTEXT 1
23295 EOF
23296
23297 fi
23298 if test "$ol_enable_crypt" != no ; then
23299         cat >> confdefs.h <<\EOF
23300 #define SLAPD_CRYPT 1
23301 EOF
23302
23303 fi
23304 if test "$ol_link_spasswd" != no ; then
23305         cat >> confdefs.h <<\EOF
23306 #define SLAPD_SPASSWD 1
23307 EOF
23308
23309 fi
23310 if test "$ol_enable_multimaster" != no ; then
23311         cat >> confdefs.h <<\EOF
23312 #define SLAPD_MULTIMASTER 1
23313 EOF
23314
23315 fi
23316 if test "$ol_enable_rlookups" != no ; then
23317         cat >> confdefs.h <<\EOF
23318 #define SLAPD_RLOOKUPS 1
23319 EOF
23320
23321 fi
23322 if test "$ol_enable_aci" != no ; then
23323         cat >> confdefs.h <<\EOF
23324 #define SLAPD_ACI_ENABLED 1
23325 EOF
23326
23327 fi
23328
23329 if test "$ol_link_modules" != no ; then
23330         cat >> confdefs.h <<\EOF
23331 #define SLAPD_MODULES 1
23332 EOF
23333
23334         BUILD_SLAPD=yes
23335         SLAPD_MODULES_LDFLAGS="-dlopen self"
23336 fi
23337
23338 cat >> confdefs.h <<\EOF
23339 #define SLAPD_MOD_STATIC 1
23340 EOF
23341
23342 cat >> confdefs.h <<\EOF
23343 #define SLAPD_MOD_DYNAMIC 2
23344 EOF
23345
23346
23347 if test "$ol_enable_bdb" != no ; then
23348         BUILD_SLAPD=yes
23349         BUILD_BDB=$ol_enable_bdb
23350         if test "$ol_enable_bdb" = mod ; then
23351                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23352                 MFLAG=SLAPD_MOD_DYNAMIC
23353         else
23354                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23355                 MFLAG=SLAPD_MOD_STATIC
23356         fi
23357         cat >> confdefs.h <<EOF
23358 #define SLAPD_BDB $MFLAG
23359 EOF
23360
23361 fi
23362
23363 if test "$ol_enable_dnssrv" != no ; then
23364         BUILD_SLAPD=yes
23365         BUILD_DNSSRV=$ol_enable_dnssrv
23366         if test "$ol_enable_dnssrv" = mod ; then
23367                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23368                 MFLAG=SLAPD_MOD_DYNAMIC
23369         else
23370                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23371                 MFLAG=SLAPD_MOD_STATIC
23372         fi
23373         cat >> confdefs.h <<EOF
23374 #define SLAPD_DNSSRV $MFLAG
23375 EOF
23376
23377 fi
23378
23379 if test "$ol_enable_hdb" != no ; then
23380         BUILD_SLAPD=yes
23381         BUILD_HDB=$ol_enable_hdb
23382         if test "$ol_enable_hdb" = mod ; then
23383                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23384                 MFLAG=SLAPD_MOD_DYNAMIC
23385         else
23386                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23387                 MFLAG=SLAPD_MOD_STATIC
23388         fi
23389         cat >> confdefs.h <<EOF
23390 #define SLAPD_HDB $MFLAG
23391 EOF
23392
23393 fi
23394
23395 if test "$ol_enable_ldap" != no ; then
23396         BUILD_SLAPD=yes
23397         BUILD_LDAP=$ol_enable_ldap
23398         if test "$ol_enable_ldap" = mod ; then
23399                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23400                 MFLAG=SLAPD_MOD_DYNAMIC
23401         else
23402                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23403                 MFLAG=SLAPD_MOD_STATIC
23404         fi
23405         cat >> confdefs.h <<EOF
23406 #define SLAPD_LDAP $MFLAG
23407 EOF
23408
23409 fi
23410
23411 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23412         BUILD_SLAPD=yes
23413         BUILD_LDBM=$ol_enable_ldbm
23414         if test "$ol_enable_ldbm" = mod ; then
23415                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23416                 MFLAG=SLAPD_MOD_DYNAMIC
23417         else
23418                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23419                 MFLAG=SLAPD_MOD_STATIC
23420         fi
23421         cat >> confdefs.h <<EOF
23422 #define SLAPD_LDBM $MFLAG
23423 EOF
23424
23425 fi
23426
23427 if test "$ol_enable_meta" != no ; then
23428         BUILD_SLAPD=yes
23429         BUILD_META=$ol_enable_meta
23430         BUILD_REWRITE=yes
23431         if test "$ol_enable_meta" = mod ; then
23432                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23433                 MFLAG=SLAPD_MOD_DYNAMIC
23434         else
23435                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23436                 MFLAG=SLAPD_MOD_STATIC
23437         fi
23438         cat >> confdefs.h <<EOF
23439 #define SLAPD_META $MFLAG
23440 EOF
23441
23442 fi
23443
23444 if test "$ol_enable_monitor" != no ; then
23445         BUILD_SLAPD=yes
23446         BUILD_MONITOR=$ol_enable_monitor
23447         if test "$ol_enable_monitor" = mod ; then
23448                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23449                 MFLAG=SLAPD_MOD_DYNAMIC
23450         else
23451                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23452                 MFLAG=SLAPD_MOD_STATIC
23453         fi
23454         cat >> confdefs.h <<EOF
23455 #define SLAPD_MONITOR $MFLAG
23456 EOF
23457
23458 fi
23459
23460 if test "$ol_enable_null" != no ; then
23461         BUILD_SLAPD=yes
23462         BUILD_NULL=$ol_enable_null
23463         if test "$ol_enable_null" = mod ; then
23464                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23465                 MFLAG=SLAPD_MOD_DYNAMIC
23466         else
23467                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23468                 MFLAG=SLAPD_MOD_STATIC
23469         fi
23470         cat >> confdefs.h <<EOF
23471 #define SLAPD_NULL $MFLAG
23472 EOF
23473
23474 fi
23475
23476 if test "$ol_enable_passwd" != no ; then
23477         BUILD_SLAPD=yes
23478         BUILD_PASSWD=$ol_enable_passwd
23479         if test "$ol_enable_passwd" = mod ; then
23480                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23481                 MFLAG=SLAPD_MOD_DYNAMIC
23482         else
23483                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23484                 MFLAG=SLAPD_MOD_STATIC
23485         fi
23486         cat >> confdefs.h <<EOF
23487 #define SLAPD_PASSWD $MFLAG
23488 EOF
23489
23490 fi
23491
23492 if test "$ol_link_perl" != no ; then
23493         BUILD_SLAPD=yes
23494         BUILD_PERL=$ol_enable_perl
23495         if test "$ol_enable_perl" = mod ; then
23496                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23497                 MFLAG=SLAPD_MOD_DYNAMIC
23498         else
23499                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23500                 MFLAG=SLAPD_MOD_STATIC
23501         fi
23502         cat >> confdefs.h <<EOF
23503 #define SLAPD_PERL $MFLAG
23504 EOF
23505
23506 fi
23507
23508 if test "$ol_enable_relay" != no ; then
23509         BUILD_SLAPD=yes
23510         BUILD_RELAY=$ol_enable_relay
23511         if test "$ol_enable_relay" = mod ; then
23512                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
23513                 MFLAG=SLAPD_MOD_DYNAMIC
23514         else
23515                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
23516                 MFLAG=SLAPD_MOD_STATIC
23517         fi
23518         cat >> confdefs.h <<EOF
23519 #define SLAPD_RELAY $MFLAG
23520 EOF
23521
23522 fi
23523
23524 if test "$ol_enable_shell" != no ; then
23525         if test "$ol_link_thread" != no ; then
23526                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23527         fi
23528         BUILD_SLAPD=yes
23529         BUILD_SHELL=$ol_enable_shell
23530         if test "$ol_enable_shell" = mod ; then
23531                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23532                 MFLAG=SLAPD_MOD_DYNAMIC
23533         else
23534                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23535                 MFLAG=SLAPD_MOD_STATIC
23536         fi
23537         cat >> confdefs.h <<EOF
23538 #define SLAPD_SHELL $MFLAG
23539 EOF
23540
23541 fi
23542
23543 if test "$ol_link_sql" != no ; then
23544         BUILD_SLAPD=yes
23545         BUILD_SQL=$ol_enable_sql
23546         if test "$ol_enable_sql" = mod; then
23547                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23548                 MFLAG=SLAPD_MOD_DYNAMIC
23549         else
23550                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23551                 MFLAG=SLAPD_MOD_STATIC
23552         fi
23553         cat >> confdefs.h <<EOF
23554 #define SLAPD_SQL $MFLAG
23555 EOF
23556
23557 fi
23558
23559 if test "$ol_enable_chain" != no ; then
23560         BUILD_CHAIN=$ol_enable_chain
23561         if test "$ol_enable_chain" = mod ; then
23562                 MFLAG=SLAPD_MOD_DYNAMIC
23563                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
23564         else
23565                 MFLAG=SLAPD_MOD_STATIC
23566         fi
23567         cat >> confdefs.h <<EOF
23568 #define SLAPD_OVER_CHAIN $MFLAG
23569 EOF
23570
23571 fi
23572
23573 if test "$ol_enable_denyop" != no ; then
23574         BUILD_DENYOP=$ol_enable_denyop
23575         if test "$ol_enable_denyop" = mod ; then
23576                 MFLAG=SLAPD_MOD_DYNAMIC
23577                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
23578         else
23579                 MFLAG=SLAPD_MOD_STATIC
23580         fi
23581         cat >> confdefs.h <<EOF
23582 #define SLAPD_OVER_DENYOP $MFLAG
23583 EOF
23584
23585 fi
23586
23587 if test "$ol_enable_dyngroup" != no ; then
23588         BUILD_DYNGROUP=$ol_enable_dyngroup
23589         if test "$ol_enable_dyngroup" = mod ; then
23590                 MFLAG=SLAPD_MOD_DYNAMIC
23591                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23592         else
23593                 MFLAG=SLAPD_MOD_STATIC
23594         fi
23595         cat >> confdefs.h <<EOF
23596 #define SLAPD_OVER_DYNGROUP $MFLAG
23597 EOF
23598
23599 fi
23600
23601 if test "$ol_enable_lastmod" != no ; then
23602         BUILD_LASTMOD=$ol_enable_lastmod
23603         if test "$ol_enable_lastmod" = mod ; then
23604                 MFLAG=SLAPD_MOD_DYNAMIC
23605                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
23606         else
23607                 MFLAG=SLAPD_MOD_STATIC
23608         fi
23609         cat >> confdefs.h <<EOF
23610 #define SLAPD_OVER_LASTMOD $MFLAG
23611 EOF
23612
23613 fi
23614
23615 if test "$ol_enable_ppolicy" != no ; then
23616         BUILD_PPOLICY=$ol_enable_ppolicy
23617         if test "$ol_enable_ppolicy" = mod ; then
23618                 MFLAG=SLAPD_MOD_DYNAMIC
23619                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
23620         else
23621                 MFLAG=SLAPD_MOD_STATIC
23622         fi
23623         cat >> confdefs.h <<EOF
23624 #define SLAPD_OVER_PPOLICY $MFLAG
23625 EOF
23626
23627 fi
23628
23629 if test "$ol_enable_proxycache" != no ; then
23630         BUILD_PROXYCACHE=$ol_enable_proxycache
23631         if test "$ol_enable_proxycache" = mod ; then
23632                 MFLAG=SLAPD_MOD_DYNAMIC
23633                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23634         else
23635                 MFLAG=SLAPD_MOD_STATIC
23636         fi
23637         cat >> confdefs.h <<EOF
23638 #define SLAPD_OVER_PROXYCACHE $MFLAG
23639 EOF
23640
23641 fi
23642
23643 if test "$ol_enable_refint" != no ; then
23644         BUILD_REFINT=$ol_enable_refint
23645         if test "$ol_enable_refint" = mod ; then
23646                 MFLAG=SLAPD_MOD_DYNAMIC
23647                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
23648         else
23649                 MFLAG=SLAPD_MOD_STATIC
23650         fi
23651         cat >> confdefs.h <<EOF
23652 #define SLAPD_OVER_REFINT $MFLAG
23653 EOF
23654
23655 fi
23656
23657 if test "$ol_enable_rwm" != no ; then
23658         BUILD_REWRITE=yes
23659         BUILD_RWM=$ol_enable_rwm
23660         if test "$ol_enable_rwm" = mod ; then
23661                 MFLAG=SLAPD_MOD_DYNAMIC
23662                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
23663         else
23664                 MFLAG=SLAPD_MOD_STATIC
23665         fi
23666         cat >> confdefs.h <<EOF
23667 #define SLAPD_OVER_RWM $MFLAG
23668 EOF
23669
23670 fi
23671
23672 if test "$ol_enable_unique" != no ; then
23673         BUILD_UNIQUE=$ol_enable_unique
23674         if test "$ol_enable_unique" = mod ; then
23675                 MFLAG=SLAPD_MOD_DYNAMIC
23676                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
23677         else
23678                 MFLAG=SLAPD_MOD_STATIC
23679         fi
23680         cat >> confdefs.h <<EOF
23681 #define SLAPD_OVER_UNIQUE $MFLAG
23682 EOF
23683
23684 fi
23685
23686 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
23687         $BUILD_SLAPD = yes ; then
23688         BUILD_SLURPD=yes
23689 fi
23690
23691 if test "$ol_enable_rewrite" != no ; then
23692         cat >> confdefs.h <<\EOF
23693 #define ENABLE_REWRITE 1
23694 EOF
23695
23696         BUILD_REWRITE=yes
23697 fi
23698
23699 if test "$ol_enable_slapi" != no ; then
23700         cat >> confdefs.h <<\EOF
23701 #define ENABLE_SLAPI 1
23702 EOF
23703
23704         BUILD_SLAPI=yes
23705         SLAPD_SLAPI_DEPEND=libslapi.a
23706 fi
23707
23708
23709
23710 if test "$ac_cv_mingw32" = yes ; then
23711         PLAT=NT
23712         SLAPD_MODULES_LDFLAGS=
23713 else
23714         PLAT=UNIX
23715 fi
23716
23717 if test -z "$SLAPD_STATIC_BACKENDS"; then
23718         SLAPD_NO_STATIC='#'
23719 else
23720         SLAPD_NO_STATIC=
23721 fi
23722
23723
23724
23725
23726
23727
23728
23729   
23730   
23731   
23732   
23733   
23734   
23735   
23736   
23737   
23738   
23739   
23740   
23741   
23742   
23743   
23744   
23745   
23746   
23747   
23748   
23749   
23750   
23751   
23752   
23753
23754
23755
23756
23757
23758
23759
23760
23761
23762
23763
23764
23765
23766
23767
23768
23769
23770
23771
23772
23773
23774
23775
23776
23777
23778
23779
23780
23781
23782
23783
23784
23785
23786
23787
23788
23789
23790
23791 # Check whether --with-xxinstall or --without-xxinstall was given.
23792 if test "${with_xxinstall+set}" = set; then
23793   withval="$with_xxinstall"
23794   :
23795 fi
23796
23797
23798
23799 trap '' 1 2 15
23800
23801 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
23802
23803 test "x$prefix" = xNONE && prefix=$ac_default_prefix
23804 # Let make expand exec_prefix.
23805 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
23806
23807 # Any assignment to VPATH causes Sun make to only execute
23808 # the first set of double-colon rules, so remove it if not needed.
23809 # If there is a colon in the path, we need to keep it.
23810 if test "x$srcdir" = x.; then
23811   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
23812 fi
23813
23814 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
23815
23816 DEFS=-DHAVE_CONFIG_H
23817
23818 # Without the "./", some shells look in PATH for config.status.
23819 : ${CONFIG_STATUS=./config.status}
23820
23821 echo creating $CONFIG_STATUS
23822 rm -f $CONFIG_STATUS
23823 cat > $CONFIG_STATUS <<EOF
23824 #! /bin/sh
23825 # Generated automatically by configure.
23826 # Run this file to recreate the current configuration.
23827 # This directory was configured as follows,
23828 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
23829 #
23830 # $0 $ac_configure_args
23831 #
23832 # Compiler output produced by configure, useful for debugging
23833 # configure, is in ./config.log if it exists.
23834
23835 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
23836 for ac_option
23837 do
23838   case "\$ac_option" in
23839   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
23840     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
23841     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
23842   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
23843     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
23844     exit 0 ;;
23845   -help | --help | --hel | --he | --h)
23846     echo "\$ac_cs_usage"; exit 0 ;;
23847   *) echo "\$ac_cs_usage"; exit 1 ;;
23848   esac
23849 done
23850
23851 ac_given_srcdir=$srcdir
23852 ac_given_INSTALL="$INSTALL"
23853
23854 trap 'rm -fr `echo "\
23855 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23856 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23857 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23858 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23859 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23860 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23861 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23862 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23863 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23864 include/Makefile:build/top.mk:include/Makefile.in \
23865 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23866 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23867 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23868 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23869 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23870 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23871 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23872 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23873 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23874 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23875 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23876 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
23877 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23878 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23879 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23880 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23881 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23882 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23883 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23884 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
23885 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23886 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23887 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23888 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23889 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
23890 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23891 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23892 tests/run \
23893 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23894  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23895 EOF
23896 cat >> $CONFIG_STATUS <<EOF
23897
23898 # Protect against being on the right side of a sed subst in config.status.
23899 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23900  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23901 $ac_vpsub
23902 $extrasub
23903 s%@SHELL@%$SHELL%g
23904 s%@CFLAGS@%$CFLAGS%g
23905 s%@CPPFLAGS@%$CPPFLAGS%g
23906 s%@CXXFLAGS@%$CXXFLAGS%g
23907 s%@FFLAGS@%$FFLAGS%g
23908 s%@DEFS@%$DEFS%g
23909 s%@LDFLAGS@%$LDFLAGS%g
23910 s%@LIBS@%$LIBS%g
23911 s%@exec_prefix@%$exec_prefix%g
23912 s%@prefix@%$prefix%g
23913 s%@program_transform_name@%$program_transform_name%g
23914 s%@bindir@%$bindir%g
23915 s%@sbindir@%$sbindir%g
23916 s%@libexecdir@%$libexecdir%g
23917 s%@datadir@%$datadir%g
23918 s%@sysconfdir@%$sysconfdir%g
23919 s%@sharedstatedir@%$sharedstatedir%g
23920 s%@localstatedir@%$localstatedir%g
23921 s%@libdir@%$libdir%g
23922 s%@includedir@%$includedir%g
23923 s%@oldincludedir@%$oldincludedir%g
23924 s%@infodir@%$infodir%g
23925 s%@mandir@%$mandir%g
23926 s%@host@%$host%g
23927 s%@host_alias@%$host_alias%g
23928 s%@host_cpu@%$host_cpu%g
23929 s%@host_vendor@%$host_vendor%g
23930 s%@host_os@%$host_os%g
23931 s%@target@%$target%g
23932 s%@target_alias@%$target_alias%g
23933 s%@target_cpu@%$target_cpu%g
23934 s%@target_vendor@%$target_vendor%g
23935 s%@target_os@%$target_os%g
23936 s%@build@%$build%g
23937 s%@build_alias@%$build_alias%g
23938 s%@build_cpu@%$build_cpu%g
23939 s%@build_vendor@%$build_vendor%g
23940 s%@build_os@%$build_os%g
23941 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23942 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23943 s%@INSTALL_DATA@%$INSTALL_DATA%g
23944 s%@PACKAGE@%$PACKAGE%g
23945 s%@VERSION@%$VERSION%g
23946 s%@ACLOCAL@%$ACLOCAL%g
23947 s%@AUTOCONF@%$AUTOCONF%g
23948 s%@AUTOMAKE@%$AUTOMAKE%g
23949 s%@AUTOHEADER@%$AUTOHEADER%g
23950 s%@MAKEINFO@%$MAKEINFO%g
23951 s%@install_sh@%$install_sh%g
23952 s%@AMTAR@%$AMTAR%g
23953 s%@AWK@%$AWK%g
23954 s%@AMTARFLAGS@%$AMTARFLAGS%g
23955 s%@SET_MAKE@%$SET_MAKE%g
23956 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
23957 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23958 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23959 s%@top_builddir@%$top_builddir%g
23960 s%@ldap_subdir@%$ldap_subdir%g
23961 s%@CC@%$CC%g
23962 s%@AR@%$AR%g
23963 s%@LN_S@%$LN_S%g
23964 s%@OBJEXT@%$OBJEXT%g
23965 s%@EXEEXT@%$EXEEXT%g
23966 s%@ECHO@%$ECHO%g
23967 s%@RANLIB@%$RANLIB%g
23968 s%@STRIP@%$STRIP%g
23969 s%@DLLTOOL@%$DLLTOOL%g
23970 s%@AS@%$AS%g
23971 s%@OBJDUMP@%$OBJDUMP%g
23972 s%@CPP@%$CPP%g
23973 s%@LIBTOOL@%$LIBTOOL%g
23974 s%@LN_H@%$LN_H%g
23975 s%@PERLBIN@%$PERLBIN%g
23976 s%@OL_MKDEP@%$OL_MKDEP%g
23977 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23978 s%@LTSTATIC@%$LTSTATIC%g
23979 s%@LIBOBJS@%$LIBOBJS%g
23980 s%@LIBSRCS@%$LIBSRCS%g
23981 s%@PLAT@%$PLAT%g
23982 s%@WITH_TLS@%$WITH_TLS%g
23983 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23984 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23985 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
23986 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
23987 s%@BUILD_BDB@%$BUILD_BDB%g
23988 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23989 s%@BUILD_HDB@%$BUILD_HDB%g
23990 s%@BUILD_LDAP@%$BUILD_LDAP%g
23991 s%@BUILD_LDBM@%$BUILD_LDBM%g
23992 s%@BUILD_META@%$BUILD_META%g
23993 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23994 s%@BUILD_NULL@%$BUILD_NULL%g
23995 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23996 s%@BUILD_RELAY@%$BUILD_RELAY%g
23997 s%@BUILD_PERL@%$BUILD_PERL%g
23998 s%@BUILD_SHELL@%$BUILD_SHELL%g
23999 s%@BUILD_SQL@%$BUILD_SQL%g
24000 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
24001 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
24002 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24003 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
24004 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
24005 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24006 s%@BUILD_REFINT@%$BUILD_REFINT%g
24007 s%@BUILD_RWM@%$BUILD_RWM%g
24008 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
24009 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24010 s%@LDAP_LIBS@%$LDAP_LIBS%g
24011 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24012 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24013 s%@LDBM_LIBS@%$LDBM_LIBS%g
24014 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24015 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24016 s%@WRAP_LIBS@%$WRAP_LIBS%g
24017 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24018 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24019 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24020 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24021 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24022 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24023 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24024 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24025 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24026 s%@KRB4_LIBS@%$KRB4_LIBS%g
24027 s%@KRB5_LIBS@%$KRB5_LIBS%g
24028 s%@SASL_LIBS@%$SASL_LIBS%g
24029 s%@TLS_LIBS@%$TLS_LIBS%g
24030 s%@MODULES_LIBS@%$MODULES_LIBS%g
24031 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24032 s%@LIBSLAPI@%$LIBSLAPI%g
24033 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24034 s%@AUTH_LIBS@%$AUTH_LIBS%g
24035 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24036 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24037 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24038 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24039
24040 CEOF
24041 EOF
24042
24043 cat >> $CONFIG_STATUS <<\EOF
24044
24045 # Split the substitutions into bite-sized pieces for seds with
24046 # small command number limits, like on Digital OSF/1 and HP-UX.
24047 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24048 ac_file=1 # Number of current file.
24049 ac_beg=1 # First line for current file.
24050 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24051 ac_more_lines=:
24052 ac_sed_cmds=""
24053 while $ac_more_lines; do
24054   if test $ac_beg -gt 1; then
24055     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24056   else
24057     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24058   fi
24059   if test ! -s conftest.s$ac_file; then
24060     ac_more_lines=false
24061     rm -f conftest.s$ac_file
24062   else
24063     if test -z "$ac_sed_cmds"; then
24064       ac_sed_cmds="sed -f conftest.s$ac_file"
24065     else
24066       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24067     fi
24068     ac_file=`expr $ac_file + 1`
24069     ac_beg=$ac_end
24070     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24071   fi
24072 done
24073 if test -z "$ac_sed_cmds"; then
24074   ac_sed_cmds=cat
24075 fi
24076 EOF
24077
24078 cat >> $CONFIG_STATUS <<EOF
24079
24080 CONFIG_FILES=\${CONFIG_FILES-"\
24081 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24082 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24083 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24084 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24085 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24086 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24087 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24088 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24089 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24090 include/Makefile:build/top.mk:include/Makefile.in \
24091 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24092 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24093 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24094 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24095 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24096 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24097 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24098 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24099 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24100 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24101 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24102 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24103 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24104 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24105 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24106 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24107 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24108 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24109 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24110 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24111 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24112 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24113 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24114 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24115 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24116 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24117 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24118 tests/run \
24119 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24120 "}
24121 EOF
24122 cat >> $CONFIG_STATUS <<\EOF
24123 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24124   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24125   case "$ac_file" in
24126   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24127        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24128   *) ac_file_in="${ac_file}.in" ;;
24129   esac
24130
24131   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24132
24133   # Remove last slash and all that follows it.  Not all systems have dirname.
24134   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24135   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24136     # The file is in a subdirectory.
24137     test ! -d "$ac_dir" && mkdir "$ac_dir"
24138     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24139     # A "../" for each directory in $ac_dir_suffix.
24140     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24141   else
24142     ac_dir_suffix= ac_dots=
24143   fi
24144
24145   case "$ac_given_srcdir" in
24146   .)  srcdir=.
24147       if test -z "$ac_dots"; then top_srcdir=.
24148       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24149   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24150   *) # Relative path.
24151     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24152     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24153   esac
24154
24155   case "$ac_given_INSTALL" in
24156   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24157   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24158   esac
24159
24160   echo creating "$ac_file"
24161   rm -f "$ac_file"
24162   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24163   case "$ac_file" in
24164   *[Mm]akefile*) ac_comsub="1i\\
24165 # $configure_input" ;;
24166   *) ac_comsub= ;;
24167   esac
24168
24169   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24170   sed -e "$ac_comsub
24171 s%@configure_input@%$configure_input%g
24172 s%@srcdir@%$srcdir%g
24173 s%@top_srcdir@%$top_srcdir%g
24174 s%@INSTALL@%$INSTALL%g
24175 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24176 fi; done
24177 rm -f conftest.s*
24178
24179 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24180 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24181 #
24182 # ac_d sets the value in "#define NAME VALUE" lines.
24183 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24184 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24185 ac_dC='\3'
24186 ac_dD='%g'
24187 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24188 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24189 ac_uB='\([      ]\)%\1#\2define\3'
24190 ac_uC=' '
24191 ac_uD='\4%g'
24192 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24193 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24194 ac_eB='$%\1#\2define\3'
24195 ac_eC=' '
24196 ac_eD='%g'
24197
24198 if test "${CONFIG_HEADERS+set}" != set; then
24199 EOF
24200 cat >> $CONFIG_STATUS <<EOF
24201   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24202 EOF
24203 cat >> $CONFIG_STATUS <<\EOF
24204 fi
24205 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24206   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24207   case "$ac_file" in
24208   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24209        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24210   *) ac_file_in="${ac_file}.in" ;;
24211   esac
24212
24213   echo creating $ac_file
24214
24215   rm -f conftest.frag conftest.in conftest.out
24216   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24217   cat $ac_file_inputs > conftest.in
24218
24219 EOF
24220
24221 # Transform confdefs.h into a sed script conftest.vals that substitutes
24222 # the proper values into config.h.in to produce config.h.  And first:
24223 # Protect against being on the right side of a sed subst in config.status.
24224 # Protect against being in an unquoted here document in config.status.
24225 rm -f conftest.vals
24226 cat > conftest.hdr <<\EOF
24227 s/[\\&%]/\\&/g
24228 s%[\\$`]%\\&%g
24229 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24230 s%ac_d%ac_u%gp
24231 s%ac_u%ac_e%gp
24232 EOF
24233 sed -n -f conftest.hdr confdefs.h > conftest.vals
24234 rm -f conftest.hdr
24235
24236 # This sed command replaces #undef with comments.  This is necessary, for
24237 # example, in the case of _POSIX_SOURCE, which is predefined and required
24238 # on some systems where configure will not decide to define it.
24239 cat >> conftest.vals <<\EOF
24240 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24241 EOF
24242
24243 # Break up conftest.vals because some shells have a limit on
24244 # the size of here documents, and old seds have small limits too.
24245
24246 rm -f conftest.tail
24247 while :
24248 do
24249   ac_lines=`grep -c . conftest.vals`
24250   # grep -c gives empty output for an empty file on some AIX systems.
24251   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24252   # Write a limited-size here document to conftest.frag.
24253   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24254   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24255   echo 'CEOF
24256   sed -f conftest.frag conftest.in > conftest.out
24257   rm -f conftest.in
24258   mv conftest.out conftest.in
24259 ' >> $CONFIG_STATUS
24260   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24261   rm -f conftest.vals
24262   mv conftest.tail conftest.vals
24263 done
24264 rm -f conftest.vals
24265
24266 cat >> $CONFIG_STATUS <<\EOF
24267   rm -f conftest.frag conftest.h
24268   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24269   cat conftest.in >> conftest.h
24270   rm -f conftest.in
24271   if cmp -s $ac_file conftest.h 2>/dev/null; then
24272     echo "$ac_file is unchanged"
24273     rm -f conftest.h
24274   else
24275     # Remove last slash and all that follows it.  Not all systems have dirname.
24276       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24277       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24278       # The file is in a subdirectory.
24279       test ! -d "$ac_dir" && mkdir "$ac_dir"
24280     fi
24281     rm -f $ac_file
24282     mv conftest.h $ac_file
24283   fi
24284 fi; done
24285
24286 EOF
24287 cat >> $CONFIG_STATUS <<EOF
24288
24289 EOF
24290 cat >> $CONFIG_STATUS <<\EOF
24291
24292 chmod +x tests/run
24293 date > stamp-h
24294 echo Please run \"make depend\" to build dependencies
24295
24296 exit 0
24297 EOF
24298 chmod +x $CONFIG_STATUS
24299 rm -fr confdefs* $ac_clean_files
24300 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24301