]> git.sur5r.net Git - openldap/blob - configure
zap libldbm
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.497 2003/12/02 01:20:09 hyc Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2003 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-2003 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   --enable-x-compile      enable cross compiling [no]"
49 ac_help="$ac_help
50   --with-cyrus-sasl       with Cyrus SASL support [auto]"
51 ac_help="$ac_help
52   --with-fetch            with fetch(3) URL support [auto]"
53 ac_help="$ac_help
54   --with-threads          with threads [auto]"
55 ac_help="$ac_help
56   --with-tls              with TLS/SSL support [auto]"
57 ac_help="$ac_help
58   --with-yielding-select  with implicitly yielding select [auto]"
59 ac_help="$ac_help
60
61 SLAPD (Standalone LDAP Daemon) Options:"
62 ac_help="$ac_help
63   --enable-slapd          enable building slapd [yes]"
64 ac_help="$ac_help
65     --enable-aci          enable per-object ACIs (experimental) [no]"
66 ac_help="$ac_help
67     --enable-cleartext    enable cleartext passwords [yes]"
68 ac_help="$ac_help
69     --enable-crypt        enable crypt(3) passwords [no]"
70 ac_help="$ac_help
71     --enable-lmpasswd     enable LAN Manager passwords [no]"
72 ac_help="$ac_help
73     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
74 ac_help="$ac_help
75     --enable-modules      enable dynamic module support [no]"
76 ac_help="$ac_help
77     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
78 ac_help="$ac_help
79     --enable-rlookups     enable reverse lookups of client hostnames [no]"
80 ac_help="$ac_help
81     --enable-slapi        enable SLAPI support (experimental) [no]"
82 ac_help="$ac_help
83     --enable-slp          enable SLPv2 support [no]"
84 ac_help="$ac_help
85     --enable-wrappers     enable tcp wrapper support [no]"
86 ac_help="$ac_help
87     --enable-bdb          enable Berkeley DB backend [yes]"
88 ac_help="$ac_help
89     --with-bdb-module     module type static|dynamic [static]"
90 ac_help="$ac_help
91     --enable-dnssrv       enable dnssrv backend [no]"
92 ac_help="$ac_help
93     --with-dnssrv-module  module type static|dynamic [static]"
94 ac_help="$ac_help
95     --enable-hdb          enable Hierarchical DB backend [no]"
96 ac_help="$ac_help
97     --with-hdb-module     module type static|dynamic [static]"
98 ac_help="$ac_help
99     --enable-ldap         enable ldap backend [no]"
100 ac_help="$ac_help
101     --with-ldap-module    module type static|dynamic [static]"
102 ac_help="$ac_help
103     --enable-ldbm         enable ldbm backend [no]"
104 ac_help="$ac_help
105     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
106 ac_help="$ac_help
107     --with-ldbm-module    module type static|dynamic [static]"
108 ac_help="$ac_help
109     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
110 ac_help="$ac_help
111     --enable-meta         enable metadirectory backend [no]"
112 ac_help="$ac_help
113     --with-meta-module    module type static|dynamic [static]"
114 ac_help="$ac_help
115     --enable-monitor      enable monitor backend [yes]"
116 ac_help="$ac_help
117     --with-monitor-module module type static|dynamic [static]"
118 ac_help="$ac_help
119     --enable-null         enable null backend [no]"
120 ac_help="$ac_help
121     --with-null-module    module type static|dynamic [static]"
122 ac_help="$ac_help
123     --enable-passwd       enable passwd backend [no]"
124 ac_help="$ac_help
125     --with-passwd-module  module type static|dynamic [static]"
126 ac_help="$ac_help
127     --enable-perl         enable perl backend [no]"
128 ac_help="$ac_help
129     --with-perl-module    module type static|dynamic [static]"
130 ac_help="$ac_help
131     --enable-shell        enable shell backend [no]"
132 ac_help="$ac_help
133     --with-shell-module   module type static|dynamic [static]"
134 ac_help="$ac_help
135     --enable-sql          enable sql backend [no]"
136 ac_help="$ac_help
137     --with-sql-module     module type static|dynamic [static]"
138 ac_help="$ac_help
139     --enable-tcl          enable tcl backend [no]"
140 ac_help="$ac_help
141     --with-tcl-module     module type static|dynamic [static]"
142 ac_help="$ac_help
143
144 SLURPD (Replication Daemon) Options:"
145 ac_help="$ac_help
146   --enable-slurpd         enable building slurpd [auto]"
147 ac_help="$ac_help
148
149 Library Generation & Linking Options"
150 ac_help="$ac_help
151   --enable-static[=PKGS]  build static libraries [default=yes]"
152 ac_help="$ac_help
153   --enable-shared[=PKGS]  build shared libraries [default=yes]"
154 ac_help="$ac_help
155   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
156 ac_help="$ac_help
157   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
158
159 # Find the correct PATH separator.  Usually this is `:', but
160 # DJGPP uses `;' like DOS.
161 if test "X${PATH_SEPARATOR+set}" != Xset; then
162   UNAME=${UNAME-`uname 2>/dev/null`}
163   case X$UNAME in
164     *-DOS) lt_cv_sys_path_separator=';' ;;
165     *)     lt_cv_sys_path_separator=':' ;;
166   esac
167   PATH_SEPARATOR=$lt_cv_sys_path_separator
168 fi
169
170
171 # Check that we are running under the correct shell.
172 SHELL=${CONFIG_SHELL-/bin/sh}
173
174 case X$ECHO in
175 X*--fallback-echo)
176   # Remove one level of quotation (which was required for Make).
177   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
178   ;;
179 esac
180
181 echo=${ECHO-echo}
182 if test "X$1" = X--no-reexec; then
183   # Discard the --no-reexec flag, and continue.
184   shift
185 elif test "X$1" = X--fallback-echo; then
186   # Avoid inline document here, it may be left over
187   :
188 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
189   # Yippee, $echo works!
190   :
191 else
192   # Restart under the correct shell.
193   exec $SHELL "$0" --no-reexec ${1+"$@"}
194 fi
195
196 if test "X$1" = X--fallback-echo; then
197   # used as fallback echo
198   shift
199   cat <<EOF
200
201 EOF
202   exit 0
203 fi
204
205 # The HP-UX ksh and POSIX shell print the target directory to stdout
206 # if CDPATH is set.
207 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
208
209 if test -z "$ECHO"; then
210 if test "X${echo_test_string+set}" != Xset; then
211 # find a string as large as possible, as long as the shell can cope with it
212   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
213     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
214     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
215        echo_test_string="`eval $cmd`" &&
216        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
217     then
218       break
219     fi
220   done
221 fi
222
223 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
224    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
225    test "X$echo_testing_string" = "X$echo_test_string"; then
226   :
227 else
228   # The Solaris, AIX, and Digital Unix default echo programs unquote
229   # backslashes.  This makes it impossible to quote backslashes using
230   #   echo "$something" | sed 's/\\/\\\\/g'
231   #
232   # So, first we look for a working echo in the user's PATH.
233
234   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
235   for dir in $PATH /usr/ucb; do
236     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
237        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
238        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
239        test "X$echo_testing_string" = "X$echo_test_string"; then
240       echo="$dir/echo"
241       break
242     fi
243   done
244   IFS="$save_ifs"
245
246   if test "X$echo" = Xecho; then
247     # We didn't find a better echo, so look for alternatives.
248     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
249        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
250        test "X$echo_testing_string" = "X$echo_test_string"; then
251       # This shell has a builtin print -r that does the trick.
252       echo='print -r'
253     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
254          test "X$CONFIG_SHELL" != X/bin/ksh; then
255       # If we have ksh, try running configure again with it.
256       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
257       export ORIGINAL_CONFIG_SHELL
258       CONFIG_SHELL=/bin/ksh
259       export CONFIG_SHELL
260       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
261     else
262       # Try using printf.
263       echo='printf %s\n'
264       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
265          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
266          test "X$echo_testing_string" = "X$echo_test_string"; then
267         # Cool, printf works
268         :
269       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
270            test "X$echo_testing_string" = 'X\t' &&
271            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
272            test "X$echo_testing_string" = "X$echo_test_string"; then
273         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
274         export CONFIG_SHELL
275         SHELL="$CONFIG_SHELL"
276         export SHELL
277         echo="$CONFIG_SHELL $0 --fallback-echo"
278       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
279            test "X$echo_testing_string" = 'X\t' &&
280            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
281            test "X$echo_testing_string" = "X$echo_test_string"; then
282         echo="$CONFIG_SHELL $0 --fallback-echo"
283       else
284         # maybe with a smaller string...
285         prev=:
286
287         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
288           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
289           then
290             break
291           fi
292           prev="$cmd"
293         done
294
295         if test "$prev" != 'sed 50q "$0"'; then
296           echo_test_string=`eval $prev`
297           export echo_test_string
298           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
299         else
300           # Oops.  We lost completely, so just stick with echo.
301           echo=echo
302         fi
303       fi
304     fi
305   fi
306 fi
307 fi
308
309 # Copy echo and quote the copy suitably for passing to libtool from
310 # the Makefile, instead of quoting the original, which is used later.
311 ECHO=$echo
312 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
313    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
314 fi
315
316
317 ac_help="$ac_help
318   --disable-libtool-lock  avoid locking (might break parallel builds)"
319 ac_help="$ac_help
320   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
321 ac_help="$ac_help
322
323 See INSTALL file for further details."
324
325 # Initialize some variables set by options.
326 # The variables have the same names as the options, with
327 # dashes changed to underlines.
328 build=NONE
329 cache_file=./config.cache
330 exec_prefix=NONE
331 host=NONE
332 no_create=
333 nonopt=NONE
334 no_recursion=
335 prefix=NONE
336 program_prefix=NONE
337 program_suffix=NONE
338 program_transform_name=s,x,x,
339 silent=
340 site=
341 srcdir=
342 target=NONE
343 verbose=
344 x_includes=NONE
345 x_libraries=NONE
346 bindir='${exec_prefix}/bin'
347 sbindir='${exec_prefix}/sbin'
348 libexecdir='${exec_prefix}/libexec'
349 datadir='${prefix}/share'
350 sysconfdir='${prefix}/etc'
351 sharedstatedir='${prefix}/com'
352 localstatedir='${prefix}/var'
353 libdir='${exec_prefix}/lib'
354 includedir='${prefix}/include'
355 oldincludedir='/usr/include'
356 infodir='${prefix}/info'
357 mandir='${prefix}/man'
358
359 # Initialize some other variables.
360 subdirs=
361 MFLAGS= MAKEFLAGS=
362 SHELL=${CONFIG_SHELL-/bin/sh}
363 # Maximum number of lines to put in a shell here document.
364 ac_max_here_lines=12
365
366 ac_prev=
367 for ac_option
368 do
369
370   # If the previous option needs an argument, assign it.
371   if test -n "$ac_prev"; then
372     eval "$ac_prev=\$ac_option"
373     ac_prev=
374     continue
375   fi
376
377   case "$ac_option" in
378   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
379   *) ac_optarg= ;;
380   esac
381
382   # Accept the important Cygnus configure options, so we can diagnose typos.
383
384   case "$ac_option" in
385
386   -bindir | --bindir | --bindi | --bind | --bin | --bi)
387     ac_prev=bindir ;;
388   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
389     bindir="$ac_optarg" ;;
390
391   -build | --build | --buil | --bui | --bu)
392     ac_prev=build ;;
393   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
394     build="$ac_optarg" ;;
395
396   -cache-file | --cache-file | --cache-fil | --cache-fi \
397   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
398     ac_prev=cache_file ;;
399   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
400   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
401     cache_file="$ac_optarg" ;;
402
403   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
404     ac_prev=datadir ;;
405   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
406   | --da=*)
407     datadir="$ac_optarg" ;;
408
409   -disable-* | --disable-*)
410     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
411     # Reject names that are not valid shell variable names.
412     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
413       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
414     fi
415     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
416     eval "enable_${ac_feature}=no" ;;
417
418   -enable-* | --enable-*)
419     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
420     # Reject names that are not valid shell variable names.
421     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
422       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
423     fi
424     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
425     case "$ac_option" in
426       *=*) ;;
427       *) ac_optarg=yes ;;
428     esac
429     eval "enable_${ac_feature}='$ac_optarg'" ;;
430
431   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
432   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
433   | --exec | --exe | --ex)
434     ac_prev=exec_prefix ;;
435   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
436   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
437   | --exec=* | --exe=* | --ex=*)
438     exec_prefix="$ac_optarg" ;;
439
440   -gas | --gas | --ga | --g)
441     # Obsolete; use --with-gas.
442     with_gas=yes ;;
443
444   -help | --help | --hel | --he)
445     # Omit some internal or obsolete options to make the list less imposing.
446     # This message is too long to be a string in the A/UX 3.1 sh.
447     cat << EOF
448 Usage: configure [options] [host]
449 Options: [defaults in brackets after descriptions]
450 Configuration:
451   --cache-file=FILE       cache test results in FILE
452   --help                  print this message
453   --no-create             do not create output files
454   --quiet, --silent       do not print \`checking...' messages
455   --version               print the version of autoconf that created configure
456 Directory and file names:
457   --prefix=PREFIX         install architecture-independent files in PREFIX
458                           [$ac_default_prefix]
459   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
460                           [same as prefix]
461   --bindir=DIR            user executables in DIR [EPREFIX/bin]
462   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
463   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
464   --datadir=DIR           read-only architecture-independent data in DIR
465                           [PREFIX/share]
466   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
467   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
468                           [PREFIX/com]
469   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
470   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
471   --includedir=DIR        C header files in DIR [PREFIX/include]
472   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
473   --infodir=DIR           info documentation in DIR [PREFIX/info]
474   --mandir=DIR            man documentation in DIR [PREFIX/man]
475   --srcdir=DIR            find the sources in DIR [configure dir or ..]
476   --program-prefix=PREFIX prepend PREFIX to installed program names
477   --program-suffix=SUFFIX append SUFFIX to installed program names
478   --program-transform-name=PROGRAM
479                           run sed PROGRAM on installed program names
480 EOF
481     cat << EOF
482 Host type:
483   --build=BUILD           configure for building on BUILD [BUILD=HOST]
484   --host=HOST             configure for HOST [guessed]
485   --target=TARGET         configure for TARGET [TARGET=HOST]
486 Features and packages:
487   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
488   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
489   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
490   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
491   --x-includes=DIR        X include files are in DIR
492   --x-libraries=DIR       X library files are in DIR
493 EOF
494     if test -n "$ac_help"; then
495       echo "--enable and --with options recognized:$ac_help"
496     fi
497     exit 0 ;;
498
499   -host | --host | --hos | --ho)
500     ac_prev=host ;;
501   -host=* | --host=* | --hos=* | --ho=*)
502     host="$ac_optarg" ;;
503
504   -includedir | --includedir | --includedi | --included | --include \
505   | --includ | --inclu | --incl | --inc)
506     ac_prev=includedir ;;
507   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
508   | --includ=* | --inclu=* | --incl=* | --inc=*)
509     includedir="$ac_optarg" ;;
510
511   -infodir | --infodir | --infodi | --infod | --info | --inf)
512     ac_prev=infodir ;;
513   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
514     infodir="$ac_optarg" ;;
515
516   -libdir | --libdir | --libdi | --libd)
517     ac_prev=libdir ;;
518   -libdir=* | --libdir=* | --libdi=* | --libd=*)
519     libdir="$ac_optarg" ;;
520
521   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
522   | --libexe | --libex | --libe)
523     ac_prev=libexecdir ;;
524   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
525   | --libexe=* | --libex=* | --libe=*)
526     libexecdir="$ac_optarg" ;;
527
528   -localstatedir | --localstatedir | --localstatedi | --localstated \
529   | --localstate | --localstat | --localsta | --localst \
530   | --locals | --local | --loca | --loc | --lo)
531     ac_prev=localstatedir ;;
532   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
533   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
534   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
535     localstatedir="$ac_optarg" ;;
536
537   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
538     ac_prev=mandir ;;
539   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
540     mandir="$ac_optarg" ;;
541
542   -nfp | --nfp | --nf)
543     # Obsolete; use --without-fp.
544     with_fp=no ;;
545
546   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
547   | --no-cr | --no-c)
548     no_create=yes ;;
549
550   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
551   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
552     no_recursion=yes ;;
553
554   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
555   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
556   | --oldin | --oldi | --old | --ol | --o)
557     ac_prev=oldincludedir ;;
558   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
559   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
560   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
561     oldincludedir="$ac_optarg" ;;
562
563   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
564     ac_prev=prefix ;;
565   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
566     prefix="$ac_optarg" ;;
567
568   -program-prefix | --program-prefix | --program-prefi | --program-pref \
569   | --program-pre | --program-pr | --program-p)
570     ac_prev=program_prefix ;;
571   -program-prefix=* | --program-prefix=* | --program-prefi=* \
572   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
573     program_prefix="$ac_optarg" ;;
574
575   -program-suffix | --program-suffix | --program-suffi | --program-suff \
576   | --program-suf | --program-su | --program-s)
577     ac_prev=program_suffix ;;
578   -program-suffix=* | --program-suffix=* | --program-suffi=* \
579   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
580     program_suffix="$ac_optarg" ;;
581
582   -program-transform-name | --program-transform-name \
583   | --program-transform-nam | --program-transform-na \
584   | --program-transform-n | --program-transform- \
585   | --program-transform | --program-transfor \
586   | --program-transfo | --program-transf \
587   | --program-trans | --program-tran \
588   | --progr-tra | --program-tr | --program-t)
589     ac_prev=program_transform_name ;;
590   -program-transform-name=* | --program-transform-name=* \
591   | --program-transform-nam=* | --program-transform-na=* \
592   | --program-transform-n=* | --program-transform-=* \
593   | --program-transform=* | --program-transfor=* \
594   | --program-transfo=* | --program-transf=* \
595   | --program-trans=* | --program-tran=* \
596   | --progr-tra=* | --program-tr=* | --program-t=*)
597     program_transform_name="$ac_optarg" ;;
598
599   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
600   | -silent | --silent | --silen | --sile | --sil)
601     silent=yes ;;
602
603   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
604     ac_prev=sbindir ;;
605   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
606   | --sbi=* | --sb=*)
607     sbindir="$ac_optarg" ;;
608
609   -sharedstatedir | --sharedstatedir | --sharedstatedi \
610   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
611   | --sharedst | --shareds | --shared | --share | --shar \
612   | --sha | --sh)
613     ac_prev=sharedstatedir ;;
614   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
615   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
616   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
617   | --sha=* | --sh=*)
618     sharedstatedir="$ac_optarg" ;;
619
620   -site | --site | --sit)
621     ac_prev=site ;;
622   -site=* | --site=* | --sit=*)
623     site="$ac_optarg" ;;
624
625   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
626     ac_prev=srcdir ;;
627   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
628     srcdir="$ac_optarg" ;;
629
630   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
631   | --syscon | --sysco | --sysc | --sys | --sy)
632     ac_prev=sysconfdir ;;
633   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
634   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
635     sysconfdir="$ac_optarg" ;;
636
637   -target | --target | --targe | --targ | --tar | --ta | --t)
638     ac_prev=target ;;
639   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
640     target="$ac_optarg" ;;
641
642   -v | -verbose | --verbose | --verbos | --verbo | --verb)
643     verbose=yes ;;
644
645   -version | --version | --versio | --versi | --vers)
646     echo "configure generated by autoconf version 2.13.1"
647     exit 0 ;;
648
649   -with-* | --with-*)
650     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
651     # Reject names that are not valid shell variable names.
652     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
653       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
654     fi
655     ac_package=`echo $ac_package| sed 's/-/_/g'`
656     case "$ac_option" in
657       *=*) ;;
658       *) ac_optarg=yes ;;
659     esac
660     eval "with_${ac_package}='$ac_optarg'" ;;
661
662   -without-* | --without-*)
663     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
664     # Reject names that are not valid shell variable names.
665     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
666       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
667     fi
668     ac_package=`echo $ac_package| sed 's/-/_/g'`
669     eval "with_${ac_package}=no" ;;
670
671   --x)
672     # Obsolete; use --with-x.
673     with_x=yes ;;
674
675   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
676   | --x-incl | --x-inc | --x-in | --x-i)
677     ac_prev=x_includes ;;
678   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
679   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
680     x_includes="$ac_optarg" ;;
681
682   -x-libraries | --x-libraries | --x-librarie | --x-librari \
683   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
684     ac_prev=x_libraries ;;
685   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
686   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
687     x_libraries="$ac_optarg" ;;
688
689   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
690     ;;
691
692   *)
693     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
694       echo "configure: warning: $ac_option: invalid host type" 1>&2
695     fi
696     if test "x$nonopt" != xNONE; then
697       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
698     fi
699     nonopt="$ac_option"
700     ;;
701
702   esac
703 done
704
705 if test -n "$ac_prev"; then
706   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
707 fi
708
709 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
710
711 # File descriptor usage:
712 # 0 standard input
713 # 1 file creation
714 # 2 errors and warnings
715 # 3 some systems may open it to /dev/tty
716 # 4 used on the Kubota Titan
717 # 6 checking for... messages and results
718 # 5 compiler messages saved in config.log
719 if test "$silent" = yes; then
720   exec 6>/dev/null
721 else
722   exec 6>&1
723 fi
724 exec 5>./config.log
725
726 echo "\
727 This file contains any messages produced by compilers while
728 running configure, to aid debugging if configure makes a mistake.
729 " 1>&5
730
731 # Strip out --no-create and --no-recursion so they do not pile up.
732 # Also quote any args containing shell metacharacters.
733 ac_configure_args=
734 for ac_arg
735 do
736   case "$ac_arg" in
737   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
738   | --no-cr | --no-c) ;;
739   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
740   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
741   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
742   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
743   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
744   esac
745 done
746
747 # NLS nuisances.
748 # Only set these to C if already set.  These must not be set unconditionally
749 # because not all systems understand e.g. LANG=C (notably SCO).
750 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
751 # Non-C LC_CTYPE values break the ctype check.
752 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
753 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
754 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
755 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
756
757 # confdefs.h avoids OS command line length limits that DEFS can exceed.
758 rm -rf conftest* confdefs.h
759 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
760 echo > confdefs.h
761
762 # A filename unique to this package, relative to the directory that
763 # configure is in, which we can look for to find out if srcdir is correct.
764 ac_unique_file=build/version.sh
765
766 # Find the source files, if location was not specified.
767 if test -z "$srcdir"; then
768   ac_srcdir_defaulted=yes
769   # Try the directory containing this script, then its parent.
770   ac_prog=$0
771   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
772   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
773   srcdir=$ac_confdir
774   if test ! -r $srcdir/$ac_unique_file; then
775     srcdir=..
776   fi
777 else
778   ac_srcdir_defaulted=no
779 fi
780 if test ! -r $srcdir/$ac_unique_file; then
781   if test "$ac_srcdir_defaulted" = yes; then
782     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
783   else
784     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
785   fi
786 fi
787 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
788
789 # Prefer explicitly selected file to automatically selected ones.
790 if test -z "$CONFIG_SITE"; then
791   if test "x$prefix" != xNONE; then
792     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
793   else
794     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
795   fi
796 fi
797 for ac_site_file in $CONFIG_SITE; do
798   if test -r "$ac_site_file"; then
799     echo "loading site script $ac_site_file"
800     . "$ac_site_file"
801   fi
802 done
803
804
805 ac_ext=c
806 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
807 ac_cpp='$CPP $CPPFLAGS'
808 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
809 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
810 cross_compiling=$ac_cv_prog_cc_cross
811
812 ac_exeext=
813 ac_objext=o
814 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
815   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
816   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
817     ac_n= ac_c='
818 ' ac_t='        '
819   else
820     ac_n=-n ac_c= ac_t=
821   fi
822 else
823   ac_n= ac_c='\c' ac_t=
824 fi
825
826
827 # set unset (borrowed from autoconf 2.49c)
828 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
829   ol_unset=unset
830 else
831   ol_unset=false
832 fi
833 # unset CDPATH
834 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
835
836 ac_aux_dir=
837 for ac_dir in build $srcdir/build; do
838   if test -f $ac_dir/install-sh; then
839     ac_aux_dir=$ac_dir
840     ac_install_sh="$ac_aux_dir/install-sh -c"
841     break
842   elif test -f $ac_dir/install.sh; then
843     ac_aux_dir=$ac_dir
844     ac_install_sh="$ac_aux_dir/install.sh -c"
845     break
846   elif test -f $ac_dir/shtool; then
847     ac_aux_dir=$ac_dir
848     ac_install_sh="$ac_aux_dir/shtool install -c"
849     break
850   fi
851 done
852 if test -z "$ac_aux_dir"; then
853   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
854 fi
855 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
856 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
857 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
858
859 eval `$ac_aux_dir/version.sh`
860 if test -z "$OL_STRING"; then
861         { echo "configure: error: could not determine version" 1>&2; exit 1; }
862 fi
863
864 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
865         ac_cv_shtool="$ac_aux_dir/shtool"
866 else
867         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
868 fi
869
870 SHTOOL="$ac_cv_shtool"
871
872 TB="`$SHTOOL echo -e '%B' 2>/dev/null`"
873 TN="`$SHTOOL echo -e '%b' 2>/dev/null`"
874
875 OPENLDAP_CVS=""
876 if test -d $ac_aux_dir/CVS; then
877         OPENLDAP_CVS="(from CVS sources) "
878 fi
879
880 echo "Configuring ${TB}${OL_STRING}${TN} ${OPENLDAP_CVS}..."
881
882
883 echo $ac_n "checking host system type""... $ac_c" 1>&6
884 echo "configure:885: checking host system type" >&5
885 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
886
887 # Make sure we can run config.sub.
888   if $ac_config_sub sun4 >/dev/null 2>&1; then :
889     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
890   fi
891
892   ac_cv_host_alias=$host
893   case "$ac_cv_host_alias" in
894   NONE)
895     case $nonopt in
896     NONE)
897       if ac_cv_host_alias=`$ac_config_guess`; then :
898       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
899       fi ;;
900     *) ac_cv_host_alias=$nonopt ;;
901     esac ;;
902   esac
903
904   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
905   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
906   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
907   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
908 else
909   echo $ac_n "(cached) $ac_c" 1>&6
910 fi
911
912 echo "$ac_t""$ac_cv_host" 1>&6
913
914 host=$ac_cv_host
915 host_alias=$ac_cv_host_alias
916 host_cpu=$ac_cv_host_cpu
917 host_vendor=$ac_cv_host_vendor
918 host_os=$ac_cv_host_os
919
920
921
922
923
924 echo $ac_n "checking target system type""... $ac_c" 1>&6
925 echo "configure:926: checking target system type" >&5
926 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
927
928 # Make sure we can run config.sub.
929   if $ac_config_sub sun4 >/dev/null 2>&1; then :
930     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
931   fi
932
933   ac_cv_target_alias=$target
934   case "$ac_cv_target_alias" in
935   NONE)
936     case $nonopt in
937     NONE)
938       ac_cv_target_alias=$host_alias ;;
939
940     *) ac_cv_target_alias=$nonopt ;;
941     esac ;;
942   esac
943
944   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
945   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
946   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
947   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
948 else
949   echo $ac_n "(cached) $ac_c" 1>&6
950 fi
951
952 echo "$ac_t""$ac_cv_target" 1>&6
953
954 target=$ac_cv_target
955 target_alias=$ac_cv_target_alias
956 target_cpu=$ac_cv_target_cpu
957 target_vendor=$ac_cv_target_vendor
958 target_os=$ac_cv_target_os
959
960
961
962
963
964 echo $ac_n "checking build system type""... $ac_c" 1>&6
965 echo "configure:966: checking build system type" >&5
966 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
967
968 # Make sure we can run config.sub.
969   if $ac_config_sub sun4 >/dev/null 2>&1; then :
970     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
971   fi
972
973   ac_cv_build_alias=$build
974   case "$ac_cv_build_alias" in
975   NONE)
976     case $nonopt in
977     NONE)
978       ac_cv_build_alias=$host_alias ;;
979
980     *) ac_cv_build_alias=$nonopt ;;
981     esac ;;
982   esac
983
984   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
985   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
986   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
987   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
988 else
989   echo $ac_n "(cached) $ac_c" 1>&6
990 fi
991
992 echo "$ac_t""$ac_cv_build" 1>&6
993
994 build=$ac_cv_build
995 build_alias=$ac_cv_build_alias
996 build_cpu=$ac_cv_build_cpu
997 build_vendor=$ac_cv_build_vendor
998 build_os=$ac_cv_build_os
999
1000
1001
1002
1003
1004 # Do some error checking and defaulting for the host and target type.
1005 # The inputs are:
1006 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1007 #
1008 # The rules are:
1009 # 1. You are not allowed to specify --host, --target, and nonopt at the
1010 #    same time.
1011 # 2. Host defaults to nonopt.
1012 # 3. If nonopt is not specified, then host defaults to the current host,
1013 #    as determined by config.guess.
1014 # 4. Target and build default to nonopt.
1015 # 5. If nonopt is not specified, then target and build default to host.
1016
1017 # The aliases save the names the user supplied, while $host etc.
1018 # will get canonicalized.
1019 case $host---$target---$nonopt in
1020 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1021 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1022 esac
1023
1024 test "$host_alias" != "$target_alias" &&
1025   test "$program_prefix$program_suffix$program_transform_name" = \
1026     NONENONEs,x,x, &&
1027   program_prefix=${target_alias}-
1028
1029
1030 # Find a good install program.  We prefer a C program (faster),
1031 # so one script is as good as another.  But avoid the broken or
1032 # incompatible versions:
1033 # SysV /etc/install, /usr/sbin/install
1034 # SunOS /usr/etc/install
1035 # IRIX /sbin/install
1036 # AIX /bin/install
1037 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1038 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1039 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1040 # ./install, which can be erroneously created by make from ./install.sh.
1041 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1042 echo "configure:1043: checking for a BSD compatible install" >&5
1043 if test -z "$INSTALL"; then
1044 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1045   echo $ac_n "(cached) $ac_c" 1>&6
1046 else
1047     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1048   for ac_dir in $PATH; do
1049     # Account for people who put trailing slashes in PATH elements.
1050     case "$ac_dir/" in
1051     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1052     *)
1053       # OSF1 and SCO ODT 3.0 have their own names for install.
1054       # Don't use installbsd from OSF since it installs stuff as root
1055       # by default.
1056       for ac_prog in ginstall scoinst install; do
1057         if test -f $ac_dir/$ac_prog; then
1058           if test $ac_prog = install &&
1059             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1060             # AIX install.  It has an incompatible calling convention.
1061             :
1062           elif test $ac_prog = install &&
1063             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1064             # program-specific install script used by HP pwplus--don't use.
1065             :
1066           else
1067             ac_cv_path_install="$ac_dir/$ac_prog -c"
1068             break 2
1069           fi
1070         fi
1071       done
1072       ;;
1073     esac
1074   done
1075   IFS="$ac_save_IFS"
1076
1077 fi
1078   if test "${ac_cv_path_install+set}" = set; then
1079     INSTALL="$ac_cv_path_install"
1080   else
1081     # As a last resort, use the slow shell script.  We don't cache a
1082     # path for INSTALL within a source directory, because that will
1083     # break other packages using the cache if that directory is
1084     # removed, or if the path is relative.
1085     INSTALL="$ac_install_sh"
1086   fi
1087 fi
1088 echo "$ac_t""$INSTALL" 1>&6
1089
1090 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1091 # It thinks the first close brace ends the variable substitution.
1092 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1093
1094 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1095
1096 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1097
1098 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1099 echo "configure:1100: checking whether build environment is sane" >&5
1100 # Just in case
1101 sleep 1
1102 echo timestamp > conftestfile
1103 # Do `set' in a subshell so we don't clobber the current shell's
1104 # arguments.  Must try -L first in case configure is actually a
1105 # symlink; some systems play weird games with the mod time of symlinks
1106 # (eg FreeBSD returns the mod time of the symlink's containing
1107 # directory).
1108 if (
1109    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1110    if test "$*" = "X"; then
1111       # -L didn't work.
1112       set X `ls -t $srcdir/configure conftestfile`
1113    fi
1114    if test "$*" != "X $srcdir/configure conftestfile" \
1115       && test "$*" != "X conftestfile $srcdir/configure"; then
1116
1117       # If neither matched, then we have a broken ls.  This can happen
1118       # if, for instance, CONFIG_SHELL is bash and it inherits a
1119       # broken ls alias from the environment.  This has actually
1120       # happened.  Such a system could not be considered "sane".
1121       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1122 alias in your environment" 1>&2; exit 1; }
1123    fi
1124
1125    test "$2" = conftestfile
1126    )
1127 then
1128    # Ok.
1129    :
1130 else
1131    { echo "configure: error: newly created file is older than distributed files!
1132 Check your system clock" 1>&2; exit 1; }
1133 fi
1134 rm -f conftest*
1135 echo "$ac_t""yes" 1>&6
1136 if test "$program_transform_name" = s,x,x,; then
1137   program_transform_name=
1138 else
1139   # Double any \ or $.  echo might interpret backslashes.
1140   cat <<\EOF_SED > conftestsed
1141 s,\\,\\\\,g; s,\$,$$,g
1142 EOF_SED
1143   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1144   rm -f conftestsed
1145 fi
1146 test "$program_prefix" != NONE &&
1147   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1148 # Use a double $ so make ignores it.
1149 test "$program_suffix" != NONE &&
1150   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1151
1152 # sed with no file args requires a program.
1153 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1154
1155 for ac_prog in mawk gawk nawk awk
1156 do
1157 # Extract the first word of "$ac_prog", so it can be a program name with args.
1158 set dummy $ac_prog; ac_word=$2
1159 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1160 echo "configure:1161: checking for $ac_word" >&5
1161 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1162   echo $ac_n "(cached) $ac_c" 1>&6
1163 else
1164   if test -n "$AWK"; then
1165   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1166 else
1167   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1168   ac_dummy="$PATH"
1169   for ac_dir in $ac_dummy; do
1170     test -z "$ac_dir" && ac_dir=.
1171     if test -f $ac_dir/$ac_word; then
1172       ac_cv_prog_AWK="$ac_prog"
1173       break
1174     fi
1175   done
1176   IFS="$ac_save_ifs"
1177 fi
1178 fi
1179 AWK="$ac_cv_prog_AWK"
1180 if test -n "$AWK"; then
1181   echo "$ac_t""$AWK" 1>&6
1182 else
1183   echo "$ac_t""no" 1>&6
1184 fi
1185
1186 test -n "$AWK" && break
1187 done
1188
1189 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1190 echo "configure:1191: checking whether ${MAKE-make} sets \${MAKE}" >&5
1191 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1192 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1193   echo $ac_n "(cached) $ac_c" 1>&6
1194 else
1195   cat > conftestmake <<\EOF
1196 all:
1197         @echo 'ac_maketemp="${MAKE}"'
1198 EOF
1199 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1200 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1201 if test -n "$ac_maketemp"; then
1202   eval ac_cv_prog_make_${ac_make}_set=yes
1203 else
1204   eval ac_cv_prog_make_${ac_make}_set=no
1205 fi
1206 rm -f conftestmake
1207 fi
1208 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1209   echo "$ac_t""yes" 1>&6
1210   SET_MAKE=
1211 else
1212   echo "$ac_t""no" 1>&6
1213   SET_MAKE="MAKE=${MAKE-make}"
1214 fi
1215
1216
1217
1218 PACKAGE=$OL_PACKAGE
1219
1220 VERSION=$OL_VERSION
1221
1222 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1223   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1224 fi
1225
1226
1227
1228 missing_dir=`cd $ac_aux_dir && pwd`
1229 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1230 echo "configure:1231: checking for working aclocal" >&5
1231 # Run test in a subshell; some versions of sh will print an error if
1232 # an executable is not found, even if stderr is redirected.
1233 # Redirect stdin to placate older versions of autoconf.  Sigh.
1234 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1235    ACLOCAL=aclocal
1236    echo "$ac_t""found" 1>&6
1237 else
1238    ACLOCAL="$missing_dir/missing aclocal"
1239    echo "$ac_t""missing" 1>&6
1240 fi
1241
1242 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1243 echo "configure:1244: checking for working autoconf" >&5
1244 # Run test in a subshell; some versions of sh will print an error if
1245 # an executable is not found, even if stderr is redirected.
1246 # Redirect stdin to placate older versions of autoconf.  Sigh.
1247 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1248    AUTOCONF=autoconf
1249    echo "$ac_t""found" 1>&6
1250 else
1251    AUTOCONF="$missing_dir/missing autoconf"
1252    echo "$ac_t""missing" 1>&6
1253 fi
1254
1255 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1256 echo "configure:1257: checking for working automake" >&5
1257 # Run test in a subshell; some versions of sh will print an error if
1258 # an executable is not found, even if stderr is redirected.
1259 # Redirect stdin to placate older versions of autoconf.  Sigh.
1260 if (automake --version) < /dev/null > /dev/null 2>&1; then
1261    AUTOMAKE=automake
1262    echo "$ac_t""found" 1>&6
1263 else
1264    AUTOMAKE="$missing_dir/missing automake"
1265    echo "$ac_t""missing" 1>&6
1266 fi
1267
1268 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1269 echo "configure:1270: checking for working autoheader" >&5
1270 # Run test in a subshell; some versions of sh will print an error if
1271 # an executable is not found, even if stderr is redirected.
1272 # Redirect stdin to placate older versions of autoconf.  Sigh.
1273 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1274    AUTOHEADER=autoheader
1275    echo "$ac_t""found" 1>&6
1276 else
1277    AUTOHEADER="$missing_dir/missing autoheader"
1278    echo "$ac_t""missing" 1>&6
1279 fi
1280
1281 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1282 echo "configure:1283: checking for working makeinfo" >&5
1283 # Run test in a subshell; some versions of sh will print an error if
1284 # an executable is not found, even if stderr is redirected.
1285 # Redirect stdin to placate older versions of autoconf.  Sigh.
1286 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1287    MAKEINFO=makeinfo
1288    echo "$ac_t""found" 1>&6
1289 else
1290    MAKEINFO="$missing_dir/missing makeinfo"
1291    echo "$ac_t""missing" 1>&6
1292 fi
1293
1294 install_sh="$missing_dir/install-sh"
1295 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1296
1297 for ac_prog in gnutar gtar tar
1298 do
1299 # Extract the first word of "$ac_prog", so it can be a program name with args.
1300 set dummy $ac_prog; ac_word=$2
1301 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1302 echo "configure:1303: checking for $ac_word" >&5
1303 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1304   echo $ac_n "(cached) $ac_c" 1>&6
1305 else
1306   if test -n "$AMTAR"; then
1307   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1308 else
1309   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1310   ac_dummy="$PATH"
1311   for ac_dir in $ac_dummy; do
1312     test -z "$ac_dir" && ac_dir=.
1313     if test -f $ac_dir/$ac_word; then
1314       ac_cv_prog_AMTAR="$ac_prog"
1315       break
1316     fi
1317   done
1318   IFS="$ac_save_ifs"
1319 fi
1320 fi
1321 AMTAR="$ac_cv_prog_AMTAR"
1322 if test -n "$AMTAR"; then
1323   echo "$ac_t""$AMTAR" 1>&6
1324 else
1325   echo "$ac_t""no" 1>&6
1326 fi
1327
1328 test -n "$AMTAR" && break
1329 done
1330
1331
1332 AMTARFLAGS=
1333 if test -n "$AMTAR"; then
1334   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1335         AMTARFLAGS=o
1336   fi
1337 fi
1338
1339 cat >> confdefs.h <<EOF
1340 #define OPENLDAP_PACKAGE "$PACKAGE"
1341 EOF
1342
1343 cat >> confdefs.h <<EOF
1344 #define OPENLDAP_VERSION "$VERSION"
1345 EOF
1346
1347
1348 cat >> confdefs.h <<EOF
1349 #define LDAP_VENDOR_VERSION $OL_API_INC
1350 EOF
1351
1352 cat >> confdefs.h <<EOF
1353 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1354 EOF
1355
1356 cat >> confdefs.h <<EOF
1357 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1358 EOF
1359
1360 cat >> confdefs.h <<EOF
1361 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1362 EOF
1363
1364
1365 OPENLDAP_LIBVERSION=$OL_API_LIB
1366
1367 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1368
1369
1370
1371 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1372 echo "configure:1373: checking configure arguments" >&5
1373
1374
1375 top_builddir=`pwd`
1376
1377 ldap_subdir="/openldap"
1378
1379 # Check whether --with-subdir or --without-subdir was given.
1380 if test "${with_subdir+set}" = set; then
1381   withval="$with_subdir"
1382   case "$withval" in
1383         no) ldap_subdir=""
1384                 ;;
1385         yes)
1386                 ;;
1387         /*|\\*)
1388                 ldap_subdir="$withval"
1389                 ;;
1390         *)
1391                 ldap_subdir="/$withval"
1392                 ;;
1393 esac
1394
1395 fi
1396
1397
1398 # OpenLDAP --enable-debug
1399         # Check whether --enable-debug or --disable-debug was given.
1400 if test "${enable_debug+set}" = set; then
1401   enableval="$enable_debug"
1402   
1403         ol_arg=invalid
1404         for ol_val in auto yes no ; do
1405                 if test "$enableval" = "$ol_val" ; then
1406                         ol_arg="$ol_val"
1407                 fi
1408         done
1409         if test "$ol_arg" = "invalid" ; then
1410                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1411         fi
1412         ol_enable_debug="$ol_arg"
1413
1414 else
1415         ol_enable_debug="yes"
1416 fi
1417 # end --enable-debug
1418 # OpenLDAP --enable-dynamic
1419         # Check whether --enable-dynamic or --disable-dynamic was given.
1420 if test "${enable_dynamic+set}" = set; then
1421   enableval="$enable_dynamic"
1422   
1423         ol_arg=invalid
1424         for ol_val in auto yes no ; do
1425                 if test "$enableval" = "$ol_val" ; then
1426                         ol_arg="$ol_val"
1427                 fi
1428         done
1429         if test "$ol_arg" = "invalid" ; then
1430                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1431         fi
1432         ol_enable_dynamic="$ol_arg"
1433
1434 else
1435         ol_enable_dynamic="no"
1436 fi
1437 # end --enable-dynamic
1438 # OpenLDAP --enable-syslog
1439         # Check whether --enable-syslog or --disable-syslog was given.
1440 if test "${enable_syslog+set}" = set; then
1441   enableval="$enable_syslog"
1442   
1443         ol_arg=invalid
1444         for ol_val in auto yes no ; do
1445                 if test "$enableval" = "$ol_val" ; then
1446                         ol_arg="$ol_val"
1447                 fi
1448         done
1449         if test "$ol_arg" = "invalid" ; then
1450                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1451         fi
1452         ol_enable_syslog="$ol_arg"
1453
1454 else
1455         ol_enable_syslog="auto"
1456 fi
1457 # end --enable-syslog
1458 # OpenLDAP --enable-proctitle
1459         # Check whether --enable-proctitle or --disable-proctitle was given.
1460 if test "${enable_proctitle+set}" = set; then
1461   enableval="$enable_proctitle"
1462   
1463         ol_arg=invalid
1464         for ol_val in auto yes no ; do
1465                 if test "$enableval" = "$ol_val" ; then
1466                         ol_arg="$ol_val"
1467                 fi
1468         done
1469         if test "$ol_arg" = "invalid" ; then
1470                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1471         fi
1472         ol_enable_proctitle="$ol_arg"
1473
1474 else
1475         ol_enable_proctitle="yes"
1476 fi
1477 # end --enable-proctitle
1478 ol_enable_referrals=${ol_enable_referrals-no}
1479 ol_enable_kbind=${ol_enable_kbind-no}
1480 # OpenLDAP --enable-ipv6
1481         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1482 if test "${enable_ipv6+set}" = set; then
1483   enableval="$enable_ipv6"
1484   
1485         ol_arg=invalid
1486         for ol_val in auto yes no ; do
1487                 if test "$enableval" = "$ol_val" ; then
1488                         ol_arg="$ol_val"
1489                 fi
1490         done
1491         if test "$ol_arg" = "invalid" ; then
1492                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1493         fi
1494         ol_enable_ipv6="$ol_arg"
1495
1496 else
1497         ol_enable_ipv6="auto"
1498 fi
1499 # end --enable-ipv6
1500 # OpenLDAP --enable-local
1501         # Check whether --enable-local or --disable-local was given.
1502 if test "${enable_local+set}" = set; then
1503   enableval="$enable_local"
1504   
1505         ol_arg=invalid
1506         for ol_val in auto yes no ; do
1507                 if test "$enableval" = "$ol_val" ; then
1508                         ol_arg="$ol_val"
1509                 fi
1510         done
1511         if test "$ol_arg" = "invalid" ; then
1512                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1513         fi
1514         ol_enable_local="$ol_arg"
1515
1516 else
1517         ol_enable_local="auto"
1518 fi
1519 # end --enable-local
1520 # OpenLDAP --enable-x_compile
1521         # Check whether --enable-x_compile or --disable-x_compile was given.
1522 if test "${enable_x_compile+set}" = set; then
1523   enableval="$enable_x_compile"
1524   
1525         ol_arg=invalid
1526         for ol_val in yes no ; do
1527                 if test "$enableval" = "$ol_val" ; then
1528                         ol_arg="$ol_val"
1529                 fi
1530         done
1531         if test "$ol_arg" = "invalid" ; then
1532                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1533         fi
1534         ol_enable_x_compile="$ol_arg"
1535
1536 else
1537         ol_enable_x_compile="no"
1538 fi
1539 # end --enable-x_compile
1540
1541
1542 # OpenLDAP --with-cyrus_sasl
1543         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1544 if test "${with_cyrus_sasl+set}" = set; then
1545   withval="$with_cyrus_sasl"
1546   
1547         ol_arg=invalid
1548         for ol_val in auto yes no  ; do
1549                 if test "$withval" = "$ol_val" ; then
1550                         ol_arg="$ol_val"
1551                 fi
1552         done
1553         if test "$ol_arg" = "invalid" ; then
1554                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1555         fi
1556         ol_with_cyrus_sasl="$ol_arg"
1557
1558 else
1559         ol_with_cyrus_sasl="auto"
1560 fi
1561 # end --with-cyrus_sasl
1562
1563 # OpenLDAP --with-fetch
1564         # Check whether --with-fetch or --without-fetch was given.
1565 if test "${with_fetch+set}" = set; then
1566   withval="$with_fetch"
1567   
1568         ol_arg=invalid
1569         for ol_val in auto yes no  ; do
1570                 if test "$withval" = "$ol_val" ; then
1571                         ol_arg="$ol_val"
1572                 fi
1573         done
1574         if test "$ol_arg" = "invalid" ; then
1575                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1576         fi
1577         ol_with_fetch="$ol_arg"
1578
1579 else
1580         ol_with_fetch="auto"
1581 fi
1582 # end --with-fetch
1583
1584 ol_with_kerberos=${ol_with_kerberos-auto}
1585 # OpenLDAP --with-threads
1586         # Check whether --with-threads or --without-threads was given.
1587 if test "${with_threads+set}" = set; then
1588   withval="$with_threads"
1589   
1590         ol_arg=invalid
1591         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1592                 if test "$withval" = "$ol_val" ; then
1593                         ol_arg="$ol_val"
1594                 fi
1595         done
1596         if test "$ol_arg" = "invalid" ; then
1597                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1598         fi
1599         ol_with_threads="$ol_arg"
1600
1601 else
1602         ol_with_threads="auto"
1603 fi
1604 # end --with-threads
1605
1606 # OpenLDAP --with-tls
1607         # Check whether --with-tls or --without-tls was given.
1608 if test "${with_tls+set}" = set; then
1609   withval="$with_tls"
1610   
1611         ol_arg=invalid
1612         for ol_val in auto ssleay openssl yes no  ; do
1613                 if test "$withval" = "$ol_val" ; then
1614                         ol_arg="$ol_val"
1615                 fi
1616         done
1617         if test "$ol_arg" = "invalid" ; then
1618                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1619         fi
1620         ol_with_tls="$ol_arg"
1621
1622 else
1623         ol_with_tls="auto"
1624 fi
1625 # end --with-tls
1626
1627 # OpenLDAP --with-yielding_select
1628         # Check whether --with-yielding_select or --without-yielding_select was given.
1629 if test "${with_yielding_select+set}" = set; then
1630   withval="$with_yielding_select"
1631   
1632         ol_arg=invalid
1633         for ol_val in auto yes no manual  ; do
1634                 if test "$withval" = "$ol_val" ; then
1635                         ol_arg="$ol_val"
1636                 fi
1637         done
1638         if test "$ol_arg" = "invalid" ; then
1639                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1640         fi
1641         ol_with_yielding_select="$ol_arg"
1642
1643 else
1644         ol_with_yielding_select="auto"
1645 fi
1646 # end --with-yielding_select
1647
1648
1649
1650 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1651 if test "${with_xxslapdoptions+set}" = set; then
1652   withval="$with_xxslapdoptions"
1653   :
1654 fi
1655
1656 # OpenLDAP --enable-slapd
1657         # Check whether --enable-slapd or --disable-slapd was given.
1658 if test "${enable_slapd+set}" = set; then
1659   enableval="$enable_slapd"
1660   
1661         ol_arg=invalid
1662         for ol_val in auto yes no ; do
1663                 if test "$enableval" = "$ol_val" ; then
1664                         ol_arg="$ol_val"
1665                 fi
1666         done
1667         if test "$ol_arg" = "invalid" ; then
1668                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1669         fi
1670         ol_enable_slapd="$ol_arg"
1671
1672 else
1673         ol_enable_slapd="yes"
1674 fi
1675 # end --enable-slapd
1676 # OpenLDAP --enable-aci
1677         # Check whether --enable-aci or --disable-aci was given.
1678 if test "${enable_aci+set}" = set; then
1679   enableval="$enable_aci"
1680   
1681         ol_arg=invalid
1682         for ol_val in auto yes no ; do
1683                 if test "$enableval" = "$ol_val" ; then
1684                         ol_arg="$ol_val"
1685                 fi
1686         done
1687         if test "$ol_arg" = "invalid" ; then
1688                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1689         fi
1690         ol_enable_aci="$ol_arg"
1691
1692 else
1693         ol_enable_aci="no"
1694 fi
1695 # end --enable-aci
1696 # OpenLDAP --enable-cleartext
1697         # Check whether --enable-cleartext or --disable-cleartext was given.
1698 if test "${enable_cleartext+set}" = set; then
1699   enableval="$enable_cleartext"
1700   
1701         ol_arg=invalid
1702         for ol_val in auto yes no ; do
1703                 if test "$enableval" = "$ol_val" ; then
1704                         ol_arg="$ol_val"
1705                 fi
1706         done
1707         if test "$ol_arg" = "invalid" ; then
1708                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1709         fi
1710         ol_enable_cleartext="$ol_arg"
1711
1712 else
1713         ol_enable_cleartext="yes"
1714 fi
1715 # end --enable-cleartext
1716 # OpenLDAP --enable-crypt
1717         # Check whether --enable-crypt or --disable-crypt was given.
1718 if test "${enable_crypt+set}" = set; then
1719   enableval="$enable_crypt"
1720   
1721         ol_arg=invalid
1722         for ol_val in auto yes no ; do
1723                 if test "$enableval" = "$ol_val" ; then
1724                         ol_arg="$ol_val"
1725                 fi
1726         done
1727         if test "$ol_arg" = "invalid" ; then
1728                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1729         fi
1730         ol_enable_crypt="$ol_arg"
1731
1732 else
1733         ol_enable_crypt="no"
1734 fi
1735 # end --enable-crypt
1736 ol_enable_kpasswd=${ol_enable_kpasswd-no}
1737 # OpenLDAP --enable-lmpasswd
1738         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1739 if test "${enable_lmpasswd+set}" = set; then
1740   enableval="$enable_lmpasswd"
1741   
1742         ol_arg=invalid
1743         for ol_val in auto yes no ; do
1744                 if test "$enableval" = "$ol_val" ; then
1745                         ol_arg="$ol_val"
1746                 fi
1747         done
1748         if test "$ol_arg" = "invalid" ; then
1749                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1750         fi
1751         ol_enable_lmpasswd="$ol_arg"
1752
1753 else
1754         ol_enable_lmpasswd="no"
1755 fi
1756 # end --enable-lmpasswd
1757 # OpenLDAP --enable-spasswd
1758         # Check whether --enable-spasswd or --disable-spasswd was given.
1759 if test "${enable_spasswd+set}" = set; then
1760   enableval="$enable_spasswd"
1761   
1762         ol_arg=invalid
1763         for ol_val in auto yes no ; do
1764                 if test "$enableval" = "$ol_val" ; then
1765                         ol_arg="$ol_val"
1766                 fi
1767         done
1768         if test "$ol_arg" = "invalid" ; then
1769                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1770         fi
1771         ol_enable_spasswd="$ol_arg"
1772
1773 else
1774         ol_enable_spasswd="no"
1775 fi
1776 # end --enable-spasswd
1777 # OpenLDAP --enable-modules
1778         # Check whether --enable-modules or --disable-modules was given.
1779 if test "${enable_modules+set}" = set; then
1780   enableval="$enable_modules"
1781   
1782         ol_arg=invalid
1783         for ol_val in auto yes no ; do
1784                 if test "$enableval" = "$ol_val" ; then
1785                         ol_arg="$ol_val"
1786                 fi
1787         done
1788         if test "$ol_arg" = "invalid" ; then
1789                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1790         fi
1791         ol_enable_modules="$ol_arg"
1792
1793 else
1794         ol_enable_modules="no"
1795 fi
1796 # end --enable-modules
1797 ol_enable_multimaster=${ol_enable_multimaster-no}
1798 # OpenLDAP --enable-rewrite
1799         # Check whether --enable-rewrite or --disable-rewrite was given.
1800 if test "${enable_rewrite+set}" = set; then
1801   enableval="$enable_rewrite"
1802   
1803         ol_arg=invalid
1804         for ol_val in auto yes no ; do
1805                 if test "$enableval" = "$ol_val" ; then
1806                         ol_arg="$ol_val"
1807                 fi
1808         done
1809         if test "$ol_arg" = "invalid" ; then
1810                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1811         fi
1812         ol_enable_rewrite="$ol_arg"
1813
1814 else
1815         ol_enable_rewrite="no"
1816 fi
1817 # end --enable-rewrite
1818 # OpenLDAP --enable-rlookups
1819         # Check whether --enable-rlookups or --disable-rlookups was given.
1820 if test "${enable_rlookups+set}" = set; then
1821   enableval="$enable_rlookups"
1822   
1823         ol_arg=invalid
1824         for ol_val in auto yes no ; do
1825                 if test "$enableval" = "$ol_val" ; then
1826                         ol_arg="$ol_val"
1827                 fi
1828         done
1829         if test "$ol_arg" = "invalid" ; then
1830                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1831         fi
1832         ol_enable_rlookups="$ol_arg"
1833
1834 else
1835         ol_enable_rlookups="no"
1836 fi
1837 # end --enable-rlookups
1838 # OpenLDAP --enable-slapi
1839         # Check whether --enable-slapi or --disable-slapi was given.
1840 if test "${enable_slapi+set}" = set; then
1841   enableval="$enable_slapi"
1842   
1843         ol_arg=invalid
1844         for ol_val in auto yes no ; do
1845                 if test "$enableval" = "$ol_val" ; then
1846                         ol_arg="$ol_val"
1847                 fi
1848         done
1849         if test "$ol_arg" = "invalid" ; then
1850                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1851         fi
1852         ol_enable_slapi="$ol_arg"
1853
1854 else
1855         ol_enable_slapi="no"
1856 fi
1857 # end --enable-slapi
1858 # OpenLDAP --enable-slp
1859         # Check whether --enable-slp or --disable-slp was given.
1860 if test "${enable_slp+set}" = set; then
1861   enableval="$enable_slp"
1862   
1863         ol_arg=invalid
1864         for ol_val in auto yes no ; do
1865                 if test "$enableval" = "$ol_val" ; then
1866                         ol_arg="$ol_val"
1867                 fi
1868         done
1869         if test "$ol_arg" = "invalid" ; then
1870                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1871         fi
1872         ol_enable_slp="$ol_arg"
1873
1874 else
1875         ol_enable_slp="no"
1876 fi
1877 # end --enable-slp
1878 # OpenLDAP --enable-wrappers
1879         # Check whether --enable-wrappers or --disable-wrappers was given.
1880 if test "${enable_wrappers+set}" = set; then
1881   enableval="$enable_wrappers"
1882   
1883         ol_arg=invalid
1884         for ol_val in auto yes no ; do
1885                 if test "$enableval" = "$ol_val" ; then
1886                         ol_arg="$ol_val"
1887                 fi
1888         done
1889         if test "$ol_arg" = "invalid" ; then
1890                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1891         fi
1892         ol_enable_wrappers="$ol_arg"
1893
1894 else
1895         ol_enable_wrappers="no"
1896 fi
1897 # end --enable-wrappers
1898
1899
1900 # OpenLDAP --enable-bdb
1901         # Check whether --enable-bdb or --disable-bdb was given.
1902 if test "${enable_bdb+set}" = set; then
1903   enableval="$enable_bdb"
1904   
1905         ol_arg=invalid
1906         for ol_val in auto yes no ; do
1907                 if test "$enableval" = "$ol_val" ; then
1908                         ol_arg="$ol_val"
1909                 fi
1910         done
1911         if test "$ol_arg" = "invalid" ; then
1912                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1913         fi
1914         ol_enable_bdb="$ol_arg"
1915
1916 else
1917         ol_enable_bdb="yes"
1918 fi
1919 # end --enable-bdb
1920 # OpenLDAP --with-bdb_module
1921         # Check whether --with-bdb_module or --without-bdb_module was given.
1922 if test "${with_bdb_module+set}" = set; then
1923   withval="$with_bdb_module"
1924   
1925         ol_arg=invalid
1926         for ol_val in static dynamic ; do
1927                 if test "$withval" = "$ol_val" ; then
1928                         ol_arg="$ol_val"
1929                 fi
1930         done
1931         if test "$ol_arg" = "invalid" ; then
1932                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
1933         fi
1934         ol_with_bdb_module="$ol_arg"
1935
1936 else
1937         ol_with_bdb_module="static"
1938 fi
1939 # end --with-bdb_module
1940
1941 # OpenLDAP --enable-dnssrv
1942         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1943 if test "${enable_dnssrv+set}" = set; then
1944   enableval="$enable_dnssrv"
1945   
1946         ol_arg=invalid
1947         for ol_val in auto yes no ; do
1948                 if test "$enableval" = "$ol_val" ; then
1949                         ol_arg="$ol_val"
1950                 fi
1951         done
1952         if test "$ol_arg" = "invalid" ; then
1953                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1954         fi
1955         ol_enable_dnssrv="$ol_arg"
1956
1957 else
1958         ol_enable_dnssrv="no"
1959 fi
1960 # end --enable-dnssrv
1961 # OpenLDAP --with-dnssrv_module
1962         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
1963 if test "${with_dnssrv_module+set}" = set; then
1964   withval="$with_dnssrv_module"
1965   
1966         ol_arg=invalid
1967         for ol_val in static dynamic ; do
1968                 if test "$withval" = "$ol_val" ; then
1969                         ol_arg="$ol_val"
1970                 fi
1971         done
1972         if test "$ol_arg" = "invalid" ; then
1973                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
1974         fi
1975         ol_with_dnssrv_module="$ol_arg"
1976
1977 else
1978         ol_with_dnssrv_module="static"
1979 fi
1980 # end --with-dnssrv_module
1981
1982 # OpenLDAP --enable-hdb
1983         # Check whether --enable-hdb or --disable-hdb was given.
1984 if test "${enable_hdb+set}" = set; then
1985   enableval="$enable_hdb"
1986   
1987         ol_arg=invalid
1988         for ol_val in auto yes no ; do
1989                 if test "$enableval" = "$ol_val" ; then
1990                         ol_arg="$ol_val"
1991                 fi
1992         done
1993         if test "$ol_arg" = "invalid" ; then
1994                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1995         fi
1996         ol_enable_hdb="$ol_arg"
1997
1998 else
1999         ol_enable_hdb="no"
2000 fi
2001 # end --enable-hdb
2002 # OpenLDAP --with-hdb_module
2003         # Check whether --with-hdb_module or --without-hdb_module was given.
2004 if test "${with_hdb_module+set}" = set; then
2005   withval="$with_hdb_module"
2006   
2007         ol_arg=invalid
2008         for ol_val in static dynamic ; do
2009                 if test "$withval" = "$ol_val" ; then
2010                         ol_arg="$ol_val"
2011                 fi
2012         done
2013         if test "$ol_arg" = "invalid" ; then
2014                 { echo "configure: error: bad value $withval for --with-hdb_module" 1>&2; exit 1; }
2015         fi
2016         ol_with_hdb_module="$ol_arg"
2017
2018 else
2019         ol_with_hdb_module="static"
2020 fi
2021 # end --with-hdb_module
2022
2023 # OpenLDAP --enable-ldap
2024         # Check whether --enable-ldap or --disable-ldap was given.
2025 if test "${enable_ldap+set}" = set; then
2026   enableval="$enable_ldap"
2027   
2028         ol_arg=invalid
2029         for ol_val in auto yes no ; do
2030                 if test "$enableval" = "$ol_val" ; then
2031                         ol_arg="$ol_val"
2032                 fi
2033         done
2034         if test "$ol_arg" = "invalid" ; then
2035                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2036         fi
2037         ol_enable_ldap="$ol_arg"
2038
2039 else
2040         ol_enable_ldap="no"
2041 fi
2042 # end --enable-ldap
2043 # OpenLDAP --with-ldap_module
2044         # Check whether --with-ldap_module or --without-ldap_module was given.
2045 if test "${with_ldap_module+set}" = set; then
2046   withval="$with_ldap_module"
2047   
2048         ol_arg=invalid
2049         for ol_val in static dynamic ; do
2050                 if test "$withval" = "$ol_val" ; then
2051                         ol_arg="$ol_val"
2052                 fi
2053         done
2054         if test "$ol_arg" = "invalid" ; then
2055                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2056         fi
2057         ol_with_ldap_module="$ol_arg"
2058
2059 else
2060         ol_with_ldap_module="static"
2061 fi
2062 # end --with-ldap_module
2063
2064 # OpenLDAP --enable-ldbm
2065         # Check whether --enable-ldbm or --disable-ldbm was given.
2066 if test "${enable_ldbm+set}" = set; then
2067   enableval="$enable_ldbm"
2068   
2069         ol_arg=invalid
2070         for ol_val in auto yes no ; do
2071                 if test "$enableval" = "$ol_val" ; then
2072                         ol_arg="$ol_val"
2073                 fi
2074         done
2075         if test "$ol_arg" = "invalid" ; then
2076                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2077         fi
2078         ol_enable_ldbm="$ol_arg"
2079
2080 else
2081         ol_enable_ldbm="no"
2082 fi
2083 # end --enable-ldbm
2084 # OpenLDAP --with-ldbm_api
2085         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2086 if test "${with_ldbm_api+set}" = set; then
2087   withval="$with_ldbm_api"
2088   
2089         ol_arg=invalid
2090         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2091                 if test "$withval" = "$ol_val" ; then
2092                         ol_arg="$ol_val"
2093                 fi
2094         done
2095         if test "$ol_arg" = "invalid" ; then
2096                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2097         fi
2098         ol_with_ldbm_api="$ol_arg"
2099
2100 else
2101         ol_with_ldbm_api="auto"
2102 fi
2103 # end --with-ldbm_api
2104
2105 # OpenLDAP --with-ldbm_module
2106         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2107 if test "${with_ldbm_module+set}" = set; then
2108   withval="$with_ldbm_module"
2109   
2110         ol_arg=invalid
2111         for ol_val in static dynamic ; do
2112                 if test "$withval" = "$ol_val" ; then
2113                         ol_arg="$ol_val"
2114                 fi
2115         done
2116         if test "$ol_arg" = "invalid" ; then
2117                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2118         fi
2119         ol_with_ldbm_module="$ol_arg"
2120
2121 else
2122         ol_with_ldbm_module="static"
2123 fi
2124 # end --with-ldbm_module
2125
2126 # OpenLDAP --with-ldbm_type
2127         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2128 if test "${with_ldbm_type+set}" = set; then
2129   withval="$with_ldbm_type"
2130   
2131         ol_arg=invalid
2132         for ol_val in auto btree hash ; do
2133                 if test "$withval" = "$ol_val" ; then
2134                         ol_arg="$ol_val"
2135                 fi
2136         done
2137         if test "$ol_arg" = "invalid" ; then
2138                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2139         fi
2140         ol_with_ldbm_type="$ol_arg"
2141
2142 else
2143         ol_with_ldbm_type="auto"
2144 fi
2145 # end --with-ldbm_type
2146
2147 # OpenLDAP --enable-meta
2148         # Check whether --enable-meta or --disable-meta was given.
2149 if test "${enable_meta+set}" = set; then
2150   enableval="$enable_meta"
2151   
2152         ol_arg=invalid
2153         for ol_val in auto yes no ; do
2154                 if test "$enableval" = "$ol_val" ; then
2155                         ol_arg="$ol_val"
2156                 fi
2157         done
2158         if test "$ol_arg" = "invalid" ; then
2159                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2160         fi
2161         ol_enable_meta="$ol_arg"
2162
2163 else
2164         ol_enable_meta="no"
2165 fi
2166 # end --enable-meta
2167 # OpenLDAP --with-meta_module
2168         # Check whether --with-meta_module or --without-meta_module was given.
2169 if test "${with_meta_module+set}" = set; then
2170   withval="$with_meta_module"
2171   
2172         ol_arg=invalid
2173         for ol_val in static dynamic ; do
2174                 if test "$withval" = "$ol_val" ; then
2175                         ol_arg="$ol_val"
2176                 fi
2177         done
2178         if test "$ol_arg" = "invalid" ; then
2179                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2180         fi
2181         ol_with_meta_module="$ol_arg"
2182
2183 else
2184         ol_with_meta_module="static"
2185 fi
2186 # end --with-meta_module
2187
2188 # OpenLDAP --enable-monitor
2189         # Check whether --enable-monitor or --disable-monitor was given.
2190 if test "${enable_monitor+set}" = set; then
2191   enableval="$enable_monitor"
2192   
2193         ol_arg=invalid
2194         for ol_val in auto yes no ; do
2195                 if test "$enableval" = "$ol_val" ; then
2196                         ol_arg="$ol_val"
2197                 fi
2198         done
2199         if test "$ol_arg" = "invalid" ; then
2200                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2201         fi
2202         ol_enable_monitor="$ol_arg"
2203
2204 else
2205         ol_enable_monitor="yes"
2206 fi
2207 # end --enable-monitor
2208 # OpenLDAP --with-monitor_module
2209         # Check whether --with-monitor_module or --without-monitor_module was given.
2210 if test "${with_monitor_module+set}" = set; then
2211   withval="$with_monitor_module"
2212   
2213         ol_arg=invalid
2214         for ol_val in static dynamic ; do
2215                 if test "$withval" = "$ol_val" ; then
2216                         ol_arg="$ol_val"
2217                 fi
2218         done
2219         if test "$ol_arg" = "invalid" ; then
2220                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2221         fi
2222         ol_with_monitor_module="$ol_arg"
2223
2224 else
2225         ol_with_monitor_module="static"
2226 fi
2227 # end --with-monitor_module
2228
2229 # OpenLDAP --enable-null
2230         # Check whether --enable-null or --disable-null was given.
2231 if test "${enable_null+set}" = set; then
2232   enableval="$enable_null"
2233   
2234         ol_arg=invalid
2235         for ol_val in auto yes no ; do
2236                 if test "$enableval" = "$ol_val" ; then
2237                         ol_arg="$ol_val"
2238                 fi
2239         done
2240         if test "$ol_arg" = "invalid" ; then
2241                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2242         fi
2243         ol_enable_null="$ol_arg"
2244
2245 else
2246         ol_enable_null="no"
2247 fi
2248 # end --enable-null
2249 # OpenLDAP --with-null_module
2250         # Check whether --with-null_module or --without-null_module was given.
2251 if test "${with_null_module+set}" = set; then
2252   withval="$with_null_module"
2253   
2254         ol_arg=invalid
2255         for ol_val in static dynamic ; do
2256                 if test "$withval" = "$ol_val" ; then
2257                         ol_arg="$ol_val"
2258                 fi
2259         done
2260         if test "$ol_arg" = "invalid" ; then
2261                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2262         fi
2263         ol_with_null_module="$ol_arg"
2264
2265 else
2266         ol_with_null_module="static"
2267 fi
2268 # end --with-null_module
2269
2270 # OpenLDAP --enable-passwd
2271         # Check whether --enable-passwd or --disable-passwd was given.
2272 if test "${enable_passwd+set}" = set; then
2273   enableval="$enable_passwd"
2274   
2275         ol_arg=invalid
2276         for ol_val in auto yes no ; do
2277                 if test "$enableval" = "$ol_val" ; then
2278                         ol_arg="$ol_val"
2279                 fi
2280         done
2281         if test "$ol_arg" = "invalid" ; then
2282                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2283         fi
2284         ol_enable_passwd="$ol_arg"
2285
2286 else
2287         ol_enable_passwd="no"
2288 fi
2289 # end --enable-passwd
2290 # OpenLDAP --with-passwd_module
2291         # Check whether --with-passwd_module or --without-passwd_module was given.
2292 if test "${with_passwd_module+set}" = set; then
2293   withval="$with_passwd_module"
2294   
2295         ol_arg=invalid
2296         for ol_val in static dynamic ; do
2297                 if test "$withval" = "$ol_val" ; then
2298                         ol_arg="$ol_val"
2299                 fi
2300         done
2301         if test "$ol_arg" = "invalid" ; then
2302                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2303         fi
2304         ol_with_passwd_module="$ol_arg"
2305
2306 else
2307         ol_with_passwd_module="static"
2308 fi
2309 # end --with-passwd_module
2310
2311 # OpenLDAP --enable-perl
2312         # Check whether --enable-perl or --disable-perl was given.
2313 if test "${enable_perl+set}" = set; then
2314   enableval="$enable_perl"
2315   
2316         ol_arg=invalid
2317         for ol_val in auto yes no ; do
2318                 if test "$enableval" = "$ol_val" ; then
2319                         ol_arg="$ol_val"
2320                 fi
2321         done
2322         if test "$ol_arg" = "invalid" ; then
2323                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2324         fi
2325         ol_enable_perl="$ol_arg"
2326
2327 else
2328         ol_enable_perl="no"
2329 fi
2330 # end --enable-perl
2331 # OpenLDAP --with-perl_module
2332         # Check whether --with-perl_module or --without-perl_module was given.
2333 if test "${with_perl_module+set}" = set; then
2334   withval="$with_perl_module"
2335   
2336         ol_arg=invalid
2337         for ol_val in static dynamic ; do
2338                 if test "$withval" = "$ol_val" ; then
2339                         ol_arg="$ol_val"
2340                 fi
2341         done
2342         if test "$ol_arg" = "invalid" ; then
2343                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2344         fi
2345         ol_with_perl_module="$ol_arg"
2346
2347 else
2348         ol_with_perl_module="static"
2349 fi
2350 # end --with-perl_module
2351
2352 # OpenLDAP --enable-shell
2353         # Check whether --enable-shell or --disable-shell was given.
2354 if test "${enable_shell+set}" = set; then
2355   enableval="$enable_shell"
2356   
2357         ol_arg=invalid
2358         for ol_val in auto yes no ; do
2359                 if test "$enableval" = "$ol_val" ; then
2360                         ol_arg="$ol_val"
2361                 fi
2362         done
2363         if test "$ol_arg" = "invalid" ; then
2364                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2365         fi
2366         ol_enable_shell="$ol_arg"
2367
2368 else
2369         ol_enable_shell="no"
2370 fi
2371 # end --enable-shell
2372 # OpenLDAP --with-shell_module
2373         # Check whether --with-shell_module or --without-shell_module was given.
2374 if test "${with_shell_module+set}" = set; then
2375   withval="$with_shell_module"
2376   
2377         ol_arg=invalid
2378         for ol_val in static dynamic ; do
2379                 if test "$withval" = "$ol_val" ; then
2380                         ol_arg="$ol_val"
2381                 fi
2382         done
2383         if test "$ol_arg" = "invalid" ; then
2384                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2385         fi
2386         ol_with_shell_module="$ol_arg"
2387
2388 else
2389         ol_with_shell_module="static"
2390 fi
2391 # end --with-shell_module
2392
2393 # OpenLDAP --enable-sql
2394         # Check whether --enable-sql or --disable-sql was given.
2395 if test "${enable_sql+set}" = set; then
2396   enableval="$enable_sql"
2397   
2398         ol_arg=invalid
2399         for ol_val in auto yes no ; do
2400                 if test "$enableval" = "$ol_val" ; then
2401                         ol_arg="$ol_val"
2402                 fi
2403         done
2404         if test "$ol_arg" = "invalid" ; then
2405                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2406         fi
2407         ol_enable_sql="$ol_arg"
2408
2409 else
2410         ol_enable_sql="no"
2411 fi
2412 # end --enable-sql
2413 # OpenLDAP --with-sql_module
2414         # Check whether --with-sql_module or --without-sql_module was given.
2415 if test "${with_sql_module+set}" = set; then
2416   withval="$with_sql_module"
2417   
2418         ol_arg=invalid
2419         for ol_val in static dynamic ; do
2420                 if test "$withval" = "$ol_val" ; then
2421                         ol_arg="$ol_val"
2422                 fi
2423         done
2424         if test "$ol_arg" = "invalid" ; then
2425                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2426         fi
2427         ol_with_sql_module="$ol_arg"
2428
2429 else
2430         ol_with_sql_module="static"
2431 fi
2432 # end --with-sql_module
2433
2434 # OpenLDAP --enable-tcl
2435         # Check whether --enable-tcl or --disable-tcl was given.
2436 if test "${enable_tcl+set}" = set; then
2437   enableval="$enable_tcl"
2438   
2439         ol_arg=invalid
2440         for ol_val in auto yes no ; do
2441                 if test "$enableval" = "$ol_val" ; then
2442                         ol_arg="$ol_val"
2443                 fi
2444         done
2445         if test "$ol_arg" = "invalid" ; then
2446                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2447         fi
2448         ol_enable_tcl="$ol_arg"
2449
2450 else
2451         ol_enable_tcl="no"
2452 fi
2453 # end --enable-tcl
2454 # OpenLDAP --with-tcl_module
2455         # Check whether --with-tcl_module or --without-tcl_module was given.
2456 if test "${with_tcl_module+set}" = set; then
2457   withval="$with_tcl_module"
2458   
2459         ol_arg=invalid
2460         for ol_val in static dynamic ; do
2461                 if test "$withval" = "$ol_val" ; then
2462                         ol_arg="$ol_val"
2463                 fi
2464         done
2465         if test "$ol_arg" = "invalid" ; then
2466                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2467         fi
2468         ol_with_tcl_module="$ol_arg"
2469
2470 else
2471         ol_with_tcl_module="static"
2472 fi
2473 # end --with-tcl_module
2474
2475
2476 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2477 if test "${with_xxslurpdoptions+set}" = set; then
2478   withval="$with_xxslurpdoptions"
2479   :
2480 fi
2481
2482 # OpenLDAP --enable-slurpd
2483         # Check whether --enable-slurpd or --disable-slurpd was given.
2484 if test "${enable_slurpd+set}" = set; then
2485   enableval="$enable_slurpd"
2486   
2487         ol_arg=invalid
2488         for ol_val in auto yes no ; do
2489                 if test "$enableval" = "$ol_val" ; then
2490                         ol_arg="$ol_val"
2491                 fi
2492         done
2493         if test "$ol_arg" = "invalid" ; then
2494                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2495         fi
2496         ol_enable_slurpd="$ol_arg"
2497
2498 else
2499         ol_enable_slurpd="auto"
2500 fi
2501 # end --enable-slurpd
2502
2503 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2504 if test "${with_xxliboptions+set}" = set; then
2505   withval="$with_xxliboptions"
2506   :
2507 fi
2508
2509 # Check whether --enable-static or --disable-static was given.
2510 if test "${enable_static+set}" = set; then
2511   enableval="$enable_static"
2512   p=${PACKAGE-default}
2513 case $enableval in
2514 yes) enable_static=yes ;;
2515 no) enable_static=no ;;
2516 *)
2517   enable_static=no
2518   # Look at the argument we got.  We use all the common list separators.
2519   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2520   for pkg in $enableval; do
2521     if test "X$pkg" = "X$p"; then
2522       enable_static=yes
2523     fi
2524   done
2525   IFS="$ac_save_ifs"
2526   ;;
2527 esac
2528 else
2529   enable_static=yes
2530 fi
2531
2532 # Check whether --enable-shared or --disable-shared was given.
2533 if test "${enable_shared+set}" = set; then
2534   enableval="$enable_shared"
2535   p=${PACKAGE-default}
2536 case $enableval in
2537 yes) enable_shared=yes ;;
2538 no) enable_shared=no ;;
2539 *)
2540   enable_shared=no
2541   # Look at the argument we got.  We use all the common list separators.
2542   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2543   for pkg in $enableval; do
2544     if test "X$pkg" = "X$p"; then
2545       enable_shared=yes
2546     fi
2547   done
2548   IFS="$ac_save_ifs"
2549   ;;
2550 esac
2551 else
2552   enable_shared=yes
2553 fi
2554
2555
2556
2557 # validate options
2558 if test $ol_enable_slapd = no ; then
2559                 if test $ol_enable_slapi = yes ; then
2560                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2561         fi
2562         if test $ol_enable_bdb = yes ; then
2563                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2564         fi
2565         if test $ol_enable_dnssrv = yes ; then
2566                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2567         fi
2568         if test $ol_enable_hdb = yes ; then
2569                 echo "configure: warning: slapd disabled, ignoring --enable-hdb argument" 1>&2
2570         fi
2571         if test $ol_enable_ldap = yes ; then
2572                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2573         fi
2574         if test $ol_enable_ldbm = yes ; then
2575                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2576         fi
2577         if test $ol_enable_meta = yes ; then
2578                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2579         fi
2580         if test $ol_enable_monitor = yes ; then
2581                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2582         fi
2583         if test $ol_enable_null = yes ; then
2584                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2585         fi
2586         if test $ol_enable_passwd = yes ; then
2587                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2588         fi
2589         if test $ol_enable_perl = yes ; then
2590                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2591         fi
2592         if test $ol_enable_shell = yes ; then
2593                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2594         fi
2595         if test $ol_enable_tcl = yes ; then
2596                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2597         fi
2598         if test $ol_enable_sql = yes ; then
2599                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2600         fi
2601         if test $ol_enable_modules = yes ; then
2602                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2603         fi
2604         if test $ol_enable_multimaster = yes ; then
2605                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2606         fi
2607         if test $ol_enable_wrappers = yes ; then
2608                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2609         fi
2610         if test $ol_enable_rlookups = yes ; then
2611                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2612         fi
2613         if test $ol_enable_aci = yes ; then
2614                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2615         fi
2616         if test $ol_with_ldbm_api != auto ; then
2617                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2618         fi
2619         if test $ol_with_ldbm_type != auto ; then
2620                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2621         fi
2622         if test $ol_with_bdb_module != static ; then
2623                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2624         fi
2625         if test $ol_with_dnssrv_module != static ; then
2626                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2627         fi
2628         if test $ol_with_hdb_module != static ; then
2629                 echo "configure: warning: slapd disabled, ignoring --with-hdb-module argument" 1>&2
2630         fi
2631         if test $ol_with_ldap_module != static ; then
2632                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2633         fi
2634         if test $ol_with_ldbm_module != static ; then
2635                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2636         fi
2637         if test $ol_with_meta_module != static ; then
2638                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2639         fi
2640         if test $ol_with_monitor_module != static ; then
2641                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2642         fi
2643         if test $ol_with_null_module != static ; then
2644                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2645         fi
2646         if test $ol_with_passwd_module != static ; then
2647                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2648         fi
2649         if test $ol_with_perl_module != static ; then
2650                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2651         fi
2652         if test $ol_with_shell_module != static ; then
2653                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2654         fi
2655         if test $ol_with_tcl_module != static ; then
2656                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2657         fi
2658         if test $ol_with_sql_module != static ; then
2659                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2660         fi
2661         if test $ol_enable_slurpd = yes ; then
2662                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2663         fi
2664         if test $ol_enable_rewrite = yes ; then
2665                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2666         fi
2667
2668         # force settings to no
2669         ol_enable_slapi=no
2670         ol_enable_bdb=no
2671         ol_enable_dnssrv=no
2672         ol_enable_hdb=no
2673         ol_enable_ldap=no
2674         ol_enable_ldbm=no
2675         ol_enable_meta=no
2676         ol_enable_monitor=no
2677         ol_enable_null=no
2678         ol_enable_passwd=no
2679         ol_enable_perl=no
2680         ol_enable_shell=no
2681         ol_enable_tcl=no
2682         ol_enable_sql=no
2683
2684         ol_enable_modules=no
2685         ol_enable_multimaster=no
2686         ol_enable_rlookups=no
2687         ol_enable_aci=no
2688         ol_enable_wrappers=no
2689         ol_enable_dynamic=no
2690
2691         ol_with_ldbm_api=no
2692         ol_with_ldbm_type=no
2693
2694         ol_with_bdb_module=static
2695         ol_with_dnssrv_module=static
2696         ol_with_hdb_module=static
2697         ol_with_ldap_module=static
2698         ol_with_ldbm_module=static
2699         ol_with_meta_module=static
2700         ol_with_monitor_module=static
2701         ol_with_null_module=static
2702         ol_with_passwd_module=static
2703         ol_with_perl_module=static
2704         ol_with_shell_module=static
2705         ol_with_tcl_module=static
2706         ol_with_sql_module=static
2707
2708         ol_enable_slurpd=no
2709
2710         ol_enable_rewrite=no
2711
2712 elif test $ol_enable_ldbm = no ; then
2713         
2714         if test $ol_with_ldbm_api != auto ; then
2715                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2716         fi
2717
2718         if test $ol_with_ldbm_type != auto ; then
2719                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2720         fi
2721
2722         if test $ol_with_ldbm_module != static ; then
2723                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2724         fi
2725
2726         if test $ol_enable_modules != yes -a \
2727                 $ol_enable_bdb = no -a \
2728                 $ol_enable_dnssrv = no -a \
2729                 $ol_enable_hdb = no -a \
2730                 $ol_enable_ldap = no -a \
2731                 $ol_enable_meta = no -a \
2732                 $ol_enable_monitor = no -a \
2733                 $ol_enable_null = no -a \
2734                 $ol_enable_passwd = no -a \
2735                 $ol_enable_perl = no -a \
2736                 $ol_enable_shell = no -a \
2737                 $ol_enable_sql = no -a \
2738                 $ol_enable_tcl = no ; then
2739
2740                 if test $ol_enable_slapd = yes ; then
2741                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2742                 else
2743                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2744                         ol_enable_slapd=no
2745                 fi
2746         fi
2747
2748         ol_with_ldbm_api=no
2749         ol_with_ldbm_type=no
2750         ol_with_ldbm_module=static
2751
2752         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2753                 ol_with_ldbm_api=berkeley
2754         fi
2755
2756 else
2757                 if test $ol_with_ldbm_api = gdbm -a \
2758                 $ol_with_ldbm_type = btree ; then
2759                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2760         fi
2761         if test $ol_with_ldbm_api = mdbm -a \
2762                 $ol_with_ldbm_type = btree ; then
2763                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2764         fi
2765         if test $ol_with_ldbm_api = ndbm -a \
2766                 $ol_with_ldbm_type = btree ; then
2767                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2768         fi
2769
2770         if test $ol_enable_bdb = yes -o $ol_enable_hdb = yes ; then
2771                 if test $ol_with_ldbm_api = auto ; then
2772                         ol_with_ldbm_api=berkeley
2773                 elif test $ol_with_ldbm_api != berkeley ; then
2774                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2775                 fi
2776
2777         elif test $ol_enable_bdb = auto ; then
2778                 if test $ol_with_ldbm_api != berkeley \
2779                         -o $ol_with_ldbm_api != auto ; then
2780                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2781                         ol_enable_bdb=no
2782                 fi
2783         fi
2784 fi
2785
2786 if test $ol_enable_slurpd = yes ; then
2787                 if test $ol_with_threads = no ; then
2788                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2789         fi
2790 fi
2791
2792 if test $ol_enable_lmpasswd = yes ; then
2793         if test $ol_with_tls = no ; then
2794                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2795         fi
2796 fi
2797
2798 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2799         if test $ol_with_kerberos = no ; then
2800                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2801         elif test $ol_with_kerberos = auto ; then
2802                 ol_with_kerberos=yes
2803         fi
2804
2805 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2806         if test $ol_with_kerberos = auto ; then
2807                 ol_with_kerberos=no
2808         elif test $ol_with_kerberos != no ; then
2809                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2810                 ol_with_kerberos=no
2811         fi
2812 fi
2813
2814 if test $ol_enable_spasswd = yes ; then
2815         if test $ol_with_cyrus_sasl = no ; then
2816                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2817         fi
2818         ol_with_cyrus_sasl=yes
2819 fi
2820
2821 echo "$ac_t""done" 1>&6
2822
2823 LDAP_LIBS=
2824 LDBM_LIBS=
2825 LTHREAD_LIBS=
2826 LUTIL_LIBS=
2827
2828 SLAPD_LIBS=
2829 SLURPD_LIBS=
2830
2831 BUILD_SLAPD=no
2832 BUILD_SLURPD=no
2833
2834 BUILD_THREAD=no
2835
2836 BUILD_SLAPI=no
2837 SLAPD_SLAPI_DEPEND=
2838
2839 BUILD_BDB=no
2840 BUILD_DNSSRV=no
2841 BUILD_HDB=no
2842 BUILD_LDAP=no
2843 BUILD_LDBM=no
2844 BUILD_META=no
2845 BUILD_MONITOR=no
2846 BUILD_CACHE=no
2847 BUILD_NULL=no
2848 BUILD_PASSWD=no
2849 BUILD_PERL=no
2850 BUILD_SHELL=no
2851 BUILD_SQL=no
2852 BUILD_TCL=no
2853
2854 BUILD_BDB_DYNAMIC=static
2855 BUILD_DNSSRV_DYNAMIC=static
2856 BUILD_HDB_DYNAMIC=static
2857 BUILD_LDAP_DYNAMIC=static
2858 BUILD_LDBM_DYNAMIC=static
2859 BUILD_META_DYNAMIC=static
2860 BUILD_MONITOR_DYNAMIC=static
2861 BUILD_NULL_DYNAMIC=static
2862 BUILD_PASSWD_DYNAMIC=static
2863 BUILD_PERL_DYNAMIC=static
2864 BUILD_SHELL_DYNAMIC=static
2865 BUILD_TCL_DYNAMIC=static
2866 BUILD_SQL_DYNAMIC=static
2867
2868 SLAPD_MODULES_LDFLAGS=
2869 SLAPD_MODULES_CPPFLAGS=
2870
2871 SLAPD_STATIC_BACKENDS=
2872 SLAPD_DYNAMIC_BACKENDS=
2873
2874 SLAPD_PERL_LDFLAGS=
2875 MOD_PERL_LDFLAGS=
2876 PERL_CPPFLAGS=
2877
2878 SLAPD_SQL_LDFLAGS=
2879 SLAPD_SQL_LIBS=
2880 SLAPD_SQL_INCLUDES=
2881
2882 MOD_TCL_LIB=
2883 KRB4_LIBS=
2884 KRB5_LIBS=
2885 SASL_LIBS=
2886 TERMCAP_LIBS=
2887 TLS_LIBS=
2888 MODULES_LIBS=
2889 SLAPI_LIBS=
2890 LIBSLAPI=
2891 LIBSLAPITOOLS=
2892 AUTH_LIBS=
2893
2894 SLAPD_SLP_LIBS=
2895
2896
2897 # Find a good install program.  We prefer a C program (faster),
2898 # so one script is as good as another.  But avoid the broken or
2899 # incompatible versions:
2900 # SysV /etc/install, /usr/sbin/install
2901 # SunOS /usr/etc/install
2902 # IRIX /sbin/install
2903 # AIX /bin/install
2904 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2905 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2906 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2907 # ./install, which can be erroneously created by make from ./install.sh.
2908 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2909 echo "configure:2910: checking for a BSD compatible install" >&5
2910 if test -z "$INSTALL"; then
2911 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2912   echo $ac_n "(cached) $ac_c" 1>&6
2913 else
2914     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2915   for ac_dir in $PATH; do
2916     # Account for people who put trailing slashes in PATH elements.
2917     case "$ac_dir/" in
2918     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2919     *)
2920       # OSF1 and SCO ODT 3.0 have their own names for install.
2921       # Don't use installbsd from OSF since it installs stuff as root
2922       # by default.
2923       for ac_prog in ginstall scoinst install; do
2924         if test -f $ac_dir/$ac_prog; then
2925           if test $ac_prog = install &&
2926             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2927             # AIX install.  It has an incompatible calling convention.
2928             :
2929           elif test $ac_prog = install &&
2930             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2931             # program-specific install script used by HP pwplus--don't use.
2932             :
2933           else
2934             ac_cv_path_install="$ac_dir/$ac_prog -c"
2935             break 2
2936           fi
2937         fi
2938       done
2939       ;;
2940     esac
2941   done
2942   IFS="$ac_save_IFS"
2943
2944 fi
2945   if test "${ac_cv_path_install+set}" = set; then
2946     INSTALL="$ac_cv_path_install"
2947   else
2948     # As a last resort, use the slow shell script.  We don't cache a
2949     # path for INSTALL within a source directory, because that will
2950     # break other packages using the cache if that directory is
2951     # removed, or if the path is relative.
2952     INSTALL="$ac_install_sh"
2953   fi
2954 fi
2955 echo "$ac_t""$INSTALL" 1>&6
2956
2957 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2958 # It thinks the first close brace ends the variable substitution.
2959 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2960
2961 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2962
2963 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2964
2965
2966 cat >> confdefs.h <<\EOF
2967 #define HAVE_MKVERSION 1
2968 EOF
2969
2970
2971
2972
2973 ol_aix_threads=no
2974 case "$target" in
2975 *-*-aix*)       if test -z "$CC" ; then
2976                 case "$ol_with_threads" in
2977                 auto | yes |  posix) ol_aix_threads=yes ;;
2978                 esac
2979         fi
2980 ;;
2981 esac
2982
2983 if test $ol_aix_threads = yes ; then
2984         if test -z "${CC}" ; then
2985                 for ac_prog in cc_r xlc_r cc
2986 do
2987 # Extract the first word of "$ac_prog", so it can be a program name with args.
2988 set dummy $ac_prog; ac_word=$2
2989 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2990 echo "configure:2991: checking for $ac_word" >&5
2991 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2992   echo $ac_n "(cached) $ac_c" 1>&6
2993 else
2994   if test -n "$CC"; then
2995   ac_cv_prog_CC="$CC" # Let the user override the test.
2996 else
2997   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2998   ac_dummy="$PATH"
2999   for ac_dir in $ac_dummy; do
3000     test -z "$ac_dir" && ac_dir=.
3001     if test -f $ac_dir/$ac_word; then
3002       ac_cv_prog_CC="$ac_prog"
3003       break
3004     fi
3005   done
3006   IFS="$ac_save_ifs"
3007 fi
3008 fi
3009 CC="$ac_cv_prog_CC"
3010 if test -n "$CC"; then
3011   echo "$ac_t""$CC" 1>&6
3012 else
3013   echo "$ac_t""no" 1>&6
3014 fi
3015
3016 test -n "$CC" && break
3017 done
3018
3019
3020                 if test "$CC" = cc ; then
3021                                                 if test $ol_with_threads != auto ; then
3022                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3023                         else
3024                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3025                         fi
3026                         ol_with_threads=no
3027                 fi
3028         fi
3029
3030         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3031                 ol_with_threads=posix
3032                 ol_cv_pthread_create=yes
3033         fi
3034 fi
3035
3036 if test -z "${CC}"; then
3037         for ac_prog in cc gcc
3038 do
3039 # Extract the first word of "$ac_prog", so it can be a program name with args.
3040 set dummy $ac_prog; ac_word=$2
3041 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3042 echo "configure:3043: checking for $ac_word" >&5
3043 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3044   echo $ac_n "(cached) $ac_c" 1>&6
3045 else
3046   if test -n "$CC"; then
3047   ac_cv_prog_CC="$CC" # Let the user override the test.
3048 else
3049   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3050   ac_dummy="$PATH"
3051   for ac_dir in $ac_dummy; do
3052     test -z "$ac_dir" && ac_dir=.
3053     if test -f $ac_dir/$ac_word; then
3054       ac_cv_prog_CC="$ac_prog"
3055       break
3056     fi
3057   done
3058   IFS="$ac_save_ifs"
3059 fi
3060 fi
3061 CC="$ac_cv_prog_CC"
3062 if test -n "$CC"; then
3063   echo "$ac_t""$CC" 1>&6
3064 else
3065   echo "$ac_t""no" 1>&6
3066 fi
3067
3068 test -n "$CC" && break
3069 done
3070 test -n "$CC" || CC="missing"
3071
3072
3073         if test "${CC}" = "missing" ; then
3074                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3075         fi
3076 fi
3077
3078 if test -z "${AR}"; then
3079         for ac_prog in ar gar
3080 do
3081 # Extract the first word of "$ac_prog", so it can be a program name with args.
3082 set dummy $ac_prog; ac_word=$2
3083 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3084 echo "configure:3085: checking for $ac_word" >&5
3085 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3086   echo $ac_n "(cached) $ac_c" 1>&6
3087 else
3088   if test -n "$AR"; then
3089   ac_cv_prog_AR="$AR" # Let the user override the test.
3090 else
3091   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3092   ac_dummy="$PATH"
3093   for ac_dir in $ac_dummy; do
3094     test -z "$ac_dir" && ac_dir=.
3095     if test -f $ac_dir/$ac_word; then
3096       ac_cv_prog_AR="$ac_prog"
3097       break
3098     fi
3099   done
3100   IFS="$ac_save_ifs"
3101 fi
3102 fi
3103 AR="$ac_cv_prog_AR"
3104 if test -n "$AR"; then
3105   echo "$ac_t""$AR" 1>&6
3106 else
3107   echo "$ac_t""no" 1>&6
3108 fi
3109
3110 test -n "$AR" && break
3111 done
3112 test -n "$AR" || AR="missing"
3113
3114
3115         if test "${AR}" = "missing" ; then
3116                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3117         fi
3118 fi
3119
3120
3121
3122 # Find the correct PATH separator.  Usually this is `:', but
3123 # DJGPP uses `;' like DOS.
3124 if test "X${PATH_SEPARATOR+set}" != Xset; then
3125   UNAME=${UNAME-`uname 2>/dev/null`}
3126   case X$UNAME in
3127     *-DOS) lt_cv_sys_path_separator=';' ;;
3128     *)     lt_cv_sys_path_separator=':' ;;
3129   esac
3130   PATH_SEPARATOR=$lt_cv_sys_path_separator
3131 fi
3132
3133 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3134 echo "configure:3135: checking for Cygwin environment" >&5
3135 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3136   echo $ac_n "(cached) $ac_c" 1>&6
3137 else
3138   cat > conftest.$ac_ext <<EOF
3139 #line 3140 "configure"
3140 #include "confdefs.h"
3141
3142 int main() {
3143
3144 #ifndef __CYGWIN__
3145 #define __CYGWIN__ __CYGWIN32__
3146 #endif
3147 return __CYGWIN__;
3148 ; return 0; }
3149 EOF
3150 if { (eval echo configure:3151: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3151   rm -rf conftest*
3152   ac_cv_cygwin=yes
3153 else
3154   echo "configure: failed program was:" >&5
3155   cat conftest.$ac_ext >&5
3156   rm -rf conftest*
3157   ac_cv_cygwin=no
3158 fi
3159 rm -f conftest*
3160 fi
3161
3162 echo "$ac_t""$ac_cv_cygwin" 1>&6
3163 CYGWIN=
3164 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3165 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3166 echo "configure:3167: checking for mingw32 environment" >&5
3167 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3168   echo $ac_n "(cached) $ac_c" 1>&6
3169 else
3170   cat > conftest.$ac_ext <<EOF
3171 #line 3172 "configure"
3172 #include "confdefs.h"
3173
3174 int main() {
3175 return __MINGW32__;
3176 ; return 0; }
3177 EOF
3178 if { (eval echo configure:3179: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3179   rm -rf conftest*
3180   ac_cv_mingw32=yes
3181 else
3182   echo "configure: failed program was:" >&5
3183   cat conftest.$ac_ext >&5
3184   rm -rf conftest*
3185   ac_cv_mingw32=no
3186 fi
3187 rm -f conftest*
3188 fi
3189
3190 echo "$ac_t""$ac_cv_mingw32" 1>&6
3191 MINGW32=
3192 test "$ac_cv_mingw32" = yes && MINGW32=yes
3193 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3194 echo "configure:3195: checking for EMX OS/2 environment" >&5
3195 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3196   echo $ac_n "(cached) $ac_c" 1>&6
3197 else
3198   cat > conftest.$ac_ext <<EOF
3199 #line 3200 "configure"
3200 #include "confdefs.h"
3201
3202 int main() {
3203 return __EMX__;
3204 ; return 0; }
3205 EOF
3206 if { (eval echo configure:3207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3207   rm -rf conftest*
3208   ac_cv_emxos2=yes
3209 else
3210   echo "configure: failed program was:" >&5
3211   cat conftest.$ac_ext >&5
3212   rm -rf conftest*
3213   ac_cv_emxos2=no
3214 fi
3215 rm -f conftest*
3216 fi
3217
3218 echo "$ac_t""$ac_cv_emxos2" 1>&6
3219 EMXOS2=
3220 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3221 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3222 echo "configure:3223: checking how to run the C preprocessor" >&5
3223 # On Suns, sometimes $CPP names a directory.
3224 if test -n "$CPP" && test -d "$CPP"; then
3225   CPP=
3226 fi
3227 if test -z "$CPP"; then
3228 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3229   echo $ac_n "(cached) $ac_c" 1>&6
3230 else
3231     # This must be in double quotes, not single quotes, because CPP may get
3232   # substituted into the Makefile and "${CC-cc}" will confuse make.
3233   CPP="${CC-cc} -E"
3234   # On the NeXT, cc -E runs the code through the compiler's parser,
3235   # not just through cpp.
3236   cat > conftest.$ac_ext <<EOF
3237 #line 3238 "configure"
3238 #include "confdefs.h"
3239 #include <assert.h>
3240 Syntax Error
3241 EOF
3242 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3243 { (eval echo configure:3244: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3244 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3245 if test -z "$ac_err"; then
3246   :
3247 else
3248   echo "$ac_err" >&5
3249   echo "configure: failed program was:" >&5
3250   cat conftest.$ac_ext >&5
3251   rm -rf conftest*
3252   CPP="${CC-cc} -E -traditional-cpp"
3253   cat > conftest.$ac_ext <<EOF
3254 #line 3255 "configure"
3255 #include "confdefs.h"
3256 #include <assert.h>
3257 Syntax Error
3258 EOF
3259 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3260 { (eval echo configure:3261: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3261 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3262 if test -z "$ac_err"; then
3263   :
3264 else
3265   echo "$ac_err" >&5
3266   echo "configure: failed program was:" >&5
3267   cat conftest.$ac_ext >&5
3268   rm -rf conftest*
3269   CPP="${CC-cc} -nologo -E"
3270   cat > conftest.$ac_ext <<EOF
3271 #line 3272 "configure"
3272 #include "confdefs.h"
3273 #include <assert.h>
3274 Syntax Error
3275 EOF
3276 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3277 { (eval echo configure:3278: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3278 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3279 if test -z "$ac_err"; then
3280   :
3281 else
3282   echo "$ac_err" >&5
3283   echo "configure: failed program was:" >&5
3284   cat conftest.$ac_ext >&5
3285   rm -rf conftest*
3286   CPP=/lib/cpp
3287 fi
3288 rm -f conftest*
3289 fi
3290 rm -f conftest*
3291 fi
3292 rm -f conftest*
3293   ac_cv_prog_CPP="$CPP"
3294 fi
3295   CPP="$ac_cv_prog_CPP"
3296 else
3297   ac_cv_prog_CPP="$CPP"
3298 fi
3299 echo "$ac_t""$CPP" 1>&6
3300
3301 # Check whether --enable-fast-install or --disable-fast-install was given.
3302 if test "${enable_fast_install+set}" = set; then
3303   enableval="$enable_fast_install"
3304   p=${PACKAGE-default}
3305 case $enableval in
3306 yes) enable_fast_install=yes ;;
3307 no) enable_fast_install=no ;;
3308 *)
3309   enable_fast_install=no
3310   # Look at the argument we got.  We use all the common list separators.
3311   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3312   for pkg in $enableval; do
3313     if test "X$pkg" = "X$p"; then
3314       enable_fast_install=yes
3315     fi
3316   done
3317   IFS="$ac_save_ifs"
3318   ;;
3319 esac
3320 else
3321   enable_fast_install=yes
3322 fi
3323
3324 # Extract the first word of "gcc", so it can be a program name with args.
3325 set dummy gcc; ac_word=$2
3326 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3327 echo "configure:3328: checking for $ac_word" >&5
3328 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3329   echo $ac_n "(cached) $ac_c" 1>&6
3330 else
3331   if test -n "$CC"; then
3332   ac_cv_prog_CC="$CC" # Let the user override the test.
3333 else
3334   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3335   ac_dummy="$PATH"
3336   for ac_dir in $ac_dummy; do
3337     test -z "$ac_dir" && ac_dir=.
3338     if test -f $ac_dir/$ac_word; then
3339       ac_cv_prog_CC="gcc"
3340       break
3341     fi
3342   done
3343   IFS="$ac_save_ifs"
3344 fi
3345 fi
3346 CC="$ac_cv_prog_CC"
3347 if test -n "$CC"; then
3348   echo "$ac_t""$CC" 1>&6
3349 else
3350   echo "$ac_t""no" 1>&6
3351 fi
3352
3353 if test -z "$CC"; then
3354   # Extract the first word of "cc", so it can be a program name with args.
3355 set dummy cc; ac_word=$2
3356 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3357 echo "configure:3358: checking for $ac_word" >&5
3358 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3359   echo $ac_n "(cached) $ac_c" 1>&6
3360 else
3361   if test -n "$CC"; then
3362   ac_cv_prog_CC="$CC" # Let the user override the test.
3363 else
3364   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3365   ac_prog_rejected=no
3366   ac_dummy="$PATH"
3367   for ac_dir in $ac_dummy; do
3368     test -z "$ac_dir" && ac_dir=.
3369     if test -f $ac_dir/$ac_word; then
3370       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3371         ac_prog_rejected=yes
3372         continue
3373       fi
3374       ac_cv_prog_CC="cc"
3375       break
3376     fi
3377   done
3378   IFS="$ac_save_ifs"
3379 if test $ac_prog_rejected = yes; then
3380   # We found a bogon in the path, so make sure we never use it.
3381   set dummy $ac_cv_prog_CC
3382   shift
3383   if test $# -gt 0; then
3384     # We chose a different compiler from the bogus one.
3385     # However, it has the same basename, so the bogon will be chosen
3386     # first if we set CC to just the basename; use the full file name.
3387     shift
3388     set dummy "$ac_dir/$ac_word" "$@"
3389     shift
3390     ac_cv_prog_CC="$@"
3391   fi
3392 fi
3393 fi
3394 fi
3395 CC="$ac_cv_prog_CC"
3396 if test -n "$CC"; then
3397   echo "$ac_t""$CC" 1>&6
3398 else
3399   echo "$ac_t""no" 1>&6
3400 fi
3401
3402   if test -z "$CC"; then
3403     case "`uname -s`" in
3404     *win32* | *WIN32* | *CYGWIN*)
3405       # Extract the first word of "cl", so it can be a program name with args.
3406 set dummy cl; ac_word=$2
3407 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3408 echo "configure:3409: checking for $ac_word" >&5
3409 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3410   echo $ac_n "(cached) $ac_c" 1>&6
3411 else
3412   if test -n "$CC"; then
3413   ac_cv_prog_CC="$CC" # Let the user override the test.
3414 else
3415   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3416   ac_dummy="$PATH"
3417   for ac_dir in $ac_dummy; do
3418     test -z "$ac_dir" && ac_dir=.
3419     if test -f $ac_dir/$ac_word; then
3420       ac_cv_prog_CC="cl"
3421       break
3422     fi
3423   done
3424   IFS="$ac_save_ifs"
3425 fi
3426 fi
3427 CC="$ac_cv_prog_CC"
3428 if test -n "$CC"; then
3429   echo "$ac_t""$CC" 1>&6
3430 else
3431   echo "$ac_t""no" 1>&6
3432 fi
3433  ;;
3434     esac
3435   fi
3436   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3437 fi
3438
3439 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3440 echo "configure:3441: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3441
3442 ac_ext=c
3443 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3444 ac_cpp='$CPP $CPPFLAGS'
3445 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3446 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3447 cross_compiling=$ac_cv_prog_cc_cross
3448
3449 cat > conftest.$ac_ext << EOF
3450
3451 #line 3452 "configure"
3452 #include "confdefs.h"
3453
3454 main(){return(0);}
3455 EOF
3456 if { (eval echo configure:3457: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3457   ac_cv_prog_cc_works=yes
3458   # If we can't run a trivial program, we are probably using a cross compiler.
3459   if (./conftest; exit) 2>/dev/null; then
3460     ac_cv_prog_cc_cross=no
3461   else
3462     ac_cv_prog_cc_cross=yes
3463   fi
3464 else
3465   echo "configure: failed program was:" >&5
3466   cat conftest.$ac_ext >&5
3467   ac_cv_prog_cc_works=no
3468 fi
3469 rm -fr conftest*
3470 ac_ext=c
3471 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3472 ac_cpp='$CPP $CPPFLAGS'
3473 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3474 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3475 cross_compiling=$ac_cv_prog_cc_cross
3476
3477 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3478 if test $ac_cv_prog_cc_works = no; then
3479   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3480 fi
3481 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3482 echo "configure:3483: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3483 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3484 cross_compiling=$ac_cv_prog_cc_cross
3485
3486 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3487 echo "configure:3488: checking whether we are using GNU C" >&5
3488 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3489   echo $ac_n "(cached) $ac_c" 1>&6
3490 else
3491   cat > conftest.c <<EOF
3492 #ifdef __GNUC__
3493   yes;
3494 #endif
3495 EOF
3496 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3497: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3497   ac_cv_prog_gcc=yes
3498 else
3499   ac_cv_prog_gcc=no
3500 fi
3501 fi
3502
3503 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3504
3505 if test $ac_cv_prog_gcc = yes; then
3506   GCC=yes
3507 else
3508   GCC=
3509 fi
3510
3511 ac_test_CFLAGS="${CFLAGS+set}"
3512 ac_save_CFLAGS="$CFLAGS"
3513 CFLAGS=
3514 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3515 echo "configure:3516: checking whether ${CC-cc} accepts -g" >&5
3516 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3517   echo $ac_n "(cached) $ac_c" 1>&6
3518 else
3519   echo 'void f(){}' > conftest.c
3520 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3521   ac_cv_prog_cc_g=yes
3522 else
3523   ac_cv_prog_cc_g=no
3524 fi
3525 rm -f conftest*
3526
3527 fi
3528
3529 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3530 if test "$ac_test_CFLAGS" = set; then
3531   CFLAGS="$ac_save_CFLAGS"
3532 elif test $ac_cv_prog_cc_g = yes; then
3533   if test "$GCC" = yes; then
3534     CFLAGS="-g -O2"
3535   else
3536     CFLAGS="-g"
3537   fi
3538 else
3539   if test "$GCC" = yes; then
3540     CFLAGS="-O2"
3541   else
3542     CFLAGS=
3543   fi
3544 fi
3545
3546 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3547 if test "${with_gnu_ld+set}" = set; then
3548   withval="$with_gnu_ld"
3549   test "$withval" = no || with_gnu_ld=yes
3550 else
3551   with_gnu_ld=no
3552 fi
3553
3554 ac_prog=ld
3555 if test "$GCC" = yes; then
3556   # Check if gcc -print-prog-name=ld gives a path.
3557   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3558 echo "configure:3559: checking for ld used by GCC" >&5
3559   case $host in
3560   *-*-mingw*)
3561     # gcc leaves a trailing carriage return which upsets mingw
3562     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3563   *)
3564     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3565   esac
3566   case $ac_prog in
3567     # Accept absolute paths.
3568     [\\/]* | [A-Za-z]:[\\/]*)
3569       re_direlt='/[^/][^/]*/\.\./'
3570       # Canonicalize the path of ld
3571       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3572       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3573         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3574       done
3575       test -z "$LD" && LD="$ac_prog"
3576       ;;
3577   "")
3578     # If it fails, then pretend we aren't using GCC.
3579     ac_prog=ld
3580     ;;
3581   *)
3582     # If it is relative, then search for the first ld in PATH.
3583     with_gnu_ld=unknown
3584     ;;
3585   esac
3586 elif test "$with_gnu_ld" = yes; then
3587   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3588 echo "configure:3589: checking for GNU ld" >&5
3589 else
3590   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3591 echo "configure:3592: checking for non-GNU ld" >&5
3592 fi
3593 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3594   echo $ac_n "(cached) $ac_c" 1>&6
3595 else
3596   if test -z "$LD"; then
3597   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3598   for ac_dir in $PATH; do
3599     test -z "$ac_dir" && ac_dir=.
3600     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3601       lt_cv_path_LD="$ac_dir/$ac_prog"
3602       # Check to see if the program is GNU ld.  I'd rather use --version,
3603       # but apparently some GNU ld's only accept -v.
3604       # Break only if it was the GNU/non-GNU ld that we prefer.
3605       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3606         test "$with_gnu_ld" != no && break
3607       else
3608         test "$with_gnu_ld" != yes && break
3609       fi
3610     fi
3611   done
3612   IFS="$ac_save_ifs"
3613 else
3614   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3615 fi
3616 fi
3617
3618 LD="$lt_cv_path_LD"
3619 if test -n "$LD"; then
3620   echo "$ac_t""$LD" 1>&6
3621 else
3622   echo "$ac_t""no" 1>&6
3623 fi
3624 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3625 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3626 echo "configure:3627: checking if the linker ($LD) is GNU ld" >&5
3627 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3628   echo $ac_n "(cached) $ac_c" 1>&6
3629 else
3630   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3631 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3632   lt_cv_prog_gnu_ld=yes
3633 else
3634   lt_cv_prog_gnu_ld=no
3635 fi
3636 fi
3637
3638 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3639 with_gnu_ld=$lt_cv_prog_gnu_ld
3640
3641
3642 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3643 echo "configure:3644: checking for $LD option to reload object files" >&5
3644 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3645   echo $ac_n "(cached) $ac_c" 1>&6
3646 else
3647   lt_cv_ld_reload_flag='-r'
3648 fi
3649
3650 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3651 reload_flag=$lt_cv_ld_reload_flag
3652 test -n "$reload_flag" && reload_flag=" $reload_flag"
3653
3654 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3655 echo "configure:3656: checking for BSD-compatible nm" >&5
3656 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3657   echo $ac_n "(cached) $ac_c" 1>&6
3658 else
3659   if test -n "$NM"; then
3660   # Let the user override the test.
3661   lt_cv_path_NM="$NM"
3662 else
3663   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3664   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3665     test -z "$ac_dir" && ac_dir=.
3666     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3667     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3668       # Check to see if the nm accepts a BSD-compat flag.
3669       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3670       #   nm: unknown option "B" ignored
3671       # Tru64's nm complains that /dev/null is an invalid object file
3672       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3673         lt_cv_path_NM="$tmp_nm -B"
3674         break
3675       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3676         lt_cv_path_NM="$tmp_nm -p"
3677         break
3678       else
3679         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3680         continue # so that we can try to find one that supports BSD flags
3681       fi
3682     fi
3683   done
3684   IFS="$ac_save_ifs"
3685   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3686 fi
3687 fi
3688
3689 NM="$lt_cv_path_NM"
3690 echo "$ac_t""$NM" 1>&6
3691
3692 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3693 echo "configure:3694: checking for a sed that does not truncate output" >&5
3694 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3695   echo $ac_n "(cached) $ac_c" 1>&6
3696 else
3697   # Loop through the user's path and test for sed and gsed.
3698 # Then use that list of sed's as ones to test for truncation.
3699 as_executable_p="test -f"
3700 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3701 for as_dir in $PATH
3702 do
3703   IFS=$as_save_IFS
3704   test -z "$as_dir" && as_dir=.
3705   for ac_prog in sed gsed; do
3706     for ac_exec_ext in '' $ac_executable_extensions; do
3707       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3708         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3709       fi
3710     done
3711   done
3712 done
3713
3714   # Create a temporary directory, and hook for its removal unless debugging.
3715 $debug ||
3716 {
3717   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3718   trap '{ (exit 1); exit 1; }' 1 2 13 15
3719 }
3720
3721 # Create a (secure) tmp directory for tmp files.
3722 : ${TMPDIR=/tmp}
3723 {
3724   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3725   test -n "$tmp" && test -d "$tmp"
3726 }  ||
3727 {
3728   tmp=$TMPDIR/sed$$-$RANDOM
3729   (umask 077 && mkdir $tmp)
3730 } ||
3731 {
3732    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3733    { (exit 1); exit 1; }
3734 }
3735   _max=0
3736   _count=0
3737   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3738   # along with /bin/sed that truncates output.
3739   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3740     test ! -f ${_sed} && break
3741     cat /dev/null > "$tmp/sed.in"
3742     _count=0
3743     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3744     # Check for GNU sed and select it if it is found.
3745     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3746       lt_cv_path_SED=${_sed}
3747       break
3748     fi
3749     while true; do
3750       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3751       mv "$tmp/sed.tmp" "$tmp/sed.in"
3752       cp "$tmp/sed.in" "$tmp/sed.nl"
3753       echo >>"$tmp/sed.nl"
3754       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3755       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3756       # 40000 chars as input seems more than enough
3757       test $_count -gt 10 && break
3758       _count=`expr $_count + 1`
3759       if test $_count -gt $_max; then
3760         _max=$_count
3761         lt_cv_path_SED=$_sed
3762       fi
3763     done
3764   done
3765   rm -rf "$tmp"
3766
3767 fi
3768
3769 if test "X$SED" != "X"; then
3770   lt_cv_path_SED=$SED
3771 else
3772   SED=$lt_cv_path_SED
3773 fi
3774 echo "$ac_t""$SED" 1>&6
3775
3776 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3777 echo "configure:3778: checking whether ln -s works" >&5
3778 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3779   echo $ac_n "(cached) $ac_c" 1>&6
3780 else
3781   rm -f conftestdata
3782 if ln -s X conftestdata 2>/dev/null
3783 then
3784   rm -f conftestdata
3785   ac_cv_prog_LN_S="ln -s"
3786 else
3787   ac_cv_prog_LN_S=ln
3788 fi
3789 fi
3790 LN_S="$ac_cv_prog_LN_S"
3791 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3792   echo "$ac_t""yes" 1>&6
3793 else
3794   echo "$ac_t""no" 1>&6
3795 fi
3796
3797 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3798 echo "configure:3799: checking how to recognise dependent libraries" >&5
3799 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3800   echo $ac_n "(cached) $ac_c" 1>&6
3801 else
3802   lt_cv_file_magic_cmd='$MAGIC_CMD'
3803 lt_cv_file_magic_test_file=
3804 lt_cv_deplibs_check_method='unknown'
3805 # Need to set the preceding variable on all platforms that support
3806 # interlibrary dependencies.
3807 # 'none' -- dependencies not supported.
3808 # `unknown' -- same as none, but documents that we really don't know.
3809 # 'pass_all' -- all dependencies passed with no checks.
3810 # 'test_compile' -- check by making test program.
3811 # 'file_magic [[regex]]' -- check by looking for files in library path
3812 # which responds to the $file_magic_cmd with a given egrep regex.
3813 # If you have `file' or equivalent on your system and you're not sure
3814 # whether `pass_all' will *always* work, you probably want this one.
3815
3816 case $host_os in
3817 aix4* | aix5*)
3818   lt_cv_deplibs_check_method=pass_all
3819   ;;
3820
3821 beos*)
3822   lt_cv_deplibs_check_method=pass_all
3823   ;;
3824
3825 bsdi4*)
3826   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3827   lt_cv_file_magic_cmd='/usr/bin/file -L'
3828   lt_cv_file_magic_test_file=/shlib/libc.so
3829   ;;
3830
3831 cygwin* | mingw* | pw32*)
3832   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3833   lt_cv_file_magic_cmd='$OBJDUMP -f'
3834   ;;
3835
3836 darwin* | rhapsody*)
3837   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3838   lt_cv_file_magic_cmd='/usr/bin/file -L'
3839   case "$host_os" in
3840   rhapsody* | darwin1.[012])
3841     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3842     ;;
3843   *) # Darwin 1.3 on
3844     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3845     ;;
3846   esac
3847   ;;
3848
3849 freebsd*)
3850   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3851     case $host_cpu in
3852     i*86 )
3853       # Not sure whether the presence of OpenBSD here was a mistake.
3854       # Let's accept both of them until this is cleared up.
3855       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3856       lt_cv_file_magic_cmd=/usr/bin/file
3857       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3858       ;;
3859     esac
3860   else
3861     lt_cv_deplibs_check_method=pass_all
3862   fi
3863   ;;
3864
3865 gnu*)
3866   lt_cv_deplibs_check_method=pass_all
3867   ;;
3868
3869 hpux10.20*|hpux11*)
3870   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3871   lt_cv_file_magic_cmd=/usr/bin/file
3872   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3873   ;;
3874
3875 irix5* | irix6* | nonstopux*)
3876   case $host_os in
3877   irix5* | nonstopux*)
3878     # this will be overridden with pass_all, but let us keep it just in case
3879     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3880     ;;
3881   *)
3882     case $LD in
3883     *-32|*"-32 ") libmagic=32-bit;;
3884     *-n32|*"-n32 ") libmagic=N32;;
3885     *-64|*"-64 ") libmagic=64-bit;;
3886     *) libmagic=never-match;;
3887     esac
3888     # this will be overridden with pass_all, but let us keep it just in case
3889     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3890     ;;
3891   esac
3892   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3893   lt_cv_deplibs_check_method=pass_all
3894   ;;
3895
3896 # This must be Linux ELF.
3897 linux-gnu*)
3898   case $host_cpu in
3899   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3900     lt_cv_deplibs_check_method=pass_all ;;
3901   *)
3902     # glibc up to 2.1.1 does not perform some relocations on ARM
3903     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3904   esac
3905   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3906   ;;
3907
3908 netbsd*)
3909   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3910     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3911   else
3912     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3913   fi
3914   ;;
3915
3916 newos6*)
3917   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3918   lt_cv_file_magic_cmd=/usr/bin/file
3919   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3920   ;;
3921
3922 openbsd*)
3923   lt_cv_file_magic_cmd=/usr/bin/file
3924   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3925   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3926     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3927   else
3928     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3929   fi
3930   ;;
3931
3932 osf3* | osf4* | osf5*)
3933   # this will be overridden with pass_all, but let us keep it just in case
3934   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3935   lt_cv_file_magic_test_file=/shlib/libc.so
3936   lt_cv_deplibs_check_method=pass_all
3937   ;;
3938
3939 sco3.2v5*)
3940   lt_cv_deplibs_check_method=pass_all
3941   ;;
3942
3943 solaris*)
3944   lt_cv_deplibs_check_method=pass_all
3945   lt_cv_file_magic_test_file=/lib/libc.so
3946   ;;
3947
3948 sysv5uw[78]* | sysv4*uw2*)
3949   lt_cv_deplibs_check_method=pass_all
3950   ;;
3951
3952 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3953   case $host_vendor in
3954   motorola)
3955     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]'
3956     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3957     ;;
3958   ncr)
3959     lt_cv_deplibs_check_method=pass_all
3960     ;;
3961   sequent)
3962     lt_cv_file_magic_cmd='/bin/file'
3963     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3964     ;;
3965   sni)
3966     lt_cv_file_magic_cmd='/bin/file'
3967     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3968     lt_cv_file_magic_test_file=/lib/libc.so
3969     ;;
3970   siemens)
3971     lt_cv_deplibs_check_method=pass_all
3972     ;;
3973   esac
3974   ;;
3975 esac
3976
3977 fi
3978
3979 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3980 file_magic_cmd=$lt_cv_file_magic_cmd
3981 deplibs_check_method=$lt_cv_deplibs_check_method
3982
3983 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3984 echo "configure:3985: checking for object suffix" >&5
3985 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3986   echo $ac_n "(cached) $ac_c" 1>&6
3987 else
3988   rm -f conftest*
3989 echo 'int i = 1;' > conftest.$ac_ext
3990 if { (eval echo configure:3991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3991   for ac_file in conftest.*; do
3992     case $ac_file in
3993     *.c) ;;
3994     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3995     esac
3996   done
3997 else
3998   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3999 fi
4000 rm -f conftest*
4001 fi
4002
4003 echo "$ac_t""$ac_cv_objext" 1>&6
4004 OBJEXT=$ac_cv_objext
4005 ac_objext=$ac_cv_objext
4006
4007
4008
4009
4010 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
4011 echo "configure:4012: checking for executable suffix" >&5
4012 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
4013   echo $ac_n "(cached) $ac_c" 1>&6
4014 else
4015   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
4016   ac_cv_exeext=.exe
4017 else
4018   rm -f conftest*
4019   echo 'int main () { return 0; }' > conftest.$ac_ext
4020   ac_cv_exeext=
4021   if { (eval echo configure:4022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
4022     for file in conftest.*; do
4023       case $file in
4024       *.c | *.C | *.o | *.obj | *.xcoff) ;;
4025       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
4026       esac
4027     done
4028   else
4029     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
4030   fi
4031   rm -f conftest*
4032   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
4033 fi
4034 fi
4035
4036 EXEEXT=""
4037 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
4038 echo "$ac_t""${ac_cv_exeext}" 1>&6
4039 ac_exeext=$EXEEXT
4040
4041 if test $host != $build; then
4042   ac_tool_prefix=${host_alias}-
4043 else
4044   ac_tool_prefix=
4045 fi
4046
4047
4048
4049
4050 # Check for command to grab the raw symbol name followed by C symbol from nm.
4051 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4052 echo "configure:4053: checking command to parse $NM output" >&5
4053 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4054   echo $ac_n "(cached) $ac_c" 1>&6
4055 else
4056   
4057 # These are sane defaults that work on at least a few old systems.
4058 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4059
4060 # Character class describing NM global symbol codes.
4061 symcode='[BCDEGRST]'
4062
4063 # Regexp to match symbols that can be accessed directly from C.
4064 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4065
4066 # Transform the above into a raw symbol and a C symbol.
4067 symxfrm='\1 \2\3 \3'
4068
4069 # Transform an extracted symbol line into a proper C declaration
4070 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4071
4072 # Transform an extracted symbol line into symbol name and symbol address
4073 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'"
4074
4075 # Define system-specific variables.
4076 case $host_os in
4077 aix*)
4078   symcode='[BCDT]'
4079   ;;
4080 cygwin* | mingw* | pw32*)
4081   symcode='[ABCDGISTW]'
4082   ;;
4083 hpux*) # Its linker distinguishes data from code symbols
4084   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4085   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'"
4086   ;;
4087 irix* | nonstopux*)
4088   symcode='[BCDEGRST]'
4089   ;;
4090 osf*)
4091   symcode='[BCDEGQRST]'
4092   ;;
4093 solaris* | sysv5*)
4094   symcode='[BDT]'
4095   ;;
4096 sysv4)
4097   symcode='[DFNSTU]'
4098   ;;
4099 esac
4100
4101 # Handle CRLF in mingw tool chain
4102 opt_cr=
4103 case $host_os in
4104 mingw*)
4105   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4106   ;;
4107 esac
4108
4109 # If we're using GNU nm, then use its standard symbol codes.
4110 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4111   symcode='[ABCDGISTW]'
4112 fi
4113
4114 # Try without a prefix undercore, then with it.
4115 for ac_symprfx in "" "_"; do
4116
4117   # Write the raw and C identifiers.
4118 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4119
4120   # Check to see that the pipe works correctly.
4121   pipe_works=no
4122   rm -f conftest*
4123   cat > conftest.$ac_ext <<EOF
4124 #ifdef __cplusplus
4125 extern "C" {
4126 #endif
4127 char nm_test_var;
4128 void nm_test_func(){}
4129 #ifdef __cplusplus
4130 }
4131 #endif
4132 int main(){nm_test_var='a';nm_test_func();return(0);}
4133 EOF
4134
4135   if { (eval echo configure:4136: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4136     # Now try to grab the symbols.
4137     nlist=conftest.nm
4138     if { (eval echo configure:4139: \"$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
4139       # Try sorting and uniquifying the output.
4140       if sort "$nlist" | uniq > "$nlist"T; then
4141         mv -f "$nlist"T "$nlist"
4142       else
4143         rm -f "$nlist"T
4144       fi
4145
4146       # Make sure that we snagged all the symbols we need.
4147       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4148         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4149           cat <<EOF > conftest.$ac_ext
4150 #ifdef __cplusplus
4151 extern "C" {
4152 #endif
4153
4154 EOF
4155           # Now generate the symbol file.
4156           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4157
4158           cat <<EOF >> conftest.$ac_ext
4159 #if defined (__STDC__) && __STDC__
4160 # define lt_ptr void *
4161 #else
4162 # define lt_ptr char *
4163 # define const
4164 #endif
4165
4166 /* The mapping between symbol names and symbols. */
4167 const struct {
4168   const char *name;
4169   lt_ptr address;
4170 }
4171 lt_preloaded_symbols[] =
4172 {
4173 EOF
4174           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4175           cat <<\EOF >> conftest.$ac_ext
4176   {0, (lt_ptr) 0}
4177 };
4178
4179 #ifdef __cplusplus
4180 }
4181 #endif
4182 EOF
4183           # Now try linking the two files.
4184           mv conftest.$ac_objext conftstm.$ac_objext
4185           save_LIBS="$LIBS"
4186           save_CFLAGS="$CFLAGS"
4187           LIBS="conftstm.$ac_objext"
4188           CFLAGS="$CFLAGS$no_builtin_flag"
4189           if { (eval echo configure:4190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4190             pipe_works=yes
4191           fi
4192           LIBS="$save_LIBS"
4193           CFLAGS="$save_CFLAGS"
4194         else
4195           echo "cannot find nm_test_func in $nlist" >&5
4196         fi
4197       else
4198         echo "cannot find nm_test_var in $nlist" >&5
4199       fi
4200     else
4201       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4202     fi
4203   else
4204     echo "$progname: failed program was:" >&5
4205     cat conftest.$ac_ext >&5
4206   fi
4207   rm -f conftest* conftst*
4208
4209   # Do not use the global_symbol_pipe unless it works.
4210   if test "$pipe_works" = yes; then
4211     break
4212   else
4213     lt_cv_sys_global_symbol_pipe=
4214   fi
4215 done
4216
4217 fi
4218
4219 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4220 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4221   global_symbol_to_cdecl=
4222   global_symbol_to_c_name_address=
4223 else
4224   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4225   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4226 fi
4227 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4228 then
4229   echo "$ac_t""failed" 1>&6
4230 else
4231   echo "$ac_t""ok" 1>&6
4232 fi
4233
4234 for ac_hdr in dlfcn.h
4235 do
4236 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4237 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4238 echo "configure:4239: checking for $ac_hdr" >&5
4239 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4240   echo $ac_n "(cached) $ac_c" 1>&6
4241 else
4242   cat > conftest.$ac_ext <<EOF
4243 #line 4244 "configure"
4244 #include "confdefs.h"
4245 #include <$ac_hdr>
4246 EOF
4247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4248 { (eval echo configure:4249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4250 if test -z "$ac_err"; then
4251   rm -rf conftest*
4252   eval "ac_cv_header_$ac_safe=yes"
4253 else
4254   echo "$ac_err" >&5
4255   echo "configure: failed program was:" >&5
4256   cat conftest.$ac_ext >&5
4257   rm -rf conftest*
4258   eval "ac_cv_header_$ac_safe=no"
4259 fi
4260 rm -f conftest*
4261 fi
4262 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4263   echo "$ac_t""yes" 1>&6
4264     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4265   cat >> confdefs.h <<EOF
4266 #define $ac_tr_hdr 1
4267 EOF
4268  
4269 else
4270   echo "$ac_t""no" 1>&6
4271 fi
4272 done
4273
4274
4275
4276
4277
4278
4279 # Only perform the check for file, if the check method requires it
4280 case $deplibs_check_method in
4281 file_magic*)
4282   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4283     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4284 echo "configure:4285: checking for ${ac_tool_prefix}file" >&5
4285 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4286   echo $ac_n "(cached) $ac_c" 1>&6
4287 else
4288   case $MAGIC_CMD in
4289   /*)
4290   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4291   ;;
4292   ?:/*)
4293   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4294   ;;
4295   *)
4296   ac_save_MAGIC_CMD="$MAGIC_CMD"
4297   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4298   ac_dummy="/usr/bin:$PATH"
4299   for ac_dir in $ac_dummy; do
4300     test -z "$ac_dir" && ac_dir=.
4301     if test -f $ac_dir/${ac_tool_prefix}file; then
4302       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4303       if test -n "$file_magic_test_file"; then
4304         case $deplibs_check_method in
4305         "file_magic "*)
4306           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4307           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4308           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4309             egrep "$file_magic_regex" > /dev/null; then
4310             :
4311           else
4312             cat <<EOF 1>&2
4313
4314 *** Warning: the command libtool uses to detect shared libraries,
4315 *** $file_magic_cmd, produces output that libtool cannot recognize.
4316 *** The result is that libtool may fail to recognize shared libraries
4317 *** as such.  This will affect the creation of libtool libraries that
4318 *** depend on shared libraries, but programs linked with such libtool
4319 *** libraries will work regardless of this problem.  Nevertheless, you
4320 *** may want to report the problem to your system manager and/or to
4321 *** bug-libtool@gnu.org
4322
4323 EOF
4324           fi ;;
4325         esac
4326       fi
4327       break
4328     fi
4329   done
4330   IFS="$ac_save_ifs"
4331   MAGIC_CMD="$ac_save_MAGIC_CMD"
4332   ;;
4333 esac
4334 fi
4335
4336 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4337 if test -n "$MAGIC_CMD"; then
4338   echo "$ac_t""$MAGIC_CMD" 1>&6
4339 else
4340   echo "$ac_t""no" 1>&6
4341 fi
4342
4343 if test -z "$lt_cv_path_MAGIC_CMD"; then
4344   if test -n "$ac_tool_prefix"; then
4345     echo $ac_n "checking for file""... $ac_c" 1>&6
4346 echo "configure:4347: checking for file" >&5
4347 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4348   echo $ac_n "(cached) $ac_c" 1>&6
4349 else
4350   case $MAGIC_CMD in
4351   /*)
4352   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4353   ;;
4354   ?:/*)
4355   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4356   ;;
4357   *)
4358   ac_save_MAGIC_CMD="$MAGIC_CMD"
4359   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4360   ac_dummy="/usr/bin:$PATH"
4361   for ac_dir in $ac_dummy; do
4362     test -z "$ac_dir" && ac_dir=.
4363     if test -f $ac_dir/file; then
4364       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4365       if test -n "$file_magic_test_file"; then
4366         case $deplibs_check_method in
4367         "file_magic "*)
4368           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4369           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4370           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4371             egrep "$file_magic_regex" > /dev/null; then
4372             :
4373           else
4374             cat <<EOF 1>&2
4375
4376 *** Warning: the command libtool uses to detect shared libraries,
4377 *** $file_magic_cmd, produces output that libtool cannot recognize.
4378 *** The result is that libtool may fail to recognize shared libraries
4379 *** as such.  This will affect the creation of libtool libraries that
4380 *** depend on shared libraries, but programs linked with such libtool
4381 *** libraries will work regardless of this problem.  Nevertheless, you
4382 *** may want to report the problem to your system manager and/or to
4383 *** bug-libtool@gnu.org
4384
4385 EOF
4386           fi ;;
4387         esac
4388       fi
4389       break
4390     fi
4391   done
4392   IFS="$ac_save_ifs"
4393   MAGIC_CMD="$ac_save_MAGIC_CMD"
4394   ;;
4395 esac
4396 fi
4397
4398 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4399 if test -n "$MAGIC_CMD"; then
4400   echo "$ac_t""$MAGIC_CMD" 1>&6
4401 else
4402   echo "$ac_t""no" 1>&6
4403 fi
4404
4405   else
4406     MAGIC_CMD=:
4407   fi
4408 fi
4409
4410   fi
4411   ;;
4412 esac
4413
4414 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4415 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4416 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4417 echo "configure:4418: checking for $ac_word" >&5
4418 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4419   echo $ac_n "(cached) $ac_c" 1>&6
4420 else
4421   if test -n "$RANLIB"; then
4422   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4423 else
4424   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4425   ac_dummy="$PATH"
4426   for ac_dir in $ac_dummy; do
4427     test -z "$ac_dir" && ac_dir=.
4428     if test -f $ac_dir/$ac_word; then
4429       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4430       break
4431     fi
4432   done
4433   IFS="$ac_save_ifs"
4434 fi
4435 fi
4436 RANLIB="$ac_cv_prog_RANLIB"
4437 if test -n "$RANLIB"; then
4438   echo "$ac_t""$RANLIB" 1>&6
4439 else
4440   echo "$ac_t""no" 1>&6
4441 fi
4442
4443
4444 if test -z "$ac_cv_prog_RANLIB"; then
4445 if test -n "$ac_tool_prefix"; then
4446   # Extract the first word of "ranlib", so it can be a program name with args.
4447 set dummy ranlib; ac_word=$2
4448 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4449 echo "configure:4450: checking for $ac_word" >&5
4450 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4451   echo $ac_n "(cached) $ac_c" 1>&6
4452 else
4453   if test -n "$RANLIB"; then
4454   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4455 else
4456   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4457   ac_dummy="$PATH"
4458   for ac_dir in $ac_dummy; do
4459     test -z "$ac_dir" && ac_dir=.
4460     if test -f $ac_dir/$ac_word; then
4461       ac_cv_prog_RANLIB="ranlib"
4462       break
4463     fi
4464   done
4465   IFS="$ac_save_ifs"
4466   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4467 fi
4468 fi
4469 RANLIB="$ac_cv_prog_RANLIB"
4470 if test -n "$RANLIB"; then
4471   echo "$ac_t""$RANLIB" 1>&6
4472 else
4473   echo "$ac_t""no" 1>&6
4474 fi
4475
4476 else
4477   RANLIB=":"
4478 fi
4479 fi
4480
4481 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4482 set dummy ${ac_tool_prefix}strip; ac_word=$2
4483 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4484 echo "configure:4485: checking for $ac_word" >&5
4485 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4486   echo $ac_n "(cached) $ac_c" 1>&6
4487 else
4488   if test -n "$STRIP"; then
4489   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4490 else
4491   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4492   ac_dummy="$PATH"
4493   for ac_dir in $ac_dummy; do
4494     test -z "$ac_dir" && ac_dir=.
4495     if test -f $ac_dir/$ac_word; then
4496       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4497       break
4498     fi
4499   done
4500   IFS="$ac_save_ifs"
4501 fi
4502 fi
4503 STRIP="$ac_cv_prog_STRIP"
4504 if test -n "$STRIP"; then
4505   echo "$ac_t""$STRIP" 1>&6
4506 else
4507   echo "$ac_t""no" 1>&6
4508 fi
4509
4510
4511 if test -z "$ac_cv_prog_STRIP"; then
4512 if test -n "$ac_tool_prefix"; then
4513   # Extract the first word of "strip", so it can be a program name with args.
4514 set dummy strip; ac_word=$2
4515 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4516 echo "configure:4517: checking for $ac_word" >&5
4517 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4518   echo $ac_n "(cached) $ac_c" 1>&6
4519 else
4520   if test -n "$STRIP"; then
4521   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4522 else
4523   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4524   ac_dummy="$PATH"
4525   for ac_dir in $ac_dummy; do
4526     test -z "$ac_dir" && ac_dir=.
4527     if test -f $ac_dir/$ac_word; then
4528       ac_cv_prog_STRIP="strip"
4529       break
4530     fi
4531   done
4532   IFS="$ac_save_ifs"
4533   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4534 fi
4535 fi
4536 STRIP="$ac_cv_prog_STRIP"
4537 if test -n "$STRIP"; then
4538   echo "$ac_t""$STRIP" 1>&6
4539 else
4540   echo "$ac_t""no" 1>&6
4541 fi
4542
4543 else
4544   STRIP=":"
4545 fi
4546 fi
4547
4548
4549 enable_dlopen=yes
4550 enable_win32_dll=yes
4551
4552 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4553 if test "${enable_libtool_lock+set}" = set; then
4554   enableval="$enable_libtool_lock"
4555   :
4556 fi
4557
4558 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4559
4560 # Some flags need to be propagated to the compiler or linker for good
4561 # libtool support.
4562 case $host in
4563 *-*-irix6*)
4564   # Find out which ABI we are using.
4565   echo '#line 4566 "configure"' > conftest.$ac_ext
4566   if { (eval echo configure:4567: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4567     case `/usr/bin/file conftest.$ac_objext` in
4568     *32-bit*)
4569       LD="${LD-ld} -32"
4570       ;;
4571     *N32*)
4572       LD="${LD-ld} -n32"
4573       ;;
4574     *64-bit*)
4575       LD="${LD-ld} -64"
4576       ;;
4577     esac
4578   fi
4579   rm -rf conftest*
4580   ;;
4581
4582 *-*-sco3.2v5*)
4583   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4584   SAVE_CFLAGS="$CFLAGS"
4585   CFLAGS="$CFLAGS -belf"
4586   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4587 echo "configure:4588: checking whether the C compiler needs -belf" >&5
4588 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4589   echo $ac_n "(cached) $ac_c" 1>&6
4590 else
4591   
4592      ac_ext=c
4593 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4594 ac_cpp='$CPP $CPPFLAGS'
4595 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4596 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4597 cross_compiling=$ac_cv_prog_cc_cross
4598
4599      cat > conftest.$ac_ext <<EOF
4600 #line 4601 "configure"
4601 #include "confdefs.h"
4602
4603 int main() {
4604
4605 ; return 0; }
4606 EOF
4607 if { (eval echo configure:4608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4608   rm -rf conftest*
4609   lt_cv_cc_needs_belf=yes
4610 else
4611   echo "configure: failed program was:" >&5
4612   cat conftest.$ac_ext >&5
4613   rm -rf conftest*
4614   lt_cv_cc_needs_belf=no
4615 fi
4616 rm -f conftest*
4617      ac_ext=c
4618 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4619 ac_cpp='$CPP $CPPFLAGS'
4620 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4621 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4622 cross_compiling=$ac_cv_prog_cc_cross
4623
4624 fi
4625
4626 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4627   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4628     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4629     CFLAGS="$SAVE_CFLAGS"
4630   fi
4631   ;;
4632
4633 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4634   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4635 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4636 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4637 echo "configure:4638: checking for $ac_word" >&5
4638 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4639   echo $ac_n "(cached) $ac_c" 1>&6
4640 else
4641   if test -n "$DLLTOOL"; then
4642   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4643 else
4644   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4645   ac_dummy="$PATH"
4646   for ac_dir in $ac_dummy; do
4647     test -z "$ac_dir" && ac_dir=.
4648     if test -f $ac_dir/$ac_word; then
4649       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4650       break
4651     fi
4652   done
4653   IFS="$ac_save_ifs"
4654 fi
4655 fi
4656 DLLTOOL="$ac_cv_prog_DLLTOOL"
4657 if test -n "$DLLTOOL"; then
4658   echo "$ac_t""$DLLTOOL" 1>&6
4659 else
4660   echo "$ac_t""no" 1>&6
4661 fi
4662
4663
4664 if test -z "$ac_cv_prog_DLLTOOL"; then
4665 if test -n "$ac_tool_prefix"; then
4666   # Extract the first word of "dlltool", so it can be a program name with args.
4667 set dummy dlltool; ac_word=$2
4668 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4669 echo "configure:4670: checking for $ac_word" >&5
4670 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4671   echo $ac_n "(cached) $ac_c" 1>&6
4672 else
4673   if test -n "$DLLTOOL"; then
4674   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4675 else
4676   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4677   ac_dummy="$PATH"
4678   for ac_dir in $ac_dummy; do
4679     test -z "$ac_dir" && ac_dir=.
4680     if test -f $ac_dir/$ac_word; then
4681       ac_cv_prog_DLLTOOL="dlltool"
4682       break
4683     fi
4684   done
4685   IFS="$ac_save_ifs"
4686   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4687 fi
4688 fi
4689 DLLTOOL="$ac_cv_prog_DLLTOOL"
4690 if test -n "$DLLTOOL"; then
4691   echo "$ac_t""$DLLTOOL" 1>&6
4692 else
4693   echo "$ac_t""no" 1>&6
4694 fi
4695
4696 else
4697   DLLTOOL="false"
4698 fi
4699 fi
4700
4701   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4702 set dummy ${ac_tool_prefix}as; ac_word=$2
4703 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4704 echo "configure:4705: checking for $ac_word" >&5
4705 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4706   echo $ac_n "(cached) $ac_c" 1>&6
4707 else
4708   if test -n "$AS"; then
4709   ac_cv_prog_AS="$AS" # Let the user override the test.
4710 else
4711   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4712   ac_dummy="$PATH"
4713   for ac_dir in $ac_dummy; do
4714     test -z "$ac_dir" && ac_dir=.
4715     if test -f $ac_dir/$ac_word; then
4716       ac_cv_prog_AS="${ac_tool_prefix}as"
4717       break
4718     fi
4719   done
4720   IFS="$ac_save_ifs"
4721 fi
4722 fi
4723 AS="$ac_cv_prog_AS"
4724 if test -n "$AS"; then
4725   echo "$ac_t""$AS" 1>&6
4726 else
4727   echo "$ac_t""no" 1>&6
4728 fi
4729
4730
4731 if test -z "$ac_cv_prog_AS"; then
4732 if test -n "$ac_tool_prefix"; then
4733   # Extract the first word of "as", so it can be a program name with args.
4734 set dummy as; ac_word=$2
4735 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4736 echo "configure:4737: checking for $ac_word" >&5
4737 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4738   echo $ac_n "(cached) $ac_c" 1>&6
4739 else
4740   if test -n "$AS"; then
4741   ac_cv_prog_AS="$AS" # Let the user override the test.
4742 else
4743   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4744   ac_dummy="$PATH"
4745   for ac_dir in $ac_dummy; do
4746     test -z "$ac_dir" && ac_dir=.
4747     if test -f $ac_dir/$ac_word; then
4748       ac_cv_prog_AS="as"
4749       break
4750     fi
4751   done
4752   IFS="$ac_save_ifs"
4753   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4754 fi
4755 fi
4756 AS="$ac_cv_prog_AS"
4757 if test -n "$AS"; then
4758   echo "$ac_t""$AS" 1>&6
4759 else
4760   echo "$ac_t""no" 1>&6
4761 fi
4762
4763 else
4764   AS="false"
4765 fi
4766 fi
4767
4768   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4769 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4770 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4771 echo "configure:4772: checking for $ac_word" >&5
4772 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4773   echo $ac_n "(cached) $ac_c" 1>&6
4774 else
4775   if test -n "$OBJDUMP"; then
4776   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4777 else
4778   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4779   ac_dummy="$PATH"
4780   for ac_dir in $ac_dummy; do
4781     test -z "$ac_dir" && ac_dir=.
4782     if test -f $ac_dir/$ac_word; then
4783       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4784       break
4785     fi
4786   done
4787   IFS="$ac_save_ifs"
4788 fi
4789 fi
4790 OBJDUMP="$ac_cv_prog_OBJDUMP"
4791 if test -n "$OBJDUMP"; then
4792   echo "$ac_t""$OBJDUMP" 1>&6
4793 else
4794   echo "$ac_t""no" 1>&6
4795 fi
4796
4797
4798 if test -z "$ac_cv_prog_OBJDUMP"; then
4799 if test -n "$ac_tool_prefix"; then
4800   # Extract the first word of "objdump", so it can be a program name with args.
4801 set dummy objdump; ac_word=$2
4802 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4803 echo "configure:4804: checking for $ac_word" >&5
4804 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4805   echo $ac_n "(cached) $ac_c" 1>&6
4806 else
4807   if test -n "$OBJDUMP"; then
4808   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4809 else
4810   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4811   ac_dummy="$PATH"
4812   for ac_dir in $ac_dummy; do
4813     test -z "$ac_dir" && ac_dir=.
4814     if test -f $ac_dir/$ac_word; then
4815       ac_cv_prog_OBJDUMP="objdump"
4816       break
4817     fi
4818   done
4819   IFS="$ac_save_ifs"
4820   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4821 fi
4822 fi
4823 OBJDUMP="$ac_cv_prog_OBJDUMP"
4824 if test -n "$OBJDUMP"; then
4825   echo "$ac_t""$OBJDUMP" 1>&6
4826 else
4827   echo "$ac_t""no" 1>&6
4828 fi
4829
4830 else
4831   OBJDUMP="false"
4832 fi
4833 fi
4834
4835
4836   # recent cygwin and mingw systems supply a stub DllMain which the user
4837   # can override, but on older systems we have to supply one
4838   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4839 echo "configure:4840: checking if libtool should supply DllMain function" >&5
4840 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4841   echo $ac_n "(cached) $ac_c" 1>&6
4842 else
4843   cat > conftest.$ac_ext <<EOF
4844 #line 4845 "configure"
4845 #include "confdefs.h"
4846
4847 int main() {
4848 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4849       DllMain (0, 0, 0);
4850 ; return 0; }
4851 EOF
4852 if { (eval echo configure:4853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4853   rm -rf conftest*
4854   lt_cv_need_dllmain=no
4855 else
4856   echo "configure: failed program was:" >&5
4857   cat conftest.$ac_ext >&5
4858   rm -rf conftest*
4859   lt_cv_need_dllmain=yes
4860 fi
4861 rm -f conftest*
4862 fi
4863
4864 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4865
4866   case $host/$CC in
4867   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4868     # old mingw systems require "-dll" to link a DLL, while more recent ones
4869     # require "-mdll"
4870     SAVE_CFLAGS="$CFLAGS"
4871     CFLAGS="$CFLAGS -mdll"
4872     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4873 echo "configure:4874: checking how to link DLLs" >&5
4874 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4875   echo $ac_n "(cached) $ac_c" 1>&6
4876 else
4877   cat > conftest.$ac_ext <<EOF
4878 #line 4879 "configure"
4879 #include "confdefs.h"
4880
4881 int main() {
4882
4883 ; return 0; }
4884 EOF
4885 if { (eval echo configure:4886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4886   rm -rf conftest*
4887   lt_cv_cc_dll_switch=-mdll
4888 else
4889   echo "configure: failed program was:" >&5
4890   cat conftest.$ac_ext >&5
4891   rm -rf conftest*
4892   lt_cv_cc_dll_switch=-dll
4893 fi
4894 rm -f conftest*
4895 fi
4896
4897 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4898     CFLAGS="$SAVE_CFLAGS" ;;
4899   *-*-cygwin* | *-*-pw32*)
4900     # cygwin systems need to pass --dll to the linker, and not link
4901     # crt.o which will require a WinMain@16 definition.
4902     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4903   esac
4904   ;;
4905   
4906 esac
4907
4908 # Sed substitution that helps us do robust quoting.  It backslashifies
4909 # metacharacters that are still active within double-quoted strings.
4910 Xsed='sed -e s/^X//'
4911 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4912
4913 # Same as above, but do not quote variable references.
4914 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4915
4916 # Sed substitution to delay expansion of an escaped shell variable in a
4917 # double_quote_subst'ed string.
4918 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4919
4920 # Constants:
4921 rm="rm -f"
4922
4923 # Global variables:
4924 default_ofile=libtool
4925 can_build_shared=yes
4926
4927 # All known linkers require a `.a' archive for static linking (except M$VC,
4928 # which needs '.lib').
4929 libext=a
4930 ltmain="$ac_aux_dir/ltmain.sh"
4931 ofile="$default_ofile"
4932 with_gnu_ld="$lt_cv_prog_gnu_ld"
4933 need_locks="$enable_libtool_lock"
4934
4935 old_CC="$CC"
4936 old_CFLAGS="$CFLAGS"
4937
4938 # Set sane defaults for various variables
4939 test -z "$AR" && AR=ar
4940 test -z "$AR_FLAGS" && AR_FLAGS=cru
4941 test -z "$AS" && AS=as
4942 test -z "$CC" && CC=cc
4943 test -z "$DLLTOOL" && DLLTOOL=dlltool
4944 test -z "$LD" && LD=ld
4945 test -z "$LN_S" && LN_S="ln -s"
4946 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4947 test -z "$NM" && NM=nm
4948 test -z "$OBJDUMP" && OBJDUMP=objdump
4949 test -z "$RANLIB" && RANLIB=:
4950 test -z "$STRIP" && STRIP=:
4951 test -z "$ac_objext" && ac_objext=o
4952
4953 if test x"$host" != x"$build"; then
4954   ac_tool_prefix=${host_alias}-
4955 else
4956   ac_tool_prefix=
4957 fi
4958
4959 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4960 case $host_os in
4961 linux-gnu*) ;;
4962 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4963 esac
4964
4965 case $host_os in
4966 aix3*)
4967   # AIX sometimes has problems with the GCC collect2 program.  For some
4968   # reason, if we set the COLLECT_NAMES environment variable, the problems
4969   # vanish in a puff of smoke.
4970   if test "X${COLLECT_NAMES+set}" != Xset; then
4971     COLLECT_NAMES=
4972     export COLLECT_NAMES
4973   fi
4974   ;;
4975 esac
4976
4977 # Determine commands to create old-style static archives.
4978 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4979 old_postinstall_cmds='chmod 644 $oldlib'
4980 old_postuninstall_cmds=
4981
4982 if test -n "$RANLIB"; then
4983   case $host_os in
4984   openbsd*)
4985     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4986     ;;
4987   *)
4988     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4989     ;;
4990   esac
4991   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4992 fi
4993
4994 # Allow CC to be a program name with arguments.
4995 set dummy $CC
4996 compiler="$2"
4997
4998 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4999 echo "configure:5000: checking for objdir" >&5
5000 rm -f .libs 2>/dev/null
5001 mkdir .libs 2>/dev/null
5002 if test -d .libs; then
5003   objdir=.libs
5004 else
5005   # MS-DOS does not allow filenames that begin with a dot.
5006   objdir=_libs
5007 fi
5008 rmdir .libs 2>/dev/null
5009 echo "$ac_t""$objdir" 1>&6
5010
5011
5012 # Check whether --with-pic or --without-pic was given.
5013 if test "${with_pic+set}" = set; then
5014   withval="$with_pic"
5015   pic_mode="$withval"
5016 else
5017   pic_mode=default
5018 fi
5019
5020 test -z "$pic_mode" && pic_mode=default
5021
5022 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
5023 # in isolation, and that seeing it set (from the cache) indicates that
5024 # the associated values are set (in the cache) correctly too.
5025 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
5026 echo "configure:5027: checking for $compiler option to produce PIC" >&5
5027 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
5028   echo $ac_n "(cached) $ac_c" 1>&6
5029 else
5030    lt_cv_prog_cc_pic=
5031   lt_cv_prog_cc_shlib=
5032   lt_cv_prog_cc_wl=
5033   lt_cv_prog_cc_static=
5034   lt_cv_prog_cc_no_builtin=
5035   lt_cv_prog_cc_can_build_shared=$can_build_shared
5036
5037   if test "$GCC" = yes; then
5038     lt_cv_prog_cc_wl='-Wl,'
5039     lt_cv_prog_cc_static='-static'
5040
5041     case $host_os in
5042     aix*)
5043       # Below there is a dirty hack to force normal static linking with -ldl
5044       # The problem is because libdl dynamically linked with both libc and
5045       # libC (AIX C++ library), which obviously doesn't included in libraries
5046       # list by gcc. This cause undefined symbols with -static flags.
5047       # This hack allows C programs to be linked with "-static -ldl", but
5048       # not sure about C++ programs.
5049       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5050       ;;
5051     amigaos*)
5052       # FIXME: we need at least 68020 code to build shared libraries, but
5053       # adding the `-m68020' flag to GCC prevents building anything better,
5054       # like `-m68040'.
5055       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5056       ;;
5057     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
5058       # PIC is the default for these OSes.
5059       ;;
5060     darwin* | rhapsody*)
5061       # PIC is the default on this platform
5062       # Common symbols not allowed in MH_DYLIB files
5063       lt_cv_prog_cc_pic='-fno-common'
5064       ;;
5065     cygwin* | mingw* | pw32* | os2*)
5066       # This hack is so that the source file can tell whether it is being
5067       # built for inclusion in a dll (and should export symbols for example).
5068       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5069       ;;
5070     sysv4*MP*)
5071       if test -d /usr/nec; then
5072          lt_cv_prog_cc_pic=-Kconform_pic
5073       fi
5074       ;;
5075     *)
5076       lt_cv_prog_cc_pic='-fPIC'
5077       ;;
5078     esac
5079   else
5080     # PORTME Check for PIC flags for the system compiler.
5081     case $host_os in
5082     aix3* | aix4* | aix5*)
5083       lt_cv_prog_cc_wl='-Wl,'
5084       # All AIX code is PIC.
5085       if test "$host_cpu" = ia64; then
5086         # AIX 5 now supports IA64 processor
5087         lt_cv_prog_cc_static='-Bstatic'
5088       else
5089         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5090       fi
5091       ;;
5092
5093     hpux9* | hpux10* | hpux11*)
5094       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5095       lt_cv_prog_cc_wl='-Wl,'
5096       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5097       lt_cv_prog_cc_pic='+Z'
5098       ;;
5099
5100     irix5* | irix6* | nonstopux*)
5101       lt_cv_prog_cc_wl='-Wl,'
5102       lt_cv_prog_cc_static='-non_shared'
5103       # PIC (with -KPIC) is the default.
5104       ;;
5105
5106     cygwin* | mingw* | pw32* | os2*)
5107       # This hack is so that the source file can tell whether it is being
5108       # built for inclusion in a dll (and should export symbols for example).
5109       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5110       ;;
5111
5112     newsos6)
5113       lt_cv_prog_cc_pic='-KPIC'
5114       lt_cv_prog_cc_static='-Bstatic'
5115       ;;
5116
5117     osf3* | osf4* | osf5*)
5118       # All OSF/1 code is PIC.
5119       lt_cv_prog_cc_wl='-Wl,'
5120       lt_cv_prog_cc_static='-non_shared'
5121       ;;
5122
5123     sco3.2v5*)
5124       lt_cv_prog_cc_pic='-Kpic'
5125       lt_cv_prog_cc_static='-dn'
5126       lt_cv_prog_cc_shlib='-belf'
5127       ;;
5128
5129     solaris*)
5130       lt_cv_prog_cc_pic='-KPIC'
5131       lt_cv_prog_cc_static='-Bstatic'
5132       lt_cv_prog_cc_wl='-Wl,'
5133       ;;
5134
5135     sunos4*)
5136       lt_cv_prog_cc_pic='-PIC'
5137       lt_cv_prog_cc_static='-Bstatic'
5138       lt_cv_prog_cc_wl='-Qoption ld '
5139       ;;
5140
5141     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5142       lt_cv_prog_cc_pic='-KPIC'
5143       lt_cv_prog_cc_static='-Bstatic'
5144       lt_cv_prog_cc_wl='-Wl,'
5145       ;;
5146
5147     uts4*)
5148       lt_cv_prog_cc_pic='-pic'
5149       lt_cv_prog_cc_static='-Bstatic'
5150       ;;
5151
5152     sysv4*MP*)
5153       if test -d /usr/nec ;then
5154         lt_cv_prog_cc_pic='-Kconform_pic'
5155         lt_cv_prog_cc_static='-Bstatic'
5156       fi
5157       ;;
5158
5159     *)
5160       lt_cv_prog_cc_can_build_shared=no
5161       ;;
5162     esac
5163   fi
5164
5165 fi
5166
5167 if test -z "$lt_cv_prog_cc_pic"; then
5168   echo "$ac_t""none" 1>&6
5169 else
5170   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5171
5172   # Check to make sure the pic_flag actually works.
5173   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5174 echo "configure:5175: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5175   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5176   echo $ac_n "(cached) $ac_c" 1>&6
5177 else
5178       save_CFLAGS="$CFLAGS"
5179     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5180     cat > conftest.$ac_ext <<EOF
5181 #line 5182 "configure"
5182 #include "confdefs.h"
5183
5184 int main() {
5185
5186 ; return 0; }
5187 EOF
5188 if { (eval echo configure:5189: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5189   rm -rf conftest*
5190         case $host_os in
5191       hpux9* | hpux10* | hpux11*)
5192         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5193         # they create non-PIC objects.  So, if there were any warnings, we
5194         # assume that PIC is not supported.
5195         if test -s conftest.err; then
5196           lt_cv_prog_cc_pic_works=no
5197         else
5198           lt_cv_prog_cc_pic_works=yes
5199         fi
5200         ;;
5201       *)
5202         lt_cv_prog_cc_pic_works=yes
5203         ;;
5204       esac
5205     
5206 else
5207   echo "configure: failed program was:" >&5
5208   cat conftest.$ac_ext >&5
5209   rm -rf conftest*
5210         lt_cv_prog_cc_pic_works=no
5211     
5212 fi
5213 rm -f conftest*
5214     CFLAGS="$save_CFLAGS"
5215   
5216 fi
5217
5218
5219   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5220     lt_cv_prog_cc_pic=
5221     lt_cv_prog_cc_can_build_shared=no
5222   else
5223     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5224   fi
5225
5226   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5227 fi
5228
5229 # Check for any special shared library compilation flags.
5230 if test -n "$lt_cv_prog_cc_shlib"; then
5231   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5232   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5233   else
5234    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5235     lt_cv_prog_cc_can_build_shared=no
5236   fi
5237 fi
5238
5239 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5240 echo "configure:5241: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5241 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5242   echo $ac_n "(cached) $ac_c" 1>&6
5243 else
5244     lt_cv_prog_cc_static_works=no
5245   save_LDFLAGS="$LDFLAGS"
5246   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5247   cat > conftest.$ac_ext <<EOF
5248 #line 5249 "configure"
5249 #include "confdefs.h"
5250
5251 int main() {
5252
5253 ; return 0; }
5254 EOF
5255 if { (eval echo configure:5256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5256   rm -rf conftest*
5257   lt_cv_prog_cc_static_works=yes
5258 else
5259   echo "configure: failed program was:" >&5
5260   cat conftest.$ac_ext >&5
5261 fi
5262 rm -f conftest*
5263   LDFLAGS="$save_LDFLAGS"
5264
5265 fi
5266
5267
5268 # Belt *and* braces to stop my trousers falling down:
5269 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5270 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5271
5272 pic_flag="$lt_cv_prog_cc_pic"
5273 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5274 wl="$lt_cv_prog_cc_wl"
5275 link_static_flag="$lt_cv_prog_cc_static"
5276 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5277 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5278
5279
5280 # Check to see if options -o and -c are simultaneously supported by compiler
5281 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5282 echo "configure:5283: checking if $compiler supports -c -o file.$ac_objext" >&5
5283 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5284   echo $ac_n "(cached) $ac_c" 1>&6
5285 else
5286   
5287 $rm -r conftest 2>/dev/null
5288 mkdir conftest
5289 cd conftest
5290 echo "int some_variable = 0;" > conftest.$ac_ext
5291 mkdir out
5292 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5293 # that will create temporary files in the current directory regardless of
5294 # the output directory.  Thus, making CWD read-only will cause this test
5295 # to fail, enabling locking or at least warning the user not to do parallel
5296 # builds.
5297 chmod -w .
5298 save_CFLAGS="$CFLAGS"
5299 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5300 compiler_c_o=no
5301 if { (eval echo configure:5302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5302   # The compiler can only warn and ignore the option if not recognized
5303   # So say no if there are warnings
5304   if test -s out/conftest.err; then
5305     lt_cv_compiler_c_o=no
5306   else
5307     lt_cv_compiler_c_o=yes
5308   fi
5309 else
5310   # Append any errors to the config.log.
5311   cat out/conftest.err 1>&5
5312   lt_cv_compiler_c_o=no
5313 fi
5314 CFLAGS="$save_CFLAGS"
5315 chmod u+w .
5316 $rm conftest* out/*
5317 rmdir out
5318 cd ..
5319 rmdir conftest
5320 $rm -r conftest 2>/dev/null
5321
5322 fi
5323
5324 compiler_c_o=$lt_cv_compiler_c_o
5325 echo "$ac_t""$compiler_c_o" 1>&6
5326
5327 if test x"$compiler_c_o" = x"yes"; then
5328   # Check to see if we can write to a .lo
5329   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5330 echo "configure:5331: checking if $compiler supports -c -o file.lo" >&5
5331   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5332   echo $ac_n "(cached) $ac_c" 1>&6
5333 else
5334   
5335   lt_cv_compiler_o_lo=no
5336   save_CFLAGS="$CFLAGS"
5337   CFLAGS="$CFLAGS -c -o conftest.lo"
5338   save_objext="$ac_objext"
5339   ac_objext=lo
5340   cat > conftest.$ac_ext <<EOF
5341 #line 5342 "configure"
5342 #include "confdefs.h"
5343
5344 int main() {
5345 int some_variable = 0;
5346 ; return 0; }
5347 EOF
5348 if { (eval echo configure:5349: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5349   rm -rf conftest*
5350       # The compiler can only warn and ignore the option if not recognized
5351     # So say no if there are warnings
5352     if test -s conftest.err; then
5353       lt_cv_compiler_o_lo=no
5354     else
5355       lt_cv_compiler_o_lo=yes
5356     fi
5357   
5358 else
5359   echo "configure: failed program was:" >&5
5360   cat conftest.$ac_ext >&5
5361 fi
5362 rm -f conftest*
5363   ac_objext="$save_objext"
5364   CFLAGS="$save_CFLAGS"
5365   
5366 fi
5367
5368   compiler_o_lo=$lt_cv_compiler_o_lo
5369   echo "$ac_t""$compiler_o_lo" 1>&6
5370 else
5371   compiler_o_lo=no
5372 fi
5373
5374 # Check to see if we can do hard links to lock some files if needed
5375 hard_links="nottested"
5376 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5377   # do not overwrite the value of need_locks provided by the user
5378   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5379 echo "configure:5380: checking if we can lock with hard links" >&5
5380   hard_links=yes
5381   $rm conftest*
5382   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5383   touch conftest.a
5384   ln conftest.a conftest.b 2>&5 || hard_links=no
5385   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5386   echo "$ac_t""$hard_links" 1>&6
5387   if test "$hard_links" = no; then
5388     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5389     need_locks=warn
5390   fi
5391 else
5392   need_locks=no
5393 fi
5394
5395 if test "$GCC" = yes; then
5396   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5397   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5398 echo "configure:5399: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5399   echo "int some_variable = 0;" > conftest.$ac_ext
5400   save_CFLAGS="$CFLAGS"
5401   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5402   compiler_rtti_exceptions=no
5403   cat > conftest.$ac_ext <<EOF
5404 #line 5405 "configure"
5405 #include "confdefs.h"
5406
5407 int main() {
5408 int some_variable = 0;
5409 ; return 0; }
5410 EOF
5411 if { (eval echo configure:5412: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5412   rm -rf conftest*
5413       # The compiler can only warn and ignore the option if not recognized
5414     # So say no if there are warnings
5415     if test -s conftest.err; then
5416       compiler_rtti_exceptions=no
5417     else
5418       compiler_rtti_exceptions=yes
5419     fi
5420   
5421 else
5422   echo "configure: failed program was:" >&5
5423   cat conftest.$ac_ext >&5
5424 fi
5425 rm -f conftest*
5426   CFLAGS="$save_CFLAGS"
5427   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5428
5429   if test "$compiler_rtti_exceptions" = "yes"; then
5430     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5431   else
5432     no_builtin_flag=' -fno-builtin'
5433   fi
5434 fi
5435
5436 # See if the linker supports building shared libraries.
5437 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5438 echo "configure:5439: checking whether the linker ($LD) supports shared libraries" >&5
5439
5440 allow_undefined_flag=
5441 no_undefined_flag=
5442 need_lib_prefix=unknown
5443 need_version=unknown
5444 # when you set need_version to no, make sure it does not cause -set_version
5445 # flags to be left without arguments
5446 archive_cmds=
5447 archive_expsym_cmds=
5448 old_archive_from_new_cmds=
5449 old_archive_from_expsyms_cmds=
5450 export_dynamic_flag_spec=
5451 whole_archive_flag_spec=
5452 thread_safe_flag_spec=
5453 hardcode_into_libs=no
5454 hardcode_libdir_flag_spec=
5455 hardcode_libdir_separator=
5456 hardcode_direct=no
5457 hardcode_minus_L=no
5458 hardcode_shlibpath_var=unsupported
5459 runpath_var=
5460 link_all_deplibs=unknown
5461 always_export_symbols=no
5462 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5463 # include_expsyms should be a list of space-separated symbols to be *always*
5464 # included in the symbol list
5465 include_expsyms=
5466 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5467 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5468 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5469 # as well as any symbol that contains `d'.
5470 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5471 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5472 # platforms (ab)use it in PIC code, but their linkers get confused if
5473 # the symbol is explicitly referenced.  Since portable code cannot
5474 # rely on this symbol name, it's probably fine to never include it in
5475 # preloaded symbol tables.
5476 extract_expsyms_cmds=
5477
5478 case $host_os in
5479 cygwin* | mingw* | pw32*)
5480   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5481   # When not using gcc, we currently assume that we are using
5482   # Microsoft Visual C++.
5483   if test "$GCC" != yes; then
5484     with_gnu_ld=no
5485   fi
5486   ;;
5487 openbsd*)
5488   with_gnu_ld=no
5489   ;;
5490 esac
5491
5492 ld_shlibs=yes
5493 if test "$with_gnu_ld" = yes; then
5494   # If archive_cmds runs LD, not CC, wlarc should be empty
5495   wlarc='${wl}'
5496
5497   # See if GNU ld supports shared libraries.
5498   case $host_os in
5499   aix3* | aix4* | aix5*)
5500     # On AIX, the GNU linker is very broken
5501     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5502     ld_shlibs=no
5503     cat <<EOF 1>&2
5504
5505 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5506 *** to be unable to reliably create shared libraries on AIX.
5507 *** Therefore, libtool is disabling shared libraries support.  If you
5508 *** really care for shared libraries, you may want to modify your PATH
5509 *** so that a non-GNU linker is found, and then restart.
5510
5511 EOF
5512     ;;
5513
5514   amigaos*)
5515     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)'
5516     hardcode_libdir_flag_spec='-L$libdir'
5517     hardcode_minus_L=yes
5518
5519     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5520     # that the semantics of dynamic libraries on AmigaOS, at least up
5521     # to version 4, is to share data among multiple programs linked
5522     # with the same dynamic library.  Since this doesn't match the
5523     # behavior of shared libraries on other platforms, we can use
5524     # them.
5525     ld_shlibs=no
5526     ;;
5527
5528   beos*)
5529     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5530       allow_undefined_flag=unsupported
5531       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5532       # support --undefined.  This deserves some investigation.  FIXME
5533       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5534     else
5535       ld_shlibs=no
5536     fi
5537     ;;
5538
5539   cygwin* | mingw* | pw32*)
5540     # hardcode_libdir_flag_spec is actually meaningless, as there is
5541     # no search path for DLLs.
5542     hardcode_libdir_flag_spec='-L$libdir'
5543     allow_undefined_flag=unsupported
5544     always_export_symbols=yes
5545
5546     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5547       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5548       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5549       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5550       else $CC -o impgen impgen.c ; fi)~
5551       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5552
5553     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5554
5555     # cygwin and mingw dlls have different entry points and sets of symbols
5556     # to exclude.
5557     # FIXME: what about values for MSVC?
5558     dll_entry=__cygwin_dll_entry@12
5559     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5560     case $host_os in
5561     mingw*)
5562       # mingw values
5563       dll_entry=_DllMainCRTStartup@12
5564       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5565       ;;
5566     esac
5567
5568     # mingw and cygwin differ, and it's simplest to just exclude the union
5569     # of the two symbol sets.
5570     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5571
5572     # recent cygwin and mingw systems supply a stub DllMain which the user
5573     # can override, but on older systems we have to supply one (in ltdll.c)
5574     if test "x$lt_cv_need_dllmain" = "xyes"; then
5575       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5576       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~
5577         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5578     else
5579       ltdll_obj=
5580       ltdll_cmds=
5581     fi
5582
5583     # Extract the symbol export list from an `--export-all' def file,
5584     # then regenerate the def file from the symbol export list, so that
5585     # the compiled dll only exports the symbol export list.
5586     # Be careful not to strip the DATA tag left be newer dlltools.
5587     export_symbols_cmds="$ltdll_cmds"'
5588       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5589       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5590
5591     # If the export-symbols file already is a .def file (1st line
5592     # is EXPORTS), use it as is.
5593     # If DATA tags from a recent dlltool are present, honour them!
5594     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5595         cp $export_symbols $output_objdir/$soname-def;
5596       else
5597         echo EXPORTS > $output_objdir/$soname-def;
5598         _lt_hint=1;
5599         cat $export_symbols | while read symbol; do
5600          set dummy \$symbol;
5601          case \$# in
5602            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5603            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5604            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5605          esac;
5606          _lt_hint=`expr 1 + \$_lt_hint`;
5607         done;
5608       fi~
5609       '"$ltdll_cmds"'
5610       $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~
5611       $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~
5612       $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~
5613       $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~
5614       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5615     ;;
5616
5617   netbsd*)
5618     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5619       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5620       wlarc=
5621     else
5622       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5623       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5624     fi
5625     ;;
5626
5627   solaris* | sysv5*)
5628     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5629       ld_shlibs=no
5630       cat <<EOF 1>&2
5631
5632 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5633 *** create shared libraries on Solaris systems.  Therefore, libtool
5634 *** is disabling shared libraries support.  We urge you to upgrade GNU
5635 *** binutils to release 2.9.1 or newer.  Another option is to modify
5636 *** your PATH or compiler configuration so that the native linker is
5637 *** used, and then restart.
5638
5639 EOF
5640     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5641       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5642       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5643     else
5644       ld_shlibs=no
5645     fi
5646     ;;
5647
5648   sunos4*)
5649     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5650     wlarc=
5651     hardcode_direct=yes
5652     hardcode_shlibpath_var=no
5653     ;;
5654
5655   *)
5656     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5657       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5658       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5659     else
5660       ld_shlibs=no
5661     fi
5662     ;;
5663   esac
5664
5665   if test "$ld_shlibs" = yes; then
5666     runpath_var=LD_RUN_PATH
5667     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5668     export_dynamic_flag_spec='${wl}--export-dynamic'
5669     case $host_os in
5670     cygwin* | mingw* | pw32*)
5671       # dlltool doesn't understand --whole-archive et. al.
5672       whole_archive_flag_spec=
5673       ;;
5674     *)
5675       # ancient GNU ld didn't support --whole-archive et. al.
5676       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5677         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5678       else
5679         whole_archive_flag_spec=
5680       fi
5681       ;;
5682     esac
5683   fi
5684 else
5685   # PORTME fill in a description of your system's linker (not GNU ld)
5686   case $host_os in
5687   aix3*)
5688     allow_undefined_flag=unsupported
5689     always_export_symbols=yes
5690     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'
5691     # Note: this linker hardcodes the directories in LIBPATH if there
5692     # are no directories specified by -L.
5693     hardcode_minus_L=yes
5694     if test "$GCC" = yes && test -z "$link_static_flag"; then
5695       # Neither direct hardcoding nor static linking is supported with a
5696       # broken collect2.
5697       hardcode_direct=unsupported
5698     fi
5699     ;;
5700
5701   aix4* | aix5*)
5702     if test "$host_cpu" = ia64; then
5703       # On IA64, the linker does run time linking by default, so we don't
5704       # have to do anything special.
5705       aix_use_runtimelinking=no
5706       exp_sym_flag='-Bexport'
5707       no_entry_flag=""
5708     else
5709       aix_use_runtimelinking=no
5710
5711       # Test if we are trying to use run time linking or normal
5712       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5713       # need to do runtime linking.
5714       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5715         for ld_flag in $LDFLAGS; do
5716           case $ld_flag in
5717           *-brtl*)
5718             aix_use_runtimelinking=yes
5719             break
5720           ;;
5721           esac
5722         done
5723       esac
5724
5725       exp_sym_flag='-bexport'
5726       no_entry_flag='-bnoentry'
5727     fi
5728
5729     # When large executables or shared objects are built, AIX ld can
5730     # have problems creating the table of contents.  If linking a library
5731     # or program results in "error TOC overflow" add -mminimal-toc to
5732     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5733     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5734
5735     hardcode_direct=yes
5736     archive_cmds=''
5737     hardcode_libdir_separator=':'
5738     if test "$GCC" = yes; then
5739       case $host_os in aix4.[012]|aix4.[012].*)
5740         collect2name=`${CC} -print-prog-name=collect2`
5741         if test -f "$collect2name" && \
5742           strings "$collect2name" | grep resolve_lib_name >/dev/null
5743         then
5744           # We have reworked collect2
5745           hardcode_direct=yes
5746         else
5747           # We have old collect2
5748           hardcode_direct=unsupported
5749           # It fails to find uninstalled libraries when the uninstalled
5750           # path is not listed in the libpath.  Setting hardcode_minus_L
5751           # to unsupported forces relinking
5752           hardcode_minus_L=yes
5753           hardcode_libdir_flag_spec='-L$libdir'
5754           hardcode_libdir_separator=
5755         fi
5756       esac
5757
5758       shared_flag='-shared'
5759     else
5760       # not using gcc
5761       if test "$host_cpu" = ia64; then
5762         shared_flag='${wl}-G'
5763       else
5764         if test "$aix_use_runtimelinking" = yes; then
5765           shared_flag='${wl}-G'
5766         else
5767           shared_flag='${wl}-bM:SRE'
5768         fi
5769       fi
5770     fi
5771
5772     # It seems that -bexpall can do strange things, so it is better to
5773     # generate a list of symbols to export.
5774     always_export_symbols=yes
5775     if test "$aix_use_runtimelinking" = yes; then
5776       # Warning - without using the other runtime loading flags (-brtl),
5777       # -berok will link without error, but may produce a broken library.
5778       allow_undefined_flag='-berok'
5779       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5780       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"
5781     else
5782       if test "$host_cpu" = ia64; then
5783         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5784         allow_undefined_flag="-z nodefs"
5785         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"
5786       else
5787         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5788         # Warning - without using the other run time loading flags,
5789         # -berok will link without error, but may produce a broken library.
5790         allow_undefined_flag='${wl}-berok'
5791         # This is a bit strange, but is similar to how AIX traditionally builds
5792         # it's shared libraries.
5793         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'
5794       fi
5795     fi
5796     ;;
5797
5798   amigaos*)
5799     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)'
5800     hardcode_libdir_flag_spec='-L$libdir'
5801     hardcode_minus_L=yes
5802     # see comment about different semantics on the GNU ld section
5803     ld_shlibs=no
5804     ;;
5805
5806   cygwin* | mingw* | pw32*)
5807     # When not using gcc, we currently assume that we are using
5808     # Microsoft Visual C++.
5809     # hardcode_libdir_flag_spec is actually meaningless, as there is
5810     # no search path for DLLs.
5811     hardcode_libdir_flag_spec=' '
5812     allow_undefined_flag=unsupported
5813     # Tell ltmain to make .lib files, not .a files.
5814     libext=lib
5815     # FIXME: Setting linknames here is a bad hack.
5816     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5817     # The linker will automatically build a .lib file if we build a DLL.
5818     old_archive_from_new_cmds='true'
5819     # FIXME: Should let the user specify the lib program.
5820     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5821     fix_srcfile_path='`cygpath -w "$srcfile"`'
5822     ;;
5823
5824   darwin* | rhapsody*)
5825     case "$host_os" in
5826     rhapsody* | darwin1.[012])
5827       allow_undefined_flag='-undefined suppress'
5828       ;;
5829     *) # Darwin 1.3 on
5830       allow_undefined_flag='-flat_namespace -undefined suppress'
5831       ;;
5832     esac
5833     # FIXME: Relying on posixy $() will cause problems for
5834     #        cross-compilation, but unfortunately the echo tests do not
5835     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5836     #        `"' quotes if we put them in here... so don't!
5837     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)'
5838     # We need to add '_' to the symbols in $export_symbols first
5839     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5840     hardcode_direct=yes
5841     hardcode_shlibpath_var=no
5842     whole_archive_flag_spec='-all_load $convenience'
5843     ;;
5844
5845   freebsd1*)
5846     ld_shlibs=no
5847     ;;
5848
5849   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5850   # support.  Future versions do this automatically, but an explicit c++rt0.o
5851   # does not break anything, and helps significantly (at the cost of a little
5852   # extra space).
5853   freebsd2.2*)
5854     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5855     hardcode_libdir_flag_spec='-R$libdir'
5856     hardcode_direct=yes
5857     hardcode_shlibpath_var=no
5858     ;;
5859
5860   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5861   freebsd2*)
5862     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5863     hardcode_direct=yes
5864     hardcode_minus_L=yes
5865     hardcode_shlibpath_var=no
5866     ;;
5867
5868   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5869   freebsd*)
5870     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5871     hardcode_libdir_flag_spec='-R$libdir'
5872     hardcode_direct=yes
5873     hardcode_shlibpath_var=no
5874     ;;
5875
5876   hpux9* | hpux10* | hpux11*)
5877     case $host_os in
5878     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' ;;
5879     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5880     esac
5881     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5882     hardcode_libdir_separator=:
5883     hardcode_direct=yes
5884     hardcode_minus_L=yes # Not in the search PATH, but as the default
5885                          # location of the library.
5886     export_dynamic_flag_spec='${wl}-E'
5887     ;;
5888
5889   irix5* | irix6* | nonstopux*)
5890     if test "$GCC" = yes; then
5891       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'
5892       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5893     else
5894       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'
5895       hardcode_libdir_flag_spec='-rpath $libdir'
5896     fi
5897     hardcode_libdir_separator=:
5898     link_all_deplibs=yes
5899     ;;
5900
5901   netbsd*)
5902     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5903       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5904     else
5905       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5906     fi
5907     hardcode_libdir_flag_spec='-R$libdir'
5908     hardcode_direct=yes
5909     hardcode_shlibpath_var=no
5910     ;;
5911
5912   newsos6)
5913     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5914     hardcode_direct=yes
5915     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5916     hardcode_libdir_separator=:
5917     hardcode_shlibpath_var=no
5918     ;;
5919
5920   openbsd*)
5921     hardcode_direct=yes
5922     hardcode_shlibpath_var=no
5923     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5924       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5925       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5926       export_dynamic_flag_spec='${wl}-E'
5927     else
5928       case "$host_os" in
5929       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5930         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5931         hardcode_libdir_flag_spec='-R$libdir'
5932         ;;
5933       *)
5934         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5935         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5936         ;;
5937       esac
5938     fi
5939     ;;
5940
5941   os2*)
5942     hardcode_libdir_flag_spec='-L$libdir'
5943     hardcode_minus_L=yes
5944     allow_undefined_flag=unsupported
5945     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'
5946     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5947     ;;
5948
5949   osf3*)
5950     if test "$GCC" = yes; then
5951       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5952       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'
5953     else
5954       allow_undefined_flag=' -expect_unresolved \*'
5955       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'
5956     fi
5957     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5958     hardcode_libdir_separator=:
5959     ;;
5960
5961   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5962     if test "$GCC" = yes; then
5963       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5964       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'
5965       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5966     else
5967       allow_undefined_flag=' -expect_unresolved \*'
5968       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'
5969       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5970       $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'
5971
5972       #Both c and cxx compiler support -rpath directly
5973       hardcode_libdir_flag_spec='-rpath $libdir'
5974     fi
5975     hardcode_libdir_separator=:
5976     ;;
5977
5978   sco3.2v5*)
5979     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5980     hardcode_shlibpath_var=no
5981     runpath_var=LD_RUN_PATH
5982     hardcode_runpath_var=yes
5983     export_dynamic_flag_spec='${wl}-Bexport'
5984     ;;
5985
5986   solaris*)
5987     # gcc --version < 3.0 without binutils cannot create self contained
5988     # shared libraries reliably, requiring libgcc.a to resolve some of
5989     # the object symbols generated in some cases.  Libraries that use
5990     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5991     # a copy of libgcc.a into every shared library to guarantee resolving
5992     # such symbols causes other problems:  According to Tim Van Holder
5993     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5994     # (to the application) exception stack for one thing.
5995     no_undefined_flag=' -z defs'
5996     if test "$GCC" = yes; then
5997       case `$CC --version 2>/dev/null` in
5998       [12].*)
5999         cat <<EOF 1>&2
6000
6001 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
6002 *** create self contained shared libraries on Solaris systems, without
6003 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
6004 *** -no-undefined support, which will at least allow you to build shared
6005 *** libraries.  However, you may find that when you link such libraries
6006 *** into an application without using GCC, you have to manually add
6007 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
6008 *** upgrade to a newer version of GCC.  Another option is to rebuild your
6009 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
6010
6011 EOF
6012         no_undefined_flag=
6013         ;;
6014       esac
6015     fi
6016     # $CC -shared without GNU ld will not create a library from C++
6017     # object files and a static libstdc++, better avoid it by now
6018     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6019     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6020                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6021     hardcode_libdir_flag_spec='-R$libdir'
6022     hardcode_shlibpath_var=no
6023     case $host_os in
6024     solaris2.[0-5] | solaris2.[0-5].*) ;;
6025     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
6026       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
6027     esac
6028     link_all_deplibs=yes
6029     ;;
6030
6031   sunos4*)
6032     if test "x$host_vendor" = xsequent; then
6033       # Use $CC to link under sequent, because it throws in some extra .o
6034       # files that make .init and .fini sections work.
6035       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
6036     else
6037       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
6038     fi
6039     hardcode_libdir_flag_spec='-L$libdir'
6040     hardcode_direct=yes
6041     hardcode_minus_L=yes
6042     hardcode_shlibpath_var=no
6043     ;;
6044
6045   sysv4)
6046     case $host_vendor in
6047       sni)
6048         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6049         hardcode_direct=yes # is this really true???
6050         ;;
6051       siemens)
6052         ## LD is ld it makes a PLAMLIB
6053         ## CC just makes a GrossModule.
6054         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6055         reload_cmds='$CC -r -o $output$reload_objs'
6056         hardcode_direct=no
6057         ;;
6058       motorola)
6059         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6060         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6061         ;;
6062     esac
6063     runpath_var='LD_RUN_PATH'
6064     hardcode_shlibpath_var=no
6065     ;;
6066
6067   sysv4.3*)
6068     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6069     hardcode_shlibpath_var=no
6070     export_dynamic_flag_spec='-Bexport'
6071     ;;
6072
6073   sysv5*)
6074     no_undefined_flag=' -z text'
6075     # $CC -shared without GNU ld will not create a library from C++
6076     # object files and a static libstdc++, better avoid it by now
6077     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6078     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6079                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6080     hardcode_libdir_flag_spec=
6081     hardcode_shlibpath_var=no
6082     runpath_var='LD_RUN_PATH'
6083     ;;
6084
6085   uts4*)
6086     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6087     hardcode_libdir_flag_spec='-L$libdir'
6088     hardcode_shlibpath_var=no
6089     ;;
6090
6091   dgux*)
6092     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6093     hardcode_libdir_flag_spec='-L$libdir'
6094     hardcode_shlibpath_var=no
6095     ;;
6096
6097   sysv4*MP*)
6098     if test -d /usr/nec; then
6099       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6100       hardcode_shlibpath_var=no
6101       runpath_var=LD_RUN_PATH
6102       hardcode_runpath_var=yes
6103       ld_shlibs=yes
6104     fi
6105     ;;
6106
6107   sysv4.2uw2*)
6108     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6109     hardcode_direct=yes
6110     hardcode_minus_L=no
6111     hardcode_shlibpath_var=no
6112     hardcode_runpath_var=yes
6113     runpath_var=LD_RUN_PATH
6114     ;;
6115
6116   sysv5uw7* | unixware7*)
6117     no_undefined_flag='${wl}-z ${wl}text'
6118     if test "$GCC" = yes; then
6119       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6120     else
6121       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6122     fi
6123     runpath_var='LD_RUN_PATH'
6124     hardcode_shlibpath_var=no
6125     ;;
6126
6127   *)
6128     ld_shlibs=no
6129     ;;
6130   esac
6131 fi
6132 echo "$ac_t""$ld_shlibs" 1>&6
6133 test "$ld_shlibs" = no && can_build_shared=no
6134
6135 # Check hardcoding attributes.
6136 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6137 echo "configure:6138: checking how to hardcode library paths into programs" >&5
6138 hardcode_action=
6139 if test -n "$hardcode_libdir_flag_spec" || \
6140    test -n "$runpath_var"; then
6141
6142   # We can hardcode non-existant directories.
6143   if test "$hardcode_direct" != no &&
6144      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6145      # have to relink, otherwise we might link with an installed library
6146      # when we should be linking with a yet-to-be-installed one
6147      ## test "$hardcode_shlibpath_var" != no &&
6148      test "$hardcode_minus_L" != no; then
6149     # Linking always hardcodes the temporary library directory.
6150     hardcode_action=relink
6151   else
6152     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6153     hardcode_action=immediate
6154   fi
6155 else
6156   # We cannot hardcode anything, or else we can only hardcode existing
6157   # directories.
6158   hardcode_action=unsupported
6159 fi
6160 echo "$ac_t""$hardcode_action" 1>&6
6161
6162 striplib=
6163 old_striplib=
6164 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6165 echo "configure:6166: checking whether stripping libraries is possible" >&5
6166 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6167   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6168   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6169   echo "$ac_t""yes" 1>&6
6170 else
6171   echo "$ac_t""no" 1>&6
6172 fi
6173
6174 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6175 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6176
6177 # PORTME Fill in your ld.so characteristics
6178 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6179 echo "configure:6180: checking dynamic linker characteristics" >&5
6180 library_names_spec=
6181 libname_spec='lib$name'
6182 soname_spec=
6183 postinstall_cmds=
6184 postuninstall_cmds=
6185 finish_cmds=
6186 finish_eval=
6187 shlibpath_var=
6188 shlibpath_overrides_runpath=unknown
6189 version_type=none
6190 dynamic_linker="$host_os ld.so"
6191 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6192 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6193
6194 case $host_os in
6195 aix3*)
6196   version_type=linux
6197   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6198   shlibpath_var=LIBPATH
6199
6200   # AIX has no versioning support, so we append a major version to the name.
6201   soname_spec='${libname}${release}.so$major'
6202   ;;
6203
6204 aix4* | aix5*)
6205   version_type=linux
6206   need_lib_prefix=no
6207   need_version=no
6208   hardcode_into_libs=yes
6209   if test "$host_cpu" = ia64; then
6210     # AIX 5 supports IA64
6211     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6212     shlibpath_var=LD_LIBRARY_PATH
6213   else
6214     # With GCC up to 2.95.x, collect2 would create an import file
6215     # for dependence libraries.  The import file would start with
6216     # the line `#! .'.  This would cause the generated library to
6217     # depend on `.', always an invalid library.  This was fixed in
6218     # development snapshots of GCC prior to 3.0.
6219     case $host_os in
6220       aix4 | aix4.[01] | aix4.[01].*)
6221         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6222              echo ' yes '
6223              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6224           :
6225         else
6226           can_build_shared=no
6227         fi
6228         ;;
6229     esac
6230     # AIX (on Power*) has no versioning support, so currently we can
6231     # not hardcode correct soname into executable. Probably we can
6232     # add versioning support to collect2, so additional links can
6233     # be useful in future.
6234     if test "$aix_use_runtimelinking" = yes; then
6235       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6236       # instead of lib<name>.a to let people know that these are not
6237       # typical AIX shared libraries.
6238       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6239     else
6240       # We preserve .a as extension for shared libraries through AIX4.2
6241       # and later when we are not doing run time linking.
6242       library_names_spec='${libname}${release}.a $libname.a'
6243       soname_spec='${libname}${release}.so$major'
6244     fi
6245     shlibpath_var=LIBPATH
6246   fi
6247   hardcode_into_libs=yes
6248   ;;
6249
6250 amigaos*)
6251   library_names_spec='$libname.ixlibrary $libname.a'
6252   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6253   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'
6254   ;;
6255
6256 beos*)
6257   library_names_spec='${libname}.so'
6258   dynamic_linker="$host_os ld.so"
6259   shlibpath_var=LIBRARY_PATH
6260   ;;
6261
6262 bsdi4*)
6263   version_type=linux
6264   need_version=no
6265   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6266   soname_spec='${libname}${release}.so$major'
6267   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6268   shlibpath_var=LD_LIBRARY_PATH
6269   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6270   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6271   export_dynamic_flag_spec=-rdynamic
6272   # the default ld.so.conf also contains /usr/contrib/lib and
6273   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6274   # libtool to hard-code these into programs
6275   ;;
6276
6277 cygwin* | mingw* | pw32*)
6278   version_type=windows
6279   need_version=no
6280   need_lib_prefix=no
6281   case $GCC,$host_os in
6282   yes,cygwin*)
6283     library_names_spec='$libname.dll.a'
6284     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6285     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6286       dldir=$destdir/`dirname \$dlpath`~
6287       test -d \$dldir || mkdir -p \$dldir~
6288       $install_prog .libs/$dlname \$dldir/$dlname'
6289     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6290       dlpath=$dir/\$dldll~
6291        $rm \$dlpath'
6292     ;;
6293   yes,mingw*)
6294     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6295     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6296     ;;
6297   yes,pw32*)
6298     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6299     ;;
6300   *)
6301     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6302     ;;
6303   esac
6304   dynamic_linker='Win32 ld.exe'
6305   # FIXME: first we should search . and the directory the executable is in
6306   shlibpath_var=PATH
6307   ;;
6308
6309 darwin* | rhapsody*)
6310   dynamic_linker="$host_os dyld"
6311   version_type=darwin
6312   need_lib_prefix=no
6313   need_version=no
6314   # FIXME: Relying on posixy $() will cause problems for
6315   #        cross-compilation, but unfortunately the echo tests do not
6316   #        yet detect zsh echo's removal of \ escapes.
6317   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)'
6318   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6319   shlibpath_overrides_runpath=yes
6320   shlibpath_var=DYLD_LIBRARY_PATH
6321   ;;
6322
6323 freebsd1*)
6324   dynamic_linker=no
6325   ;;
6326
6327 freebsd*)
6328   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6329   version_type=freebsd-$objformat
6330   case $version_type in
6331     freebsd-elf*)
6332       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6333       need_version=no
6334       need_lib_prefix=no
6335       ;;
6336     freebsd-*)
6337       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6338       need_version=yes
6339       ;;
6340   esac
6341   shlibpath_var=LD_LIBRARY_PATH
6342   case $host_os in
6343   freebsd2*)
6344     shlibpath_overrides_runpath=yes
6345     ;;
6346   *)
6347     shlibpath_overrides_runpath=no
6348     hardcode_into_libs=yes
6349     ;;
6350   esac
6351   ;;
6352
6353 gnu*)
6354   version_type=linux
6355   need_lib_prefix=no
6356   need_version=no
6357   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6358   soname_spec='${libname}${release}.so$major'
6359   shlibpath_var=LD_LIBRARY_PATH
6360   hardcode_into_libs=yes
6361   ;;
6362
6363 hpux9* | hpux10* | hpux11*)
6364   # Give a soname corresponding to the major version so that dld.sl refuses to
6365   # link against other versions.
6366   dynamic_linker="$host_os dld.sl"
6367   version_type=sunos
6368   need_lib_prefix=no
6369   need_version=no
6370   shlibpath_var=SHLIB_PATH
6371   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6372   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6373   soname_spec='${libname}${release}.sl$major'
6374   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6375   postinstall_cmds='chmod 555 $lib'
6376   ;;
6377
6378 irix5* | irix6* | nonstopux*)
6379   case $host_os in
6380     nonstopux*) version_type=nonstopux ;;
6381     *)          version_type=irix ;;
6382   esac
6383   need_lib_prefix=no
6384   need_version=no
6385   soname_spec='${libname}${release}.so$major'
6386   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6387   case $host_os in
6388   irix5* | nonstopux*)
6389     libsuff= shlibsuff=
6390     ;;
6391   *)
6392     case $LD in # libtool.m4 will add one of these switches to LD
6393     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6394     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6395     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6396     *) libsuff= shlibsuff= libmagic=never-match;;
6397     esac
6398     ;;
6399   esac
6400   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6401   shlibpath_overrides_runpath=no
6402   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6403   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6404   ;;
6405
6406 # No shared lib support for Linux oldld, aout, or coff.
6407 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6408   dynamic_linker=no
6409   ;;
6410
6411 # This must be Linux ELF.
6412 linux-gnu*)
6413   version_type=linux
6414   need_lib_prefix=no
6415   need_version=no
6416   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6417   soname_spec='${libname}${release}.so$major'
6418   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6419   shlibpath_var=LD_LIBRARY_PATH
6420   shlibpath_overrides_runpath=no
6421   # This implies no fast_install, which is unacceptable.
6422   # Some rework will be needed to allow for fast_install
6423   # before this can be enabled.
6424   hardcode_into_libs=yes
6425
6426   # We used to test for /lib/ld.so.1 and disable shared libraries on
6427   # powerpc, because MkLinux only supported shared libraries with the
6428   # GNU dynamic linker.  Since this was broken with cross compilers,
6429   # most powerpc-linux boxes support dynamic linking these days and
6430   # people can always --disable-shared, the test was removed, and we
6431   # assume the GNU/Linux dynamic linker is in use.
6432   dynamic_linker='GNU/Linux ld.so'
6433   ;;
6434
6435 netbsd*)
6436   version_type=sunos
6437   need_lib_prefix=no
6438   need_version=no
6439   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6440     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6441     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6442     dynamic_linker='NetBSD (a.out) ld.so'
6443   else
6444     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6445     soname_spec='${libname}${release}.so$major'
6446     dynamic_linker='NetBSD ld.elf_so'
6447   fi
6448   shlibpath_var=LD_LIBRARY_PATH
6449   shlibpath_overrides_runpath=yes
6450   hardcode_into_libs=yes
6451   ;;
6452
6453 newsos6)
6454   version_type=linux
6455   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6456   shlibpath_var=LD_LIBRARY_PATH
6457   shlibpath_overrides_runpath=yes
6458   ;;
6459
6460 openbsd*)
6461   version_type=sunos
6462   need_lib_prefix=no
6463   need_version=no
6464   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6465     case "$host_os" in
6466     openbsd2.[89] | openbsd2.[89].*)
6467       shlibpath_overrides_runpath=no
6468       ;;
6469     *)
6470       shlibpath_overrides_runpath=yes
6471       ;;
6472     esac
6473   else
6474     shlibpath_overrides_runpath=yes
6475   fi
6476   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6477   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6478   shlibpath_var=LD_LIBRARY_PATH
6479   ;;
6480
6481 os2*)
6482   libname_spec='$name'
6483   need_lib_prefix=no
6484   library_names_spec='$libname.dll $libname.a'
6485   dynamic_linker='OS/2 ld.exe'
6486   shlibpath_var=LIBPATH
6487   ;;
6488
6489 osf3* | osf4* | osf5*)
6490   version_type=osf
6491   need_version=no
6492   soname_spec='${libname}${release}.so$major'
6493   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6494   shlibpath_var=LD_LIBRARY_PATH
6495   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6496   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6497   hardcode_into_libs=yes
6498   ;;
6499
6500 sco3.2v5*)
6501   version_type=osf
6502   soname_spec='${libname}${release}.so$major'
6503   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6504   shlibpath_var=LD_LIBRARY_PATH
6505   ;;
6506
6507 solaris*)
6508   version_type=linux
6509   need_lib_prefix=no
6510   need_version=no
6511   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6512   soname_spec='${libname}${release}.so$major'
6513   shlibpath_var=LD_LIBRARY_PATH
6514   shlibpath_overrides_runpath=yes
6515   hardcode_into_libs=yes
6516   # ldd complains unless libraries are executable
6517   postinstall_cmds='chmod +x $lib'
6518   ;;
6519
6520 sunos4*)
6521   version_type=sunos
6522   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6523   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6524   shlibpath_var=LD_LIBRARY_PATH
6525   shlibpath_overrides_runpath=yes
6526   if test "$with_gnu_ld" = yes; then
6527     need_lib_prefix=no
6528   fi
6529   need_version=yes
6530   ;;
6531
6532 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6533   version_type=linux
6534   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6535   soname_spec='${libname}${release}.so$major'
6536   shlibpath_var=LD_LIBRARY_PATH
6537   case $host_vendor in
6538     sni)
6539       shlibpath_overrides_runpath=no
6540       need_lib_prefix=no
6541       export_dynamic_flag_spec='${wl}-Blargedynsym'
6542       runpath_var=LD_RUN_PATH
6543       ;;
6544     siemens)
6545       need_lib_prefix=no
6546       ;;
6547     motorola)
6548       need_lib_prefix=no
6549       need_version=no
6550       shlibpath_overrides_runpath=no
6551       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6552       ;;
6553   esac
6554   ;;
6555
6556 uts4*)
6557   version_type=linux
6558   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6559   soname_spec='${libname}${release}.so$major'
6560   shlibpath_var=LD_LIBRARY_PATH
6561   ;;
6562
6563 dgux*)
6564   version_type=linux
6565   need_lib_prefix=no
6566   need_version=no
6567   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6568   soname_spec='${libname}${release}.so$major'
6569   shlibpath_var=LD_LIBRARY_PATH
6570   ;;
6571
6572 sysv4*MP*)
6573   if test -d /usr/nec ;then
6574     version_type=linux
6575     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6576     soname_spec='$libname.so.$major'
6577     shlibpath_var=LD_LIBRARY_PATH
6578   fi
6579   ;;
6580
6581 *)
6582   dynamic_linker=no
6583   ;;
6584 esac
6585 echo "$ac_t""$dynamic_linker" 1>&6
6586 test "$dynamic_linker" = no && can_build_shared=no
6587
6588 # Report the final consequences.
6589 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6590 echo "configure:6591: checking if libtool supports shared libraries" >&5
6591 echo "$ac_t""$can_build_shared" 1>&6
6592
6593 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6594 echo "configure:6595: checking whether to build shared libraries" >&5
6595 test "$can_build_shared" = "no" && enable_shared=no
6596
6597 # On AIX, shared libraries and static libraries use the same namespace, and
6598 # are all built from PIC.
6599 case "$host_os" in
6600 aix3*)
6601   test "$enable_shared" = yes && enable_static=no
6602   if test -n "$RANLIB"; then
6603     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6604     postinstall_cmds='$RANLIB $lib'
6605   fi
6606   ;;
6607
6608 aix4*)
6609   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6610     test "$enable_shared" = yes && enable_static=no
6611   fi
6612   ;;
6613 esac
6614 echo "$ac_t""$enable_shared" 1>&6
6615
6616 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6617 echo "configure:6618: checking whether to build static libraries" >&5
6618 # Make sure either enable_shared or enable_static is yes.
6619 test "$enable_shared" = yes || enable_static=yes
6620 echo "$ac_t""$enable_static" 1>&6
6621
6622 if test "$hardcode_action" = relink; then
6623   # Fast installation is not supported
6624   enable_fast_install=no
6625 elif test "$shlibpath_overrides_runpath" = yes ||
6626      test "$enable_shared" = no; then
6627   # Fast installation is not necessary
6628   enable_fast_install=needless
6629 fi
6630
6631 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6632 if test "$GCC" = yes; then
6633   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6634 fi
6635
6636 if test "x$enable_dlopen" != xyes; then
6637   enable_dlopen=unknown
6638   enable_dlopen_self=unknown
6639   enable_dlopen_self_static=unknown
6640 else
6641   lt_cv_dlopen=no
6642   lt_cv_dlopen_libs=
6643
6644   case $host_os in
6645   beos*)
6646     lt_cv_dlopen="load_add_on"
6647     lt_cv_dlopen_libs=
6648     lt_cv_dlopen_self=yes
6649     ;;
6650
6651   cygwin* | mingw* | pw32*)
6652     lt_cv_dlopen="LoadLibrary"
6653     lt_cv_dlopen_libs=
6654    ;;
6655
6656   *)
6657     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6658 echo "configure:6659: checking for shl_load" >&5
6659 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6660   echo $ac_n "(cached) $ac_c" 1>&6
6661 else
6662   cat > conftest.$ac_ext <<EOF
6663 #line 6664 "configure"
6664 #include "confdefs.h"
6665 /* System header to define __stub macros and hopefully few prototypes,
6666     which can conflict with char shl_load(); below.  */
6667 #include <assert.h>
6668 /* Override any gcc2 internal prototype to avoid an error.  */
6669 /* We use char because int might match the return type of a gcc2
6670     builtin and then its argument prototype would still apply.  */
6671 char shl_load();
6672 char (*f)();
6673
6674 int main() {
6675
6676 /* The GNU C library defines this for functions which it implements
6677     to always fail with ENOSYS.  Some functions are actually named
6678     something starting with __ and the normal name is an alias.  */
6679 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6680 choke me
6681 #else
6682 f = shl_load;
6683 #endif
6684
6685 ; return 0; }
6686 EOF
6687 if { (eval echo configure:6688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6688   rm -rf conftest*
6689   eval "ac_cv_func_shl_load=yes"
6690 else
6691   echo "configure: failed program was:" >&5
6692   cat conftest.$ac_ext >&5
6693   rm -rf conftest*
6694   eval "ac_cv_func_shl_load=no"
6695 fi
6696 rm -f conftest*
6697 fi
6698
6699 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6700   echo "$ac_t""yes" 1>&6
6701   lt_cv_dlopen="shl_load"
6702 else
6703   echo "$ac_t""no" 1>&6
6704 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6705 echo "configure:6706: checking for shl_load in -ldld" >&5
6706 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6707 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6708   echo $ac_n "(cached) $ac_c" 1>&6
6709 else
6710   ac_save_LIBS="$LIBS"
6711 LIBS="-ldld  $LIBS"
6712 cat > conftest.$ac_ext <<EOF
6713 #line 6714 "configure"
6714 #include "confdefs.h"
6715 /* Override any gcc2 internal prototype to avoid an error.  */
6716 /* We use char because int might match the return type of a gcc2
6717     builtin and then its argument prototype would still apply.  */
6718 char shl_load();
6719
6720 int main() {
6721 shl_load()
6722 ; return 0; }
6723 EOF
6724 if { (eval echo configure:6725: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6725   rm -rf conftest*
6726   eval "ac_cv_lib_$ac_lib_var=yes"
6727 else
6728   echo "configure: failed program was:" >&5
6729   cat conftest.$ac_ext >&5
6730   rm -rf conftest*
6731   eval "ac_cv_lib_$ac_lib_var=no"
6732 fi
6733 rm -f conftest*
6734 LIBS="$ac_save_LIBS"
6735
6736 fi
6737 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6738   echo "$ac_t""yes" 1>&6
6739   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6740 else
6741   echo "$ac_t""no" 1>&6
6742 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6743 echo "configure:6744: checking for dlopen" >&5
6744 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6745   echo $ac_n "(cached) $ac_c" 1>&6
6746 else
6747   cat > conftest.$ac_ext <<EOF
6748 #line 6749 "configure"
6749 #include "confdefs.h"
6750 /* System header to define __stub macros and hopefully few prototypes,
6751     which can conflict with char dlopen(); below.  */
6752 #include <assert.h>
6753 /* Override any gcc2 internal prototype to avoid an error.  */
6754 /* We use char because int might match the return type of a gcc2
6755     builtin and then its argument prototype would still apply.  */
6756 char dlopen();
6757 char (*f)();
6758
6759 int main() {
6760
6761 /* The GNU C library defines this for functions which it implements
6762     to always fail with ENOSYS.  Some functions are actually named
6763     something starting with __ and the normal name is an alias.  */
6764 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6765 choke me
6766 #else
6767 f = dlopen;
6768 #endif
6769
6770 ; return 0; }
6771 EOF
6772 if { (eval echo configure:6773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6773   rm -rf conftest*
6774   eval "ac_cv_func_dlopen=yes"
6775 else
6776   echo "configure: failed program was:" >&5
6777   cat conftest.$ac_ext >&5
6778   rm -rf conftest*
6779   eval "ac_cv_func_dlopen=no"
6780 fi
6781 rm -f conftest*
6782 fi
6783
6784 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6785   echo "$ac_t""yes" 1>&6
6786   lt_cv_dlopen="dlopen"
6787 else
6788   echo "$ac_t""no" 1>&6
6789 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6790 echo "configure:6791: checking for dlopen in -ldl" >&5
6791 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6792 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6793   echo $ac_n "(cached) $ac_c" 1>&6
6794 else
6795   ac_save_LIBS="$LIBS"
6796 LIBS="-ldl  $LIBS"
6797 cat > conftest.$ac_ext <<EOF
6798 #line 6799 "configure"
6799 #include "confdefs.h"
6800 /* Override any gcc2 internal prototype to avoid an error.  */
6801 /* We use char because int might match the return type of a gcc2
6802     builtin and then its argument prototype would still apply.  */
6803 char dlopen();
6804
6805 int main() {
6806 dlopen()
6807 ; return 0; }
6808 EOF
6809 if { (eval echo configure:6810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6810   rm -rf conftest*
6811   eval "ac_cv_lib_$ac_lib_var=yes"
6812 else
6813   echo "configure: failed program was:" >&5
6814   cat conftest.$ac_ext >&5
6815   rm -rf conftest*
6816   eval "ac_cv_lib_$ac_lib_var=no"
6817 fi
6818 rm -f conftest*
6819 LIBS="$ac_save_LIBS"
6820
6821 fi
6822 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6823   echo "$ac_t""yes" 1>&6
6824   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6825 else
6826   echo "$ac_t""no" 1>&6
6827 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6828 echo "configure:6829: checking for dlopen in -lsvld" >&5
6829 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6830 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6831   echo $ac_n "(cached) $ac_c" 1>&6
6832 else
6833   ac_save_LIBS="$LIBS"
6834 LIBS="-lsvld  $LIBS"
6835 cat > conftest.$ac_ext <<EOF
6836 #line 6837 "configure"
6837 #include "confdefs.h"
6838 /* Override any gcc2 internal prototype to avoid an error.  */
6839 /* We use char because int might match the return type of a gcc2
6840     builtin and then its argument prototype would still apply.  */
6841 char dlopen();
6842
6843 int main() {
6844 dlopen()
6845 ; return 0; }
6846 EOF
6847 if { (eval echo configure:6848: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6848   rm -rf conftest*
6849   eval "ac_cv_lib_$ac_lib_var=yes"
6850 else
6851   echo "configure: failed program was:" >&5
6852   cat conftest.$ac_ext >&5
6853   rm -rf conftest*
6854   eval "ac_cv_lib_$ac_lib_var=no"
6855 fi
6856 rm -f conftest*
6857 LIBS="$ac_save_LIBS"
6858
6859 fi
6860 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6861   echo "$ac_t""yes" 1>&6
6862   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6863 else
6864   echo "$ac_t""no" 1>&6
6865 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6866 echo "configure:6867: checking for dld_link in -ldld" >&5
6867 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6868 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6869   echo $ac_n "(cached) $ac_c" 1>&6
6870 else
6871   ac_save_LIBS="$LIBS"
6872 LIBS="-ldld  $LIBS"
6873 cat > conftest.$ac_ext <<EOF
6874 #line 6875 "configure"
6875 #include "confdefs.h"
6876 /* Override any gcc2 internal prototype to avoid an error.  */
6877 /* We use char because int might match the return type of a gcc2
6878     builtin and then its argument prototype would still apply.  */
6879 char dld_link();
6880
6881 int main() {
6882 dld_link()
6883 ; return 0; }
6884 EOF
6885 if { (eval echo configure:6886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6886   rm -rf conftest*
6887   eval "ac_cv_lib_$ac_lib_var=yes"
6888 else
6889   echo "configure: failed program was:" >&5
6890   cat conftest.$ac_ext >&5
6891   rm -rf conftest*
6892   eval "ac_cv_lib_$ac_lib_var=no"
6893 fi
6894 rm -f conftest*
6895 LIBS="$ac_save_LIBS"
6896
6897 fi
6898 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6899   echo "$ac_t""yes" 1>&6
6900   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6901 else
6902   echo "$ac_t""no" 1>&6
6903 fi
6904
6905               
6906 fi
6907
6908             
6909 fi
6910
6911           
6912 fi
6913
6914         
6915 fi
6916
6917       
6918 fi
6919
6920     ;;
6921   esac
6922
6923   if test "x$lt_cv_dlopen" != xno; then
6924     enable_dlopen=yes
6925   else
6926     enable_dlopen=no
6927   fi
6928
6929   case $lt_cv_dlopen in
6930   dlopen)
6931     save_CPPFLAGS="$CPPFLAGS"
6932         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6933
6934     save_LDFLAGS="$LDFLAGS"
6935     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6936
6937     save_LIBS="$LIBS"
6938     LIBS="$lt_cv_dlopen_libs $LIBS"
6939
6940     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6941 echo "configure:6942: checking whether a program can dlopen itself" >&5
6942 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6943   echo $ac_n "(cached) $ac_c" 1>&6
6944 else
6945           if test "$cross_compiling" = yes; then :
6946   lt_cv_dlopen_self=cross
6947 else
6948     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6949   lt_status=$lt_dlunknown
6950   cat > conftest.$ac_ext <<EOF
6951 #line 6952 "configure"
6952 #include "confdefs.h"
6953
6954 #if HAVE_DLFCN_H
6955 #include <dlfcn.h>
6956 #endif
6957
6958 #include <stdio.h>
6959
6960 #ifdef RTLD_GLOBAL
6961 #  define LT_DLGLOBAL           RTLD_GLOBAL
6962 #else
6963 #  ifdef DL_GLOBAL
6964 #    define LT_DLGLOBAL         DL_GLOBAL
6965 #  else
6966 #    define LT_DLGLOBAL         0
6967 #  endif
6968 #endif
6969
6970 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6971    find out it does not work in some platform. */
6972 #ifndef LT_DLLAZY_OR_NOW
6973 #  ifdef RTLD_LAZY
6974 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6975 #  else
6976 #    ifdef DL_LAZY
6977 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6978 #    else
6979 #      ifdef RTLD_NOW
6980 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6981 #      else
6982 #        ifdef DL_NOW
6983 #          define LT_DLLAZY_OR_NOW      DL_NOW
6984 #        else
6985 #          define LT_DLLAZY_OR_NOW      0
6986 #        endif
6987 #      endif
6988 #    endif
6989 #  endif
6990 #endif
6991
6992 #ifdef __cplusplus
6993 extern "C" void exit (int);
6994 #endif
6995
6996 void fnord() { int i=42;}
6997 int main ()
6998 {
6999   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7000   int status = $lt_dlunknown;
7001
7002   if (self)
7003     {
7004       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7005       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7006       /* dlclose (self); */
7007     }
7008
7009     exit (status);
7010 }
7011 EOF
7012   if { (eval echo configure:7013: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7013     (./conftest; exit; ) 2>/dev/null
7014     lt_status=$?
7015     case x$lt_status in
7016       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
7017       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
7018       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
7019     esac
7020   else :
7021     # compilation failed
7022     lt_cv_dlopen_self=no
7023   fi
7024 fi
7025 rm -fr conftest*
7026
7027     
7028 fi
7029
7030 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
7031
7032     if test "x$lt_cv_dlopen_self" = xyes; then
7033       LDFLAGS="$LDFLAGS $link_static_flag"
7034       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
7035 echo "configure:7036: checking whether a statically linked program can dlopen itself" >&5
7036 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
7037   echo $ac_n "(cached) $ac_c" 1>&6
7038 else
7039           if test "$cross_compiling" = yes; then :
7040   lt_cv_dlopen_self_static=cross
7041 else
7042     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
7043   lt_status=$lt_dlunknown
7044   cat > conftest.$ac_ext <<EOF
7045 #line 7046 "configure"
7046 #include "confdefs.h"
7047
7048 #if HAVE_DLFCN_H
7049 #include <dlfcn.h>
7050 #endif
7051
7052 #include <stdio.h>
7053
7054 #ifdef RTLD_GLOBAL
7055 #  define LT_DLGLOBAL           RTLD_GLOBAL
7056 #else
7057 #  ifdef DL_GLOBAL
7058 #    define LT_DLGLOBAL         DL_GLOBAL
7059 #  else
7060 #    define LT_DLGLOBAL         0
7061 #  endif
7062 #endif
7063
7064 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
7065    find out it does not work in some platform. */
7066 #ifndef LT_DLLAZY_OR_NOW
7067 #  ifdef RTLD_LAZY
7068 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7069 #  else
7070 #    ifdef DL_LAZY
7071 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7072 #    else
7073 #      ifdef RTLD_NOW
7074 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7075 #      else
7076 #        ifdef DL_NOW
7077 #          define LT_DLLAZY_OR_NOW      DL_NOW
7078 #        else
7079 #          define LT_DLLAZY_OR_NOW      0
7080 #        endif
7081 #      endif
7082 #    endif
7083 #  endif
7084 #endif
7085
7086 #ifdef __cplusplus
7087 extern "C" void exit (int);
7088 #endif
7089
7090 void fnord() { int i=42;}
7091 int main ()
7092 {
7093   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7094   int status = $lt_dlunknown;
7095
7096   if (self)
7097     {
7098       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7099       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7100       /* dlclose (self); */
7101     }
7102
7103     exit (status);
7104 }
7105 EOF
7106   if { (eval echo configure:7107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7107     (./conftest; exit; ) 2>/dev/null
7108     lt_status=$?
7109     case x$lt_status in
7110       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7111       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7112       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7113     esac
7114   else :
7115     # compilation failed
7116     lt_cv_dlopen_self_static=no
7117   fi
7118 fi
7119 rm -fr conftest*
7120
7121       
7122 fi
7123
7124 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7125     fi
7126
7127     CPPFLAGS="$save_CPPFLAGS"
7128     LDFLAGS="$save_LDFLAGS"
7129     LIBS="$save_LIBS"
7130     ;;
7131   esac
7132
7133   case $lt_cv_dlopen_self in
7134   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7135   *) enable_dlopen_self=unknown ;;
7136   esac
7137
7138   case $lt_cv_dlopen_self_static in
7139   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7140   *) enable_dlopen_self_static=unknown ;;
7141   esac
7142 fi
7143
7144
7145 if test "$enable_shared" = yes && test "$GCC" = yes; then
7146   case $archive_cmds in
7147   *'~'*)
7148     # FIXME: we may have to deal with multi-command sequences.
7149     ;;
7150   '$CC '*)
7151     # Test whether the compiler implicitly links with -lc since on some
7152     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7153     # to ld, don't add -lc before -lgcc.
7154     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7155 echo "configure:7156: checking whether -lc should be explicitly linked in" >&5
7156     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7157   echo $ac_n "(cached) $ac_c" 1>&6
7158 else
7159   $rm conftest*
7160     echo 'static int dummy;' > conftest.$ac_ext
7161
7162     if { (eval echo configure:7163: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7163       soname=conftest
7164       lib=conftest
7165       libobjs=conftest.$ac_objext
7166       deplibs=
7167       wl=$lt_cv_prog_cc_wl
7168       compiler_flags=-v
7169       linker_flags=-v
7170       verstring=
7171       output_objdir=.
7172       libname=conftest
7173       save_allow_undefined_flag=$allow_undefined_flag
7174       allow_undefined_flag=
7175       if { (eval echo configure:7176: \"$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; }
7176       then
7177         lt_cv_archive_cmds_need_lc=no
7178       else
7179         lt_cv_archive_cmds_need_lc=yes
7180       fi
7181       allow_undefined_flag=$save_allow_undefined_flag
7182     else
7183       cat conftest.err 1>&5
7184     fi
7185 fi
7186
7187     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7188     ;;
7189   esac
7190 fi
7191 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7192
7193 # The second clause should only fire when bootstrapping the
7194 # libtool distribution, otherwise you forgot to ship ltmain.sh
7195 # with your package, and you will get complaints that there are
7196 # no rules to generate ltmain.sh.
7197 if test -f "$ltmain"; then
7198   :
7199 else
7200   # If there is no Makefile yet, we rely on a make rule to execute
7201   # `config.status --recheck' to rerun these tests and create the
7202   # libtool script then.
7203   test -f Makefile && make "$ltmain"
7204 fi
7205
7206 if test -f "$ltmain"; then
7207   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7208   $rm -f "${ofile}T"
7209
7210   echo creating $ofile
7211
7212   # Now quote all the things that may contain metacharacters while being
7213   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7214   # variables and quote the copies for generation of the libtool script.
7215   for var in echo old_CC old_CFLAGS SED \
7216     AR AR_FLAGS CC LD LN_S NM SHELL \
7217     reload_flag reload_cmds wl \
7218     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7219     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7220     library_names_spec soname_spec \
7221     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7222     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7223     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7224     old_striplib striplib file_magic_cmd export_symbols_cmds \
7225     deplibs_check_method allow_undefined_flag no_undefined_flag \
7226     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7227     global_symbol_to_c_name_address \
7228     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7229     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7230     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7231
7232     case $var in
7233     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7234     old_postinstall_cmds | old_postuninstall_cmds | \
7235     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7236     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7237     postinstall_cmds | postuninstall_cmds | \
7238     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7239       # Double-quote double-evaled strings.
7240       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7241       ;;
7242     *)
7243       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7244       ;;
7245     esac
7246   done
7247
7248   cat <<__EOF__ > "${ofile}T"
7249 #! $SHELL
7250
7251 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7252 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7253 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7254 #
7255 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7256 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7257 #
7258 # This program is free software; you can redistribute it and/or modify
7259 # it under the terms of the GNU General Public License as published by
7260 # the Free Software Foundation; either version 2 of the License, or
7261 # (at your option) any later version.
7262 #
7263 # This program is distributed in the hope that it will be useful, but
7264 # WITHOUT ANY WARRANTY; without even the implied warranty of
7265 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7266 # General Public License for more details.
7267 #
7268 # You should have received a copy of the GNU General Public License
7269 # along with this program; if not, write to the Free Software
7270 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7271 #
7272 # As a special exception to the GNU General Public License, if you
7273 # distribute this file as part of a program that contains a
7274 # configuration script generated by Autoconf, you may include it under
7275 # the same distribution terms that you use for the rest of that program.
7276
7277 # A sed that does not truncate output.
7278 SED=$lt_SED
7279
7280 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7281 Xsed="${SED} -e s/^X//"
7282
7283 # The HP-UX ksh and POSIX shell print the target directory to stdout
7284 # if CDPATH is set.
7285 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7286
7287 # ### BEGIN LIBTOOL CONFIG
7288
7289 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7290
7291 # Shell to use when invoking shell scripts.
7292 SHELL=$lt_SHELL
7293
7294 # Whether or not to build shared libraries.
7295 build_libtool_libs=$enable_shared
7296
7297 # Whether or not to build static libraries.
7298 build_old_libs=$enable_static
7299
7300 # Whether or not to add -lc for building shared libraries.
7301 build_libtool_need_lc=$need_lc
7302
7303 # Whether or not to optimize for fast installation.
7304 fast_install=$enable_fast_install
7305
7306 # The host system.
7307 host_alias=$host_alias
7308 host=$host
7309
7310 # An echo program that does not interpret backslashes.
7311 echo=$lt_echo
7312
7313 # The archiver.
7314 AR=$lt_AR
7315 AR_FLAGS=$lt_AR_FLAGS
7316
7317 # The default C compiler.
7318 CC=$lt_CC
7319
7320 # Is the compiler the GNU C compiler?
7321 with_gcc=$GCC
7322
7323 # The linker used to build libraries.
7324 LD=$lt_LD
7325
7326 # Whether we need hard or soft links.
7327 LN_S=$lt_LN_S
7328
7329 # A BSD-compatible nm program.
7330 NM=$lt_NM
7331
7332 # A symbol stripping program
7333 STRIP=$STRIP
7334
7335 # Used to examine libraries when file_magic_cmd begins "file"
7336 MAGIC_CMD=$MAGIC_CMD
7337
7338 # Used on cygwin: DLL creation program.
7339 DLLTOOL="$DLLTOOL"
7340
7341 # Used on cygwin: object dumper.
7342 OBJDUMP="$OBJDUMP"
7343
7344 # Used on cygwin: assembler.
7345 AS="$AS"
7346
7347 # The name of the directory that contains temporary libtool files.
7348 objdir=$objdir
7349
7350 # How to create reloadable object files.
7351 reload_flag=$lt_reload_flag
7352 reload_cmds=$lt_reload_cmds
7353
7354 # How to pass a linker flag through the compiler.
7355 wl=$lt_wl
7356
7357 # Object file suffix (normally "o").
7358 objext="$ac_objext"
7359
7360 # Old archive suffix (normally "a").
7361 libext="$libext"
7362
7363 # Executable file suffix (normally "").
7364 exeext="$exeext"
7365
7366 # Additional compiler flags for building library objects.
7367 pic_flag=$lt_pic_flag
7368 pic_mode=$pic_mode
7369
7370 # Does compiler simultaneously support -c and -o options?
7371 compiler_c_o=$lt_compiler_c_o
7372
7373 # Can we write directly to a .lo ?
7374 compiler_o_lo=$lt_compiler_o_lo
7375
7376 # Must we lock files when doing compilation ?
7377 need_locks=$lt_need_locks
7378
7379 # Do we need the lib prefix for modules?
7380 need_lib_prefix=$need_lib_prefix
7381
7382 # Do we need a version for libraries?
7383 need_version=$need_version
7384
7385 # Whether dlopen is supported.
7386 dlopen_support=$enable_dlopen
7387
7388 # Whether dlopen of programs is supported.
7389 dlopen_self=$enable_dlopen_self
7390
7391 # Whether dlopen of statically linked programs is supported.
7392 dlopen_self_static=$enable_dlopen_self_static
7393
7394 # Compiler flag to prevent dynamic linking.
7395 link_static_flag=$lt_link_static_flag
7396
7397 # Compiler flag to turn off builtin functions.
7398 no_builtin_flag=$lt_no_builtin_flag
7399
7400 # Compiler flag to allow reflexive dlopens.
7401 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7402
7403 # Compiler flag to generate shared objects directly from archives.
7404 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7405
7406 # Compiler flag to generate thread-safe objects.
7407 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7408
7409 # Library versioning type.
7410 version_type=$version_type
7411
7412 # Format of library name prefix.
7413 libname_spec=$lt_libname_spec
7414
7415 # List of archive names.  First name is the real one, the rest are links.
7416 # The last name is the one that the linker finds with -lNAME.
7417 library_names_spec=$lt_library_names_spec
7418
7419 # The coded name of the library, if different from the real name.
7420 soname_spec=$lt_soname_spec
7421
7422 # Commands used to build and install an old-style archive.
7423 RANLIB=$lt_RANLIB
7424 old_archive_cmds=$lt_old_archive_cmds
7425 old_postinstall_cmds=$lt_old_postinstall_cmds
7426 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7427
7428 # Create an old-style archive from a shared archive.
7429 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7430
7431 # Create a temporary old-style archive to link instead of a shared archive.
7432 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7433
7434 # Commands used to build and install a shared archive.
7435 archive_cmds=$lt_archive_cmds
7436 archive_expsym_cmds=$lt_archive_expsym_cmds
7437 postinstall_cmds=$lt_postinstall_cmds
7438 postuninstall_cmds=$lt_postuninstall_cmds
7439
7440 # Commands to strip libraries.
7441 old_striplib=$lt_old_striplib
7442 striplib=$lt_striplib
7443
7444 # Method to check whether dependent libraries are shared objects.
7445 deplibs_check_method=$lt_deplibs_check_method
7446
7447 # Command to use when deplibs_check_method == file_magic.
7448 file_magic_cmd=$lt_file_magic_cmd
7449
7450 # Flag that allows shared libraries with undefined symbols to be built.
7451 allow_undefined_flag=$lt_allow_undefined_flag
7452
7453 # Flag that forces no undefined symbols.
7454 no_undefined_flag=$lt_no_undefined_flag
7455
7456 # Commands used to finish a libtool library installation in a directory.
7457 finish_cmds=$lt_finish_cmds
7458
7459 # Same as above, but a single script fragment to be evaled but not shown.
7460 finish_eval=$lt_finish_eval
7461
7462 # Take the output of nm and produce a listing of raw symbols and C names.
7463 global_symbol_pipe=$lt_global_symbol_pipe
7464
7465 # Transform the output of nm in a proper C declaration
7466 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7467
7468 # Transform the output of nm in a C name address pair
7469 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7470
7471 # This is the shared library runtime path variable.
7472 runpath_var=$runpath_var
7473
7474 # This is the shared library path variable.
7475 shlibpath_var=$shlibpath_var
7476
7477 # Is shlibpath searched before the hard-coded library search path?
7478 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7479
7480 # How to hardcode a shared library path into an executable.
7481 hardcode_action=$hardcode_action
7482
7483 # Whether we should hardcode library paths into libraries.
7484 hardcode_into_libs=$hardcode_into_libs
7485
7486 # Flag to hardcode \$libdir into a binary during linking.
7487 # This must work even if \$libdir does not exist.
7488 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7489
7490 # Whether we need a single -rpath flag with a separated argument.
7491 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7492
7493 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7494 # resulting binary.
7495 hardcode_direct=$hardcode_direct
7496
7497 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7498 # resulting binary.
7499 hardcode_minus_L=$hardcode_minus_L
7500
7501 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7502 # the resulting binary.
7503 hardcode_shlibpath_var=$hardcode_shlibpath_var
7504
7505 # Variables whose values should be saved in libtool wrapper scripts and
7506 # restored at relink time.
7507 variables_saved_for_relink="$variables_saved_for_relink"
7508
7509 # Whether libtool must link a program against all its dependency libraries.
7510 link_all_deplibs=$link_all_deplibs
7511
7512 # Compile-time system search path for libraries
7513 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7514
7515 # Run-time system search path for libraries
7516 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7517
7518 # Fix the shell variable \$srcfile for the compiler.
7519 fix_srcfile_path="$fix_srcfile_path"
7520
7521 # Set to yes if exported symbols are required.
7522 always_export_symbols=$always_export_symbols
7523
7524 # The commands to list exported symbols.
7525 export_symbols_cmds=$lt_export_symbols_cmds
7526
7527 # The commands to extract the exported symbol list from a shared archive.
7528 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7529
7530 # Symbols that should not be listed in the preloaded symbols.
7531 exclude_expsyms=$lt_exclude_expsyms
7532
7533 # Symbols that must always be exported.
7534 include_expsyms=$lt_include_expsyms
7535
7536 # ### END LIBTOOL CONFIG
7537
7538 __EOF__
7539
7540   case $host_os in
7541   aix3*)
7542     cat <<\EOF >> "${ofile}T"
7543
7544 # AIX sometimes has problems with the GCC collect2 program.  For some
7545 # reason, if we set the COLLECT_NAMES environment variable, the problems
7546 # vanish in a puff of smoke.
7547 if test "X${COLLECT_NAMES+set}" != Xset; then
7548   COLLECT_NAMES=
7549   export COLLECT_NAMES
7550 fi
7551 EOF
7552     ;;
7553   esac
7554
7555   case $host_os in
7556   cygwin* | mingw* | pw32* | os2*)
7557     cat <<'EOF' >> "${ofile}T"
7558       # This is a source program that is used to create dlls on Windows
7559       # Don't remove nor modify the starting and closing comments
7560 # /* ltdll.c starts here */
7561 # #define WIN32_LEAN_AND_MEAN
7562 # #include <windows.h>
7563 # #undef WIN32_LEAN_AND_MEAN
7564 # #include <stdio.h>
7565 #
7566 # #ifndef __CYGWIN__
7567 # #  ifdef __CYGWIN32__
7568 # #    define __CYGWIN__ __CYGWIN32__
7569 # #  endif
7570 # #endif
7571 #
7572 # #ifdef __cplusplus
7573 # extern "C" {
7574 # #endif
7575 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7576 # #ifdef __cplusplus
7577 # }
7578 # #endif
7579 #
7580 # #ifdef __CYGWIN__
7581 # #include <cygwin/cygwin_dll.h>
7582 # DECLARE_CYGWIN_DLL( DllMain );
7583 # #endif
7584 # HINSTANCE __hDllInstance_base;
7585 #
7586 # BOOL APIENTRY
7587 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7588 # {
7589 #   __hDllInstance_base = hInst;
7590 #   return TRUE;
7591 # }
7592 # /* ltdll.c ends here */
7593         # This is a source program that is used to create import libraries
7594         # on Windows for dlls which lack them. Don't remove nor modify the
7595         # starting and closing comments
7596 # /* impgen.c starts here */
7597 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7598 #
7599 #  This file is part of GNU libtool.
7600 #
7601 #  This program is free software; you can redistribute it and/or modify
7602 #  it under the terms of the GNU General Public License as published by
7603 #  the Free Software Foundation; either version 2 of the License, or
7604 #  (at your option) any later version.
7605 #
7606 #  This program is distributed in the hope that it will be useful,
7607 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7608 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7609 #  GNU General Public License for more details.
7610 #
7611 #  You should have received a copy of the GNU General Public License
7612 #  along with this program; if not, write to the Free Software
7613 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7614 #  */
7615 #
7616 # #include <stdio.h>            /* for printf() */
7617 # #include <unistd.h>           /* for open(), lseek(), read() */
7618 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7619 # #include <string.h>           /* for strdup() */
7620 #
7621 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7622 # #ifndef O_BINARY
7623 # #define O_BINARY 0
7624 # #endif
7625 #
7626 # static unsigned int
7627 # pe_get16 (fd, offset)
7628 #      int fd;
7629 #      int offset;
7630 # {
7631 #   unsigned char b[2];
7632 #   lseek (fd, offset, SEEK_SET);
7633 #   read (fd, b, 2);
7634 #   return b[0] + (b[1]<<8);
7635 # }
7636 #
7637 # static unsigned int
7638 # pe_get32 (fd, offset)
7639 #     int fd;
7640 #     int offset;
7641 # {
7642 #   unsigned char b[4];
7643 #   lseek (fd, offset, SEEK_SET);
7644 #   read (fd, b, 4);
7645 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7646 # }
7647 #
7648 # static unsigned int
7649 # pe_as32 (ptr)
7650 #      void *ptr;
7651 # {
7652 #   unsigned char *b = ptr;
7653 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7654 # }
7655 #
7656 # int
7657 # main (argc, argv)
7658 #     int argc;
7659 #     char *argv[];
7660 # {
7661 #     int dll;
7662 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7663 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7664 #     unsigned long name_rvas, nexp;
7665 #     unsigned char *expdata, *erva;
7666 #     char *filename, *dll_name;
7667 #
7668 #     filename = argv[1];
7669 #
7670 #     dll = open(filename, O_RDONLY|O_BINARY);
7671 #     if (dll < 1)
7672 #       return 1;
7673 #
7674 #     dll_name = filename;
7675 #
7676 #     for (i=0; filename[i]; i++)
7677 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7678 #           dll_name = filename + i +1;
7679 #
7680 #     pe_header_offset = pe_get32 (dll, 0x3c);
7681 #     opthdr_ofs = pe_header_offset + 4 + 20;
7682 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7683 #
7684 #     if (num_entries < 1) /* no exports */
7685 #       return 1;
7686 #
7687 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7688 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7689 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7690 #     secptr = (pe_header_offset + 4 + 20 +
7691 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7692 #
7693 #     expptr = 0;
7694 #     for (i = 0; i < nsections; i++)
7695 #     {
7696 #       char sname[8];
7697 #       unsigned long secptr1 = secptr + 40 * i;
7698 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7699 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7700 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7701 #       lseek(dll, secptr1, SEEK_SET);
7702 #       read(dll, sname, 8);
7703 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7704 #       {
7705 #           expptr = fptr + (export_rva - vaddr);
7706 #           if (export_rva + export_size > vaddr + vsize)
7707 #               export_size = vsize - (export_rva - vaddr);
7708 #           break;
7709 #       }
7710 #     }
7711 #
7712 #     expdata = (unsigned char*)malloc(export_size);
7713 #     lseek (dll, expptr, SEEK_SET);
7714 #     read (dll, expdata, export_size);
7715 #     erva = expdata - export_rva;
7716 #
7717 #     nexp = pe_as32 (expdata+24);
7718 #     name_rvas = pe_as32 (expdata+32);
7719 #
7720 #     printf ("EXPORTS\n");
7721 #     for (i = 0; i<nexp; i++)
7722 #     {
7723 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7724 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7725 #     }
7726 #
7727 #     return 0;
7728 # }
7729 # /* impgen.c ends here */
7730
7731 EOF
7732     ;;
7733   esac
7734
7735   # We use sed instead of cat because bash on DJGPP gets confused if
7736   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7737   # text mode, it properly converts lines to CR/LF.  This bash problem
7738   # is reportedly fixed, but why not run on old versions too?
7739   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7740
7741   mv -f "${ofile}T" "$ofile" || \
7742     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7743   chmod +x "$ofile"
7744 fi
7745
7746
7747
7748
7749
7750 # This can be used to rebuild libtool when needed
7751 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7752
7753 # Always use our own libtool.
7754 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7755
7756 # Prevent multiple expansion
7757
7758
7759
7760 # test for ln hardlink support
7761 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7762 echo "configure:7763: checking whether ln works" >&5
7763 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7764   echo $ac_n "(cached) $ac_c" 1>&6
7765 else
7766   rm -f conftest.src conftest.dst
7767 echo "conftest" > conftest.src
7768 if ln conftest.src conftest.dst 2>/dev/null
7769 then
7770   ol_cv_prog_LN_H="ln"
7771 else
7772   ol_cv_prog_LN_H="cp"
7773 fi
7774 rm -f conftest.src conftest.dst
7775
7776 fi
7777 LN_H="$ol_cv_prog_LN_H"
7778 if test "$ol_cv_prog_LN_H" = "ln"; then
7779         echo "$ac_t""yes" 1>&6
7780 else
7781         echo "$ac_t""no" 1>&6
7782 fi
7783
7784 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7785 echo "configure:7786: checking whether ln -s works" >&5
7786 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7787   echo $ac_n "(cached) $ac_c" 1>&6
7788 else
7789   rm -f conftestdata
7790 if ln -s X conftestdata 2>/dev/null
7791 then
7792   rm -f conftestdata
7793   ac_cv_prog_LN_S="ln -s"
7794 else
7795   ac_cv_prog_LN_S=ln
7796 fi
7797 fi
7798 LN_S="$ac_cv_prog_LN_S"
7799 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7800   echo "$ac_t""yes" 1>&6
7801 else
7802   echo "$ac_t""no" 1>&6
7803 fi
7804
7805
7806 ol_link_perl=no
7807 if test $ol_enable_perl != no ; then
7808         # Extract the first word of "perl", so it can be a program name with args.
7809 set dummy perl; ac_word=$2
7810 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7811 echo "configure:7812: checking for $ac_word" >&5
7812 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7813   echo $ac_n "(cached) $ac_c" 1>&6
7814 else
7815   case "$PERLBIN" in
7816   /*)
7817   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7818   ;;
7819   ?:/*)
7820   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7821   ;;
7822   *)
7823   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7824   ac_dummy="$PATH"
7825   for ac_dir in $ac_dummy; do 
7826     test -z "$ac_dir" && ac_dir=.
7827     if test -f $ac_dir/$ac_word; then
7828       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7829       break
7830     fi
7831   done
7832   IFS="$ac_save_ifs"
7833   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7834   ;;
7835 esac
7836 fi
7837 PERLBIN="$ac_cv_path_PERLBIN"
7838 if test -n "$PERLBIN"; then
7839   echo "$ac_t""$PERLBIN" 1>&6
7840 else
7841   echo "$ac_t""no" 1>&6
7842 fi
7843
7844
7845         if test "no$PERLBIN" = "no" ; then
7846                 if test $ol_enable_perl = yes ; then
7847                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7848                 fi
7849
7850         else
7851                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7852                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7853
7854                 if test x"$ol_with_perl_module" = "xstatic" ; then
7855                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7856                 else
7857                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7858                 fi
7859                                 ol_link_perl=yes
7860         fi
7861 fi
7862
7863 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7864 echo "configure:7865: checking how to run the C preprocessor" >&5
7865 # On Suns, sometimes $CPP names a directory.
7866 if test -n "$CPP" && test -d "$CPP"; then
7867   CPP=
7868 fi
7869 if test -z "$CPP"; then
7870 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7871   echo $ac_n "(cached) $ac_c" 1>&6
7872 else
7873     # This must be in double quotes, not single quotes, because CPP may get
7874   # substituted into the Makefile and "${CC-cc}" will confuse make.
7875   CPP="${CC-cc} -E"
7876   # On the NeXT, cc -E runs the code through the compiler's parser,
7877   # not just through cpp.
7878   cat > conftest.$ac_ext <<EOF
7879 #line 7880 "configure"
7880 #include "confdefs.h"
7881 #include <assert.h>
7882 Syntax Error
7883 EOF
7884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7885 { (eval echo configure:7886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7887 if test -z "$ac_err"; then
7888   :
7889 else
7890   echo "$ac_err" >&5
7891   echo "configure: failed program was:" >&5
7892   cat conftest.$ac_ext >&5
7893   rm -rf conftest*
7894   CPP="${CC-cc} -E -traditional-cpp"
7895   cat > conftest.$ac_ext <<EOF
7896 #line 7897 "configure"
7897 #include "confdefs.h"
7898 #include <assert.h>
7899 Syntax Error
7900 EOF
7901 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7902 { (eval echo configure:7903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7903 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7904 if test -z "$ac_err"; then
7905   :
7906 else
7907   echo "$ac_err" >&5
7908   echo "configure: failed program was:" >&5
7909   cat conftest.$ac_ext >&5
7910   rm -rf conftest*
7911   CPP="${CC-cc} -nologo -E"
7912   cat > conftest.$ac_ext <<EOF
7913 #line 7914 "configure"
7914 #include "confdefs.h"
7915 #include <assert.h>
7916 Syntax Error
7917 EOF
7918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7919 { (eval echo configure:7920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7921 if test -z "$ac_err"; then
7922   :
7923 else
7924   echo "$ac_err" >&5
7925   echo "configure: failed program was:" >&5
7926   cat conftest.$ac_ext >&5
7927   rm -rf conftest*
7928   CPP=/lib/cpp
7929 fi
7930 rm -f conftest*
7931 fi
7932 rm -f conftest*
7933 fi
7934 rm -f conftest*
7935   ac_cv_prog_CPP="$CPP"
7936 fi
7937   CPP="$ac_cv_prog_CPP"
7938 else
7939   ac_cv_prog_CPP="$CPP"
7940 fi
7941 echo "$ac_t""$CPP" 1>&6
7942
7943
7944 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7945         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7946
7947 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7948         echo "configure: warning: programs compiled here do run here..." 1>&2
7949         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7950
7951 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7952         echo "configure: warning: programs compiled here do not run here..." 1>&2
7953         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7954 fi
7955
7956
7957 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7958 echo "configure:7959: checking for Cygwin environment" >&5
7959 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7960   echo $ac_n "(cached) $ac_c" 1>&6
7961 else
7962   cat > conftest.$ac_ext <<EOF
7963 #line 7964 "configure"
7964 #include "confdefs.h"
7965
7966 int main() {
7967
7968 #ifndef __CYGWIN__
7969 #define __CYGWIN__ __CYGWIN32__
7970 #endif
7971 return __CYGWIN__;
7972 ; return 0; }
7973 EOF
7974 if { (eval echo configure:7975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7975   rm -rf conftest*
7976   ac_cv_cygwin=yes
7977 else
7978   echo "configure: failed program was:" >&5
7979   cat conftest.$ac_ext >&5
7980   rm -rf conftest*
7981   ac_cv_cygwin=no
7982 fi
7983 rm -f conftest*
7984 fi
7985
7986 echo "$ac_t""$ac_cv_cygwin" 1>&6
7987 CYGWIN=
7988 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7989 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7990 echo "configure:7991: checking for mingw32 environment" >&5
7991 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7992   echo $ac_n "(cached) $ac_c" 1>&6
7993 else
7994   cat > conftest.$ac_ext <<EOF
7995 #line 7996 "configure"
7996 #include "confdefs.h"
7997
7998 int main() {
7999 return __MINGW32__;
8000 ; return 0; }
8001 EOF
8002 if { (eval echo configure:8003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8003   rm -rf conftest*
8004   ac_cv_mingw32=yes
8005 else
8006   echo "configure: failed program was:" >&5
8007   cat conftest.$ac_ext >&5
8008   rm -rf conftest*
8009   ac_cv_mingw32=no
8010 fi
8011 rm -f conftest*
8012 fi
8013
8014 echo "$ac_t""$ac_cv_mingw32" 1>&6
8015 MINGW32=
8016 test "$ac_cv_mingw32" = yes && MINGW32=yes
8017
8018
8019
8020 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8021 echo "configure:8022: checking for executable suffix" >&5
8022 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8023   echo $ac_n "(cached) $ac_c" 1>&6
8024 else
8025   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8026   ac_cv_exeext=.exe
8027 else
8028   rm -f conftest*
8029   echo 'int main () { return 0; }' > conftest.$ac_ext
8030   ac_cv_exeext=
8031   if { (eval echo configure:8032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8032     for file in conftest.*; do
8033       case $file in
8034       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8035       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8036       esac
8037     done
8038   else
8039     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8040   fi
8041   rm -f conftest*
8042   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8043 fi
8044 fi
8045
8046 EXEEXT=""
8047 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8048 echo "$ac_t""${ac_cv_exeext}" 1>&6
8049 ac_exeext=$EXEEXT
8050
8051 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8052 echo "configure:8053: checking for object suffix" >&5
8053 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8054   echo $ac_n "(cached) $ac_c" 1>&6
8055 else
8056   rm -f conftest*
8057 echo 'int i = 1;' > conftest.$ac_ext
8058 if { (eval echo configure:8059: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8059   for ac_file in conftest.*; do
8060     case $ac_file in
8061     *.c) ;;
8062     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8063     esac
8064   done
8065 else
8066   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8067 fi
8068 rm -f conftest*
8069 fi
8070
8071 echo "$ac_t""$ac_cv_objext" 1>&6
8072 OBJEXT=$ac_cv_objext
8073 ac_objext=$ac_cv_objext
8074
8075
8076 cat >> confdefs.h <<EOF
8077 #define EXEEXT "${EXEEXT}"
8078 EOF
8079
8080
8081 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8082 echo "configure:8083: checking for be_app in -lbe" >&5
8083 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8084 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8085   echo $ac_n "(cached) $ac_c" 1>&6
8086 else
8087   ac_save_LIBS="$LIBS"
8088 LIBS="-lbe -lroot -lnet $LIBS"
8089 cat > conftest.$ac_ext <<EOF
8090 #line 8091 "configure"
8091 #include "confdefs.h"
8092 /* Override any gcc2 internal prototype to avoid an error.  */
8093 /* We use char because int might match the return type of a gcc2
8094     builtin and then its argument prototype would still apply.  */
8095 char be_app();
8096
8097 int main() {
8098 be_app()
8099 ; return 0; }
8100 EOF
8101 if { (eval echo configure:8102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8102   rm -rf conftest*
8103   eval "ac_cv_lib_$ac_lib_var=yes"
8104 else
8105   echo "configure: failed program was:" >&5
8106   cat conftest.$ac_ext >&5
8107   rm -rf conftest*
8108   eval "ac_cv_lib_$ac_lib_var=no"
8109 fi
8110 rm -f conftest*
8111 LIBS="$ac_save_LIBS"
8112
8113 fi
8114 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8115   echo "$ac_t""yes" 1>&6
8116   LIBS="$LIBS -lbe -lroot -lnet"
8117 else
8118   echo "$ac_t""no" 1>&6
8119 :
8120 fi
8121
8122
8123
8124
8125
8126 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8127 echo "configure:8128: checking for ${CC-cc} option to accept ANSI C" >&5
8128 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8129   echo $ac_n "(cached) $ac_c" 1>&6
8130 else
8131   am_cv_prog_cc_stdc=no
8132 ac_save_CC="$CC"
8133 # Don't try gcc -ansi; that turns off useful extensions and
8134 # breaks some systems' header files.
8135 # AIX                   -qlanglvl=ansi
8136 # Ultrix and OSF/1      -std1
8137 # HP-UX 10.20 and later -Ae
8138 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8139 # SVR4                  -Xc -D__EXTENSIONS__
8140 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8141 do
8142   CC="$ac_save_CC $ac_arg"
8143   cat > conftest.$ac_ext <<EOF
8144 #line 8145 "configure"
8145 #include "confdefs.h"
8146 #include <stdarg.h>
8147 #include <stdio.h>
8148 #include <sys/types.h>
8149 #include <sys/stat.h>
8150 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8151 struct buf { int x; };
8152 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8153 static char *e (p, i)
8154      char **p;
8155      int i;
8156 {
8157   return p[i];
8158 }
8159 static char *f (char * (*g) (char **, int), char **p, ...)
8160 {
8161   char *s;
8162   va_list v;
8163   va_start (v,p);
8164   s = g (p, va_arg (v,int));
8165   va_end (v);
8166   return s;
8167 }
8168 int test (int i, double x);
8169 struct s1 {int (*f) (int a);};
8170 struct s2 {int (*f) (double a);};
8171 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8172 int argc;
8173 char **argv;
8174
8175 int main() {
8176
8177 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8178
8179 ; return 0; }
8180 EOF
8181 if { (eval echo configure:8182: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8182   rm -rf conftest*
8183   am_cv_prog_cc_stdc="$ac_arg"; break
8184 else
8185   echo "configure: failed program was:" >&5
8186   cat conftest.$ac_ext >&5
8187 fi
8188 rm -f conftest*
8189 done
8190 CC="$ac_save_CC"
8191
8192 fi
8193
8194 if test -z "$am_cv_prog_cc_stdc"; then
8195   echo "$ac_t""none needed" 1>&6
8196 else
8197   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8198 fi
8199 case "x$am_cv_prog_cc_stdc" in
8200   x|xno) ;;
8201   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8202 esac
8203
8204 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8205         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8206 fi
8207
8208 # test for make depend flag
8209 OL_MKDEP=
8210 OL_MKDEP_FLAGS=
8211 if test -z "${MKDEP}"; then
8212         OL_MKDEP="${CC-cc}"
8213         if test -z "${MKDEP_FLAGS}"; then
8214                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8215 echo "configure:8216: checking for ${OL_MKDEP} depend flag" >&5
8216 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8217   echo $ac_n "(cached) $ac_c" 1>&6
8218 else
8219   
8220                         ol_cv_mkdep=no
8221                         for flag in "-M" "-xM"; do
8222                                 cat > conftest.c <<EOF
8223  noCode;
8224 EOF
8225                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8226                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8227                                 then
8228                                         if test ! -f conftest."${ac_object}" ; then
8229                                                 ol_cv_mkdep=$flag
8230                                                 OL_MKDEP_FLAGS="$flag"
8231                                                 break
8232                                         fi
8233                                 fi
8234                         done
8235                         rm -f conftest*
8236                 
8237 fi
8238
8239 echo "$ac_t""$ol_cv_mkdep" 1>&6
8240         else
8241                 cc_cv_mkdep=yes
8242                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8243         fi
8244 else
8245         cc_cv_mkdep=yes
8246         OL_MKDEP="${MKDEP}"
8247         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8248 fi
8249
8250
8251
8252 if test "${ol_cv_mkdep}" = no ; then
8253         # this will soon become an error
8254         echo "configure: warning: do not know how to generate dependencies" 1>&2
8255 fi
8256
8257 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8258 echo "configure:8259: checking for afopen in -ls" >&5
8259 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8260 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8261   echo $ac_n "(cached) $ac_c" 1>&6
8262 else
8263   ac_save_LIBS="$LIBS"
8264 LIBS="-ls  $LIBS"
8265 cat > conftest.$ac_ext <<EOF
8266 #line 8267 "configure"
8267 #include "confdefs.h"
8268 /* Override any gcc2 internal prototype to avoid an error.  */
8269 /* We use char because int might match the return type of a gcc2
8270     builtin and then its argument prototype would still apply.  */
8271 char afopen();
8272
8273 int main() {
8274 afopen()
8275 ; return 0; }
8276 EOF
8277 if { (eval echo configure:8278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8278   rm -rf conftest*
8279   eval "ac_cv_lib_$ac_lib_var=yes"
8280 else
8281   echo "configure: failed program was:" >&5
8282   cat conftest.$ac_ext >&5
8283   rm -rf conftest*
8284   eval "ac_cv_lib_$ac_lib_var=no"
8285 fi
8286 rm -f conftest*
8287 LIBS="$ac_save_LIBS"
8288
8289 fi
8290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8291   echo "$ac_t""yes" 1>&6
8292   
8293         AUTH_LIBS=-ls
8294         cat >> confdefs.h <<\EOF
8295 #define HAVE_AIX_SECURITY 1
8296 EOF
8297
8298
8299 else
8300   echo "$ac_t""no" 1>&6
8301 fi
8302
8303
8304 case "$target" in
8305 *-ibm-openedition)
8306         ac_cv_func_getopt=no
8307         cat >> confdefs.h <<\EOF
8308 #define BOTH_STRINGS_H 1
8309 EOF
8310
8311         ;;
8312 esac
8313
8314 ol_link_modules=no
8315 if test $ol_enable_modules != no ; then
8316         for ac_hdr in ltdl.h
8317 do
8318 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8319 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8320 echo "configure:8321: checking for $ac_hdr" >&5
8321 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8322   echo $ac_n "(cached) $ac_c" 1>&6
8323 else
8324   cat > conftest.$ac_ext <<EOF
8325 #line 8326 "configure"
8326 #include "confdefs.h"
8327 #include <$ac_hdr>
8328 EOF
8329 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8330 { (eval echo configure:8331: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8331 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8332 if test -z "$ac_err"; then
8333   rm -rf conftest*
8334   eval "ac_cv_header_$ac_safe=yes"
8335 else
8336   echo "$ac_err" >&5
8337   echo "configure: failed program was:" >&5
8338   cat conftest.$ac_ext >&5
8339   rm -rf conftest*
8340   eval "ac_cv_header_$ac_safe=no"
8341 fi
8342 rm -f conftest*
8343 fi
8344 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8345   echo "$ac_t""yes" 1>&6
8346     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8347   cat >> confdefs.h <<EOF
8348 #define $ac_tr_hdr 1
8349 EOF
8350  
8351 else
8352   echo "$ac_t""no" 1>&6
8353 fi
8354 done
8355
8356
8357         if test $ac_cv_header_ltdl_h = no ; then
8358                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8359         fi
8360
8361         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8362 echo "configure:8363: checking for lt_dlinit in -lltdl" >&5
8363 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8364 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8365   echo $ac_n "(cached) $ac_c" 1>&6
8366 else
8367   ac_save_LIBS="$LIBS"
8368 LIBS="-lltdl  $LIBS"
8369 cat > conftest.$ac_ext <<EOF
8370 #line 8371 "configure"
8371 #include "confdefs.h"
8372 /* Override any gcc2 internal prototype to avoid an error.  */
8373 /* We use char because int might match the return type of a gcc2
8374     builtin and then its argument prototype would still apply.  */
8375 char lt_dlinit();
8376
8377 int main() {
8378 lt_dlinit()
8379 ; return 0; }
8380 EOF
8381 if { (eval echo configure:8382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8382   rm -rf conftest*
8383   eval "ac_cv_lib_$ac_lib_var=yes"
8384 else
8385   echo "configure: failed program was:" >&5
8386   cat conftest.$ac_ext >&5
8387   rm -rf conftest*
8388   eval "ac_cv_lib_$ac_lib_var=no"
8389 fi
8390 rm -f conftest*
8391 LIBS="$ac_save_LIBS"
8392
8393 fi
8394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8395   echo "$ac_t""yes" 1>&6
8396   
8397                 MODULES_LIBS=-lltdl
8398                 cat >> confdefs.h <<\EOF
8399 #define HAVE_LIBLTDL 1
8400 EOF
8401
8402         
8403 else
8404   echo "$ac_t""no" 1>&6
8405 fi
8406
8407
8408         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8409                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8410         fi
8411         ol_link_modules=yes
8412 else
8413         ol_with_bdb_module=static
8414         ol_with_dnssrv_module=static
8415         ol_with_hdb_module=static
8416         ol_with_ldap_module=static
8417         ol_with_ldbm_module=static
8418         ol_with_meta_module=static
8419         ol_with_monitor_module=static
8420         ol_with_null_module=static
8421         ol_with_passwd_module=static
8422         ol_with_perl_module=static
8423         ol_with_shell_module=static
8424         ol_with_tcl_module=static
8425         ol_with_sql_module=static
8426 fi
8427
8428 # test for EBCDIC
8429 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8430 echo "configure:8431: checking for EBCDIC" >&5
8431 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8432   echo $ac_n "(cached) $ac_c" 1>&6
8433 else
8434   
8435         cat > conftest.$ac_ext <<EOF
8436 #line 8437 "configure"
8437 #include "confdefs.h"
8438
8439 #if !('M' == 0xd4)
8440 #include <__ASCII__/generate_error.h>
8441 #endif
8442
8443 EOF
8444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8445 { (eval echo configure:8446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8447 if test -z "$ac_err"; then
8448   rm -rf conftest*
8449   ol_cv_cpp_ebcdic=yes
8450 else
8451   echo "$ac_err" >&5
8452   echo "configure: failed program was:" >&5
8453   cat conftest.$ac_ext >&5
8454   rm -rf conftest*
8455   ol_cv_cpp_ebcdic=no
8456 fi
8457 rm -f conftest*
8458 fi
8459
8460 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8461 if test $ol_cv_cpp_ebcdic = yes ; then
8462         cat >> confdefs.h <<\EOF
8463 #define HAVE_EBCDIC 1
8464 EOF
8465
8466 fi
8467
8468 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8469 echo "configure:8470: checking for ANSI C header files" >&5
8470 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8471   echo $ac_n "(cached) $ac_c" 1>&6
8472 else
8473   cat > conftest.$ac_ext <<EOF
8474 #line 8475 "configure"
8475 #include "confdefs.h"
8476 #include <stdlib.h>
8477 #include <stdarg.h>
8478 #include <string.h>
8479 #include <float.h>
8480 EOF
8481 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8482 { (eval echo configure:8483: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8483 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8484 if test -z "$ac_err"; then
8485   rm -rf conftest*
8486   ol_cv_header_stdc=yes
8487 else
8488   echo "$ac_err" >&5
8489   echo "configure: failed program was:" >&5
8490   cat conftest.$ac_ext >&5
8491   rm -rf conftest*
8492   ol_cv_header_stdc=no
8493 fi
8494 rm -f conftest*
8495
8496 if test $ol_cv_header_stdc = yes; then
8497   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8498 cat > conftest.$ac_ext <<EOF
8499 #line 8500 "configure"
8500 #include "confdefs.h"
8501 #include <string.h>
8502 EOF
8503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8504   egrep "memchr" >/dev/null 2>&1; then
8505   :
8506 else
8507   rm -rf conftest*
8508   ol_cv_header_stdc=no
8509 fi
8510 rm -f conftest*
8511
8512 fi
8513
8514 if test $ol_cv_header_stdc = yes; then
8515   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8516 cat > conftest.$ac_ext <<EOF
8517 #line 8518 "configure"
8518 #include "confdefs.h"
8519 #include <stdlib.h>
8520 EOF
8521 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8522   egrep "free" >/dev/null 2>&1; then
8523   :
8524 else
8525   rm -rf conftest*
8526   ol_cv_header_stdc=no
8527 fi
8528 rm -f conftest*
8529
8530 fi
8531
8532 if test $ol_cv_header_stdc = yes; then
8533   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8534 if test "$cross_compiling" = yes; then
8535   :
8536 else
8537   cat > conftest.$ac_ext <<EOF
8538 #line 8539 "configure"
8539 #include "confdefs.h"
8540 #include <ctype.h>
8541 #ifndef HAVE_EBCDIC
8542 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8543 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8544 #else
8545 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8546                 || ('j' <= (c) && (c) <= 'r') \
8547                 || ('s' <= (c) && (c) <= 'z'))
8548 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8549 #endif
8550 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8551 int main () { int i; for (i = 0; i < 256; i++)
8552 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8553 exit (0); }
8554
8555 EOF
8556 if { (eval echo configure:8557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8557 then
8558   :
8559 else
8560   echo "configure: failed program was:" >&5
8561   cat conftest.$ac_ext >&5
8562   rm -fr conftest*
8563   ol_cv_header_stdc=no
8564 fi
8565 rm -fr conftest*
8566 fi
8567
8568 fi
8569 fi
8570
8571 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8572 if test $ol_cv_header_stdc = yes; then
8573   cat >> confdefs.h <<\EOF
8574 #define STDC_HEADERS 1
8575 EOF
8576
8577 fi
8578 ac_cv_header_stdc=disable
8579
8580
8581 if test $ol_cv_header_stdc != yes; then
8582         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8583 fi
8584
8585 ac_header_dirent=no
8586 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8587 do
8588 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8589 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8590 echo "configure:8591: checking for $ac_hdr that defines DIR" >&5
8591 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8592   echo $ac_n "(cached) $ac_c" 1>&6
8593 else
8594   cat > conftest.$ac_ext <<EOF
8595 #line 8596 "configure"
8596 #include "confdefs.h"
8597 #include <sys/types.h>
8598 #include <$ac_hdr>
8599 int main() {
8600 DIR *dirp = 0;
8601 ; return 0; }
8602 EOF
8603 if { (eval echo configure:8604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8604   rm -rf conftest*
8605   eval "ac_cv_header_dirent_$ac_safe=yes"
8606 else
8607   echo "configure: failed program was:" >&5
8608   cat conftest.$ac_ext >&5
8609   rm -rf conftest*
8610   eval "ac_cv_header_dirent_$ac_safe=no"
8611 fi
8612 rm -f conftest*
8613 fi
8614 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8615   echo "$ac_t""yes" 1>&6
8616     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8617   cat >> confdefs.h <<EOF
8618 #define $ac_tr_hdr 1
8619 EOF
8620  ac_header_dirent=$ac_hdr; break
8621 else
8622   echo "$ac_t""no" 1>&6
8623 fi
8624 done
8625 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8626 if test $ac_header_dirent = dirent.h; then
8627 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8628 echo "configure:8629: checking for opendir in -ldir" >&5
8629 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8630 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8631   echo $ac_n "(cached) $ac_c" 1>&6
8632 else
8633   ac_save_LIBS="$LIBS"
8634 LIBS="-ldir  $LIBS"
8635 cat > conftest.$ac_ext <<EOF
8636 #line 8637 "configure"
8637 #include "confdefs.h"
8638 /* Override any gcc2 internal prototype to avoid an error.  */
8639 /* We use char because int might match the return type of a gcc2
8640     builtin and then its argument prototype would still apply.  */
8641 char opendir();
8642
8643 int main() {
8644 opendir()
8645 ; return 0; }
8646 EOF
8647 if { (eval echo configure:8648: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8648   rm -rf conftest*
8649   eval "ac_cv_lib_$ac_lib_var=yes"
8650 else
8651   echo "configure: failed program was:" >&5
8652   cat conftest.$ac_ext >&5
8653   rm -rf conftest*
8654   eval "ac_cv_lib_$ac_lib_var=no"
8655 fi
8656 rm -f conftest*
8657 LIBS="$ac_save_LIBS"
8658
8659 fi
8660 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8661   echo "$ac_t""yes" 1>&6
8662   LIBS="$LIBS -ldir"
8663 else
8664   echo "$ac_t""no" 1>&6
8665 fi
8666
8667 else
8668 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8669 echo "configure:8670: checking for opendir in -lx" >&5
8670 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8671 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8672   echo $ac_n "(cached) $ac_c" 1>&6
8673 else
8674   ac_save_LIBS="$LIBS"
8675 LIBS="-lx  $LIBS"
8676 cat > conftest.$ac_ext <<EOF
8677 #line 8678 "configure"
8678 #include "confdefs.h"
8679 /* Override any gcc2 internal prototype to avoid an error.  */
8680 /* We use char because int might match the return type of a gcc2
8681     builtin and then its argument prototype would still apply.  */
8682 char opendir();
8683
8684 int main() {
8685 opendir()
8686 ; return 0; }
8687 EOF
8688 if { (eval echo configure:8689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8689   rm -rf conftest*
8690   eval "ac_cv_lib_$ac_lib_var=yes"
8691 else
8692   echo "configure: failed program was:" >&5
8693   cat conftest.$ac_ext >&5
8694   rm -rf conftest*
8695   eval "ac_cv_lib_$ac_lib_var=no"
8696 fi
8697 rm -f conftest*
8698 LIBS="$ac_save_LIBS"
8699
8700 fi
8701 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8702   echo "$ac_t""yes" 1>&6
8703   LIBS="$LIBS -lx"
8704 else
8705   echo "$ac_t""no" 1>&6
8706 fi
8707
8708 fi
8709
8710 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8711 echo "configure:8712: checking for sys/wait.h that is POSIX.1 compatible" >&5
8712 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8713   echo $ac_n "(cached) $ac_c" 1>&6
8714 else
8715   cat > conftest.$ac_ext <<EOF
8716 #line 8717 "configure"
8717 #include "confdefs.h"
8718 #include <sys/types.h>
8719 #include <sys/wait.h>
8720 #ifndef WEXITSTATUS
8721 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8722 #endif
8723 #ifndef WIFEXITED
8724 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8725 #endif
8726 int main() {
8727 int s;
8728 wait (&s);
8729 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8730 ; return 0; }
8731 EOF
8732 if { (eval echo configure:8733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8733   rm -rf conftest*
8734   ac_cv_header_sys_wait_h=yes
8735 else
8736   echo "configure: failed program was:" >&5
8737   cat conftest.$ac_ext >&5
8738   rm -rf conftest*
8739   ac_cv_header_sys_wait_h=no
8740 fi
8741 rm -f conftest*
8742 fi
8743
8744 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8745 if test $ac_cv_header_sys_wait_h = yes; then
8746   cat >> confdefs.h <<\EOF
8747 #define HAVE_SYS_WAIT_H 1
8748 EOF
8749
8750 fi
8751
8752 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8753 echo "configure:8754: checking POSIX termios" >&5
8754 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8755   echo $ac_n "(cached) $ac_c" 1>&6
8756 else
8757   cat > conftest.$ac_ext <<EOF
8758 #line 8759 "configure"
8759 #include "confdefs.h"
8760 #include <sys/types.h>
8761 #include <unistd.h>
8762 #include <termios.h>
8763 int main() {
8764 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8765    tcgetattr(0, 0);
8766 ; return 0; }
8767 EOF
8768 if { (eval echo configure:8769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8769   rm -rf conftest*
8770   am_cv_sys_posix_termios=yes
8771 else
8772   echo "configure: failed program was:" >&5
8773   cat conftest.$ac_ext >&5
8774   rm -rf conftest*
8775   am_cv_sys_posix_termios=no
8776 fi
8777 rm -f conftest*
8778 fi
8779
8780 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8781
8782
8783  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8784 echo "configure:8785: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8785 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8786   echo $ac_n "(cached) $ac_c" 1>&6
8787 else
8788   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8789
8790   gwinsz_in_termios_h=no
8791   if test $am_cv_sys_posix_termios = yes; then
8792     cat > conftest.$ac_ext <<EOF
8793 #line 8794 "configure"
8794 #include "confdefs.h"
8795 #include <sys/types.h>
8796 #     include <termios.h>
8797 #     ifdef TIOCGWINSZ
8798         yes
8799 #     endif
8800     
8801 EOF
8802 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8803   egrep "yes" >/dev/null 2>&1; then
8804   rm -rf conftest*
8805   gwinsz_in_termios_h=yes
8806 fi
8807 rm -f conftest*
8808
8809   fi
8810
8811   if test $gwinsz_in_termios_h = no; then
8812     cat > conftest.$ac_ext <<EOF
8813 #line 8814 "configure"
8814 #include "confdefs.h"
8815 #include <sys/types.h>
8816 #     include <sys/ioctl.h>
8817 #     ifdef TIOCGWINSZ
8818         yes
8819 #     endif
8820     
8821 EOF
8822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8823   egrep "yes" >/dev/null 2>&1; then
8824   rm -rf conftest*
8825   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8826 fi
8827 rm -f conftest*
8828
8829   fi
8830   
8831 fi
8832
8833 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8834   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8835     cat >> confdefs.h <<\EOF
8836 #define GWINSZ_IN_SYS_IOCTL 1
8837 EOF
8838
8839   fi
8840
8841 if test $am_cv_sys_posix_termios = yes ; then
8842         cat >> confdefs.h <<\EOF
8843 #define HAVE_POSIX_TERMIOS 1
8844 EOF
8845
8846 fi
8847
8848 for ac_hdr in \
8849         arpa/inet.h             \
8850         arpa/nameser.h  \
8851         assert.h                \
8852         conio.h                 \
8853         crypt.h                 \
8854         direct.h                \
8855         errno.h                 \
8856         fcntl.h                 \
8857         filio.h                 \
8858         getopt.h                \
8859         grp.h                   \
8860         io.h                    \
8861         libutil.h               \
8862         limits.h                \
8863         locale.h                \
8864         netinet/tcp.h   \
8865         malloc.h                \
8866         memory.h                \
8867         psap.h                  \
8868         pwd.h                   \
8869         process.h               \
8870         resolv.h                \
8871         sgtty.h                 \
8872         shadow.h                \
8873         stddef.h                \
8874         string.h                \
8875         strings.h               \
8876         sysexits.h              \
8877         sys/file.h              \
8878         sys/filio.h             \
8879         sys/errno.h             \
8880         sys/ioctl.h             \
8881         sys/param.h             \
8882         sys/resource.h  \
8883         sys/select.h    \
8884         sys/socket.h    \
8885         sys/stat.h              \
8886         sys/syslog.h    \
8887         sys/time.h              \
8888         sys/types.h             \
8889         sys/ucred.h             \
8890         sys/uio.h               \
8891         syslog.h                \
8892         termios.h               \
8893         unistd.h                \
8894         winsock.h               \
8895         winsock2.h              \
8896
8897 do
8898 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8899 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8900 echo "configure:8901: checking for $ac_hdr" >&5
8901 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8902   echo $ac_n "(cached) $ac_c" 1>&6
8903 else
8904   cat > conftest.$ac_ext <<EOF
8905 #line 8906 "configure"
8906 #include "confdefs.h"
8907 #include <$ac_hdr>
8908 EOF
8909 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8910 { (eval echo configure:8911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8911 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8912 if test -z "$ac_err"; then
8913   rm -rf conftest*
8914   eval "ac_cv_header_$ac_safe=yes"
8915 else
8916   echo "$ac_err" >&5
8917   echo "configure: failed program was:" >&5
8918   cat conftest.$ac_ext >&5
8919   rm -rf conftest*
8920   eval "ac_cv_header_$ac_safe=no"
8921 fi
8922 rm -f conftest*
8923 fi
8924 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8925   echo "$ac_t""yes" 1>&6
8926     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8927   cat >> confdefs.h <<EOF
8928 #define $ac_tr_hdr 1
8929 EOF
8930  
8931 else
8932   echo "$ac_t""no" 1>&6
8933 fi
8934 done
8935
8936
8937
8938
8939 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8940 echo "configure:8941: checking for dlopen" >&5
8941 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8942   echo $ac_n "(cached) $ac_c" 1>&6
8943 else
8944   cat > conftest.$ac_ext <<EOF
8945 #line 8946 "configure"
8946 #include "confdefs.h"
8947 /* System header to define __stub macros and hopefully few prototypes,
8948     which can conflict with char dlopen(); below.  */
8949 #include <assert.h>
8950 /* Override any gcc2 internal prototype to avoid an error.  */
8951 /* We use char because int might match the return type of a gcc2
8952     builtin and then its argument prototype would still apply.  */
8953 char dlopen();
8954 char (*f)();
8955
8956 int main() {
8957
8958 /* The GNU C library defines this for functions which it implements
8959     to always fail with ENOSYS.  Some functions are actually named
8960     something starting with __ and the normal name is an alias.  */
8961 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8962 choke me
8963 #else
8964 f = dlopen;
8965 #endif
8966
8967 ; return 0; }
8968 EOF
8969 if { (eval echo configure:8970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8970   rm -rf conftest*
8971   eval "ac_cv_func_dlopen=yes"
8972 else
8973   echo "configure: failed program was:" >&5
8974   cat conftest.$ac_ext >&5
8975   rm -rf conftest*
8976   eval "ac_cv_func_dlopen=no"
8977 fi
8978 rm -f conftest*
8979 fi
8980
8981 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8982   echo "$ac_t""yes" 1>&6
8983   :
8984 else
8985   echo "$ac_t""no" 1>&6
8986 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8987 echo "configure:8988: checking for dlopen in -ldl" >&5
8988 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8989 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8990   echo $ac_n "(cached) $ac_c" 1>&6
8991 else
8992   ac_save_LIBS="$LIBS"
8993 LIBS="-ldl  $LIBS"
8994 cat > conftest.$ac_ext <<EOF
8995 #line 8996 "configure"
8996 #include "confdefs.h"
8997 /* Override any gcc2 internal prototype to avoid an error.  */
8998 /* We use char because int might match the return type of a gcc2
8999     builtin and then its argument prototype would still apply.  */
9000 char dlopen();
9001
9002 int main() {
9003 dlopen()
9004 ; return 0; }
9005 EOF
9006 if { (eval echo configure:9007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9007   rm -rf conftest*
9008   eval "ac_cv_lib_$ac_lib_var=yes"
9009 else
9010   echo "configure: failed program was:" >&5
9011   cat conftest.$ac_ext >&5
9012   rm -rf conftest*
9013   eval "ac_cv_lib_$ac_lib_var=no"
9014 fi
9015 rm -f conftest*
9016 LIBS="$ac_save_LIBS"
9017
9018 fi
9019 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9020   echo "$ac_t""yes" 1>&6
9021     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9022     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9023   cat >> confdefs.h <<EOF
9024 #define $ac_tr_lib 1
9025 EOF
9026
9027   LIBS="-ldl $LIBS"
9028
9029 else
9030   echo "$ac_t""no" 1>&6
9031 fi
9032
9033 fi
9034
9035
9036 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9037 echo "configure:9038: checking for sigset in -lV3" >&5
9038 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9039 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9040   echo $ac_n "(cached) $ac_c" 1>&6
9041 else
9042   ac_save_LIBS="$LIBS"
9043 LIBS="-lV3  $LIBS"
9044 cat > conftest.$ac_ext <<EOF
9045 #line 9046 "configure"
9046 #include "confdefs.h"
9047 /* Override any gcc2 internal prototype to avoid an error.  */
9048 /* We use char because int might match the return type of a gcc2
9049     builtin and then its argument prototype would still apply.  */
9050 char sigset();
9051
9052 int main() {
9053 sigset()
9054 ; return 0; }
9055 EOF
9056 if { (eval echo configure:9057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9057   rm -rf conftest*
9058   eval "ac_cv_lib_$ac_lib_var=yes"
9059 else
9060   echo "configure: failed program was:" >&5
9061   cat conftest.$ac_ext >&5
9062   rm -rf conftest*
9063   eval "ac_cv_lib_$ac_lib_var=no"
9064 fi
9065 rm -f conftest*
9066 LIBS="$ac_save_LIBS"
9067
9068 fi
9069 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9070   echo "$ac_t""yes" 1>&6
9071     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9072     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9073   cat >> confdefs.h <<EOF
9074 #define $ac_tr_lib 1
9075 EOF
9076
9077   LIBS="-lV3 $LIBS"
9078
9079 else
9080   echo "$ac_t""no" 1>&6
9081 fi
9082
9083
9084 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9085 echo "configure:9086: checking for winsock" >&5
9086 save_LIBS="$LIBS"
9087 for curlib in ws2_32 wsock32; do
9088         LIBS="$LIBS -l$curlib"
9089         cat > conftest.$ac_ext <<EOF
9090 #line 9091 "configure"
9091 #include "confdefs.h"
9092
9093                         char socket@12();
9094                         char select@20();
9095                         char closesocket@4();
9096                         char gethostname@8();
9097                         
9098 int main() {
9099
9100                         socket@12();
9101                         select@20();
9102                         closesocket@4();
9103                         gethostname@8();
9104                         
9105 ; return 0; }
9106 EOF
9107 if { (eval echo configure:9108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9108   rm -rf conftest*
9109   have_winsock=yes
9110 else
9111   echo "configure: failed program was:" >&5
9112   cat conftest.$ac_ext >&5
9113   rm -rf conftest*
9114   have_winsock=no
9115 fi
9116 rm -f conftest*
9117
9118         if test $have_winsock = yes; then
9119                 cat >> confdefs.h <<\EOF
9120 #define HAVE_WINSOCK 1
9121 EOF
9122
9123                 ac_cv_func_socket=yes
9124                 ac_cv_func_select=yes
9125                 ac_cv_func_closesocket=yes
9126                 ac_cv_func_gethostname=yes
9127                 if test $curlib = ws2_32; then
9128                         have_winsock=winsock2
9129                         cat >> confdefs.h <<\EOF
9130 #define HAVE_WINSOCK2 1
9131 EOF
9132
9133                 fi
9134                 break
9135         fi
9136         LIBS="$save_LIBS"
9137 done
9138 echo "$ac_t""$have_winsock" 1>&6
9139
9140
9141 echo $ac_n "checking for socket""... $ac_c" 1>&6
9142 echo "configure:9143: checking for socket" >&5
9143 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9144   echo $ac_n "(cached) $ac_c" 1>&6
9145 else
9146   cat > conftest.$ac_ext <<EOF
9147 #line 9148 "configure"
9148 #include "confdefs.h"
9149 /* System header to define __stub macros and hopefully few prototypes,
9150     which can conflict with char socket(); below.  */
9151 #include <assert.h>
9152 /* Override any gcc2 internal prototype to avoid an error.  */
9153 /* We use char because int might match the return type of a gcc2
9154     builtin and then its argument prototype would still apply.  */
9155 char socket();
9156 char (*f)();
9157
9158 int main() {
9159
9160 /* The GNU C library defines this for functions which it implements
9161     to always fail with ENOSYS.  Some functions are actually named
9162     something starting with __ and the normal name is an alias.  */
9163 #if defined (__stub_socket) || defined (__stub___socket)
9164 choke me
9165 #else
9166 f = socket;
9167 #endif
9168
9169 ; return 0; }
9170 EOF
9171 if { (eval echo configure:9172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9172   rm -rf conftest*
9173   eval "ac_cv_func_socket=yes"
9174 else
9175   echo "configure: failed program was:" >&5
9176   cat conftest.$ac_ext >&5
9177   rm -rf conftest*
9178   eval "ac_cv_func_socket=no"
9179 fi
9180 rm -f conftest*
9181 fi
9182
9183 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9184   echo "$ac_t""yes" 1>&6
9185   :
9186 else
9187   echo "$ac_t""no" 1>&6
9188         
9189         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9190 echo "configure:9191: checking for main in -lsocket" >&5
9191 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9192 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9193   echo $ac_n "(cached) $ac_c" 1>&6
9194 else
9195   ac_save_LIBS="$LIBS"
9196 LIBS="-lsocket  $LIBS"
9197 cat > conftest.$ac_ext <<EOF
9198 #line 9199 "configure"
9199 #include "confdefs.h"
9200
9201 int main() {
9202 main()
9203 ; return 0; }
9204 EOF
9205 if { (eval echo configure:9206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9206   rm -rf conftest*
9207   eval "ac_cv_lib_$ac_lib_var=yes"
9208 else
9209   echo "configure: failed program was:" >&5
9210   cat conftest.$ac_ext >&5
9211   rm -rf conftest*
9212   eval "ac_cv_lib_$ac_lib_var=no"
9213 fi
9214 rm -f conftest*
9215 LIBS="$ac_save_LIBS"
9216
9217 fi
9218 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9219   echo "$ac_t""yes" 1>&6
9220     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9221     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9222   cat >> confdefs.h <<EOF
9223 #define $ac_tr_lib 1
9224 EOF
9225
9226   LIBS="-lsocket $LIBS"
9227
9228 else
9229   echo "$ac_t""no" 1>&6
9230 fi
9231
9232         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9233 echo "configure:9234: checking for main in -lnet" >&5
9234 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9235 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9236   echo $ac_n "(cached) $ac_c" 1>&6
9237 else
9238   ac_save_LIBS="$LIBS"
9239 LIBS="-lnet  $LIBS"
9240 cat > conftest.$ac_ext <<EOF
9241 #line 9242 "configure"
9242 #include "confdefs.h"
9243
9244 int main() {
9245 main()
9246 ; return 0; }
9247 EOF
9248 if { (eval echo configure:9249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9249   rm -rf conftest*
9250   eval "ac_cv_lib_$ac_lib_var=yes"
9251 else
9252   echo "configure: failed program was:" >&5
9253   cat conftest.$ac_ext >&5
9254   rm -rf conftest*
9255   eval "ac_cv_lib_$ac_lib_var=no"
9256 fi
9257 rm -f conftest*
9258 LIBS="$ac_save_LIBS"
9259
9260 fi
9261 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9262   echo "$ac_t""yes" 1>&6
9263     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9264     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9265   cat >> confdefs.h <<EOF
9266 #define $ac_tr_lib 1
9267 EOF
9268
9269   LIBS="-lnet $LIBS"
9270
9271 else
9272   echo "$ac_t""no" 1>&6
9273 fi
9274
9275         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9276 echo "configure:9277: checking for main in -lnsl_s" >&5
9277 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9278 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9279   echo $ac_n "(cached) $ac_c" 1>&6
9280 else
9281   ac_save_LIBS="$LIBS"
9282 LIBS="-lnsl_s  $LIBS"
9283 cat > conftest.$ac_ext <<EOF
9284 #line 9285 "configure"
9285 #include "confdefs.h"
9286
9287 int main() {
9288 main()
9289 ; return 0; }
9290 EOF
9291 if { (eval echo configure:9292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9292   rm -rf conftest*
9293   eval "ac_cv_lib_$ac_lib_var=yes"
9294 else
9295   echo "configure: failed program was:" >&5
9296   cat conftest.$ac_ext >&5
9297   rm -rf conftest*
9298   eval "ac_cv_lib_$ac_lib_var=no"
9299 fi
9300 rm -f conftest*
9301 LIBS="$ac_save_LIBS"
9302
9303 fi
9304 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9305   echo "$ac_t""yes" 1>&6
9306     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9307     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9308   cat >> confdefs.h <<EOF
9309 #define $ac_tr_lib 1
9310 EOF
9311
9312   LIBS="-lnsl_s $LIBS"
9313
9314 else
9315   echo "$ac_t""no" 1>&6
9316 fi
9317
9318         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9319 echo "configure:9320: checking for main in -lnsl" >&5
9320 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9321 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9322   echo $ac_n "(cached) $ac_c" 1>&6
9323 else
9324   ac_save_LIBS="$LIBS"
9325 LIBS="-lnsl  $LIBS"
9326 cat > conftest.$ac_ext <<EOF
9327 #line 9328 "configure"
9328 #include "confdefs.h"
9329
9330 int main() {
9331 main()
9332 ; return 0; }
9333 EOF
9334 if { (eval echo configure:9335: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9335   rm -rf conftest*
9336   eval "ac_cv_lib_$ac_lib_var=yes"
9337 else
9338   echo "configure: failed program was:" >&5
9339   cat conftest.$ac_ext >&5
9340   rm -rf conftest*
9341   eval "ac_cv_lib_$ac_lib_var=no"
9342 fi
9343 rm -f conftest*
9344 LIBS="$ac_save_LIBS"
9345
9346 fi
9347 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9348   echo "$ac_t""yes" 1>&6
9349     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9350     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9351   cat >> confdefs.h <<EOF
9352 #define $ac_tr_lib 1
9353 EOF
9354
9355   LIBS="-lnsl $LIBS"
9356
9357 else
9358   echo "$ac_t""no" 1>&6
9359 fi
9360
9361         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9362 echo "configure:9363: checking for socket in -linet" >&5
9363 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9364 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9365   echo $ac_n "(cached) $ac_c" 1>&6
9366 else
9367   ac_save_LIBS="$LIBS"
9368 LIBS="-linet  $LIBS"
9369 cat > conftest.$ac_ext <<EOF
9370 #line 9371 "configure"
9371 #include "confdefs.h"
9372 /* Override any gcc2 internal prototype to avoid an error.  */
9373 /* We use char because int might match the return type of a gcc2
9374     builtin and then its argument prototype would still apply.  */
9375 char socket();
9376
9377 int main() {
9378 socket()
9379 ; return 0; }
9380 EOF
9381 if { (eval echo configure:9382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9382   rm -rf conftest*
9383   eval "ac_cv_lib_$ac_lib_var=yes"
9384 else
9385   echo "configure: failed program was:" >&5
9386   cat conftest.$ac_ext >&5
9387   rm -rf conftest*
9388   eval "ac_cv_lib_$ac_lib_var=no"
9389 fi
9390 rm -f conftest*
9391 LIBS="$ac_save_LIBS"
9392
9393 fi
9394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9395   echo "$ac_t""yes" 1>&6
9396     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9397     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9398   cat >> confdefs.h <<EOF
9399 #define $ac_tr_lib 1
9400 EOF
9401
9402   LIBS="-linet $LIBS"
9403
9404 else
9405   echo "$ac_t""no" 1>&6
9406 fi
9407
9408         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9409 echo "configure:9410: checking for main in -lgen" >&5
9410 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9411 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9412   echo $ac_n "(cached) $ac_c" 1>&6
9413 else
9414   ac_save_LIBS="$LIBS"
9415 LIBS="-lgen  $LIBS"
9416 cat > conftest.$ac_ext <<EOF
9417 #line 9418 "configure"
9418 #include "confdefs.h"
9419
9420 int main() {
9421 main()
9422 ; return 0; }
9423 EOF
9424 if { (eval echo configure:9425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9425   rm -rf conftest*
9426   eval "ac_cv_lib_$ac_lib_var=yes"
9427 else
9428   echo "configure: failed program was:" >&5
9429   cat conftest.$ac_ext >&5
9430   rm -rf conftest*
9431   eval "ac_cv_lib_$ac_lib_var=no"
9432 fi
9433 rm -f conftest*
9434 LIBS="$ac_save_LIBS"
9435
9436 fi
9437 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9438   echo "$ac_t""yes" 1>&6
9439     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9440     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9441   cat >> confdefs.h <<EOF
9442 #define $ac_tr_lib 1
9443 EOF
9444
9445   LIBS="-lgen $LIBS"
9446
9447 else
9448   echo "$ac_t""no" 1>&6
9449 fi
9450
9451
9452 fi
9453
9454
9455 echo $ac_n "checking for select""... $ac_c" 1>&6
9456 echo "configure:9457: checking for select" >&5
9457 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9458   echo $ac_n "(cached) $ac_c" 1>&6
9459 else
9460   cat > conftest.$ac_ext <<EOF
9461 #line 9462 "configure"
9462 #include "confdefs.h"
9463 /* System header to define __stub macros and hopefully few prototypes,
9464     which can conflict with char select(); below.  */
9465 #include <assert.h>
9466 /* Override any gcc2 internal prototype to avoid an error.  */
9467 /* We use char because int might match the return type of a gcc2
9468     builtin and then its argument prototype would still apply.  */
9469 char select();
9470 char (*f)();
9471
9472 int main() {
9473
9474 /* The GNU C library defines this for functions which it implements
9475     to always fail with ENOSYS.  Some functions are actually named
9476     something starting with __ and the normal name is an alias.  */
9477 #if defined (__stub_select) || defined (__stub___select)
9478 choke me
9479 #else
9480 f = select;
9481 #endif
9482
9483 ; return 0; }
9484 EOF
9485 if { (eval echo configure:9486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9486   rm -rf conftest*
9487   eval "ac_cv_func_select=yes"
9488 else
9489   echo "configure: failed program was:" >&5
9490   cat conftest.$ac_ext >&5
9491   rm -rf conftest*
9492   eval "ac_cv_func_select=no"
9493 fi
9494 rm -f conftest*
9495 fi
9496
9497 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9498   echo "$ac_t""yes" 1>&6
9499   :
9500 else
9501   echo "$ac_t""no" 1>&6
9502 { echo "configure: error: select() required." 1>&2; exit 1; }
9503 fi
9504
9505
9506 if test "${ac_cv_header_winsock_h}" != yes; then
9507                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9508 echo "configure:9509: checking types of arguments for select()" >&5
9509  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9510   echo $ac_n "(cached) $ac_c" 1>&6
9511 else
9512    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9513   echo $ac_n "(cached) $ac_c" 1>&6
9514 else
9515     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9516   echo $ac_n "(cached) $ac_c" 1>&6
9517 else
9518      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9519      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9520       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9521        cat > conftest.$ac_ext <<EOF
9522 #line 9523 "configure"
9523 #include "confdefs.h"
9524 #ifdef HAVE_SYS_TYPES_H
9525 #include <sys/types.h>
9526 #endif
9527 #ifdef HAVE_SYS_TIME_H
9528 #include <sys/time.h>
9529 #endif
9530 #ifdef HAVE_SYS_SELECT_H
9531 #include <sys/select.h>
9532 #endif
9533 #ifdef HAVE_SYS_SOCKET_H
9534 #include <sys/socket.h>
9535 #endif
9536 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);
9537 int main() {
9538
9539 ; return 0; }
9540 EOF
9541 if { (eval echo configure:9542: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9542   rm -rf conftest*
9543           ac_not_found=no ; break 3
9544 else
9545   echo "configure: failed program was:" >&5
9546   cat conftest.$ac_ext >&5
9547   rm -rf conftest*
9548   ac_not_found=yes
9549 fi
9550 rm -f conftest*
9551       done
9552      done
9553     done
9554    
9555 fi
9556   
9557 fi
9558  
9559 fi
9560  if test "$ac_not_found" = yes; then
9561   ac_cv_func_select_arg1=int 
9562   ac_cv_func_select_arg234='int *' 
9563   ac_cv_func_select_arg5='struct timeval *'
9564  fi
9565  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9566  cat >> confdefs.h <<EOF
9567 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9568 EOF
9569
9570  cat >> confdefs.h <<EOF
9571 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9572 EOF
9573
9574  cat >> confdefs.h <<EOF
9575 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9576 EOF
9577
9578
9579 fi
9580
9581
9582 for ac_hdr in regex.h 
9583 do
9584 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9585 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9586 echo "configure:9587: checking for $ac_hdr" >&5
9587 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9588   echo $ac_n "(cached) $ac_c" 1>&6
9589 else
9590   cat > conftest.$ac_ext <<EOF
9591 #line 9592 "configure"
9592 #include "confdefs.h"
9593 #include <$ac_hdr>
9594 EOF
9595 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9596 { (eval echo configure:9597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9597 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9598 if test -z "$ac_err"; then
9599   rm -rf conftest*
9600   eval "ac_cv_header_$ac_safe=yes"
9601 else
9602   echo "$ac_err" >&5
9603   echo "configure: failed program was:" >&5
9604   cat conftest.$ac_ext >&5
9605   rm -rf conftest*
9606   eval "ac_cv_header_$ac_safe=no"
9607 fi
9608 rm -f conftest*
9609 fi
9610 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9611   echo "$ac_t""yes" 1>&6
9612     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9613   cat >> confdefs.h <<EOF
9614 #define $ac_tr_hdr 1
9615 EOF
9616  
9617 else
9618   echo "$ac_t""no" 1>&6
9619 fi
9620 done
9621
9622 if test "$ac_cv_header_regex_h" != yes ; then
9623         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9624 fi
9625
9626 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9627 echo "configure:9628: checking for library containing regfree" >&5
9628 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9629   echo $ac_n "(cached) $ac_c" 1>&6
9630 else
9631   ac_func_search_save_LIBS="$LIBS"
9632 ac_cv_search_regfree="no"
9633 cat > conftest.$ac_ext <<EOF
9634 #line 9635 "configure"
9635 #include "confdefs.h"
9636 /* Override any gcc2 internal prototype to avoid an error.  */
9637 /* We use char because int might match the return type of a gcc2
9638     builtin and then its argument prototype would still apply.  */
9639 char regfree();
9640
9641 int main() {
9642 regfree()
9643 ; return 0; }
9644 EOF
9645 if { (eval echo configure:9646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9646   rm -rf conftest*
9647   ac_cv_search_regfree="none required"
9648 else
9649   echo "configure: failed program was:" >&5
9650   cat conftest.$ac_ext >&5
9651 fi
9652 rm -f conftest*
9653 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9654 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9655 cat > conftest.$ac_ext <<EOF
9656 #line 9657 "configure"
9657 #include "confdefs.h"
9658 /* Override any gcc2 internal prototype to avoid an error.  */
9659 /* We use char because int might match the return type of a gcc2
9660     builtin and then its argument prototype would still apply.  */
9661 char regfree();
9662
9663 int main() {
9664 regfree()
9665 ; return 0; }
9666 EOF
9667 if { (eval echo configure:9668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9668   rm -rf conftest*
9669   ac_cv_search_regfree="-l$ac_lib"
9670 break
9671 else
9672   echo "configure: failed program was:" >&5
9673   cat conftest.$ac_ext >&5
9674 fi
9675 rm -f conftest*
9676 done
9677 LIBS="$ac_func_search_save_LIBS"
9678 fi
9679
9680 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9681 if test "$ac_cv_search_regfree" != "no"; then
9682   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9683   :
9684 else :
9685   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9686 fi
9687
9688
9689 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9690 echo "configure:9691: checking for compatible POSIX regex" >&5
9691 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9692   echo $ac_n "(cached) $ac_c" 1>&6
9693 else
9694   
9695         if test "$cross_compiling" = yes; then
9696   ol_cv_c_posix_regex=cross
9697 else
9698   cat > conftest.$ac_ext <<EOF
9699 #line 9700 "configure"
9700 #include "confdefs.h"
9701
9702 #include <sys/types.h>
9703 #include <regex.h>
9704 static char *pattern, *string;
9705 main()
9706 {
9707         int rc;
9708         regex_t re;
9709
9710         pattern = "^A";
9711
9712         if(regcomp(&re, pattern, 0)) {
9713                 return -1;
9714         }
9715         
9716         string = "ALL MATCH";
9717         
9718         rc = regexec(&re, string, 0, (void*)0, 0);
9719
9720         regfree(&re);
9721
9722         return rc;
9723 }
9724 EOF
9725 if { (eval echo configure:9726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9726 then
9727   ol_cv_c_posix_regex=yes
9728 else
9729   echo "configure: failed program was:" >&5
9730   cat conftest.$ac_ext >&5
9731   rm -fr conftest*
9732   ol_cv_c_posix_regex=no
9733 fi
9734 rm -fr conftest*
9735 fi
9736
9737 fi
9738
9739 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9740
9741 if test "$ol_cv_c_posix_regex" = no ; then
9742         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9743 fi
9744
9745
9746 have_uuid=no
9747 for ac_hdr in sys/uuid.h
9748 do
9749 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9750 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9751 echo "configure:9752: checking for $ac_hdr" >&5
9752 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9753   echo $ac_n "(cached) $ac_c" 1>&6
9754 else
9755   cat > conftest.$ac_ext <<EOF
9756 #line 9757 "configure"
9757 #include "confdefs.h"
9758 #include <$ac_hdr>
9759 EOF
9760 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9761 { (eval echo configure:9762: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9762 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9763 if test -z "$ac_err"; then
9764   rm -rf conftest*
9765   eval "ac_cv_header_$ac_safe=yes"
9766 else
9767   echo "$ac_err" >&5
9768   echo "configure: failed program was:" >&5
9769   cat conftest.$ac_ext >&5
9770   rm -rf conftest*
9771   eval "ac_cv_header_$ac_safe=no"
9772 fi
9773 rm -f conftest*
9774 fi
9775 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9776   echo "$ac_t""yes" 1>&6
9777     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9778   cat >> confdefs.h <<EOF
9779 #define $ac_tr_hdr 1
9780 EOF
9781  
9782 else
9783   echo "$ac_t""no" 1>&6
9784 fi
9785 done
9786
9787 if test $ac_cv_header_sys_uuid_h = yes ; then
9788         save_LIBS="$LIBS"
9789         
9790 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9791 echo "configure:9792: checking for library containing uuid_to_str" >&5
9792 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9793   echo $ac_n "(cached) $ac_c" 1>&6
9794 else
9795   ac_func_search_save_LIBS="$LIBS"
9796 ac_cv_search_uuid_to_str="no"
9797 cat > conftest.$ac_ext <<EOF
9798 #line 9799 "configure"
9799 #include "confdefs.h"
9800 /* Override any gcc2 internal prototype to avoid an error.  */
9801 /* We use char because int might match the return type of a gcc2
9802     builtin and then its argument prototype would still apply.  */
9803 char uuid_to_str();
9804
9805 int main() {
9806 uuid_to_str()
9807 ; return 0; }
9808 EOF
9809 if { (eval echo configure:9810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9810   rm -rf conftest*
9811   ac_cv_search_uuid_to_str="none required"
9812 else
9813   echo "configure: failed program was:" >&5
9814   cat conftest.$ac_ext >&5
9815 fi
9816 rm -f conftest*
9817 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9818 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9819 cat > conftest.$ac_ext <<EOF
9820 #line 9821 "configure"
9821 #include "confdefs.h"
9822 /* Override any gcc2 internal prototype to avoid an error.  */
9823 /* We use char because int might match the return type of a gcc2
9824     builtin and then its argument prototype would still apply.  */
9825 char uuid_to_str();
9826
9827 int main() {
9828 uuid_to_str()
9829 ; return 0; }
9830 EOF
9831 if { (eval echo configure:9832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9832   rm -rf conftest*
9833   ac_cv_search_uuid_to_str="-l$ac_lib"
9834 break
9835 else
9836   echo "configure: failed program was:" >&5
9837   cat conftest.$ac_ext >&5
9838 fi
9839 rm -f conftest*
9840 done
9841 LIBS="$ac_func_search_save_LIBS"
9842 fi
9843
9844 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9845 if test "$ac_cv_search_uuid_to_str" != "no"; then
9846   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9847   have_uuid=yes
9848 else :
9849   :
9850 fi
9851         LIBS="$save_LIBS"
9852
9853         if test have_uuid = yes ; then
9854                 cat >> confdefs.h <<\EOF
9855 #define HAVE_UUID_TO_STR 1
9856 EOF
9857
9858
9859                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9860                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9861         fi
9862 fi
9863
9864 if test $have_uuid = no ; then
9865         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9866 echo "configure:9867: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9867         save_LIBS="$LIBS"
9868         LIBS="$LIBS -lrpcrt4"
9869         cat > conftest.$ac_ext <<EOF
9870 #line 9871 "configure"
9871 #include "confdefs.h"
9872
9873                 char UuidCreate@4();
9874                 char UuidToStringA@8();
9875                 
9876 int main() {
9877
9878                 UuidCreate@4();
9879                 UuidToStringA@8();
9880                 
9881 ; return 0; }
9882 EOF
9883 if { (eval echo configure:9884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9884   rm -rf conftest*
9885   need_rpcrt=yes
9886 else
9887   echo "configure: failed program was:" >&5
9888   cat conftest.$ac_ext >&5
9889   rm -rf conftest*
9890   need_rpcrt=no
9891 fi
9892 rm -f conftest*
9893         if test $need_rpcrt = yes; then
9894                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9895         fi
9896         LIBS="$save_LIBS"
9897         echo "$ac_t""$need_rpcrt" 1>&6
9898 fi
9899
9900 ol_link_dnssrv=no
9901 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9902 echo "configure:9903: checking for res_query" >&5
9903 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9904   echo $ac_n "(cached) $ac_c" 1>&6
9905 else
9906   cat > conftest.$ac_ext <<EOF
9907 #line 9908 "configure"
9908 #include "confdefs.h"
9909 /* System header to define __stub macros and hopefully few prototypes,
9910     which can conflict with char res_query(); below.  */
9911 #include <assert.h>
9912 /* Override any gcc2 internal prototype to avoid an error.  */
9913 /* We use char because int might match the return type of a gcc2
9914     builtin and then its argument prototype would still apply.  */
9915 char res_query();
9916 char (*f)();
9917
9918 int main() {
9919
9920 /* The GNU C library defines this for functions which it implements
9921     to always fail with ENOSYS.  Some functions are actually named
9922     something starting with __ and the normal name is an alias.  */
9923 #if defined (__stub_res_query) || defined (__stub___res_query)
9924 choke me
9925 #else
9926 f = res_query;
9927 #endif
9928
9929 ; return 0; }
9930 EOF
9931 if { (eval echo configure:9932: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9932   rm -rf conftest*
9933   eval "ac_cv_func_res_query=yes"
9934 else
9935   echo "configure: failed program was:" >&5
9936   cat conftest.$ac_ext >&5
9937   rm -rf conftest*
9938   eval "ac_cv_func_res_query=no"
9939 fi
9940 rm -f conftest*
9941 fi
9942
9943 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9944   echo "$ac_t""yes" 1>&6
9945   :
9946 else
9947   echo "$ac_t""no" 1>&6
9948 fi
9949
9950 if test $ac_cv_func_res_query = no ; then 
9951         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9952 echo "configure:9953: checking for __res_query" >&5
9953 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9954   echo $ac_n "(cached) $ac_c" 1>&6
9955 else
9956   cat > conftest.$ac_ext <<EOF
9957 #line 9958 "configure"
9958 #include "confdefs.h"
9959 /* System header to define __stub macros and hopefully few prototypes,
9960     which can conflict with char __res_query(); below.  */
9961 #include <assert.h>
9962 /* Override any gcc2 internal prototype to avoid an error.  */
9963 /* We use char because int might match the return type of a gcc2
9964     builtin and then its argument prototype would still apply.  */
9965 char __res_query();
9966 char (*f)();
9967
9968 int main() {
9969
9970 /* The GNU C library defines this for functions which it implements
9971     to always fail with ENOSYS.  Some functions are actually named
9972     something starting with __ and the normal name is an alias.  */
9973 #if defined (__stub___res_query) || defined (__stub_____res_query)
9974 choke me
9975 #else
9976 f = __res_query;
9977 #endif
9978
9979 ; return 0; }
9980 EOF
9981 if { (eval echo configure:9982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9982   rm -rf conftest*
9983   eval "ac_cv_func___res_query=yes"
9984 else
9985   echo "configure: failed program was:" >&5
9986   cat conftest.$ac_ext >&5
9987   rm -rf conftest*
9988   eval "ac_cv_func___res_query=no"
9989 fi
9990 rm -f conftest*
9991 fi
9992
9993 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9994   echo "$ac_t""yes" 1>&6
9995   :
9996 else
9997   echo "$ac_t""no" 1>&6
9998 fi
9999
10000         ac_cv_func_res_query=$ac_cv_func___res_query
10001 fi
10002
10003 if test $ac_cv_func_res_query = no ; then 
10004         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10005 echo "configure:10006: checking for res_query in -lbind" >&5
10006 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10007 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10008   echo $ac_n "(cached) $ac_c" 1>&6
10009 else
10010   ac_save_LIBS="$LIBS"
10011 LIBS="-lbind  $LIBS"
10012 cat > conftest.$ac_ext <<EOF
10013 #line 10014 "configure"
10014 #include "confdefs.h"
10015 /* Override any gcc2 internal prototype to avoid an error.  */
10016 /* We use char because int might match the return type of a gcc2
10017     builtin and then its argument prototype would still apply.  */
10018 char res_query();
10019
10020 int main() {
10021 res_query()
10022 ; return 0; }
10023 EOF
10024 if { (eval echo configure:10025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10025   rm -rf conftest*
10026   eval "ac_cv_lib_$ac_lib_var=yes"
10027 else
10028   echo "configure: failed program was:" >&5
10029   cat conftest.$ac_ext >&5
10030   rm -rf conftest*
10031   eval "ac_cv_lib_$ac_lib_var=no"
10032 fi
10033 rm -f conftest*
10034 LIBS="$ac_save_LIBS"
10035
10036 fi
10037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10038   echo "$ac_t""yes" 1>&6
10039     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10040     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10041   cat >> confdefs.h <<EOF
10042 #define $ac_tr_lib 1
10043 EOF
10044
10045   LIBS="-lbind $LIBS"
10046
10047 else
10048   echo "$ac_t""no" 1>&6
10049 fi
10050
10051         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10052 fi
10053
10054 if test $ac_cv_func_res_query = no ; then 
10055         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10056 echo "configure:10057: checking for __res_query in -lbind" >&5
10057 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10058 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10059   echo $ac_n "(cached) $ac_c" 1>&6
10060 else
10061   ac_save_LIBS="$LIBS"
10062 LIBS="-lbind  $LIBS"
10063 cat > conftest.$ac_ext <<EOF
10064 #line 10065 "configure"
10065 #include "confdefs.h"
10066 /* Override any gcc2 internal prototype to avoid an error.  */
10067 /* We use char because int might match the return type of a gcc2
10068     builtin and then its argument prototype would still apply.  */
10069 char __res_query();
10070
10071 int main() {
10072 __res_query()
10073 ; return 0; }
10074 EOF
10075 if { (eval echo configure:10076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10076   rm -rf conftest*
10077   eval "ac_cv_lib_$ac_lib_var=yes"
10078 else
10079   echo "configure: failed program was:" >&5
10080   cat conftest.$ac_ext >&5
10081   rm -rf conftest*
10082   eval "ac_cv_lib_$ac_lib_var=no"
10083 fi
10084 rm -f conftest*
10085 LIBS="$ac_save_LIBS"
10086
10087 fi
10088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10089   echo "$ac_t""yes" 1>&6
10090     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10091     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10092   cat >> confdefs.h <<EOF
10093 #define $ac_tr_lib 1
10094 EOF
10095
10096   LIBS="-lbind $LIBS"
10097
10098 else
10099   echo "$ac_t""no" 1>&6
10100 fi
10101
10102         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10103 fi
10104
10105 if test $ac_cv_func_res_query = no ; then 
10106         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10107 echo "configure:10108: checking for res_query in -lresolv" >&5
10108 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10109 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10110   echo $ac_n "(cached) $ac_c" 1>&6
10111 else
10112   ac_save_LIBS="$LIBS"
10113 LIBS="-lresolv  $LIBS"
10114 cat > conftest.$ac_ext <<EOF
10115 #line 10116 "configure"
10116 #include "confdefs.h"
10117 /* Override any gcc2 internal prototype to avoid an error.  */
10118 /* We use char because int might match the return type of a gcc2
10119     builtin and then its argument prototype would still apply.  */
10120 char res_query();
10121
10122 int main() {
10123 res_query()
10124 ; return 0; }
10125 EOF
10126 if { (eval echo configure:10127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10127   rm -rf conftest*
10128   eval "ac_cv_lib_$ac_lib_var=yes"
10129 else
10130   echo "configure: failed program was:" >&5
10131   cat conftest.$ac_ext >&5
10132   rm -rf conftest*
10133   eval "ac_cv_lib_$ac_lib_var=no"
10134 fi
10135 rm -f conftest*
10136 LIBS="$ac_save_LIBS"
10137
10138 fi
10139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10140   echo "$ac_t""yes" 1>&6
10141     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10142     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10143   cat >> confdefs.h <<EOF
10144 #define $ac_tr_lib 1
10145 EOF
10146
10147   LIBS="-lresolv $LIBS"
10148
10149 else
10150   echo "$ac_t""no" 1>&6
10151 fi
10152
10153         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10154 fi
10155
10156 if test $ac_cv_func_res_query = no ; then 
10157         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10158 echo "configure:10159: checking for __res_query in -lresolv" >&5
10159 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10160 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10161   echo $ac_n "(cached) $ac_c" 1>&6
10162 else
10163   ac_save_LIBS="$LIBS"
10164 LIBS="-lresolv  $LIBS"
10165 cat > conftest.$ac_ext <<EOF
10166 #line 10167 "configure"
10167 #include "confdefs.h"
10168 /* Override any gcc2 internal prototype to avoid an error.  */
10169 /* We use char because int might match the return type of a gcc2
10170     builtin and then its argument prototype would still apply.  */
10171 char __res_query();
10172
10173 int main() {
10174 __res_query()
10175 ; return 0; }
10176 EOF
10177 if { (eval echo configure:10178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10178   rm -rf conftest*
10179   eval "ac_cv_lib_$ac_lib_var=yes"
10180 else
10181   echo "configure: failed program was:" >&5
10182   cat conftest.$ac_ext >&5
10183   rm -rf conftest*
10184   eval "ac_cv_lib_$ac_lib_var=no"
10185 fi
10186 rm -f conftest*
10187 LIBS="$ac_save_LIBS"
10188
10189 fi
10190 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10191   echo "$ac_t""yes" 1>&6
10192     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10193     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10194   cat >> confdefs.h <<EOF
10195 #define $ac_tr_lib 1
10196 EOF
10197
10198   LIBS="-lresolv $LIBS"
10199
10200 else
10201   echo "$ac_t""no" 1>&6
10202 fi
10203
10204         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10205 fi
10206
10207 if test "$ac_cv_func_res_query" = yes ; then
10208         cat >> confdefs.h <<\EOF
10209 #define HAVE_RES_QUERY 1
10210 EOF
10211
10212
10213         if test $ol_enable_dnssrv != no ; then
10214                 ol_link_dnssrv=yes
10215         fi
10216 fi
10217
10218 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10219         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10220 fi
10221
10222 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10223 do
10224 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10225 echo "configure:10226: checking for $ac_func" >&5
10226 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10227   echo $ac_n "(cached) $ac_c" 1>&6
10228 else
10229   cat > conftest.$ac_ext <<EOF
10230 #line 10231 "configure"
10231 #include "confdefs.h"
10232 /* System header to define __stub macros and hopefully few prototypes,
10233     which can conflict with char $ac_func(); below.  */
10234 #include <assert.h>
10235 /* Override any gcc2 internal prototype to avoid an error.  */
10236 /* We use char because int might match the return type of a gcc2
10237     builtin and then its argument prototype would still apply.  */
10238 char $ac_func();
10239 char (*f)();
10240
10241 int main() {
10242
10243 /* The GNU C library defines this for functions which it implements
10244     to always fail with ENOSYS.  Some functions are actually named
10245     something starting with __ and the normal name is an alias.  */
10246 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10247 choke me
10248 #else
10249 f = $ac_func;
10250 #endif
10251
10252 ; return 0; }
10253 EOF
10254 if { (eval echo configure:10255: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10255   rm -rf conftest*
10256   eval "ac_cv_func_$ac_func=yes"
10257 else
10258   echo "configure: failed program was:" >&5
10259   cat conftest.$ac_ext >&5
10260   rm -rf conftest*
10261   eval "ac_cv_func_$ac_func=no"
10262 fi
10263 rm -f conftest*
10264 fi
10265
10266 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10267   echo "$ac_t""yes" 1>&6
10268     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10269   cat >> confdefs.h <<EOF
10270 #define $ac_tr_func 1
10271 EOF
10272  
10273 else
10274   echo "$ac_t""no" 1>&6
10275 fi
10276 done
10277
10278
10279 ol_link_ipv6=no
10280 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10281         if test $ol_enable_ipv6 = yes ; then
10282                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10283         fi
10284 elif test $ol_enable_ipv6 != no ; then
10285         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10286 echo "configure:10287: checking INET6_ADDRSTRLEN" >&5
10287 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10288   echo $ac_n "(cached) $ac_c" 1>&6
10289 else
10290   
10291                 cat > conftest.$ac_ext <<EOF
10292 #line 10293 "configure"
10293 #include "confdefs.h"
10294
10295 #                       include <netinet/in.h>
10296 #                       ifdef INET6_ADDRSTRLEN
10297                                 __has_inet6_addrstrlen__;
10298 #                       endif
10299                 
10300 EOF
10301 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10302   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10303   rm -rf conftest*
10304   ol_cv_inet6_addrstrlen=yes
10305 else
10306   rm -rf conftest*
10307   ol_cv_inet6_addrstrlen=no
10308 fi
10309 rm -f conftest*
10310
10311 fi
10312
10313 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10314
10315
10316         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10317 echo "configure:10318: checking struct sockaddr_storage" >&5
10318 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10319   echo $ac_n "(cached) $ac_c" 1>&6
10320 else
10321   
10322                 cat > conftest.$ac_ext <<EOF
10323 #line 10324 "configure"
10324 #include "confdefs.h"
10325
10326 #include <sys/types.h>
10327 #include <sys/socket.h>
10328
10329 int main() {
10330
10331                         struct sockaddr_storage ss;
10332
10333 ; return 0; }
10334 EOF
10335 if { (eval echo configure:10336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10336   rm -rf conftest*
10337   ol_cv_struct_sockaddr_storage=yes
10338 else
10339   echo "configure: failed program was:" >&5
10340   cat conftest.$ac_ext >&5
10341   rm -rf conftest*
10342   ol_cv_struct_sockaddr_storage=no
10343 fi
10344 rm -f conftest*
10345 fi
10346
10347 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10348
10349         if test $ol_cv_inet6_addrstrlen = yes \
10350                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10351                 ol_link_ipv6=yes
10352         elif test $ol_enable_ipv6 = yes \
10353                         -a $ol_cv_inet6_addrstrlen = no ; then
10354                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10355         elif test $ol_enable_ipv6 = yes \
10356                         -a $ol_cv_struct_sockaddr_storage = no ; then
10357                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10358         fi
10359 fi
10360
10361 if test $ol_enable_local != no ; then
10362         for ac_hdr in sys/un.h 
10363 do
10364 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10365 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10366 echo "configure:10367: checking for $ac_hdr" >&5
10367 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10368   echo $ac_n "(cached) $ac_c" 1>&6
10369 else
10370   cat > conftest.$ac_ext <<EOF
10371 #line 10372 "configure"
10372 #include "confdefs.h"
10373 #include <$ac_hdr>
10374 EOF
10375 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10376 { (eval echo configure:10377: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10377 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10378 if test -z "$ac_err"; then
10379   rm -rf conftest*
10380   eval "ac_cv_header_$ac_safe=yes"
10381 else
10382   echo "$ac_err" >&5
10383   echo "configure: failed program was:" >&5
10384   cat conftest.$ac_ext >&5
10385   rm -rf conftest*
10386   eval "ac_cv_header_$ac_safe=no"
10387 fi
10388 rm -f conftest*
10389 fi
10390 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10391   echo "$ac_t""yes" 1>&6
10392     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10393   cat >> confdefs.h <<EOF
10394 #define $ac_tr_hdr 1
10395 EOF
10396  
10397 else
10398   echo "$ac_t""no" 1>&6
10399 fi
10400 done
10401
10402
10403         if test $ol_enable_local = auto ; then
10404                 ol_enable_local=$ac_cv_header_sys_un_h
10405         elif test $ac_cv_header_sys_un_h = no ; then
10406                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10407         fi
10408 fi
10409
10410 ol_link_kbind=no
10411 ol_link_kpasswd=no
10412 ol_link_krb5=no
10413 ol_link_krb4=no
10414
10415 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10416         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10417         -o $ol_with_kerberos = k425 ; then
10418
10419         for ac_hdr in krb5.h
10420 do
10421 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10422 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10423 echo "configure:10424: checking for $ac_hdr" >&5
10424 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10425   echo $ac_n "(cached) $ac_c" 1>&6
10426 else
10427   cat > conftest.$ac_ext <<EOF
10428 #line 10429 "configure"
10429 #include "confdefs.h"
10430 #include <$ac_hdr>
10431 EOF
10432 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10433 { (eval echo configure:10434: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10434 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10435 if test -z "$ac_err"; then
10436   rm -rf conftest*
10437   eval "ac_cv_header_$ac_safe=yes"
10438 else
10439   echo "$ac_err" >&5
10440   echo "configure: failed program was:" >&5
10441   cat conftest.$ac_ext >&5
10442   rm -rf conftest*
10443   eval "ac_cv_header_$ac_safe=no"
10444 fi
10445 rm -f conftest*
10446 fi
10447 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10448   echo "$ac_t""yes" 1>&6
10449     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10450   cat >> confdefs.h <<EOF
10451 #define $ac_tr_hdr 1
10452 EOF
10453  
10454 else
10455   echo "$ac_t""no" 1>&6
10456 fi
10457 done
10458
10459
10460         if test $ac_cv_header_krb5_h = yes ; then
10461                                 for ac_hdr in heim_err.h
10462 do
10463 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10464 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10465 echo "configure:10466: checking for $ac_hdr" >&5
10466 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10467   echo $ac_n "(cached) $ac_c" 1>&6
10468 else
10469   cat > conftest.$ac_ext <<EOF
10470 #line 10471 "configure"
10471 #include "confdefs.h"
10472 #include <$ac_hdr>
10473 EOF
10474 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10475 { (eval echo configure:10476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10476 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10477 if test -z "$ac_err"; then
10478   rm -rf conftest*
10479   eval "ac_cv_header_$ac_safe=yes"
10480 else
10481   echo "$ac_err" >&5
10482   echo "configure: failed program was:" >&5
10483   cat conftest.$ac_ext >&5
10484   rm -rf conftest*
10485   eval "ac_cv_header_$ac_safe=no"
10486 fi
10487 rm -f conftest*
10488 fi
10489 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10490   echo "$ac_t""yes" 1>&6
10491     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10492   cat >> confdefs.h <<EOF
10493 #define $ac_tr_hdr 1
10494 EOF
10495  
10496 else
10497   echo "$ac_t""no" 1>&6
10498 fi
10499 done
10500
10501                 if test $ac_cv_header_heim_err_h = yes ; then
10502                         krb5_impl=heimdal
10503                 else
10504                         krb5_impl=mit
10505                 fi
10506
10507                 if test $krb5_impl = mit; then
10508                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10509 echo "configure:10510: checking for main in -lk5crypto" >&5
10510 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10511 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10512   echo $ac_n "(cached) $ac_c" 1>&6
10513 else
10514   ac_save_LIBS="$LIBS"
10515 LIBS="-lk5crypto  $LIBS"
10516 cat > conftest.$ac_ext <<EOF
10517 #line 10518 "configure"
10518 #include "confdefs.h"
10519
10520 int main() {
10521 main()
10522 ; return 0; }
10523 EOF
10524 if { (eval echo configure:10525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10525   rm -rf conftest*
10526   eval "ac_cv_lib_$ac_lib_var=yes"
10527 else
10528   echo "configure: failed program was:" >&5
10529   cat conftest.$ac_ext >&5
10530   rm -rf conftest*
10531   eval "ac_cv_lib_$ac_lib_var=no"
10532 fi
10533 rm -f conftest*
10534 LIBS="$ac_save_LIBS"
10535
10536 fi
10537 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10538   echo "$ac_t""yes" 1>&6
10539   krb5crypto=k5crypto
10540 else
10541   echo "$ac_t""no" 1>&6
10542 krb5crypto=crypto
10543 fi
10544
10545
10546                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10547 echo "configure:10548: checking for main in -lkrb5" >&5
10548 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10549 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10550   echo $ac_n "(cached) $ac_c" 1>&6
10551 else
10552   ac_save_LIBS="$LIBS"
10553 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10554 cat > conftest.$ac_ext <<EOF
10555 #line 10556 "configure"
10556 #include "confdefs.h"
10557
10558 int main() {
10559 main()
10560 ; return 0; }
10561 EOF
10562 if { (eval echo configure:10563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10563   rm -rf conftest*
10564   eval "ac_cv_lib_$ac_lib_var=yes"
10565 else
10566   echo "configure: failed program was:" >&5
10567   cat conftest.$ac_ext >&5
10568   rm -rf conftest*
10569   eval "ac_cv_lib_$ac_lib_var=no"
10570 fi
10571 rm -f conftest*
10572 LIBS="$ac_save_LIBS"
10573
10574 fi
10575 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10576   echo "$ac_t""yes" 1>&6
10577   have_krb5=yes
10578                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10579 else
10580   echo "$ac_t""no" 1>&6
10581 have_krb5=no
10582 fi
10583
10584
10585                 elif test $krb5_impl = heimdal; then
10586                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10587 echo "configure:10588: checking for main in -ldes" >&5
10588 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10589 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10590   echo $ac_n "(cached) $ac_c" 1>&6
10591 else
10592   ac_save_LIBS="$LIBS"
10593 LIBS="-ldes  $LIBS"
10594 cat > conftest.$ac_ext <<EOF
10595 #line 10596 "configure"
10596 #include "confdefs.h"
10597
10598 int main() {
10599 main()
10600 ; return 0; }
10601 EOF
10602 if { (eval echo configure:10603: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10603   rm -rf conftest*
10604   eval "ac_cv_lib_$ac_lib_var=yes"
10605 else
10606   echo "configure: failed program was:" >&5
10607   cat conftest.$ac_ext >&5
10608   rm -rf conftest*
10609   eval "ac_cv_lib_$ac_lib_var=no"
10610 fi
10611 rm -f conftest*
10612 LIBS="$ac_save_LIBS"
10613
10614 fi
10615 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10616   echo "$ac_t""yes" 1>&6
10617   krb5crypto=des
10618 else
10619   echo "$ac_t""no" 1>&6
10620 krb5crypto=crypto
10621 fi
10622
10623
10624                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10625 echo "configure:10626: checking for main in -lkrb5" >&5
10626 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10627 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10628   echo $ac_n "(cached) $ac_c" 1>&6
10629 else
10630   ac_save_LIBS="$LIBS"
10631 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10632 cat > conftest.$ac_ext <<EOF
10633 #line 10634 "configure"
10634 #include "confdefs.h"
10635
10636 int main() {
10637 main()
10638 ; return 0; }
10639 EOF
10640 if { (eval echo configure:10641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10641   rm -rf conftest*
10642   eval "ac_cv_lib_$ac_lib_var=yes"
10643 else
10644   echo "configure: failed program was:" >&5
10645   cat conftest.$ac_ext >&5
10646   rm -rf conftest*
10647   eval "ac_cv_lib_$ac_lib_var=no"
10648 fi
10649 rm -f conftest*
10650 LIBS="$ac_save_LIBS"
10651
10652 fi
10653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10654   echo "$ac_t""yes" 1>&6
10655   have_krb5=yes
10656                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10657 else
10658   echo "$ac_t""no" 1>&6
10659 have_krb5=no
10660 fi
10661
10662
10663                         cat >> confdefs.h <<\EOF
10664 #define HAVE_HEIMDAL_KERBEROS 1
10665 EOF
10666
10667
10668                 else
10669                         have_krb5=no
10670                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10671                 fi
10672
10673                 if test $have_krb5 = yes ; then
10674                         ol_link_krb5=yes
10675
10676                         cat >> confdefs.h <<\EOF
10677 #define HAVE_KRB5 1
10678 EOF
10679
10680
10681                         if test $ol_enable_kpasswd != no ; then
10682                                 ol_link_kpasswd=yes;
10683                         fi
10684
10685                         if test $ol_with_kerberos = k5only ; then
10686                                 ol_with_kerberos=found
10687                         fi
10688
10689                 elif test $ol_with_kerberos != auto ; then
10690                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10691                 fi
10692
10693         fi
10694 fi
10695
10696 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10697         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10698
10699         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10700 do
10701 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10702 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10703 echo "configure:10704: checking for $ac_hdr" >&5
10704 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10705   echo $ac_n "(cached) $ac_c" 1>&6
10706 else
10707   cat > conftest.$ac_ext <<EOF
10708 #line 10709 "configure"
10709 #include "confdefs.h"
10710 #include <$ac_hdr>
10711 EOF
10712 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10713 { (eval echo configure:10714: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10714 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10715 if test -z "$ac_err"; then
10716   rm -rf conftest*
10717   eval "ac_cv_header_$ac_safe=yes"
10718 else
10719   echo "$ac_err" >&5
10720   echo "configure: failed program was:" >&5
10721   cat conftest.$ac_ext >&5
10722   rm -rf conftest*
10723   eval "ac_cv_header_$ac_safe=no"
10724 fi
10725 rm -f conftest*
10726 fi
10727 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10728   echo "$ac_t""yes" 1>&6
10729     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10730   cat >> confdefs.h <<EOF
10731 #define $ac_tr_hdr 1
10732 EOF
10733  
10734 else
10735   echo "$ac_t""no" 1>&6
10736 fi
10737 done
10738
10739
10740         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10741                 if test $krb5_impl = mit; then
10742                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10743 echo "configure:10744: checking for main in -lkrb4" >&5
10744 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10745 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10746   echo $ac_n "(cached) $ac_c" 1>&6
10747 else
10748   ac_save_LIBS="$LIBS"
10749 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10750 cat > conftest.$ac_ext <<EOF
10751 #line 10752 "configure"
10752 #include "confdefs.h"
10753
10754 int main() {
10755 main()
10756 ; return 0; }
10757 EOF
10758 if { (eval echo configure:10759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10759   rm -rf conftest*
10760   eval "ac_cv_lib_$ac_lib_var=yes"
10761 else
10762   echo "configure: failed program was:" >&5
10763   cat conftest.$ac_ext >&5
10764   rm -rf conftest*
10765   eval "ac_cv_lib_$ac_lib_var=no"
10766 fi
10767 rm -f conftest*
10768 LIBS="$ac_save_LIBS"
10769
10770 fi
10771 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10772   echo "$ac_t""yes" 1>&6
10773   have_k425=yes
10774                                 KRB4_LIBS="-lkrb4 -ldes425"
10775 else
10776   echo "$ac_t""no" 1>&6
10777 have_k425=no
10778 fi
10779
10780
10781                 elif test $krb5_impl = heimdal; then
10782                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10783 echo "configure:10784: checking for main in -lkrb4" >&5
10784 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10785 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10786   echo $ac_n "(cached) $ac_c" 1>&6
10787 else
10788   ac_save_LIBS="$LIBS"
10789 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10790 cat > conftest.$ac_ext <<EOF
10791 #line 10792 "configure"
10792 #include "confdefs.h"
10793
10794 int main() {
10795 main()
10796 ; return 0; }
10797 EOF
10798 if { (eval echo configure:10799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10799   rm -rf conftest*
10800   eval "ac_cv_lib_$ac_lib_var=yes"
10801 else
10802   echo "configure: failed program was:" >&5
10803   cat conftest.$ac_ext >&5
10804   rm -rf conftest*
10805   eval "ac_cv_lib_$ac_lib_var=no"
10806 fi
10807 rm -f conftest*
10808 LIBS="$ac_save_LIBS"
10809
10810 fi
10811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10812   echo "$ac_t""yes" 1>&6
10813   have_k425=yes
10814                                 KRB4_LIBS="-lkrb4"
10815 else
10816   echo "$ac_t""no" 1>&6
10817 have_k425=no
10818 fi
10819
10820
10821                 else
10822                         have_425=no
10823                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10824                 fi
10825
10826                 if test $have_k425 = yes ; then
10827                         ol_with_kerberos=found
10828                         ol_link_krb4=yes
10829
10830                         cat >> confdefs.h <<\EOF
10831 #define HAVE_KRB425 1
10832 EOF
10833
10834                         cat >> confdefs.h <<\EOF
10835 #define HAVE_KRB4 1
10836 EOF
10837
10838
10839                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10840 echo "configure:10841: checking for des_debug in Kerberos libraries" >&5
10841 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10842   echo $ac_n "(cached) $ac_c" 1>&6
10843 else
10844   
10845                                                                 save_LIBS="$LIBS"
10846                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10847                                 cat > conftest.$ac_ext <<EOF
10848 #line 10849 "configure"
10849 #include "confdefs.h"
10850
10851 #include <kerberosIV/krb.h>
10852 #include <kerberosIV/des.h>
10853 extern int des_debug;
10854
10855 int main() {
10856
10857 des_debug = 1;
10858
10859 ; return 0; }
10860 EOF
10861 if { (eval echo configure:10862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10862   rm -rf conftest*
10863   ol_cv_var_des_debug=yes
10864 else
10865   echo "configure: failed program was:" >&5
10866   cat conftest.$ac_ext >&5
10867   rm -rf conftest*
10868   ol_cv_var_des_debug=no
10869 fi
10870 rm -f conftest*
10871                                                                 LIBS="$save_LIBS"
10872                         
10873 fi
10874
10875 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10876
10877                         if test $ol_cv_var_des_debug = yes ; then
10878                                 cat >> confdefs.h <<\EOF
10879 #define HAVE_DES_DEBUG 1
10880 EOF
10881
10882                         fi
10883
10884                         LIBS="$save_LIBS"
10885                 fi
10886         fi
10887 fi
10888
10889 if test $ol_link_krb5 = yes ; then
10890         ol_with_kerberos=found
10891 fi
10892
10893 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10894         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10895
10896         for ac_hdr in krb.h des.h krb-archaeology.h 
10897 do
10898 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10899 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10900 echo "configure:10901: checking for $ac_hdr" >&5
10901 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10902   echo $ac_n "(cached) $ac_c" 1>&6
10903 else
10904   cat > conftest.$ac_ext <<EOF
10905 #line 10906 "configure"
10906 #include "confdefs.h"
10907 #include <$ac_hdr>
10908 EOF
10909 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10910 { (eval echo configure:10911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10911 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10912 if test -z "$ac_err"; then
10913   rm -rf conftest*
10914   eval "ac_cv_header_$ac_safe=yes"
10915 else
10916   echo "$ac_err" >&5
10917   echo "configure: failed program was:" >&5
10918   cat conftest.$ac_ext >&5
10919   rm -rf conftest*
10920   eval "ac_cv_header_$ac_safe=no"
10921 fi
10922 rm -f conftest*
10923 fi
10924 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10925   echo "$ac_t""yes" 1>&6
10926     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10927   cat >> confdefs.h <<EOF
10928 #define $ac_tr_hdr 1
10929 EOF
10930  
10931 else
10932   echo "$ac_t""no" 1>&6
10933 fi
10934 done
10935
10936
10937         if test $ac_cv_header_krb_h = yes ; then
10938                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10939 echo "configure:10940: checking for main in -lkrb" >&5
10940 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10941 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10942   echo $ac_n "(cached) $ac_c" 1>&6
10943 else
10944   ac_save_LIBS="$LIBS"
10945 LIBS="-lkrb -ldes $LIBS"
10946 cat > conftest.$ac_ext <<EOF
10947 #line 10948 "configure"
10948 #include "confdefs.h"
10949
10950 int main() {
10951 main()
10952 ; return 0; }
10953 EOF
10954 if { (eval echo configure:10955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10955   rm -rf conftest*
10956   eval "ac_cv_lib_$ac_lib_var=yes"
10957 else
10958   echo "configure: failed program was:" >&5
10959   cat conftest.$ac_ext >&5
10960   rm -rf conftest*
10961   eval "ac_cv_lib_$ac_lib_var=no"
10962 fi
10963 rm -f conftest*
10964 LIBS="$ac_save_LIBS"
10965
10966 fi
10967 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10968   echo "$ac_t""yes" 1>&6
10969   have_k4=yes
10970 else
10971   echo "$ac_t""no" 1>&6
10972 have_k4=no
10973 fi
10974
10975
10976                 if test $have_k4 = yes ; then
10977                         ol_with_kerberos=found
10978                         ol_link_krb4=yes
10979
10980                         cat >> confdefs.h <<\EOF
10981 #define HAVE_KRB4 1
10982 EOF
10983
10984
10985                         KRB4_LIBS="-lkrb -ldes"
10986
10987                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10988                                 cat >> confdefs.h <<\EOF
10989 #define HAVE_KTH_KERBEROS 1
10990 EOF
10991
10992                         fi
10993                 fi
10994         fi
10995 fi
10996
10997 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10998         ol_link_kpasswd=yes
10999 fi
11000
11001 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11002         ol_link_kbind=yes
11003
11004 elif test $ol_enable_kbind = yes ; then
11005         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11006 fi
11007
11008 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11009         cat >> confdefs.h <<\EOF
11010 #define HAVE_KERBEROS 1
11011 EOF
11012
11013
11014 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11015         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11016 fi
11017
11018 ol_link_tls=no
11019 if test $ol_with_tls != no ; then
11020         for ac_hdr in openssl/ssl.h ssl.h
11021 do
11022 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11023 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11024 echo "configure:11025: checking for $ac_hdr" >&5
11025 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11026   echo $ac_n "(cached) $ac_c" 1>&6
11027 else
11028   cat > conftest.$ac_ext <<EOF
11029 #line 11030 "configure"
11030 #include "confdefs.h"
11031 #include <$ac_hdr>
11032 EOF
11033 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11034 { (eval echo configure:11035: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11035 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11036 if test -z "$ac_err"; then
11037   rm -rf conftest*
11038   eval "ac_cv_header_$ac_safe=yes"
11039 else
11040   echo "$ac_err" >&5
11041   echo "configure: failed program was:" >&5
11042   cat conftest.$ac_ext >&5
11043   rm -rf conftest*
11044   eval "ac_cv_header_$ac_safe=no"
11045 fi
11046 rm -f conftest*
11047 fi
11048 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11049   echo "$ac_t""yes" 1>&6
11050     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11051   cat >> confdefs.h <<EOF
11052 #define $ac_tr_hdr 1
11053 EOF
11054  
11055 else
11056   echo "$ac_t""no" 1>&6
11057 fi
11058 done
11059
11060         
11061         if test $ac_cv_header_openssl_ssl_h = yes \
11062                 -o $ac_cv_header_ssl_h = yes ; then
11063                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11064 echo "configure:11065: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11065 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11066 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11067   echo $ac_n "(cached) $ac_c" 1>&6
11068 else
11069   ac_save_LIBS="$LIBS"
11070 LIBS="-lssl -lcrypto $LIBS"
11071 cat > conftest.$ac_ext <<EOF
11072 #line 11073 "configure"
11073 #include "confdefs.h"
11074 /* Override any gcc2 internal prototype to avoid an error.  */
11075 /* We use char because int might match the return type of a gcc2
11076     builtin and then its argument prototype would still apply.  */
11077 char SSLeay_add_ssl_algorithms();
11078
11079 int main() {
11080 SSLeay_add_ssl_algorithms()
11081 ; return 0; }
11082 EOF
11083 if { (eval echo configure:11084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11084   rm -rf conftest*
11085   eval "ac_cv_lib_$ac_lib_var=yes"
11086 else
11087   echo "configure: failed program was:" >&5
11088   cat conftest.$ac_ext >&5
11089   rm -rf conftest*
11090   eval "ac_cv_lib_$ac_lib_var=no"
11091 fi
11092 rm -f conftest*
11093 LIBS="$ac_save_LIBS"
11094
11095 fi
11096 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11097   echo "$ac_t""yes" 1>&6
11098   have_ssleay=yes
11099                         need_rsaref=no
11100 else
11101   echo "$ac_t""no" 1>&6
11102 have_ssleay=no
11103 fi
11104
11105                         
11106                 if test $have_ssleay = no ; then
11107                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11108 echo "configure:11109: checking for SSL_library_init in -lssl" >&5
11109 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11110 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11111   echo $ac_n "(cached) $ac_c" 1>&6
11112 else
11113   ac_save_LIBS="$LIBS"
11114 LIBS="-lssl -lcrypto $LIBS"
11115 cat > conftest.$ac_ext <<EOF
11116 #line 11117 "configure"
11117 #include "confdefs.h"
11118 /* Override any gcc2 internal prototype to avoid an error.  */
11119 /* We use char because int might match the return type of a gcc2
11120     builtin and then its argument prototype would still apply.  */
11121 char SSL_library_init();
11122
11123 int main() {
11124 SSL_library_init()
11125 ; return 0; }
11126 EOF
11127 if { (eval echo configure:11128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11128   rm -rf conftest*
11129   eval "ac_cv_lib_$ac_lib_var=yes"
11130 else
11131   echo "configure: failed program was:" >&5
11132   cat conftest.$ac_ext >&5
11133   rm -rf conftest*
11134   eval "ac_cv_lib_$ac_lib_var=no"
11135 fi
11136 rm -f conftest*
11137 LIBS="$ac_save_LIBS"
11138
11139 fi
11140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11141   echo "$ac_t""yes" 1>&6
11142   have_ssleay=yes
11143                                 need_rsaref=no
11144 else
11145   echo "$ac_t""no" 1>&6
11146 have_ssleay=no
11147 fi
11148
11149                 fi
11150
11151                 if test $have_ssleay = no ; then
11152                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11153 echo "configure:11154: checking for ssl3_accept in -lssl" >&5
11154 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11155 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11156   echo $ac_n "(cached) $ac_c" 1>&6
11157 else
11158   ac_save_LIBS="$LIBS"
11159 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11160 cat > conftest.$ac_ext <<EOF
11161 #line 11162 "configure"
11162 #include "confdefs.h"
11163 /* Override any gcc2 internal prototype to avoid an error.  */
11164 /* We use char because int might match the return type of a gcc2
11165     builtin and then its argument prototype would still apply.  */
11166 char ssl3_accept();
11167
11168 int main() {
11169 ssl3_accept()
11170 ; return 0; }
11171 EOF
11172 if { (eval echo configure:11173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11173   rm -rf conftest*
11174   eval "ac_cv_lib_$ac_lib_var=yes"
11175 else
11176   echo "configure: failed program was:" >&5
11177   cat conftest.$ac_ext >&5
11178   rm -rf conftest*
11179   eval "ac_cv_lib_$ac_lib_var=no"
11180 fi
11181 rm -f conftest*
11182 LIBS="$ac_save_LIBS"
11183
11184 fi
11185 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11186   echo "$ac_t""yes" 1>&6
11187   have_ssleay=yes
11188                                 need_rsaref=yes
11189 else
11190   echo "$ac_t""no" 1>&6
11191 have_ssleay=no
11192 fi
11193
11194                 fi
11195
11196                 if test $have_ssleay = yes ; then
11197                         ol_with_tls=found
11198                         ol_link_tls=yes
11199
11200                         cat >> confdefs.h <<\EOF
11201 #define HAVE_SSLEAY 1
11202 EOF
11203
11204
11205                         if test $need_rsaref = yes; then
11206                                 cat >> confdefs.h <<\EOF
11207 #define HAVE_RSAREF 1
11208 EOF
11209
11210
11211                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11212                         else
11213                                 TLS_LIBS="-lssl -lcrypto"
11214                         fi
11215                 fi
11216         fi
11217
11218 else
11219         echo "configure: warning: TLS data protection not supported!" 1>&2
11220 fi
11221
11222 WITH_TLS=no
11223 if test $ol_link_tls = yes ; then
11224         cat >> confdefs.h <<\EOF
11225 #define HAVE_TLS 1
11226 EOF
11227
11228         WITH_TLS=yes
11229
11230 elif test $ol_with_tls = auto ; then
11231         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11232         echo "configure: warning: TLS data protection not supported!" 1>&2
11233
11234 elif test $ol_with_tls != no ; then
11235         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11236 fi
11237
11238 if test $ol_enable_lmpasswd != no; then
11239         if test $ol_link_tls != yes ; then
11240                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11241         fi
11242
11243         cat >> confdefs.h <<\EOF
11244 #define SLAPD_LMHASH 1
11245 EOF
11246
11247 fi
11248
11249 ol_link_threads=no
11250
11251 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11252         -o $ol_with_threads = nt ; then
11253
11254         
11255         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11256 echo "configure:11257: checking for _beginthread" >&5
11257 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11258   echo $ac_n "(cached) $ac_c" 1>&6
11259 else
11260   cat > conftest.$ac_ext <<EOF
11261 #line 11262 "configure"
11262 #include "confdefs.h"
11263 /* System header to define __stub macros and hopefully few prototypes,
11264     which can conflict with char _beginthread(); below.  */
11265 #include <assert.h>
11266 /* Override any gcc2 internal prototype to avoid an error.  */
11267 /* We use char because int might match the return type of a gcc2
11268     builtin and then its argument prototype would still apply.  */
11269 char _beginthread();
11270 char (*f)();
11271
11272 int main() {
11273
11274 /* The GNU C library defines this for functions which it implements
11275     to always fail with ENOSYS.  Some functions are actually named
11276     something starting with __ and the normal name is an alias.  */
11277 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11278 choke me
11279 #else
11280 f = _beginthread;
11281 #endif
11282
11283 ; return 0; }
11284 EOF
11285 if { (eval echo configure:11286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11286   rm -rf conftest*
11287   eval "ac_cv_func__beginthread=yes"
11288 else
11289   echo "configure: failed program was:" >&5
11290   cat conftest.$ac_ext >&5
11291   rm -rf conftest*
11292   eval "ac_cv_func__beginthread=no"
11293 fi
11294 rm -f conftest*
11295 fi
11296
11297 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11298   echo "$ac_t""yes" 1>&6
11299   :
11300 else
11301   echo "$ac_t""no" 1>&6
11302 fi
11303
11304
11305         if test $ac_cv_func__beginthread = yes ; then
11306                 cat >> confdefs.h <<\EOF
11307 #define HAVE_NT_THREADS 1
11308 EOF
11309
11310                 ol_cv_nt_threads=yes
11311         fi
11312
11313
11314         if test "$ol_cv_nt_threads" = yes ; then
11315                 ol_link_threads=nt
11316                 ol_with_threads=found
11317                 ol_with_yielding_select=yes
11318
11319                 cat >> confdefs.h <<\EOF
11320 #define HAVE_NT_SERVICE_MANAGER 1
11321 EOF
11322
11323                 cat >> confdefs.h <<\EOF
11324 #define HAVE_NT_EVENT_LOG 1
11325 EOF
11326
11327         fi
11328
11329         if test $ol_with_threads = nt ; then
11330                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11331         fi
11332 fi
11333
11334 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11335         -o $ol_with_threads = posix ; then
11336
11337         for ac_hdr in pthread.h
11338 do
11339 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11340 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11341 echo "configure:11342: checking for $ac_hdr" >&5
11342 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11343   echo $ac_n "(cached) $ac_c" 1>&6
11344 else
11345   cat > conftest.$ac_ext <<EOF
11346 #line 11347 "configure"
11347 #include "confdefs.h"
11348 #include <$ac_hdr>
11349 EOF
11350 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11351 { (eval echo configure:11352: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11352 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11353 if test -z "$ac_err"; then
11354   rm -rf conftest*
11355   eval "ac_cv_header_$ac_safe=yes"
11356 else
11357   echo "$ac_err" >&5
11358   echo "configure: failed program was:" >&5
11359   cat conftest.$ac_ext >&5
11360   rm -rf conftest*
11361   eval "ac_cv_header_$ac_safe=no"
11362 fi
11363 rm -f conftest*
11364 fi
11365 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11366   echo "$ac_t""yes" 1>&6
11367     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11368   cat >> confdefs.h <<EOF
11369 #define $ac_tr_hdr 1
11370 EOF
11371  
11372 else
11373   echo "$ac_t""no" 1>&6
11374 fi
11375 done
11376
11377
11378         if test $ac_cv_header_pthread_h = yes ; then
11379                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11380 echo "configure:11381: checking POSIX thread version" >&5
11381 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11382   echo $ac_n "(cached) $ac_c" 1>&6
11383 else
11384   
11385         cat > conftest.$ac_ext <<EOF
11386 #line 11387 "configure"
11387 #include "confdefs.h"
11388
11389 #               include <pthread.h>
11390         
11391 int main() {
11392
11393                 int i = PTHREAD_CREATE_JOINABLE;
11394         
11395 ; return 0; }
11396 EOF
11397 if { (eval echo configure:11398: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11398   rm -rf conftest*
11399   
11400         cat > conftest.$ac_ext <<EOF
11401 #line 11402 "configure"
11402 #include "confdefs.h"
11403 #include <pthread.h>
11404 EOF
11405 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11406   egrep "pthread_detach" >/dev/null 2>&1; then
11407   rm -rf conftest*
11408   ol_cv_pthread_version=10
11409 else
11410   rm -rf conftest*
11411   ol_cv_pthread_version=8
11412 fi
11413 rm -f conftest*
11414
11415 else
11416   echo "configure: failed program was:" >&5
11417   cat conftest.$ac_ext >&5
11418   rm -rf conftest*
11419   
11420         cat > conftest.$ac_ext <<EOF
11421 #line 11422 "configure"
11422 #include "confdefs.h"
11423
11424 #               include <pthread.h>
11425 #               ifdef PTHREAD_CREATE_UNDETACHED
11426                 draft7
11427 #               endif
11428         
11429 EOF
11430 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11431   egrep "draft7" >/dev/null 2>&1; then
11432   rm -rf conftest*
11433   ol_cv_pthread_version=7
11434 else
11435   rm -rf conftest*
11436   
11437         cat > conftest.$ac_ext <<EOF
11438 #line 11439 "configure"
11439 #include "confdefs.h"
11440 #include <pthread.h>
11441 EOF
11442 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11443   egrep "pthread_attr_init" >/dev/null 2>&1; then
11444   rm -rf conftest*
11445   ol_cv_pthread_version=6
11446 else
11447   rm -rf conftest*
11448   
11449         cat > conftest.$ac_ext <<EOF
11450 #line 11451 "configure"
11451 #include "confdefs.h"
11452
11453 #               include <pthread.h>
11454 #ifdef          PTHREAD_MUTEX_INITIALIZER
11455                 draft5
11456 #endif
11457         
11458 EOF
11459 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11460   egrep "draft5" >/dev/null 2>&1; then
11461   rm -rf conftest*
11462   ol_cv_pthread_version=5
11463 else
11464   rm -rf conftest*
11465   ol_cv_pthread_version=4
11466 fi
11467 rm -f conftest*
11468  
11469 fi
11470 rm -f conftest*
11471  
11472 fi
11473 rm -f conftest*
11474  
11475 fi
11476 rm -f conftest*
11477
11478 fi
11479
11480 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11481
11482
11483                 if test $ol_cv_pthread_version != 0 ; then
11484                         cat >> confdefs.h <<EOF
11485 #define HAVE_PTHREADS $ol_cv_pthread_version
11486 EOF
11487
11488                 else
11489                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11490                 fi
11491
11492                 # consider threads found
11493                 ol_with_threads=found
11494
11495                 
11496         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11497 echo "configure:11498: checking for LinuxThreads pthread.h" >&5
11498 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11499   echo $ac_n "(cached) $ac_c" 1>&6
11500 else
11501   cat > conftest.$ac_ext <<EOF
11502 #line 11503 "configure"
11503 #include "confdefs.h"
11504 #include <pthread.h>
11505 EOF
11506 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11507   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11508   rm -rf conftest*
11509   ol_cv_header_linux_threads=yes
11510 else
11511   rm -rf conftest*
11512   ol_cv_header_linux_threads=no
11513 fi
11514 rm -f conftest*
11515
11516                 
11517 fi
11518
11519 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11520         if test $ol_cv_header_linux_threads = yes; then
11521                 cat >> confdefs.h <<\EOF
11522 #define HAVE_LINUX_THREADS 1
11523 EOF
11524
11525         fi
11526
11527                 
11528         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11529 echo "configure:11530: checking for GNU Pth pthread.h" >&5
11530 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11531   echo $ac_n "(cached) $ac_c" 1>&6
11532 else
11533   cat > conftest.$ac_ext <<EOF
11534 #line 11535 "configure"
11535 #include "confdefs.h"
11536 #include <pthread.h>
11537 #ifdef _POSIX_THREAD_IS_GNU_PTH
11538         __gnu_pth__;
11539 #endif
11540
11541 EOF
11542 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11543   egrep "__gnu_pth__" >/dev/null 2>&1; then
11544   rm -rf conftest*
11545   ol_cv_header_gnu_pth_pthread_h=yes
11546 else
11547   rm -rf conftest*
11548   ol_cv_header_gnu_pth_pthread_h=no
11549 fi
11550 rm -f conftest*
11551
11552                 
11553 fi
11554
11555 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11556
11557
11558                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11559                         for ac_hdr in sched.h
11560 do
11561 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11562 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11563 echo "configure:11564: checking for $ac_hdr" >&5
11564 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11565   echo $ac_n "(cached) $ac_c" 1>&6
11566 else
11567   cat > conftest.$ac_ext <<EOF
11568 #line 11569 "configure"
11569 #include "confdefs.h"
11570 #include <$ac_hdr>
11571 EOF
11572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11573 { (eval echo configure:11574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11575 if test -z "$ac_err"; then
11576   rm -rf conftest*
11577   eval "ac_cv_header_$ac_safe=yes"
11578 else
11579   echo "$ac_err" >&5
11580   echo "configure: failed program was:" >&5
11581   cat conftest.$ac_ext >&5
11582   rm -rf conftest*
11583   eval "ac_cv_header_$ac_safe=no"
11584 fi
11585 rm -f conftest*
11586 fi
11587 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11588   echo "$ac_t""yes" 1>&6
11589     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11590   cat >> confdefs.h <<EOF
11591 #define $ac_tr_hdr 1
11592 EOF
11593  
11594 else
11595   echo "$ac_t""no" 1>&6
11596 fi
11597 done
11598
11599                 fi
11600
11601                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11602                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11603 echo "configure:11604: checking for pthread_create in default libraries" >&5
11604 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11605   echo $ac_n "(cached) $ac_c" 1>&6
11606 else
11607   
11608                 if test "$cross_compiling" = yes; then
11609   cat > conftest.$ac_ext <<EOF
11610 #line 11611 "configure"
11611 #include "confdefs.h"
11612 /* pthread test headers */
11613 #include <pthread.h>
11614 #if HAVE_PTHREADS < 7
11615 #include <errno.h>
11616 #endif
11617 #ifndef NULL
11618 #define NULL (void*)0
11619 #endif
11620
11621 static void *task(p)
11622         void *p;
11623 {
11624         return (void *) (p == NULL);
11625 }
11626
11627 int main() {
11628
11629         /* pthread test function */
11630 #ifndef PTHREAD_CREATE_DETACHED
11631 #define PTHREAD_CREATE_DETACHED 1
11632 #endif
11633         pthread_t t;
11634         int status;
11635         int detach = PTHREAD_CREATE_DETACHED;
11636
11637 #if HAVE_PTHREADS > 4
11638         /* Final pthreads */
11639         pthread_attr_t attr;
11640
11641         status = pthread_attr_init(&attr);
11642         if( status ) return status;
11643
11644 #if HAVE_PTHREADS < 7
11645         status = pthread_attr_setdetachstate(&attr, &detach);
11646         if( status < 0 ) status = errno;
11647 #else
11648         status = pthread_attr_setdetachstate(&attr, detach);
11649 #endif
11650         if( status ) return status;
11651         status = pthread_create( &t, &attr, task, NULL );
11652 #if HAVE_PTHREADS < 7
11653         if( status < 0 ) status = errno;
11654 #endif
11655         if( status ) return status;
11656 #else
11657         /* Draft 4 pthreads */
11658         status = pthread_create( &t, pthread_attr_default, task, NULL );
11659         if( status ) return errno;
11660
11661         /* give thread a chance to complete */
11662         /* it should remain joinable and hence detachable */
11663         sleep( 1 );
11664
11665         status = pthread_detach( &t );
11666         if( status ) return errno;
11667 #endif
11668
11669 #ifdef HAVE_LINUX_THREADS
11670         pthread_kill_other_threads_np();
11671 #endif
11672
11673         return 0;
11674
11675 ; return 0; }
11676 EOF
11677 if { (eval echo configure:11678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11678   rm -rf conftest*
11679   ol_cv_pthread_create=yes
11680 else
11681   echo "configure: failed program was:" >&5
11682   cat conftest.$ac_ext >&5
11683   rm -rf conftest*
11684   ol_cv_pthread_create=no
11685 fi
11686 rm -f conftest*
11687 else
11688   cat > conftest.$ac_ext <<EOF
11689 #line 11690 "configure"
11690 #include "confdefs.h"
11691 /* pthread test headers */
11692 #include <pthread.h>
11693 #if HAVE_PTHREADS < 7
11694 #include <errno.h>
11695 #endif
11696 #ifndef NULL
11697 #define NULL (void*)0
11698 #endif
11699
11700 static void *task(p)
11701         void *p;
11702 {
11703         return (void *) (p == NULL);
11704 }
11705
11706
11707 int main(argc, argv)
11708         int argc;
11709         char **argv;
11710 {
11711
11712         /* pthread test function */
11713 #ifndef PTHREAD_CREATE_DETACHED
11714 #define PTHREAD_CREATE_DETACHED 1
11715 #endif
11716         pthread_t t;
11717         int status;
11718         int detach = PTHREAD_CREATE_DETACHED;
11719
11720 #if HAVE_PTHREADS > 4
11721         /* Final pthreads */
11722         pthread_attr_t attr;
11723
11724         status = pthread_attr_init(&attr);
11725         if( status ) return status;
11726
11727 #if HAVE_PTHREADS < 7
11728         status = pthread_attr_setdetachstate(&attr, &detach);
11729         if( status < 0 ) status = errno;
11730 #else
11731         status = pthread_attr_setdetachstate(&attr, detach);
11732 #endif
11733         if( status ) return status;
11734         status = pthread_create( &t, &attr, task, NULL );
11735 #if HAVE_PTHREADS < 7
11736         if( status < 0 ) status = errno;
11737 #endif
11738         if( status ) return status;
11739 #else
11740         /* Draft 4 pthreads */
11741         status = pthread_create( &t, pthread_attr_default, task, NULL );
11742         if( status ) return errno;
11743
11744         /* give thread a chance to complete */
11745         /* it should remain joinable and hence detachable */
11746         sleep( 1 );
11747
11748         status = pthread_detach( &t );
11749         if( status ) return errno;
11750 #endif
11751
11752 #ifdef HAVE_LINUX_THREADS
11753         pthread_kill_other_threads_np();
11754 #endif
11755
11756         return 0;
11757
11758 }
11759
11760 EOF
11761 if { (eval echo configure:11762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11762 then
11763   ol_cv_pthread_create=yes
11764 else
11765   echo "configure: failed program was:" >&5
11766   cat conftest.$ac_ext >&5
11767   rm -fr conftest*
11768   ol_cv_pthread_create=no
11769 fi
11770 rm -fr conftest*
11771 fi
11772
11773 fi
11774
11775 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11776
11777                 if test $ol_cv_pthread_create != no ; then
11778                         ol_link_threads=posix
11779                         ol_link_pthreads=""
11780                 fi
11781                 
11782                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11783 if test "$ol_link_threads" = no ; then
11784         # try -kthread
11785         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11786 echo "configure:11787: checking for pthread link with -kthread" >&5
11787 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11788   echo $ac_n "(cached) $ac_c" 1>&6
11789 else
11790   
11791                 # save the flags
11792                 ol_LIBS="$LIBS"
11793                 LIBS="-kthread $LIBS"
11794
11795                 if test "$cross_compiling" = yes; then
11796   cat > conftest.$ac_ext <<EOF
11797 #line 11798 "configure"
11798 #include "confdefs.h"
11799 /* pthread test headers */
11800 #include <pthread.h>
11801 #if HAVE_PTHREADS < 7
11802 #include <errno.h>
11803 #endif
11804 #ifndef NULL
11805 #define NULL (void*)0
11806 #endif
11807
11808 static void *task(p)
11809         void *p;
11810 {
11811         return (void *) (p == NULL);
11812 }
11813
11814 int main() {
11815
11816         /* pthread test function */
11817 #ifndef PTHREAD_CREATE_DETACHED
11818 #define PTHREAD_CREATE_DETACHED 1
11819 #endif
11820         pthread_t t;
11821         int status;
11822         int detach = PTHREAD_CREATE_DETACHED;
11823
11824 #if HAVE_PTHREADS > 4
11825         /* Final pthreads */
11826         pthread_attr_t attr;
11827
11828         status = pthread_attr_init(&attr);
11829         if( status ) return status;
11830
11831 #if HAVE_PTHREADS < 7
11832         status = pthread_attr_setdetachstate(&attr, &detach);
11833         if( status < 0 ) status = errno;
11834 #else
11835         status = pthread_attr_setdetachstate(&attr, detach);
11836 #endif
11837         if( status ) return status;
11838         status = pthread_create( &t, &attr, task, NULL );
11839 #if HAVE_PTHREADS < 7
11840         if( status < 0 ) status = errno;
11841 #endif
11842         if( status ) return status;
11843 #else
11844         /* Draft 4 pthreads */
11845         status = pthread_create( &t, pthread_attr_default, task, NULL );
11846         if( status ) return errno;
11847
11848         /* give thread a chance to complete */
11849         /* it should remain joinable and hence detachable */
11850         sleep( 1 );
11851
11852         status = pthread_detach( &t );
11853         if( status ) return errno;
11854 #endif
11855
11856 #ifdef HAVE_LINUX_THREADS
11857         pthread_kill_other_threads_np();
11858 #endif
11859
11860         return 0;
11861
11862 ; return 0; }
11863 EOF
11864 if { (eval echo configure:11865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11865   rm -rf conftest*
11866   ol_cv_pthread_kthread=yes
11867 else
11868   echo "configure: failed program was:" >&5
11869   cat conftest.$ac_ext >&5
11870   rm -rf conftest*
11871   ol_cv_pthread_kthread=no
11872 fi
11873 rm -f conftest*
11874 else
11875   cat > conftest.$ac_ext <<EOF
11876 #line 11877 "configure"
11877 #include "confdefs.h"
11878 /* pthread test headers */
11879 #include <pthread.h>
11880 #if HAVE_PTHREADS < 7
11881 #include <errno.h>
11882 #endif
11883 #ifndef NULL
11884 #define NULL (void*)0
11885 #endif
11886
11887 static void *task(p)
11888         void *p;
11889 {
11890         return (void *) (p == NULL);
11891 }
11892
11893
11894 int main(argc, argv)
11895         int argc;
11896         char **argv;
11897 {
11898
11899         /* pthread test function */
11900 #ifndef PTHREAD_CREATE_DETACHED
11901 #define PTHREAD_CREATE_DETACHED 1
11902 #endif
11903         pthread_t t;
11904         int status;
11905         int detach = PTHREAD_CREATE_DETACHED;
11906
11907 #if HAVE_PTHREADS > 4
11908         /* Final pthreads */
11909         pthread_attr_t attr;
11910
11911         status = pthread_attr_init(&attr);
11912         if( status ) return status;
11913
11914 #if HAVE_PTHREADS < 7
11915         status = pthread_attr_setdetachstate(&attr, &detach);
11916         if( status < 0 ) status = errno;
11917 #else
11918         status = pthread_attr_setdetachstate(&attr, detach);
11919 #endif
11920         if( status ) return status;
11921         status = pthread_create( &t, &attr, task, NULL );
11922 #if HAVE_PTHREADS < 7
11923         if( status < 0 ) status = errno;
11924 #endif
11925         if( status ) return status;
11926 #else
11927         /* Draft 4 pthreads */
11928         status = pthread_create( &t, pthread_attr_default, task, NULL );
11929         if( status ) return errno;
11930
11931         /* give thread a chance to complete */
11932         /* it should remain joinable and hence detachable */
11933         sleep( 1 );
11934
11935         status = pthread_detach( &t );
11936         if( status ) return errno;
11937 #endif
11938
11939 #ifdef HAVE_LINUX_THREADS
11940         pthread_kill_other_threads_np();
11941 #endif
11942
11943         return 0;
11944
11945 }
11946
11947 EOF
11948 if { (eval echo configure:11949: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11949 then
11950   ol_cv_pthread_kthread=yes
11951 else
11952   echo "configure: failed program was:" >&5
11953   cat conftest.$ac_ext >&5
11954   rm -fr conftest*
11955   ol_cv_pthread_kthread=no
11956 fi
11957 rm -fr conftest*
11958 fi
11959
11960
11961                 # restore the LIBS
11962                 LIBS="$ol_LIBS"
11963         
11964 fi
11965
11966 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
11967
11968         if test $ol_cv_pthread_kthread = yes ; then
11969                 ol_link_pthreads="-kthread"
11970                 ol_link_threads=posix
11971         fi
11972 fi
11973
11974                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
11975 if test "$ol_link_threads" = no ; then
11976         # try -pthread
11977         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
11978 echo "configure:11979: checking for pthread link with -pthread" >&5
11979 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
11980   echo $ac_n "(cached) $ac_c" 1>&6
11981 else
11982   
11983                 # save the flags
11984                 ol_LIBS="$LIBS"
11985                 LIBS="-pthread $LIBS"
11986
11987                 if test "$cross_compiling" = yes; then
11988   cat > conftest.$ac_ext <<EOF
11989 #line 11990 "configure"
11990 #include "confdefs.h"
11991 /* pthread test headers */
11992 #include <pthread.h>
11993 #if HAVE_PTHREADS < 7
11994 #include <errno.h>
11995 #endif
11996 #ifndef NULL
11997 #define NULL (void*)0
11998 #endif
11999
12000 static void *task(p)
12001         void *p;
12002 {
12003         return (void *) (p == NULL);
12004 }
12005
12006 int main() {
12007
12008         /* pthread test function */
12009 #ifndef PTHREAD_CREATE_DETACHED
12010 #define PTHREAD_CREATE_DETACHED 1
12011 #endif
12012         pthread_t t;
12013         int status;
12014         int detach = PTHREAD_CREATE_DETACHED;
12015
12016 #if HAVE_PTHREADS > 4
12017         /* Final pthreads */
12018         pthread_attr_t attr;
12019
12020         status = pthread_attr_init(&attr);
12021         if( status ) return status;
12022
12023 #if HAVE_PTHREADS < 7
12024         status = pthread_attr_setdetachstate(&attr, &detach);
12025         if( status < 0 ) status = errno;
12026 #else
12027         status = pthread_attr_setdetachstate(&attr, detach);
12028 #endif
12029         if( status ) return status;
12030         status = pthread_create( &t, &attr, task, NULL );
12031 #if HAVE_PTHREADS < 7
12032         if( status < 0 ) status = errno;
12033 #endif
12034         if( status ) return status;
12035 #else
12036         /* Draft 4 pthreads */
12037         status = pthread_create( &t, pthread_attr_default, task, NULL );
12038         if( status ) return errno;
12039
12040         /* give thread a chance to complete */
12041         /* it should remain joinable and hence detachable */
12042         sleep( 1 );
12043
12044         status = pthread_detach( &t );
12045         if( status ) return errno;
12046 #endif
12047
12048 #ifdef HAVE_LINUX_THREADS
12049         pthread_kill_other_threads_np();
12050 #endif
12051
12052         return 0;
12053
12054 ; return 0; }
12055 EOF
12056 if { (eval echo configure:12057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12057   rm -rf conftest*
12058   ol_cv_pthread_pthread=yes
12059 else
12060   echo "configure: failed program was:" >&5
12061   cat conftest.$ac_ext >&5
12062   rm -rf conftest*
12063   ol_cv_pthread_pthread=no
12064 fi
12065 rm -f conftest*
12066 else
12067   cat > conftest.$ac_ext <<EOF
12068 #line 12069 "configure"
12069 #include "confdefs.h"
12070 /* pthread test headers */
12071 #include <pthread.h>
12072 #if HAVE_PTHREADS < 7
12073 #include <errno.h>
12074 #endif
12075 #ifndef NULL
12076 #define NULL (void*)0
12077 #endif
12078
12079 static void *task(p)
12080         void *p;
12081 {
12082         return (void *) (p == NULL);
12083 }
12084
12085
12086 int main(argc, argv)
12087         int argc;
12088         char **argv;
12089 {
12090
12091         /* pthread test function */
12092 #ifndef PTHREAD_CREATE_DETACHED
12093 #define PTHREAD_CREATE_DETACHED 1
12094 #endif
12095         pthread_t t;
12096         int status;
12097         int detach = PTHREAD_CREATE_DETACHED;
12098
12099 #if HAVE_PTHREADS > 4
12100         /* Final pthreads */
12101         pthread_attr_t attr;
12102
12103         status = pthread_attr_init(&attr);
12104         if( status ) return status;
12105
12106 #if HAVE_PTHREADS < 7
12107         status = pthread_attr_setdetachstate(&attr, &detach);
12108         if( status < 0 ) status = errno;
12109 #else
12110         status = pthread_attr_setdetachstate(&attr, detach);
12111 #endif
12112         if( status ) return status;
12113         status = pthread_create( &t, &attr, task, NULL );
12114 #if HAVE_PTHREADS < 7
12115         if( status < 0 ) status = errno;
12116 #endif
12117         if( status ) return status;
12118 #else
12119         /* Draft 4 pthreads */
12120         status = pthread_create( &t, pthread_attr_default, task, NULL );
12121         if( status ) return errno;
12122
12123         /* give thread a chance to complete */
12124         /* it should remain joinable and hence detachable */
12125         sleep( 1 );
12126
12127         status = pthread_detach( &t );
12128         if( status ) return errno;
12129 #endif
12130
12131 #ifdef HAVE_LINUX_THREADS
12132         pthread_kill_other_threads_np();
12133 #endif
12134
12135         return 0;
12136
12137 }
12138
12139 EOF
12140 if { (eval echo configure:12141: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12141 then
12142   ol_cv_pthread_pthread=yes
12143 else
12144   echo "configure: failed program was:" >&5
12145   cat conftest.$ac_ext >&5
12146   rm -fr conftest*
12147   ol_cv_pthread_pthread=no
12148 fi
12149 rm -fr conftest*
12150 fi
12151
12152
12153                 # restore the LIBS
12154                 LIBS="$ol_LIBS"
12155         
12156 fi
12157
12158 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12159
12160         if test $ol_cv_pthread_pthread = yes ; then
12161                 ol_link_pthreads="-pthread"
12162                 ol_link_threads=posix
12163         fi
12164 fi
12165
12166                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12167 if test "$ol_link_threads" = no ; then
12168         # try -pthreads
12169         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12170 echo "configure:12171: checking for pthread link with -pthreads" >&5
12171 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12172   echo $ac_n "(cached) $ac_c" 1>&6
12173 else
12174   
12175                 # save the flags
12176                 ol_LIBS="$LIBS"
12177                 LIBS="-pthreads $LIBS"
12178
12179                 if test "$cross_compiling" = yes; then
12180   cat > conftest.$ac_ext <<EOF
12181 #line 12182 "configure"
12182 #include "confdefs.h"
12183 /* pthread test headers */
12184 #include <pthread.h>
12185 #if HAVE_PTHREADS < 7
12186 #include <errno.h>
12187 #endif
12188 #ifndef NULL
12189 #define NULL (void*)0
12190 #endif
12191
12192 static void *task(p)
12193         void *p;
12194 {
12195         return (void *) (p == NULL);
12196 }
12197
12198 int main() {
12199
12200         /* pthread test function */
12201 #ifndef PTHREAD_CREATE_DETACHED
12202 #define PTHREAD_CREATE_DETACHED 1
12203 #endif
12204         pthread_t t;
12205         int status;
12206         int detach = PTHREAD_CREATE_DETACHED;
12207
12208 #if HAVE_PTHREADS > 4
12209         /* Final pthreads */
12210         pthread_attr_t attr;
12211
12212         status = pthread_attr_init(&attr);
12213         if( status ) return status;
12214
12215 #if HAVE_PTHREADS < 7
12216         status = pthread_attr_setdetachstate(&attr, &detach);
12217         if( status < 0 ) status = errno;
12218 #else
12219         status = pthread_attr_setdetachstate(&attr, detach);
12220 #endif
12221         if( status ) return status;
12222         status = pthread_create( &t, &attr, task, NULL );
12223 #if HAVE_PTHREADS < 7
12224         if( status < 0 ) status = errno;
12225 #endif
12226         if( status ) return status;
12227 #else
12228         /* Draft 4 pthreads */
12229         status = pthread_create( &t, pthread_attr_default, task, NULL );
12230         if( status ) return errno;
12231
12232         /* give thread a chance to complete */
12233         /* it should remain joinable and hence detachable */
12234         sleep( 1 );
12235
12236         status = pthread_detach( &t );
12237         if( status ) return errno;
12238 #endif
12239
12240 #ifdef HAVE_LINUX_THREADS
12241         pthread_kill_other_threads_np();
12242 #endif
12243
12244         return 0;
12245
12246 ; return 0; }
12247 EOF
12248 if { (eval echo configure:12249: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12249   rm -rf conftest*
12250   ol_cv_pthread_pthreads=yes
12251 else
12252   echo "configure: failed program was:" >&5
12253   cat conftest.$ac_ext >&5
12254   rm -rf conftest*
12255   ol_cv_pthread_pthreads=no
12256 fi
12257 rm -f conftest*
12258 else
12259   cat > conftest.$ac_ext <<EOF
12260 #line 12261 "configure"
12261 #include "confdefs.h"
12262 /* pthread test headers */
12263 #include <pthread.h>
12264 #if HAVE_PTHREADS < 7
12265 #include <errno.h>
12266 #endif
12267 #ifndef NULL
12268 #define NULL (void*)0
12269 #endif
12270
12271 static void *task(p)
12272         void *p;
12273 {
12274         return (void *) (p == NULL);
12275 }
12276
12277
12278 int main(argc, argv)
12279         int argc;
12280         char **argv;
12281 {
12282
12283         /* pthread test function */
12284 #ifndef PTHREAD_CREATE_DETACHED
12285 #define PTHREAD_CREATE_DETACHED 1
12286 #endif
12287         pthread_t t;
12288         int status;
12289         int detach = PTHREAD_CREATE_DETACHED;
12290
12291 #if HAVE_PTHREADS > 4
12292         /* Final pthreads */
12293         pthread_attr_t attr;
12294
12295         status = pthread_attr_init(&attr);
12296         if( status ) return status;
12297
12298 #if HAVE_PTHREADS < 7
12299         status = pthread_attr_setdetachstate(&attr, &detach);
12300         if( status < 0 ) status = errno;
12301 #else
12302         status = pthread_attr_setdetachstate(&attr, detach);
12303 #endif
12304         if( status ) return status;
12305         status = pthread_create( &t, &attr, task, NULL );
12306 #if HAVE_PTHREADS < 7
12307         if( status < 0 ) status = errno;
12308 #endif
12309         if( status ) return status;
12310 #else
12311         /* Draft 4 pthreads */
12312         status = pthread_create( &t, pthread_attr_default, task, NULL );
12313         if( status ) return errno;
12314
12315         /* give thread a chance to complete */
12316         /* it should remain joinable and hence detachable */
12317         sleep( 1 );
12318
12319         status = pthread_detach( &t );
12320         if( status ) return errno;
12321 #endif
12322
12323 #ifdef HAVE_LINUX_THREADS
12324         pthread_kill_other_threads_np();
12325 #endif
12326
12327         return 0;
12328
12329 }
12330
12331 EOF
12332 if { (eval echo configure:12333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12333 then
12334   ol_cv_pthread_pthreads=yes
12335 else
12336   echo "configure: failed program was:" >&5
12337   cat conftest.$ac_ext >&5
12338   rm -fr conftest*
12339   ol_cv_pthread_pthreads=no
12340 fi
12341 rm -fr conftest*
12342 fi
12343
12344
12345                 # restore the LIBS
12346                 LIBS="$ol_LIBS"
12347         
12348 fi
12349
12350 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12351
12352         if test $ol_cv_pthread_pthreads = yes ; then
12353                 ol_link_pthreads="-pthreads"
12354                 ol_link_threads=posix
12355         fi
12356 fi
12357
12358                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12359 if test "$ol_link_threads" = no ; then
12360         # try -mthreads
12361         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12362 echo "configure:12363: checking for pthread link with -mthreads" >&5
12363 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12364   echo $ac_n "(cached) $ac_c" 1>&6
12365 else
12366   
12367                 # save the flags
12368                 ol_LIBS="$LIBS"
12369                 LIBS="-mthreads $LIBS"
12370
12371                 if test "$cross_compiling" = yes; then
12372   cat > conftest.$ac_ext <<EOF
12373 #line 12374 "configure"
12374 #include "confdefs.h"
12375 /* pthread test headers */
12376 #include <pthread.h>
12377 #if HAVE_PTHREADS < 7
12378 #include <errno.h>
12379 #endif
12380 #ifndef NULL
12381 #define NULL (void*)0
12382 #endif
12383
12384 static void *task(p)
12385         void *p;
12386 {
12387         return (void *) (p == NULL);
12388 }
12389
12390 int main() {
12391
12392         /* pthread test function */
12393 #ifndef PTHREAD_CREATE_DETACHED
12394 #define PTHREAD_CREATE_DETACHED 1
12395 #endif
12396         pthread_t t;
12397         int status;
12398         int detach = PTHREAD_CREATE_DETACHED;
12399
12400 #if HAVE_PTHREADS > 4
12401         /* Final pthreads */
12402         pthread_attr_t attr;
12403
12404         status = pthread_attr_init(&attr);
12405         if( status ) return status;
12406
12407 #if HAVE_PTHREADS < 7
12408         status = pthread_attr_setdetachstate(&attr, &detach);
12409         if( status < 0 ) status = errno;
12410 #else
12411         status = pthread_attr_setdetachstate(&attr, detach);
12412 #endif
12413         if( status ) return status;
12414         status = pthread_create( &t, &attr, task, NULL );
12415 #if HAVE_PTHREADS < 7
12416         if( status < 0 ) status = errno;
12417 #endif
12418         if( status ) return status;
12419 #else
12420         /* Draft 4 pthreads */
12421         status = pthread_create( &t, pthread_attr_default, task, NULL );
12422         if( status ) return errno;
12423
12424         /* give thread a chance to complete */
12425         /* it should remain joinable and hence detachable */
12426         sleep( 1 );
12427
12428         status = pthread_detach( &t );
12429         if( status ) return errno;
12430 #endif
12431
12432 #ifdef HAVE_LINUX_THREADS
12433         pthread_kill_other_threads_np();
12434 #endif
12435
12436         return 0;
12437
12438 ; return 0; }
12439 EOF
12440 if { (eval echo configure:12441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12441   rm -rf conftest*
12442   ol_cv_pthread_mthreads=yes
12443 else
12444   echo "configure: failed program was:" >&5
12445   cat conftest.$ac_ext >&5
12446   rm -rf conftest*
12447   ol_cv_pthread_mthreads=no
12448 fi
12449 rm -f conftest*
12450 else
12451   cat > conftest.$ac_ext <<EOF
12452 #line 12453 "configure"
12453 #include "confdefs.h"
12454 /* pthread test headers */
12455 #include <pthread.h>
12456 #if HAVE_PTHREADS < 7
12457 #include <errno.h>
12458 #endif
12459 #ifndef NULL
12460 #define NULL (void*)0
12461 #endif
12462
12463 static void *task(p)
12464         void *p;
12465 {
12466         return (void *) (p == NULL);
12467 }
12468
12469
12470 int main(argc, argv)
12471         int argc;
12472         char **argv;
12473 {
12474
12475         /* pthread test function */
12476 #ifndef PTHREAD_CREATE_DETACHED
12477 #define PTHREAD_CREATE_DETACHED 1
12478 #endif
12479         pthread_t t;
12480         int status;
12481         int detach = PTHREAD_CREATE_DETACHED;
12482
12483 #if HAVE_PTHREADS > 4
12484         /* Final pthreads */
12485         pthread_attr_t attr;
12486
12487         status = pthread_attr_init(&attr);
12488         if( status ) return status;
12489
12490 #if HAVE_PTHREADS < 7
12491         status = pthread_attr_setdetachstate(&attr, &detach);
12492         if( status < 0 ) status = errno;
12493 #else
12494         status = pthread_attr_setdetachstate(&attr, detach);
12495 #endif
12496         if( status ) return status;
12497         status = pthread_create( &t, &attr, task, NULL );
12498 #if HAVE_PTHREADS < 7
12499         if( status < 0 ) status = errno;
12500 #endif
12501         if( status ) return status;
12502 #else
12503         /* Draft 4 pthreads */
12504         status = pthread_create( &t, pthread_attr_default, task, NULL );
12505         if( status ) return errno;
12506
12507         /* give thread a chance to complete */
12508         /* it should remain joinable and hence detachable */
12509         sleep( 1 );
12510
12511         status = pthread_detach( &t );
12512         if( status ) return errno;
12513 #endif
12514
12515 #ifdef HAVE_LINUX_THREADS
12516         pthread_kill_other_threads_np();
12517 #endif
12518
12519         return 0;
12520
12521 }
12522
12523 EOF
12524 if { (eval echo configure:12525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12525 then
12526   ol_cv_pthread_mthreads=yes
12527 else
12528   echo "configure: failed program was:" >&5
12529   cat conftest.$ac_ext >&5
12530   rm -fr conftest*
12531   ol_cv_pthread_mthreads=no
12532 fi
12533 rm -fr conftest*
12534 fi
12535
12536
12537                 # restore the LIBS
12538                 LIBS="$ol_LIBS"
12539         
12540 fi
12541
12542 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12543
12544         if test $ol_cv_pthread_mthreads = yes ; then
12545                 ol_link_pthreads="-mthreads"
12546                 ol_link_threads=posix
12547         fi
12548 fi
12549
12550                 # Pthread try link: -thread (ol_cv_pthread_thread)
12551 if test "$ol_link_threads" = no ; then
12552         # try -thread
12553         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12554 echo "configure:12555: checking for pthread link with -thread" >&5
12555 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12556   echo $ac_n "(cached) $ac_c" 1>&6
12557 else
12558   
12559                 # save the flags
12560                 ol_LIBS="$LIBS"
12561                 LIBS="-thread $LIBS"
12562
12563                 if test "$cross_compiling" = yes; then
12564   cat > conftest.$ac_ext <<EOF
12565 #line 12566 "configure"
12566 #include "confdefs.h"
12567 /* pthread test headers */
12568 #include <pthread.h>
12569 #if HAVE_PTHREADS < 7
12570 #include <errno.h>
12571 #endif
12572 #ifndef NULL
12573 #define NULL (void*)0
12574 #endif
12575
12576 static void *task(p)
12577         void *p;
12578 {
12579         return (void *) (p == NULL);
12580 }
12581
12582 int main() {
12583
12584         /* pthread test function */
12585 #ifndef PTHREAD_CREATE_DETACHED
12586 #define PTHREAD_CREATE_DETACHED 1
12587 #endif
12588         pthread_t t;
12589         int status;
12590         int detach = PTHREAD_CREATE_DETACHED;
12591
12592 #if HAVE_PTHREADS > 4
12593         /* Final pthreads */
12594         pthread_attr_t attr;
12595
12596         status = pthread_attr_init(&attr);
12597         if( status ) return status;
12598
12599 #if HAVE_PTHREADS < 7
12600         status = pthread_attr_setdetachstate(&attr, &detach);
12601         if( status < 0 ) status = errno;
12602 #else
12603         status = pthread_attr_setdetachstate(&attr, detach);
12604 #endif
12605         if( status ) return status;
12606         status = pthread_create( &t, &attr, task, NULL );
12607 #if HAVE_PTHREADS < 7
12608         if( status < 0 ) status = errno;
12609 #endif
12610         if( status ) return status;
12611 #else
12612         /* Draft 4 pthreads */
12613         status = pthread_create( &t, pthread_attr_default, task, NULL );
12614         if( status ) return errno;
12615
12616         /* give thread a chance to complete */
12617         /* it should remain joinable and hence detachable */
12618         sleep( 1 );
12619
12620         status = pthread_detach( &t );
12621         if( status ) return errno;
12622 #endif
12623
12624 #ifdef HAVE_LINUX_THREADS
12625         pthread_kill_other_threads_np();
12626 #endif
12627
12628         return 0;
12629
12630 ; return 0; }
12631 EOF
12632 if { (eval echo configure:12633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12633   rm -rf conftest*
12634   ol_cv_pthread_thread=yes
12635 else
12636   echo "configure: failed program was:" >&5
12637   cat conftest.$ac_ext >&5
12638   rm -rf conftest*
12639   ol_cv_pthread_thread=no
12640 fi
12641 rm -f conftest*
12642 else
12643   cat > conftest.$ac_ext <<EOF
12644 #line 12645 "configure"
12645 #include "confdefs.h"
12646 /* pthread test headers */
12647 #include <pthread.h>
12648 #if HAVE_PTHREADS < 7
12649 #include <errno.h>
12650 #endif
12651 #ifndef NULL
12652 #define NULL (void*)0
12653 #endif
12654
12655 static void *task(p)
12656         void *p;
12657 {
12658         return (void *) (p == NULL);
12659 }
12660
12661
12662 int main(argc, argv)
12663         int argc;
12664         char **argv;
12665 {
12666
12667         /* pthread test function */
12668 #ifndef PTHREAD_CREATE_DETACHED
12669 #define PTHREAD_CREATE_DETACHED 1
12670 #endif
12671         pthread_t t;
12672         int status;
12673         int detach = PTHREAD_CREATE_DETACHED;
12674
12675 #if HAVE_PTHREADS > 4
12676         /* Final pthreads */
12677         pthread_attr_t attr;
12678
12679         status = pthread_attr_init(&attr);
12680         if( status ) return status;
12681
12682 #if HAVE_PTHREADS < 7
12683         status = pthread_attr_setdetachstate(&attr, &detach);
12684         if( status < 0 ) status = errno;
12685 #else
12686         status = pthread_attr_setdetachstate(&attr, detach);
12687 #endif
12688         if( status ) return status;
12689         status = pthread_create( &t, &attr, task, NULL );
12690 #if HAVE_PTHREADS < 7
12691         if( status < 0 ) status = errno;
12692 #endif
12693         if( status ) return status;
12694 #else
12695         /* Draft 4 pthreads */
12696         status = pthread_create( &t, pthread_attr_default, task, NULL );
12697         if( status ) return errno;
12698
12699         /* give thread a chance to complete */
12700         /* it should remain joinable and hence detachable */
12701         sleep( 1 );
12702
12703         status = pthread_detach( &t );
12704         if( status ) return errno;
12705 #endif
12706
12707 #ifdef HAVE_LINUX_THREADS
12708         pthread_kill_other_threads_np();
12709 #endif
12710
12711         return 0;
12712
12713 }
12714
12715 EOF
12716 if { (eval echo configure:12717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12717 then
12718   ol_cv_pthread_thread=yes
12719 else
12720   echo "configure: failed program was:" >&5
12721   cat conftest.$ac_ext >&5
12722   rm -fr conftest*
12723   ol_cv_pthread_thread=no
12724 fi
12725 rm -fr conftest*
12726 fi
12727
12728
12729                 # restore the LIBS
12730                 LIBS="$ol_LIBS"
12731         
12732 fi
12733
12734 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12735
12736         if test $ol_cv_pthread_thread = yes ; then
12737                 ol_link_pthreads="-thread"
12738                 ol_link_threads=posix
12739         fi
12740 fi
12741
12742
12743                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12744 if test "$ol_link_threads" = no ; then
12745         # try -lpthread -lmach -lexc -lc_r
12746         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12747 echo "configure:12748: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12748 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12749   echo $ac_n "(cached) $ac_c" 1>&6
12750 else
12751   
12752                 # save the flags
12753                 ol_LIBS="$LIBS"
12754                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12755
12756                 if test "$cross_compiling" = yes; then
12757   cat > conftest.$ac_ext <<EOF
12758 #line 12759 "configure"
12759 #include "confdefs.h"
12760 /* pthread test headers */
12761 #include <pthread.h>
12762 #if HAVE_PTHREADS < 7
12763 #include <errno.h>
12764 #endif
12765 #ifndef NULL
12766 #define NULL (void*)0
12767 #endif
12768
12769 static void *task(p)
12770         void *p;
12771 {
12772         return (void *) (p == NULL);
12773 }
12774
12775 int main() {
12776
12777         /* pthread test function */
12778 #ifndef PTHREAD_CREATE_DETACHED
12779 #define PTHREAD_CREATE_DETACHED 1
12780 #endif
12781         pthread_t t;
12782         int status;
12783         int detach = PTHREAD_CREATE_DETACHED;
12784
12785 #if HAVE_PTHREADS > 4
12786         /* Final pthreads */
12787         pthread_attr_t attr;
12788
12789         status = pthread_attr_init(&attr);
12790         if( status ) return status;
12791
12792 #if HAVE_PTHREADS < 7
12793         status = pthread_attr_setdetachstate(&attr, &detach);
12794         if( status < 0 ) status = errno;
12795 #else
12796         status = pthread_attr_setdetachstate(&attr, detach);
12797 #endif
12798         if( status ) return status;
12799         status = pthread_create( &t, &attr, task, NULL );
12800 #if HAVE_PTHREADS < 7
12801         if( status < 0 ) status = errno;
12802 #endif
12803         if( status ) return status;
12804 #else
12805         /* Draft 4 pthreads */
12806         status = pthread_create( &t, pthread_attr_default, task, NULL );
12807         if( status ) return errno;
12808
12809         /* give thread a chance to complete */
12810         /* it should remain joinable and hence detachable */
12811         sleep( 1 );
12812
12813         status = pthread_detach( &t );
12814         if( status ) return errno;
12815 #endif
12816
12817 #ifdef HAVE_LINUX_THREADS
12818         pthread_kill_other_threads_np();
12819 #endif
12820
12821         return 0;
12822
12823 ; return 0; }
12824 EOF
12825 if { (eval echo configure:12826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12826   rm -rf conftest*
12827   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12828 else
12829   echo "configure: failed program was:" >&5
12830   cat conftest.$ac_ext >&5
12831   rm -rf conftest*
12832   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12833 fi
12834 rm -f conftest*
12835 else
12836   cat > conftest.$ac_ext <<EOF
12837 #line 12838 "configure"
12838 #include "confdefs.h"
12839 /* pthread test headers */
12840 #include <pthread.h>
12841 #if HAVE_PTHREADS < 7
12842 #include <errno.h>
12843 #endif
12844 #ifndef NULL
12845 #define NULL (void*)0
12846 #endif
12847
12848 static void *task(p)
12849         void *p;
12850 {
12851         return (void *) (p == NULL);
12852 }
12853
12854
12855 int main(argc, argv)
12856         int argc;
12857         char **argv;
12858 {
12859
12860         /* pthread test function */
12861 #ifndef PTHREAD_CREATE_DETACHED
12862 #define PTHREAD_CREATE_DETACHED 1
12863 #endif
12864         pthread_t t;
12865         int status;
12866         int detach = PTHREAD_CREATE_DETACHED;
12867
12868 #if HAVE_PTHREADS > 4
12869         /* Final pthreads */
12870         pthread_attr_t attr;
12871
12872         status = pthread_attr_init(&attr);
12873         if( status ) return status;
12874
12875 #if HAVE_PTHREADS < 7
12876         status = pthread_attr_setdetachstate(&attr, &detach);
12877         if( status < 0 ) status = errno;
12878 #else
12879         status = pthread_attr_setdetachstate(&attr, detach);
12880 #endif
12881         if( status ) return status;
12882         status = pthread_create( &t, &attr, task, NULL );
12883 #if HAVE_PTHREADS < 7
12884         if( status < 0 ) status = errno;
12885 #endif
12886         if( status ) return status;
12887 #else
12888         /* Draft 4 pthreads */
12889         status = pthread_create( &t, pthread_attr_default, task, NULL );
12890         if( status ) return errno;
12891
12892         /* give thread a chance to complete */
12893         /* it should remain joinable and hence detachable */
12894         sleep( 1 );
12895
12896         status = pthread_detach( &t );
12897         if( status ) return errno;
12898 #endif
12899
12900 #ifdef HAVE_LINUX_THREADS
12901         pthread_kill_other_threads_np();
12902 #endif
12903
12904         return 0;
12905
12906 }
12907
12908 EOF
12909 if { (eval echo configure:12910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12910 then
12911   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12912 else
12913   echo "configure: failed program was:" >&5
12914   cat conftest.$ac_ext >&5
12915   rm -fr conftest*
12916   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12917 fi
12918 rm -fr conftest*
12919 fi
12920
12921
12922                 # restore the LIBS
12923                 LIBS="$ol_LIBS"
12924         
12925 fi
12926
12927 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
12928
12929         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
12930                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
12931                 ol_link_threads=posix
12932         fi
12933 fi
12934
12935                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
12936 if test "$ol_link_threads" = no ; then
12937         # try -lpthread -lmach -lexc
12938         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
12939 echo "configure:12940: checking for pthread link with -lpthread -lmach -lexc" >&5
12940 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
12941   echo $ac_n "(cached) $ac_c" 1>&6
12942 else
12943   
12944                 # save the flags
12945                 ol_LIBS="$LIBS"
12946                 LIBS="-lpthread -lmach -lexc $LIBS"
12947
12948                 if test "$cross_compiling" = yes; then
12949   cat > conftest.$ac_ext <<EOF
12950 #line 12951 "configure"
12951 #include "confdefs.h"
12952 /* pthread test headers */
12953 #include <pthread.h>
12954 #if HAVE_PTHREADS < 7
12955 #include <errno.h>
12956 #endif
12957 #ifndef NULL
12958 #define NULL (void*)0
12959 #endif
12960
12961 static void *task(p)
12962         void *p;
12963 {
12964         return (void *) (p == NULL);
12965 }
12966
12967 int main() {
12968
12969         /* pthread test function */
12970 #ifndef PTHREAD_CREATE_DETACHED
12971 #define PTHREAD_CREATE_DETACHED 1
12972 #endif
12973         pthread_t t;
12974         int status;
12975         int detach = PTHREAD_CREATE_DETACHED;
12976
12977 #if HAVE_PTHREADS > 4
12978         /* Final pthreads */
12979         pthread_attr_t attr;
12980
12981         status = pthread_attr_init(&attr);
12982         if( status ) return status;
12983
12984 #if HAVE_PTHREADS < 7
12985         status = pthread_attr_setdetachstate(&attr, &detach);
12986         if( status < 0 ) status = errno;
12987 #else
12988         status = pthread_attr_setdetachstate(&attr, detach);
12989 #endif
12990         if( status ) return status;
12991         status = pthread_create( &t, &attr, task, NULL );
12992 #if HAVE_PTHREADS < 7
12993         if( status < 0 ) status = errno;
12994 #endif
12995         if( status ) return status;
12996 #else
12997         /* Draft 4 pthreads */
12998         status = pthread_create( &t, pthread_attr_default, task, NULL );
12999         if( status ) return errno;
13000
13001         /* give thread a chance to complete */
13002         /* it should remain joinable and hence detachable */
13003         sleep( 1 );
13004
13005         status = pthread_detach( &t );
13006         if( status ) return errno;
13007 #endif
13008
13009 #ifdef HAVE_LINUX_THREADS
13010         pthread_kill_other_threads_np();
13011 #endif
13012
13013         return 0;
13014
13015 ; return 0; }
13016 EOF
13017 if { (eval echo configure:13018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13018   rm -rf conftest*
13019   ol_cv_pthread_lpthread_lmach_lexc=yes
13020 else
13021   echo "configure: failed program was:" >&5
13022   cat conftest.$ac_ext >&5
13023   rm -rf conftest*
13024   ol_cv_pthread_lpthread_lmach_lexc=no
13025 fi
13026 rm -f conftest*
13027 else
13028   cat > conftest.$ac_ext <<EOF
13029 #line 13030 "configure"
13030 #include "confdefs.h"
13031 /* pthread test headers */
13032 #include <pthread.h>
13033 #if HAVE_PTHREADS < 7
13034 #include <errno.h>
13035 #endif
13036 #ifndef NULL
13037 #define NULL (void*)0
13038 #endif
13039
13040 static void *task(p)
13041         void *p;
13042 {
13043         return (void *) (p == NULL);
13044 }
13045
13046
13047 int main(argc, argv)
13048         int argc;
13049         char **argv;
13050 {
13051
13052         /* pthread test function */
13053 #ifndef PTHREAD_CREATE_DETACHED
13054 #define PTHREAD_CREATE_DETACHED 1
13055 #endif
13056         pthread_t t;
13057         int status;
13058         int detach = PTHREAD_CREATE_DETACHED;
13059
13060 #if HAVE_PTHREADS > 4
13061         /* Final pthreads */
13062         pthread_attr_t attr;
13063
13064         status = pthread_attr_init(&attr);
13065         if( status ) return status;
13066
13067 #if HAVE_PTHREADS < 7
13068         status = pthread_attr_setdetachstate(&attr, &detach);
13069         if( status < 0 ) status = errno;
13070 #else
13071         status = pthread_attr_setdetachstate(&attr, detach);
13072 #endif
13073         if( status ) return status;
13074         status = pthread_create( &t, &attr, task, NULL );
13075 #if HAVE_PTHREADS < 7
13076         if( status < 0 ) status = errno;
13077 #endif
13078         if( status ) return status;
13079 #else
13080         /* Draft 4 pthreads */
13081         status = pthread_create( &t, pthread_attr_default, task, NULL );
13082         if( status ) return errno;
13083
13084         /* give thread a chance to complete */
13085         /* it should remain joinable and hence detachable */
13086         sleep( 1 );
13087
13088         status = pthread_detach( &t );
13089         if( status ) return errno;
13090 #endif
13091
13092 #ifdef HAVE_LINUX_THREADS
13093         pthread_kill_other_threads_np();
13094 #endif
13095
13096         return 0;
13097
13098 }
13099
13100 EOF
13101 if { (eval echo configure:13102: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13102 then
13103   ol_cv_pthread_lpthread_lmach_lexc=yes
13104 else
13105   echo "configure: failed program was:" >&5
13106   cat conftest.$ac_ext >&5
13107   rm -fr conftest*
13108   ol_cv_pthread_lpthread_lmach_lexc=no
13109 fi
13110 rm -fr conftest*
13111 fi
13112
13113
13114                 # restore the LIBS
13115                 LIBS="$ol_LIBS"
13116         
13117 fi
13118
13119 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13120
13121         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13122                 ol_link_pthreads="-lpthread -lmach -lexc"
13123                 ol_link_threads=posix
13124         fi
13125 fi
13126
13127
13128                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13129 if test "$ol_link_threads" = no ; then
13130         # try -lpthread -Wl,-woff,85
13131         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13132 echo "configure:13133: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13133 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13134   echo $ac_n "(cached) $ac_c" 1>&6
13135 else
13136   
13137                 # save the flags
13138                 ol_LIBS="$LIBS"
13139                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13140
13141                 if test "$cross_compiling" = yes; then
13142   cat > conftest.$ac_ext <<EOF
13143 #line 13144 "configure"
13144 #include "confdefs.h"
13145 /* pthread test headers */
13146 #include <pthread.h>
13147 #if HAVE_PTHREADS < 7
13148 #include <errno.h>
13149 #endif
13150 #ifndef NULL
13151 #define NULL (void*)0
13152 #endif
13153
13154 static void *task(p)
13155         void *p;
13156 {
13157         return (void *) (p == NULL);
13158 }
13159
13160 int main() {
13161
13162         /* pthread test function */
13163 #ifndef PTHREAD_CREATE_DETACHED
13164 #define PTHREAD_CREATE_DETACHED 1
13165 #endif
13166         pthread_t t;
13167         int status;
13168         int detach = PTHREAD_CREATE_DETACHED;
13169
13170 #if HAVE_PTHREADS > 4
13171         /* Final pthreads */
13172         pthread_attr_t attr;
13173
13174         status = pthread_attr_init(&attr);
13175         if( status ) return status;
13176
13177 #if HAVE_PTHREADS < 7
13178         status = pthread_attr_setdetachstate(&attr, &detach);
13179         if( status < 0 ) status = errno;
13180 #else
13181         status = pthread_attr_setdetachstate(&attr, detach);
13182 #endif
13183         if( status ) return status;
13184         status = pthread_create( &t, &attr, task, NULL );
13185 #if HAVE_PTHREADS < 7
13186         if( status < 0 ) status = errno;
13187 #endif
13188         if( status ) return status;
13189 #else
13190         /* Draft 4 pthreads */
13191         status = pthread_create( &t, pthread_attr_default, task, NULL );
13192         if( status ) return errno;
13193
13194         /* give thread a chance to complete */
13195         /* it should remain joinable and hence detachable */
13196         sleep( 1 );
13197
13198         status = pthread_detach( &t );
13199         if( status ) return errno;
13200 #endif
13201
13202 #ifdef HAVE_LINUX_THREADS
13203         pthread_kill_other_threads_np();
13204 #endif
13205
13206         return 0;
13207
13208 ; return 0; }
13209 EOF
13210 if { (eval echo configure:13211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13211   rm -rf conftest*
13212   ol_cv_pthread_lib_lpthread_woff=yes
13213 else
13214   echo "configure: failed program was:" >&5
13215   cat conftest.$ac_ext >&5
13216   rm -rf conftest*
13217   ol_cv_pthread_lib_lpthread_woff=no
13218 fi
13219 rm -f conftest*
13220 else
13221   cat > conftest.$ac_ext <<EOF
13222 #line 13223 "configure"
13223 #include "confdefs.h"
13224 /* pthread test headers */
13225 #include <pthread.h>
13226 #if HAVE_PTHREADS < 7
13227 #include <errno.h>
13228 #endif
13229 #ifndef NULL
13230 #define NULL (void*)0
13231 #endif
13232
13233 static void *task(p)
13234         void *p;
13235 {
13236         return (void *) (p == NULL);
13237 }
13238
13239
13240 int main(argc, argv)
13241         int argc;
13242         char **argv;
13243 {
13244
13245         /* pthread test function */
13246 #ifndef PTHREAD_CREATE_DETACHED
13247 #define PTHREAD_CREATE_DETACHED 1
13248 #endif
13249         pthread_t t;
13250         int status;
13251         int detach = PTHREAD_CREATE_DETACHED;
13252
13253 #if HAVE_PTHREADS > 4
13254         /* Final pthreads */
13255         pthread_attr_t attr;
13256
13257         status = pthread_attr_init(&attr);
13258         if( status ) return status;
13259
13260 #if HAVE_PTHREADS < 7
13261         status = pthread_attr_setdetachstate(&attr, &detach);
13262         if( status < 0 ) status = errno;
13263 #else
13264         status = pthread_attr_setdetachstate(&attr, detach);
13265 #endif
13266         if( status ) return status;
13267         status = pthread_create( &t, &attr, task, NULL );
13268 #if HAVE_PTHREADS < 7
13269         if( status < 0 ) status = errno;
13270 #endif
13271         if( status ) return status;
13272 #else
13273         /* Draft 4 pthreads */
13274         status = pthread_create( &t, pthread_attr_default, task, NULL );
13275         if( status ) return errno;
13276
13277         /* give thread a chance to complete */
13278         /* it should remain joinable and hence detachable */
13279         sleep( 1 );
13280
13281         status = pthread_detach( &t );
13282         if( status ) return errno;
13283 #endif
13284
13285 #ifdef HAVE_LINUX_THREADS
13286         pthread_kill_other_threads_np();
13287 #endif
13288
13289         return 0;
13290
13291 }
13292
13293 EOF
13294 if { (eval echo configure:13295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13295 then
13296   ol_cv_pthread_lib_lpthread_woff=yes
13297 else
13298   echo "configure: failed program was:" >&5
13299   cat conftest.$ac_ext >&5
13300   rm -fr conftest*
13301   ol_cv_pthread_lib_lpthread_woff=no
13302 fi
13303 rm -fr conftest*
13304 fi
13305
13306
13307                 # restore the LIBS
13308                 LIBS="$ol_LIBS"
13309         
13310 fi
13311
13312 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13313
13314         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13315                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13316                 ol_link_threads=posix
13317         fi
13318 fi
13319
13320
13321                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13322 if test "$ol_link_threads" = no ; then
13323         # try -lpthread
13324         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13325 echo "configure:13326: checking for pthread link with -lpthread" >&5
13326 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13327   echo $ac_n "(cached) $ac_c" 1>&6
13328 else
13329   
13330                 # save the flags
13331                 ol_LIBS="$LIBS"
13332                 LIBS="-lpthread $LIBS"
13333
13334                 if test "$cross_compiling" = yes; then
13335   cat > conftest.$ac_ext <<EOF
13336 #line 13337 "configure"
13337 #include "confdefs.h"
13338 /* pthread test headers */
13339 #include <pthread.h>
13340 #if HAVE_PTHREADS < 7
13341 #include <errno.h>
13342 #endif
13343 #ifndef NULL
13344 #define NULL (void*)0
13345 #endif
13346
13347 static void *task(p)
13348         void *p;
13349 {
13350         return (void *) (p == NULL);
13351 }
13352
13353 int main() {
13354
13355         /* pthread test function */
13356 #ifndef PTHREAD_CREATE_DETACHED
13357 #define PTHREAD_CREATE_DETACHED 1
13358 #endif
13359         pthread_t t;
13360         int status;
13361         int detach = PTHREAD_CREATE_DETACHED;
13362
13363 #if HAVE_PTHREADS > 4
13364         /* Final pthreads */
13365         pthread_attr_t attr;
13366
13367         status = pthread_attr_init(&attr);
13368         if( status ) return status;
13369
13370 #if HAVE_PTHREADS < 7
13371         status = pthread_attr_setdetachstate(&attr, &detach);
13372         if( status < 0 ) status = errno;
13373 #else
13374         status = pthread_attr_setdetachstate(&attr, detach);
13375 #endif
13376         if( status ) return status;
13377         status = pthread_create( &t, &attr, task, NULL );
13378 #if HAVE_PTHREADS < 7
13379         if( status < 0 ) status = errno;
13380 #endif
13381         if( status ) return status;
13382 #else
13383         /* Draft 4 pthreads */
13384         status = pthread_create( &t, pthread_attr_default, task, NULL );
13385         if( status ) return errno;
13386
13387         /* give thread a chance to complete */
13388         /* it should remain joinable and hence detachable */
13389         sleep( 1 );
13390
13391         status = pthread_detach( &t );
13392         if( status ) return errno;
13393 #endif
13394
13395 #ifdef HAVE_LINUX_THREADS
13396         pthread_kill_other_threads_np();
13397 #endif
13398
13399         return 0;
13400
13401 ; return 0; }
13402 EOF
13403 if { (eval echo configure:13404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13404   rm -rf conftest*
13405   ol_cv_pthread_lpthread=yes
13406 else
13407   echo "configure: failed program was:" >&5
13408   cat conftest.$ac_ext >&5
13409   rm -rf conftest*
13410   ol_cv_pthread_lpthread=no
13411 fi
13412 rm -f conftest*
13413 else
13414   cat > conftest.$ac_ext <<EOF
13415 #line 13416 "configure"
13416 #include "confdefs.h"
13417 /* pthread test headers */
13418 #include <pthread.h>
13419 #if HAVE_PTHREADS < 7
13420 #include <errno.h>
13421 #endif
13422 #ifndef NULL
13423 #define NULL (void*)0
13424 #endif
13425
13426 static void *task(p)
13427         void *p;
13428 {
13429         return (void *) (p == NULL);
13430 }
13431
13432
13433 int main(argc, argv)
13434         int argc;
13435         char **argv;
13436 {
13437
13438         /* pthread test function */
13439 #ifndef PTHREAD_CREATE_DETACHED
13440 #define PTHREAD_CREATE_DETACHED 1
13441 #endif
13442         pthread_t t;
13443         int status;
13444         int detach = PTHREAD_CREATE_DETACHED;
13445
13446 #if HAVE_PTHREADS > 4
13447         /* Final pthreads */
13448         pthread_attr_t attr;
13449
13450         status = pthread_attr_init(&attr);
13451         if( status ) return status;
13452
13453 #if HAVE_PTHREADS < 7
13454         status = pthread_attr_setdetachstate(&attr, &detach);
13455         if( status < 0 ) status = errno;
13456 #else
13457         status = pthread_attr_setdetachstate(&attr, detach);
13458 #endif
13459         if( status ) return status;
13460         status = pthread_create( &t, &attr, task, NULL );
13461 #if HAVE_PTHREADS < 7
13462         if( status < 0 ) status = errno;
13463 #endif
13464         if( status ) return status;
13465 #else
13466         /* Draft 4 pthreads */
13467         status = pthread_create( &t, pthread_attr_default, task, NULL );
13468         if( status ) return errno;
13469
13470         /* give thread a chance to complete */
13471         /* it should remain joinable and hence detachable */
13472         sleep( 1 );
13473
13474         status = pthread_detach( &t );
13475         if( status ) return errno;
13476 #endif
13477
13478 #ifdef HAVE_LINUX_THREADS
13479         pthread_kill_other_threads_np();
13480 #endif
13481
13482         return 0;
13483
13484 }
13485
13486 EOF
13487 if { (eval echo configure:13488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13488 then
13489   ol_cv_pthread_lpthread=yes
13490 else
13491   echo "configure: failed program was:" >&5
13492   cat conftest.$ac_ext >&5
13493   rm -fr conftest*
13494   ol_cv_pthread_lpthread=no
13495 fi
13496 rm -fr conftest*
13497 fi
13498
13499
13500                 # restore the LIBS
13501                 LIBS="$ol_LIBS"
13502         
13503 fi
13504
13505 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13506
13507         if test $ol_cv_pthread_lpthread = yes ; then
13508                 ol_link_pthreads="-lpthread"
13509                 ol_link_threads=posix
13510         fi
13511 fi
13512
13513                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13514 if test "$ol_link_threads" = no ; then
13515         # try -lc_r
13516         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13517 echo "configure:13518: checking for pthread link with -lc_r" >&5
13518 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13519   echo $ac_n "(cached) $ac_c" 1>&6
13520 else
13521   
13522                 # save the flags
13523                 ol_LIBS="$LIBS"
13524                 LIBS="-lc_r $LIBS"
13525
13526                 if test "$cross_compiling" = yes; then
13527   cat > conftest.$ac_ext <<EOF
13528 #line 13529 "configure"
13529 #include "confdefs.h"
13530 /* pthread test headers */
13531 #include <pthread.h>
13532 #if HAVE_PTHREADS < 7
13533 #include <errno.h>
13534 #endif
13535 #ifndef NULL
13536 #define NULL (void*)0
13537 #endif
13538
13539 static void *task(p)
13540         void *p;
13541 {
13542         return (void *) (p == NULL);
13543 }
13544
13545 int main() {
13546
13547         /* pthread test function */
13548 #ifndef PTHREAD_CREATE_DETACHED
13549 #define PTHREAD_CREATE_DETACHED 1
13550 #endif
13551         pthread_t t;
13552         int status;
13553         int detach = PTHREAD_CREATE_DETACHED;
13554
13555 #if HAVE_PTHREADS > 4
13556         /* Final pthreads */
13557         pthread_attr_t attr;
13558
13559         status = pthread_attr_init(&attr);
13560         if( status ) return status;
13561
13562 #if HAVE_PTHREADS < 7
13563         status = pthread_attr_setdetachstate(&attr, &detach);
13564         if( status < 0 ) status = errno;
13565 #else
13566         status = pthread_attr_setdetachstate(&attr, detach);
13567 #endif
13568         if( status ) return status;
13569         status = pthread_create( &t, &attr, task, NULL );
13570 #if HAVE_PTHREADS < 7
13571         if( status < 0 ) status = errno;
13572 #endif
13573         if( status ) return status;
13574 #else
13575         /* Draft 4 pthreads */
13576         status = pthread_create( &t, pthread_attr_default, task, NULL );
13577         if( status ) return errno;
13578
13579         /* give thread a chance to complete */
13580         /* it should remain joinable and hence detachable */
13581         sleep( 1 );
13582
13583         status = pthread_detach( &t );
13584         if( status ) return errno;
13585 #endif
13586
13587 #ifdef HAVE_LINUX_THREADS
13588         pthread_kill_other_threads_np();
13589 #endif
13590
13591         return 0;
13592
13593 ; return 0; }
13594 EOF
13595 if { (eval echo configure:13596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13596   rm -rf conftest*
13597   ol_cv_pthread_lc_r=yes
13598 else
13599   echo "configure: failed program was:" >&5
13600   cat conftest.$ac_ext >&5
13601   rm -rf conftest*
13602   ol_cv_pthread_lc_r=no
13603 fi
13604 rm -f conftest*
13605 else
13606   cat > conftest.$ac_ext <<EOF
13607 #line 13608 "configure"
13608 #include "confdefs.h"
13609 /* pthread test headers */
13610 #include <pthread.h>
13611 #if HAVE_PTHREADS < 7
13612 #include <errno.h>
13613 #endif
13614 #ifndef NULL
13615 #define NULL (void*)0
13616 #endif
13617
13618 static void *task(p)
13619         void *p;
13620 {
13621         return (void *) (p == NULL);
13622 }
13623
13624
13625 int main(argc, argv)
13626         int argc;
13627         char **argv;
13628 {
13629
13630         /* pthread test function */
13631 #ifndef PTHREAD_CREATE_DETACHED
13632 #define PTHREAD_CREATE_DETACHED 1
13633 #endif
13634         pthread_t t;
13635         int status;
13636         int detach = PTHREAD_CREATE_DETACHED;
13637
13638 #if HAVE_PTHREADS > 4
13639         /* Final pthreads */
13640         pthread_attr_t attr;
13641
13642         status = pthread_attr_init(&attr);
13643         if( status ) return status;
13644
13645 #if HAVE_PTHREADS < 7
13646         status = pthread_attr_setdetachstate(&attr, &detach);
13647         if( status < 0 ) status = errno;
13648 #else
13649         status = pthread_attr_setdetachstate(&attr, detach);
13650 #endif
13651         if( status ) return status;
13652         status = pthread_create( &t, &attr, task, NULL );
13653 #if HAVE_PTHREADS < 7
13654         if( status < 0 ) status = errno;
13655 #endif
13656         if( status ) return status;
13657 #else
13658         /* Draft 4 pthreads */
13659         status = pthread_create( &t, pthread_attr_default, task, NULL );
13660         if( status ) return errno;
13661
13662         /* give thread a chance to complete */
13663         /* it should remain joinable and hence detachable */
13664         sleep( 1 );
13665
13666         status = pthread_detach( &t );
13667         if( status ) return errno;
13668 #endif
13669
13670 #ifdef HAVE_LINUX_THREADS
13671         pthread_kill_other_threads_np();
13672 #endif
13673
13674         return 0;
13675
13676 }
13677
13678 EOF
13679 if { (eval echo configure:13680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13680 then
13681   ol_cv_pthread_lc_r=yes
13682 else
13683   echo "configure: failed program was:" >&5
13684   cat conftest.$ac_ext >&5
13685   rm -fr conftest*
13686   ol_cv_pthread_lc_r=no
13687 fi
13688 rm -fr conftest*
13689 fi
13690
13691
13692                 # restore the LIBS
13693                 LIBS="$ol_LIBS"
13694         
13695 fi
13696
13697 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13698
13699         if test $ol_cv_pthread_lc_r = yes ; then
13700                 ol_link_pthreads="-lc_r"
13701                 ol_link_threads=posix
13702         fi
13703 fi
13704
13705
13706                 # Pthread try link: -threads (ol_cv_pthread_threads)
13707 if test "$ol_link_threads" = no ; then
13708         # try -threads
13709         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13710 echo "configure:13711: checking for pthread link with -threads" >&5
13711 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13712   echo $ac_n "(cached) $ac_c" 1>&6
13713 else
13714   
13715                 # save the flags
13716                 ol_LIBS="$LIBS"
13717                 LIBS="-threads $LIBS"
13718
13719                 if test "$cross_compiling" = yes; then
13720   cat > conftest.$ac_ext <<EOF
13721 #line 13722 "configure"
13722 #include "confdefs.h"
13723 /* pthread test headers */
13724 #include <pthread.h>
13725 #if HAVE_PTHREADS < 7
13726 #include <errno.h>
13727 #endif
13728 #ifndef NULL
13729 #define NULL (void*)0
13730 #endif
13731
13732 static void *task(p)
13733         void *p;
13734 {
13735         return (void *) (p == NULL);
13736 }
13737
13738 int main() {
13739
13740         /* pthread test function */
13741 #ifndef PTHREAD_CREATE_DETACHED
13742 #define PTHREAD_CREATE_DETACHED 1
13743 #endif
13744         pthread_t t;
13745         int status;
13746         int detach = PTHREAD_CREATE_DETACHED;
13747
13748 #if HAVE_PTHREADS > 4
13749         /* Final pthreads */
13750         pthread_attr_t attr;
13751
13752         status = pthread_attr_init(&attr);
13753         if( status ) return status;
13754
13755 #if HAVE_PTHREADS < 7
13756         status = pthread_attr_setdetachstate(&attr, &detach);
13757         if( status < 0 ) status = errno;
13758 #else
13759         status = pthread_attr_setdetachstate(&attr, detach);
13760 #endif
13761         if( status ) return status;
13762         status = pthread_create( &t, &attr, task, NULL );
13763 #if HAVE_PTHREADS < 7
13764         if( status < 0 ) status = errno;
13765 #endif
13766         if( status ) return status;
13767 #else
13768         /* Draft 4 pthreads */
13769         status = pthread_create( &t, pthread_attr_default, task, NULL );
13770         if( status ) return errno;
13771
13772         /* give thread a chance to complete */
13773         /* it should remain joinable and hence detachable */
13774         sleep( 1 );
13775
13776         status = pthread_detach( &t );
13777         if( status ) return errno;
13778 #endif
13779
13780 #ifdef HAVE_LINUX_THREADS
13781         pthread_kill_other_threads_np();
13782 #endif
13783
13784         return 0;
13785
13786 ; return 0; }
13787 EOF
13788 if { (eval echo configure:13789: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13789   rm -rf conftest*
13790   ol_cv_pthread_threads=yes
13791 else
13792   echo "configure: failed program was:" >&5
13793   cat conftest.$ac_ext >&5
13794   rm -rf conftest*
13795   ol_cv_pthread_threads=no
13796 fi
13797 rm -f conftest*
13798 else
13799   cat > conftest.$ac_ext <<EOF
13800 #line 13801 "configure"
13801 #include "confdefs.h"
13802 /* pthread test headers */
13803 #include <pthread.h>
13804 #if HAVE_PTHREADS < 7
13805 #include <errno.h>
13806 #endif
13807 #ifndef NULL
13808 #define NULL (void*)0
13809 #endif
13810
13811 static void *task(p)
13812         void *p;
13813 {
13814         return (void *) (p == NULL);
13815 }
13816
13817
13818 int main(argc, argv)
13819         int argc;
13820         char **argv;
13821 {
13822
13823         /* pthread test function */
13824 #ifndef PTHREAD_CREATE_DETACHED
13825 #define PTHREAD_CREATE_DETACHED 1
13826 #endif
13827         pthread_t t;
13828         int status;
13829         int detach = PTHREAD_CREATE_DETACHED;
13830
13831 #if HAVE_PTHREADS > 4
13832         /* Final pthreads */
13833         pthread_attr_t attr;
13834
13835         status = pthread_attr_init(&attr);
13836         if( status ) return status;
13837
13838 #if HAVE_PTHREADS < 7
13839         status = pthread_attr_setdetachstate(&attr, &detach);
13840         if( status < 0 ) status = errno;
13841 #else
13842         status = pthread_attr_setdetachstate(&attr, detach);
13843 #endif
13844         if( status ) return status;
13845         status = pthread_create( &t, &attr, task, NULL );
13846 #if HAVE_PTHREADS < 7
13847         if( status < 0 ) status = errno;
13848 #endif
13849         if( status ) return status;
13850 #else
13851         /* Draft 4 pthreads */
13852         status = pthread_create( &t, pthread_attr_default, task, NULL );
13853         if( status ) return errno;
13854
13855         /* give thread a chance to complete */
13856         /* it should remain joinable and hence detachable */
13857         sleep( 1 );
13858
13859         status = pthread_detach( &t );
13860         if( status ) return errno;
13861 #endif
13862
13863 #ifdef HAVE_LINUX_THREADS
13864         pthread_kill_other_threads_np();
13865 #endif
13866
13867         return 0;
13868
13869 }
13870
13871 EOF
13872 if { (eval echo configure:13873: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13873 then
13874   ol_cv_pthread_threads=yes
13875 else
13876   echo "configure: failed program was:" >&5
13877   cat conftest.$ac_ext >&5
13878   rm -fr conftest*
13879   ol_cv_pthread_threads=no
13880 fi
13881 rm -fr conftest*
13882 fi
13883
13884
13885                 # restore the LIBS
13886                 LIBS="$ol_LIBS"
13887         
13888 fi
13889
13890 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
13891
13892         if test $ol_cv_pthread_threads = yes ; then
13893                 ol_link_pthreads="-threads"
13894                 ol_link_threads=posix
13895         fi
13896 fi
13897
13898
13899                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
13900 if test "$ol_link_threads" = no ; then
13901         # try -lpthreads -lmach -lexc -lc_r
13902         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
13903 echo "configure:13904: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
13904 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
13905   echo $ac_n "(cached) $ac_c" 1>&6
13906 else
13907   
13908                 # save the flags
13909                 ol_LIBS="$LIBS"
13910                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
13911
13912                 if test "$cross_compiling" = yes; then
13913   cat > conftest.$ac_ext <<EOF
13914 #line 13915 "configure"
13915 #include "confdefs.h"
13916 /* pthread test headers */
13917 #include <pthread.h>
13918 #if HAVE_PTHREADS < 7
13919 #include <errno.h>
13920 #endif
13921 #ifndef NULL
13922 #define NULL (void*)0
13923 #endif
13924
13925 static void *task(p)
13926         void *p;
13927 {
13928         return (void *) (p == NULL);
13929 }
13930
13931 int main() {
13932
13933         /* pthread test function */
13934 #ifndef PTHREAD_CREATE_DETACHED
13935 #define PTHREAD_CREATE_DETACHED 1
13936 #endif
13937         pthread_t t;
13938         int status;
13939         int detach = PTHREAD_CREATE_DETACHED;
13940
13941 #if HAVE_PTHREADS > 4
13942         /* Final pthreads */
13943         pthread_attr_t attr;
13944
13945         status = pthread_attr_init(&attr);
13946         if( status ) return status;
13947
13948 #if HAVE_PTHREADS < 7
13949         status = pthread_attr_setdetachstate(&attr, &detach);
13950         if( status < 0 ) status = errno;
13951 #else
13952         status = pthread_attr_setdetachstate(&attr, detach);
13953 #endif
13954         if( status ) return status;
13955         status = pthread_create( &t, &attr, task, NULL );
13956 #if HAVE_PTHREADS < 7
13957         if( status < 0 ) status = errno;
13958 #endif
13959         if( status ) return status;
13960 #else
13961         /* Draft 4 pthreads */
13962         status = pthread_create( &t, pthread_attr_default, task, NULL );
13963         if( status ) return errno;
13964
13965         /* give thread a chance to complete */
13966         /* it should remain joinable and hence detachable */
13967         sleep( 1 );
13968
13969         status = pthread_detach( &t );
13970         if( status ) return errno;
13971 #endif
13972
13973 #ifdef HAVE_LINUX_THREADS
13974         pthread_kill_other_threads_np();
13975 #endif
13976
13977         return 0;
13978
13979 ; return 0; }
13980 EOF
13981 if { (eval echo configure:13982: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13982   rm -rf conftest*
13983   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
13984 else
13985   echo "configure: failed program was:" >&5
13986   cat conftest.$ac_ext >&5
13987   rm -rf conftest*
13988   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
13989 fi
13990 rm -f conftest*
13991 else
13992   cat > conftest.$ac_ext <<EOF
13993 #line 13994 "configure"
13994 #include "confdefs.h"
13995 /* pthread test headers */
13996 #include <pthread.h>
13997 #if HAVE_PTHREADS < 7
13998 #include <errno.h>
13999 #endif
14000 #ifndef NULL
14001 #define NULL (void*)0
14002 #endif
14003
14004 static void *task(p)
14005         void *p;
14006 {
14007         return (void *) (p == NULL);
14008 }
14009
14010
14011 int main(argc, argv)
14012         int argc;
14013         char **argv;
14014 {
14015
14016         /* pthread test function */
14017 #ifndef PTHREAD_CREATE_DETACHED
14018 #define PTHREAD_CREATE_DETACHED 1
14019 #endif
14020         pthread_t t;
14021         int status;
14022         int detach = PTHREAD_CREATE_DETACHED;
14023
14024 #if HAVE_PTHREADS > 4
14025         /* Final pthreads */
14026         pthread_attr_t attr;
14027
14028         status = pthread_attr_init(&attr);
14029         if( status ) return status;
14030
14031 #if HAVE_PTHREADS < 7
14032         status = pthread_attr_setdetachstate(&attr, &detach);
14033         if( status < 0 ) status = errno;
14034 #else
14035         status = pthread_attr_setdetachstate(&attr, detach);
14036 #endif
14037         if( status ) return status;
14038         status = pthread_create( &t, &attr, task, NULL );
14039 #if HAVE_PTHREADS < 7
14040         if( status < 0 ) status = errno;
14041 #endif
14042         if( status ) return status;
14043 #else
14044         /* Draft 4 pthreads */
14045         status = pthread_create( &t, pthread_attr_default, task, NULL );
14046         if( status ) return errno;
14047
14048         /* give thread a chance to complete */
14049         /* it should remain joinable and hence detachable */
14050         sleep( 1 );
14051
14052         status = pthread_detach( &t );
14053         if( status ) return errno;
14054 #endif
14055
14056 #ifdef HAVE_LINUX_THREADS
14057         pthread_kill_other_threads_np();
14058 #endif
14059
14060         return 0;
14061
14062 }
14063
14064 EOF
14065 if { (eval echo configure:14066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14066 then
14067   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14068 else
14069   echo "configure: failed program was:" >&5
14070   cat conftest.$ac_ext >&5
14071   rm -fr conftest*
14072   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14073 fi
14074 rm -fr conftest*
14075 fi
14076
14077
14078                 # restore the LIBS
14079                 LIBS="$ol_LIBS"
14080         
14081 fi
14082
14083 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14084
14085         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14086                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14087                 ol_link_threads=posix
14088         fi
14089 fi
14090
14091                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14092 if test "$ol_link_threads" = no ; then
14093         # try -lpthreads -lmach -lexc
14094         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14095 echo "configure:14096: checking for pthread link with -lpthreads -lmach -lexc" >&5
14096 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14097   echo $ac_n "(cached) $ac_c" 1>&6
14098 else
14099   
14100                 # save the flags
14101                 ol_LIBS="$LIBS"
14102                 LIBS="-lpthreads -lmach -lexc $LIBS"
14103
14104                 if test "$cross_compiling" = yes; then
14105   cat > conftest.$ac_ext <<EOF
14106 #line 14107 "configure"
14107 #include "confdefs.h"
14108 /* pthread test headers */
14109 #include <pthread.h>
14110 #if HAVE_PTHREADS < 7
14111 #include <errno.h>
14112 #endif
14113 #ifndef NULL
14114 #define NULL (void*)0
14115 #endif
14116
14117 static void *task(p)
14118         void *p;
14119 {
14120         return (void *) (p == NULL);
14121 }
14122
14123 int main() {
14124
14125         /* pthread test function */
14126 #ifndef PTHREAD_CREATE_DETACHED
14127 #define PTHREAD_CREATE_DETACHED 1
14128 #endif
14129         pthread_t t;
14130         int status;
14131         int detach = PTHREAD_CREATE_DETACHED;
14132
14133 #if HAVE_PTHREADS > 4
14134         /* Final pthreads */
14135         pthread_attr_t attr;
14136
14137         status = pthread_attr_init(&attr);
14138         if( status ) return status;
14139
14140 #if HAVE_PTHREADS < 7
14141         status = pthread_attr_setdetachstate(&attr, &detach);
14142         if( status < 0 ) status = errno;
14143 #else
14144         status = pthread_attr_setdetachstate(&attr, detach);
14145 #endif
14146         if( status ) return status;
14147         status = pthread_create( &t, &attr, task, NULL );
14148 #if HAVE_PTHREADS < 7
14149         if( status < 0 ) status = errno;
14150 #endif
14151         if( status ) return status;
14152 #else
14153         /* Draft 4 pthreads */
14154         status = pthread_create( &t, pthread_attr_default, task, NULL );
14155         if( status ) return errno;
14156
14157         /* give thread a chance to complete */
14158         /* it should remain joinable and hence detachable */
14159         sleep( 1 );
14160
14161         status = pthread_detach( &t );
14162         if( status ) return errno;
14163 #endif
14164
14165 #ifdef HAVE_LINUX_THREADS
14166         pthread_kill_other_threads_np();
14167 #endif
14168
14169         return 0;
14170
14171 ; return 0; }
14172 EOF
14173 if { (eval echo configure:14174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14174   rm -rf conftest*
14175   ol_cv_pthread_lpthreads_lmach_lexc=yes
14176 else
14177   echo "configure: failed program was:" >&5
14178   cat conftest.$ac_ext >&5
14179   rm -rf conftest*
14180   ol_cv_pthread_lpthreads_lmach_lexc=no
14181 fi
14182 rm -f conftest*
14183 else
14184   cat > conftest.$ac_ext <<EOF
14185 #line 14186 "configure"
14186 #include "confdefs.h"
14187 /* pthread test headers */
14188 #include <pthread.h>
14189 #if HAVE_PTHREADS < 7
14190 #include <errno.h>
14191 #endif
14192 #ifndef NULL
14193 #define NULL (void*)0
14194 #endif
14195
14196 static void *task(p)
14197         void *p;
14198 {
14199         return (void *) (p == NULL);
14200 }
14201
14202
14203 int main(argc, argv)
14204         int argc;
14205         char **argv;
14206 {
14207
14208         /* pthread test function */
14209 #ifndef PTHREAD_CREATE_DETACHED
14210 #define PTHREAD_CREATE_DETACHED 1
14211 #endif
14212         pthread_t t;
14213         int status;
14214         int detach = PTHREAD_CREATE_DETACHED;
14215
14216 #if HAVE_PTHREADS > 4
14217         /* Final pthreads */
14218         pthread_attr_t attr;
14219
14220         status = pthread_attr_init(&attr);
14221         if( status ) return status;
14222
14223 #if HAVE_PTHREADS < 7
14224         status = pthread_attr_setdetachstate(&attr, &detach);
14225         if( status < 0 ) status = errno;
14226 #else
14227         status = pthread_attr_setdetachstate(&attr, detach);
14228 #endif
14229         if( status ) return status;
14230         status = pthread_create( &t, &attr, task, NULL );
14231 #if HAVE_PTHREADS < 7
14232         if( status < 0 ) status = errno;
14233 #endif
14234         if( status ) return status;
14235 #else
14236         /* Draft 4 pthreads */
14237         status = pthread_create( &t, pthread_attr_default, task, NULL );
14238         if( status ) return errno;
14239
14240         /* give thread a chance to complete */
14241         /* it should remain joinable and hence detachable */
14242         sleep( 1 );
14243
14244         status = pthread_detach( &t );
14245         if( status ) return errno;
14246 #endif
14247
14248 #ifdef HAVE_LINUX_THREADS
14249         pthread_kill_other_threads_np();
14250 #endif
14251
14252         return 0;
14253
14254 }
14255
14256 EOF
14257 if { (eval echo configure:14258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14258 then
14259   ol_cv_pthread_lpthreads_lmach_lexc=yes
14260 else
14261   echo "configure: failed program was:" >&5
14262   cat conftest.$ac_ext >&5
14263   rm -fr conftest*
14264   ol_cv_pthread_lpthreads_lmach_lexc=no
14265 fi
14266 rm -fr conftest*
14267 fi
14268
14269
14270                 # restore the LIBS
14271                 LIBS="$ol_LIBS"
14272         
14273 fi
14274
14275 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14276
14277         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14278                 ol_link_pthreads="-lpthreads -lmach -lexc"
14279                 ol_link_threads=posix
14280         fi
14281 fi
14282
14283                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14284 if test "$ol_link_threads" = no ; then
14285         # try -lpthreads -lexc
14286         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14287 echo "configure:14288: checking for pthread link with -lpthreads -lexc" >&5
14288 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14289   echo $ac_n "(cached) $ac_c" 1>&6
14290 else
14291   
14292                 # save the flags
14293                 ol_LIBS="$LIBS"
14294                 LIBS="-lpthreads -lexc $LIBS"
14295
14296                 if test "$cross_compiling" = yes; then
14297   cat > conftest.$ac_ext <<EOF
14298 #line 14299 "configure"
14299 #include "confdefs.h"
14300 /* pthread test headers */
14301 #include <pthread.h>
14302 #if HAVE_PTHREADS < 7
14303 #include <errno.h>
14304 #endif
14305 #ifndef NULL
14306 #define NULL (void*)0
14307 #endif
14308
14309 static void *task(p)
14310         void *p;
14311 {
14312         return (void *) (p == NULL);
14313 }
14314
14315 int main() {
14316
14317         /* pthread test function */
14318 #ifndef PTHREAD_CREATE_DETACHED
14319 #define PTHREAD_CREATE_DETACHED 1
14320 #endif
14321         pthread_t t;
14322         int status;
14323         int detach = PTHREAD_CREATE_DETACHED;
14324
14325 #if HAVE_PTHREADS > 4
14326         /* Final pthreads */
14327         pthread_attr_t attr;
14328
14329         status = pthread_attr_init(&attr);
14330         if( status ) return status;
14331
14332 #if HAVE_PTHREADS < 7
14333         status = pthread_attr_setdetachstate(&attr, &detach);
14334         if( status < 0 ) status = errno;
14335 #else
14336         status = pthread_attr_setdetachstate(&attr, detach);
14337 #endif
14338         if( status ) return status;
14339         status = pthread_create( &t, &attr, task, NULL );
14340 #if HAVE_PTHREADS < 7
14341         if( status < 0 ) status = errno;
14342 #endif
14343         if( status ) return status;
14344 #else
14345         /* Draft 4 pthreads */
14346         status = pthread_create( &t, pthread_attr_default, task, NULL );
14347         if( status ) return errno;
14348
14349         /* give thread a chance to complete */
14350         /* it should remain joinable and hence detachable */
14351         sleep( 1 );
14352
14353         status = pthread_detach( &t );
14354         if( status ) return errno;
14355 #endif
14356
14357 #ifdef HAVE_LINUX_THREADS
14358         pthread_kill_other_threads_np();
14359 #endif
14360
14361         return 0;
14362
14363 ; return 0; }
14364 EOF
14365 if { (eval echo configure:14366: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14366   rm -rf conftest*
14367   ol_cv_pthread_lpthreads_lexc=yes
14368 else
14369   echo "configure: failed program was:" >&5
14370   cat conftest.$ac_ext >&5
14371   rm -rf conftest*
14372   ol_cv_pthread_lpthreads_lexc=no
14373 fi
14374 rm -f conftest*
14375 else
14376   cat > conftest.$ac_ext <<EOF
14377 #line 14378 "configure"
14378 #include "confdefs.h"
14379 /* pthread test headers */
14380 #include <pthread.h>
14381 #if HAVE_PTHREADS < 7
14382 #include <errno.h>
14383 #endif
14384 #ifndef NULL
14385 #define NULL (void*)0
14386 #endif
14387
14388 static void *task(p)
14389         void *p;
14390 {
14391         return (void *) (p == NULL);
14392 }
14393
14394
14395 int main(argc, argv)
14396         int argc;
14397         char **argv;
14398 {
14399
14400         /* pthread test function */
14401 #ifndef PTHREAD_CREATE_DETACHED
14402 #define PTHREAD_CREATE_DETACHED 1
14403 #endif
14404         pthread_t t;
14405         int status;
14406         int detach = PTHREAD_CREATE_DETACHED;
14407
14408 #if HAVE_PTHREADS > 4
14409         /* Final pthreads */
14410         pthread_attr_t attr;
14411
14412         status = pthread_attr_init(&attr);
14413         if( status ) return status;
14414
14415 #if HAVE_PTHREADS < 7
14416         status = pthread_attr_setdetachstate(&attr, &detach);
14417         if( status < 0 ) status = errno;
14418 #else
14419         status = pthread_attr_setdetachstate(&attr, detach);
14420 #endif
14421         if( status ) return status;
14422         status = pthread_create( &t, &attr, task, NULL );
14423 #if HAVE_PTHREADS < 7
14424         if( status < 0 ) status = errno;
14425 #endif
14426         if( status ) return status;
14427 #else
14428         /* Draft 4 pthreads */
14429         status = pthread_create( &t, pthread_attr_default, task, NULL );
14430         if( status ) return errno;
14431
14432         /* give thread a chance to complete */
14433         /* it should remain joinable and hence detachable */
14434         sleep( 1 );
14435
14436         status = pthread_detach( &t );
14437         if( status ) return errno;
14438 #endif
14439
14440 #ifdef HAVE_LINUX_THREADS
14441         pthread_kill_other_threads_np();
14442 #endif
14443
14444         return 0;
14445
14446 }
14447
14448 EOF
14449 if { (eval echo configure:14450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14450 then
14451   ol_cv_pthread_lpthreads_lexc=yes
14452 else
14453   echo "configure: failed program was:" >&5
14454   cat conftest.$ac_ext >&5
14455   rm -fr conftest*
14456   ol_cv_pthread_lpthreads_lexc=no
14457 fi
14458 rm -fr conftest*
14459 fi
14460
14461
14462                 # restore the LIBS
14463                 LIBS="$ol_LIBS"
14464         
14465 fi
14466
14467 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14468
14469         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14470                 ol_link_pthreads="-lpthreads -lexc"
14471                 ol_link_threads=posix
14472         fi
14473 fi
14474
14475
14476                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14477 if test "$ol_link_threads" = no ; then
14478         # try -lpthreads
14479         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14480 echo "configure:14481: checking for pthread link with -lpthreads" >&5
14481 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14482   echo $ac_n "(cached) $ac_c" 1>&6
14483 else
14484   
14485                 # save the flags
14486                 ol_LIBS="$LIBS"
14487                 LIBS="-lpthreads $LIBS"
14488
14489                 if test "$cross_compiling" = yes; then
14490   cat > conftest.$ac_ext <<EOF
14491 #line 14492 "configure"
14492 #include "confdefs.h"
14493 /* pthread test headers */
14494 #include <pthread.h>
14495 #if HAVE_PTHREADS < 7
14496 #include <errno.h>
14497 #endif
14498 #ifndef NULL
14499 #define NULL (void*)0
14500 #endif
14501
14502 static void *task(p)
14503         void *p;
14504 {
14505         return (void *) (p == NULL);
14506 }
14507
14508 int main() {
14509
14510         /* pthread test function */
14511 #ifndef PTHREAD_CREATE_DETACHED
14512 #define PTHREAD_CREATE_DETACHED 1
14513 #endif
14514         pthread_t t;
14515         int status;
14516         int detach = PTHREAD_CREATE_DETACHED;
14517
14518 #if HAVE_PTHREADS > 4
14519         /* Final pthreads */
14520         pthread_attr_t attr;
14521
14522         status = pthread_attr_init(&attr);
14523         if( status ) return status;
14524
14525 #if HAVE_PTHREADS < 7
14526         status = pthread_attr_setdetachstate(&attr, &detach);
14527         if( status < 0 ) status = errno;
14528 #else
14529         status = pthread_attr_setdetachstate(&attr, detach);
14530 #endif
14531         if( status ) return status;
14532         status = pthread_create( &t, &attr, task, NULL );
14533 #if HAVE_PTHREADS < 7
14534         if( status < 0 ) status = errno;
14535 #endif
14536         if( status ) return status;
14537 #else
14538         /* Draft 4 pthreads */
14539         status = pthread_create( &t, pthread_attr_default, task, NULL );
14540         if( status ) return errno;
14541
14542         /* give thread a chance to complete */
14543         /* it should remain joinable and hence detachable */
14544         sleep( 1 );
14545
14546         status = pthread_detach( &t );
14547         if( status ) return errno;
14548 #endif
14549
14550 #ifdef HAVE_LINUX_THREADS
14551         pthread_kill_other_threads_np();
14552 #endif
14553
14554         return 0;
14555
14556 ; return 0; }
14557 EOF
14558 if { (eval echo configure:14559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14559   rm -rf conftest*
14560   ol_cv_pthread_lib_lpthreads=yes
14561 else
14562   echo "configure: failed program was:" >&5
14563   cat conftest.$ac_ext >&5
14564   rm -rf conftest*
14565   ol_cv_pthread_lib_lpthreads=no
14566 fi
14567 rm -f conftest*
14568 else
14569   cat > conftest.$ac_ext <<EOF
14570 #line 14571 "configure"
14571 #include "confdefs.h"
14572 /* pthread test headers */
14573 #include <pthread.h>
14574 #if HAVE_PTHREADS < 7
14575 #include <errno.h>
14576 #endif
14577 #ifndef NULL
14578 #define NULL (void*)0
14579 #endif
14580
14581 static void *task(p)
14582         void *p;
14583 {
14584         return (void *) (p == NULL);
14585 }
14586
14587
14588 int main(argc, argv)
14589         int argc;
14590         char **argv;
14591 {
14592
14593         /* pthread test function */
14594 #ifndef PTHREAD_CREATE_DETACHED
14595 #define PTHREAD_CREATE_DETACHED 1
14596 #endif
14597         pthread_t t;
14598         int status;
14599         int detach = PTHREAD_CREATE_DETACHED;
14600
14601 #if HAVE_PTHREADS > 4
14602         /* Final pthreads */
14603         pthread_attr_t attr;
14604
14605         status = pthread_attr_init(&attr);
14606         if( status ) return status;
14607
14608 #if HAVE_PTHREADS < 7
14609         status = pthread_attr_setdetachstate(&attr, &detach);
14610         if( status < 0 ) status = errno;
14611 #else
14612         status = pthread_attr_setdetachstate(&attr, detach);
14613 #endif
14614         if( status ) return status;
14615         status = pthread_create( &t, &attr, task, NULL );
14616 #if HAVE_PTHREADS < 7
14617         if( status < 0 ) status = errno;
14618 #endif
14619         if( status ) return status;
14620 #else
14621         /* Draft 4 pthreads */
14622         status = pthread_create( &t, pthread_attr_default, task, NULL );
14623         if( status ) return errno;
14624
14625         /* give thread a chance to complete */
14626         /* it should remain joinable and hence detachable */
14627         sleep( 1 );
14628
14629         status = pthread_detach( &t );
14630         if( status ) return errno;
14631 #endif
14632
14633 #ifdef HAVE_LINUX_THREADS
14634         pthread_kill_other_threads_np();
14635 #endif
14636
14637         return 0;
14638
14639 }
14640
14641 EOF
14642 if { (eval echo configure:14643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14643 then
14644   ol_cv_pthread_lib_lpthreads=yes
14645 else
14646   echo "configure: failed program was:" >&5
14647   cat conftest.$ac_ext >&5
14648   rm -fr conftest*
14649   ol_cv_pthread_lib_lpthreads=no
14650 fi
14651 rm -fr conftest*
14652 fi
14653
14654
14655                 # restore the LIBS
14656                 LIBS="$ol_LIBS"
14657         
14658 fi
14659
14660 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14661
14662         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14663                 ol_link_pthreads="-lpthreads"
14664                 ol_link_threads=posix
14665         fi
14666 fi
14667
14668
14669                 if test $ol_link_threads != no ; then
14670                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14671
14672                                                 save_CPPFLAGS="$CPPFLAGS"
14673                         save_LIBS="$LIBS"
14674                         LIBS="$LTHREAD_LIBS $LIBS"
14675
14676                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14677 do
14678 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14679 echo "configure:14680: checking for $ac_func" >&5
14680 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14681   echo $ac_n "(cached) $ac_c" 1>&6
14682 else
14683   cat > conftest.$ac_ext <<EOF
14684 #line 14685 "configure"
14685 #include "confdefs.h"
14686 /* System header to define __stub macros and hopefully few prototypes,
14687     which can conflict with char $ac_func(); below.  */
14688 #include <assert.h>
14689 /* Override any gcc2 internal prototype to avoid an error.  */
14690 /* We use char because int might match the return type of a gcc2
14691     builtin and then its argument prototype would still apply.  */
14692 char $ac_func();
14693 char (*f)();
14694
14695 int main() {
14696
14697 /* The GNU C library defines this for functions which it implements
14698     to always fail with ENOSYS.  Some functions are actually named
14699     something starting with __ and the normal name is an alias.  */
14700 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14701 choke me
14702 #else
14703 f = $ac_func;
14704 #endif
14705
14706 ; return 0; }
14707 EOF
14708 if { (eval echo configure:14709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14709   rm -rf conftest*
14710   eval "ac_cv_func_$ac_func=yes"
14711 else
14712   echo "configure: failed program was:" >&5
14713   cat conftest.$ac_ext >&5
14714   rm -rf conftest*
14715   eval "ac_cv_func_$ac_func=no"
14716 fi
14717 rm -f conftest*
14718 fi
14719
14720 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14721   echo "$ac_t""yes" 1>&6
14722     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14723   cat >> confdefs.h <<EOF
14724 #define $ac_tr_func 1
14725 EOF
14726  
14727 else
14728   echo "$ac_t""no" 1>&6
14729 fi
14730 done
14731
14732
14733                         if test $ac_cv_func_sched_yield = no -a \
14734                                 $ac_cv_func_pthread_yield = no -a \
14735                                 $ac_cv_func_thr_yield = no ; then
14736                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14737 echo "configure:14738: checking for sched_yield in -lrt" >&5
14738 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14739 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14740   echo $ac_n "(cached) $ac_c" 1>&6
14741 else
14742   ac_save_LIBS="$LIBS"
14743 LIBS="-lrt  $LIBS"
14744 cat > conftest.$ac_ext <<EOF
14745 #line 14746 "configure"
14746 #include "confdefs.h"
14747 /* Override any gcc2 internal prototype to avoid an error.  */
14748 /* We use char because int might match the return type of a gcc2
14749     builtin and then its argument prototype would still apply.  */
14750 char sched_yield();
14751
14752 int main() {
14753 sched_yield()
14754 ; return 0; }
14755 EOF
14756 if { (eval echo configure:14757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14757   rm -rf conftest*
14758   eval "ac_cv_lib_$ac_lib_var=yes"
14759 else
14760   echo "configure: failed program was:" >&5
14761   cat conftest.$ac_ext >&5
14762   rm -rf conftest*
14763   eval "ac_cv_lib_$ac_lib_var=no"
14764 fi
14765 rm -f conftest*
14766 LIBS="$ac_save_LIBS"
14767
14768 fi
14769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14770   echo "$ac_t""yes" 1>&6
14771   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14772                                         cat >> confdefs.h <<\EOF
14773 #define HAVE_SCHED_YIELD 1
14774 EOF
14775
14776                                         ac_cv_func_sched_yield=yes
14777 else
14778   echo "$ac_t""no" 1>&6
14779 ac_cv_func_sched_yield=no
14780 fi
14781
14782                         fi
14783                         if test $ac_cv_func_sched_yield = no -a \
14784                                 $ac_cv_func_pthread_yield = no -a \
14785                                 "$ac_cv_func_thr_yield" = no ; then
14786                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14787                         fi
14788
14789                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14790 do
14791 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14792 echo "configure:14793: checking for $ac_func" >&5
14793 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14794   echo $ac_n "(cached) $ac_c" 1>&6
14795 else
14796   cat > conftest.$ac_ext <<EOF
14797 #line 14798 "configure"
14798 #include "confdefs.h"
14799 /* System header to define __stub macros and hopefully few prototypes,
14800     which can conflict with char $ac_func(); below.  */
14801 #include <assert.h>
14802 /* Override any gcc2 internal prototype to avoid an error.  */
14803 /* We use char because int might match the return type of a gcc2
14804     builtin and then its argument prototype would still apply.  */
14805 char $ac_func();
14806 char (*f)();
14807
14808 int main() {
14809
14810 /* The GNU C library defines this for functions which it implements
14811     to always fail with ENOSYS.  Some functions are actually named
14812     something starting with __ and the normal name is an alias.  */
14813 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14814 choke me
14815 #else
14816 f = $ac_func;
14817 #endif
14818
14819 ; return 0; }
14820 EOF
14821 if { (eval echo configure:14822: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14822   rm -rf conftest*
14823   eval "ac_cv_func_$ac_func=yes"
14824 else
14825   echo "configure: failed program was:" >&5
14826   cat conftest.$ac_ext >&5
14827   rm -rf conftest*
14828   eval "ac_cv_func_$ac_func=no"
14829 fi
14830 rm -f conftest*
14831 fi
14832
14833 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14834   echo "$ac_t""yes" 1>&6
14835     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14836   cat >> confdefs.h <<EOF
14837 #define $ac_tr_func 1
14838 EOF
14839  
14840 else
14841   echo "$ac_t""no" 1>&6
14842 fi
14843 done
14844
14845
14846                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14847 echo "configure:14848: checking for pthread_detach with <pthread.h>" >&5
14848 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14849   echo $ac_n "(cached) $ac_c" 1>&6
14850 else
14851   
14852                                                                 cat > conftest.$ac_ext <<EOF
14853 #line 14854 "configure"
14854 #include "confdefs.h"
14855
14856 #include <pthread.h>
14857 #ifndef NULL
14858 #define NULL (void*)0
14859 #endif
14860
14861 int main() {
14862 pthread_detach(NULL);
14863 ; return 0; }
14864 EOF
14865 if { (eval echo configure:14866: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14866   rm -rf conftest*
14867   ol_cv_func_pthread_detach=yes
14868 else
14869   echo "configure: failed program was:" >&5
14870   cat conftest.$ac_ext >&5
14871   rm -rf conftest*
14872   ol_cv_func_pthread_detach=no
14873 fi
14874 rm -f conftest*
14875                         
14876 fi
14877
14878 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
14879
14880                         if test $ol_cv_func_pthread_detach = no ; then
14881                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
14882                         fi
14883
14884                         cat >> confdefs.h <<\EOF
14885 #define HAVE_PTHREAD_DETACH 1
14886 EOF
14887
14888
14889                                                 for ac_func in \
14890                                 pthread_setconcurrency \
14891                                 pthread_getconcurrency \
14892                                 thr_setconcurrency \
14893                                 thr_getconcurrency \
14894                         
14895 do
14896 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14897 echo "configure:14898: checking for $ac_func" >&5
14898 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14899   echo $ac_n "(cached) $ac_c" 1>&6
14900 else
14901   cat > conftest.$ac_ext <<EOF
14902 #line 14903 "configure"
14903 #include "confdefs.h"
14904 /* System header to define __stub macros and hopefully few prototypes,
14905     which can conflict with char $ac_func(); below.  */
14906 #include <assert.h>
14907 /* Override any gcc2 internal prototype to avoid an error.  */
14908 /* We use char because int might match the return type of a gcc2
14909     builtin and then its argument prototype would still apply.  */
14910 char $ac_func();
14911 char (*f)();
14912
14913 int main() {
14914
14915 /* The GNU C library defines this for functions which it implements
14916     to always fail with ENOSYS.  Some functions are actually named
14917     something starting with __ and the normal name is an alias.  */
14918 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14919 choke me
14920 #else
14921 f = $ac_func;
14922 #endif
14923
14924 ; return 0; }
14925 EOF
14926 if { (eval echo configure:14927: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14927   rm -rf conftest*
14928   eval "ac_cv_func_$ac_func=yes"
14929 else
14930   echo "configure: failed program was:" >&5
14931   cat conftest.$ac_ext >&5
14932   rm -rf conftest*
14933   eval "ac_cv_func_$ac_func=no"
14934 fi
14935 rm -f conftest*
14936 fi
14937
14938 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14939   echo "$ac_t""yes" 1>&6
14940     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14941   cat >> confdefs.h <<EOF
14942 #define $ac_tr_func 1
14943 EOF
14944  
14945 else
14946   echo "$ac_t""no" 1>&6
14947 fi
14948 done
14949
14950
14951                         
14952         for ac_func in pthread_kill_other_threads_np
14953 do
14954 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14955 echo "configure:14956: checking for $ac_func" >&5
14956 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14957   echo $ac_n "(cached) $ac_c" 1>&6
14958 else
14959   cat > conftest.$ac_ext <<EOF
14960 #line 14961 "configure"
14961 #include "confdefs.h"
14962 /* System header to define __stub macros and hopefully few prototypes,
14963     which can conflict with char $ac_func(); below.  */
14964 #include <assert.h>
14965 /* Override any gcc2 internal prototype to avoid an error.  */
14966 /* We use char because int might match the return type of a gcc2
14967     builtin and then its argument prototype would still apply.  */
14968 char $ac_func();
14969 char (*f)();
14970
14971 int main() {
14972
14973 /* The GNU C library defines this for functions which it implements
14974     to always fail with ENOSYS.  Some functions are actually named
14975     something starting with __ and the normal name is an alias.  */
14976 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14977 choke me
14978 #else
14979 f = $ac_func;
14980 #endif
14981
14982 ; return 0; }
14983 EOF
14984 if { (eval echo configure:14985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14985   rm -rf conftest*
14986   eval "ac_cv_func_$ac_func=yes"
14987 else
14988   echo "configure: failed program was:" >&5
14989   cat conftest.$ac_ext >&5
14990   rm -rf conftest*
14991   eval "ac_cv_func_$ac_func=no"
14992 fi
14993 rm -f conftest*
14994 fi
14995
14996 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14997   echo "$ac_t""yes" 1>&6
14998     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14999   cat >> confdefs.h <<EOF
15000 #define $ac_tr_func 1
15001 EOF
15002  
15003 else
15004   echo "$ac_t""no" 1>&6
15005 fi
15006 done
15007
15008         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15009 echo "configure:15010: checking for LinuxThreads implementation" >&5
15010 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15011   echo $ac_n "(cached) $ac_c" 1>&6
15012 else
15013   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15014 fi
15015
15016 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15017
15018                         
15019         
15020         
15021         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15022 echo "configure:15023: checking for LinuxThreads consistency" >&5
15023 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15024   echo $ac_n "(cached) $ac_c" 1>&6
15025 else
15026   
15027                 if test $ol_cv_header_linux_threads = yes -a \
15028                         $ol_cv_sys_linux_threads = yes; then
15029                         ol_cv_linux_threads=yes
15030                 elif test $ol_cv_header_linux_threads = no -a \
15031                         $ol_cv_sys_linux_threads = no; then
15032                         ol_cv_linux_threads=no
15033                 else
15034                         ol_cv_linux_threads=error
15035                 fi
15036         
15037 fi
15038
15039 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15040
15041
15042                         if test $ol_cv_linux_threads = error; then
15043                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15044                         fi
15045
15046                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15047 echo "configure:15048: checking if pthread_create() works" >&5
15048 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15049   echo $ac_n "(cached) $ac_c" 1>&6
15050 else
15051   
15052                         if test "$cross_compiling" = yes; then
15053                                 ol_cv_pthread_create_works=yes
15054 else
15055   cat > conftest.$ac_ext <<EOF
15056 #line 15057 "configure"
15057 #include "confdefs.h"
15058 /* pthread test headers */
15059 #include <pthread.h>
15060 #if HAVE_PTHREADS < 7
15061 #include <errno.h>
15062 #endif
15063 #ifndef NULL
15064 #define NULL (void*)0
15065 #endif
15066
15067 static void *task(p)
15068         void *p;
15069 {
15070         return (void *) (p == NULL);
15071 }
15072
15073
15074 int main(argc, argv)
15075         int argc;
15076         char **argv;
15077 {
15078
15079         /* pthread test function */
15080 #ifndef PTHREAD_CREATE_DETACHED
15081 #define PTHREAD_CREATE_DETACHED 1
15082 #endif
15083         pthread_t t;
15084         int status;
15085         int detach = PTHREAD_CREATE_DETACHED;
15086
15087 #if HAVE_PTHREADS > 4
15088         /* Final pthreads */
15089         pthread_attr_t attr;
15090
15091         status = pthread_attr_init(&attr);
15092         if( status ) return status;
15093
15094 #if HAVE_PTHREADS < 7
15095         status = pthread_attr_setdetachstate(&attr, &detach);
15096         if( status < 0 ) status = errno;
15097 #else
15098         status = pthread_attr_setdetachstate(&attr, detach);
15099 #endif
15100         if( status ) return status;
15101         status = pthread_create( &t, &attr, task, NULL );
15102 #if HAVE_PTHREADS < 7
15103         if( status < 0 ) status = errno;
15104 #endif
15105         if( status ) return status;
15106 #else
15107         /* Draft 4 pthreads */
15108         status = pthread_create( &t, pthread_attr_default, task, NULL );
15109         if( status ) return errno;
15110
15111         /* give thread a chance to complete */
15112         /* it should remain joinable and hence detachable */
15113         sleep( 1 );
15114
15115         status = pthread_detach( &t );
15116         if( status ) return errno;
15117 #endif
15118
15119 #ifdef HAVE_LINUX_THREADS
15120         pthread_kill_other_threads_np();
15121 #endif
15122
15123         return 0;
15124
15125 }
15126
15127 EOF
15128 if { (eval echo configure:15129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15129 then
15130   ol_cv_pthread_create_works=yes
15131 else
15132   echo "configure: failed program was:" >&5
15133   cat conftest.$ac_ext >&5
15134   rm -fr conftest*
15135   ol_cv_pthread_create_works=no
15136 fi
15137 rm -fr conftest*
15138 fi
15139
15140 fi
15141
15142 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15143
15144                         if test $ol_cv_pthread_create_works = no ; then
15145                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15146                         fi
15147
15148                                                 if test $ol_with_yielding_select = auto ; then
15149                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15150 echo "configure:15151: checking if select yields when using pthreads" >&5
15151 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15152   echo $ac_n "(cached) $ac_c" 1>&6
15153 else
15154   
15155                                 if test "$cross_compiling" = yes; then
15156   ol_cv_pthread_select_yields=cross
15157 else
15158   cat > conftest.$ac_ext <<EOF
15159 #line 15160 "configure"
15160 #include "confdefs.h"
15161
15162 #include <sys/types.h>
15163 #include <sys/time.h>
15164 #include <unistd.h>
15165 #include <pthread.h>
15166 #ifndef NULL
15167 #define NULL (void*) 0
15168 #endif
15169
15170 static int fildes[2];
15171
15172 static void *task(p)
15173         void *p;
15174 {
15175         int i;
15176         struct timeval tv;
15177
15178         fd_set rfds;
15179
15180         tv.tv_sec=10;
15181         tv.tv_usec=0;
15182
15183         FD_ZERO(&rfds);
15184         FD_SET(fildes[0], &rfds);
15185
15186         /* we're not interested in any fds */
15187         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15188
15189         if(i < 0) {
15190                 perror("select");
15191                 exit(10);
15192         }
15193
15194         exit(0); /* if we exit here, the select blocked the whole process */
15195 }
15196
15197 int main(argc, argv)
15198         int argc;
15199         char **argv;
15200 {
15201         pthread_t t;
15202
15203         /* create a pipe to select */
15204         if(pipe(&fildes[0])) {
15205                 perror("select");
15206                 exit(1);
15207         }
15208
15209 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15210         (void) pthread_setconcurrency(2);
15211 #else
15212 #ifdef HAVE_THR_SETCONCURRENCY
15213         /* Set Solaris LWP concurrency to 2 */
15214         thr_setconcurrency(2);
15215 #endif
15216 #endif
15217
15218 #if HAVE_PTHREADS < 6
15219         pthread_create(&t, pthread_attr_default, task, NULL);
15220 #else
15221         pthread_create(&t, NULL, task, NULL);
15222 #endif
15223
15224         /* make sure task runs first */
15225 #if HAVE_THR_YIELD
15226         thr_yield();
15227 #elif defined( HAVE_SCHED_YIELD )
15228         sched_yield();
15229 #elif defined( HAVE_PTHREAD_YIELD )
15230         pthread_yield();
15231 #endif
15232
15233         exit(2);
15234 }
15235 EOF
15236 if { (eval echo configure:15237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15237 then
15238   ol_cv_pthread_select_yields=no
15239 else
15240   echo "configure: failed program was:" >&5
15241   cat conftest.$ac_ext >&5
15242   rm -fr conftest*
15243   ol_cv_pthread_select_yields=yes
15244 fi
15245 rm -fr conftest*
15246 fi
15247
15248 fi
15249
15250 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15251
15252                                 if test $ol_cv_pthread_select_yields = cross ; then
15253                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15254                                 fi
15255
15256                                 if test $ol_cv_pthread_select_yields = yes ; then
15257                                         ol_with_yielding_select=yes
15258                                 fi
15259                         fi
15260
15261                                                 CPPFLAGS="$save_CPPFLAGS"
15262                         LIBS="$save_LIBS"
15263                 else
15264                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15265                 fi
15266         fi
15267
15268         if test $ol_with_threads = posix ; then
15269                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15270         fi
15271 fi
15272
15273 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15274         -o $ol_with_threads = mach ; then
15275
15276                 for ac_hdr in mach/cthreads.h cthreads.h
15277 do
15278 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15279 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15280 echo "configure:15281: checking for $ac_hdr" >&5
15281 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15282   echo $ac_n "(cached) $ac_c" 1>&6
15283 else
15284   cat > conftest.$ac_ext <<EOF
15285 #line 15286 "configure"
15286 #include "confdefs.h"
15287 #include <$ac_hdr>
15288 EOF
15289 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15290 { (eval echo configure:15291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15291 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15292 if test -z "$ac_err"; then
15293   rm -rf conftest*
15294   eval "ac_cv_header_$ac_safe=yes"
15295 else
15296   echo "$ac_err" >&5
15297   echo "configure: failed program was:" >&5
15298   cat conftest.$ac_ext >&5
15299   rm -rf conftest*
15300   eval "ac_cv_header_$ac_safe=no"
15301 fi
15302 rm -f conftest*
15303 fi
15304 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15305   echo "$ac_t""yes" 1>&6
15306     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15307   cat >> confdefs.h <<EOF
15308 #define $ac_tr_hdr 1
15309 EOF
15310  
15311 else
15312   echo "$ac_t""no" 1>&6
15313 fi
15314 done
15315
15316         if test $ac_cv_header_mach_cthreads_h = yes ; then
15317                 ol_with_threads=found
15318
15319                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15320 echo "configure:15321: checking for cthread_fork" >&5
15321 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15322   echo $ac_n "(cached) $ac_c" 1>&6
15323 else
15324   cat > conftest.$ac_ext <<EOF
15325 #line 15326 "configure"
15326 #include "confdefs.h"
15327 /* System header to define __stub macros and hopefully few prototypes,
15328     which can conflict with char cthread_fork(); below.  */
15329 #include <assert.h>
15330 /* Override any gcc2 internal prototype to avoid an error.  */
15331 /* We use char because int might match the return type of a gcc2
15332     builtin and then its argument prototype would still apply.  */
15333 char cthread_fork();
15334 char (*f)();
15335
15336 int main() {
15337
15338 /* The GNU C library defines this for functions which it implements
15339     to always fail with ENOSYS.  Some functions are actually named
15340     something starting with __ and the normal name is an alias.  */
15341 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15342 choke me
15343 #else
15344 f = cthread_fork;
15345 #endif
15346
15347 ; return 0; }
15348 EOF
15349 if { (eval echo configure:15350: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15350   rm -rf conftest*
15351   eval "ac_cv_func_cthread_fork=yes"
15352 else
15353   echo "configure: failed program was:" >&5
15354   cat conftest.$ac_ext >&5
15355   rm -rf conftest*
15356   eval "ac_cv_func_cthread_fork=no"
15357 fi
15358 rm -f conftest*
15359 fi
15360
15361 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15362   echo "$ac_t""yes" 1>&6
15363   ol_link_threads=yes
15364 else
15365   echo "$ac_t""no" 1>&6
15366 fi
15367
15368
15369                 if test $ol_link_threads = no ; then
15370                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15371 echo "configure:15372: checking for cthread_fork with -all_load" >&5
15372 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15373   echo $ac_n "(cached) $ac_c" 1>&6
15374 else
15375   
15376                                                                 save_LIBS="$LIBS"
15377                                 LIBS="-all_load $LIBS"
15378                                 cat > conftest.$ac_ext <<EOF
15379 #line 15380 "configure"
15380 #include "confdefs.h"
15381 #include <mach/cthreads.h>
15382 int main() {
15383
15384                                         cthread_fork((void *)0, (void *)0);
15385                                         
15386 ; return 0; }
15387 EOF
15388 if { (eval echo configure:15389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15389   rm -rf conftest*
15390   ol_cv_cthread_all_load=yes
15391 else
15392   echo "configure: failed program was:" >&5
15393   cat conftest.$ac_ext >&5
15394   rm -rf conftest*
15395   ol_cv_cthread_all_load=no
15396 fi
15397 rm -f conftest*
15398                                                                 LIBS="$save_LIBS"
15399                         
15400 fi
15401
15402 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15403
15404                         if test $ol_cv_cthread_all_load = yes ; then
15405                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15406                                 ol_link_threads=mach
15407                                 ol_with_threads=found
15408                         fi
15409                 fi
15410
15411         elif test $ac_cv_header_cthreads_h = yes ; then
15412                                 
15413                 ol_with_threads=found
15414  
15415                                 save_LIBS="$LIBS"
15416                 LIBS="$LIBS -lthreads"
15417                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15418 echo "configure:15419: checking for cthread_fork" >&5
15419 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15420   echo $ac_n "(cached) $ac_c" 1>&6
15421 else
15422   cat > conftest.$ac_ext <<EOF
15423 #line 15424 "configure"
15424 #include "confdefs.h"
15425 /* System header to define __stub macros and hopefully few prototypes,
15426     which can conflict with char cthread_fork(); below.  */
15427 #include <assert.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 cthread_fork();
15432 char (*f)();
15433
15434 int main() {
15435
15436 /* The GNU C library defines this for functions which it implements
15437     to always fail with ENOSYS.  Some functions are actually named
15438     something starting with __ and the normal name is an alias.  */
15439 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15440 choke me
15441 #else
15442 f = cthread_fork;
15443 #endif
15444
15445 ; return 0; }
15446 EOF
15447 if { (eval echo configure:15448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15448   rm -rf conftest*
15449   eval "ac_cv_func_cthread_fork=yes"
15450 else
15451   echo "configure: failed program was:" >&5
15452   cat conftest.$ac_ext >&5
15453   rm -rf conftest*
15454   eval "ac_cv_func_cthread_fork=no"
15455 fi
15456 rm -f conftest*
15457 fi
15458
15459 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15460   echo "$ac_t""yes" 1>&6
15461   ol_link_threads=yes
15462 else
15463   echo "$ac_t""no" 1>&6
15464 fi
15465
15466                 LIBS="$save_LIBS"
15467
15468                 if test $ol_link_threads = yes ; then
15469                         LTHREAD_LIBS="-lthreads"
15470                         ol_link_threads=mach
15471                         ol_with_threads=found
15472                 else
15473                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15474                 fi
15475
15476         elif test $ol_with_threads = mach ; then
15477                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15478         fi
15479
15480         if test $ol_link_threads = mach ; then
15481                 cat >> confdefs.h <<\EOF
15482 #define HAVE_MACH_CTHREADS 1
15483 EOF
15484
15485         elif test $ol_with_threads = found ; then
15486                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15487         fi
15488 fi
15489
15490 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15491         -o $ol_with_threads = pth ; then
15492
15493         for ac_hdr in pth.h
15494 do
15495 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15496 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15497 echo "configure:15498: checking for $ac_hdr" >&5
15498 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15499   echo $ac_n "(cached) $ac_c" 1>&6
15500 else
15501   cat > conftest.$ac_ext <<EOF
15502 #line 15503 "configure"
15503 #include "confdefs.h"
15504 #include <$ac_hdr>
15505 EOF
15506 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15507 { (eval echo configure:15508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15508 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15509 if test -z "$ac_err"; then
15510   rm -rf conftest*
15511   eval "ac_cv_header_$ac_safe=yes"
15512 else
15513   echo "$ac_err" >&5
15514   echo "configure: failed program was:" >&5
15515   cat conftest.$ac_ext >&5
15516   rm -rf conftest*
15517   eval "ac_cv_header_$ac_safe=no"
15518 fi
15519 rm -f conftest*
15520 fi
15521 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15522   echo "$ac_t""yes" 1>&6
15523     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15524   cat >> confdefs.h <<EOF
15525 #define $ac_tr_hdr 1
15526 EOF
15527  
15528 else
15529   echo "$ac_t""no" 1>&6
15530 fi
15531 done
15532
15533
15534         if test $ac_cv_header_pth_h = yes ; then
15535                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15536 echo "configure:15537: checking for pth_version in -lpth" >&5
15537 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15538 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15539   echo $ac_n "(cached) $ac_c" 1>&6
15540 else
15541   ac_save_LIBS="$LIBS"
15542 LIBS="-lpth  $LIBS"
15543 cat > conftest.$ac_ext <<EOF
15544 #line 15545 "configure"
15545 #include "confdefs.h"
15546 /* Override any gcc2 internal prototype to avoid an error.  */
15547 /* We use char because int might match the return type of a gcc2
15548     builtin and then its argument prototype would still apply.  */
15549 char pth_version();
15550
15551 int main() {
15552 pth_version()
15553 ; return 0; }
15554 EOF
15555 if { (eval echo configure:15556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15556   rm -rf conftest*
15557   eval "ac_cv_lib_$ac_lib_var=yes"
15558 else
15559   echo "configure: failed program was:" >&5
15560   cat conftest.$ac_ext >&5
15561   rm -rf conftest*
15562   eval "ac_cv_lib_$ac_lib_var=no"
15563 fi
15564 rm -f conftest*
15565 LIBS="$ac_save_LIBS"
15566
15567 fi
15568 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15569   echo "$ac_t""yes" 1>&6
15570   have_pth=yes
15571 else
15572   echo "$ac_t""no" 1>&6
15573 have_pth=no
15574 fi
15575
15576
15577                 if test $have_pth = yes ; then
15578                         cat >> confdefs.h <<\EOF
15579 #define HAVE_GNU_PTH 1
15580 EOF
15581
15582                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15583                         ol_link_threads=pth
15584                         ol_with_threads=found
15585
15586                         if test $ol_with_yielding_select = auto ; then
15587                                 ol_with_yielding_select=yes
15588                         fi
15589                 fi
15590         fi
15591 fi
15592
15593 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15594         -o $ol_with_threads = lwp ; then
15595
15596                 for ac_hdr in thread.h synch.h
15597 do
15598 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15599 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15600 echo "configure:15601: checking for $ac_hdr" >&5
15601 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15602   echo $ac_n "(cached) $ac_c" 1>&6
15603 else
15604   cat > conftest.$ac_ext <<EOF
15605 #line 15606 "configure"
15606 #include "confdefs.h"
15607 #include <$ac_hdr>
15608 EOF
15609 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15610 { (eval echo configure:15611: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15611 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15612 if test -z "$ac_err"; then
15613   rm -rf conftest*
15614   eval "ac_cv_header_$ac_safe=yes"
15615 else
15616   echo "$ac_err" >&5
15617   echo "configure: failed program was:" >&5
15618   cat conftest.$ac_ext >&5
15619   rm -rf conftest*
15620   eval "ac_cv_header_$ac_safe=no"
15621 fi
15622 rm -f conftest*
15623 fi
15624 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15625   echo "$ac_t""yes" 1>&6
15626     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15627   cat >> confdefs.h <<EOF
15628 #define $ac_tr_hdr 1
15629 EOF
15630  
15631 else
15632   echo "$ac_t""no" 1>&6
15633 fi
15634 done
15635
15636         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15637                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15638 echo "configure:15639: checking for thr_create in -lthread" >&5
15639 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15640 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15641   echo $ac_n "(cached) $ac_c" 1>&6
15642 else
15643   ac_save_LIBS="$LIBS"
15644 LIBS="-lthread  $LIBS"
15645 cat > conftest.$ac_ext <<EOF
15646 #line 15647 "configure"
15647 #include "confdefs.h"
15648 /* Override any gcc2 internal prototype to avoid an error.  */
15649 /* We use char because int might match the return type of a gcc2
15650     builtin and then its argument prototype would still apply.  */
15651 char thr_create();
15652
15653 int main() {
15654 thr_create()
15655 ; return 0; }
15656 EOF
15657 if { (eval echo configure:15658: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15658   rm -rf conftest*
15659   eval "ac_cv_lib_$ac_lib_var=yes"
15660 else
15661   echo "configure: failed program was:" >&5
15662   cat conftest.$ac_ext >&5
15663   rm -rf conftest*
15664   eval "ac_cv_lib_$ac_lib_var=no"
15665 fi
15666 rm -f conftest*
15667 LIBS="$ac_save_LIBS"
15668
15669 fi
15670 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15671   echo "$ac_t""yes" 1>&6
15672   have_thr=yes
15673 else
15674   echo "$ac_t""no" 1>&6
15675 have_thr=no
15676 fi
15677
15678
15679                 if test $have_thr = yes ; then
15680                         cat >> confdefs.h <<\EOF
15681 #define HAVE_THR 1
15682 EOF
15683
15684                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15685                         ol_link_threads=thr
15686
15687                         if test $ol_with_yielding_select = auto ; then
15688                                 ol_with_yielding_select=yes
15689                         fi
15690
15691                                                 for ac_func in \
15692                                 thr_setconcurrency \
15693                                 thr_getconcurrency \
15694                         
15695 do
15696 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15697 echo "configure:15698: checking for $ac_func" >&5
15698 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15699   echo $ac_n "(cached) $ac_c" 1>&6
15700 else
15701   cat > conftest.$ac_ext <<EOF
15702 #line 15703 "configure"
15703 #include "confdefs.h"
15704 /* System header to define __stub macros and hopefully few prototypes,
15705     which can conflict with char $ac_func(); below.  */
15706 #include <assert.h>
15707 /* Override any gcc2 internal prototype to avoid an error.  */
15708 /* We use char because int might match the return type of a gcc2
15709     builtin and then its argument prototype would still apply.  */
15710 char $ac_func();
15711 char (*f)();
15712
15713 int main() {
15714
15715 /* The GNU C library defines this for functions which it implements
15716     to always fail with ENOSYS.  Some functions are actually named
15717     something starting with __ and the normal name is an alias.  */
15718 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15719 choke me
15720 #else
15721 f = $ac_func;
15722 #endif
15723
15724 ; return 0; }
15725 EOF
15726 if { (eval echo configure:15727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15727   rm -rf conftest*
15728   eval "ac_cv_func_$ac_func=yes"
15729 else
15730   echo "configure: failed program was:" >&5
15731   cat conftest.$ac_ext >&5
15732   rm -rf conftest*
15733   eval "ac_cv_func_$ac_func=no"
15734 fi
15735 rm -f conftest*
15736 fi
15737
15738 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15739   echo "$ac_t""yes" 1>&6
15740     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15741   cat >> confdefs.h <<EOF
15742 #define $ac_tr_func 1
15743 EOF
15744  
15745 else
15746   echo "$ac_t""no" 1>&6
15747 fi
15748 done
15749
15750                 fi
15751         fi
15752
15753                 for ac_hdr in lwp/lwp.h
15754 do
15755 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15756 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15757 echo "configure:15758: checking for $ac_hdr" >&5
15758 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15759   echo $ac_n "(cached) $ac_c" 1>&6
15760 else
15761   cat > conftest.$ac_ext <<EOF
15762 #line 15763 "configure"
15763 #include "confdefs.h"
15764 #include <$ac_hdr>
15765 EOF
15766 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15767 { (eval echo configure:15768: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15768 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15769 if test -z "$ac_err"; then
15770   rm -rf conftest*
15771   eval "ac_cv_header_$ac_safe=yes"
15772 else
15773   echo "$ac_err" >&5
15774   echo "configure: failed program was:" >&5
15775   cat conftest.$ac_ext >&5
15776   rm -rf conftest*
15777   eval "ac_cv_header_$ac_safe=no"
15778 fi
15779 rm -f conftest*
15780 fi
15781 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15782   echo "$ac_t""yes" 1>&6
15783     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15784   cat >> confdefs.h <<EOF
15785 #define $ac_tr_hdr 1
15786 EOF
15787  
15788 else
15789   echo "$ac_t""no" 1>&6
15790 fi
15791 done
15792
15793         if test $ac_cv_header_lwp_lwp_h = yes ; then
15794                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15795 echo "configure:15796: checking for lwp_create in -llwp" >&5
15796 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15797 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15798   echo $ac_n "(cached) $ac_c" 1>&6
15799 else
15800   ac_save_LIBS="$LIBS"
15801 LIBS="-llwp  $LIBS"
15802 cat > conftest.$ac_ext <<EOF
15803 #line 15804 "configure"
15804 #include "confdefs.h"
15805 /* Override any gcc2 internal prototype to avoid an error.  */
15806 /* We use char because int might match the return type of a gcc2
15807     builtin and then its argument prototype would still apply.  */
15808 char lwp_create();
15809
15810 int main() {
15811 lwp_create()
15812 ; return 0; }
15813 EOF
15814 if { (eval echo configure:15815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15815   rm -rf conftest*
15816   eval "ac_cv_lib_$ac_lib_var=yes"
15817 else
15818   echo "configure: failed program was:" >&5
15819   cat conftest.$ac_ext >&5
15820   rm -rf conftest*
15821   eval "ac_cv_lib_$ac_lib_var=no"
15822 fi
15823 rm -f conftest*
15824 LIBS="$ac_save_LIBS"
15825
15826 fi
15827 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15828   echo "$ac_t""yes" 1>&6
15829   have_lwp=yes
15830 else
15831   echo "$ac_t""no" 1>&6
15832 have_lwp=no
15833 fi
15834
15835
15836                 if test $have_lwp = yes ; then
15837                         cat >> confdefs.h <<\EOF
15838 #define HAVE_LWP 1
15839 EOF
15840
15841                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15842                         ol_link_threads=lwp
15843
15844                         if test $ol_with_yielding_select = auto ; then
15845                                 ol_with_yielding_select=no
15846                         fi
15847                 fi
15848         fi
15849 fi
15850
15851 if test $ol_with_yielding_select = yes ; then
15852         cat >> confdefs.h <<\EOF
15853 #define HAVE_YIELDING_SELECT 1
15854 EOF
15855
15856 fi
15857
15858 if test $ol_with_threads = manual ; then
15859                 ol_link_threads=yes
15860
15861         echo "configure: warning: thread defines and link options must be set manually" 1>&2
15862
15863         for ac_hdr in pthread.h sched.h
15864 do
15865 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15866 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15867 echo "configure:15868: checking for $ac_hdr" >&5
15868 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15869   echo $ac_n "(cached) $ac_c" 1>&6
15870 else
15871   cat > conftest.$ac_ext <<EOF
15872 #line 15873 "configure"
15873 #include "confdefs.h"
15874 #include <$ac_hdr>
15875 EOF
15876 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15877 { (eval echo configure:15878: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15878 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15879 if test -z "$ac_err"; then
15880   rm -rf conftest*
15881   eval "ac_cv_header_$ac_safe=yes"
15882 else
15883   echo "$ac_err" >&5
15884   echo "configure: failed program was:" >&5
15885   cat conftest.$ac_ext >&5
15886   rm -rf conftest*
15887   eval "ac_cv_header_$ac_safe=no"
15888 fi
15889 rm -f conftest*
15890 fi
15891 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15892   echo "$ac_t""yes" 1>&6
15893     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15894   cat >> confdefs.h <<EOF
15895 #define $ac_tr_hdr 1
15896 EOF
15897  
15898 else
15899   echo "$ac_t""no" 1>&6
15900 fi
15901 done
15902
15903         for ac_func in sched_yield pthread_yield
15904 do
15905 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15906 echo "configure:15907: checking for $ac_func" >&5
15907 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15908   echo $ac_n "(cached) $ac_c" 1>&6
15909 else
15910   cat > conftest.$ac_ext <<EOF
15911 #line 15912 "configure"
15912 #include "confdefs.h"
15913 /* System header to define __stub macros and hopefully few prototypes,
15914     which can conflict with char $ac_func(); below.  */
15915 #include <assert.h>
15916 /* Override any gcc2 internal prototype to avoid an error.  */
15917 /* We use char because int might match the return type of a gcc2
15918     builtin and then its argument prototype would still apply.  */
15919 char $ac_func();
15920 char (*f)();
15921
15922 int main() {
15923
15924 /* The GNU C library defines this for functions which it implements
15925     to always fail with ENOSYS.  Some functions are actually named
15926     something starting with __ and the normal name is an alias.  */
15927 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15928 choke me
15929 #else
15930 f = $ac_func;
15931 #endif
15932
15933 ; return 0; }
15934 EOF
15935 if { (eval echo configure:15936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15936   rm -rf conftest*
15937   eval "ac_cv_func_$ac_func=yes"
15938 else
15939   echo "configure: failed program was:" >&5
15940   cat conftest.$ac_ext >&5
15941   rm -rf conftest*
15942   eval "ac_cv_func_$ac_func=no"
15943 fi
15944 rm -f conftest*
15945 fi
15946
15947 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15948   echo "$ac_t""yes" 1>&6
15949     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15950   cat >> confdefs.h <<EOF
15951 #define $ac_tr_func 1
15952 EOF
15953  
15954 else
15955   echo "$ac_t""no" 1>&6
15956 fi
15957 done
15958
15959         
15960         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
15961 echo "configure:15962: checking for LinuxThreads pthread.h" >&5
15962 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
15963   echo $ac_n "(cached) $ac_c" 1>&6
15964 else
15965   cat > conftest.$ac_ext <<EOF
15966 #line 15967 "configure"
15967 #include "confdefs.h"
15968 #include <pthread.h>
15969 EOF
15970 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15971   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
15972   rm -rf conftest*
15973   ol_cv_header_linux_threads=yes
15974 else
15975   rm -rf conftest*
15976   ol_cv_header_linux_threads=no
15977 fi
15978 rm -f conftest*
15979
15980                 
15981 fi
15982
15983 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
15984         if test $ol_cv_header_linux_threads = yes; then
15985                 cat >> confdefs.h <<\EOF
15986 #define HAVE_LINUX_THREADS 1
15987 EOF
15988
15989         fi
15990
15991
15992         for ac_hdr in mach/cthreads.h
15993 do
15994 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15995 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15996 echo "configure:15997: checking for $ac_hdr" >&5
15997 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15998   echo $ac_n "(cached) $ac_c" 1>&6
15999 else
16000   cat > conftest.$ac_ext <<EOF
16001 #line 16002 "configure"
16002 #include "confdefs.h"
16003 #include <$ac_hdr>
16004 EOF
16005 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16006 { (eval echo configure:16007: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16007 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16008 if test -z "$ac_err"; then
16009   rm -rf conftest*
16010   eval "ac_cv_header_$ac_safe=yes"
16011 else
16012   echo "$ac_err" >&5
16013   echo "configure: failed program was:" >&5
16014   cat conftest.$ac_ext >&5
16015   rm -rf conftest*
16016   eval "ac_cv_header_$ac_safe=no"
16017 fi
16018 rm -f conftest*
16019 fi
16020 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16021   echo "$ac_t""yes" 1>&6
16022     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16023   cat >> confdefs.h <<EOF
16024 #define $ac_tr_hdr 1
16025 EOF
16026  
16027 else
16028   echo "$ac_t""no" 1>&6
16029 fi
16030 done
16031
16032         for ac_hdr in lwp/lwp.h
16033 do
16034 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16035 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16036 echo "configure:16037: checking for $ac_hdr" >&5
16037 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16038   echo $ac_n "(cached) $ac_c" 1>&6
16039 else
16040   cat > conftest.$ac_ext <<EOF
16041 #line 16042 "configure"
16042 #include "confdefs.h"
16043 #include <$ac_hdr>
16044 EOF
16045 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16046 { (eval echo configure:16047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16047 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16048 if test -z "$ac_err"; then
16049   rm -rf conftest*
16050   eval "ac_cv_header_$ac_safe=yes"
16051 else
16052   echo "$ac_err" >&5
16053   echo "configure: failed program was:" >&5
16054   cat conftest.$ac_ext >&5
16055   rm -rf conftest*
16056   eval "ac_cv_header_$ac_safe=no"
16057 fi
16058 rm -f conftest*
16059 fi
16060 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16061   echo "$ac_t""yes" 1>&6
16062     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16063   cat >> confdefs.h <<EOF
16064 #define $ac_tr_hdr 1
16065 EOF
16066  
16067 else
16068   echo "$ac_t""no" 1>&6
16069 fi
16070 done
16071
16072         for ac_hdr in thread.h synch.h
16073 do
16074 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16075 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16076 echo "configure:16077: checking for $ac_hdr" >&5
16077 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16078   echo $ac_n "(cached) $ac_c" 1>&6
16079 else
16080   cat > conftest.$ac_ext <<EOF
16081 #line 16082 "configure"
16082 #include "confdefs.h"
16083 #include <$ac_hdr>
16084 EOF
16085 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16086 { (eval echo configure:16087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16087 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16088 if test -z "$ac_err"; then
16089   rm -rf conftest*
16090   eval "ac_cv_header_$ac_safe=yes"
16091 else
16092   echo "$ac_err" >&5
16093   echo "configure: failed program was:" >&5
16094   cat conftest.$ac_ext >&5
16095   rm -rf conftest*
16096   eval "ac_cv_header_$ac_safe=no"
16097 fi
16098 rm -f conftest*
16099 fi
16100 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16101   echo "$ac_t""yes" 1>&6
16102     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16103   cat >> confdefs.h <<EOF
16104 #define $ac_tr_hdr 1
16105 EOF
16106  
16107 else
16108   echo "$ac_t""no" 1>&6
16109 fi
16110 done
16111
16112 fi
16113
16114 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16115                         cat >> confdefs.h <<\EOF
16116 #define REENTRANT 1
16117 EOF
16118
16119         cat >> confdefs.h <<\EOF
16120 #define _REENTRANT 1
16121 EOF
16122
16123         cat >> confdefs.h <<\EOF
16124 #define THREAD_SAFE 1
16125 EOF
16126
16127         cat >> confdefs.h <<\EOF
16128 #define _THREAD_SAFE 1
16129 EOF
16130
16131         cat >> confdefs.h <<\EOF
16132 #define THREADSAFE 1
16133 EOF
16134
16135         cat >> confdefs.h <<\EOF
16136 #define _THREADSAFE 1
16137 EOF
16138
16139         cat >> confdefs.h <<\EOF
16140 #define _SGI_MP_SOURCE 1
16141 EOF
16142
16143
16144                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16145 echo "configure:16146: checking for thread specific errno" >&5
16146 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16147   echo $ac_n "(cached) $ac_c" 1>&6
16148 else
16149   
16150                 cat > conftest.$ac_ext <<EOF
16151 #line 16152 "configure"
16152 #include "confdefs.h"
16153 #include <errno.h>
16154 int main() {
16155 errno = 0;
16156 ; return 0; }
16157 EOF
16158 if { (eval echo configure:16159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16159   rm -rf conftest*
16160   ol_cv_errno_thread_specific=yes
16161 else
16162   echo "configure: failed program was:" >&5
16163   cat conftest.$ac_ext >&5
16164   rm -rf conftest*
16165   ol_cv_errno_thread_specific=no
16166 fi
16167 rm -f conftest*
16168         
16169 fi
16170
16171 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16172
16173                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16174 echo "configure:16175: checking for thread specific h_errno" >&5
16175 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16176   echo $ac_n "(cached) $ac_c" 1>&6
16177 else
16178   
16179                 cat > conftest.$ac_ext <<EOF
16180 #line 16181 "configure"
16181 #include "confdefs.h"
16182 #include <netdb.h>
16183 int main() {
16184 h_errno = 0;
16185 ; return 0; }
16186 EOF
16187 if { (eval echo configure:16188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16188   rm -rf conftest*
16189   ol_cv_h_errno_thread_specific=yes
16190 else
16191   echo "configure: failed program was:" >&5
16192   cat conftest.$ac_ext >&5
16193   rm -rf conftest*
16194   ol_cv_h_errno_thread_specific=no
16195 fi
16196 rm -f conftest*
16197         
16198 fi
16199
16200 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16201
16202         if test $ol_cv_errno_thread_specific != yes \
16203                 -o $ol_cv_h_errno_thread_specific != yes ; then
16204                 LIBS="$LTHREAD_LIBS $LIBS"
16205                 LTHREAD_LIBS=""
16206         fi
16207
16208 fi  
16209
16210 if test $ol_link_threads = no ; then
16211         if test $ol_with_threads = yes ; then
16212                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16213         fi
16214
16215         if test $ol_with_threads = auto ; then
16216                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16217                 ol_with_threads=no
16218         fi
16219
16220         cat >> confdefs.h <<\EOF
16221 #define NO_THREADS 1
16222 EOF
16223
16224         LTHREAD_LIBS=""
16225 fi
16226
16227 if test $ol_link_threads != no ; then
16228         cat >> confdefs.h <<\EOF
16229 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16230 EOF
16231
16232 fi
16233
16234 for ac_func in \
16235         ctime_r                 \
16236         gethostbyname_r gethostbyaddr_r \
16237
16238 do
16239 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16240 echo "configure:16241: checking for $ac_func" >&5
16241 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16242   echo $ac_n "(cached) $ac_c" 1>&6
16243 else
16244   cat > conftest.$ac_ext <<EOF
16245 #line 16246 "configure"
16246 #include "confdefs.h"
16247 /* System header to define __stub macros and hopefully few prototypes,
16248     which can conflict with char $ac_func(); below.  */
16249 #include <assert.h>
16250 /* Override any gcc2 internal prototype to avoid an error.  */
16251 /* We use char because int might match the return type of a gcc2
16252     builtin and then its argument prototype would still apply.  */
16253 char $ac_func();
16254 char (*f)();
16255
16256 int main() {
16257
16258 /* The GNU C library defines this for functions which it implements
16259     to always fail with ENOSYS.  Some functions are actually named
16260     something starting with __ and the normal name is an alias.  */
16261 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16262 choke me
16263 #else
16264 f = $ac_func;
16265 #endif
16266
16267 ; return 0; }
16268 EOF
16269 if { (eval echo configure:16270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16270   rm -rf conftest*
16271   eval "ac_cv_func_$ac_func=yes"
16272 else
16273   echo "configure: failed program was:" >&5
16274   cat conftest.$ac_ext >&5
16275   rm -rf conftest*
16276   eval "ac_cv_func_$ac_func=no"
16277 fi
16278 rm -f conftest*
16279 fi
16280
16281 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16282   echo "$ac_t""yes" 1>&6
16283     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16284   cat >> confdefs.h <<EOF
16285 #define $ac_tr_func 1
16286 EOF
16287  
16288 else
16289   echo "$ac_t""no" 1>&6
16290 fi
16291 done
16292
16293
16294 if test "$ac_cv_func_ctime_r" = no ; then
16295         ol_cv_func_ctime_r_nargs=0
16296 else
16297         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16298 echo "configure:16299: checking number of arguments of ctime_r" >&5
16299 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16300   echo $ac_n "(cached) $ac_c" 1>&6
16301 else
16302   cat > conftest.$ac_ext <<EOF
16303 #line 16304 "configure"
16304 #include "confdefs.h"
16305 #include <time.h>
16306 int main() {
16307 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16308 ; return 0; }
16309 EOF
16310 if { (eval echo configure:16311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16311   rm -rf conftest*
16312   ol_cv_func_ctime_r_nargs3=yes
16313 else
16314   echo "configure: failed program was:" >&5
16315   cat conftest.$ac_ext >&5
16316   rm -rf conftest*
16317   ol_cv_func_ctime_r_nargs3=no
16318 fi
16319 rm -f conftest*
16320
16321         cat > conftest.$ac_ext <<EOF
16322 #line 16323 "configure"
16323 #include "confdefs.h"
16324 #include <time.h>
16325 int main() {
16326 time_t ti; char *buffer; ctime_r(&ti,buffer);
16327 ; return 0; }
16328 EOF
16329 if { (eval echo configure:16330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16330   rm -rf conftest*
16331   ol_cv_func_ctime_r_nargs2=yes
16332 else
16333   echo "configure: failed program was:" >&5
16334   cat conftest.$ac_ext >&5
16335   rm -rf conftest*
16336   ol_cv_func_ctime_r_nargs2=no
16337 fi
16338 rm -f conftest*
16339
16340         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16341                 $ol_cv_func_ctime_r_nargs2 = no ; then
16342
16343                 ol_cv_func_ctime_r_nargs=3
16344
16345         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16346                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16347
16348                 ol_cv_func_ctime_r_nargs=2
16349
16350         else
16351                 ol_cv_func_ctime_r_nargs=0
16352         fi
16353   
16354 fi
16355
16356 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16357
16358   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16359         cat >> confdefs.h <<EOF
16360 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16361 EOF
16362
16363   fi
16364
16365 fi
16366
16367 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16368         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16369 echo "configure:16370: checking number of arguments of gethostbyname_r" >&5
16370 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16371   echo $ac_n "(cached) $ac_c" 1>&6
16372 else
16373   cat > conftest.$ac_ext <<EOF
16374 #line 16375 "configure"
16375 #include "confdefs.h"
16376 #include <sys/types.h>
16377 #include <sys/socket.h>
16378 #include <netinet/in.h>
16379 #include <netdb.h>
16380 #define BUFSIZE (sizeof(struct hostent)+10)
16381 int main() {
16382 struct hostent hent; char buffer[BUFSIZE];
16383                 int bufsize=BUFSIZE;int h_errno;
16384                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16385                         buffer, bufsize, &h_errno);
16386 ; return 0; }
16387 EOF
16388 if { (eval echo configure:16389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16389   rm -rf conftest*
16390   ol_cv_func_gethostbyname_r_nargs5=yes
16391 else
16392   echo "configure: failed program was:" >&5
16393   cat conftest.$ac_ext >&5
16394   rm -rf conftest*
16395   ol_cv_func_gethostbyname_r_nargs5=no
16396 fi
16397 rm -f conftest*
16398
16399         cat > conftest.$ac_ext <<EOF
16400 #line 16401 "configure"
16401 #include "confdefs.h"
16402 #include <sys/types.h>
16403 #include <sys/socket.h>
16404 #include <netinet/in.h>
16405 #include <netdb.h>
16406 #define BUFSIZE (sizeof(struct hostent)+10)
16407 int main() {
16408 struct hostent hent;struct hostent *rhent;
16409                 char buffer[BUFSIZE];
16410                 int bufsize=BUFSIZE;int h_errno;
16411                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16412                         &rhent, &h_errno);
16413 ; return 0; }
16414 EOF
16415 if { (eval echo configure:16416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16416   rm -rf conftest*
16417   ol_cv_func_gethostbyname_r_nargs6=yes
16418 else
16419   echo "configure: failed program was:" >&5
16420   cat conftest.$ac_ext >&5
16421   rm -rf conftest*
16422   ol_cv_func_gethostbyname_r_nargs6=no
16423 fi
16424 rm -f conftest*
16425
16426         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16427                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16428
16429                 ol_cv_func_gethostbyname_r_nargs=5
16430
16431         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16432                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16433
16434                 ol_cv_func_gethostbyname_r_nargs=6
16435
16436         else
16437                 ol_cv_func_gethostbyname_r_nargs=0
16438         fi
16439   
16440 fi
16441
16442 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16443   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16444         cat >> confdefs.h <<EOF
16445 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16446 EOF
16447
16448   fi
16449
16450 else
16451         ol_cv_func_gethostbyname_r_nargs=0
16452 fi
16453  
16454 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16455         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16456 echo "configure:16457: checking number of arguments of gethostbyaddr_r" >&5
16457 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16458   echo $ac_n "(cached) $ac_c" 1>&6
16459 else
16460   cat > conftest.$ac_ext <<EOF
16461 #line 16462 "configure"
16462 #include "confdefs.h"
16463 #include <sys/types.h>
16464 #include <sys/socket.h>
16465 #include <netinet/in.h>
16466 #include <netdb.h>
16467 #define BUFSIZE (sizeof(struct hostent)+10)
16468 int main() {
16469 struct hostent hent; char buffer[BUFSIZE]; 
16470             struct in_addr add;
16471             size_t alen=sizeof(struct in_addr);
16472             int bufsize=BUFSIZE;int h_errno;
16473                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16474                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16475 ; return 0; }
16476 EOF
16477 if { (eval echo configure:16478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16478   rm -rf conftest*
16479   ol_cv_func_gethostbyaddr_r_nargs7=yes
16480 else
16481   echo "configure: failed program was:" >&5
16482   cat conftest.$ac_ext >&5
16483   rm -rf conftest*
16484   ol_cv_func_gethostbyaddr_r_nargs7=no
16485 fi
16486 rm -f conftest*
16487
16488         cat > conftest.$ac_ext <<EOF
16489 #line 16490 "configure"
16490 #include "confdefs.h"
16491 #include <sys/types.h>
16492 #include <sys/socket.h>
16493 #include <netinet/in.h>
16494 #include <netdb.h>
16495 #define BUFSIZE (sizeof(struct hostent)+10)
16496 int main() {
16497 struct hostent hent;
16498                 struct hostent *rhent; char buffer[BUFSIZE]; 
16499                 struct in_addr add;
16500                 size_t alen=sizeof(struct in_addr);
16501                 int bufsize=BUFSIZE;int h_errno;
16502                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16503                         alen, AF_INET, &hent, buffer, bufsize, 
16504                         &rhent, &h_errno);
16505 ; return 0; }
16506 EOF
16507 if { (eval echo configure:16508: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16508   rm -rf conftest*
16509   ol_cv_func_gethostbyaddr_r_nargs8=yes
16510 else
16511   echo "configure: failed program was:" >&5
16512   cat conftest.$ac_ext >&5
16513   rm -rf conftest*
16514   ol_cv_func_gethostbyaddr_r_nargs8=no
16515 fi
16516 rm -f conftest*
16517
16518         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16519                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16520
16521                 ol_cv_func_gethostbyaddr_r_nargs=7
16522
16523         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16524                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16525
16526                 ol_cv_func_gethostbyaddr_r_nargs=8
16527
16528         else
16529                 ol_cv_func_gethostbyaddr_r_nargs=0
16530         fi
16531   
16532 fi
16533
16534 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16535   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16536     cat >> confdefs.h <<EOF
16537 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16538 EOF
16539
16540   fi
16541
16542 else
16543         ol_cv_func_gethostbyaddr_r_nargs=0
16544 fi
16545
16546 ol_link_ldbm=no 
16547
16548 if test $ol_with_ldbm_api = auto \
16549         -o $ol_with_ldbm_api = berkeley \
16550         -o $ol_with_ldbm_api = bcompat ; then
16551
16552         if test $ol_with_ldbm_api = bcompat; then \
16553                 for ac_hdr in db_185.h db.h
16554 do
16555 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16556 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16557 echo "configure:16558: checking for $ac_hdr" >&5
16558 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16559   echo $ac_n "(cached) $ac_c" 1>&6
16560 else
16561   cat > conftest.$ac_ext <<EOF
16562 #line 16563 "configure"
16563 #include "confdefs.h"
16564 #include <$ac_hdr>
16565 EOF
16566 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16567 { (eval echo configure:16568: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16568 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16569 if test -z "$ac_err"; then
16570   rm -rf conftest*
16571   eval "ac_cv_header_$ac_safe=yes"
16572 else
16573   echo "$ac_err" >&5
16574   echo "configure: failed program was:" >&5
16575   cat conftest.$ac_ext >&5
16576   rm -rf conftest*
16577   eval "ac_cv_header_$ac_safe=no"
16578 fi
16579 rm -f conftest*
16580 fi
16581 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16582   echo "$ac_t""yes" 1>&6
16583     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16584   cat >> confdefs.h <<EOF
16585 #define $ac_tr_hdr 1
16586 EOF
16587  
16588 else
16589   echo "$ac_t""no" 1>&6
16590 fi
16591 done
16592
16593 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16594         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16595 echo "configure:16596: checking if Berkeley DB header compatibility" >&5
16596 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16597   echo $ac_n "(cached) $ac_c" 1>&6
16598 else
16599   
16600                 cat > conftest.$ac_ext <<EOF
16601 #line 16602 "configure"
16602 #include "confdefs.h"
16603
16604 #if HAVE_DB_185_H
16605 #       include <db_185.h>
16606 #else
16607 #       include <db.h>
16608 #endif
16609
16610  /* this check could be improved */
16611 #ifndef DB_VERSION_MAJOR
16612 #       define DB_VERSION_MAJOR 1
16613 #endif
16614
16615 #if DB_VERSION_MAJOR == 1 
16616         __db_version_1
16617 #endif
16618
16619 EOF
16620 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16621   egrep "__db_version_1" >/dev/null 2>&1; then
16622   rm -rf conftest*
16623   ol_cv_header_db1=yes
16624 else
16625   rm -rf conftest*
16626   ol_cv_header_db1=no
16627 fi
16628 rm -f conftest*
16629
16630 fi
16631
16632 echo "$ac_t""$ol_cv_header_db1" 1>&6
16633
16634         if test $ol_cv_header_db1 = yes ; then
16635                 ol_cv_lib_db=no
16636 if test $ol_cv_lib_db = no ; then
16637         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16638 echo "configure:16639: checking for Berkeley DB link (default)" >&5
16639 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16640   echo $ac_n "(cached) $ac_c" 1>&6
16641 else
16642   
16643         ol_DB_LIB=
16644         ol_LIBS=$LIBS
16645         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16646
16647         cat > conftest.$ac_ext <<EOF
16648 #line 16649 "configure"
16649 #include "confdefs.h"
16650
16651 #ifdef HAVE_DB_185_H
16652 # include <db_185.h>
16653 #else
16654 # include <db.h>
16655 #endif
16656
16657 #ifndef DB_VERSION_MAJOR
16658 # define DB_VERSION_MAJOR 1
16659 #endif
16660
16661 #ifndef NULL
16662 #define NULL ((void*)0)
16663 #endif
16664
16665 int main() {
16666
16667 #if DB_VERSION_MAJOR > 1
16668         {
16669                 char *version;
16670                 int major, minor, patch;
16671
16672                 version = db_version( &major, &minor, &patch );
16673
16674                 if( major != DB_VERSION_MAJOR ||
16675                         minor < DB_VERSION_MINOR )
16676                 {
16677                         printf("Berkeley DB version mismatch\n"
16678                                 "\texpected: %s\n\tgot: %s\n",
16679                                 DB_VERSION_STRING, version);
16680                         return 1;
16681                 }
16682         }
16683 #endif
16684
16685 #if DB_VERSION_MAJOR > 2
16686         db_env_create( NULL, 0 );
16687 #elif DB_VERSION_MAJOR > 1
16688         db_appexit( NULL );
16689 #else
16690         (void) dbopen( NULL, 0, 0, 0, NULL);
16691 #endif
16692
16693 ; return 0; }
16694 EOF
16695 if { (eval echo configure:16696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16696   rm -rf conftest*
16697   ol_cv_db_none=yes
16698 else
16699   echo "configure: failed program was:" >&5
16700   cat conftest.$ac_ext >&5
16701   rm -rf conftest*
16702   ol_cv_db_none=no
16703 fi
16704 rm -f conftest*
16705
16706         LIBS="$ol_LIBS"
16707
16708 fi
16709
16710 echo "$ac_t""$ol_cv_db_none" 1>&6
16711
16712         if test $ol_cv_db_none = yes ; then
16713                 ol_cv_lib_db=yes
16714         fi
16715 fi
16716
16717 if test $ol_cv_lib_db = no ; then
16718         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16719 echo "configure:16720: checking for Berkeley DB link (-ldb42)" >&5
16720 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16721   echo $ac_n "(cached) $ac_c" 1>&6
16722 else
16723   
16724         ol_DB_LIB=-ldb42
16725         ol_LIBS=$LIBS
16726         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16727
16728         cat > conftest.$ac_ext <<EOF
16729 #line 16730 "configure"
16730 #include "confdefs.h"
16731
16732 #ifdef HAVE_DB_185_H
16733 # include <db_185.h>
16734 #else
16735 # include <db.h>
16736 #endif
16737
16738 #ifndef DB_VERSION_MAJOR
16739 # define DB_VERSION_MAJOR 1
16740 #endif
16741
16742 #ifndef NULL
16743 #define NULL ((void*)0)
16744 #endif
16745
16746 int main() {
16747
16748 #if DB_VERSION_MAJOR > 1
16749         {
16750                 char *version;
16751                 int major, minor, patch;
16752
16753                 version = db_version( &major, &minor, &patch );
16754
16755                 if( major != DB_VERSION_MAJOR ||
16756                         minor < DB_VERSION_MINOR )
16757                 {
16758                         printf("Berkeley DB version mismatch\n"
16759                                 "\texpected: %s\n\tgot: %s\n",
16760                                 DB_VERSION_STRING, version);
16761                         return 1;
16762                 }
16763         }
16764 #endif
16765
16766 #if DB_VERSION_MAJOR > 2
16767         db_env_create( NULL, 0 );
16768 #elif DB_VERSION_MAJOR > 1
16769         db_appexit( NULL );
16770 #else
16771         (void) dbopen( NULL, 0, 0, 0, NULL);
16772 #endif
16773
16774 ; return 0; }
16775 EOF
16776 if { (eval echo configure:16777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16777   rm -rf conftest*
16778   ol_cv_db_db42=yes
16779 else
16780   echo "configure: failed program was:" >&5
16781   cat conftest.$ac_ext >&5
16782   rm -rf conftest*
16783   ol_cv_db_db42=no
16784 fi
16785 rm -f conftest*
16786
16787         LIBS="$ol_LIBS"
16788
16789 fi
16790
16791 echo "$ac_t""$ol_cv_db_db42" 1>&6
16792
16793         if test $ol_cv_db_db42 = yes ; then
16794                 ol_cv_lib_db=-ldb42
16795         fi
16796 fi
16797
16798 if test $ol_cv_lib_db = no ; then
16799         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16800 echo "configure:16801: checking for Berkeley DB link (-ldb-42)" >&5
16801 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16802   echo $ac_n "(cached) $ac_c" 1>&6
16803 else
16804   
16805         ol_DB_LIB=-ldb-42
16806         ol_LIBS=$LIBS
16807         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16808
16809         cat > conftest.$ac_ext <<EOF
16810 #line 16811 "configure"
16811 #include "confdefs.h"
16812
16813 #ifdef HAVE_DB_185_H
16814 # include <db_185.h>
16815 #else
16816 # include <db.h>
16817 #endif
16818
16819 #ifndef DB_VERSION_MAJOR
16820 # define DB_VERSION_MAJOR 1
16821 #endif
16822
16823 #ifndef NULL
16824 #define NULL ((void*)0)
16825 #endif
16826
16827 int main() {
16828
16829 #if DB_VERSION_MAJOR > 1
16830         {
16831                 char *version;
16832                 int major, minor, patch;
16833
16834                 version = db_version( &major, &minor, &patch );
16835
16836                 if( major != DB_VERSION_MAJOR ||
16837                         minor < DB_VERSION_MINOR )
16838                 {
16839                         printf("Berkeley DB version mismatch\n"
16840                                 "\texpected: %s\n\tgot: %s\n",
16841                                 DB_VERSION_STRING, version);
16842                         return 1;
16843                 }
16844         }
16845 #endif
16846
16847 #if DB_VERSION_MAJOR > 2
16848         db_env_create( NULL, 0 );
16849 #elif DB_VERSION_MAJOR > 1
16850         db_appexit( NULL );
16851 #else
16852         (void) dbopen( NULL, 0, 0, 0, NULL);
16853 #endif
16854
16855 ; return 0; }
16856 EOF
16857 if { (eval echo configure:16858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16858   rm -rf conftest*
16859   ol_cv_db_db_42=yes
16860 else
16861   echo "configure: failed program was:" >&5
16862   cat conftest.$ac_ext >&5
16863   rm -rf conftest*
16864   ol_cv_db_db_42=no
16865 fi
16866 rm -f conftest*
16867
16868         LIBS="$ol_LIBS"
16869
16870 fi
16871
16872 echo "$ac_t""$ol_cv_db_db_42" 1>&6
16873
16874         if test $ol_cv_db_db_42 = yes ; then
16875                 ol_cv_lib_db=-ldb-42
16876         fi
16877 fi
16878
16879 if test $ol_cv_lib_db = no ; then
16880         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
16881 echo "configure:16882: checking for Berkeley DB link (-ldb-4.2)" >&5
16882 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
16883   echo $ac_n "(cached) $ac_c" 1>&6
16884 else
16885   
16886         ol_DB_LIB=-ldb-4.2
16887         ol_LIBS=$LIBS
16888         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16889
16890         cat > conftest.$ac_ext <<EOF
16891 #line 16892 "configure"
16892 #include "confdefs.h"
16893
16894 #ifdef HAVE_DB_185_H
16895 # include <db_185.h>
16896 #else
16897 # include <db.h>
16898 #endif
16899
16900 #ifndef DB_VERSION_MAJOR
16901 # define DB_VERSION_MAJOR 1
16902 #endif
16903
16904 #ifndef NULL
16905 #define NULL ((void*)0)
16906 #endif
16907
16908 int main() {
16909
16910 #if DB_VERSION_MAJOR > 1
16911         {
16912                 char *version;
16913                 int major, minor, patch;
16914
16915                 version = db_version( &major, &minor, &patch );
16916
16917                 if( major != DB_VERSION_MAJOR ||
16918                         minor < DB_VERSION_MINOR )
16919                 {
16920                         printf("Berkeley DB version mismatch\n"
16921                                 "\texpected: %s\n\tgot: %s\n",
16922                                 DB_VERSION_STRING, version);
16923                         return 1;
16924                 }
16925         }
16926 #endif
16927
16928 #if DB_VERSION_MAJOR > 2
16929         db_env_create( NULL, 0 );
16930 #elif DB_VERSION_MAJOR > 1
16931         db_appexit( NULL );
16932 #else
16933         (void) dbopen( NULL, 0, 0, 0, NULL);
16934 #endif
16935
16936 ; return 0; }
16937 EOF
16938 if { (eval echo configure:16939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16939   rm -rf conftest*
16940   ol_cv_db_db_4_dot_2=yes
16941 else
16942   echo "configure: failed program was:" >&5
16943   cat conftest.$ac_ext >&5
16944   rm -rf conftest*
16945   ol_cv_db_db_4_dot_2=no
16946 fi
16947 rm -f conftest*
16948
16949         LIBS="$ol_LIBS"
16950
16951 fi
16952
16953 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
16954
16955         if test $ol_cv_db_db_4_dot_2 = yes ; then
16956                 ol_cv_lib_db=-ldb-4.2
16957         fi
16958 fi
16959
16960 if test $ol_cv_lib_db = no ; then
16961         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
16962 echo "configure:16963: checking for Berkeley DB link (-ldb-4-2)" >&5
16963 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
16964   echo $ac_n "(cached) $ac_c" 1>&6
16965 else
16966   
16967         ol_DB_LIB=-ldb-4-2
16968         ol_LIBS=$LIBS
16969         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16970
16971         cat > conftest.$ac_ext <<EOF
16972 #line 16973 "configure"
16973 #include "confdefs.h"
16974
16975 #ifdef HAVE_DB_185_H
16976 # include <db_185.h>
16977 #else
16978 # include <db.h>
16979 #endif
16980
16981 #ifndef DB_VERSION_MAJOR
16982 # define DB_VERSION_MAJOR 1
16983 #endif
16984
16985 #ifndef NULL
16986 #define NULL ((void*)0)
16987 #endif
16988
16989 int main() {
16990
16991 #if DB_VERSION_MAJOR > 1
16992         {
16993                 char *version;
16994                 int major, minor, patch;
16995
16996                 version = db_version( &major, &minor, &patch );
16997
16998                 if( major != DB_VERSION_MAJOR ||
16999                         minor < DB_VERSION_MINOR )
17000                 {
17001                         printf("Berkeley DB version mismatch\n"
17002                                 "\texpected: %s\n\tgot: %s\n",
17003                                 DB_VERSION_STRING, version);
17004                         return 1;
17005                 }
17006         }
17007 #endif
17008
17009 #if DB_VERSION_MAJOR > 2
17010         db_env_create( NULL, 0 );
17011 #elif DB_VERSION_MAJOR > 1
17012         db_appexit( NULL );
17013 #else
17014         (void) dbopen( NULL, 0, 0, 0, NULL);
17015 #endif
17016
17017 ; return 0; }
17018 EOF
17019 if { (eval echo configure:17020: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17020   rm -rf conftest*
17021   ol_cv_db_db_4_2=yes
17022 else
17023   echo "configure: failed program was:" >&5
17024   cat conftest.$ac_ext >&5
17025   rm -rf conftest*
17026   ol_cv_db_db_4_2=no
17027 fi
17028 rm -f conftest*
17029
17030         LIBS="$ol_LIBS"
17031
17032 fi
17033
17034 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17035
17036         if test $ol_cv_db_db_4_2 = yes ; then
17037                 ol_cv_lib_db=-ldb-4-2
17038         fi
17039 fi
17040
17041 if test $ol_cv_lib_db = no ; then
17042         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17043 echo "configure:17044: checking for Berkeley DB link (-ldb-4)" >&5
17044 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17045   echo $ac_n "(cached) $ac_c" 1>&6
17046 else
17047   
17048         ol_DB_LIB=-ldb-4
17049         ol_LIBS=$LIBS
17050         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17051
17052         cat > conftest.$ac_ext <<EOF
17053 #line 17054 "configure"
17054 #include "confdefs.h"
17055
17056 #ifdef HAVE_DB_185_H
17057 # include <db_185.h>
17058 #else
17059 # include <db.h>
17060 #endif
17061
17062 #ifndef DB_VERSION_MAJOR
17063 # define DB_VERSION_MAJOR 1
17064 #endif
17065
17066 #ifndef NULL
17067 #define NULL ((void*)0)
17068 #endif
17069
17070 int main() {
17071
17072 #if DB_VERSION_MAJOR > 1
17073         {
17074                 char *version;
17075                 int major, minor, patch;
17076
17077                 version = db_version( &major, &minor, &patch );
17078
17079                 if( major != DB_VERSION_MAJOR ||
17080                         minor < DB_VERSION_MINOR )
17081                 {
17082                         printf("Berkeley DB version mismatch\n"
17083                                 "\texpected: %s\n\tgot: %s\n",
17084                                 DB_VERSION_STRING, version);
17085                         return 1;
17086                 }
17087         }
17088 #endif
17089
17090 #if DB_VERSION_MAJOR > 2
17091         db_env_create( NULL, 0 );
17092 #elif DB_VERSION_MAJOR > 1
17093         db_appexit( NULL );
17094 #else
17095         (void) dbopen( NULL, 0, 0, 0, NULL);
17096 #endif
17097
17098 ; return 0; }
17099 EOF
17100 if { (eval echo configure:17101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17101   rm -rf conftest*
17102   ol_cv_db_db_4=yes
17103 else
17104   echo "configure: failed program was:" >&5
17105   cat conftest.$ac_ext >&5
17106   rm -rf conftest*
17107   ol_cv_db_db_4=no
17108 fi
17109 rm -f conftest*
17110
17111         LIBS="$ol_LIBS"
17112
17113 fi
17114
17115 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17116
17117         if test $ol_cv_db_db_4 = yes ; then
17118                 ol_cv_lib_db=-ldb-4
17119         fi
17120 fi
17121
17122 if test $ol_cv_lib_db = no ; then
17123         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17124 echo "configure:17125: checking for Berkeley DB link (-ldb4)" >&5
17125 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17126   echo $ac_n "(cached) $ac_c" 1>&6
17127 else
17128   
17129         ol_DB_LIB=-ldb4
17130         ol_LIBS=$LIBS
17131         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17132
17133         cat > conftest.$ac_ext <<EOF
17134 #line 17135 "configure"
17135 #include "confdefs.h"
17136
17137 #ifdef HAVE_DB_185_H
17138 # include <db_185.h>
17139 #else
17140 # include <db.h>
17141 #endif
17142
17143 #ifndef DB_VERSION_MAJOR
17144 # define DB_VERSION_MAJOR 1
17145 #endif
17146
17147 #ifndef NULL
17148 #define NULL ((void*)0)
17149 #endif
17150
17151 int main() {
17152
17153 #if DB_VERSION_MAJOR > 1
17154         {
17155                 char *version;
17156                 int major, minor, patch;
17157
17158                 version = db_version( &major, &minor, &patch );
17159
17160                 if( major != DB_VERSION_MAJOR ||
17161                         minor < DB_VERSION_MINOR )
17162                 {
17163                         printf("Berkeley DB version mismatch\n"
17164                                 "\texpected: %s\n\tgot: %s\n",
17165                                 DB_VERSION_STRING, version);
17166                         return 1;
17167                 }
17168         }
17169 #endif
17170
17171 #if DB_VERSION_MAJOR > 2
17172         db_env_create( NULL, 0 );
17173 #elif DB_VERSION_MAJOR > 1
17174         db_appexit( NULL );
17175 #else
17176         (void) dbopen( NULL, 0, 0, 0, NULL);
17177 #endif
17178
17179 ; return 0; }
17180 EOF
17181 if { (eval echo configure:17182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17182   rm -rf conftest*
17183   ol_cv_db_db4=yes
17184 else
17185   echo "configure: failed program was:" >&5
17186   cat conftest.$ac_ext >&5
17187   rm -rf conftest*
17188   ol_cv_db_db4=no
17189 fi
17190 rm -f conftest*
17191
17192         LIBS="$ol_LIBS"
17193
17194 fi
17195
17196 echo "$ac_t""$ol_cv_db_db4" 1>&6
17197
17198         if test $ol_cv_db_db4 = yes ; then
17199                 ol_cv_lib_db=-ldb4
17200         fi
17201 fi
17202
17203 if test $ol_cv_lib_db = no ; then
17204         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17205 echo "configure:17206: checking for Berkeley DB link (-ldb41)" >&5
17206 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17207   echo $ac_n "(cached) $ac_c" 1>&6
17208 else
17209   
17210         ol_DB_LIB=-ldb41
17211         ol_LIBS=$LIBS
17212         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17213
17214         cat > conftest.$ac_ext <<EOF
17215 #line 17216 "configure"
17216 #include "confdefs.h"
17217
17218 #ifdef HAVE_DB_185_H
17219 # include <db_185.h>
17220 #else
17221 # include <db.h>
17222 #endif
17223
17224 #ifndef DB_VERSION_MAJOR
17225 # define DB_VERSION_MAJOR 1
17226 #endif
17227
17228 #ifndef NULL
17229 #define NULL ((void*)0)
17230 #endif
17231
17232 int main() {
17233
17234 #if DB_VERSION_MAJOR > 1
17235         {
17236                 char *version;
17237                 int major, minor, patch;
17238
17239                 version = db_version( &major, &minor, &patch );
17240
17241                 if( major != DB_VERSION_MAJOR ||
17242                         minor < DB_VERSION_MINOR )
17243                 {
17244                         printf("Berkeley DB version mismatch\n"
17245                                 "\texpected: %s\n\tgot: %s\n",
17246                                 DB_VERSION_STRING, version);
17247                         return 1;
17248                 }
17249         }
17250 #endif
17251
17252 #if DB_VERSION_MAJOR > 2
17253         db_env_create( NULL, 0 );
17254 #elif DB_VERSION_MAJOR > 1
17255         db_appexit( NULL );
17256 #else
17257         (void) dbopen( NULL, 0, 0, 0, NULL);
17258 #endif
17259
17260 ; return 0; }
17261 EOF
17262 if { (eval echo configure:17263: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17263   rm -rf conftest*
17264   ol_cv_db_db41=yes
17265 else
17266   echo "configure: failed program was:" >&5
17267   cat conftest.$ac_ext >&5
17268   rm -rf conftest*
17269   ol_cv_db_db41=no
17270 fi
17271 rm -f conftest*
17272
17273         LIBS="$ol_LIBS"
17274
17275 fi
17276
17277 echo "$ac_t""$ol_cv_db_db41" 1>&6
17278
17279         if test $ol_cv_db_db41 = yes ; then
17280                 ol_cv_lib_db=-ldb41
17281         fi
17282 fi
17283
17284 if test $ol_cv_lib_db = no ; then
17285         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17286 echo "configure:17287: checking for Berkeley DB link (-ldb-41)" >&5
17287 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17288   echo $ac_n "(cached) $ac_c" 1>&6
17289 else
17290   
17291         ol_DB_LIB=-ldb-41
17292         ol_LIBS=$LIBS
17293         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17294
17295         cat > conftest.$ac_ext <<EOF
17296 #line 17297 "configure"
17297 #include "confdefs.h"
17298
17299 #ifdef HAVE_DB_185_H
17300 # include <db_185.h>
17301 #else
17302 # include <db.h>
17303 #endif
17304
17305 #ifndef DB_VERSION_MAJOR
17306 # define DB_VERSION_MAJOR 1
17307 #endif
17308
17309 #ifndef NULL
17310 #define NULL ((void*)0)
17311 #endif
17312
17313 int main() {
17314
17315 #if DB_VERSION_MAJOR > 1
17316         {
17317                 char *version;
17318                 int major, minor, patch;
17319
17320                 version = db_version( &major, &minor, &patch );
17321
17322                 if( major != DB_VERSION_MAJOR ||
17323                         minor < DB_VERSION_MINOR )
17324                 {
17325                         printf("Berkeley DB version mismatch\n"
17326                                 "\texpected: %s\n\tgot: %s\n",
17327                                 DB_VERSION_STRING, version);
17328                         return 1;
17329                 }
17330         }
17331 #endif
17332
17333 #if DB_VERSION_MAJOR > 2
17334         db_env_create( NULL, 0 );
17335 #elif DB_VERSION_MAJOR > 1
17336         db_appexit( NULL );
17337 #else
17338         (void) dbopen( NULL, 0, 0, 0, NULL);
17339 #endif
17340
17341 ; return 0; }
17342 EOF
17343 if { (eval echo configure:17344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17344   rm -rf conftest*
17345   ol_cv_db_db_41=yes
17346 else
17347   echo "configure: failed program was:" >&5
17348   cat conftest.$ac_ext >&5
17349   rm -rf conftest*
17350   ol_cv_db_db_41=no
17351 fi
17352 rm -f conftest*
17353
17354         LIBS="$ol_LIBS"
17355
17356 fi
17357
17358 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17359
17360         if test $ol_cv_db_db_41 = yes ; then
17361                 ol_cv_lib_db=-ldb-41
17362         fi
17363 fi
17364
17365 if test $ol_cv_lib_db = no ; then
17366         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17367 echo "configure:17368: checking for Berkeley DB link (-ldb-4.1)" >&5
17368 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17369   echo $ac_n "(cached) $ac_c" 1>&6
17370 else
17371   
17372         ol_DB_LIB=-ldb-4.1
17373         ol_LIBS=$LIBS
17374         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17375
17376         cat > conftest.$ac_ext <<EOF
17377 #line 17378 "configure"
17378 #include "confdefs.h"
17379
17380 #ifdef HAVE_DB_185_H
17381 # include <db_185.h>
17382 #else
17383 # include <db.h>
17384 #endif
17385
17386 #ifndef DB_VERSION_MAJOR
17387 # define DB_VERSION_MAJOR 1
17388 #endif
17389
17390 #ifndef NULL
17391 #define NULL ((void*)0)
17392 #endif
17393
17394 int main() {
17395
17396 #if DB_VERSION_MAJOR > 1
17397         {
17398                 char *version;
17399                 int major, minor, patch;
17400
17401                 version = db_version( &major, &minor, &patch );
17402
17403                 if( major != DB_VERSION_MAJOR ||
17404                         minor < DB_VERSION_MINOR )
17405                 {
17406                         printf("Berkeley DB version mismatch\n"
17407                                 "\texpected: %s\n\tgot: %s\n",
17408                                 DB_VERSION_STRING, version);
17409                         return 1;
17410                 }
17411         }
17412 #endif
17413
17414 #if DB_VERSION_MAJOR > 2
17415         db_env_create( NULL, 0 );
17416 #elif DB_VERSION_MAJOR > 1
17417         db_appexit( NULL );
17418 #else
17419         (void) dbopen( NULL, 0, 0, 0, NULL);
17420 #endif
17421
17422 ; return 0; }
17423 EOF
17424 if { (eval echo configure:17425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17425   rm -rf conftest*
17426   ol_cv_db_db_4_dot_1=yes
17427 else
17428   echo "configure: failed program was:" >&5
17429   cat conftest.$ac_ext >&5
17430   rm -rf conftest*
17431   ol_cv_db_db_4_dot_1=no
17432 fi
17433 rm -f conftest*
17434
17435         LIBS="$ol_LIBS"
17436
17437 fi
17438
17439 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17440
17441         if test $ol_cv_db_db_4_dot_1 = yes ; then
17442                 ol_cv_lib_db=-ldb-4.1
17443         fi
17444 fi
17445
17446 if test $ol_cv_lib_db = no ; then
17447         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17448 echo "configure:17449: checking for Berkeley DB link (-ldb-4-1)" >&5
17449 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17450   echo $ac_n "(cached) $ac_c" 1>&6
17451 else
17452   
17453         ol_DB_LIB=-ldb-4-1
17454         ol_LIBS=$LIBS
17455         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17456
17457         cat > conftest.$ac_ext <<EOF
17458 #line 17459 "configure"
17459 #include "confdefs.h"
17460
17461 #ifdef HAVE_DB_185_H
17462 # include <db_185.h>
17463 #else
17464 # include <db.h>
17465 #endif
17466
17467 #ifndef DB_VERSION_MAJOR
17468 # define DB_VERSION_MAJOR 1
17469 #endif
17470
17471 #ifndef NULL
17472 #define NULL ((void*)0)
17473 #endif
17474
17475 int main() {
17476
17477 #if DB_VERSION_MAJOR > 1
17478         {
17479                 char *version;
17480                 int major, minor, patch;
17481
17482                 version = db_version( &major, &minor, &patch );
17483
17484                 if( major != DB_VERSION_MAJOR ||
17485                         minor < DB_VERSION_MINOR )
17486                 {
17487                         printf("Berkeley DB version mismatch\n"
17488                                 "\texpected: %s\n\tgot: %s\n",
17489                                 DB_VERSION_STRING, version);
17490                         return 1;
17491                 }
17492         }
17493 #endif
17494
17495 #if DB_VERSION_MAJOR > 2
17496         db_env_create( NULL, 0 );
17497 #elif DB_VERSION_MAJOR > 1
17498         db_appexit( NULL );
17499 #else
17500         (void) dbopen( NULL, 0, 0, 0, NULL);
17501 #endif
17502
17503 ; return 0; }
17504 EOF
17505 if { (eval echo configure:17506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17506   rm -rf conftest*
17507   ol_cv_db_db_4_1=yes
17508 else
17509   echo "configure: failed program was:" >&5
17510   cat conftest.$ac_ext >&5
17511   rm -rf conftest*
17512   ol_cv_db_db_4_1=no
17513 fi
17514 rm -f conftest*
17515
17516         LIBS="$ol_LIBS"
17517
17518 fi
17519
17520 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17521
17522         if test $ol_cv_db_db_4_1 = yes ; then
17523                 ol_cv_lib_db=-ldb-4-1
17524         fi
17525 fi
17526
17527 if test $ol_cv_lib_db = no ; then
17528         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17529 echo "configure:17530: checking for Berkeley DB link (-ldb-4)" >&5
17530 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17531   echo $ac_n "(cached) $ac_c" 1>&6
17532 else
17533   
17534         ol_DB_LIB=-ldb-4
17535         ol_LIBS=$LIBS
17536         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17537
17538         cat > conftest.$ac_ext <<EOF
17539 #line 17540 "configure"
17540 #include "confdefs.h"
17541
17542 #ifdef HAVE_DB_185_H
17543 # include <db_185.h>
17544 #else
17545 # include <db.h>
17546 #endif
17547
17548 #ifndef DB_VERSION_MAJOR
17549 # define DB_VERSION_MAJOR 1
17550 #endif
17551
17552 #ifndef NULL
17553 #define NULL ((void*)0)
17554 #endif
17555
17556 int main() {
17557
17558 #if DB_VERSION_MAJOR > 1
17559         {
17560                 char *version;
17561                 int major, minor, patch;
17562
17563                 version = db_version( &major, &minor, &patch );
17564
17565                 if( major != DB_VERSION_MAJOR ||
17566                         minor < DB_VERSION_MINOR )
17567                 {
17568                         printf("Berkeley DB version mismatch\n"
17569                                 "\texpected: %s\n\tgot: %s\n",
17570                                 DB_VERSION_STRING, version);
17571                         return 1;
17572                 }
17573         }
17574 #endif
17575
17576 #if DB_VERSION_MAJOR > 2
17577         db_env_create( NULL, 0 );
17578 #elif DB_VERSION_MAJOR > 1
17579         db_appexit( NULL );
17580 #else
17581         (void) dbopen( NULL, 0, 0, 0, NULL);
17582 #endif
17583
17584 ; return 0; }
17585 EOF
17586 if { (eval echo configure:17587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17587   rm -rf conftest*
17588   ol_cv_db_db_4=yes
17589 else
17590   echo "configure: failed program was:" >&5
17591   cat conftest.$ac_ext >&5
17592   rm -rf conftest*
17593   ol_cv_db_db_4=no
17594 fi
17595 rm -f conftest*
17596
17597         LIBS="$ol_LIBS"
17598
17599 fi
17600
17601 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17602
17603         if test $ol_cv_db_db_4 = yes ; then
17604                 ol_cv_lib_db=-ldb-4
17605         fi
17606 fi
17607
17608 if test $ol_cv_lib_db = no ; then
17609         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17610 echo "configure:17611: checking for Berkeley DB link (-ldb)" >&5
17611 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17612   echo $ac_n "(cached) $ac_c" 1>&6
17613 else
17614   
17615         ol_DB_LIB=-ldb
17616         ol_LIBS=$LIBS
17617         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17618
17619         cat > conftest.$ac_ext <<EOF
17620 #line 17621 "configure"
17621 #include "confdefs.h"
17622
17623 #ifdef HAVE_DB_185_H
17624 # include <db_185.h>
17625 #else
17626 # include <db.h>
17627 #endif
17628
17629 #ifndef DB_VERSION_MAJOR
17630 # define DB_VERSION_MAJOR 1
17631 #endif
17632
17633 #ifndef NULL
17634 #define NULL ((void*)0)
17635 #endif
17636
17637 int main() {
17638
17639 #if DB_VERSION_MAJOR > 1
17640         {
17641                 char *version;
17642                 int major, minor, patch;
17643
17644                 version = db_version( &major, &minor, &patch );
17645
17646                 if( major != DB_VERSION_MAJOR ||
17647                         minor < DB_VERSION_MINOR )
17648                 {
17649                         printf("Berkeley DB version mismatch\n"
17650                                 "\texpected: %s\n\tgot: %s\n",
17651                                 DB_VERSION_STRING, version);
17652                         return 1;
17653                 }
17654         }
17655 #endif
17656
17657 #if DB_VERSION_MAJOR > 2
17658         db_env_create( NULL, 0 );
17659 #elif DB_VERSION_MAJOR > 1
17660         db_appexit( NULL );
17661 #else
17662         (void) dbopen( NULL, 0, 0, 0, NULL);
17663 #endif
17664
17665 ; return 0; }
17666 EOF
17667 if { (eval echo configure:17668: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17668   rm -rf conftest*
17669   ol_cv_db_db=yes
17670 else
17671   echo "configure: failed program was:" >&5
17672   cat conftest.$ac_ext >&5
17673   rm -rf conftest*
17674   ol_cv_db_db=no
17675 fi
17676 rm -f conftest*
17677
17678         LIBS="$ol_LIBS"
17679
17680 fi
17681
17682 echo "$ac_t""$ol_cv_db_db" 1>&6
17683
17684         if test $ol_cv_db_db = yes ; then
17685                 ol_cv_lib_db=-ldb
17686         fi
17687 fi
17688
17689 if test $ol_cv_lib_db = no ; then
17690         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17691 echo "configure:17692: checking for Berkeley DB link (-ldb3)" >&5
17692 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17693   echo $ac_n "(cached) $ac_c" 1>&6
17694 else
17695   
17696         ol_DB_LIB=-ldb3
17697         ol_LIBS=$LIBS
17698         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17699
17700         cat > conftest.$ac_ext <<EOF
17701 #line 17702 "configure"
17702 #include "confdefs.h"
17703
17704 #ifdef HAVE_DB_185_H
17705 # include <db_185.h>
17706 #else
17707 # include <db.h>
17708 #endif
17709
17710 #ifndef DB_VERSION_MAJOR
17711 # define DB_VERSION_MAJOR 1
17712 #endif
17713
17714 #ifndef NULL
17715 #define NULL ((void*)0)
17716 #endif
17717
17718 int main() {
17719
17720 #if DB_VERSION_MAJOR > 1
17721         {
17722                 char *version;
17723                 int major, minor, patch;
17724
17725                 version = db_version( &major, &minor, &patch );
17726
17727                 if( major != DB_VERSION_MAJOR ||
17728                         minor < DB_VERSION_MINOR )
17729                 {
17730                         printf("Berkeley DB version mismatch\n"
17731                                 "\texpected: %s\n\tgot: %s\n",
17732                                 DB_VERSION_STRING, version);
17733                         return 1;
17734                 }
17735         }
17736 #endif
17737
17738 #if DB_VERSION_MAJOR > 2
17739         db_env_create( NULL, 0 );
17740 #elif DB_VERSION_MAJOR > 1
17741         db_appexit( NULL );
17742 #else
17743         (void) dbopen( NULL, 0, 0, 0, NULL);
17744 #endif
17745
17746 ; return 0; }
17747 EOF
17748 if { (eval echo configure:17749: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17749   rm -rf conftest*
17750   ol_cv_db_db3=yes
17751 else
17752   echo "configure: failed program was:" >&5
17753   cat conftest.$ac_ext >&5
17754   rm -rf conftest*
17755   ol_cv_db_db3=no
17756 fi
17757 rm -f conftest*
17758
17759         LIBS="$ol_LIBS"
17760
17761 fi
17762
17763 echo "$ac_t""$ol_cv_db_db3" 1>&6
17764
17765         if test $ol_cv_db_db3 = yes ; then
17766                 ol_cv_lib_db=-ldb3
17767         fi
17768 fi
17769
17770 if test $ol_cv_lib_db = no ; then
17771         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17772 echo "configure:17773: checking for Berkeley DB link (-ldb-3)" >&5
17773 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17774   echo $ac_n "(cached) $ac_c" 1>&6
17775 else
17776   
17777         ol_DB_LIB=-ldb-3
17778         ol_LIBS=$LIBS
17779         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17780
17781         cat > conftest.$ac_ext <<EOF
17782 #line 17783 "configure"
17783 #include "confdefs.h"
17784
17785 #ifdef HAVE_DB_185_H
17786 # include <db_185.h>
17787 #else
17788 # include <db.h>
17789 #endif
17790
17791 #ifndef DB_VERSION_MAJOR
17792 # define DB_VERSION_MAJOR 1
17793 #endif
17794
17795 #ifndef NULL
17796 #define NULL ((void*)0)
17797 #endif
17798
17799 int main() {
17800
17801 #if DB_VERSION_MAJOR > 1
17802         {
17803                 char *version;
17804                 int major, minor, patch;
17805
17806                 version = db_version( &major, &minor, &patch );
17807
17808                 if( major != DB_VERSION_MAJOR ||
17809                         minor < DB_VERSION_MINOR )
17810                 {
17811                         printf("Berkeley DB version mismatch\n"
17812                                 "\texpected: %s\n\tgot: %s\n",
17813                                 DB_VERSION_STRING, version);
17814                         return 1;
17815                 }
17816         }
17817 #endif
17818
17819 #if DB_VERSION_MAJOR > 2
17820         db_env_create( NULL, 0 );
17821 #elif DB_VERSION_MAJOR > 1
17822         db_appexit( NULL );
17823 #else
17824         (void) dbopen( NULL, 0, 0, 0, NULL);
17825 #endif
17826
17827 ; return 0; }
17828 EOF
17829 if { (eval echo configure:17830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17830   rm -rf conftest*
17831   ol_cv_db_db_3=yes
17832 else
17833   echo "configure: failed program was:" >&5
17834   cat conftest.$ac_ext >&5
17835   rm -rf conftest*
17836   ol_cv_db_db_3=no
17837 fi
17838 rm -f conftest*
17839
17840         LIBS="$ol_LIBS"
17841
17842 fi
17843
17844 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17845
17846         if test $ol_cv_db_db_3 = yes ; then
17847                 ol_cv_lib_db=-ldb-3
17848         fi
17849 fi
17850
17851 if test $ol_cv_lib_db = no ; then
17852         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17853 echo "configure:17854: checking for Berkeley DB link (-ldb2)" >&5
17854 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17855   echo $ac_n "(cached) $ac_c" 1>&6
17856 else
17857   
17858         ol_DB_LIB=-ldb2
17859         ol_LIBS=$LIBS
17860         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17861
17862         cat > conftest.$ac_ext <<EOF
17863 #line 17864 "configure"
17864 #include "confdefs.h"
17865
17866 #ifdef HAVE_DB_185_H
17867 # include <db_185.h>
17868 #else
17869 # include <db.h>
17870 #endif
17871
17872 #ifndef DB_VERSION_MAJOR
17873 # define DB_VERSION_MAJOR 1
17874 #endif
17875
17876 #ifndef NULL
17877 #define NULL ((void*)0)
17878 #endif
17879
17880 int main() {
17881
17882 #if DB_VERSION_MAJOR > 1
17883         {
17884                 char *version;
17885                 int major, minor, patch;
17886
17887                 version = db_version( &major, &minor, &patch );
17888
17889                 if( major != DB_VERSION_MAJOR ||
17890                         minor < DB_VERSION_MINOR )
17891                 {
17892                         printf("Berkeley DB version mismatch\n"
17893                                 "\texpected: %s\n\tgot: %s\n",
17894                                 DB_VERSION_STRING, version);
17895                         return 1;
17896                 }
17897         }
17898 #endif
17899
17900 #if DB_VERSION_MAJOR > 2
17901         db_env_create( NULL, 0 );
17902 #elif DB_VERSION_MAJOR > 1
17903         db_appexit( NULL );
17904 #else
17905         (void) dbopen( NULL, 0, 0, 0, NULL);
17906 #endif
17907
17908 ; return 0; }
17909 EOF
17910 if { (eval echo configure:17911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17911   rm -rf conftest*
17912   ol_cv_db_db2=yes
17913 else
17914   echo "configure: failed program was:" >&5
17915   cat conftest.$ac_ext >&5
17916   rm -rf conftest*
17917   ol_cv_db_db2=no
17918 fi
17919 rm -f conftest*
17920
17921         LIBS="$ol_LIBS"
17922
17923 fi
17924
17925 echo "$ac_t""$ol_cv_db_db2" 1>&6
17926
17927         if test $ol_cv_db_db2 = yes ; then
17928                 ol_cv_lib_db=-ldb2
17929         fi
17930 fi
17931
17932 if test $ol_cv_lib_db = no ; then
17933         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17934 echo "configure:17935: checking for Berkeley DB link (-ldb-2)" >&5
17935 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17936   echo $ac_n "(cached) $ac_c" 1>&6
17937 else
17938   
17939         ol_DB_LIB=-ldb-2
17940         ol_LIBS=$LIBS
17941         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17942
17943         cat > conftest.$ac_ext <<EOF
17944 #line 17945 "configure"
17945 #include "confdefs.h"
17946
17947 #ifdef HAVE_DB_185_H
17948 # include <db_185.h>
17949 #else
17950 # include <db.h>
17951 #endif
17952
17953 #ifndef DB_VERSION_MAJOR
17954 # define DB_VERSION_MAJOR 1
17955 #endif
17956
17957 #ifndef NULL
17958 #define NULL ((void*)0)
17959 #endif
17960
17961 int main() {
17962
17963 #if DB_VERSION_MAJOR > 1
17964         {
17965                 char *version;
17966                 int major, minor, patch;
17967
17968                 version = db_version( &major, &minor, &patch );
17969
17970                 if( major != DB_VERSION_MAJOR ||
17971                         minor < DB_VERSION_MINOR )
17972                 {
17973                         printf("Berkeley DB version mismatch\n"
17974                                 "\texpected: %s\n\tgot: %s\n",
17975                                 DB_VERSION_STRING, version);
17976                         return 1;
17977                 }
17978         }
17979 #endif
17980
17981 #if DB_VERSION_MAJOR > 2
17982         db_env_create( NULL, 0 );
17983 #elif DB_VERSION_MAJOR > 1
17984         db_appexit( NULL );
17985 #else
17986         (void) dbopen( NULL, 0, 0, 0, NULL);
17987 #endif
17988
17989 ; return 0; }
17990 EOF
17991 if { (eval echo configure:17992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17992   rm -rf conftest*
17993   ol_cv_db_db_2=yes
17994 else
17995   echo "configure: failed program was:" >&5
17996   cat conftest.$ac_ext >&5
17997   rm -rf conftest*
17998   ol_cv_db_db_2=no
17999 fi
18000 rm -f conftest*
18001
18002         LIBS="$ol_LIBS"
18003
18004 fi
18005
18006 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18007
18008         if test $ol_cv_db_db_2 = yes ; then
18009                 ol_cv_lib_db=-ldb-2
18010         fi
18011 fi
18012
18013 if test $ol_cv_lib_db = no ; then
18014         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18015 echo "configure:18016: checking for Berkeley DB link (-ldb1)" >&5
18016 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18017   echo $ac_n "(cached) $ac_c" 1>&6
18018 else
18019   
18020         ol_DB_LIB=-ldb1
18021         ol_LIBS=$LIBS
18022         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18023
18024         cat > conftest.$ac_ext <<EOF
18025 #line 18026 "configure"
18026 #include "confdefs.h"
18027
18028 #ifdef HAVE_DB_185_H
18029 # include <db_185.h>
18030 #else
18031 # include <db.h>
18032 #endif
18033
18034 #ifndef DB_VERSION_MAJOR
18035 # define DB_VERSION_MAJOR 1
18036 #endif
18037
18038 #ifndef NULL
18039 #define NULL ((void*)0)
18040 #endif
18041
18042 int main() {
18043
18044 #if DB_VERSION_MAJOR > 1
18045         {
18046                 char *version;
18047                 int major, minor, patch;
18048
18049                 version = db_version( &major, &minor, &patch );
18050
18051                 if( major != DB_VERSION_MAJOR ||
18052                         minor < DB_VERSION_MINOR )
18053                 {
18054                         printf("Berkeley DB version mismatch\n"
18055                                 "\texpected: %s\n\tgot: %s\n",
18056                                 DB_VERSION_STRING, version);
18057                         return 1;
18058                 }
18059         }
18060 #endif
18061
18062 #if DB_VERSION_MAJOR > 2
18063         db_env_create( NULL, 0 );
18064 #elif DB_VERSION_MAJOR > 1
18065         db_appexit( NULL );
18066 #else
18067         (void) dbopen( NULL, 0, 0, 0, NULL);
18068 #endif
18069
18070 ; return 0; }
18071 EOF
18072 if { (eval echo configure:18073: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18073   rm -rf conftest*
18074   ol_cv_db_db1=yes
18075 else
18076   echo "configure: failed program was:" >&5
18077   cat conftest.$ac_ext >&5
18078   rm -rf conftest*
18079   ol_cv_db_db1=no
18080 fi
18081 rm -f conftest*
18082
18083         LIBS="$ol_LIBS"
18084
18085 fi
18086
18087 echo "$ac_t""$ol_cv_db_db1" 1>&6
18088
18089         if test $ol_cv_db_db1 = yes ; then
18090                 ol_cv_lib_db=-ldb1
18091         fi
18092 fi
18093
18094 if test $ol_cv_lib_db = no ; then
18095         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18096 echo "configure:18097: checking for Berkeley DB link (-ldb-1)" >&5
18097 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18098   echo $ac_n "(cached) $ac_c" 1>&6
18099 else
18100   
18101         ol_DB_LIB=-ldb-1
18102         ol_LIBS=$LIBS
18103         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18104
18105         cat > conftest.$ac_ext <<EOF
18106 #line 18107 "configure"
18107 #include "confdefs.h"
18108
18109 #ifdef HAVE_DB_185_H
18110 # include <db_185.h>
18111 #else
18112 # include <db.h>
18113 #endif
18114
18115 #ifndef DB_VERSION_MAJOR
18116 # define DB_VERSION_MAJOR 1
18117 #endif
18118
18119 #ifndef NULL
18120 #define NULL ((void*)0)
18121 #endif
18122
18123 int main() {
18124
18125 #if DB_VERSION_MAJOR > 1
18126         {
18127                 char *version;
18128                 int major, minor, patch;
18129
18130                 version = db_version( &major, &minor, &patch );
18131
18132                 if( major != DB_VERSION_MAJOR ||
18133                         minor < DB_VERSION_MINOR )
18134                 {
18135                         printf("Berkeley DB version mismatch\n"
18136                                 "\texpected: %s\n\tgot: %s\n",
18137                                 DB_VERSION_STRING, version);
18138                         return 1;
18139                 }
18140         }
18141 #endif
18142
18143 #if DB_VERSION_MAJOR > 2
18144         db_env_create( NULL, 0 );
18145 #elif DB_VERSION_MAJOR > 1
18146         db_appexit( NULL );
18147 #else
18148         (void) dbopen( NULL, 0, 0, 0, NULL);
18149 #endif
18150
18151 ; return 0; }
18152 EOF
18153 if { (eval echo configure:18154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18154   rm -rf conftest*
18155   ol_cv_db_db_1=yes
18156 else
18157   echo "configure: failed program was:" >&5
18158   cat conftest.$ac_ext >&5
18159   rm -rf conftest*
18160   ol_cv_db_db_1=no
18161 fi
18162 rm -f conftest*
18163
18164         LIBS="$ol_LIBS"
18165
18166 fi
18167
18168 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18169
18170         if test $ol_cv_db_db_1 = yes ; then
18171                 ol_cv_lib_db=-ldb-1
18172         fi
18173 fi
18174
18175
18176                 if test "$ol_cv_lib_db" != no ; then
18177                         ol_cv_berkeley_db=yes
18178                 fi
18179         fi
18180 fi
18181
18182         else
18183                 ol_cv_berkeley_db=no
18184 for ac_hdr in db.h
18185 do
18186 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18187 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18188 echo "configure:18189: checking for $ac_hdr" >&5
18189 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18190   echo $ac_n "(cached) $ac_c" 1>&6
18191 else
18192   cat > conftest.$ac_ext <<EOF
18193 #line 18194 "configure"
18194 #include "confdefs.h"
18195 #include <$ac_hdr>
18196 EOF
18197 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18198 { (eval echo configure:18199: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18199 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18200 if test -z "$ac_err"; then
18201   rm -rf conftest*
18202   eval "ac_cv_header_$ac_safe=yes"
18203 else
18204   echo "$ac_err" >&5
18205   echo "configure: failed program was:" >&5
18206   cat conftest.$ac_ext >&5
18207   rm -rf conftest*
18208   eval "ac_cv_header_$ac_safe=no"
18209 fi
18210 rm -f conftest*
18211 fi
18212 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18213   echo "$ac_t""yes" 1>&6
18214     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18215   cat >> confdefs.h <<EOF
18216 #define $ac_tr_hdr 1
18217 EOF
18218  
18219 else
18220   echo "$ac_t""no" 1>&6
18221 fi
18222 done
18223
18224 if test $ac_cv_header_db_h = yes; then
18225         ol_cv_lib_db=no
18226 if test $ol_cv_lib_db = no ; then
18227         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18228 echo "configure:18229: checking for Berkeley DB link (default)" >&5
18229 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18230   echo $ac_n "(cached) $ac_c" 1>&6
18231 else
18232   
18233         ol_DB_LIB=
18234         ol_LIBS=$LIBS
18235         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18236
18237         cat > conftest.$ac_ext <<EOF
18238 #line 18239 "configure"
18239 #include "confdefs.h"
18240
18241 #ifdef HAVE_DB_185_H
18242 # include <db_185.h>
18243 #else
18244 # include <db.h>
18245 #endif
18246
18247 #ifndef DB_VERSION_MAJOR
18248 # define DB_VERSION_MAJOR 1
18249 #endif
18250
18251 #ifndef NULL
18252 #define NULL ((void*)0)
18253 #endif
18254
18255 int main() {
18256
18257 #if DB_VERSION_MAJOR > 1
18258         {
18259                 char *version;
18260                 int major, minor, patch;
18261
18262                 version = db_version( &major, &minor, &patch );
18263
18264                 if( major != DB_VERSION_MAJOR ||
18265                         minor < DB_VERSION_MINOR )
18266                 {
18267                         printf("Berkeley DB version mismatch\n"
18268                                 "\texpected: %s\n\tgot: %s\n",
18269                                 DB_VERSION_STRING, version);
18270                         return 1;
18271                 }
18272         }
18273 #endif
18274
18275 #if DB_VERSION_MAJOR > 2
18276         db_env_create( NULL, 0 );
18277 #elif DB_VERSION_MAJOR > 1
18278         db_appexit( NULL );
18279 #else
18280         (void) dbopen( NULL, 0, 0, 0, NULL);
18281 #endif
18282
18283 ; return 0; }
18284 EOF
18285 if { (eval echo configure:18286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18286   rm -rf conftest*
18287   ol_cv_db_none=yes
18288 else
18289   echo "configure: failed program was:" >&5
18290   cat conftest.$ac_ext >&5
18291   rm -rf conftest*
18292   ol_cv_db_none=no
18293 fi
18294 rm -f conftest*
18295
18296         LIBS="$ol_LIBS"
18297
18298 fi
18299
18300 echo "$ac_t""$ol_cv_db_none" 1>&6
18301
18302         if test $ol_cv_db_none = yes ; then
18303                 ol_cv_lib_db=yes
18304         fi
18305 fi
18306
18307 if test $ol_cv_lib_db = no ; then
18308         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18309 echo "configure:18310: checking for Berkeley DB link (-ldb42)" >&5
18310 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18311   echo $ac_n "(cached) $ac_c" 1>&6
18312 else
18313   
18314         ol_DB_LIB=-ldb42
18315         ol_LIBS=$LIBS
18316         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18317
18318         cat > conftest.$ac_ext <<EOF
18319 #line 18320 "configure"
18320 #include "confdefs.h"
18321
18322 #ifdef HAVE_DB_185_H
18323 # include <db_185.h>
18324 #else
18325 # include <db.h>
18326 #endif
18327
18328 #ifndef DB_VERSION_MAJOR
18329 # define DB_VERSION_MAJOR 1
18330 #endif
18331
18332 #ifndef NULL
18333 #define NULL ((void*)0)
18334 #endif
18335
18336 int main() {
18337
18338 #if DB_VERSION_MAJOR > 1
18339         {
18340                 char *version;
18341                 int major, minor, patch;
18342
18343                 version = db_version( &major, &minor, &patch );
18344
18345                 if( major != DB_VERSION_MAJOR ||
18346                         minor < DB_VERSION_MINOR )
18347                 {
18348                         printf("Berkeley DB version mismatch\n"
18349                                 "\texpected: %s\n\tgot: %s\n",
18350                                 DB_VERSION_STRING, version);
18351                         return 1;
18352                 }
18353         }
18354 #endif
18355
18356 #if DB_VERSION_MAJOR > 2
18357         db_env_create( NULL, 0 );
18358 #elif DB_VERSION_MAJOR > 1
18359         db_appexit( NULL );
18360 #else
18361         (void) dbopen( NULL, 0, 0, 0, NULL);
18362 #endif
18363
18364 ; return 0; }
18365 EOF
18366 if { (eval echo configure:18367: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18367   rm -rf conftest*
18368   ol_cv_db_db42=yes
18369 else
18370   echo "configure: failed program was:" >&5
18371   cat conftest.$ac_ext >&5
18372   rm -rf conftest*
18373   ol_cv_db_db42=no
18374 fi
18375 rm -f conftest*
18376
18377         LIBS="$ol_LIBS"
18378
18379 fi
18380
18381 echo "$ac_t""$ol_cv_db_db42" 1>&6
18382
18383         if test $ol_cv_db_db42 = yes ; then
18384                 ol_cv_lib_db=-ldb42
18385         fi
18386 fi
18387
18388 if test $ol_cv_lib_db = no ; then
18389         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18390 echo "configure:18391: checking for Berkeley DB link (-ldb-42)" >&5
18391 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18392   echo $ac_n "(cached) $ac_c" 1>&6
18393 else
18394   
18395         ol_DB_LIB=-ldb-42
18396         ol_LIBS=$LIBS
18397         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18398
18399         cat > conftest.$ac_ext <<EOF
18400 #line 18401 "configure"
18401 #include "confdefs.h"
18402
18403 #ifdef HAVE_DB_185_H
18404 # include <db_185.h>
18405 #else
18406 # include <db.h>
18407 #endif
18408
18409 #ifndef DB_VERSION_MAJOR
18410 # define DB_VERSION_MAJOR 1
18411 #endif
18412
18413 #ifndef NULL
18414 #define NULL ((void*)0)
18415 #endif
18416
18417 int main() {
18418
18419 #if DB_VERSION_MAJOR > 1
18420         {
18421                 char *version;
18422                 int major, minor, patch;
18423
18424                 version = db_version( &major, &minor, &patch );
18425
18426                 if( major != DB_VERSION_MAJOR ||
18427                         minor < DB_VERSION_MINOR )
18428                 {
18429                         printf("Berkeley DB version mismatch\n"
18430                                 "\texpected: %s\n\tgot: %s\n",
18431                                 DB_VERSION_STRING, version);
18432                         return 1;
18433                 }
18434         }
18435 #endif
18436
18437 #if DB_VERSION_MAJOR > 2
18438         db_env_create( NULL, 0 );
18439 #elif DB_VERSION_MAJOR > 1
18440         db_appexit( NULL );
18441 #else
18442         (void) dbopen( NULL, 0, 0, 0, NULL);
18443 #endif
18444
18445 ; return 0; }
18446 EOF
18447 if { (eval echo configure:18448: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18448   rm -rf conftest*
18449   ol_cv_db_db_42=yes
18450 else
18451   echo "configure: failed program was:" >&5
18452   cat conftest.$ac_ext >&5
18453   rm -rf conftest*
18454   ol_cv_db_db_42=no
18455 fi
18456 rm -f conftest*
18457
18458         LIBS="$ol_LIBS"
18459
18460 fi
18461
18462 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18463
18464         if test $ol_cv_db_db_42 = yes ; then
18465                 ol_cv_lib_db=-ldb-42
18466         fi
18467 fi
18468
18469 if test $ol_cv_lib_db = no ; then
18470         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18471 echo "configure:18472: checking for Berkeley DB link (-ldb-4.2)" >&5
18472 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18473   echo $ac_n "(cached) $ac_c" 1>&6
18474 else
18475   
18476         ol_DB_LIB=-ldb-4.2
18477         ol_LIBS=$LIBS
18478         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18479
18480         cat > conftest.$ac_ext <<EOF
18481 #line 18482 "configure"
18482 #include "confdefs.h"
18483
18484 #ifdef HAVE_DB_185_H
18485 # include <db_185.h>
18486 #else
18487 # include <db.h>
18488 #endif
18489
18490 #ifndef DB_VERSION_MAJOR
18491 # define DB_VERSION_MAJOR 1
18492 #endif
18493
18494 #ifndef NULL
18495 #define NULL ((void*)0)
18496 #endif
18497
18498 int main() {
18499
18500 #if DB_VERSION_MAJOR > 1
18501         {
18502                 char *version;
18503                 int major, minor, patch;
18504
18505                 version = db_version( &major, &minor, &patch );
18506
18507                 if( major != DB_VERSION_MAJOR ||
18508                         minor < DB_VERSION_MINOR )
18509                 {
18510                         printf("Berkeley DB version mismatch\n"
18511                                 "\texpected: %s\n\tgot: %s\n",
18512                                 DB_VERSION_STRING, version);
18513                         return 1;
18514                 }
18515         }
18516 #endif
18517
18518 #if DB_VERSION_MAJOR > 2
18519         db_env_create( NULL, 0 );
18520 #elif DB_VERSION_MAJOR > 1
18521         db_appexit( NULL );
18522 #else
18523         (void) dbopen( NULL, 0, 0, 0, NULL);
18524 #endif
18525
18526 ; return 0; }
18527 EOF
18528 if { (eval echo configure:18529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18529   rm -rf conftest*
18530   ol_cv_db_db_4_dot_2=yes
18531 else
18532   echo "configure: failed program was:" >&5
18533   cat conftest.$ac_ext >&5
18534   rm -rf conftest*
18535   ol_cv_db_db_4_dot_2=no
18536 fi
18537 rm -f conftest*
18538
18539         LIBS="$ol_LIBS"
18540
18541 fi
18542
18543 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18544
18545         if test $ol_cv_db_db_4_dot_2 = yes ; then
18546                 ol_cv_lib_db=-ldb-4.2
18547         fi
18548 fi
18549
18550 if test $ol_cv_lib_db = no ; then
18551         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18552 echo "configure:18553: checking for Berkeley DB link (-ldb-4-2)" >&5
18553 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18554   echo $ac_n "(cached) $ac_c" 1>&6
18555 else
18556   
18557         ol_DB_LIB=-ldb-4-2
18558         ol_LIBS=$LIBS
18559         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18560
18561         cat > conftest.$ac_ext <<EOF
18562 #line 18563 "configure"
18563 #include "confdefs.h"
18564
18565 #ifdef HAVE_DB_185_H
18566 # include <db_185.h>
18567 #else
18568 # include <db.h>
18569 #endif
18570
18571 #ifndef DB_VERSION_MAJOR
18572 # define DB_VERSION_MAJOR 1
18573 #endif
18574
18575 #ifndef NULL
18576 #define NULL ((void*)0)
18577 #endif
18578
18579 int main() {
18580
18581 #if DB_VERSION_MAJOR > 1
18582         {
18583                 char *version;
18584                 int major, minor, patch;
18585
18586                 version = db_version( &major, &minor, &patch );
18587
18588                 if( major != DB_VERSION_MAJOR ||
18589                         minor < DB_VERSION_MINOR )
18590                 {
18591                         printf("Berkeley DB version mismatch\n"
18592                                 "\texpected: %s\n\tgot: %s\n",
18593                                 DB_VERSION_STRING, version);
18594                         return 1;
18595                 }
18596         }
18597 #endif
18598
18599 #if DB_VERSION_MAJOR > 2
18600         db_env_create( NULL, 0 );
18601 #elif DB_VERSION_MAJOR > 1
18602         db_appexit( NULL );
18603 #else
18604         (void) dbopen( NULL, 0, 0, 0, NULL);
18605 #endif
18606
18607 ; return 0; }
18608 EOF
18609 if { (eval echo configure:18610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18610   rm -rf conftest*
18611   ol_cv_db_db_4_2=yes
18612 else
18613   echo "configure: failed program was:" >&5
18614   cat conftest.$ac_ext >&5
18615   rm -rf conftest*
18616   ol_cv_db_db_4_2=no
18617 fi
18618 rm -f conftest*
18619
18620         LIBS="$ol_LIBS"
18621
18622 fi
18623
18624 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18625
18626         if test $ol_cv_db_db_4_2 = yes ; then
18627                 ol_cv_lib_db=-ldb-4-2
18628         fi
18629 fi
18630
18631 if test $ol_cv_lib_db = no ; then
18632         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18633 echo "configure:18634: checking for Berkeley DB link (-ldb-4)" >&5
18634 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18635   echo $ac_n "(cached) $ac_c" 1>&6
18636 else
18637   
18638         ol_DB_LIB=-ldb-4
18639         ol_LIBS=$LIBS
18640         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18641
18642         cat > conftest.$ac_ext <<EOF
18643 #line 18644 "configure"
18644 #include "confdefs.h"
18645
18646 #ifdef HAVE_DB_185_H
18647 # include <db_185.h>
18648 #else
18649 # include <db.h>
18650 #endif
18651
18652 #ifndef DB_VERSION_MAJOR
18653 # define DB_VERSION_MAJOR 1
18654 #endif
18655
18656 #ifndef NULL
18657 #define NULL ((void*)0)
18658 #endif
18659
18660 int main() {
18661
18662 #if DB_VERSION_MAJOR > 1
18663         {
18664                 char *version;
18665                 int major, minor, patch;
18666
18667                 version = db_version( &major, &minor, &patch );
18668
18669                 if( major != DB_VERSION_MAJOR ||
18670                         minor < DB_VERSION_MINOR )
18671                 {
18672                         printf("Berkeley DB version mismatch\n"
18673                                 "\texpected: %s\n\tgot: %s\n",
18674                                 DB_VERSION_STRING, version);
18675                         return 1;
18676                 }
18677         }
18678 #endif
18679
18680 #if DB_VERSION_MAJOR > 2
18681         db_env_create( NULL, 0 );
18682 #elif DB_VERSION_MAJOR > 1
18683         db_appexit( NULL );
18684 #else
18685         (void) dbopen( NULL, 0, 0, 0, NULL);
18686 #endif
18687
18688 ; return 0; }
18689 EOF
18690 if { (eval echo configure:18691: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18691   rm -rf conftest*
18692   ol_cv_db_db_4=yes
18693 else
18694   echo "configure: failed program was:" >&5
18695   cat conftest.$ac_ext >&5
18696   rm -rf conftest*
18697   ol_cv_db_db_4=no
18698 fi
18699 rm -f conftest*
18700
18701         LIBS="$ol_LIBS"
18702
18703 fi
18704
18705 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18706
18707         if test $ol_cv_db_db_4 = yes ; then
18708                 ol_cv_lib_db=-ldb-4
18709         fi
18710 fi
18711
18712 if test $ol_cv_lib_db = no ; then
18713         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18714 echo "configure:18715: checking for Berkeley DB link (-ldb4)" >&5
18715 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18716   echo $ac_n "(cached) $ac_c" 1>&6
18717 else
18718   
18719         ol_DB_LIB=-ldb4
18720         ol_LIBS=$LIBS
18721         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18722
18723         cat > conftest.$ac_ext <<EOF
18724 #line 18725 "configure"
18725 #include "confdefs.h"
18726
18727 #ifdef HAVE_DB_185_H
18728 # include <db_185.h>
18729 #else
18730 # include <db.h>
18731 #endif
18732
18733 #ifndef DB_VERSION_MAJOR
18734 # define DB_VERSION_MAJOR 1
18735 #endif
18736
18737 #ifndef NULL
18738 #define NULL ((void*)0)
18739 #endif
18740
18741 int main() {
18742
18743 #if DB_VERSION_MAJOR > 1
18744         {
18745                 char *version;
18746                 int major, minor, patch;
18747
18748                 version = db_version( &major, &minor, &patch );
18749
18750                 if( major != DB_VERSION_MAJOR ||
18751                         minor < DB_VERSION_MINOR )
18752                 {
18753                         printf("Berkeley DB version mismatch\n"
18754                                 "\texpected: %s\n\tgot: %s\n",
18755                                 DB_VERSION_STRING, version);
18756                         return 1;
18757                 }
18758         }
18759 #endif
18760
18761 #if DB_VERSION_MAJOR > 2
18762         db_env_create( NULL, 0 );
18763 #elif DB_VERSION_MAJOR > 1
18764         db_appexit( NULL );
18765 #else
18766         (void) dbopen( NULL, 0, 0, 0, NULL);
18767 #endif
18768
18769 ; return 0; }
18770 EOF
18771 if { (eval echo configure:18772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18772   rm -rf conftest*
18773   ol_cv_db_db4=yes
18774 else
18775   echo "configure: failed program was:" >&5
18776   cat conftest.$ac_ext >&5
18777   rm -rf conftest*
18778   ol_cv_db_db4=no
18779 fi
18780 rm -f conftest*
18781
18782         LIBS="$ol_LIBS"
18783
18784 fi
18785
18786 echo "$ac_t""$ol_cv_db_db4" 1>&6
18787
18788         if test $ol_cv_db_db4 = yes ; then
18789                 ol_cv_lib_db=-ldb4
18790         fi
18791 fi
18792
18793 if test $ol_cv_lib_db = no ; then
18794         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18795 echo "configure:18796: checking for Berkeley DB link (-ldb41)" >&5
18796 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18797   echo $ac_n "(cached) $ac_c" 1>&6
18798 else
18799   
18800         ol_DB_LIB=-ldb41
18801         ol_LIBS=$LIBS
18802         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18803
18804         cat > conftest.$ac_ext <<EOF
18805 #line 18806 "configure"
18806 #include "confdefs.h"
18807
18808 #ifdef HAVE_DB_185_H
18809 # include <db_185.h>
18810 #else
18811 # include <db.h>
18812 #endif
18813
18814 #ifndef DB_VERSION_MAJOR
18815 # define DB_VERSION_MAJOR 1
18816 #endif
18817
18818 #ifndef NULL
18819 #define NULL ((void*)0)
18820 #endif
18821
18822 int main() {
18823
18824 #if DB_VERSION_MAJOR > 1
18825         {
18826                 char *version;
18827                 int major, minor, patch;
18828
18829                 version = db_version( &major, &minor, &patch );
18830
18831                 if( major != DB_VERSION_MAJOR ||
18832                         minor < DB_VERSION_MINOR )
18833                 {
18834                         printf("Berkeley DB version mismatch\n"
18835                                 "\texpected: %s\n\tgot: %s\n",
18836                                 DB_VERSION_STRING, version);
18837                         return 1;
18838                 }
18839         }
18840 #endif
18841
18842 #if DB_VERSION_MAJOR > 2
18843         db_env_create( NULL, 0 );
18844 #elif DB_VERSION_MAJOR > 1
18845         db_appexit( NULL );
18846 #else
18847         (void) dbopen( NULL, 0, 0, 0, NULL);
18848 #endif
18849
18850 ; return 0; }
18851 EOF
18852 if { (eval echo configure:18853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18853   rm -rf conftest*
18854   ol_cv_db_db41=yes
18855 else
18856   echo "configure: failed program was:" >&5
18857   cat conftest.$ac_ext >&5
18858   rm -rf conftest*
18859   ol_cv_db_db41=no
18860 fi
18861 rm -f conftest*
18862
18863         LIBS="$ol_LIBS"
18864
18865 fi
18866
18867 echo "$ac_t""$ol_cv_db_db41" 1>&6
18868
18869         if test $ol_cv_db_db41 = yes ; then
18870                 ol_cv_lib_db=-ldb41
18871         fi
18872 fi
18873
18874 if test $ol_cv_lib_db = no ; then
18875         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
18876 echo "configure:18877: checking for Berkeley DB link (-ldb-41)" >&5
18877 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
18878   echo $ac_n "(cached) $ac_c" 1>&6
18879 else
18880   
18881         ol_DB_LIB=-ldb-41
18882         ol_LIBS=$LIBS
18883         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18884
18885         cat > conftest.$ac_ext <<EOF
18886 #line 18887 "configure"
18887 #include "confdefs.h"
18888
18889 #ifdef HAVE_DB_185_H
18890 # include <db_185.h>
18891 #else
18892 # include <db.h>
18893 #endif
18894
18895 #ifndef DB_VERSION_MAJOR
18896 # define DB_VERSION_MAJOR 1
18897 #endif
18898
18899 #ifndef NULL
18900 #define NULL ((void*)0)
18901 #endif
18902
18903 int main() {
18904
18905 #if DB_VERSION_MAJOR > 1
18906         {
18907                 char *version;
18908                 int major, minor, patch;
18909
18910                 version = db_version( &major, &minor, &patch );
18911
18912                 if( major != DB_VERSION_MAJOR ||
18913                         minor < DB_VERSION_MINOR )
18914                 {
18915                         printf("Berkeley DB version mismatch\n"
18916                                 "\texpected: %s\n\tgot: %s\n",
18917                                 DB_VERSION_STRING, version);
18918                         return 1;
18919                 }
18920         }
18921 #endif
18922
18923 #if DB_VERSION_MAJOR > 2
18924         db_env_create( NULL, 0 );
18925 #elif DB_VERSION_MAJOR > 1
18926         db_appexit( NULL );
18927 #else
18928         (void) dbopen( NULL, 0, 0, 0, NULL);
18929 #endif
18930
18931 ; return 0; }
18932 EOF
18933 if { (eval echo configure:18934: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18934   rm -rf conftest*
18935   ol_cv_db_db_41=yes
18936 else
18937   echo "configure: failed program was:" >&5
18938   cat conftest.$ac_ext >&5
18939   rm -rf conftest*
18940   ol_cv_db_db_41=no
18941 fi
18942 rm -f conftest*
18943
18944         LIBS="$ol_LIBS"
18945
18946 fi
18947
18948 echo "$ac_t""$ol_cv_db_db_41" 1>&6
18949
18950         if test $ol_cv_db_db_41 = yes ; then
18951                 ol_cv_lib_db=-ldb-41
18952         fi
18953 fi
18954
18955 if test $ol_cv_lib_db = no ; then
18956         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
18957 echo "configure:18958: checking for Berkeley DB link (-ldb-4.1)" >&5
18958 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
18959   echo $ac_n "(cached) $ac_c" 1>&6
18960 else
18961   
18962         ol_DB_LIB=-ldb-4.1
18963         ol_LIBS=$LIBS
18964         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18965
18966         cat > conftest.$ac_ext <<EOF
18967 #line 18968 "configure"
18968 #include "confdefs.h"
18969
18970 #ifdef HAVE_DB_185_H
18971 # include <db_185.h>
18972 #else
18973 # include <db.h>
18974 #endif
18975
18976 #ifndef DB_VERSION_MAJOR
18977 # define DB_VERSION_MAJOR 1
18978 #endif
18979
18980 #ifndef NULL
18981 #define NULL ((void*)0)
18982 #endif
18983
18984 int main() {
18985
18986 #if DB_VERSION_MAJOR > 1
18987         {
18988                 char *version;
18989                 int major, minor, patch;
18990
18991                 version = db_version( &major, &minor, &patch );
18992
18993                 if( major != DB_VERSION_MAJOR ||
18994                         minor < DB_VERSION_MINOR )
18995                 {
18996                         printf("Berkeley DB version mismatch\n"
18997                                 "\texpected: %s\n\tgot: %s\n",
18998                                 DB_VERSION_STRING, version);
18999                         return 1;
19000                 }
19001         }
19002 #endif
19003
19004 #if DB_VERSION_MAJOR > 2
19005         db_env_create( NULL, 0 );
19006 #elif DB_VERSION_MAJOR > 1
19007         db_appexit( NULL );
19008 #else
19009         (void) dbopen( NULL, 0, 0, 0, NULL);
19010 #endif
19011
19012 ; return 0; }
19013 EOF
19014 if { (eval echo configure:19015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19015   rm -rf conftest*
19016   ol_cv_db_db_4_dot_1=yes
19017 else
19018   echo "configure: failed program was:" >&5
19019   cat conftest.$ac_ext >&5
19020   rm -rf conftest*
19021   ol_cv_db_db_4_dot_1=no
19022 fi
19023 rm -f conftest*
19024
19025         LIBS="$ol_LIBS"
19026
19027 fi
19028
19029 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19030
19031         if test $ol_cv_db_db_4_dot_1 = yes ; then
19032                 ol_cv_lib_db=-ldb-4.1
19033         fi
19034 fi
19035
19036 if test $ol_cv_lib_db = no ; then
19037         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19038 echo "configure:19039: checking for Berkeley DB link (-ldb-4-1)" >&5
19039 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19040   echo $ac_n "(cached) $ac_c" 1>&6
19041 else
19042   
19043         ol_DB_LIB=-ldb-4-1
19044         ol_LIBS=$LIBS
19045         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19046
19047         cat > conftest.$ac_ext <<EOF
19048 #line 19049 "configure"
19049 #include "confdefs.h"
19050
19051 #ifdef HAVE_DB_185_H
19052 # include <db_185.h>
19053 #else
19054 # include <db.h>
19055 #endif
19056
19057 #ifndef DB_VERSION_MAJOR
19058 # define DB_VERSION_MAJOR 1
19059 #endif
19060
19061 #ifndef NULL
19062 #define NULL ((void*)0)
19063 #endif
19064
19065 int main() {
19066
19067 #if DB_VERSION_MAJOR > 1
19068         {
19069                 char *version;
19070                 int major, minor, patch;
19071
19072                 version = db_version( &major, &minor, &patch );
19073
19074                 if( major != DB_VERSION_MAJOR ||
19075                         minor < DB_VERSION_MINOR )
19076                 {
19077                         printf("Berkeley DB version mismatch\n"
19078                                 "\texpected: %s\n\tgot: %s\n",
19079                                 DB_VERSION_STRING, version);
19080                         return 1;
19081                 }
19082         }
19083 #endif
19084
19085 #if DB_VERSION_MAJOR > 2
19086         db_env_create( NULL, 0 );
19087 #elif DB_VERSION_MAJOR > 1
19088         db_appexit( NULL );
19089 #else
19090         (void) dbopen( NULL, 0, 0, 0, NULL);
19091 #endif
19092
19093 ; return 0; }
19094 EOF
19095 if { (eval echo configure:19096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19096   rm -rf conftest*
19097   ol_cv_db_db_4_1=yes
19098 else
19099   echo "configure: failed program was:" >&5
19100   cat conftest.$ac_ext >&5
19101   rm -rf conftest*
19102   ol_cv_db_db_4_1=no
19103 fi
19104 rm -f conftest*
19105
19106         LIBS="$ol_LIBS"
19107
19108 fi
19109
19110 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19111
19112         if test $ol_cv_db_db_4_1 = yes ; then
19113                 ol_cv_lib_db=-ldb-4-1
19114         fi
19115 fi
19116
19117 if test $ol_cv_lib_db = no ; then
19118         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
19119 echo "configure:19120: checking for Berkeley DB link (-ldb-4)" >&5
19120 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
19121   echo $ac_n "(cached) $ac_c" 1>&6
19122 else
19123   
19124         ol_DB_LIB=-ldb-4
19125         ol_LIBS=$LIBS
19126         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19127
19128         cat > conftest.$ac_ext <<EOF
19129 #line 19130 "configure"
19130 #include "confdefs.h"
19131
19132 #ifdef HAVE_DB_185_H
19133 # include <db_185.h>
19134 #else
19135 # include <db.h>
19136 #endif
19137
19138 #ifndef DB_VERSION_MAJOR
19139 # define DB_VERSION_MAJOR 1
19140 #endif
19141
19142 #ifndef NULL
19143 #define NULL ((void*)0)
19144 #endif
19145
19146 int main() {
19147
19148 #if DB_VERSION_MAJOR > 1
19149         {
19150                 char *version;
19151                 int major, minor, patch;
19152
19153                 version = db_version( &major, &minor, &patch );
19154
19155                 if( major != DB_VERSION_MAJOR ||
19156                         minor < DB_VERSION_MINOR )
19157                 {
19158                         printf("Berkeley DB version mismatch\n"
19159                                 "\texpected: %s\n\tgot: %s\n",
19160                                 DB_VERSION_STRING, version);
19161                         return 1;
19162                 }
19163         }
19164 #endif
19165
19166 #if DB_VERSION_MAJOR > 2
19167         db_env_create( NULL, 0 );
19168 #elif DB_VERSION_MAJOR > 1
19169         db_appexit( NULL );
19170 #else
19171         (void) dbopen( NULL, 0, 0, 0, NULL);
19172 #endif
19173
19174 ; return 0; }
19175 EOF
19176 if { (eval echo configure:19177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19177   rm -rf conftest*
19178   ol_cv_db_db_4=yes
19179 else
19180   echo "configure: failed program was:" >&5
19181   cat conftest.$ac_ext >&5
19182   rm -rf conftest*
19183   ol_cv_db_db_4=no
19184 fi
19185 rm -f conftest*
19186
19187         LIBS="$ol_LIBS"
19188
19189 fi
19190
19191 echo "$ac_t""$ol_cv_db_db_4" 1>&6
19192
19193         if test $ol_cv_db_db_4 = yes ; then
19194                 ol_cv_lib_db=-ldb-4
19195         fi
19196 fi
19197
19198 if test $ol_cv_lib_db = no ; then
19199         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
19200 echo "configure:19201: checking for Berkeley DB link (-ldb)" >&5
19201 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
19202   echo $ac_n "(cached) $ac_c" 1>&6
19203 else
19204   
19205         ol_DB_LIB=-ldb
19206         ol_LIBS=$LIBS
19207         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19208
19209         cat > conftest.$ac_ext <<EOF
19210 #line 19211 "configure"
19211 #include "confdefs.h"
19212
19213 #ifdef HAVE_DB_185_H
19214 # include <db_185.h>
19215 #else
19216 # include <db.h>
19217 #endif
19218
19219 #ifndef DB_VERSION_MAJOR
19220 # define DB_VERSION_MAJOR 1
19221 #endif
19222
19223 #ifndef NULL
19224 #define NULL ((void*)0)
19225 #endif
19226
19227 int main() {
19228
19229 #if DB_VERSION_MAJOR > 1
19230         {
19231                 char *version;
19232                 int major, minor, patch;
19233
19234                 version = db_version( &major, &minor, &patch );
19235
19236                 if( major != DB_VERSION_MAJOR ||
19237                         minor < DB_VERSION_MINOR )
19238                 {
19239                         printf("Berkeley DB version mismatch\n"
19240                                 "\texpected: %s\n\tgot: %s\n",
19241                                 DB_VERSION_STRING, version);
19242                         return 1;
19243                 }
19244         }
19245 #endif
19246
19247 #if DB_VERSION_MAJOR > 2
19248         db_env_create( NULL, 0 );
19249 #elif DB_VERSION_MAJOR > 1
19250         db_appexit( NULL );
19251 #else
19252         (void) dbopen( NULL, 0, 0, 0, NULL);
19253 #endif
19254
19255 ; return 0; }
19256 EOF
19257 if { (eval echo configure:19258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19258   rm -rf conftest*
19259   ol_cv_db_db=yes
19260 else
19261   echo "configure: failed program was:" >&5
19262   cat conftest.$ac_ext >&5
19263   rm -rf conftest*
19264   ol_cv_db_db=no
19265 fi
19266 rm -f conftest*
19267
19268         LIBS="$ol_LIBS"
19269
19270 fi
19271
19272 echo "$ac_t""$ol_cv_db_db" 1>&6
19273
19274         if test $ol_cv_db_db = yes ; then
19275                 ol_cv_lib_db=-ldb
19276         fi
19277 fi
19278
19279 if test $ol_cv_lib_db = no ; then
19280         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19281 echo "configure:19282: checking for Berkeley DB link (-ldb3)" >&5
19282 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19283   echo $ac_n "(cached) $ac_c" 1>&6
19284 else
19285   
19286         ol_DB_LIB=-ldb3
19287         ol_LIBS=$LIBS
19288         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19289
19290         cat > conftest.$ac_ext <<EOF
19291 #line 19292 "configure"
19292 #include "confdefs.h"
19293
19294 #ifdef HAVE_DB_185_H
19295 # include <db_185.h>
19296 #else
19297 # include <db.h>
19298 #endif
19299
19300 #ifndef DB_VERSION_MAJOR
19301 # define DB_VERSION_MAJOR 1
19302 #endif
19303
19304 #ifndef NULL
19305 #define NULL ((void*)0)
19306 #endif
19307
19308 int main() {
19309
19310 #if DB_VERSION_MAJOR > 1
19311         {
19312                 char *version;
19313                 int major, minor, patch;
19314
19315                 version = db_version( &major, &minor, &patch );
19316
19317                 if( major != DB_VERSION_MAJOR ||
19318                         minor < DB_VERSION_MINOR )
19319                 {
19320                         printf("Berkeley DB version mismatch\n"
19321                                 "\texpected: %s\n\tgot: %s\n",
19322                                 DB_VERSION_STRING, version);
19323                         return 1;
19324                 }
19325         }
19326 #endif
19327
19328 #if DB_VERSION_MAJOR > 2
19329         db_env_create( NULL, 0 );
19330 #elif DB_VERSION_MAJOR > 1
19331         db_appexit( NULL );
19332 #else
19333         (void) dbopen( NULL, 0, 0, 0, NULL);
19334 #endif
19335
19336 ; return 0; }
19337 EOF
19338 if { (eval echo configure:19339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19339   rm -rf conftest*
19340   ol_cv_db_db3=yes
19341 else
19342   echo "configure: failed program was:" >&5
19343   cat conftest.$ac_ext >&5
19344   rm -rf conftest*
19345   ol_cv_db_db3=no
19346 fi
19347 rm -f conftest*
19348
19349         LIBS="$ol_LIBS"
19350
19351 fi
19352
19353 echo "$ac_t""$ol_cv_db_db3" 1>&6
19354
19355         if test $ol_cv_db_db3 = yes ; then
19356                 ol_cv_lib_db=-ldb3
19357         fi
19358 fi
19359
19360 if test $ol_cv_lib_db = no ; then
19361         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19362 echo "configure:19363: checking for Berkeley DB link (-ldb-3)" >&5
19363 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19364   echo $ac_n "(cached) $ac_c" 1>&6
19365 else
19366   
19367         ol_DB_LIB=-ldb-3
19368         ol_LIBS=$LIBS
19369         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19370
19371         cat > conftest.$ac_ext <<EOF
19372 #line 19373 "configure"
19373 #include "confdefs.h"
19374
19375 #ifdef HAVE_DB_185_H
19376 # include <db_185.h>
19377 #else
19378 # include <db.h>
19379 #endif
19380
19381 #ifndef DB_VERSION_MAJOR
19382 # define DB_VERSION_MAJOR 1
19383 #endif
19384
19385 #ifndef NULL
19386 #define NULL ((void*)0)
19387 #endif
19388
19389 int main() {
19390
19391 #if DB_VERSION_MAJOR > 1
19392         {
19393                 char *version;
19394                 int major, minor, patch;
19395
19396                 version = db_version( &major, &minor, &patch );
19397
19398                 if( major != DB_VERSION_MAJOR ||
19399                         minor < DB_VERSION_MINOR )
19400                 {
19401                         printf("Berkeley DB version mismatch\n"
19402                                 "\texpected: %s\n\tgot: %s\n",
19403                                 DB_VERSION_STRING, version);
19404                         return 1;
19405                 }
19406         }
19407 #endif
19408
19409 #if DB_VERSION_MAJOR > 2
19410         db_env_create( NULL, 0 );
19411 #elif DB_VERSION_MAJOR > 1
19412         db_appexit( NULL );
19413 #else
19414         (void) dbopen( NULL, 0, 0, 0, NULL);
19415 #endif
19416
19417 ; return 0; }
19418 EOF
19419 if { (eval echo configure:19420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19420   rm -rf conftest*
19421   ol_cv_db_db_3=yes
19422 else
19423   echo "configure: failed program was:" >&5
19424   cat conftest.$ac_ext >&5
19425   rm -rf conftest*
19426   ol_cv_db_db_3=no
19427 fi
19428 rm -f conftest*
19429
19430         LIBS="$ol_LIBS"
19431
19432 fi
19433
19434 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19435
19436         if test $ol_cv_db_db_3 = yes ; then
19437                 ol_cv_lib_db=-ldb-3
19438         fi
19439 fi
19440
19441 if test $ol_cv_lib_db = no ; then
19442         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19443 echo "configure:19444: checking for Berkeley DB link (-ldb2)" >&5
19444 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19445   echo $ac_n "(cached) $ac_c" 1>&6
19446 else
19447   
19448         ol_DB_LIB=-ldb2
19449         ol_LIBS=$LIBS
19450         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19451
19452         cat > conftest.$ac_ext <<EOF
19453 #line 19454 "configure"
19454 #include "confdefs.h"
19455
19456 #ifdef HAVE_DB_185_H
19457 # include <db_185.h>
19458 #else
19459 # include <db.h>
19460 #endif
19461
19462 #ifndef DB_VERSION_MAJOR
19463 # define DB_VERSION_MAJOR 1
19464 #endif
19465
19466 #ifndef NULL
19467 #define NULL ((void*)0)
19468 #endif
19469
19470 int main() {
19471
19472 #if DB_VERSION_MAJOR > 1
19473         {
19474                 char *version;
19475                 int major, minor, patch;
19476
19477                 version = db_version( &major, &minor, &patch );
19478
19479                 if( major != DB_VERSION_MAJOR ||
19480                         minor < DB_VERSION_MINOR )
19481                 {
19482                         printf("Berkeley DB version mismatch\n"
19483                                 "\texpected: %s\n\tgot: %s\n",
19484                                 DB_VERSION_STRING, version);
19485                         return 1;
19486                 }
19487         }
19488 #endif
19489
19490 #if DB_VERSION_MAJOR > 2
19491         db_env_create( NULL, 0 );
19492 #elif DB_VERSION_MAJOR > 1
19493         db_appexit( NULL );
19494 #else
19495         (void) dbopen( NULL, 0, 0, 0, NULL);
19496 #endif
19497
19498 ; return 0; }
19499 EOF
19500 if { (eval echo configure:19501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19501   rm -rf conftest*
19502   ol_cv_db_db2=yes
19503 else
19504   echo "configure: failed program was:" >&5
19505   cat conftest.$ac_ext >&5
19506   rm -rf conftest*
19507   ol_cv_db_db2=no
19508 fi
19509 rm -f conftest*
19510
19511         LIBS="$ol_LIBS"
19512
19513 fi
19514
19515 echo "$ac_t""$ol_cv_db_db2" 1>&6
19516
19517         if test $ol_cv_db_db2 = yes ; then
19518                 ol_cv_lib_db=-ldb2
19519         fi
19520 fi
19521
19522 if test $ol_cv_lib_db = no ; then
19523         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19524 echo "configure:19525: checking for Berkeley DB link (-ldb-2)" >&5
19525 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19526   echo $ac_n "(cached) $ac_c" 1>&6
19527 else
19528   
19529         ol_DB_LIB=-ldb-2
19530         ol_LIBS=$LIBS
19531         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19532
19533         cat > conftest.$ac_ext <<EOF
19534 #line 19535 "configure"
19535 #include "confdefs.h"
19536
19537 #ifdef HAVE_DB_185_H
19538 # include <db_185.h>
19539 #else
19540 # include <db.h>
19541 #endif
19542
19543 #ifndef DB_VERSION_MAJOR
19544 # define DB_VERSION_MAJOR 1
19545 #endif
19546
19547 #ifndef NULL
19548 #define NULL ((void*)0)
19549 #endif
19550
19551 int main() {
19552
19553 #if DB_VERSION_MAJOR > 1
19554         {
19555                 char *version;
19556                 int major, minor, patch;
19557
19558                 version = db_version( &major, &minor, &patch );
19559
19560                 if( major != DB_VERSION_MAJOR ||
19561                         minor < DB_VERSION_MINOR )
19562                 {
19563                         printf("Berkeley DB version mismatch\n"
19564                                 "\texpected: %s\n\tgot: %s\n",
19565                                 DB_VERSION_STRING, version);
19566                         return 1;
19567                 }
19568         }
19569 #endif
19570
19571 #if DB_VERSION_MAJOR > 2
19572         db_env_create( NULL, 0 );
19573 #elif DB_VERSION_MAJOR > 1
19574         db_appexit( NULL );
19575 #else
19576         (void) dbopen( NULL, 0, 0, 0, NULL);
19577 #endif
19578
19579 ; return 0; }
19580 EOF
19581 if { (eval echo configure:19582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19582   rm -rf conftest*
19583   ol_cv_db_db_2=yes
19584 else
19585   echo "configure: failed program was:" >&5
19586   cat conftest.$ac_ext >&5
19587   rm -rf conftest*
19588   ol_cv_db_db_2=no
19589 fi
19590 rm -f conftest*
19591
19592         LIBS="$ol_LIBS"
19593
19594 fi
19595
19596 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19597
19598         if test $ol_cv_db_db_2 = yes ; then
19599                 ol_cv_lib_db=-ldb-2
19600         fi
19601 fi
19602
19603 if test $ol_cv_lib_db = no ; then
19604         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19605 echo "configure:19606: checking for Berkeley DB link (-ldb1)" >&5
19606 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19607   echo $ac_n "(cached) $ac_c" 1>&6
19608 else
19609   
19610         ol_DB_LIB=-ldb1
19611         ol_LIBS=$LIBS
19612         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19613
19614         cat > conftest.$ac_ext <<EOF
19615 #line 19616 "configure"
19616 #include "confdefs.h"
19617
19618 #ifdef HAVE_DB_185_H
19619 # include <db_185.h>
19620 #else
19621 # include <db.h>
19622 #endif
19623
19624 #ifndef DB_VERSION_MAJOR
19625 # define DB_VERSION_MAJOR 1
19626 #endif
19627
19628 #ifndef NULL
19629 #define NULL ((void*)0)
19630 #endif
19631
19632 int main() {
19633
19634 #if DB_VERSION_MAJOR > 1
19635         {
19636                 char *version;
19637                 int major, minor, patch;
19638
19639                 version = db_version( &major, &minor, &patch );
19640
19641                 if( major != DB_VERSION_MAJOR ||
19642                         minor < DB_VERSION_MINOR )
19643                 {
19644                         printf("Berkeley DB version mismatch\n"
19645                                 "\texpected: %s\n\tgot: %s\n",
19646                                 DB_VERSION_STRING, version);
19647                         return 1;
19648                 }
19649         }
19650 #endif
19651
19652 #if DB_VERSION_MAJOR > 2
19653         db_env_create( NULL, 0 );
19654 #elif DB_VERSION_MAJOR > 1
19655         db_appexit( NULL );
19656 #else
19657         (void) dbopen( NULL, 0, 0, 0, NULL);
19658 #endif
19659
19660 ; return 0; }
19661 EOF
19662 if { (eval echo configure:19663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19663   rm -rf conftest*
19664   ol_cv_db_db1=yes
19665 else
19666   echo "configure: failed program was:" >&5
19667   cat conftest.$ac_ext >&5
19668   rm -rf conftest*
19669   ol_cv_db_db1=no
19670 fi
19671 rm -f conftest*
19672
19673         LIBS="$ol_LIBS"
19674
19675 fi
19676
19677 echo "$ac_t""$ol_cv_db_db1" 1>&6
19678
19679         if test $ol_cv_db_db1 = yes ; then
19680                 ol_cv_lib_db=-ldb1
19681         fi
19682 fi
19683
19684 if test $ol_cv_lib_db = no ; then
19685         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19686 echo "configure:19687: checking for Berkeley DB link (-ldb-1)" >&5
19687 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19688   echo $ac_n "(cached) $ac_c" 1>&6
19689 else
19690   
19691         ol_DB_LIB=-ldb-1
19692         ol_LIBS=$LIBS
19693         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19694
19695         cat > conftest.$ac_ext <<EOF
19696 #line 19697 "configure"
19697 #include "confdefs.h"
19698
19699 #ifdef HAVE_DB_185_H
19700 # include <db_185.h>
19701 #else
19702 # include <db.h>
19703 #endif
19704
19705 #ifndef DB_VERSION_MAJOR
19706 # define DB_VERSION_MAJOR 1
19707 #endif
19708
19709 #ifndef NULL
19710 #define NULL ((void*)0)
19711 #endif
19712
19713 int main() {
19714
19715 #if DB_VERSION_MAJOR > 1
19716         {
19717                 char *version;
19718                 int major, minor, patch;
19719
19720                 version = db_version( &major, &minor, &patch );
19721
19722                 if( major != DB_VERSION_MAJOR ||
19723                         minor < DB_VERSION_MINOR )
19724                 {
19725                         printf("Berkeley DB version mismatch\n"
19726                                 "\texpected: %s\n\tgot: %s\n",
19727                                 DB_VERSION_STRING, version);
19728                         return 1;
19729                 }
19730         }
19731 #endif
19732
19733 #if DB_VERSION_MAJOR > 2
19734         db_env_create( NULL, 0 );
19735 #elif DB_VERSION_MAJOR > 1
19736         db_appexit( NULL );
19737 #else
19738         (void) dbopen( NULL, 0, 0, 0, NULL);
19739 #endif
19740
19741 ; return 0; }
19742 EOF
19743 if { (eval echo configure:19744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19744   rm -rf conftest*
19745   ol_cv_db_db_1=yes
19746 else
19747   echo "configure: failed program was:" >&5
19748   cat conftest.$ac_ext >&5
19749   rm -rf conftest*
19750   ol_cv_db_db_1=no
19751 fi
19752 rm -f conftest*
19753
19754         LIBS="$ol_LIBS"
19755
19756 fi
19757
19758 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19759
19760         if test $ol_cv_db_db_1 = yes ; then
19761                 ol_cv_lib_db=-ldb-1
19762         fi
19763 fi
19764
19765
19766         if test "$ol_cv_lib_db" != no ; then
19767                 ol_cv_berkeley_db=yes
19768                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19769 echo "configure:19770: checking for Berkeley DB thread support" >&5
19770 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19771   echo $ac_n "(cached) $ac_c" 1>&6
19772 else
19773   
19774         ol_LIBS="$LIBS"
19775         LIBS="$LTHREAD_LIBS $LIBS"
19776         if test $ol_cv_lib_db != yes ; then
19777                 LIBS="$ol_cv_lib_db $LIBS"
19778         fi
19779
19780         if test "$cross_compiling" = yes; then
19781   ol_cv_berkeley_db_thread=cross
19782 else
19783   cat > conftest.$ac_ext <<EOF
19784 #line 19785 "configure"
19785 #include "confdefs.h"
19786
19787 #ifdef HAVE_DB_185_H
19788         choke me;
19789 #else
19790 #include <db.h>
19791 #endif
19792 #ifndef NULL
19793 #define NULL ((void *)0)
19794 #endif
19795 main()
19796 {
19797         int rc;
19798         u_int32_t flags = DB_CREATE |
19799 #ifdef DB_PRIVATE
19800                 DB_PRIVATE |
19801 #endif
19802                 DB_THREAD;
19803
19804 #if DB_VERSION_MAJOR > 2
19805         DB_ENV *env = NULL;
19806
19807         rc = db_env_create( &env, 0 );
19808
19809         flags |= DB_INIT_MPOOL;
19810 #ifdef DB_MPOOL_PRIVATE
19811         flags |= DB_MPOOL_PRIVATE;
19812 #endif
19813
19814         if( rc ) {
19815                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19816                 return rc;
19817         }
19818
19819 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19820         rc = env->open( env, NULL, flags, 0 );
19821 #else
19822         rc = env->open( env, NULL, NULL, flags, 0 );
19823 #endif
19824
19825         if ( rc == 0 ) {
19826                 rc = env->close( env, 0 );
19827         }
19828
19829         if( rc ) {
19830                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19831                 return rc;
19832         }
19833
19834 #else
19835         DB_ENV env;
19836         memset( &env, '\0', sizeof(env) );
19837
19838         rc = db_appinit( NULL, NULL, &env, flags );
19839
19840         if( rc == 0 ) {
19841                 db_appexit( &env );
19842         }
19843
19844         unlink("__db_mpool.share");
19845         unlink("__db_lock.share");
19846 #endif
19847
19848         return rc;
19849 }
19850 EOF
19851 if { (eval echo configure:19852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19852 then
19853   ol_cv_berkeley_db_thread=yes
19854 else
19855   echo "configure: failed program was:" >&5
19856   cat conftest.$ac_ext >&5
19857   rm -fr conftest*
19858   ol_cv_berkeley_db_thread=no
19859 fi
19860 rm -fr conftest*
19861 fi
19862
19863
19864         LIBS="$ol_LIBS"
19865
19866 fi
19867
19868 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19869
19870         if test $ol_cv_berkeley_db_thread != no ; then
19871                 cat >> confdefs.h <<\EOF
19872 #define HAVE_BERKELEY_DB_THREAD 1
19873 EOF
19874
19875         fi
19876
19877         fi
19878 fi
19879
19880         fi
19881
19882         if test $ol_cv_berkeley_db != no ; then
19883                 cat >> confdefs.h <<\EOF
19884 #define HAVE_BERKELEY_DB 1
19885 EOF
19886
19887
19888                 ol_link_ldbm=berkeley
19889                 ol_with_ldbm_api=berkeley
19890
19891                 if test $ol_with_ldbm_type = hash ; then
19892                         cat >> confdefs.h <<\EOF
19893 #define LDBM_USE_DBHASH 1
19894 EOF
19895
19896                 else
19897                         cat >> confdefs.h <<\EOF
19898 #define LDBM_USE_DBBTREE 1
19899 EOF
19900
19901                 fi
19902
19903                                                 if test $ol_cv_lib_db != yes ; then
19904                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19905                 fi
19906         fi
19907 fi
19908
19909 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
19910         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
19911 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
19912         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19913 echo "configure:19914: checking Berkeley DB version for BDB backend" >&5
19914 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19915   echo $ac_n "(cached) $ac_c" 1>&6
19916 else
19917   
19918         cat > conftest.$ac_ext <<EOF
19919 #line 19920 "configure"
19920 #include "confdefs.h"
19921
19922 #include <db.h>
19923
19924  /* this check could be improved */
19925 #ifndef DB_VERSION_MAJOR
19926 #       define DB_VERSION_MAJOR 1
19927 #endif
19928 #ifndef DB_VERSION_MINOR
19929 #       define DB_VERSION_MINOR 0
19930 #endif
19931
19932 /* require 4.2 or later */
19933 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19934         __db_version_compat
19935 #endif
19936         
19937 EOF
19938 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19939   egrep "__db_version_compat" >/dev/null 2>&1; then
19940   rm -rf conftest*
19941   ol_cv_bdb_compat=yes
19942 else
19943   rm -rf conftest*
19944   ol_cv_bdb_compat=no
19945 fi
19946 rm -f conftest*
19947
19948 fi
19949
19950 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
19951
19952
19953         if test $ol_cv_bdb_compat = yes ; then
19954                 ol_enable_bdb=yes
19955         elif test $ol_enable_bdb = yes ; then
19956                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
19957         else
19958                 ol_enable_bdb=no
19959         fi
19960 fi
19961 if test $ol_enable_hdb = yes -a $ol_link_ldbm != berkeley ; then
19962         { echo "configure: error: HDB: BerkeleyDB not available" 1>&2; exit 1; }
19963 fi
19964
19965 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
19966         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
19967         ol_with_ldbm_api=none
19968 fi
19969
19970 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
19971         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
19972 echo "configure:19973: checking for MDBM library" >&5
19973 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
19974   echo $ac_n "(cached) $ac_c" 1>&6
19975 else
19976         ol_LIBS="$LIBS"
19977         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
19978 echo "configure:19979: checking for mdbm_set_chain" >&5
19979 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
19980   echo $ac_n "(cached) $ac_c" 1>&6
19981 else
19982   cat > conftest.$ac_ext <<EOF
19983 #line 19984 "configure"
19984 #include "confdefs.h"
19985 /* System header to define __stub macros and hopefully few prototypes,
19986     which can conflict with char mdbm_set_chain(); below.  */
19987 #include <assert.h>
19988 /* Override any gcc2 internal prototype to avoid an error.  */
19989 /* We use char because int might match the return type of a gcc2
19990     builtin and then its argument prototype would still apply.  */
19991 char mdbm_set_chain();
19992 char (*f)();
19993
19994 int main() {
19995
19996 /* The GNU C library defines this for functions which it implements
19997     to always fail with ENOSYS.  Some functions are actually named
19998     something starting with __ and the normal name is an alias.  */
19999 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20000 choke me
20001 #else
20002 f = mdbm_set_chain;
20003 #endif
20004
20005 ; return 0; }
20006 EOF
20007 if { (eval echo configure:20008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20008   rm -rf conftest*
20009   eval "ac_cv_func_mdbm_set_chain=yes"
20010 else
20011   echo "configure: failed program was:" >&5
20012   cat conftest.$ac_ext >&5
20013   rm -rf conftest*
20014   eval "ac_cv_func_mdbm_set_chain=no"
20015 fi
20016 rm -f conftest*
20017 fi
20018
20019 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20020   echo "$ac_t""yes" 1>&6
20021   ol_cv_lib_mdbm=yes
20022 else
20023   echo "$ac_t""no" 1>&6
20024
20025                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20026 echo "configure:20027: checking for mdbm_set_chain in -lmdbm" >&5
20027 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20028 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20029   echo $ac_n "(cached) $ac_c" 1>&6
20030 else
20031   ac_save_LIBS="$LIBS"
20032 LIBS="-lmdbm  $LIBS"
20033 cat > conftest.$ac_ext <<EOF
20034 #line 20035 "configure"
20035 #include "confdefs.h"
20036 /* Override any gcc2 internal prototype to avoid an error.  */
20037 /* We use char because int might match the return type of a gcc2
20038     builtin and then its argument prototype would still apply.  */
20039 char mdbm_set_chain();
20040
20041 int main() {
20042 mdbm_set_chain()
20043 ; return 0; }
20044 EOF
20045 if { (eval echo configure:20046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20046   rm -rf conftest*
20047   eval "ac_cv_lib_$ac_lib_var=yes"
20048 else
20049   echo "configure: failed program was:" >&5
20050   cat conftest.$ac_ext >&5
20051   rm -rf conftest*
20052   eval "ac_cv_lib_$ac_lib_var=no"
20053 fi
20054 rm -f conftest*
20055 LIBS="$ac_save_LIBS"
20056
20057 fi
20058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20059   echo "$ac_t""yes" 1>&6
20060   ol_cv_lib_mdbm=-lmdbm
20061 else
20062   echo "$ac_t""no" 1>&6
20063 ol_cv_lib_mdbm=no
20064 fi
20065
20066         
20067 fi
20068
20069         LIBS="$ol_LIBS"
20070
20071 fi
20072
20073 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20074
20075
20076  for ac_hdr in mdbm.h
20077 do
20078 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20079 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20080 echo "configure:20081: checking for $ac_hdr" >&5
20081 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20082   echo $ac_n "(cached) $ac_c" 1>&6
20083 else
20084   cat > conftest.$ac_ext <<EOF
20085 #line 20086 "configure"
20086 #include "confdefs.h"
20087 #include <$ac_hdr>
20088 EOF
20089 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20090 { (eval echo configure:20091: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20091 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20092 if test -z "$ac_err"; then
20093   rm -rf conftest*
20094   eval "ac_cv_header_$ac_safe=yes"
20095 else
20096   echo "$ac_err" >&5
20097   echo "configure: failed program was:" >&5
20098   cat conftest.$ac_ext >&5
20099   rm -rf conftest*
20100   eval "ac_cv_header_$ac_safe=no"
20101 fi
20102 rm -f conftest*
20103 fi
20104 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20105   echo "$ac_t""yes" 1>&6
20106     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20107   cat >> confdefs.h <<EOF
20108 #define $ac_tr_hdr 1
20109 EOF
20110  
20111 else
20112   echo "$ac_t""no" 1>&6
20113 fi
20114 done
20115
20116  echo $ac_n "checking for db""... $ac_c" 1>&6
20117 echo "configure:20118: checking for db" >&5
20118 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20119   echo $ac_n "(cached) $ac_c" 1>&6
20120 else
20121   
20122         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20123                 ol_cv_mdbm=no
20124         else
20125                 ol_cv_mdbm=yes
20126         fi
20127
20128 fi
20129
20130 echo "$ac_t""$ol_cv_mdbm" 1>&6
20131  if test $ol_cv_mdbm = yes ; then
20132         cat >> confdefs.h <<\EOF
20133 #define HAVE_MDBM 1
20134 EOF
20135
20136  fi
20137
20138
20139         if test $ol_cv_mdbm = yes ; then
20140                 ol_link_ldbm=mdbm
20141                 ol_with_ldbm_api=mdbm
20142                 if test $ol_cv_lib_mdbm != yes ; then
20143                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20144                 fi
20145         fi
20146 fi
20147
20148 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20149         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20150 echo "configure:20151: checking for GDBM library" >&5
20151 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20152   echo $ac_n "(cached) $ac_c" 1>&6
20153 else
20154         ol_LIBS="$LIBS"
20155         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20156 echo "configure:20157: checking for gdbm_open" >&5
20157 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20158   echo $ac_n "(cached) $ac_c" 1>&6
20159 else
20160   cat > conftest.$ac_ext <<EOF
20161 #line 20162 "configure"
20162 #include "confdefs.h"
20163 /* System header to define __stub macros and hopefully few prototypes,
20164     which can conflict with char gdbm_open(); below.  */
20165 #include <assert.h>
20166 /* Override any gcc2 internal prototype to avoid an error.  */
20167 /* We use char because int might match the return type of a gcc2
20168     builtin and then its argument prototype would still apply.  */
20169 char gdbm_open();
20170 char (*f)();
20171
20172 int main() {
20173
20174 /* The GNU C library defines this for functions which it implements
20175     to always fail with ENOSYS.  Some functions are actually named
20176     something starting with __ and the normal name is an alias.  */
20177 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20178 choke me
20179 #else
20180 f = gdbm_open;
20181 #endif
20182
20183 ; return 0; }
20184 EOF
20185 if { (eval echo configure:20186: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20186   rm -rf conftest*
20187   eval "ac_cv_func_gdbm_open=yes"
20188 else
20189   echo "configure: failed program was:" >&5
20190   cat conftest.$ac_ext >&5
20191   rm -rf conftest*
20192   eval "ac_cv_func_gdbm_open=no"
20193 fi
20194 rm -f conftest*
20195 fi
20196
20197 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20198   echo "$ac_t""yes" 1>&6
20199   ol_cv_lib_gdbm=yes
20200 else
20201   echo "$ac_t""no" 1>&6
20202
20203                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20204 echo "configure:20205: checking for gdbm_open in -lgdbm" >&5
20205 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20206 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20207   echo $ac_n "(cached) $ac_c" 1>&6
20208 else
20209   ac_save_LIBS="$LIBS"
20210 LIBS="-lgdbm  $LIBS"
20211 cat > conftest.$ac_ext <<EOF
20212 #line 20213 "configure"
20213 #include "confdefs.h"
20214 /* Override any gcc2 internal prototype to avoid an error.  */
20215 /* We use char because int might match the return type of a gcc2
20216     builtin and then its argument prototype would still apply.  */
20217 char gdbm_open();
20218
20219 int main() {
20220 gdbm_open()
20221 ; return 0; }
20222 EOF
20223 if { (eval echo configure:20224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20224   rm -rf conftest*
20225   eval "ac_cv_lib_$ac_lib_var=yes"
20226 else
20227   echo "configure: failed program was:" >&5
20228   cat conftest.$ac_ext >&5
20229   rm -rf conftest*
20230   eval "ac_cv_lib_$ac_lib_var=no"
20231 fi
20232 rm -f conftest*
20233 LIBS="$ac_save_LIBS"
20234
20235 fi
20236 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20237   echo "$ac_t""yes" 1>&6
20238   ol_cv_lib_gdbm=-lgdbm
20239 else
20240   echo "$ac_t""no" 1>&6
20241 ol_cv_lib_gdbm=no
20242 fi
20243
20244         
20245 fi
20246
20247         LIBS="$ol_LIBS"
20248
20249 fi
20250
20251 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20252
20253
20254  for ac_hdr in gdbm.h
20255 do
20256 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20257 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20258 echo "configure:20259: checking for $ac_hdr" >&5
20259 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20260   echo $ac_n "(cached) $ac_c" 1>&6
20261 else
20262   cat > conftest.$ac_ext <<EOF
20263 #line 20264 "configure"
20264 #include "confdefs.h"
20265 #include <$ac_hdr>
20266 EOF
20267 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20268 { (eval echo configure:20269: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20269 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20270 if test -z "$ac_err"; then
20271   rm -rf conftest*
20272   eval "ac_cv_header_$ac_safe=yes"
20273 else
20274   echo "$ac_err" >&5
20275   echo "configure: failed program was:" >&5
20276   cat conftest.$ac_ext >&5
20277   rm -rf conftest*
20278   eval "ac_cv_header_$ac_safe=no"
20279 fi
20280 rm -f conftest*
20281 fi
20282 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20283   echo "$ac_t""yes" 1>&6
20284     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20285   cat >> confdefs.h <<EOF
20286 #define $ac_tr_hdr 1
20287 EOF
20288  
20289 else
20290   echo "$ac_t""no" 1>&6
20291 fi
20292 done
20293
20294  echo $ac_n "checking for db""... $ac_c" 1>&6
20295 echo "configure:20296: checking for db" >&5
20296 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20297   echo $ac_n "(cached) $ac_c" 1>&6
20298 else
20299   
20300         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20301                 ol_cv_gdbm=no
20302         else
20303                 ol_cv_gdbm=yes
20304         fi
20305
20306 fi
20307
20308 echo "$ac_t""$ol_cv_gdbm" 1>&6
20309  if test $ol_cv_gdbm = yes ; then
20310         cat >> confdefs.h <<\EOF
20311 #define HAVE_GDBM 1
20312 EOF
20313
20314  fi
20315
20316
20317         if test $ol_cv_gdbm = yes ; then
20318                 ol_link_ldbm=gdbm
20319                 ol_with_ldbm_api=gdbm
20320
20321                 if test $ol_cv_lib_gdbm != yes ; then
20322                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20323                 fi
20324         fi
20325 fi
20326
20327 if test $ol_with_ldbm_api = ndbm ; then
20328         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20329 echo "configure:20330: checking for NDBM library" >&5
20330 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20331   echo $ac_n "(cached) $ac_c" 1>&6
20332 else
20333         ol_LIBS="$LIBS"
20334         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20335 echo "configure:20336: checking for dbm_open" >&5
20336 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20337   echo $ac_n "(cached) $ac_c" 1>&6
20338 else
20339   cat > conftest.$ac_ext <<EOF
20340 #line 20341 "configure"
20341 #include "confdefs.h"
20342 /* System header to define __stub macros and hopefully few prototypes,
20343     which can conflict with char dbm_open(); below.  */
20344 #include <assert.h>
20345 /* Override any gcc2 internal prototype to avoid an error.  */
20346 /* We use char because int might match the return type of a gcc2
20347     builtin and then its argument prototype would still apply.  */
20348 char dbm_open();
20349 char (*f)();
20350
20351 int main() {
20352
20353 /* The GNU C library defines this for functions which it implements
20354     to always fail with ENOSYS.  Some functions are actually named
20355     something starting with __ and the normal name is an alias.  */
20356 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20357 choke me
20358 #else
20359 f = dbm_open;
20360 #endif
20361
20362 ; return 0; }
20363 EOF
20364 if { (eval echo configure:20365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20365   rm -rf conftest*
20366   eval "ac_cv_func_dbm_open=yes"
20367 else
20368   echo "configure: failed program was:" >&5
20369   cat conftest.$ac_ext >&5
20370   rm -rf conftest*
20371   eval "ac_cv_func_dbm_open=no"
20372 fi
20373 rm -f conftest*
20374 fi
20375
20376 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20377   echo "$ac_t""yes" 1>&6
20378   ol_cv_lib_ndbm=yes
20379 else
20380   echo "$ac_t""no" 1>&6
20381
20382                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20383 echo "configure:20384: checking for dbm_open in -lndbm" >&5
20384 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20385 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20386   echo $ac_n "(cached) $ac_c" 1>&6
20387 else
20388   ac_save_LIBS="$LIBS"
20389 LIBS="-lndbm  $LIBS"
20390 cat > conftest.$ac_ext <<EOF
20391 #line 20392 "configure"
20392 #include "confdefs.h"
20393 /* Override any gcc2 internal prototype to avoid an error.  */
20394 /* We use char because int might match the return type of a gcc2
20395     builtin and then its argument prototype would still apply.  */
20396 char dbm_open();
20397
20398 int main() {
20399 dbm_open()
20400 ; return 0; }
20401 EOF
20402 if { (eval echo configure:20403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20403   rm -rf conftest*
20404   eval "ac_cv_lib_$ac_lib_var=yes"
20405 else
20406   echo "configure: failed program was:" >&5
20407   cat conftest.$ac_ext >&5
20408   rm -rf conftest*
20409   eval "ac_cv_lib_$ac_lib_var=no"
20410 fi
20411 rm -f conftest*
20412 LIBS="$ac_save_LIBS"
20413
20414 fi
20415 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20416   echo "$ac_t""yes" 1>&6
20417   ol_cv_lib_ndbm=-lndbm
20418 else
20419   echo "$ac_t""no" 1>&6
20420
20421                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20422 echo "configure:20423: checking for dbm_open in -ldbm" >&5
20423 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20424 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20425   echo $ac_n "(cached) $ac_c" 1>&6
20426 else
20427   ac_save_LIBS="$LIBS"
20428 LIBS="-ldbm  $LIBS"
20429 cat > conftest.$ac_ext <<EOF
20430 #line 20431 "configure"
20431 #include "confdefs.h"
20432 /* Override any gcc2 internal prototype to avoid an error.  */
20433 /* We use char because int might match the return type of a gcc2
20434     builtin and then its argument prototype would still apply.  */
20435 char dbm_open();
20436
20437 int main() {
20438 dbm_open()
20439 ; return 0; }
20440 EOF
20441 if { (eval echo configure:20442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20442   rm -rf conftest*
20443   eval "ac_cv_lib_$ac_lib_var=yes"
20444 else
20445   echo "configure: failed program was:" >&5
20446   cat conftest.$ac_ext >&5
20447   rm -rf conftest*
20448   eval "ac_cv_lib_$ac_lib_var=no"
20449 fi
20450 rm -f conftest*
20451 LIBS="$ac_save_LIBS"
20452
20453 fi
20454 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20455   echo "$ac_t""yes" 1>&6
20456   ol_cv_lib_ndbm=-ldbm
20457 else
20458   echo "$ac_t""no" 1>&6
20459 ol_cv_lib_ndbm=no
20460 fi
20461                 
20462 fi
20463
20464         
20465 fi
20466
20467         LIBS="$ol_LIBS"
20468
20469 fi
20470
20471 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20472
20473
20474  for ac_hdr in ndbm.h
20475 do
20476 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20477 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20478 echo "configure:20479: checking for $ac_hdr" >&5
20479 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20480   echo $ac_n "(cached) $ac_c" 1>&6
20481 else
20482   cat > conftest.$ac_ext <<EOF
20483 #line 20484 "configure"
20484 #include "confdefs.h"
20485 #include <$ac_hdr>
20486 EOF
20487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20488 { (eval echo configure:20489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20490 if test -z "$ac_err"; then
20491   rm -rf conftest*
20492   eval "ac_cv_header_$ac_safe=yes"
20493 else
20494   echo "$ac_err" >&5
20495   echo "configure: failed program was:" >&5
20496   cat conftest.$ac_ext >&5
20497   rm -rf conftest*
20498   eval "ac_cv_header_$ac_safe=no"
20499 fi
20500 rm -f conftest*
20501 fi
20502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20503   echo "$ac_t""yes" 1>&6
20504     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20505   cat >> confdefs.h <<EOF
20506 #define $ac_tr_hdr 1
20507 EOF
20508  
20509 else
20510   echo "$ac_t""no" 1>&6
20511 fi
20512 done
20513
20514  echo $ac_n "checking for db""... $ac_c" 1>&6
20515 echo "configure:20516: checking for db" >&5
20516 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20517   echo $ac_n "(cached) $ac_c" 1>&6
20518 else
20519   
20520         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20521                 ol_cv_ndbm=no
20522         else
20523                 ol_cv_ndbm=yes
20524         fi
20525
20526 fi
20527
20528 echo "$ac_t""$ol_cv_ndbm" 1>&6
20529  if test $ol_cv_ndbm = yes ; then
20530         cat >> confdefs.h <<\EOF
20531 #define HAVE_NDBM 1
20532 EOF
20533
20534  fi
20535
20536
20537         if test $ol_cv_ndbm = yes ; then
20538                 ol_link_ldbm=ndbm
20539                 ol_with_ldbm_api=ndbm
20540
20541                 if test $ol_cv_lib_ndbm != yes ; then
20542                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20543                 fi
20544         fi
20545 fi
20546
20547 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20548         echo "configure: warning: could not find suitable LDBM backend" 1>&2
20549         if test $ol_enable_ldbm = yes ; then
20550                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
20551         fi
20552
20553         echo "configure: warning: disabling LDBM" 1>&2
20554         ol_enable_ldbm=no
20555 fi
20556
20557
20558 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20559         BUILD_LIBS_DYNAMIC=shared
20560         cat >> confdefs.h <<\EOF
20561 #define LDAP_LIBS_DYNAMIC 1
20562 EOF
20563
20564         LTSTATIC=""
20565 else
20566         BUILD_LIBS_DYNAMIC=static
20567         LTSTATIC="-static"
20568 fi
20569
20570 if test $ol_enable_wrappers != no ; then
20571         for ac_hdr in tcpd.h
20572 do
20573 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20574 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20575 echo "configure:20576: checking for $ac_hdr" >&5
20576 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20577   echo $ac_n "(cached) $ac_c" 1>&6
20578 else
20579   cat > conftest.$ac_ext <<EOF
20580 #line 20581 "configure"
20581 #include "confdefs.h"
20582 #include <$ac_hdr>
20583 EOF
20584 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20585 { (eval echo configure:20586: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20586 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20587 if test -z "$ac_err"; then
20588   rm -rf conftest*
20589   eval "ac_cv_header_$ac_safe=yes"
20590 else
20591   echo "$ac_err" >&5
20592   echo "configure: failed program was:" >&5
20593   cat conftest.$ac_ext >&5
20594   rm -rf conftest*
20595   eval "ac_cv_header_$ac_safe=no"
20596 fi
20597 rm -f conftest*
20598 fi
20599 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20600   echo "$ac_t""yes" 1>&6
20601     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20602   cat >> confdefs.h <<EOF
20603 #define $ac_tr_hdr 1
20604 EOF
20605  
20606                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20607 echo "configure:20608: checking for TCP wrappers library" >&5
20608                 save_LIBS="$LIBS"
20609                 LIBS="$LIBS -lwrap"
20610                 cat > conftest.$ac_ext <<EOF
20611 #line 20612 "configure"
20612 #include "confdefs.h"
20613
20614 #include <tcpd.h>
20615 int allow_severity = 0;
20616 int deny_severity  = 0;
20617
20618 struct request_info *req;
20619                 
20620 int main() {
20621
20622 hosts_access(req)
20623                 
20624 ; return 0; }
20625 EOF
20626 if { (eval echo configure:20627: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20627   rm -rf conftest*
20628   echo "$ac_t""-lwrap" 1>&6
20629                 have_wrappers=yes
20630                 LIBS="$save_LIBS"
20631 else
20632   echo "configure: failed program was:" >&5
20633   cat conftest.$ac_ext >&5
20634   rm -rf conftest*
20635   
20636                                 LIBS="$LIBS -lnsl"
20637                 cat > conftest.$ac_ext <<EOF
20638 #line 20639 "configure"
20639 #include "confdefs.h"
20640
20641 #include <tcpd.h>
20642 int allow_severity = 0;
20643 int deny_severity  = 0;
20644
20645 struct request_info *req;
20646                 
20647 int main() {
20648
20649 hosts_access(req)
20650                 
20651 ; return 0; }
20652 EOF
20653 if { (eval echo configure:20654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20654   rm -rf conftest*
20655   echo "$ac_t""-lwrap -lnsl" 1>&6
20656                 have_wrappers=yes
20657                 LIBS="$save_LIBS -lnsl"
20658 else
20659   echo "configure: failed program was:" >&5
20660   cat conftest.$ac_ext >&5
20661   rm -rf conftest*
20662   
20663                 echo "$ac_t""no" 1>&6
20664                 have_wrappers=no
20665                 LIBS=$save_LIBS
20666 fi
20667 rm -f conftest*
20668 fi
20669 rm -f conftest*
20670 else
20671   echo "$ac_t""no" 1>&6
20672 have_wrappers=no
20673 fi
20674 done
20675
20676
20677         if test $have_wrappers = yes ; then
20678                 cat >> confdefs.h <<\EOF
20679 #define HAVE_TCPD 1
20680 EOF
20681
20682                 WRAP_LIBS="-lwrap"
20683         elif test $ol_enable_wrappers = yes ; then
20684                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20685         else
20686                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20687                 WRAP_LIBS=""
20688         fi
20689 fi
20690
20691 if test $ol_enable_syslog != no ; then
20692         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20693 echo "configure:20694: checking for openlog" >&5
20694 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20695   echo $ac_n "(cached) $ac_c" 1>&6
20696 else
20697   cat > conftest.$ac_ext <<EOF
20698 #line 20699 "configure"
20699 #include "confdefs.h"
20700 /* System header to define __stub macros and hopefully few prototypes,
20701     which can conflict with char openlog(); below.  */
20702 #include <assert.h>
20703 /* Override any gcc2 internal prototype to avoid an error.  */
20704 /* We use char because int might match the return type of a gcc2
20705     builtin and then its argument prototype would still apply.  */
20706 char openlog();
20707 char (*f)();
20708
20709 int main() {
20710
20711 /* The GNU C library defines this for functions which it implements
20712     to always fail with ENOSYS.  Some functions are actually named
20713     something starting with __ and the normal name is an alias.  */
20714 #if defined (__stub_openlog) || defined (__stub___openlog)
20715 choke me
20716 #else
20717 f = openlog;
20718 #endif
20719
20720 ; return 0; }
20721 EOF
20722 if { (eval echo configure:20723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20723   rm -rf conftest*
20724   eval "ac_cv_func_openlog=yes"
20725 else
20726   echo "configure: failed program was:" >&5
20727   cat conftest.$ac_ext >&5
20728   rm -rf conftest*
20729   eval "ac_cv_func_openlog=no"
20730 fi
20731 rm -f conftest*
20732 fi
20733
20734 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20735   echo "$ac_t""yes" 1>&6
20736   :
20737 else
20738   echo "$ac_t""no" 1>&6
20739 fi
20740
20741         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20742                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20743         fi
20744         ol_enable_syslog=$ac_cv_func_openlog
20745 fi
20746
20747
20748 ol_link_sql=no
20749 if test $ol_enable_sql != no ; then
20750         for ac_hdr in sql.h sqlext.h
20751 do
20752 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20753 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20754 echo "configure:20755: checking for $ac_hdr" >&5
20755 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20756   echo $ac_n "(cached) $ac_c" 1>&6
20757 else
20758   cat > conftest.$ac_ext <<EOF
20759 #line 20760 "configure"
20760 #include "confdefs.h"
20761 #include <$ac_hdr>
20762 EOF
20763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20764 { (eval echo configure:20765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20766 if test -z "$ac_err"; then
20767   rm -rf conftest*
20768   eval "ac_cv_header_$ac_safe=yes"
20769 else
20770   echo "$ac_err" >&5
20771   echo "configure: failed program was:" >&5
20772   cat conftest.$ac_ext >&5
20773   rm -rf conftest*
20774   eval "ac_cv_header_$ac_safe=no"
20775 fi
20776 rm -f conftest*
20777 fi
20778 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20779   echo "$ac_t""yes" 1>&6
20780     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20781   cat >> confdefs.h <<EOF
20782 #define $ac_tr_hdr 1
20783 EOF
20784  
20785 else
20786   echo "$ac_t""no" 1>&6
20787 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20788         
20789 fi
20790 done
20791
20792
20793         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20794 echo "configure:20795: checking for SQLDriverConnect in -liodbc" >&5
20795 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20796 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20797   echo $ac_n "(cached) $ac_c" 1>&6
20798 else
20799   ac_save_LIBS="$LIBS"
20800 LIBS="-liodbc  $LIBS"
20801 cat > conftest.$ac_ext <<EOF
20802 #line 20803 "configure"
20803 #include "confdefs.h"
20804 /* Override any gcc2 internal prototype to avoid an error.  */
20805 /* We use char because int might match the return type of a gcc2
20806     builtin and then its argument prototype would still apply.  */
20807 char SQLDriverConnect();
20808
20809 int main() {
20810 SQLDriverConnect()
20811 ; return 0; }
20812 EOF
20813 if { (eval echo configure:20814: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20814   rm -rf conftest*
20815   eval "ac_cv_lib_$ac_lib_var=yes"
20816 else
20817   echo "configure: failed program was:" >&5
20818   cat conftest.$ac_ext >&5
20819   rm -rf conftest*
20820   eval "ac_cv_lib_$ac_lib_var=no"
20821 fi
20822 rm -f conftest*
20823 LIBS="$ac_save_LIBS"
20824
20825 fi
20826 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20827   echo "$ac_t""yes" 1>&6
20828   have_iodbc=yes
20829 else
20830   echo "$ac_t""no" 1>&6
20831 have_iodbc=no
20832 fi
20833
20834         if test $have_iodbc = yes ; then
20835                 ol_link_sql="-liodbc"
20836         else
20837                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20838 echo "configure:20839: checking for SQLDriverConnect in -lodbc" >&5
20839 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20840 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20841   echo $ac_n "(cached) $ac_c" 1>&6
20842 else
20843   ac_save_LIBS="$LIBS"
20844 LIBS="-lodbc  $LIBS"
20845 cat > conftest.$ac_ext <<EOF
20846 #line 20847 "configure"
20847 #include "confdefs.h"
20848 /* Override any gcc2 internal prototype to avoid an error.  */
20849 /* We use char because int might match the return type of a gcc2
20850     builtin and then its argument prototype would still apply.  */
20851 char SQLDriverConnect();
20852
20853 int main() {
20854 SQLDriverConnect()
20855 ; return 0; }
20856 EOF
20857 if { (eval echo configure:20858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20858   rm -rf conftest*
20859   eval "ac_cv_lib_$ac_lib_var=yes"
20860 else
20861   echo "configure: failed program was:" >&5
20862   cat conftest.$ac_ext >&5
20863   rm -rf conftest*
20864   eval "ac_cv_lib_$ac_lib_var=no"
20865 fi
20866 rm -f conftest*
20867 LIBS="$ac_save_LIBS"
20868
20869 fi
20870 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20871   echo "$ac_t""yes" 1>&6
20872   have_odbc=yes
20873 else
20874   echo "$ac_t""no" 1>&6
20875 have_odbc=no
20876 fi
20877
20878                 if test $have_odbc = yes ; then
20879                         ol_link_sql="-lodbc"
20880                 fi
20881         fi
20882
20883         if test $ol_link_sql != no ; then
20884                 SLAPD_SQL_LIBS="$ol_link_sql"
20885
20886         elif test $ol_enable_sql != auto ; then
20887                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20888         fi
20889 fi
20890
20891 if test $ol_enable_tcl != no ; then
20892         for ac_hdr in tcl.h
20893 do
20894 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20895 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20896 echo "configure:20897: checking for $ac_hdr" >&5
20897 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20898   echo $ac_n "(cached) $ac_c" 1>&6
20899 else
20900   cat > conftest.$ac_ext <<EOF
20901 #line 20902 "configure"
20902 #include "confdefs.h"
20903 #include <$ac_hdr>
20904 EOF
20905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20906 { (eval echo configure:20907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20908 if test -z "$ac_err"; then
20909   rm -rf conftest*
20910   eval "ac_cv_header_$ac_safe=yes"
20911 else
20912   echo "$ac_err" >&5
20913   echo "configure: failed program was:" >&5
20914   cat conftest.$ac_ext >&5
20915   rm -rf conftest*
20916   eval "ac_cv_header_$ac_safe=no"
20917 fi
20918 rm -f conftest*
20919 fi
20920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20921   echo "$ac_t""yes" 1>&6
20922     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20923   cat >> confdefs.h <<EOF
20924 #define $ac_tr_hdr 1
20925 EOF
20926  
20927 else
20928   echo "$ac_t""no" 1>&6
20929 fi
20930 done
20931
20932
20933         if test $ac_cv_header_tcl_h != yes ; then
20934                 have_tcl=no
20935         else
20936                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
20937                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
20938 echo "configure:20939: checking for main in -l$lib" >&5
20939 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
20940 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20941   echo $ac_n "(cached) $ac_c" 1>&6
20942 else
20943   ac_save_LIBS="$LIBS"
20944 LIBS="-l$lib  $LIBS"
20945 cat > conftest.$ac_ext <<EOF
20946 #line 20947 "configure"
20947 #include "confdefs.h"
20948
20949 int main() {
20950 main()
20951 ; return 0; }
20952 EOF
20953 if { (eval echo configure:20954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20954   rm -rf conftest*
20955   eval "ac_cv_lib_$ac_lib_var=yes"
20956 else
20957   echo "configure: failed program was:" >&5
20958   cat conftest.$ac_ext >&5
20959   rm -rf conftest*
20960   eval "ac_cv_lib_$ac_lib_var=no"
20961 fi
20962 rm -f conftest*
20963 LIBS="$ac_save_LIBS"
20964
20965 fi
20966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20967   echo "$ac_t""yes" 1>&6
20968   have_tcl=yes
20969                            if test x"$ol_with_tcl_module" = "xstatic" ; then
20970                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
20971                            else
20972                                         MOD_TCL_LIB="-l${lib}"
20973                            fi;break
20974 else
20975   echo "$ac_t""no" 1>&6
20976 have_tcl=no
20977 fi
20978
20979                 done
20980         fi
20981
20982         if test $have_tcl != yes ; then
20983                 echo "configure: warning: could not find -ltcl" 1>&2
20984                 if test $ol_enable_tcl = yes ; then
20985                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
20986                 fi
20987
20988                 ol_enable_tcl=no
20989         fi
20990 fi
20991
20992 ol_link_termcap=no
20993 for ac_hdr in termcap.h ncurses.h
20994 do
20995 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20996 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20997 echo "configure:20998: checking for $ac_hdr" >&5
20998 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20999   echo $ac_n "(cached) $ac_c" 1>&6
21000 else
21001   cat > conftest.$ac_ext <<EOF
21002 #line 21003 "configure"
21003 #include "confdefs.h"
21004 #include <$ac_hdr>
21005 EOF
21006 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21007 { (eval echo configure:21008: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21008 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21009 if test -z "$ac_err"; then
21010   rm -rf conftest*
21011   eval "ac_cv_header_$ac_safe=yes"
21012 else
21013   echo "$ac_err" >&5
21014   echo "configure: failed program was:" >&5
21015   cat conftest.$ac_ext >&5
21016   rm -rf conftest*
21017   eval "ac_cv_header_$ac_safe=no"
21018 fi
21019 rm -f conftest*
21020 fi
21021 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21022   echo "$ac_t""yes" 1>&6
21023     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21024   cat >> confdefs.h <<EOF
21025 #define $ac_tr_hdr 1
21026 EOF
21027  
21028 else
21029   echo "$ac_t""no" 1>&6
21030 fi
21031 done
21032
21033
21034 if test $ol_link_termcap = no ; then
21035         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
21036 echo "configure:21037: checking for tputs in -ltermcap" >&5
21037 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
21038 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21039   echo $ac_n "(cached) $ac_c" 1>&6
21040 else
21041   ac_save_LIBS="$LIBS"
21042 LIBS="-ltermcap  $LIBS"
21043 cat > conftest.$ac_ext <<EOF
21044 #line 21045 "configure"
21045 #include "confdefs.h"
21046 /* Override any gcc2 internal prototype to avoid an error.  */
21047 /* We use char because int might match the return type of a gcc2
21048     builtin and then its argument prototype would still apply.  */
21049 char tputs();
21050
21051 int main() {
21052 tputs()
21053 ; return 0; }
21054 EOF
21055 if { (eval echo configure:21056: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21056   rm -rf conftest*
21057   eval "ac_cv_lib_$ac_lib_var=yes"
21058 else
21059   echo "configure: failed program was:" >&5
21060   cat conftest.$ac_ext >&5
21061   rm -rf conftest*
21062   eval "ac_cv_lib_$ac_lib_var=no"
21063 fi
21064 rm -f conftest*
21065 LIBS="$ac_save_LIBS"
21066
21067 fi
21068 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21069   echo "$ac_t""yes" 1>&6
21070   have_termcap=yes
21071 else
21072   echo "$ac_t""no" 1>&6
21073 have_termcap=no
21074 fi
21075
21076         if test $have_termcap = yes ; then
21077                 cat >> confdefs.h <<\EOF
21078 #define HAVE_TERMCAP 1
21079 EOF
21080
21081                 ol_link_termcap=yes
21082                 TERMCAP_LIBS=-ltermcap
21083         fi
21084 fi
21085
21086 if test $ol_link_termcap = no ; then
21087         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
21088 echo "configure:21089: checking for initscr in -lncurses" >&5
21089 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
21090 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21091   echo $ac_n "(cached) $ac_c" 1>&6
21092 else
21093   ac_save_LIBS="$LIBS"
21094 LIBS="-lncurses  $LIBS"
21095 cat > conftest.$ac_ext <<EOF
21096 #line 21097 "configure"
21097 #include "confdefs.h"
21098 /* Override any gcc2 internal prototype to avoid an error.  */
21099 /* We use char because int might match the return type of a gcc2
21100     builtin and then its argument prototype would still apply.  */
21101 char initscr();
21102
21103 int main() {
21104 initscr()
21105 ; return 0; }
21106 EOF
21107 if { (eval echo configure:21108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21108   rm -rf conftest*
21109   eval "ac_cv_lib_$ac_lib_var=yes"
21110 else
21111   echo "configure: failed program was:" >&5
21112   cat conftest.$ac_ext >&5
21113   rm -rf conftest*
21114   eval "ac_cv_lib_$ac_lib_var=no"
21115 fi
21116 rm -f conftest*
21117 LIBS="$ac_save_LIBS"
21118
21119 fi
21120 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21121   echo "$ac_t""yes" 1>&6
21122   have_ncurses=yes
21123 else
21124   echo "$ac_t""no" 1>&6
21125 have_ncurses=no
21126 fi
21127
21128         if test $have_ncurses = yes ; then
21129                 cat >> confdefs.h <<\EOF
21130 #define HAVE_NCURSES 1
21131 EOF
21132
21133                 ol_link_termcap=yes
21134                 TERMCAP_LIBS=-lncurses
21135         fi
21136 fi
21137
21138 if test $ol_link_termcap = no ; then
21139         cat >> confdefs.h <<\EOF
21140 #define NO_TERMCAP 1
21141 EOF
21142
21143         TERMCAP_LIBS=
21144 fi
21145
21146 ol_link_sasl=no
21147 ol_link_spasswd=no
21148 if test $ol_with_cyrus_sasl != no ; then
21149         for ac_hdr in sasl/sasl.h sasl.h
21150 do
21151 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21152 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21153 echo "configure:21154: checking for $ac_hdr" >&5
21154 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21155   echo $ac_n "(cached) $ac_c" 1>&6
21156 else
21157   cat > conftest.$ac_ext <<EOF
21158 #line 21159 "configure"
21159 #include "confdefs.h"
21160 #include <$ac_hdr>
21161 EOF
21162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21163 { (eval echo configure:21164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21165 if test -z "$ac_err"; then
21166   rm -rf conftest*
21167   eval "ac_cv_header_$ac_safe=yes"
21168 else
21169   echo "$ac_err" >&5
21170   echo "configure: failed program was:" >&5
21171   cat conftest.$ac_ext >&5
21172   rm -rf conftest*
21173   eval "ac_cv_header_$ac_safe=no"
21174 fi
21175 rm -f conftest*
21176 fi
21177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21178   echo "$ac_t""yes" 1>&6
21179     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21180   cat >> confdefs.h <<EOF
21181 #define $ac_tr_hdr 1
21182 EOF
21183  
21184 else
21185   echo "$ac_t""no" 1>&6
21186 fi
21187 done
21188
21189
21190         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
21191                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
21192 echo "configure:21193: checking for sasl_client_init in -lsasl2" >&5
21193 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21194 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21195   echo $ac_n "(cached) $ac_c" 1>&6
21196 else
21197   ac_save_LIBS="$LIBS"
21198 LIBS="-lsasl2  $LIBS"
21199 cat > conftest.$ac_ext <<EOF
21200 #line 21201 "configure"
21201 #include "confdefs.h"
21202 /* Override any gcc2 internal prototype to avoid an error.  */
21203 /* We use char because int might match the return type of a gcc2
21204     builtin and then its argument prototype would still apply.  */
21205 char sasl_client_init();
21206
21207 int main() {
21208 sasl_client_init()
21209 ; return 0; }
21210 EOF
21211 if { (eval echo configure:21212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21212   rm -rf conftest*
21213   eval "ac_cv_lib_$ac_lib_var=yes"
21214 else
21215   echo "configure: failed program was:" >&5
21216   cat conftest.$ac_ext >&5
21217   rm -rf conftest*
21218   eval "ac_cv_lib_$ac_lib_var=no"
21219 fi
21220 rm -f conftest*
21221 LIBS="$ac_save_LIBS"
21222
21223 fi
21224 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21225   echo "$ac_t""yes" 1>&6
21226   ol_link_sasl="-lsasl2"
21227 else
21228   echo "$ac_t""no" 1>&6
21229 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21230 echo "configure:21231: checking for sasl_client_init in -lsasl" >&5
21231 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21232 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21233   echo $ac_n "(cached) $ac_c" 1>&6
21234 else
21235   ac_save_LIBS="$LIBS"
21236 LIBS="-lsasl  $LIBS"
21237 cat > conftest.$ac_ext <<EOF
21238 #line 21239 "configure"
21239 #include "confdefs.h"
21240 /* Override any gcc2 internal prototype to avoid an error.  */
21241 /* We use char because int might match the return type of a gcc2
21242     builtin and then its argument prototype would still apply.  */
21243 char sasl_client_init();
21244
21245 int main() {
21246 sasl_client_init()
21247 ; return 0; }
21248 EOF
21249 if { (eval echo configure:21250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21250   rm -rf conftest*
21251   eval "ac_cv_lib_$ac_lib_var=yes"
21252 else
21253   echo "configure: failed program was:" >&5
21254   cat conftest.$ac_ext >&5
21255   rm -rf conftest*
21256   eval "ac_cv_lib_$ac_lib_var=no"
21257 fi
21258 rm -f conftest*
21259 LIBS="$ac_save_LIBS"
21260
21261 fi
21262 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21263   echo "$ac_t""yes" 1>&6
21264   ol_link_sasl="-lsasl"
21265 else
21266   echo "$ac_t""no" 1>&6
21267 fi
21268
21269 fi
21270
21271         fi
21272
21273         if test $ol_link_sasl = no ; then
21274                 if test $ol_with_cyrus_sasl != auto ; then
21275                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21276                 else
21277                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21278                         echo "configure: warning: SASL authentication not supported!" 1>&2
21279                         if test $ol_link_tls = no ; then
21280                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21281                         fi
21282                 fi
21283         else
21284                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21285 echo "configure:21286: checking Cyrus SASL library version" >&5
21286 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21287   echo $ac_n "(cached) $ac_c" 1>&6
21288 else
21289   
21290         cat > conftest.$ac_ext <<EOF
21291 #line 21292 "configure"
21292 #include "confdefs.h"
21293
21294 #ifdef HAVE_SASL_SASL_H
21295 #include <sasl/sasl.h>
21296 #else
21297 #include <sasl.h>
21298 #endif
21299
21300 /* require 2.1.3 or later */
21301 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21302         char *__sasl_compat = "2.2+ or better okay (we guess)";
21303 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21304         && SASL_VERSION_STEP >=3
21305         char *__sasl_compat = "2.1.3+ or better okay";
21306 #endif
21307         
21308 EOF
21309 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21310   egrep "__sasl_compat" >/dev/null 2>&1; then
21311   rm -rf conftest*
21312   ol_cv_sasl_compat=yes
21313 else
21314   rm -rf conftest*
21315   ol_cv_sasl_compat=no
21316 fi
21317 rm -f conftest*
21318
21319 fi
21320
21321 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21322
21323                 if test $ol_cv_sasl_compat = no ; then
21324                         ol_link_sasl=no
21325                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
21326                 fi
21327
21328                 cat >> confdefs.h <<\EOF
21329 #define HAVE_CYRUS_SASL 1
21330 EOF
21331
21332                 SASL_LIBS="$ol_link_sasl"
21333                 if test $ol_enable_spasswd != no ; then
21334                         ol_link_spasswd=yes
21335                 fi
21336
21337                 ac_save_LIBS="$LIBS"
21338                 LIBS="$LIBS $ol_link_sasl"
21339                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21340 echo "configure:21341: checking for sasl_version" >&5
21341 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21342   echo $ac_n "(cached) $ac_c" 1>&6
21343 else
21344   cat > conftest.$ac_ext <<EOF
21345 #line 21346 "configure"
21346 #include "confdefs.h"
21347 /* System header to define __stub macros and hopefully few prototypes,
21348     which can conflict with char sasl_version(); below.  */
21349 #include <assert.h>
21350 /* Override any gcc2 internal prototype to avoid an error.  */
21351 /* We use char because int might match the return type of a gcc2
21352     builtin and then its argument prototype would still apply.  */
21353 char sasl_version();
21354 char (*f)();
21355
21356 int main() {
21357
21358 /* The GNU C library defines this for functions which it implements
21359     to always fail with ENOSYS.  Some functions are actually named
21360     something starting with __ and the normal name is an alias.  */
21361 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21362 choke me
21363 #else
21364 f = sasl_version;
21365 #endif
21366
21367 ; return 0; }
21368 EOF
21369 if { (eval echo configure:21370: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21370   rm -rf conftest*
21371   eval "ac_cv_func_sasl_version=yes"
21372 else
21373   echo "configure: failed program was:" >&5
21374   cat conftest.$ac_ext >&5
21375   rm -rf conftest*
21376   eval "ac_cv_func_sasl_version=no"
21377 fi
21378 rm -f conftest*
21379 fi
21380
21381 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21382   echo "$ac_t""yes" 1>&6
21383   cat >> confdefs.h <<\EOF
21384 #define HAVE_SASL_VERSION 1
21385 EOF
21386
21387 else
21388   echo "$ac_t""no" 1>&6
21389 fi
21390
21391                 LIBS="$ac_save_LIBS"
21392         fi
21393
21394 else
21395         echo "configure: warning: SASL authentication not supported!" 1>&2
21396         if test $ol_link_tls = no ; then
21397                 echo "configure: warning: Strong authentication not supported!" 1>&2
21398         fi
21399 fi
21400
21401 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21402         dev=no
21403         if test -r /dev/urandom ; then
21404                 dev="/dev/urandom";
21405         elif test -r /idev/urandom ; then
21406                 dev="/idev/urandom";
21407         elif test -r /dev/srandom ; then
21408                 dev="/dev/srandom";
21409         elif test -r /dev/random ; then
21410                 dev="/dev/random";
21411         elif test -r /idev/random ; then
21412                 dev="/idev/random";
21413         fi
21414
21415         if test $dev != no ; then
21416                 cat >> confdefs.h <<EOF
21417 #define URANDOM_DEVICE "$dev"
21418 EOF
21419
21420         fi
21421 fi
21422
21423 ol_link_fetch=no
21424 if test $ol_with_fetch != no ; then
21425         ol_LIBS=$LIBS
21426 LIBS="-lfetch -lcom_err $LIBS"
21427 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21428 echo "configure:21429: checking fetch(3) library" >&5
21429 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21430   echo $ac_n "(cached) $ac_c" 1>&6
21431 else
21432   
21433         cat > conftest.$ac_ext <<EOF
21434 #line 21435 "configure"
21435 #include "confdefs.h"
21436
21437 #include <sys/param.h>
21438 #include <stdio.h>
21439 #include <fetch.h>
21440 int main() {
21441 struct url *u = fetchParseURL("file:///"); 
21442 ; return 0; }
21443 EOF
21444 if { (eval echo configure:21445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21445   rm -rf conftest*
21446   ol_cv_lib_fetch=yes
21447 else
21448   echo "configure: failed program was:" >&5
21449   cat conftest.$ac_ext >&5
21450   rm -rf conftest*
21451   ol_cv_lib_fetch=no
21452 fi
21453 rm -f conftest*
21454 fi
21455
21456 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21457 LIBS=$ol_LIBS
21458 if test $ol_cv_lib_fetch != no ; then
21459         ol_link_fetch="-lfetch -lcom_err"
21460         cat >> confdefs.h <<\EOF
21461 #define HAVE_FETCH 1
21462 EOF
21463
21464 fi
21465
21466
21467         if test $ol_cv_lib_fetch != no ; then
21468                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21469                 ol_link_fetch=freebsd
21470
21471         elif test $ol_with_fetch != auto ; then
21472                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21473         fi 
21474 fi
21475
21476 if test $ol_enable_crypt != no ; then
21477         save_LIBS="$LIBS"
21478         LIBS="$TLS_LIBS $LIBS"
21479
21480         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21481 echo "configure:21482: checking for crypt" >&5
21482 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21483   echo $ac_n "(cached) $ac_c" 1>&6
21484 else
21485   cat > conftest.$ac_ext <<EOF
21486 #line 21487 "configure"
21487 #include "confdefs.h"
21488 /* System header to define __stub macros and hopefully few prototypes,
21489     which can conflict with char crypt(); below.  */
21490 #include <assert.h>
21491 /* Override any gcc2 internal prototype to avoid an error.  */
21492 /* We use char because int might match the return type of a gcc2
21493     builtin and then its argument prototype would still apply.  */
21494 char crypt();
21495 char (*f)();
21496
21497 int main() {
21498
21499 /* The GNU C library defines this for functions which it implements
21500     to always fail with ENOSYS.  Some functions are actually named
21501     something starting with __ and the normal name is an alias.  */
21502 #if defined (__stub_crypt) || defined (__stub___crypt)
21503 choke me
21504 #else
21505 f = crypt;
21506 #endif
21507
21508 ; return 0; }
21509 EOF
21510 if { (eval echo configure:21511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21511   rm -rf conftest*
21512   eval "ac_cv_func_crypt=yes"
21513 else
21514   echo "configure: failed program was:" >&5
21515   cat conftest.$ac_ext >&5
21516   rm -rf conftest*
21517   eval "ac_cv_func_crypt=no"
21518 fi
21519 rm -f conftest*
21520 fi
21521
21522 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21523   echo "$ac_t""yes" 1>&6
21524   have_crypt=yes
21525 else
21526   echo "$ac_t""no" 1>&6
21527
21528                 LIBS="$save_LIBS"
21529                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21530 echo "configure:21531: checking for crypt in -lcrypt" >&5
21531 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21532 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21533   echo $ac_n "(cached) $ac_c" 1>&6
21534 else
21535   ac_save_LIBS="$LIBS"
21536 LIBS="-lcrypt  $LIBS"
21537 cat > conftest.$ac_ext <<EOF
21538 #line 21539 "configure"
21539 #include "confdefs.h"
21540 /* Override any gcc2 internal prototype to avoid an error.  */
21541 /* We use char because int might match the return type of a gcc2
21542     builtin and then its argument prototype would still apply.  */
21543 char crypt();
21544
21545 int main() {
21546 crypt()
21547 ; return 0; }
21548 EOF
21549 if { (eval echo configure:21550: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21550   rm -rf conftest*
21551   eval "ac_cv_lib_$ac_lib_var=yes"
21552 else
21553   echo "configure: failed program was:" >&5
21554   cat conftest.$ac_ext >&5
21555   rm -rf conftest*
21556   eval "ac_cv_lib_$ac_lib_var=no"
21557 fi
21558 rm -f conftest*
21559 LIBS="$ac_save_LIBS"
21560
21561 fi
21562 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21563   echo "$ac_t""yes" 1>&6
21564   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21565                         have_crypt=yes
21566 else
21567   echo "$ac_t""no" 1>&6
21568 have_crypt=no
21569 fi
21570
21571 fi
21572
21573
21574         LIBS="$save_LIBS"
21575
21576         if test $have_crypt = yes ; then
21577                 cat >> confdefs.h <<\EOF
21578 #define HAVE_CRYPT 1
21579 EOF
21580
21581         else
21582                 echo "configure: warning: could not find crypt" 1>&2
21583                 if test $ol_enable_crypt = yes ; then
21584                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
21585                 fi
21586
21587                 echo "configure: warning: disabling crypt support" 1>&2
21588                 ol_enable_crypt=no
21589         fi
21590 fi
21591
21592 if test $ol_enable_proctitle != no ; then
21593         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21594 echo "configure:21595: checking for setproctitle" >&5
21595 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21596   echo $ac_n "(cached) $ac_c" 1>&6
21597 else
21598   cat > conftest.$ac_ext <<EOF
21599 #line 21600 "configure"
21600 #include "confdefs.h"
21601 /* System header to define __stub macros and hopefully few prototypes,
21602     which can conflict with char setproctitle(); below.  */
21603 #include <assert.h>
21604 /* Override any gcc2 internal prototype to avoid an error.  */
21605 /* We use char because int might match the return type of a gcc2
21606     builtin and then its argument prototype would still apply.  */
21607 char setproctitle();
21608 char (*f)();
21609
21610 int main() {
21611
21612 /* The GNU C library defines this for functions which it implements
21613     to always fail with ENOSYS.  Some functions are actually named
21614     something starting with __ and the normal name is an alias.  */
21615 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21616 choke me
21617 #else
21618 f = setproctitle;
21619 #endif
21620
21621 ; return 0; }
21622 EOF
21623 if { (eval echo configure:21624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21624   rm -rf conftest*
21625   eval "ac_cv_func_setproctitle=yes"
21626 else
21627   echo "configure: failed program was:" >&5
21628   cat conftest.$ac_ext >&5
21629   rm -rf conftest*
21630   eval "ac_cv_func_setproctitle=no"
21631 fi
21632 rm -f conftest*
21633 fi
21634
21635 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21636   echo "$ac_t""yes" 1>&6
21637   have_setproctitle=yes
21638 else
21639   echo "$ac_t""no" 1>&6
21640
21641                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21642 echo "configure:21643: checking for setproctitle in -lutil" >&5
21643 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21644 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21645   echo $ac_n "(cached) $ac_c" 1>&6
21646 else
21647   ac_save_LIBS="$LIBS"
21648 LIBS="-lutil  $LIBS"
21649 cat > conftest.$ac_ext <<EOF
21650 #line 21651 "configure"
21651 #include "confdefs.h"
21652 /* Override any gcc2 internal prototype to avoid an error.  */
21653 /* We use char because int might match the return type of a gcc2
21654     builtin and then its argument prototype would still apply.  */
21655 char setproctitle();
21656
21657 int main() {
21658 setproctitle()
21659 ; return 0; }
21660 EOF
21661 if { (eval echo configure:21662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21662   rm -rf conftest*
21663   eval "ac_cv_lib_$ac_lib_var=yes"
21664 else
21665   echo "configure: failed program was:" >&5
21666   cat conftest.$ac_ext >&5
21667   rm -rf conftest*
21668   eval "ac_cv_lib_$ac_lib_var=no"
21669 fi
21670 rm -f conftest*
21671 LIBS="$ac_save_LIBS"
21672
21673 fi
21674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21675   echo "$ac_t""yes" 1>&6
21676   have_setproctitle=yes
21677                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21678 else
21679   echo "$ac_t""no" 1>&6
21680 have_setproctitle=no
21681                         LIBOBJS="$LIBOBJS setproctitle.o"
21682                         LIBSRCS="$LIBSRCS setproctitle.c"
21683 fi
21684
21685 fi
21686
21687
21688         if test $have_setproctitle = yes ; then
21689                 cat >> confdefs.h <<\EOF
21690 #define HAVE_SETPROCTITLE 1
21691 EOF
21692
21693         fi
21694 fi
21695
21696 if test $ol_enable_slp != no ; then
21697         for ac_hdr in slp.h 
21698 do
21699 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21700 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21701 echo "configure:21702: checking for $ac_hdr" >&5
21702 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21703   echo $ac_n "(cached) $ac_c" 1>&6
21704 else
21705   cat > conftest.$ac_ext <<EOF
21706 #line 21707 "configure"
21707 #include "confdefs.h"
21708 #include <$ac_hdr>
21709 EOF
21710 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21711 { (eval echo configure:21712: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21712 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21713 if test -z "$ac_err"; then
21714   rm -rf conftest*
21715   eval "ac_cv_header_$ac_safe=yes"
21716 else
21717   echo "$ac_err" >&5
21718   echo "configure: failed program was:" >&5
21719   cat conftest.$ac_ext >&5
21720   rm -rf conftest*
21721   eval "ac_cv_header_$ac_safe=no"
21722 fi
21723 rm -f conftest*
21724 fi
21725 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21726   echo "$ac_t""yes" 1>&6
21727     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21728   cat >> confdefs.h <<EOF
21729 #define $ac_tr_hdr 1
21730 EOF
21731  
21732 else
21733   echo "$ac_t""no" 1>&6
21734 fi
21735 done
21736
21737
21738         if test $ac_cv_header_slp_h = yes ; then
21739                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21740 echo "configure:21741: checking for SLPOpen in -lslp" >&5
21741 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21742 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21743   echo $ac_n "(cached) $ac_c" 1>&6
21744 else
21745   ac_save_LIBS="$LIBS"
21746 LIBS="-lslp  $LIBS"
21747 cat > conftest.$ac_ext <<EOF
21748 #line 21749 "configure"
21749 #include "confdefs.h"
21750 /* Override any gcc2 internal prototype to avoid an error.  */
21751 /* We use char because int might match the return type of a gcc2
21752     builtin and then its argument prototype would still apply.  */
21753 char SLPOpen();
21754
21755 int main() {
21756 SLPOpen()
21757 ; return 0; }
21758 EOF
21759 if { (eval echo configure:21760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21760   rm -rf conftest*
21761   eval "ac_cv_lib_$ac_lib_var=yes"
21762 else
21763   echo "configure: failed program was:" >&5
21764   cat conftest.$ac_ext >&5
21765   rm -rf conftest*
21766   eval "ac_cv_lib_$ac_lib_var=no"
21767 fi
21768 rm -f conftest*
21769 LIBS="$ac_save_LIBS"
21770
21771 fi
21772 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21773   echo "$ac_t""yes" 1>&6
21774   have_slp=yes
21775 else
21776   echo "$ac_t""no" 1>&6
21777 have_slp=no
21778 fi
21779
21780                 if test $have_slp = yes ; then
21781                         cat >> confdefs.h <<\EOF
21782 #define HAVE_SLP 1
21783 EOF
21784
21785                         SLAPD_SLP_LIBS=-lslp
21786                 fi
21787
21788         elif test $ol_enable_slp = yes ; then
21789                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21790         fi
21791 fi
21792
21793
21794 echo $ac_n "checking long long""... $ac_c" 1>&6
21795 echo "configure:21796: checking long long" >&5
21796 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21797   echo $ac_n "(cached) $ac_c" 1>&6
21798 else
21799   
21800         cat > conftest.$ac_ext <<EOF
21801 #line 21802 "configure"
21802 #include "confdefs.h"
21803
21804 int main() {
21805 long long x;
21806 ; return 0; }
21807 EOF
21808 if { (eval echo configure:21809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21809   rm -rf conftest*
21810   ol_cv_type_long_long=yes
21811 else
21812   echo "configure: failed program was:" >&5
21813   cat conftest.$ac_ext >&5
21814   rm -rf conftest*
21815   ol_cv_type_long_long=no
21816 fi
21817 rm -f conftest*
21818 fi
21819
21820 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21821 if test $ol_cv_type_long_long = yes; then
21822         cat >> confdefs.h <<\EOF
21823 #define HAVE_LONG_LONG 1
21824 EOF
21825
21826 fi
21827
21828 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21829 echo "configure:21830: checking for ANSI C header files" >&5
21830 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21831   echo $ac_n "(cached) $ac_c" 1>&6
21832 else
21833   cat > conftest.$ac_ext <<EOF
21834 #line 21835 "configure"
21835 #include "confdefs.h"
21836 #include <stdlib.h>
21837 #include <stdarg.h>
21838 #include <string.h>
21839 #include <float.h>
21840 EOF
21841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21842 { (eval echo configure:21843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21844 if test -z "$ac_err"; then
21845   rm -rf conftest*
21846   ac_cv_header_stdc=yes
21847 else
21848   echo "$ac_err" >&5
21849   echo "configure: failed program was:" >&5
21850   cat conftest.$ac_ext >&5
21851   rm -rf conftest*
21852   ac_cv_header_stdc=no
21853 fi
21854 rm -f conftest*
21855
21856 if test $ac_cv_header_stdc = yes; then
21857   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21858 cat > conftest.$ac_ext <<EOF
21859 #line 21860 "configure"
21860 #include "confdefs.h"
21861 #include <string.h>
21862 EOF
21863 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21864   egrep "memchr" >/dev/null 2>&1; then
21865   :
21866 else
21867   rm -rf conftest*
21868   ac_cv_header_stdc=no
21869 fi
21870 rm -f conftest*
21871
21872 fi
21873
21874 if test $ac_cv_header_stdc = yes; then
21875   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21876 cat > conftest.$ac_ext <<EOF
21877 #line 21878 "configure"
21878 #include "confdefs.h"
21879 #include <stdlib.h>
21880 EOF
21881 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21882   egrep "free" >/dev/null 2>&1; then
21883   :
21884 else
21885   rm -rf conftest*
21886   ac_cv_header_stdc=no
21887 fi
21888 rm -f conftest*
21889
21890 fi
21891
21892 if test $ac_cv_header_stdc = yes; then
21893   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21894 if test "$cross_compiling" = yes; then
21895   :
21896 else
21897   cat > conftest.$ac_ext <<EOF
21898 #line 21899 "configure"
21899 #include "confdefs.h"
21900 #include <ctype.h>
21901 #if ((' ' & 0x0FF) == 0x020)
21902 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21903 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21904 #else
21905 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21906  || ('j' <= (c) && (c) <= 'r') \
21907  || ('s' <= (c) && (c) <= 'z'))
21908 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21909 #endif
21910 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21911 int main () { int i; for (i = 0; i < 256; i++)
21912 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21913 exit (0); }
21914
21915 EOF
21916 if { (eval echo configure:21917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21917 then
21918   :
21919 else
21920   echo "configure: failed program was:" >&5
21921   cat conftest.$ac_ext >&5
21922   rm -fr conftest*
21923   ac_cv_header_stdc=no
21924 fi
21925 rm -fr conftest*
21926 fi
21927
21928 fi
21929 fi
21930
21931 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21932 if test $ac_cv_header_stdc = yes; then
21933   cat >> confdefs.h <<\EOF
21934 #define STDC_HEADERS 1
21935 EOF
21936
21937 fi
21938
21939 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21940 echo "configure:21941: checking for mode_t" >&5
21941 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21942   echo $ac_n "(cached) $ac_c" 1>&6
21943 else
21944   cat > conftest.$ac_ext <<EOF
21945 #line 21946 "configure"
21946 #include "confdefs.h"
21947 #include <sys/types.h>
21948 #if STDC_HEADERS
21949 #include <stdlib.h>
21950 #include <stddef.h>
21951 #endif
21952
21953 EOF
21954 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21955   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21956   rm -rf conftest*
21957   eval "ac_cv_type_mode_t=yes"
21958 else
21959   rm -rf conftest*
21960   eval "ac_cv_type_mode_t=no"
21961 fi
21962 rm -f conftest*
21963
21964 fi
21965 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21966   echo "$ac_t""yes" 1>&6
21967 else
21968   echo "$ac_t""no" 1>&6
21969   cat >> confdefs.h <<EOF
21970 #define mode_t int
21971 EOF
21972
21973 fi
21974
21975 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21976 echo "configure:21977: checking for off_t" >&5
21977 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21978   echo $ac_n "(cached) $ac_c" 1>&6
21979 else
21980   cat > conftest.$ac_ext <<EOF
21981 #line 21982 "configure"
21982 #include "confdefs.h"
21983 #include <sys/types.h>
21984 #if STDC_HEADERS
21985 #include <stdlib.h>
21986 #include <stddef.h>
21987 #endif
21988
21989 EOF
21990 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21991   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21992   rm -rf conftest*
21993   eval "ac_cv_type_off_t=yes"
21994 else
21995   rm -rf conftest*
21996   eval "ac_cv_type_off_t=no"
21997 fi
21998 rm -f conftest*
21999
22000 fi
22001 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
22002   echo "$ac_t""yes" 1>&6
22003 else
22004   echo "$ac_t""no" 1>&6
22005   cat >> confdefs.h <<EOF
22006 #define off_t long
22007 EOF
22008
22009 fi
22010
22011 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
22012 echo "configure:22013: checking for pid_t" >&5
22013 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
22014   echo $ac_n "(cached) $ac_c" 1>&6
22015 else
22016   cat > conftest.$ac_ext <<EOF
22017 #line 22018 "configure"
22018 #include "confdefs.h"
22019 #include <sys/types.h>
22020 #if STDC_HEADERS
22021 #include <stdlib.h>
22022 #include <stddef.h>
22023 #endif
22024
22025 EOF
22026 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22027   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22028   rm -rf conftest*
22029   eval "ac_cv_type_pid_t=yes"
22030 else
22031   rm -rf conftest*
22032   eval "ac_cv_type_pid_t=no"
22033 fi
22034 rm -f conftest*
22035
22036 fi
22037 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
22038   echo "$ac_t""yes" 1>&6
22039 else
22040   echo "$ac_t""no" 1>&6
22041   cat >> confdefs.h <<EOF
22042 #define pid_t int
22043 EOF
22044
22045 fi
22046
22047 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
22048 echo "configure:22049: checking for ptrdiff_t" >&5
22049 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
22050   echo $ac_n "(cached) $ac_c" 1>&6
22051 else
22052   cat > conftest.$ac_ext <<EOF
22053 #line 22054 "configure"
22054 #include "confdefs.h"
22055 #include <stddef.h>
22056 int main() {
22057 ptrdiff_t p
22058 ; return 0; }
22059 EOF
22060 if { (eval echo configure:22061: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22061   rm -rf conftest*
22062   am_cv_type_ptrdiff_t=yes
22063 else
22064   echo "configure: failed program was:" >&5
22065   cat conftest.$ac_ext >&5
22066   rm -rf conftest*
22067   am_cv_type_ptrdiff_t=no
22068 fi
22069 rm -f conftest*
22070 fi
22071
22072 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
22073    if test $am_cv_type_ptrdiff_t = yes; then
22074      cat >> confdefs.h <<\EOF
22075 #define HAVE_PTRDIFF_T 1
22076 EOF
22077
22078    fi
22079
22080 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
22081 echo "configure:22082: checking return type of signal handlers" >&5
22082 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
22083   echo $ac_n "(cached) $ac_c" 1>&6
22084 else
22085   cat > conftest.$ac_ext <<EOF
22086 #line 22087 "configure"
22087 #include "confdefs.h"
22088 #include <sys/types.h>
22089 #include <signal.h>
22090 #ifdef signal
22091 #undef signal
22092 #endif
22093 #ifdef __cplusplus
22094 extern "C" void (*signal (int, void (*)(int)))(int);
22095 #else
22096 void (*signal ()) ();
22097 #endif
22098
22099 int main() {
22100 int i;
22101 ; return 0; }
22102 EOF
22103 if { (eval echo configure:22104: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22104   rm -rf conftest*
22105   ac_cv_type_signal=void
22106 else
22107   echo "configure: failed program was:" >&5
22108   cat conftest.$ac_ext >&5
22109   rm -rf conftest*
22110   ac_cv_type_signal=int
22111 fi
22112 rm -f conftest*
22113 fi
22114
22115 echo "$ac_t""$ac_cv_type_signal" 1>&6
22116 cat >> confdefs.h <<EOF
22117 #define RETSIGTYPE $ac_cv_type_signal
22118 EOF
22119
22120
22121 echo $ac_n "checking for size_t""... $ac_c" 1>&6
22122 echo "configure:22123: checking for size_t" >&5
22123 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
22124   echo $ac_n "(cached) $ac_c" 1>&6
22125 else
22126   cat > conftest.$ac_ext <<EOF
22127 #line 22128 "configure"
22128 #include "confdefs.h"
22129 #include <sys/types.h>
22130 #if STDC_HEADERS
22131 #include <stdlib.h>
22132 #include <stddef.h>
22133 #endif
22134
22135 EOF
22136 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22137   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22138   rm -rf conftest*
22139   eval "ac_cv_type_size_t=yes"
22140 else
22141   rm -rf conftest*
22142   eval "ac_cv_type_size_t=no"
22143 fi
22144 rm -f conftest*
22145
22146 fi
22147 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
22148   echo "$ac_t""yes" 1>&6
22149 else
22150   echo "$ac_t""no" 1>&6
22151   cat >> confdefs.h <<EOF
22152 #define size_t unsigned
22153 EOF
22154
22155 fi
22156
22157
22158 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
22159 echo "configure:22160: checking for ssize_t" >&5
22160 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
22161   echo $ac_n "(cached) $ac_c" 1>&6
22162 else
22163   cat > conftest.$ac_ext <<EOF
22164 #line 22165 "configure"
22165 #include "confdefs.h"
22166 #include <sys/types.h>
22167 #if STDC_HEADERS
22168 #include <stdlib.h>
22169 #include <stddef.h>
22170 #endif
22171
22172 EOF
22173 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22174   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22175   rm -rf conftest*
22176   eval "ac_cv_type_ssize_t=yes"
22177 else
22178   rm -rf conftest*
22179   eval "ac_cv_type_ssize_t=no"
22180 fi
22181 rm -f conftest*
22182
22183 fi
22184 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
22185   echo "$ac_t""yes" 1>&6
22186 else
22187   echo "$ac_t""no" 1>&6
22188   cat >> confdefs.h <<EOF
22189 #define ssize_t signed int
22190 EOF
22191
22192 fi
22193
22194 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
22195 echo "configure:22196: checking for caddr_t" >&5
22196 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
22197   echo $ac_n "(cached) $ac_c" 1>&6
22198 else
22199   cat > conftest.$ac_ext <<EOF
22200 #line 22201 "configure"
22201 #include "confdefs.h"
22202 #include <sys/types.h>
22203 #if STDC_HEADERS
22204 #include <stdlib.h>
22205 #include <stddef.h>
22206 #endif
22207
22208 EOF
22209 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22210   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22211   rm -rf conftest*
22212   eval "ac_cv_type_caddr_t=yes"
22213 else
22214   rm -rf conftest*
22215   eval "ac_cv_type_caddr_t=no"
22216 fi
22217 rm -f conftest*
22218
22219 fi
22220 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
22221   echo "$ac_t""yes" 1>&6
22222 else
22223   echo "$ac_t""no" 1>&6
22224   cat >> confdefs.h <<EOF
22225 #define caddr_t char *
22226 EOF
22227
22228 fi
22229
22230
22231 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
22232 echo "configure:22233: checking for socklen_t" >&5
22233 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
22234   echo $ac_n "(cached) $ac_c" 1>&6
22235 else
22236   cat > conftest.$ac_ext <<EOF
22237 #line 22238 "configure"
22238 #include "confdefs.h"
22239
22240 #ifdef HAVE_SYS_TYPES_H
22241 #include <sys/types.h>
22242 #endif
22243 #ifdef HAVE_SYS_SOCKET_H
22244 #include <sys/socket.h>
22245 #endif
22246
22247 int main() {
22248 socklen_t len;
22249 ; return 0; }
22250 EOF
22251 if { (eval echo configure:22252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22252   rm -rf conftest*
22253   ol_cv_type_socklen_t=yes
22254 else
22255   echo "configure: failed program was:" >&5
22256   cat conftest.$ac_ext >&5
22257   rm -rf conftest*
22258   ol_cv_type_socklen_t=no
22259 fi
22260 rm -f conftest*
22261 fi
22262
22263 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
22264   if test $ol_cv_type_socklen_t = no; then
22265     cat >> confdefs.h <<\EOF
22266 #define socklen_t int
22267 EOF
22268
22269   fi
22270  
22271 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
22272 echo "configure:22273: checking for member st_blksize in aggregate type struct stat" >&5
22273 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
22274   echo $ac_n "(cached) $ac_c" 1>&6
22275 else
22276   cat > conftest.$ac_ext <<EOF
22277 #line 22278 "configure"
22278 #include "confdefs.h"
22279 #include <sys/types.h>
22280 #include <sys/stat.h>
22281 int main() {
22282 struct stat foo; foo.st_blksize;
22283 ; return 0; }
22284 EOF
22285 if { (eval echo configure:22286: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22286   rm -rf conftest*
22287   ac_cv_c_struct_member_st_blksize=yes
22288 else
22289   echo "configure: failed program was:" >&5
22290   cat conftest.$ac_ext >&5
22291   rm -rf conftest*
22292   ac_cv_c_struct_member_st_blksize=no
22293 fi
22294 rm -f conftest*
22295 fi
22296
22297 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22298 st_blksize="$ac_cv_c_struct_member_st_blksize"
22299 if test $ac_cv_c_struct_member_st_blksize = yes; then
22300   cat >> confdefs.h <<\EOF
22301 #define HAVE_ST_BLKSIZE 1
22302 EOF
22303
22304 fi
22305
22306 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22307 echo "configure:22308: checking whether time.h and sys/time.h may both be included" >&5
22308 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22309   echo $ac_n "(cached) $ac_c" 1>&6
22310 else
22311   cat > conftest.$ac_ext <<EOF
22312 #line 22313 "configure"
22313 #include "confdefs.h"
22314 #include <sys/types.h>
22315 #include <sys/time.h>
22316 #include <time.h>
22317 int main() {
22318 struct tm *tp;
22319 ; return 0; }
22320 EOF
22321 if { (eval echo configure:22322: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22322   rm -rf conftest*
22323   ac_cv_header_time=yes
22324 else
22325   echo "configure: failed program was:" >&5
22326   cat conftest.$ac_ext >&5
22327   rm -rf conftest*
22328   ac_cv_header_time=no
22329 fi
22330 rm -f conftest*
22331 fi
22332
22333 echo "$ac_t""$ac_cv_header_time" 1>&6
22334 if test $ac_cv_header_time = yes; then
22335   cat >> confdefs.h <<\EOF
22336 #define TIME_WITH_SYS_TIME 1
22337 EOF
22338
22339 fi
22340
22341 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22342 echo "configure:22343: checking whether struct tm is in sys/time.h or time.h" >&5
22343 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22344   echo $ac_n "(cached) $ac_c" 1>&6
22345 else
22346   cat > conftest.$ac_ext <<EOF
22347 #line 22348 "configure"
22348 #include "confdefs.h"
22349 #include <sys/types.h>
22350 #include <time.h>
22351 int main() {
22352 struct tm *tp; tp->tm_sec;
22353 ; return 0; }
22354 EOF
22355 if { (eval echo configure:22356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22356   rm -rf conftest*
22357   ac_cv_struct_tm=time.h
22358 else
22359   echo "configure: failed program was:" >&5
22360   cat conftest.$ac_ext >&5
22361   rm -rf conftest*
22362   ac_cv_struct_tm=sys/time.h
22363 fi
22364 rm -f conftest*
22365 fi
22366
22367 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22368 if test $ac_cv_struct_tm = sys/time.h; then
22369   cat >> confdefs.h <<\EOF
22370 #define TM_IN_SYS_TIME 1
22371 EOF
22372
22373 fi
22374
22375 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22376 echo "configure:22377: checking for uid_t in sys/types.h" >&5
22377 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22378   echo $ac_n "(cached) $ac_c" 1>&6
22379 else
22380   cat > conftest.$ac_ext <<EOF
22381 #line 22382 "configure"
22382 #include "confdefs.h"
22383 #include <sys/types.h>
22384 EOF
22385 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22386   egrep "uid_t" >/dev/null 2>&1; then
22387   rm -rf conftest*
22388   ac_cv_type_uid_t=yes
22389 else
22390   rm -rf conftest*
22391   ac_cv_type_uid_t=no
22392 fi
22393 rm -f conftest*
22394
22395 fi
22396
22397 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22398 if test $ac_cv_type_uid_t = no; then
22399   cat >> confdefs.h <<\EOF
22400 #define uid_t int
22401 EOF
22402
22403   cat >> confdefs.h <<\EOF
22404 #define gid_t int
22405 EOF
22406
22407 fi
22408
22409 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22410 echo "configure:22411: checking for sig_atomic_t" >&5
22411 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22412   echo $ac_n "(cached) $ac_c" 1>&6
22413 else
22414   cat > conftest.$ac_ext <<EOF
22415 #line 22416 "configure"
22416 #include "confdefs.h"
22417 #include <signal.h>
22418 int main() {
22419 sig_atomic_t atomic;
22420 ; return 0; }
22421 EOF
22422 if { (eval echo configure:22423: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22423   rm -rf conftest*
22424   ol_cv_type_sig_atomic_t=yes
22425 else
22426   echo "configure: failed program was:" >&5
22427   cat conftest.$ac_ext >&5
22428   rm -rf conftest*
22429   ol_cv_type_sig_atomic_t=no
22430 fi
22431 rm -f conftest*
22432 fi
22433
22434 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22435   if test $ol_cv_type_sig_atomic_t = no; then
22436     cat >> confdefs.h <<\EOF
22437 #define sig_atomic_t int
22438 EOF
22439
22440   fi
22441  
22442
22443
22444 # test for pw_gecos in struct passwd
22445 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22446 echo "configure:22447: checking struct passwd for pw_gecos" >&5
22447 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22448   echo $ac_n "(cached) $ac_c" 1>&6
22449 else
22450   
22451         cat > conftest.$ac_ext <<EOF
22452 #line 22453 "configure"
22453 #include "confdefs.h"
22454 #include <pwd.h>
22455 int main() {
22456
22457         struct passwd pwd;
22458         pwd.pw_gecos = pwd.pw_name;
22459
22460 ; return 0; }
22461 EOF
22462 if { (eval echo configure:22463: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22463   rm -rf conftest*
22464   ol_cv_struct_passwd_pw_gecos=yes
22465 else
22466   echo "configure: failed program was:" >&5
22467   cat conftest.$ac_ext >&5
22468   rm -rf conftest*
22469   ol_cv_struct_passwd_pw_gecos=no
22470 fi
22471 rm -f conftest*
22472 fi
22473
22474 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22475 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22476         cat >> confdefs.h <<\EOF
22477 #define HAVE_PW_GECOS 1
22478 EOF
22479
22480 fi
22481
22482 # test for pw_passwd in struct passwd
22483 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22484 echo "configure:22485: checking struct passwd for pw_passwd" >&5
22485 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22486   echo $ac_n "(cached) $ac_c" 1>&6
22487 else
22488   
22489         cat > conftest.$ac_ext <<EOF
22490 #line 22491 "configure"
22491 #include "confdefs.h"
22492 #include <pwd.h>
22493 int main() {
22494
22495         struct passwd pwd;
22496         pwd.pw_passwd = pwd.pw_name;
22497
22498 ; return 0; }
22499 EOF
22500 if { (eval echo configure:22501: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22501   rm -rf conftest*
22502   ol_cv_struct_passwd_pw_passwd=yes
22503 else
22504   echo "configure: failed program was:" >&5
22505   cat conftest.$ac_ext >&5
22506   rm -rf conftest*
22507   ol_cv_struct_passwd_pw_passwd=no
22508 fi
22509 rm -f conftest*
22510 fi
22511
22512 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22513 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22514         cat >> confdefs.h <<\EOF
22515 #define HAVE_PW_PASSWD 1
22516 EOF
22517
22518 fi
22519
22520
22521 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22522 echo "configure:22523: checking if toupper() requires islower()" >&5
22523 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22524   echo $ac_n "(cached) $ac_c" 1>&6
22525 else
22526   
22527         if test "$cross_compiling" = yes; then
22528   ol_cv_c_upper_lower=safe
22529 else
22530   cat > conftest.$ac_ext <<EOF
22531 #line 22532 "configure"
22532 #include "confdefs.h"
22533
22534 #include <ctype.h>
22535 main()
22536 {
22537         if ('C' == toupper('C'))
22538                 exit(0);
22539         else
22540                 exit(1);
22541 }
22542 EOF
22543 if { (eval echo configure:22544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22544 then
22545   ol_cv_c_upper_lower=no
22546 else
22547   echo "configure: failed program was:" >&5
22548   cat conftest.$ac_ext >&5
22549   rm -fr conftest*
22550   ol_cv_c_upper_lower=yes
22551 fi
22552 rm -fr conftest*
22553 fi
22554
22555 fi
22556
22557 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22558 if test $ol_cv_c_upper_lower != no ; then
22559         cat >> confdefs.h <<\EOF
22560 #define C_UPPER_LOWER 1
22561 EOF
22562
22563 fi
22564
22565 echo $ac_n "checking for working const""... $ac_c" 1>&6
22566 echo "configure:22567: checking for working const" >&5
22567 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22568   echo $ac_n "(cached) $ac_c" 1>&6
22569 else
22570   cat > conftest.$ac_ext <<EOF
22571 #line 22572 "configure"
22572 #include "confdefs.h"
22573
22574 int main() {
22575
22576 /* Ultrix mips cc rejects this.  */
22577 typedef int charset[2]; const charset x;
22578 /* SunOS 4.1.1 cc rejects this.  */
22579 char const *const *ccp;
22580 char **p;
22581 /* NEC SVR4.0.2 mips cc rejects this.  */
22582 struct point {int x, y;};
22583 static struct point const zero = {0,0};
22584 /* AIX XL C 1.02.0.0 rejects this.
22585    It does not let you subtract one const X* pointer from another in an arm
22586    of an if-expression whose if-part is not a constant expression */
22587 const char *g = "string";
22588 ccp = &g + (g ? g-g : 0);
22589 /* HPUX 7.0 cc rejects these. */
22590 ++ccp;
22591 p = (char**) ccp;
22592 ccp = (char const *const *) p;
22593 { /* SCO 3.2v4 cc rejects this.  */
22594   char *t;
22595   char const *s = 0 ? (char *) 0 : (char const *) 0;
22596
22597   *t++ = 0;
22598 }
22599 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22600   int x[] = {25, 17};
22601   const int *foo = &x[0];
22602   ++foo;
22603 }
22604 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22605   typedef const int *iptr;
22606   iptr p = 0;
22607   ++p;
22608 }
22609 { /* AIX XL C 1.02.0.0 rejects this saying
22610      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22611   struct s { int j; const int *ap[3]; };
22612   struct s *b; b->j = 5;
22613 }
22614 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22615   const int foo = 10;
22616 }
22617
22618 ; return 0; }
22619 EOF
22620 if { (eval echo configure:22621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22621   rm -rf conftest*
22622   ac_cv_c_const=yes
22623 else
22624   echo "configure: failed program was:" >&5
22625   cat conftest.$ac_ext >&5
22626   rm -rf conftest*
22627   ac_cv_c_const=no
22628 fi
22629 rm -f conftest*
22630 fi
22631
22632 echo "$ac_t""$ac_cv_c_const" 1>&6
22633 if test $ac_cv_c_const = no; then
22634   cat >> confdefs.h <<\EOF
22635 #define const 
22636 EOF
22637
22638 fi
22639
22640 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22641 echo "configure:22642: checking if compiler understands volatile" >&5
22642 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22643   echo $ac_n "(cached) $ac_c" 1>&6
22644 else
22645   cat > conftest.$ac_ext <<EOF
22646 #line 22647 "configure"
22647 #include "confdefs.h"
22648 int x, y, z;
22649 int main() {
22650 volatile int a; int * volatile b = x ? &y : &z;
22651       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22652       *b = 0;
22653 ; return 0; }
22654 EOF
22655 if { (eval echo configure:22656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22656   rm -rf conftest*
22657   ol_cv_c_volatile=yes
22658 else
22659   echo "configure: failed program was:" >&5
22660   cat conftest.$ac_ext >&5
22661   rm -rf conftest*
22662   ol_cv_c_volatile=no
22663 fi
22664 rm -f conftest*
22665 fi
22666
22667 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22668   if test $ol_cv_c_volatile = yes; then
22669     : 
22670   else
22671     cat >> confdefs.h <<\EOF
22672 #define volatile 
22673 EOF
22674
22675   fi
22676  
22677
22678 if test $cross_compiling = yes ; then
22679         cat >> confdefs.h <<\EOF
22680 #define CROSS_COMPILING 1
22681 EOF
22682
22683 else
22684         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22685 echo "configure:22686: checking whether byte ordering is bigendian" >&5
22686 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22687   echo $ac_n "(cached) $ac_c" 1>&6
22688 else
22689   ac_cv_c_bigendian=unknown
22690 # See if sys/param.h defines the BYTE_ORDER macro.
22691 cat > conftest.$ac_ext <<EOF
22692 #line 22693 "configure"
22693 #include "confdefs.h"
22694 #include <sys/types.h>
22695 #include <sys/param.h>
22696 int main() {
22697
22698 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22699  bogus endian macros
22700 #endif
22701 ; return 0; }
22702 EOF
22703 if { (eval echo configure:22704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22704   rm -rf conftest*
22705   # It does; now see whether it defined to BIG_ENDIAN or not.
22706 cat > conftest.$ac_ext <<EOF
22707 #line 22708 "configure"
22708 #include "confdefs.h"
22709 #include <sys/types.h>
22710 #include <sys/param.h>
22711 int main() {
22712
22713 #if BYTE_ORDER != BIG_ENDIAN
22714  not big endian
22715 #endif
22716 ; return 0; }
22717 EOF
22718 if { (eval echo configure:22719: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22719   rm -rf conftest*
22720   ac_cv_c_bigendian=yes
22721 else
22722   echo "configure: failed program was:" >&5
22723   cat conftest.$ac_ext >&5
22724   rm -rf conftest*
22725   ac_cv_c_bigendian=no
22726 fi
22727 rm -f conftest*
22728 else
22729   echo "configure: failed program was:" >&5
22730   cat conftest.$ac_ext >&5
22731 fi
22732 rm -f conftest*
22733 if test $ac_cv_c_bigendian = unknown; then
22734 if test "$cross_compiling" = yes; then
22735     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22736 else
22737   cat > conftest.$ac_ext <<EOF
22738 #line 22739 "configure"
22739 #include "confdefs.h"
22740 main () {
22741   /* Are we little or big endian?  From Harbison&Steele.  */
22742   union
22743   {
22744     long l;
22745     char c[sizeof (long)];
22746   } u;
22747   u.l = 1;
22748   exit (u.c[sizeof (long) - 1] == 1);
22749 }
22750 EOF
22751 if { (eval echo configure:22752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22752 then
22753   ac_cv_c_bigendian=no
22754 else
22755   echo "configure: failed program was:" >&5
22756   cat conftest.$ac_ext >&5
22757   rm -fr conftest*
22758   ac_cv_c_bigendian=yes
22759 fi
22760 rm -fr conftest*
22761 fi
22762
22763 fi
22764 fi
22765
22766 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22767 if test $ac_cv_c_bigendian = yes; then
22768   cat >> confdefs.h <<\EOF
22769 #define WORDS_BIGENDIAN 1
22770 EOF
22771
22772 fi
22773
22774 fi
22775
22776 echo $ac_n "checking size of short""... $ac_c" 1>&6
22777 echo "configure:22778: checking size of short" >&5 
22778 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22779   echo $ac_n "(cached) $ac_c" 1>&6
22780 else
22781   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22782   cat > conftest.$ac_ext <<EOF
22783 #line 22784 "configure"
22784 #include "confdefs.h"
22785 #include "confdefs.h" 
22786 #include <sys/types.h> 
22787  
22788
22789 int main() {
22790 switch (0) case 0: case (sizeof (short) == $ac_size):;
22791 ; return 0; }
22792 EOF
22793 if { (eval echo configure:22794: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22794   rm -rf conftest*
22795   ac_cv_sizeof_short=$ac_size
22796 else
22797   echo "configure: failed program was:" >&5
22798   cat conftest.$ac_ext >&5
22799 fi
22800 rm -f conftest* 
22801   if test x$ac_cv_sizeof_short != x ; then break; fi 
22802 done 
22803
22804 fi
22805  
22806 if test x$ac_cv_sizeof_short = x ; then 
22807   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22808 fi 
22809 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22810 cat >> confdefs.h <<EOF
22811 #define SIZEOF_SHORT $ac_cv_sizeof_short
22812 EOF
22813  
22814  
22815 echo $ac_n "checking size of int""... $ac_c" 1>&6
22816 echo "configure:22817: checking size of int" >&5 
22817 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22818   echo $ac_n "(cached) $ac_c" 1>&6
22819 else
22820   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22821   cat > conftest.$ac_ext <<EOF
22822 #line 22823 "configure"
22823 #include "confdefs.h"
22824 #include "confdefs.h" 
22825 #include <sys/types.h> 
22826  
22827
22828 int main() {
22829 switch (0) case 0: case (sizeof (int) == $ac_size):;
22830 ; return 0; }
22831 EOF
22832 if { (eval echo configure:22833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22833   rm -rf conftest*
22834   ac_cv_sizeof_int=$ac_size
22835 else
22836   echo "configure: failed program was:" >&5
22837   cat conftest.$ac_ext >&5
22838 fi
22839 rm -f conftest* 
22840   if test x$ac_cv_sizeof_int != x ; then break; fi 
22841 done 
22842
22843 fi
22844  
22845 if test x$ac_cv_sizeof_int = x ; then 
22846   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22847 fi 
22848 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22849 cat >> confdefs.h <<EOF
22850 #define SIZEOF_INT $ac_cv_sizeof_int
22851 EOF
22852  
22853  
22854 echo $ac_n "checking size of long""... $ac_c" 1>&6
22855 echo "configure:22856: checking size of long" >&5 
22856 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22857   echo $ac_n "(cached) $ac_c" 1>&6
22858 else
22859   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22860   cat > conftest.$ac_ext <<EOF
22861 #line 22862 "configure"
22862 #include "confdefs.h"
22863 #include "confdefs.h" 
22864 #include <sys/types.h> 
22865  
22866
22867 int main() {
22868 switch (0) case 0: case (sizeof (long) == $ac_size):;
22869 ; return 0; }
22870 EOF
22871 if { (eval echo configure:22872: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22872   rm -rf conftest*
22873   ac_cv_sizeof_long=$ac_size
22874 else
22875   echo "configure: failed program was:" >&5
22876   cat conftest.$ac_ext >&5
22877 fi
22878 rm -f conftest* 
22879   if test x$ac_cv_sizeof_long != x ; then break; fi 
22880 done 
22881
22882 fi
22883  
22884 if test x$ac_cv_sizeof_long = x ; then 
22885   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22886 fi 
22887 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22888 cat >> confdefs.h <<EOF
22889 #define SIZEOF_LONG $ac_cv_sizeof_long
22890 EOF
22891  
22892
22893
22894 if test "$ac_cv_sizeof_int" -lt 4 ; then
22895         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22896
22897         cat >> confdefs.h <<\EOF
22898 #define LBER_INT_T long
22899 EOF
22900
22901 else
22902         cat >> confdefs.h <<\EOF
22903 #define LBER_INT_T int
22904 EOF
22905
22906 fi
22907
22908 cat >> confdefs.h <<\EOF
22909 #define LBER_LEN_T long
22910 EOF
22911
22912 cat >> confdefs.h <<\EOF
22913 #define LBER_SOCKET_T int
22914 EOF
22915
22916 cat >> confdefs.h <<\EOF
22917 #define LBER_TAG_T long
22918 EOF
22919
22920
22921 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22922 echo "configure:22923: checking for 8-bit clean memcmp" >&5
22923 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22924   echo $ac_n "(cached) $ac_c" 1>&6
22925 else
22926   if test "$cross_compiling" = yes; then
22927   ac_cv_func_memcmp_clean=no
22928 else
22929   cat > conftest.$ac_ext <<EOF
22930 #line 22931 "configure"
22931 #include "confdefs.h"
22932
22933 main()
22934 {
22935   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22936   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22937 }
22938
22939 EOF
22940 if { (eval echo configure:22941: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22941 then
22942   ac_cv_func_memcmp_clean=yes
22943 else
22944   echo "configure: failed program was:" >&5
22945   cat conftest.$ac_ext >&5
22946   rm -fr conftest*
22947   ac_cv_func_memcmp_clean=no
22948 fi
22949 rm -fr conftest*
22950 fi
22951
22952 fi
22953
22954 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22955 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22956
22957 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22958 echo "configure:22959: checking for strftime" >&5
22959 if eval "test \"\${ac_cv_func_strftime+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 strftime(); 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 strftime();
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_strftime) || defined (__stub___strftime)
22980 choke me
22981 #else
22982 f = strftime;
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_strftime=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_strftime=no"
22995 fi
22996 rm -f conftest*
22997 fi
22998
22999 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
23000   echo "$ac_t""yes" 1>&6
23001   cat >> confdefs.h <<\EOF
23002 #define HAVE_STRFTIME 1
23003 EOF
23004
23005 else
23006   echo "$ac_t""no" 1>&6
23007 # strftime is in -lintl on SCO UNIX.
23008 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
23009 echo "configure:23010: checking for strftime in -lintl" >&5
23010 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
23011 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23012   echo $ac_n "(cached) $ac_c" 1>&6
23013 else
23014   ac_save_LIBS="$LIBS"
23015 LIBS="-lintl  $LIBS"
23016 cat > conftest.$ac_ext <<EOF
23017 #line 23018 "configure"
23018 #include "confdefs.h"
23019 /* Override any gcc2 internal prototype to avoid an error.  */
23020 /* We use char because int might match the return type of a gcc2
23021     builtin and then its argument prototype would still apply.  */
23022 char strftime();
23023
23024 int main() {
23025 strftime()
23026 ; return 0; }
23027 EOF
23028 if { (eval echo configure:23029: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23029   rm -rf conftest*
23030   eval "ac_cv_lib_$ac_lib_var=yes"
23031 else
23032   echo "configure: failed program was:" >&5
23033   cat conftest.$ac_ext >&5
23034   rm -rf conftest*
23035   eval "ac_cv_lib_$ac_lib_var=no"
23036 fi
23037 rm -f conftest*
23038 LIBS="$ac_save_LIBS"
23039
23040 fi
23041 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23042   echo "$ac_t""yes" 1>&6
23043   cat >> confdefs.h <<\EOF
23044 #define HAVE_STRFTIME 1
23045 EOF
23046
23047 LIBS="-lintl $LIBS"
23048 else
23049   echo "$ac_t""no" 1>&6
23050 fi
23051
23052 fi
23053
23054
23055 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
23056 echo "configure:23057: checking for inet_aton()" >&5
23057 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
23058   echo $ac_n "(cached) $ac_c" 1>&6
23059 else
23060   cat > conftest.$ac_ext <<EOF
23061 #line 23062 "configure"
23062 #include "confdefs.h"
23063
23064 #ifdef HAVE_SYS_TYPES_H
23065 #       include <sys/types.h>
23066 #endif
23067 #ifdef HAVE_SYS_SOCKET_H
23068 #       include <sys/socket.h>
23069 #       ifdef HAVE_SYS_SELECT_H
23070 #               include <sys/select.h>
23071 #       endif
23072 #       include <netinet/in.h>
23073 #       ifdef HAVE_ARPA_INET_H
23074 #               include <arpa/inet.h>
23075 #       endif
23076 #endif
23077
23078 int main() {
23079 struct in_addr in;
23080 int rc = inet_aton( "255.255.255.255", &in );
23081 ; return 0; }
23082 EOF
23083 if { (eval echo configure:23084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23084   rm -rf conftest*
23085   ol_cv_func_inet_aton=yes
23086 else
23087   echo "configure: failed program was:" >&5
23088   cat conftest.$ac_ext >&5
23089   rm -rf conftest*
23090   ol_cv_func_inet_aton=no
23091 fi
23092 rm -f conftest*
23093 fi
23094
23095 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
23096   if test $ol_cv_func_inet_aton != no; then
23097     cat >> confdefs.h <<\EOF
23098 #define HAVE_INET_ATON 1
23099 EOF
23100
23101   fi
23102  
23103
23104 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
23105 echo "configure:23106: checking for _spawnlp" >&5
23106 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
23107   echo $ac_n "(cached) $ac_c" 1>&6
23108 else
23109   cat > conftest.$ac_ext <<EOF
23110 #line 23111 "configure"
23111 #include "confdefs.h"
23112 /* System header to define __stub macros and hopefully few prototypes,
23113     which can conflict with char _spawnlp(); below.  */
23114 #include <assert.h>
23115 /* Override any gcc2 internal prototype to avoid an error.  */
23116 /* We use char because int might match the return type of a gcc2
23117     builtin and then its argument prototype would still apply.  */
23118 char _spawnlp();
23119 char (*f)();
23120
23121 int main() {
23122
23123 /* The GNU C library defines this for functions which it implements
23124     to always fail with ENOSYS.  Some functions are actually named
23125     something starting with __ and the normal name is an alias.  */
23126 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
23127 choke me
23128 #else
23129 f = _spawnlp;
23130 #endif
23131
23132 ; return 0; }
23133 EOF
23134 if { (eval echo configure:23135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23135   rm -rf conftest*
23136   eval "ac_cv_func__spawnlp=yes"
23137 else
23138   echo "configure: failed program was:" >&5
23139   cat conftest.$ac_ext >&5
23140   rm -rf conftest*
23141   eval "ac_cv_func__spawnlp=no"
23142 fi
23143 rm -f conftest*
23144 fi
23145
23146 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
23147   echo "$ac_t""yes" 1>&6
23148   cat >> confdefs.h <<\EOF
23149 #define HAVE_SPAWNLP 1
23150 EOF
23151
23152 else
23153   echo "$ac_t""no" 1>&6
23154 fi
23155
23156
23157 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
23158 echo "configure:23159: checking for _snprintf" >&5
23159 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
23160   echo $ac_n "(cached) $ac_c" 1>&6
23161 else
23162   cat > conftest.$ac_ext <<EOF
23163 #line 23164 "configure"
23164 #include "confdefs.h"
23165 /* System header to define __stub macros and hopefully few prototypes,
23166     which can conflict with char _snprintf(); below.  */
23167 #include <assert.h>
23168 /* Override any gcc2 internal prototype to avoid an error.  */
23169 /* We use char because int might match the return type of a gcc2
23170     builtin and then its argument prototype would still apply.  */
23171 char _snprintf();
23172 char (*f)();
23173
23174 int main() {
23175
23176 /* The GNU C library defines this for functions which it implements
23177     to always fail with ENOSYS.  Some functions are actually named
23178     something starting with __ and the normal name is an alias.  */
23179 #if defined (__stub__snprintf) || defined (__stub____snprintf)
23180 choke me
23181 #else
23182 f = _snprintf;
23183 #endif
23184
23185 ; return 0; }
23186 EOF
23187 if { (eval echo configure:23188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23188   rm -rf conftest*
23189   eval "ac_cv_func__snprintf=yes"
23190 else
23191   echo "configure: failed program was:" >&5
23192   cat conftest.$ac_ext >&5
23193   rm -rf conftest*
23194   eval "ac_cv_func__snprintf=no"
23195 fi
23196 rm -f conftest*
23197 fi
23198
23199 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
23200   echo "$ac_t""yes" 1>&6
23201   ac_cv_func_snprintf=yes
23202         cat >> confdefs.h <<\EOF
23203 #define snprintf _snprintf
23204 EOF
23205
23206
23207 else
23208   echo "$ac_t""no" 1>&6
23209 fi
23210
23211
23212 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
23213 echo "configure:23214: checking for _vsnprintf" >&5
23214 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
23215   echo $ac_n "(cached) $ac_c" 1>&6
23216 else
23217   cat > conftest.$ac_ext <<EOF
23218 #line 23219 "configure"
23219 #include "confdefs.h"
23220 /* System header to define __stub macros and hopefully few prototypes,
23221     which can conflict with char _vsnprintf(); below.  */
23222 #include <assert.h>
23223 /* Override any gcc2 internal prototype to avoid an error.  */
23224 /* We use char because int might match the return type of a gcc2
23225     builtin and then its argument prototype would still apply.  */
23226 char _vsnprintf();
23227 char (*f)();
23228
23229 int main() {
23230
23231 /* The GNU C library defines this for functions which it implements
23232     to always fail with ENOSYS.  Some functions are actually named
23233     something starting with __ and the normal name is an alias.  */
23234 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
23235 choke me
23236 #else
23237 f = _vsnprintf;
23238 #endif
23239
23240 ; return 0; }
23241 EOF
23242 if { (eval echo configure:23243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23243   rm -rf conftest*
23244   eval "ac_cv_func__vsnprintf=yes"
23245 else
23246   echo "configure: failed program was:" >&5
23247   cat conftest.$ac_ext >&5
23248   rm -rf conftest*
23249   eval "ac_cv_func__vsnprintf=no"
23250 fi
23251 rm -f conftest*
23252 fi
23253
23254 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
23255   echo "$ac_t""yes" 1>&6
23256   ac_cv_func_vsnprintf=yes
23257         cat >> confdefs.h <<\EOF
23258 #define vsnprintf _vsnprintf
23259 EOF
23260
23261
23262 else
23263   echo "$ac_t""no" 1>&6
23264 fi
23265
23266
23267 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
23268 echo "configure:23269: checking for vprintf" >&5
23269 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
23270   echo $ac_n "(cached) $ac_c" 1>&6
23271 else
23272   cat > conftest.$ac_ext <<EOF
23273 #line 23274 "configure"
23274 #include "confdefs.h"
23275 /* System header to define __stub macros and hopefully few prototypes,
23276     which can conflict with char vprintf(); below.  */
23277 #include <assert.h>
23278 /* Override any gcc2 internal prototype to avoid an error.  */
23279 /* We use char because int might match the return type of a gcc2
23280     builtin and then its argument prototype would still apply.  */
23281 char vprintf();
23282 char (*f)();
23283
23284 int main() {
23285
23286 /* The GNU C library defines this for functions which it implements
23287     to always fail with ENOSYS.  Some functions are actually named
23288     something starting with __ and the normal name is an alias.  */
23289 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23290 choke me
23291 #else
23292 f = vprintf;
23293 #endif
23294
23295 ; return 0; }
23296 EOF
23297 if { (eval echo configure:23298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23298   rm -rf conftest*
23299   eval "ac_cv_func_vprintf=yes"
23300 else
23301   echo "configure: failed program was:" >&5
23302   cat conftest.$ac_ext >&5
23303   rm -rf conftest*
23304   eval "ac_cv_func_vprintf=no"
23305 fi
23306 rm -f conftest*
23307 fi
23308
23309 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23310   echo "$ac_t""yes" 1>&6
23311   cat >> confdefs.h <<\EOF
23312 #define HAVE_VPRINTF 1
23313 EOF
23314
23315 else
23316   echo "$ac_t""no" 1>&6
23317 fi
23318
23319 if test "$ac_cv_func_vprintf" != yes; then
23320 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23321 echo "configure:23322: checking for _doprnt" >&5
23322 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23323   echo $ac_n "(cached) $ac_c" 1>&6
23324 else
23325   cat > conftest.$ac_ext <<EOF
23326 #line 23327 "configure"
23327 #include "confdefs.h"
23328 /* System header to define __stub macros and hopefully few prototypes,
23329     which can conflict with char _doprnt(); below.  */
23330 #include <assert.h>
23331 /* Override any gcc2 internal prototype to avoid an error.  */
23332 /* We use char because int might match the return type of a gcc2
23333     builtin and then its argument prototype would still apply.  */
23334 char _doprnt();
23335 char (*f)();
23336
23337 int main() {
23338
23339 /* The GNU C library defines this for functions which it implements
23340     to always fail with ENOSYS.  Some functions are actually named
23341     something starting with __ and the normal name is an alias.  */
23342 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23343 choke me
23344 #else
23345 f = _doprnt;
23346 #endif
23347
23348 ; return 0; }
23349 EOF
23350 if { (eval echo configure:23351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23351   rm -rf conftest*
23352   eval "ac_cv_func__doprnt=yes"
23353 else
23354   echo "configure: failed program was:" >&5
23355   cat conftest.$ac_ext >&5
23356   rm -rf conftest*
23357   eval "ac_cv_func__doprnt=no"
23358 fi
23359 rm -f conftest*
23360 fi
23361
23362 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23363   echo "$ac_t""yes" 1>&6
23364   cat >> confdefs.h <<\EOF
23365 #define HAVE_DOPRNT 1
23366 EOF
23367
23368 else
23369   echo "$ac_t""no" 1>&6
23370 fi
23371
23372 fi
23373
23374
23375 if test $ac_cv_func_vprintf = yes ; then
23376                 for ac_func in snprintf vsnprintf
23377 do
23378 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23379 echo "configure:23380: checking for $ac_func" >&5
23380 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23381   echo $ac_n "(cached) $ac_c" 1>&6
23382 else
23383   cat > conftest.$ac_ext <<EOF
23384 #line 23385 "configure"
23385 #include "confdefs.h"
23386 /* System header to define __stub macros and hopefully few prototypes,
23387     which can conflict with char $ac_func(); below.  */
23388 #include <assert.h>
23389 /* Override any gcc2 internal prototype to avoid an error.  */
23390 /* We use char because int might match the return type of a gcc2
23391     builtin and then its argument prototype would still apply.  */
23392 char $ac_func();
23393 char (*f)();
23394
23395 int main() {
23396
23397 /* The GNU C library defines this for functions which it implements
23398     to always fail with ENOSYS.  Some functions are actually named
23399     something starting with __ and the normal name is an alias.  */
23400 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23401 choke me
23402 #else
23403 f = $ac_func;
23404 #endif
23405
23406 ; return 0; }
23407 EOF
23408 if { (eval echo configure:23409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23409   rm -rf conftest*
23410   eval "ac_cv_func_$ac_func=yes"
23411 else
23412   echo "configure: failed program was:" >&5
23413   cat conftest.$ac_ext >&5
23414   rm -rf conftest*
23415   eval "ac_cv_func_$ac_func=no"
23416 fi
23417 rm -f conftest*
23418 fi
23419
23420 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23421   echo "$ac_t""yes" 1>&6
23422     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23423   cat >> confdefs.h <<EOF
23424 #define $ac_tr_func 1
23425 EOF
23426  
23427 else
23428   echo "$ac_t""no" 1>&6
23429 fi
23430 done
23431
23432 fi
23433
23434 for ac_func in \
23435         bcopy                   \
23436         closesocket             \
23437         chroot                  \
23438         endgrent                \
23439         endpwent                \
23440         fcntl                   \
23441         flock                   \
23442         fstat                   \
23443         getdtablesize   \
23444         getgrgid                \
23445         gethostname             \
23446         getpass                 \
23447         getpassphrase   \
23448         getpwuid                \
23449         getpwnam                \
23450         getspnam                \
23451         gettimeofday    \
23452         initgroups              \
23453         lockf                   \
23454         memcpy                  \
23455         memmove                 \
23456         mkstemp                 \
23457         mktemp                  \
23458         pipe                    \
23459         read                    \
23460         recv                    \
23461         recvfrom                \
23462         setpwfile               \
23463         setgid                  \
23464         setegid                 \
23465         setsid                  \
23466         setuid                  \
23467         seteuid                 \
23468         sigaction               \
23469         signal                  \
23470         sigset                  \
23471         strdup                  \
23472         strerror                \
23473         strpbrk                 \
23474         strrchr                 \
23475         strsep                  \
23476         strstr                  \
23477         strtol                  \
23478         strtoul                 \
23479         strtoq                  \
23480         strtouq                 \
23481         strtoll                 \
23482         strspn                  \
23483         sysconf                 \
23484         usleep                  \
23485         waitpid                 \
23486         wait4                   \
23487         write                   \
23488         send                    \
23489         sendmsg                 \
23490         sendto                  \
23491
23492 do
23493 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23494 echo "configure:23495: checking for $ac_func" >&5
23495 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23496   echo $ac_n "(cached) $ac_c" 1>&6
23497 else
23498   cat > conftest.$ac_ext <<EOF
23499 #line 23500 "configure"
23500 #include "confdefs.h"
23501 /* System header to define __stub macros and hopefully few prototypes,
23502     which can conflict with char $ac_func(); below.  */
23503 #include <assert.h>
23504 /* Override any gcc2 internal prototype to avoid an error.  */
23505 /* We use char because int might match the return type of a gcc2
23506     builtin and then its argument prototype would still apply.  */
23507 char $ac_func();
23508 char (*f)();
23509
23510 int main() {
23511
23512 /* The GNU C library defines this for functions which it implements
23513     to always fail with ENOSYS.  Some functions are actually named
23514     something starting with __ and the normal name is an alias.  */
23515 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23516 choke me
23517 #else
23518 f = $ac_func;
23519 #endif
23520
23521 ; return 0; }
23522 EOF
23523 if { (eval echo configure:23524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23524   rm -rf conftest*
23525   eval "ac_cv_func_$ac_func=yes"
23526 else
23527   echo "configure: failed program was:" >&5
23528   cat conftest.$ac_ext >&5
23529   rm -rf conftest*
23530   eval "ac_cv_func_$ac_func=no"
23531 fi
23532 rm -f conftest*
23533 fi
23534
23535 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23536   echo "$ac_t""yes" 1>&6
23537     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23538   cat >> confdefs.h <<EOF
23539 #define $ac_tr_func 1
23540 EOF
23541  
23542 else
23543   echo "$ac_t""no" 1>&6
23544 fi
23545 done
23546
23547
23548 for ac_func in getopt getpeereid
23549 do
23550 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23551 echo "configure:23552: checking for $ac_func" >&5
23552 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23553   echo $ac_n "(cached) $ac_c" 1>&6
23554 else
23555   cat > conftest.$ac_ext <<EOF
23556 #line 23557 "configure"
23557 #include "confdefs.h"
23558 /* System header to define __stub macros and hopefully few prototypes,
23559     which can conflict with char $ac_func(); below.  */
23560 #include <assert.h>
23561 /* Override any gcc2 internal prototype to avoid an error.  */
23562 /* We use char because int might match the return type of a gcc2
23563     builtin and then its argument prototype would still apply.  */
23564 char $ac_func();
23565 char (*f)();
23566
23567 int main() {
23568
23569 /* The GNU C library defines this for functions which it implements
23570     to always fail with ENOSYS.  Some functions are actually named
23571     something starting with __ and the normal name is an alias.  */
23572 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23573 choke me
23574 #else
23575 f = $ac_func;
23576 #endif
23577
23578 ; return 0; }
23579 EOF
23580 if { (eval echo configure:23581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23581   rm -rf conftest*
23582   eval "ac_cv_func_$ac_func=yes"
23583 else
23584   echo "configure: failed program was:" >&5
23585   cat conftest.$ac_ext >&5
23586   rm -rf conftest*
23587   eval "ac_cv_func_$ac_func=no"
23588 fi
23589 rm -f conftest*
23590 fi
23591
23592 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23593   echo "$ac_t""yes" 1>&6
23594     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23595   cat >> confdefs.h <<EOF
23596 #define $ac_tr_func 1
23597 EOF
23598  
23599 else
23600   echo "$ac_t""no" 1>&6
23601 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23602 fi
23603 done
23604
23605
23606
23607 if test "$ac_cv_func_getopt" != yes; then
23608         LIBSRCS="$LIBSRCS getopt.c"
23609 fi
23610 if test "$ac_cv_func_getpeereid" != yes; then
23611         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23612 echo "configure:23613: checking for msg_accrights in msghdr" >&5
23613 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23614   echo $ac_n "(cached) $ac_c" 1>&6
23615 else
23616   cat > conftest.$ac_ext <<EOF
23617 #line 23618 "configure"
23618 #include "confdefs.h"
23619 #include <sys/socket.h>
23620 int main() {
23621 struct msghdr m; m.msg_accrightslen=0
23622 ; return 0; }
23623 EOF
23624 if { (eval echo configure:23625: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23625   rm -rf conftest*
23626   ol_cv_msghdr_msg_accrights=yes
23627 else
23628   echo "configure: failed program was:" >&5
23629   cat conftest.$ac_ext >&5
23630   rm -rf conftest*
23631   ol_cv_msghdr_msg_accrights=no
23632 fi
23633 rm -f conftest*
23634         
23635 fi
23636
23637 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23638   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23639         cat >> confdefs.h <<\EOF
23640 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23641 EOF
23642
23643   fi
23644
23645         LIBSRCS="$LIBSRCS getpeereid.c"
23646 fi
23647 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23648         if test "$ac_cv_func_snprintf" != yes; then
23649                 cat >> confdefs.h <<\EOF
23650 #define snprintf ber_pvt_snprintf
23651 EOF
23652
23653         fi
23654         if test "$ac_cv_func_vsnprintf" != yes; then
23655                 cat >> confdefs.h <<\EOF
23656 #define vsnprintf ber_pvt_vsnprintf
23657 EOF
23658
23659         fi
23660 fi
23661
23662 # Check Configuration
23663 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
23664 echo "configure:23665: checking declaration of sys_errlist" >&5
23665 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
23666   echo $ac_n "(cached) $ac_c" 1>&6
23667 else
23668   
23669         cat > conftest.$ac_ext <<EOF
23670 #line 23671 "configure"
23671 #include "confdefs.h"
23672
23673 #include <stdio.h>
23674 #include <sys/types.h>
23675 #include <errno.h>
23676 #ifdef WINNT
23677 #include <stdlib.h>
23678 #endif 
23679 int main() {
23680 char *c = (char *) *sys_errlist
23681 ; return 0; }
23682 EOF
23683 if { (eval echo configure:23684: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23684   rm -rf conftest*
23685   ol_cv_dcl_sys_errlist=yes
23686         ol_cv_have_sys_errlist=yes
23687 else
23688   echo "configure: failed program was:" >&5
23689   cat conftest.$ac_ext >&5
23690   rm -rf conftest*
23691   ol_cv_dcl_sys_errlist=no
23692 fi
23693 rm -f conftest*
23694 fi
23695
23696 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
23697 #
23698 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
23699 if test $ol_cv_dcl_sys_errlist = no ; then
23700         cat >> confdefs.h <<\EOF
23701 #define DECL_SYS_ERRLIST 1
23702 EOF
23703
23704
23705         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
23706 echo "configure:23707: checking existence of sys_errlist" >&5
23707 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
23708   echo $ac_n "(cached) $ac_c" 1>&6
23709 else
23710   
23711                 cat > conftest.$ac_ext <<EOF
23712 #line 23713 "configure"
23713 #include "confdefs.h"
23714 #include <errno.h>
23715 int main() {
23716 char *c = (char *) *sys_errlist
23717 ; return 0; }
23718 EOF
23719 if { (eval echo configure:23720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23720   rm -rf conftest*
23721   ol_cv_have_sys_errlist=yes
23722 else
23723   echo "configure: failed program was:" >&5
23724   cat conftest.$ac_ext >&5
23725   rm -rf conftest*
23726   ol_cv_have_sys_errlist=no
23727 fi
23728 rm -f conftest*
23729 fi
23730
23731 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
23732 fi
23733 if test $ol_cv_have_sys_errlist = yes ; then
23734         cat >> confdefs.h <<\EOF
23735 #define HAVE_SYS_ERRLIST 1
23736 EOF
23737
23738 fi
23739
23740
23741
23742 if test "$ol_enable_slapi" != no ; then
23743                         for ac_hdr in ltdl.h
23744 do
23745 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23746 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23747 echo "configure:23748: checking for $ac_hdr" >&5
23748 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23749   echo $ac_n "(cached) $ac_c" 1>&6
23750 else
23751   cat > conftest.$ac_ext <<EOF
23752 #line 23753 "configure"
23753 #include "confdefs.h"
23754 #include <$ac_hdr>
23755 EOF
23756 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23757 { (eval echo configure:23758: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23758 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23759 if test -z "$ac_err"; then
23760   rm -rf conftest*
23761   eval "ac_cv_header_$ac_safe=yes"
23762 else
23763   echo "$ac_err" >&5
23764   echo "configure: failed program was:" >&5
23765   cat conftest.$ac_ext >&5
23766   rm -rf conftest*
23767   eval "ac_cv_header_$ac_safe=no"
23768 fi
23769 rm -f conftest*
23770 fi
23771 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23772   echo "$ac_t""yes" 1>&6
23773     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23774   cat >> confdefs.h <<EOF
23775 #define $ac_tr_hdr 1
23776 EOF
23777  
23778 else
23779   echo "$ac_t""no" 1>&6
23780 fi
23781 done
23782
23783
23784         if test $ac_cv_header_ltdl_h != yes ; then
23785                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23786         fi
23787         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23788 echo "configure:23789: checking for lt_dlinit in -lltdl" >&5
23789 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23790 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23791   echo $ac_n "(cached) $ac_c" 1>&6
23792 else
23793   ac_save_LIBS="$LIBS"
23794 LIBS="-lltdl  $LIBS"
23795 cat > conftest.$ac_ext <<EOF
23796 #line 23797 "configure"
23797 #include "confdefs.h"
23798 /* Override any gcc2 internal prototype to avoid an error.  */
23799 /* We use char because int might match the return type of a gcc2
23800     builtin and then its argument prototype would still apply.  */
23801 char lt_dlinit();
23802
23803 int main() {
23804 lt_dlinit()
23805 ; return 0; }
23806 EOF
23807 if { (eval echo configure:23808: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23808   rm -rf conftest*
23809   eval "ac_cv_lib_$ac_lib_var=yes"
23810 else
23811   echo "configure: failed program was:" >&5
23812   cat conftest.$ac_ext >&5
23813   rm -rf conftest*
23814   eval "ac_cv_lib_$ac_lib_var=no"
23815 fi
23816 rm -f conftest*
23817 LIBS="$ac_save_LIBS"
23818
23819 fi
23820 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23821   echo "$ac_t""yes" 1>&6
23822   
23823                 SLAPI_LIBS=-lltdl
23824                 LIBSLAPI=libslapi.a
23825                 LIBSLAPITOOLS=../libslapi.a
23826                 cat >> confdefs.h <<\EOF
23827 #define HAVE_LIBLTDL 1
23828 EOF
23829
23830         
23831 else
23832   echo "$ac_t""no" 1>&6
23833 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23834 fi
23835
23836
23837         cat >> confdefs.h <<\EOF
23838 #define LDAP_SLAPI 1
23839 EOF
23840
23841 fi
23842
23843 if test "$ol_enable_debug" != no ; then
23844         cat >> confdefs.h <<\EOF
23845 #define LDAP_DEBUG 1
23846 EOF
23847
23848 fi
23849 if test "$ol_enable_syslog" = yes ; then
23850         cat >> confdefs.h <<\EOF
23851 #define LDAP_SYSLOG 1
23852 EOF
23853
23854 fi
23855 if test "$ol_link_kbind" != no ; then
23856         cat >> confdefs.h <<\EOF
23857 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23858 EOF
23859
23860 fi
23861 if test "$ol_enable_proctitle" != no ; then
23862         cat >> confdefs.h <<\EOF
23863 #define LDAP_PROCTITLE 1
23864 EOF
23865
23866 fi
23867 if test "$ol_enable_referrals" != no ; then
23868         cat >> confdefs.h <<\EOF
23869 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23870 EOF
23871
23872 fi
23873 if test "$ol_enable_local" != no; then
23874         cat >> confdefs.h <<\EOF
23875 #define LDAP_PF_LOCAL 1
23876 EOF
23877
23878 fi
23879 if test "$ol_link_ipv6" != no; then
23880         cat >> confdefs.h <<\EOF
23881 #define LDAP_PF_INET6 1
23882 EOF
23883
23884 fi
23885 if test "$ol_enable_cleartext" != no ; then
23886         cat >> confdefs.h <<\EOF
23887 #define SLAPD_CLEARTEXT 1
23888 EOF
23889
23890 fi
23891 if test "$ol_enable_crypt" != no ; then
23892         cat >> confdefs.h <<\EOF
23893 #define SLAPD_CRYPT 1
23894 EOF
23895
23896 fi
23897 if test "$ol_link_kpasswd" != no ; then
23898         cat >> confdefs.h <<\EOF
23899 #define SLAPD_KPASSWD 1
23900 EOF
23901
23902 fi
23903 if test "$ol_link_spasswd" != no ; then
23904         cat >> confdefs.h <<\EOF
23905 #define SLAPD_SPASSWD 1
23906 EOF
23907
23908 fi
23909 if test "$ol_enable_multimaster" != no ; then
23910         cat >> confdefs.h <<\EOF
23911 #define SLAPD_MULTIMASTER 1
23912 EOF
23913
23914 fi
23915 if test "$ol_enable_rlookups" != no ; then
23916         cat >> confdefs.h <<\EOF
23917 #define SLAPD_RLOOKUPS 1
23918 EOF
23919
23920 fi
23921 if test "$ol_enable_aci" != no ; then
23922         cat >> confdefs.h <<\EOF
23923 #define SLAPD_ACI_ENABLED 1
23924 EOF
23925
23926 fi
23927
23928 if test "$ol_link_modules" != no ; then
23929         cat >> confdefs.h <<\EOF
23930 #define SLAPD_MODULES 1
23931 EOF
23932
23933         BUILD_SLAPD=yes
23934         SLAPD_MODULES_LDFLAGS="-dlopen self"
23935 fi
23936
23937 if test "$ol_enable_bdb" != no ; then
23938         cat >> confdefs.h <<\EOF
23939 #define SLAPD_BDB 1
23940 EOF
23941
23942         BUILD_SLAPD=yes
23943         BUILD_BDB=yes
23944         if test "$ol_with_bdb_module" != static ; then
23945                 cat >> confdefs.h <<\EOF
23946 #define SLAPD_BDB_DYNAMIC 1
23947 EOF
23948
23949                 BUILD_BDB=mod
23950                 BUILD_BDB_DYNAMIC=shared
23951                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23952         else
23953                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23954         fi
23955 fi
23956
23957 if test "$ol_link_dnssrv" != no ; then
23958         cat >> confdefs.h <<\EOF
23959 #define SLAPD_DNSSRV 1
23960 EOF
23961
23962         BUILD_SLAPD=yes
23963         BUILD_DNSSRV=yes
23964         if test "$ol_with_dnssrv_module" != static ; then
23965                 cat >> confdefs.h <<\EOF
23966 #define SLAPD_DNSSRV_DYNAMIC 1
23967 EOF
23968
23969                 BUILD_DNSSRV=mod
23970                 BUILD_DNSSRV_DYNAMIC=shared
23971                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23972         else
23973                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23974         fi
23975 fi
23976
23977 if test "$ol_enable_hdb" != no ; then
23978         cat >> confdefs.h <<\EOF
23979 #define SLAPD_HDB 1
23980 EOF
23981
23982         BUILD_SLAPD=yes
23983         BUILD_HDB=yes
23984         if test "$ol_with_hdb_module" != static ; then
23985                 cat >> confdefs.h <<\EOF
23986 #define SLAPD_HDB_DYNAMIC 1
23987 EOF
23988
23989                 BUILD_HDB=mod
23990                 BUILD_HDB_DYNAMIC=shared
23991                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23992         else
23993                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23994         fi
23995 fi
23996
23997 if test "$ol_enable_ldap" != no ; then
23998         cat >> confdefs.h <<\EOF
23999 #define SLAPD_LDAP 1
24000 EOF
24001
24002         BUILD_SLAPD=yes
24003         BUILD_LDAP=yes
24004         if test "$ol_with_ldap_module" != static ; then
24005                 cat >> confdefs.h <<\EOF
24006 #define SLAPD_LDAP_DYNAMIC 1
24007 EOF
24008
24009                 BUILD_LDAP=mod
24010                 BUILD_LDAP_DYNAMIC=shared
24011                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
24012         else
24013                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
24014         fi
24015 fi
24016
24017 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
24018         cat >> confdefs.h <<\EOF
24019 #define SLAPD_LDBM 1
24020 EOF
24021
24022         BUILD_SLAPD=yes
24023         BUILD_LDBM=yes
24024         if test "$ol_with_ldbm_module" != static ; then
24025                 cat >> confdefs.h <<\EOF
24026 #define SLAPD_LDBM_DYNAMIC 1
24027 EOF
24028
24029                 BUILD_LDBM=mod
24030                 BUILD_LDBM_DYNAMIC=shared
24031                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
24032         else
24033                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
24034         fi
24035 fi
24036
24037 if test "$ol_enable_meta" != no ; then
24038         if test "$ol_enable_ldap" = no ; then
24039                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
24040         fi
24041         if test "$ol_enable_rewrite" = no ; then
24042                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
24043         fi
24044         cat >> confdefs.h <<\EOF
24045 #define SLAPD_META 1
24046 EOF
24047
24048         BUILD_SLAPD=yes
24049         BUILD_META=yes
24050         BUILD_REWRITE=yes
24051         if test $ol_enable_ldbm = yes -o \
24052                 $ol_enable_bdb = yes ; then 
24053                 BUILD_CACHE=yes
24054         fi
24055         if test "$ol_with_meta_module" != static ; then
24056                 cat >> confdefs.h <<\EOF
24057 #define SLAPD_META_DYNAMIC 1
24058 EOF
24059
24060                 BUILD_META=mod
24061                 BUILD_META_DYNAMIC=shared
24062                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
24063         else
24064                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
24065         fi
24066 fi
24067
24068 if test "$ol_enable_monitor" != no ; then
24069         cat >> confdefs.h <<\EOF
24070 #define SLAPD_MONITOR 1
24071 EOF
24072
24073         BUILD_SLAPD=yes
24074         BUILD_MONITOR=yes
24075         if test "$ol_with_monitor_module" != static ; then
24076                 cat >> confdefs.h <<\EOF
24077 #define SLAPD_MONITOR_DYNAMIC 1
24078 EOF
24079
24080                 BUILD_MONITOR=mod
24081                 BUILD_MONITOR_DYNAMIC=shared
24082                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
24083         else
24084                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
24085         fi
24086 fi
24087
24088 if test "$ol_enable_null" != no ; then
24089         cat >> confdefs.h <<\EOF
24090 #define SLAPD_NULL 1
24091 EOF
24092
24093         BUILD_SLAPD=yes
24094         BUILD_NULL=yes
24095         if test "$ol_with_null_module" != static ; then
24096                 cat >> confdefs.h <<\EOF
24097 #define SLAPD_NULL_DYNAMIC 1
24098 EOF
24099
24100                 BUILD_NULL=mod
24101                 BUILD_NULL_DYNAMIC=shared
24102                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
24103         else
24104                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
24105         fi
24106 fi
24107
24108 if test "$ol_enable_passwd" != no ; then
24109         cat >> confdefs.h <<\EOF
24110 #define SLAPD_PASSWD 1
24111 EOF
24112
24113         BUILD_SLAPD=yes
24114         BUILD_PASSWD=yes
24115         if test "$ol_with_passwd_module" != static ; then
24116                 cat >> confdefs.h <<\EOF
24117 #define SLAPD_PASSWD_DYNAMIC 1
24118 EOF
24119
24120                 BUILD_PASSWD=mod
24121                 BUILD_PASSWD_DYNAMIC=shared
24122                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
24123         else
24124                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
24125         fi
24126 fi
24127
24128 if test "$ol_link_perl" != no ; then
24129         cat >> confdefs.h <<\EOF
24130 #define SLAPD_PERL 1
24131 EOF
24132
24133         BUILD_SLAPD=yes
24134         BUILD_PERL=yes
24135         if test "$ol_with_perl_module" != static ; then
24136                 cat >> confdefs.h <<\EOF
24137 #define SLAPD_PERL_DYNAMIC 1
24138 EOF
24139
24140                 BUILD_PERL=mod
24141                 BUILD_PERL_DYNAMIC=shared
24142                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
24143         else
24144                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
24145         fi
24146 fi
24147
24148 if test "$ol_enable_shell" != no ; then
24149         if test "$ol_link_thread" != no ; then
24150                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
24151         fi
24152         cat >> confdefs.h <<\EOF
24153 #define SLAPD_SHELL 1
24154 EOF
24155
24156         BUILD_SLAPD=yes
24157         BUILD_SHELL=yes
24158         if test "$ol_with_shell_module" != static ; then
24159                 cat >> confdefs.h <<\EOF
24160 #define SLAPD_SHELL_DYNAMIC 1
24161 EOF
24162
24163                 BUILD_SHELL=mod
24164                 BUILD_SHELL_DYNAMIC=shared
24165                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
24166         else
24167                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
24168         fi
24169 fi
24170
24171 if test "$ol_enable_tcl" != no ; then
24172         cat >> confdefs.h <<\EOF
24173 #define SLAPD_TCL 1
24174 EOF
24175
24176         BUILD_SLAPD=yes
24177         BUILD_TCL=yes
24178         if test "$ol_with_tcl_module" != static; then
24179                 cat >> confdefs.h <<\EOF
24180 #define SLAPD_TCL_DYNAMIC 1
24181 EOF
24182
24183                 BUILD_TCL=mod
24184                 BUILD_TCL_DYNAMIC=shared
24185                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
24186         else
24187                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
24188         fi
24189 fi
24190
24191 if test "$ol_link_sql" != no ; then
24192         cat >> confdefs.h <<\EOF
24193 #define SLAPD_SQL 1
24194 EOF
24195
24196         BUILD_SLAPD=yes
24197         BUILD_SQL=yes
24198         if test "$ol_with_sql_module" != static; then
24199                 cat >> confdefs.h <<\EOF
24200 #define SLAPD_SQL_DYNAMIC 1
24201 EOF
24202
24203                 BUILD_SQL=mod
24204                 BUILD_SQL_DYNAMIC=shared
24205                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
24206         else
24207                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
24208         fi
24209 fi
24210
24211 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
24212         $BUILD_SLAPD = yes ; then
24213         BUILD_SLURPD=yes
24214 fi
24215
24216 if test "$ol_enable_rewrite" != no ; then
24217         cat >> confdefs.h <<\EOF
24218 #define ENABLE_REWRITE 1
24219 EOF
24220
24221         BUILD_REWRITE=yes
24222 fi
24223
24224 if test "$ol_enable_slapi" != no ; then
24225         cat >> confdefs.h <<\EOF
24226 #define ENABLE_SLAPI 1
24227 EOF
24228
24229         BUILD_SLAPI=yes
24230         SLAPD_SLAPI_DEPEND=libslapi.a
24231 fi
24232
24233
24234
24235 if test "$ac_cv_mingw32" = yes ; then
24236         PLAT=NT
24237         SLAPD_MODULES_LDFLAGS=
24238 else
24239         PLAT=UNIX
24240 fi
24241
24242 if test -z "$SLAPD_STATIC_BACKENDS"; then
24243         SLAPD_NO_STATIC='#'
24244 else
24245         SLAPD_NO_STATIC=
24246 fi
24247
24248
24249
24250
24251
24252
24253
24254   
24255   
24256   
24257   
24258   
24259   
24260   
24261   
24262   
24263   
24264   
24265   
24266   
24267   
24268   
24269   
24270   
24271   
24272   
24273   
24274   
24275   
24276   
24277   
24278   
24279   
24280   
24281   
24282   
24283
24284
24285
24286
24287
24288
24289
24290
24291
24292
24293
24294
24295
24296
24297
24298
24299
24300
24301
24302
24303
24304
24305
24306
24307
24308
24309
24310
24311
24312
24313
24314
24315
24316
24317
24318
24319
24320
24321
24322 # Check whether --with-xxinstall or --without-xxinstall was given.
24323 if test "${with_xxinstall+set}" = set; then
24324   withval="$with_xxinstall"
24325   :
24326 fi
24327
24328
24329
24330 trap '' 1 2 15
24331
24332 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24333
24334 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24335 # Let make expand exec_prefix.
24336 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24337
24338 # Any assignment to VPATH causes Sun make to only execute
24339 # the first set of double-colon rules, so remove it if not needed.
24340 # If there is a colon in the path, we need to keep it.
24341 if test "x$srcdir" = x.; then
24342   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24343 fi
24344
24345 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24346
24347 DEFS=-DHAVE_CONFIG_H
24348
24349 # Without the "./", some shells look in PATH for config.status.
24350 : ${CONFIG_STATUS=./config.status}
24351
24352 echo creating $CONFIG_STATUS
24353 rm -f $CONFIG_STATUS
24354 cat > $CONFIG_STATUS <<EOF
24355 #! /bin/sh
24356 # Generated automatically by configure.
24357 # Run this file to recreate the current configuration.
24358 # This directory was configured as follows,
24359 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24360 #
24361 # $0 $ac_configure_args
24362 #
24363 # Compiler output produced by configure, useful for debugging
24364 # configure, is in ./config.log if it exists.
24365
24366 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24367 for ac_option
24368 do
24369   case "\$ac_option" in
24370   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24371     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24372     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24373   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24374     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24375     exit 0 ;;
24376   -help | --help | --hel | --he | --h)
24377     echo "\$ac_cs_usage"; exit 0 ;;
24378   *) echo "\$ac_cs_usage"; exit 1 ;;
24379   esac
24380 done
24381
24382 ac_given_srcdir=$srcdir
24383 ac_given_INSTALL="$INSTALL"
24384
24385 trap 'rm -fr `echo "\
24386 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24387 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24388 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24389 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24390 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24391 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24392 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24393 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24394 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24395 include/Makefile:build/top.mk:include/Makefile.in \
24396 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24397 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24398 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24399 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24400 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24401 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24402 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24403 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24404 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24405 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24406 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24407 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24408 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24409 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24410 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24411 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24412 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24413 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24414 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24415 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24416 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24417 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
24418 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24419 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24420 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24421 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24422 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24423 tests/run \
24424 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24425  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24426 EOF
24427 cat >> $CONFIG_STATUS <<EOF
24428
24429 # Protect against being on the right side of a sed subst in config.status.
24430 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24431  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24432 $ac_vpsub
24433 $extrasub
24434 s%@SHELL@%$SHELL%g
24435 s%@CFLAGS@%$CFLAGS%g
24436 s%@CPPFLAGS@%$CPPFLAGS%g
24437 s%@CXXFLAGS@%$CXXFLAGS%g
24438 s%@FFLAGS@%$FFLAGS%g
24439 s%@DEFS@%$DEFS%g
24440 s%@LDFLAGS@%$LDFLAGS%g
24441 s%@LIBS@%$LIBS%g
24442 s%@exec_prefix@%$exec_prefix%g
24443 s%@prefix@%$prefix%g
24444 s%@program_transform_name@%$program_transform_name%g
24445 s%@bindir@%$bindir%g
24446 s%@sbindir@%$sbindir%g
24447 s%@libexecdir@%$libexecdir%g
24448 s%@datadir@%$datadir%g
24449 s%@sysconfdir@%$sysconfdir%g
24450 s%@sharedstatedir@%$sharedstatedir%g
24451 s%@localstatedir@%$localstatedir%g
24452 s%@libdir@%$libdir%g
24453 s%@includedir@%$includedir%g
24454 s%@oldincludedir@%$oldincludedir%g
24455 s%@infodir@%$infodir%g
24456 s%@mandir@%$mandir%g
24457 s%@host@%$host%g
24458 s%@host_alias@%$host_alias%g
24459 s%@host_cpu@%$host_cpu%g
24460 s%@host_vendor@%$host_vendor%g
24461 s%@host_os@%$host_os%g
24462 s%@target@%$target%g
24463 s%@target_alias@%$target_alias%g
24464 s%@target_cpu@%$target_cpu%g
24465 s%@target_vendor@%$target_vendor%g
24466 s%@target_os@%$target_os%g
24467 s%@build@%$build%g
24468 s%@build_alias@%$build_alias%g
24469 s%@build_cpu@%$build_cpu%g
24470 s%@build_vendor@%$build_vendor%g
24471 s%@build_os@%$build_os%g
24472 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24473 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24474 s%@INSTALL_DATA@%$INSTALL_DATA%g
24475 s%@PACKAGE@%$PACKAGE%g
24476 s%@VERSION@%$VERSION%g
24477 s%@ACLOCAL@%$ACLOCAL%g
24478 s%@AUTOCONF@%$AUTOCONF%g
24479 s%@AUTOMAKE@%$AUTOMAKE%g
24480 s%@AUTOHEADER@%$AUTOHEADER%g
24481 s%@MAKEINFO@%$MAKEINFO%g
24482 s%@install_sh@%$install_sh%g
24483 s%@AMTAR@%$AMTAR%g
24484 s%@AWK@%$AWK%g
24485 s%@AMTARFLAGS@%$AMTARFLAGS%g
24486 s%@SET_MAKE@%$SET_MAKE%g
24487 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24488 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24489 s%@top_builddir@%$top_builddir%g
24490 s%@ldap_subdir@%$ldap_subdir%g
24491 s%@CC@%$CC%g
24492 s%@AR@%$AR%g
24493 s%@LN_S@%$LN_S%g
24494 s%@OBJEXT@%$OBJEXT%g
24495 s%@EXEEXT@%$EXEEXT%g
24496 s%@ECHO@%$ECHO%g
24497 s%@RANLIB@%$RANLIB%g
24498 s%@STRIP@%$STRIP%g
24499 s%@DLLTOOL@%$DLLTOOL%g
24500 s%@AS@%$AS%g
24501 s%@OBJDUMP@%$OBJDUMP%g
24502 s%@CPP@%$CPP%g
24503 s%@LIBTOOL@%$LIBTOOL%g
24504 s%@LN_H@%$LN_H%g
24505 s%@PERLBIN@%$PERLBIN%g
24506 s%@OL_MKDEP@%$OL_MKDEP%g
24507 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24508 s%@LTSTATIC@%$LTSTATIC%g
24509 s%@LIBOBJS@%$LIBOBJS%g
24510 s%@LIBSRCS@%$LIBSRCS%g
24511 s%@PLAT@%$PLAT%g
24512 s%@WITH_TLS@%$WITH_TLS%g
24513 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24514 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24515 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24516 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24517 s%@BUILD_BDB@%$BUILD_BDB%g
24518 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24519 s%@BUILD_HDB@%$BUILD_HDB%g
24520 s%@BUILD_LDAP@%$BUILD_LDAP%g
24521 s%@BUILD_LDBM@%$BUILD_LDBM%g
24522 s%@BUILD_META@%$BUILD_META%g
24523 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24524 s%@BUILD_CACHE@%$BUILD_CACHE%g
24525 s%@BUILD_NULL@%$BUILD_NULL%g
24526 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24527 s%@BUILD_PERL@%$BUILD_PERL%g
24528 s%@BUILD_SHELL@%$BUILD_SHELL%g
24529 s%@BUILD_SQL@%$BUILD_SQL%g
24530 s%@BUILD_TCL@%$BUILD_TCL%g
24531 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
24532 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
24533 s%@BUILD_HDB_DYNAMIC@%$BUILD_HDB_DYNAMIC%g
24534 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
24535 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
24536 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
24537 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
24538 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
24539 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
24540 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
24541 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
24542 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
24543 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
24544 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24545 s%@LDAP_LIBS@%$LDAP_LIBS%g
24546 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24547 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24548 s%@LDBM_LIBS@%$LDBM_LIBS%g
24549 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24550 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24551 s%@WRAP_LIBS@%$WRAP_LIBS%g
24552 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
24553 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24554 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24555 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24556 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24557 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24558 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24559 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24560 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24561 s%@KRB4_LIBS@%$KRB4_LIBS%g
24562 s%@KRB5_LIBS@%$KRB5_LIBS%g
24563 s%@SASL_LIBS@%$SASL_LIBS%g
24564 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
24565 s%@TLS_LIBS@%$TLS_LIBS%g
24566 s%@MODULES_LIBS@%$MODULES_LIBS%g
24567 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24568 s%@LIBSLAPI@%$LIBSLAPI%g
24569 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24570 s%@AUTH_LIBS@%$AUTH_LIBS%g
24571 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24572 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24573 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24574 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24575
24576 CEOF
24577 EOF
24578
24579 cat >> $CONFIG_STATUS <<\EOF
24580
24581 # Split the substitutions into bite-sized pieces for seds with
24582 # small command number limits, like on Digital OSF/1 and HP-UX.
24583 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24584 ac_file=1 # Number of current file.
24585 ac_beg=1 # First line for current file.
24586 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24587 ac_more_lines=:
24588 ac_sed_cmds=""
24589 while $ac_more_lines; do
24590   if test $ac_beg -gt 1; then
24591     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24592   else
24593     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24594   fi
24595   if test ! -s conftest.s$ac_file; then
24596     ac_more_lines=false
24597     rm -f conftest.s$ac_file
24598   else
24599     if test -z "$ac_sed_cmds"; then
24600       ac_sed_cmds="sed -f conftest.s$ac_file"
24601     else
24602       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24603     fi
24604     ac_file=`expr $ac_file + 1`
24605     ac_beg=$ac_end
24606     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24607   fi
24608 done
24609 if test -z "$ac_sed_cmds"; then
24610   ac_sed_cmds=cat
24611 fi
24612 EOF
24613
24614 cat >> $CONFIG_STATUS <<EOF
24615
24616 CONFIG_FILES=\${CONFIG_FILES-"\
24617 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24618 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24619 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24620 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24621 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24622 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24623 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24624 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24625 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24626 include/Makefile:build/top.mk:include/Makefile.in \
24627 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24628 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24629 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24630 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24631 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24632 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24633 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24634 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24635 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24636 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24637 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24638 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24639 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24640 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24641 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24642 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24643 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24644 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24645 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24646 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24647 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24648 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
24649 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24650 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24651 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
24652 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24653 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24654 tests/run \
24655 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24656 "}
24657 EOF
24658 cat >> $CONFIG_STATUS <<\EOF
24659 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24660   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24661   case "$ac_file" in
24662   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24663        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24664   *) ac_file_in="${ac_file}.in" ;;
24665   esac
24666
24667   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24668
24669   # Remove last slash and all that follows it.  Not all systems have dirname.
24670   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24671   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24672     # The file is in a subdirectory.
24673     test ! -d "$ac_dir" && mkdir "$ac_dir"
24674     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24675     # A "../" for each directory in $ac_dir_suffix.
24676     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24677   else
24678     ac_dir_suffix= ac_dots=
24679   fi
24680
24681   case "$ac_given_srcdir" in
24682   .)  srcdir=.
24683       if test -z "$ac_dots"; then top_srcdir=.
24684       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24685   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24686   *) # Relative path.
24687     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24688     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24689   esac
24690
24691   case "$ac_given_INSTALL" in
24692   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24693   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24694   esac
24695
24696   echo creating "$ac_file"
24697   rm -f "$ac_file"
24698   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24699   case "$ac_file" in
24700   *[Mm]akefile*) ac_comsub="1i\\
24701 # $configure_input" ;;
24702   *) ac_comsub= ;;
24703   esac
24704
24705   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24706   sed -e "$ac_comsub
24707 s%@configure_input@%$configure_input%g
24708 s%@srcdir@%$srcdir%g
24709 s%@top_srcdir@%$top_srcdir%g
24710 s%@INSTALL@%$INSTALL%g
24711 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24712 fi; done
24713 rm -f conftest.s*
24714
24715 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24716 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24717 #
24718 # ac_d sets the value in "#define NAME VALUE" lines.
24719 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24720 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24721 ac_dC='\3'
24722 ac_dD='%g'
24723 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24724 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24725 ac_uB='\([      ]\)%\1#\2define\3'
24726 ac_uC=' '
24727 ac_uD='\4%g'
24728 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24729 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24730 ac_eB='$%\1#\2define\3'
24731 ac_eC=' '
24732 ac_eD='%g'
24733
24734 if test "${CONFIG_HEADERS+set}" != set; then
24735 EOF
24736 cat >> $CONFIG_STATUS <<EOF
24737   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24738 EOF
24739 cat >> $CONFIG_STATUS <<\EOF
24740 fi
24741 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24742   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24743   case "$ac_file" in
24744   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24745        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24746   *) ac_file_in="${ac_file}.in" ;;
24747   esac
24748
24749   echo creating $ac_file
24750
24751   rm -f conftest.frag conftest.in conftest.out
24752   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24753   cat $ac_file_inputs > conftest.in
24754
24755 EOF
24756
24757 # Transform confdefs.h into a sed script conftest.vals that substitutes
24758 # the proper values into config.h.in to produce config.h.  And first:
24759 # Protect against being on the right side of a sed subst in config.status.
24760 # Protect against being in an unquoted here document in config.status.
24761 rm -f conftest.vals
24762 cat > conftest.hdr <<\EOF
24763 s/[\\&%]/\\&/g
24764 s%[\\$`]%\\&%g
24765 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24766 s%ac_d%ac_u%gp
24767 s%ac_u%ac_e%gp
24768 EOF
24769 sed -n -f conftest.hdr confdefs.h > conftest.vals
24770 rm -f conftest.hdr
24771
24772 # This sed command replaces #undef with comments.  This is necessary, for
24773 # example, in the case of _POSIX_SOURCE, which is predefined and required
24774 # on some systems where configure will not decide to define it.
24775 cat >> conftest.vals <<\EOF
24776 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24777 EOF
24778
24779 # Break up conftest.vals because some shells have a limit on
24780 # the size of here documents, and old seds have small limits too.
24781
24782 rm -f conftest.tail
24783 while :
24784 do
24785   ac_lines=`grep -c . conftest.vals`
24786   # grep -c gives empty output for an empty file on some AIX systems.
24787   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24788   # Write a limited-size here document to conftest.frag.
24789   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24790   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24791   echo 'CEOF
24792   sed -f conftest.frag conftest.in > conftest.out
24793   rm -f conftest.in
24794   mv conftest.out conftest.in
24795 ' >> $CONFIG_STATUS
24796   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24797   rm -f conftest.vals
24798   mv conftest.tail conftest.vals
24799 done
24800 rm -f conftest.vals
24801
24802 cat >> $CONFIG_STATUS <<\EOF
24803   rm -f conftest.frag conftest.h
24804   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24805   cat conftest.in >> conftest.h
24806   rm -f conftest.in
24807   if cmp -s $ac_file conftest.h 2>/dev/null; then
24808     echo "$ac_file is unchanged"
24809     rm -f conftest.h
24810   else
24811     # Remove last slash and all that follows it.  Not all systems have dirname.
24812       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24813       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24814       # The file is in a subdirectory.
24815       test ! -d "$ac_dir" && mkdir "$ac_dir"
24816     fi
24817     rm -f $ac_file
24818     mv conftest.h $ac_file
24819   fi
24820 fi; done
24821
24822 EOF
24823 cat >> $CONFIG_STATUS <<EOF
24824
24825 EOF
24826 cat >> $CONFIG_STATUS <<\EOF
24827
24828 chmod +x tests/run
24829 date > stamp-h
24830 echo Please run \"make depend\" to build dependencies
24831
24832 exit 0
24833 EOF
24834 chmod +x $CONFIG_STATUS
24835 rm -fr confdefs* $ac_clean_files
24836 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24837