]> git.sur5r.net Git - openldap/blob - configure
release syncinfo mem upon syncrepl failure as well as shutdown
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.543 2004/06/19 08:00:25 ando Exp  
4
5 # This work is part of OpenLDAP Software <http://www.openldap.org/>.
6 #
7 # Copyright 1998-2004 The OpenLDAP Foundation.
8 # All rights reserved.
9 #
10 # Redistribution and use in source and binary forms, with or without
11 # modification, are permitted only as authorized by the OpenLDAP
12 # Public License.
13 #
14 # A copy of this license is available in the file LICENSE in the
15 # top-level directory of the distribution or, alternatively, at
16 # <http://www.OpenLDAP.org/license.html>.
17
18 echo "Copyright 1998-2004 The OpenLDAP Foundation. All rights reserved."
19 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
20
21 # Guess values for system-dependent variables and create Makefiles.
22 # Generated automatically using autoconf version 2.13.1 
23 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
24 #
25 # This configure script is free software; the Free Software Foundation
26 # gives unlimited permission to copy, distribute and modify it.
27
28 # Defaults:
29 ac_help=
30 ac_default_prefix=/usr/local
31 # Any additions from configure.in:
32 ac_default_prefix=/usr/local
33 ac_help="$ac_help
34   --with-subdir=DIR       change default subdirectory used for installs"
35 ac_help="$ac_help
36   --enable-debug          enable debugging [yes]"
37 ac_help="$ac_help
38   --enable-dynamic        enable linking built binaries with dynamic libs [no]"
39 ac_help="$ac_help
40   --enable-syslog         enable syslog support [auto]"
41 ac_help="$ac_help
42   --enable-proctitle      enable proctitle support [yes]"
43 ac_help="$ac_help
44   --enable-ipv6           enable IPv6 support [auto]"
45 ac_help="$ac_help
46   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
47 ac_help="$ac_help
48   --with-cyrus-sasl       with Cyrus SASL support [auto]"
49 ac_help="$ac_help
50   --with-fetch            with fetch(3) URL support [auto]"
51 ac_help="$ac_help
52   --with-threads          with threads [auto]"
53 ac_help="$ac_help
54   --with-tls              with TLS/SSL support [auto]"
55 ac_help="$ac_help
56   --with-yielding-select  with implicitly yielding select [auto]"
57 ac_help="$ac_help
58
59 SLAPD (Standalone LDAP Daemon) Options:"
60 ac_help="$ac_help
61   --enable-slapd          enable building slapd [yes]"
62 ac_help="$ac_help
63     --enable-aci          enable per-object ACIs (experimental) [no]"
64 ac_help="$ac_help
65     --enable-cleartext    enable cleartext passwords [yes]"
66 ac_help="$ac_help
67     --enable-crypt        enable crypt(3) passwords [no]"
68 ac_help="$ac_help
69     --enable-lmpasswd     enable LAN Manager passwords [no]"
70 ac_help="$ac_help
71     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
72 ac_help="$ac_help
73     --enable-modules      enable dynamic module support [no]"
74 ac_help="$ac_help
75     --enable-rewrite      enable DN rewriting in back-ldap and the rwm overlay [auto]"
76 ac_help="$ac_help
77     --enable-rlookups     enable reverse lookups of client hostnames [no]"
78 ac_help="$ac_help
79     --enable-slapi        enable SLAPI support (experimental) [no]"
80 ac_help="$ac_help
81     --enable-slp          enable SLPv2 support [no]"
82 ac_help="$ac_help
83     --enable-wrappers     enable tcp wrapper support [no]"
84 ac_help="$ac_help
85
86 SLAPD Backend Options:"
87 ac_help="$ac_help
88     --enable-backends     enable all available backends no|yes|mod [no]"
89 ac_help="$ac_help
90     --enable-bdb          enable Berkeley DB backend no|yes|mod [yes]"
91 ac_help="$ac_help
92     --enable-dnssrv       enable dnssrv backend no|yes|mod [no]"
93 ac_help="$ac_help
94     --enable-hdb          enable Hierarchical DB backend no|yes|mod [no]"
95 ac_help="$ac_help
96     --enable-ldap         enable ldap backend no|yes|mod [no]"
97 ac_help="$ac_help
98     --enable-ldbm         enable ldbm backend no|yes|mod [no]"
99 ac_help="$ac_help
100       --with-ldbm-api     with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
101 ac_help="$ac_help
102       --with-ldbm-type    use LDBM type auto|btree|hash [auto]"
103 ac_help="$ac_help
104     --enable-meta         enable metadirectory backend no|yes|mod [no]"
105 ac_help="$ac_help
106     --enable-monitor      enable monitor backend no|yes|mod [yes]"
107 ac_help="$ac_help
108     --enable-null         enable null backend no|yes|mod [no]"
109 ac_help="$ac_help
110     --enable-passwd       enable passwd backend no|yes|mod [no]"
111 ac_help="$ac_help
112     --enable-perl         enable perl backend no|yes|mod [no]"
113 ac_help="$ac_help
114     --enable-relay        enable relay backend no|yes|mod [yes]"
115 ac_help="$ac_help
116     --enable-shell        enable shell backend no|yes|mod [no]"
117 ac_help="$ac_help
118     --enable-sql          enable sql backend no|yes|mod [no]"
119 ac_help="$ac_help
120
121 SLAPD Overlay Options:"
122 ac_help="$ac_help
123     --enable-overlays     enable all available overlays no|yes|mod [no]"
124 ac_help="$ac_help
125     --enable-chain        LDAP Chain Response no|yes|mod [no]"
126 ac_help="$ac_help
127     --enable-denyop       Deny Operation overlay no|yes|mod [no]"
128 ac_help="$ac_help
129     --enable-dyngroup     Dynamic Group overlay no|yes|mod [no]"
130 ac_help="$ac_help
131     --enable-lastmod      Last Modification overlay no|yes|mod [no]"
132 ac_help="$ac_help
133     --enable-ppolicy      Password Policy overlay no|yes|mod [no]"
134 ac_help="$ac_help
135     --enable-proxycache   Proxy Cache overlay no|yes|mod [no]"
136 ac_help="$ac_help
137     --enable-refint       Referential Integrity overlay no|yes|mod [no]"
138 ac_help="$ac_help
139     --enable-rwm          Rewrite/Remap overlay no|yes|mod [no]"
140 ac_help="$ac_help
141     --enable-unique       Attribute Uniqueness overlay no|yes|mod [no]"
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_LIBRELEASE=$OL_API_LIB_RELEASE
1366
1367 OPENLDAP_LIBVERSION=$OL_API_LIB_VERSION
1368
1369 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1370
1371
1372
1373 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1374 echo "configure:1375: checking configure arguments" >&5
1375
1376
1377 top_builddir=`pwd`
1378
1379 ldap_subdir="/openldap"
1380
1381 # Check whether --with-subdir or --without-subdir was given.
1382 if test "${with_subdir+set}" = set; then
1383   withval="$with_subdir"
1384   case "$withval" in
1385         no) ldap_subdir=""
1386                 ;;
1387         yes)
1388                 ;;
1389         /*|\\*)
1390                 ldap_subdir="$withval"
1391                 ;;
1392         *)
1393                 ldap_subdir="/$withval"
1394                 ;;
1395 esac
1396
1397 fi
1398
1399
1400 # OpenLDAP --enable-debug
1401         # Check whether --enable-debug or --disable-debug was given.
1402 if test "${enable_debug+set}" = set; then
1403   enableval="$enable_debug"
1404   
1405         ol_arg=invalid
1406         for ol_val in auto yes no ; do
1407                 if test "$enableval" = "$ol_val" ; then
1408                         ol_arg="$ol_val"
1409                 fi
1410         done
1411         if test "$ol_arg" = "invalid" ; then
1412                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1413         fi
1414         ol_enable_debug="$ol_arg"
1415
1416 else
1417         ol_enable_debug="yes"
1418 fi
1419 # end --enable-debug
1420 # OpenLDAP --enable-dynamic
1421         # Check whether --enable-dynamic or --disable-dynamic was given.
1422 if test "${enable_dynamic+set}" = set; then
1423   enableval="$enable_dynamic"
1424   
1425         ol_arg=invalid
1426         for ol_val in auto yes no ; do
1427                 if test "$enableval" = "$ol_val" ; then
1428                         ol_arg="$ol_val"
1429                 fi
1430         done
1431         if test "$ol_arg" = "invalid" ; then
1432                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1433         fi
1434         ol_enable_dynamic="$ol_arg"
1435
1436 else
1437         ol_enable_dynamic="no"
1438 fi
1439 # end --enable-dynamic
1440 # OpenLDAP --enable-syslog
1441         # Check whether --enable-syslog or --disable-syslog was given.
1442 if test "${enable_syslog+set}" = set; then
1443   enableval="$enable_syslog"
1444   
1445         ol_arg=invalid
1446         for ol_val in auto yes no ; do
1447                 if test "$enableval" = "$ol_val" ; then
1448                         ol_arg="$ol_val"
1449                 fi
1450         done
1451         if test "$ol_arg" = "invalid" ; then
1452                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1453         fi
1454         ol_enable_syslog="$ol_arg"
1455
1456 else
1457         ol_enable_syslog="auto"
1458 fi
1459 # end --enable-syslog
1460 # OpenLDAP --enable-proctitle
1461         # Check whether --enable-proctitle or --disable-proctitle was given.
1462 if test "${enable_proctitle+set}" = set; then
1463   enableval="$enable_proctitle"
1464   
1465         ol_arg=invalid
1466         for ol_val in auto yes no ; do
1467                 if test "$enableval" = "$ol_val" ; then
1468                         ol_arg="$ol_val"
1469                 fi
1470         done
1471         if test "$ol_arg" = "invalid" ; then
1472                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1473         fi
1474         ol_enable_proctitle="$ol_arg"
1475
1476 else
1477         ol_enable_proctitle="yes"
1478 fi
1479 # end --enable-proctitle
1480 ol_enable_referrals=${ol_enable_referrals-no}
1481 ol_enable_kbind=${ol_enable_kbind-no}
1482 # OpenLDAP --enable-ipv6
1483         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1484 if test "${enable_ipv6+set}" = set; then
1485   enableval="$enable_ipv6"
1486   
1487         ol_arg=invalid
1488         for ol_val in auto yes no ; do
1489                 if test "$enableval" = "$ol_val" ; then
1490                         ol_arg="$ol_val"
1491                 fi
1492         done
1493         if test "$ol_arg" = "invalid" ; then
1494                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1495         fi
1496         ol_enable_ipv6="$ol_arg"
1497
1498 else
1499         ol_enable_ipv6="auto"
1500 fi
1501 # end --enable-ipv6
1502 # OpenLDAP --enable-local
1503         # Check whether --enable-local or --disable-local was given.
1504 if test "${enable_local+set}" = set; then
1505   enableval="$enable_local"
1506   
1507         ol_arg=invalid
1508         for ol_val in auto yes no ; do
1509                 if test "$enableval" = "$ol_val" ; then
1510                         ol_arg="$ol_val"
1511                 fi
1512         done
1513         if test "$ol_arg" = "invalid" ; then
1514                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1515         fi
1516         ol_enable_local="$ol_arg"
1517
1518 else
1519         ol_enable_local="auto"
1520 fi
1521 # end --enable-local
1522
1523
1524 # OpenLDAP --with-cyrus_sasl
1525         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1526 if test "${with_cyrus_sasl+set}" = set; then
1527   withval="$with_cyrus_sasl"
1528   
1529         ol_arg=invalid
1530         for ol_val in auto yes no  ; do
1531                 if test "$withval" = "$ol_val" ; then
1532                         ol_arg="$ol_val"
1533                 fi
1534         done
1535         if test "$ol_arg" = "invalid" ; then
1536                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1537         fi
1538         ol_with_cyrus_sasl="$ol_arg"
1539
1540 else
1541         ol_with_cyrus_sasl="auto"
1542 fi
1543 # end --with-cyrus_sasl
1544
1545 # OpenLDAP --with-fetch
1546         # Check whether --with-fetch or --without-fetch was given.
1547 if test "${with_fetch+set}" = set; then
1548   withval="$with_fetch"
1549   
1550         ol_arg=invalid
1551         for ol_val in auto yes no  ; do
1552                 if test "$withval" = "$ol_val" ; then
1553                         ol_arg="$ol_val"
1554                 fi
1555         done
1556         if test "$ol_arg" = "invalid" ; then
1557                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1558         fi
1559         ol_with_fetch="$ol_arg"
1560
1561 else
1562         ol_with_fetch="auto"
1563 fi
1564 # end --with-fetch
1565
1566 ol_with_kerberos=${ol_with_kerberos-auto}
1567 # OpenLDAP --with-threads
1568         # Check whether --with-threads or --without-threads was given.
1569 if test "${with_threads+set}" = set; then
1570   withval="$with_threads"
1571   
1572         ol_arg=invalid
1573         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1574                 if test "$withval" = "$ol_val" ; then
1575                         ol_arg="$ol_val"
1576                 fi
1577         done
1578         if test "$ol_arg" = "invalid" ; then
1579                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1580         fi
1581         ol_with_threads="$ol_arg"
1582
1583 else
1584         ol_with_threads="auto"
1585 fi
1586 # end --with-threads
1587
1588 # OpenLDAP --with-tls
1589         # Check whether --with-tls or --without-tls was given.
1590 if test "${with_tls+set}" = set; then
1591   withval="$with_tls"
1592   
1593         ol_arg=invalid
1594         for ol_val in auto ssleay openssl yes no  ; do
1595                 if test "$withval" = "$ol_val" ; then
1596                         ol_arg="$ol_val"
1597                 fi
1598         done
1599         if test "$ol_arg" = "invalid" ; then
1600                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1601         fi
1602         ol_with_tls="$ol_arg"
1603
1604 else
1605         ol_with_tls="auto"
1606 fi
1607 # end --with-tls
1608
1609 # OpenLDAP --with-yielding_select
1610         # Check whether --with-yielding_select or --without-yielding_select was given.
1611 if test "${with_yielding_select+set}" = set; then
1612   withval="$with_yielding_select"
1613   
1614         ol_arg=invalid
1615         for ol_val in auto yes no manual  ; do
1616                 if test "$withval" = "$ol_val" ; then
1617                         ol_arg="$ol_val"
1618                 fi
1619         done
1620         if test "$ol_arg" = "invalid" ; then
1621                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1622         fi
1623         ol_with_yielding_select="$ol_arg"
1624
1625 else
1626         ol_with_yielding_select="auto"
1627 fi
1628 # end --with-yielding_select
1629
1630
1631
1632 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1633 if test "${with_xxslapdoptions+set}" = set; then
1634   withval="$with_xxslapdoptions"
1635   :
1636 fi
1637
1638 # OpenLDAP --enable-slapd
1639         # Check whether --enable-slapd or --disable-slapd was given.
1640 if test "${enable_slapd+set}" = set; then
1641   enableval="$enable_slapd"
1642   
1643         ol_arg=invalid
1644         for ol_val in auto yes no ; do
1645                 if test "$enableval" = "$ol_val" ; then
1646                         ol_arg="$ol_val"
1647                 fi
1648         done
1649         if test "$ol_arg" = "invalid" ; then
1650                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1651         fi
1652         ol_enable_slapd="$ol_arg"
1653
1654 else
1655         ol_enable_slapd="yes"
1656 fi
1657 # end --enable-slapd
1658 # OpenLDAP --enable-aci
1659         # Check whether --enable-aci or --disable-aci was given.
1660 if test "${enable_aci+set}" = set; then
1661   enableval="$enable_aci"
1662   
1663         ol_arg=invalid
1664         for ol_val in auto yes no ; do
1665                 if test "$enableval" = "$ol_val" ; then
1666                         ol_arg="$ol_val"
1667                 fi
1668         done
1669         if test "$ol_arg" = "invalid" ; then
1670                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1671         fi
1672         ol_enable_aci="$ol_arg"
1673
1674 else
1675         ol_enable_aci="no"
1676 fi
1677 # end --enable-aci
1678 # OpenLDAP --enable-cleartext
1679         # Check whether --enable-cleartext or --disable-cleartext was given.
1680 if test "${enable_cleartext+set}" = set; then
1681   enableval="$enable_cleartext"
1682   
1683         ol_arg=invalid
1684         for ol_val in auto yes no ; do
1685                 if test "$enableval" = "$ol_val" ; then
1686                         ol_arg="$ol_val"
1687                 fi
1688         done
1689         if test "$ol_arg" = "invalid" ; then
1690                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1691         fi
1692         ol_enable_cleartext="$ol_arg"
1693
1694 else
1695         ol_enable_cleartext="yes"
1696 fi
1697 # end --enable-cleartext
1698 # OpenLDAP --enable-crypt
1699         # Check whether --enable-crypt or --disable-crypt was given.
1700 if test "${enable_crypt+set}" = set; then
1701   enableval="$enable_crypt"
1702   
1703         ol_arg=invalid
1704         for ol_val in auto yes no ; do
1705                 if test "$enableval" = "$ol_val" ; then
1706                         ol_arg="$ol_val"
1707                 fi
1708         done
1709         if test "$ol_arg" = "invalid" ; then
1710                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1711         fi
1712         ol_enable_crypt="$ol_arg"
1713
1714 else
1715         ol_enable_crypt="no"
1716 fi
1717 # end --enable-crypt
1718 # OpenLDAP --enable-lmpasswd
1719         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1720 if test "${enable_lmpasswd+set}" = set; then
1721   enableval="$enable_lmpasswd"
1722   
1723         ol_arg=invalid
1724         for ol_val in auto yes no ; do
1725                 if test "$enableval" = "$ol_val" ; then
1726                         ol_arg="$ol_val"
1727                 fi
1728         done
1729         if test "$ol_arg" = "invalid" ; then
1730                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1731         fi
1732         ol_enable_lmpasswd="$ol_arg"
1733
1734 else
1735         ol_enable_lmpasswd="no"
1736 fi
1737 # end --enable-lmpasswd
1738 # OpenLDAP --enable-spasswd
1739         # Check whether --enable-spasswd or --disable-spasswd was given.
1740 if test "${enable_spasswd+set}" = set; then
1741   enableval="$enable_spasswd"
1742   
1743         ol_arg=invalid
1744         for ol_val in auto yes no ; do
1745                 if test "$enableval" = "$ol_val" ; then
1746                         ol_arg="$ol_val"
1747                 fi
1748         done
1749         if test "$ol_arg" = "invalid" ; then
1750                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1751         fi
1752         ol_enable_spasswd="$ol_arg"
1753
1754 else
1755         ol_enable_spasswd="no"
1756 fi
1757 # end --enable-spasswd
1758 # OpenLDAP --enable-modules
1759         # Check whether --enable-modules or --disable-modules was given.
1760 if test "${enable_modules+set}" = set; then
1761   enableval="$enable_modules"
1762   
1763         ol_arg=invalid
1764         for ol_val in auto yes no ; do
1765                 if test "$enableval" = "$ol_val" ; then
1766                         ol_arg="$ol_val"
1767                 fi
1768         done
1769         if test "$ol_arg" = "invalid" ; then
1770                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1771         fi
1772         ol_enable_modules="$ol_arg"
1773
1774 else
1775         ol_enable_modules="no"
1776 fi
1777 # end --enable-modules
1778 ol_enable_multimaster=${ol_enable_multimaster-no}
1779 # OpenLDAP --enable-rewrite
1780         # Check whether --enable-rewrite or --disable-rewrite was given.
1781 if test "${enable_rewrite+set}" = set; then
1782   enableval="$enable_rewrite"
1783   
1784         ol_arg=invalid
1785         for ol_val in auto yes no ; do
1786                 if test "$enableval" = "$ol_val" ; then
1787                         ol_arg="$ol_val"
1788                 fi
1789         done
1790         if test "$ol_arg" = "invalid" ; then
1791                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1792         fi
1793         ol_enable_rewrite="$ol_arg"
1794
1795 else
1796         ol_enable_rewrite="auto"
1797 fi
1798 # end --enable-rewrite
1799 # OpenLDAP --enable-rlookups
1800         # Check whether --enable-rlookups or --disable-rlookups was given.
1801 if test "${enable_rlookups+set}" = set; then
1802   enableval="$enable_rlookups"
1803   
1804         ol_arg=invalid
1805         for ol_val in auto yes no ; do
1806                 if test "$enableval" = "$ol_val" ; then
1807                         ol_arg="$ol_val"
1808                 fi
1809         done
1810         if test "$ol_arg" = "invalid" ; then
1811                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1812         fi
1813         ol_enable_rlookups="$ol_arg"
1814
1815 else
1816         ol_enable_rlookups="no"
1817 fi
1818 # end --enable-rlookups
1819 # OpenLDAP --enable-slapi
1820         # Check whether --enable-slapi or --disable-slapi was given.
1821 if test "${enable_slapi+set}" = set; then
1822   enableval="$enable_slapi"
1823   
1824         ol_arg=invalid
1825         for ol_val in auto yes no ; do
1826                 if test "$enableval" = "$ol_val" ; then
1827                         ol_arg="$ol_val"
1828                 fi
1829         done
1830         if test "$ol_arg" = "invalid" ; then
1831                 { echo "configure: error: bad value $enableval for --enable-slapi" 1>&2; exit 1; }
1832         fi
1833         ol_enable_slapi="$ol_arg"
1834
1835 else
1836         ol_enable_slapi="no"
1837 fi
1838 # end --enable-slapi
1839 # OpenLDAP --enable-slp
1840         # Check whether --enable-slp or --disable-slp was given.
1841 if test "${enable_slp+set}" = set; then
1842   enableval="$enable_slp"
1843   
1844         ol_arg=invalid
1845         for ol_val in auto yes no ; do
1846                 if test "$enableval" = "$ol_val" ; then
1847                         ol_arg="$ol_val"
1848                 fi
1849         done
1850         if test "$ol_arg" = "invalid" ; then
1851                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1852         fi
1853         ol_enable_slp="$ol_arg"
1854
1855 else
1856         ol_enable_slp="no"
1857 fi
1858 # end --enable-slp
1859 # OpenLDAP --enable-wrappers
1860         # Check whether --enable-wrappers or --disable-wrappers was given.
1861 if test "${enable_wrappers+set}" = set; then
1862   enableval="$enable_wrappers"
1863   
1864         ol_arg=invalid
1865         for ol_val in auto yes no ; do
1866                 if test "$enableval" = "$ol_val" ; then
1867                         ol_arg="$ol_val"
1868                 fi
1869         done
1870         if test "$ol_arg" = "invalid" ; then
1871                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1872         fi
1873         ol_enable_wrappers="$ol_arg"
1874
1875 else
1876         ol_enable_wrappers="no"
1877 fi
1878 # end --enable-wrappers
1879
1880 Backends="bdb dnssrv hdb ldap ldbm meta monitor null \
1881         passwd perl relay shell sql"
1882
1883 # Check whether --with-xxslapbackends or --without-xxslapbackends was given.
1884 if test "${with_xxslapbackends+set}" = set; then
1885   withval="$with_xxslapbackends"
1886   :
1887 fi
1888
1889
1890 # OpenLDAP --enable-backends
1891         # Check whether --enable-backends or --disable-backends was given.
1892 if test "${enable_backends+set}" = set; then
1893   enableval="$enable_backends"
1894   
1895         ol_arg=invalid
1896         for ol_val in no yes mod ; do
1897                 if test "$enableval" = "$ol_val" ; then
1898                         ol_arg="$ol_val"
1899                 fi
1900         done
1901         if test "$ol_arg" = "invalid" ; then
1902                 { echo "configure: error: bad value $enableval for --enable-backends" 1>&2; exit 1; }
1903         fi
1904         ol_enable_backends="$ol_arg"
1905
1906 else
1907         ol_enable_backends="no"
1908 fi
1909 # end --enable-backends
1910 # OpenLDAP --enable-bdb
1911         # Check whether --enable-bdb or --disable-bdb was given.
1912 if test "${enable_bdb+set}" = set; then
1913   enableval="$enable_bdb"
1914   
1915         ol_arg=invalid
1916         for ol_val in no yes mod ; do
1917                 if test "$enableval" = "$ol_val" ; then
1918                         ol_arg="$ol_val"
1919                 fi
1920         done
1921         if test "$ol_arg" = "invalid" ; then
1922                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
1923         fi
1924         ol_enable_bdb="$ol_arg"
1925
1926 else
1927         ol_enable_bdb="yes"
1928 fi
1929 # end --enable-bdb
1930 # OpenLDAP --enable-dnssrv
1931         # Check whether --enable-dnssrv or --disable-dnssrv was given.
1932 if test "${enable_dnssrv+set}" = set; then
1933   enableval="$enable_dnssrv"
1934   
1935         ol_arg=invalid
1936         for ol_val in no yes mod ; do
1937                 if test "$enableval" = "$ol_val" ; then
1938                         ol_arg="$ol_val"
1939                 fi
1940         done
1941         if test "$ol_arg" = "invalid" ; then
1942                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
1943         fi
1944         ol_enable_dnssrv="$ol_arg"
1945
1946 else
1947         ol_enable_dnssrv="no"
1948 fi
1949 # end --enable-dnssrv
1950 # OpenLDAP --enable-hdb
1951         # Check whether --enable-hdb or --disable-hdb was given.
1952 if test "${enable_hdb+set}" = set; then
1953   enableval="$enable_hdb"
1954   
1955         ol_arg=invalid
1956         for ol_val in no yes mod ; do
1957                 if test "$enableval" = "$ol_val" ; then
1958                         ol_arg="$ol_val"
1959                 fi
1960         done
1961         if test "$ol_arg" = "invalid" ; then
1962                 { echo "configure: error: bad value $enableval for --enable-hdb" 1>&2; exit 1; }
1963         fi
1964         ol_enable_hdb="$ol_arg"
1965
1966 else
1967         ol_enable_hdb="no"
1968 fi
1969 # end --enable-hdb
1970 # OpenLDAP --enable-ldap
1971         # Check whether --enable-ldap or --disable-ldap was given.
1972 if test "${enable_ldap+set}" = set; then
1973   enableval="$enable_ldap"
1974   
1975         ol_arg=invalid
1976         for ol_val in no yes mod ; do
1977                 if test "$enableval" = "$ol_val" ; then
1978                         ol_arg="$ol_val"
1979                 fi
1980         done
1981         if test "$ol_arg" = "invalid" ; then
1982                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
1983         fi
1984         ol_enable_ldap="$ol_arg"
1985
1986 else
1987         ol_enable_ldap="no"
1988 fi
1989 # end --enable-ldap
1990 # OpenLDAP --enable-ldbm
1991         # Check whether --enable-ldbm or --disable-ldbm was given.
1992 if test "${enable_ldbm+set}" = set; then
1993   enableval="$enable_ldbm"
1994   
1995         ol_arg=invalid
1996         for ol_val in no yes mod ; do
1997                 if test "$enableval" = "$ol_val" ; then
1998                         ol_arg="$ol_val"
1999                 fi
2000         done
2001         if test "$ol_arg" = "invalid" ; then
2002                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2003         fi
2004         ol_enable_ldbm="$ol_arg"
2005
2006 else
2007         ol_enable_ldbm="no"
2008 fi
2009 # end --enable-ldbm
2010 # OpenLDAP --with-ldbm_api
2011         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2012 if test "${with_ldbm_api+set}" = set; then
2013   withval="$with_ldbm_api"
2014   
2015         ol_arg=invalid
2016         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2017                 if test "$withval" = "$ol_val" ; then
2018                         ol_arg="$ol_val"
2019                 fi
2020         done
2021         if test "$ol_arg" = "invalid" ; then
2022                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2023         fi
2024         ol_with_ldbm_api="$ol_arg"
2025
2026 else
2027         ol_with_ldbm_api="auto"
2028 fi
2029 # end --with-ldbm_api
2030
2031 # OpenLDAP --with-ldbm_type
2032         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2033 if test "${with_ldbm_type+set}" = set; then
2034   withval="$with_ldbm_type"
2035   
2036         ol_arg=invalid
2037         for ol_val in auto btree hash ; do
2038                 if test "$withval" = "$ol_val" ; then
2039                         ol_arg="$ol_val"
2040                 fi
2041         done
2042         if test "$ol_arg" = "invalid" ; then
2043                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2044         fi
2045         ol_with_ldbm_type="$ol_arg"
2046
2047 else
2048         ol_with_ldbm_type="auto"
2049 fi
2050 # end --with-ldbm_type
2051
2052 # OpenLDAP --enable-meta
2053         # Check whether --enable-meta or --disable-meta was given.
2054 if test "${enable_meta+set}" = set; then
2055   enableval="$enable_meta"
2056   
2057         ol_arg=invalid
2058         for ol_val in no yes mod ; do
2059                 if test "$enableval" = "$ol_val" ; then
2060                         ol_arg="$ol_val"
2061                 fi
2062         done
2063         if test "$ol_arg" = "invalid" ; then
2064                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2065         fi
2066         ol_enable_meta="$ol_arg"
2067
2068 else
2069         ol_enable_meta="no"
2070 fi
2071 # end --enable-meta
2072 # OpenLDAP --enable-monitor
2073         # Check whether --enable-monitor or --disable-monitor was given.
2074 if test "${enable_monitor+set}" = set; then
2075   enableval="$enable_monitor"
2076   
2077         ol_arg=invalid
2078         for ol_val in no yes mod ; do
2079                 if test "$enableval" = "$ol_val" ; then
2080                         ol_arg="$ol_val"
2081                 fi
2082         done
2083         if test "$ol_arg" = "invalid" ; then
2084                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2085         fi
2086         ol_enable_monitor="$ol_arg"
2087
2088 else
2089         ol_enable_monitor="yes"
2090 fi
2091 # end --enable-monitor
2092 # OpenLDAP --enable-null
2093         # Check whether --enable-null or --disable-null was given.
2094 if test "${enable_null+set}" = set; then
2095   enableval="$enable_null"
2096   
2097         ol_arg=invalid
2098         for ol_val in no yes mod ; do
2099                 if test "$enableval" = "$ol_val" ; then
2100                         ol_arg="$ol_val"
2101                 fi
2102         done
2103         if test "$ol_arg" = "invalid" ; then
2104                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2105         fi
2106         ol_enable_null="$ol_arg"
2107
2108 else
2109         ol_enable_null="no"
2110 fi
2111 # end --enable-null
2112 # OpenLDAP --enable-passwd
2113         # Check whether --enable-passwd or --disable-passwd was given.
2114 if test "${enable_passwd+set}" = set; then
2115   enableval="$enable_passwd"
2116   
2117         ol_arg=invalid
2118         for ol_val in no yes mod ; do
2119                 if test "$enableval" = "$ol_val" ; then
2120                         ol_arg="$ol_val"
2121                 fi
2122         done
2123         if test "$ol_arg" = "invalid" ; then
2124                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2125         fi
2126         ol_enable_passwd="$ol_arg"
2127
2128 else
2129         ol_enable_passwd="no"
2130 fi
2131 # end --enable-passwd
2132 # OpenLDAP --enable-perl
2133         # Check whether --enable-perl or --disable-perl was given.
2134 if test "${enable_perl+set}" = set; then
2135   enableval="$enable_perl"
2136   
2137         ol_arg=invalid
2138         for ol_val in no yes mod ; do
2139                 if test "$enableval" = "$ol_val" ; then
2140                         ol_arg="$ol_val"
2141                 fi
2142         done
2143         if test "$ol_arg" = "invalid" ; then
2144                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2145         fi
2146         ol_enable_perl="$ol_arg"
2147
2148 else
2149         ol_enable_perl="no"
2150 fi
2151 # end --enable-perl
2152 # OpenLDAP --enable-relay
2153         # Check whether --enable-relay or --disable-relay was given.
2154 if test "${enable_relay+set}" = set; then
2155   enableval="$enable_relay"
2156   
2157         ol_arg=invalid
2158         for ol_val in no yes mod ; do
2159                 if test "$enableval" = "$ol_val" ; then
2160                         ol_arg="$ol_val"
2161                 fi
2162         done
2163         if test "$ol_arg" = "invalid" ; then
2164                 { echo "configure: error: bad value $enableval for --enable-relay" 1>&2; exit 1; }
2165         fi
2166         ol_enable_relay="$ol_arg"
2167
2168 else
2169         ol_enable_relay="yes"
2170 fi
2171 # end --enable-relay
2172 # OpenLDAP --enable-shell
2173         # Check whether --enable-shell or --disable-shell was given.
2174 if test "${enable_shell+set}" = set; then
2175   enableval="$enable_shell"
2176   
2177         ol_arg=invalid
2178         for ol_val in no yes mod ; do
2179                 if test "$enableval" = "$ol_val" ; then
2180                         ol_arg="$ol_val"
2181                 fi
2182         done
2183         if test "$ol_arg" = "invalid" ; then
2184                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2185         fi
2186         ol_enable_shell="$ol_arg"
2187
2188 else
2189         ol_enable_shell="no"
2190 fi
2191 # end --enable-shell
2192 # OpenLDAP --enable-sql
2193         # Check whether --enable-sql or --disable-sql was given.
2194 if test "${enable_sql+set}" = set; then
2195   enableval="$enable_sql"
2196   
2197         ol_arg=invalid
2198         for ol_val in no yes mod ; do
2199                 if test "$enableval" = "$ol_val" ; then
2200                         ol_arg="$ol_val"
2201                 fi
2202         done
2203         if test "$ol_arg" = "invalid" ; then
2204                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2205         fi
2206         ol_enable_sql="$ol_arg"
2207
2208 else
2209         ol_enable_sql="no"
2210 fi
2211 # end --enable-sql
2212
2213 Overlays="chain denyop dyngroup lastmod ppolicy proxycache rwm \
2214         refint unique"
2215
2216 # Check whether --with-xxslapoverlays or --without-xxslapoverlays was given.
2217 if test "${with_xxslapoverlays+set}" = set; then
2218   withval="$with_xxslapoverlays"
2219   :
2220 fi
2221
2222
2223 # OpenLDAP --enable-overlays
2224         # Check whether --enable-overlays or --disable-overlays was given.
2225 if test "${enable_overlays+set}" = set; then
2226   enableval="$enable_overlays"
2227   
2228         ol_arg=invalid
2229         for ol_val in no yes mod ; do
2230                 if test "$enableval" = "$ol_val" ; then
2231                         ol_arg="$ol_val"
2232                 fi
2233         done
2234         if test "$ol_arg" = "invalid" ; then
2235                 { echo "configure: error: bad value $enableval for --enable-overlays" 1>&2; exit 1; }
2236         fi
2237         ol_enable_overlays="$ol_arg"
2238
2239 else
2240         ol_enable_overlays="no"
2241 fi
2242 # end --enable-overlays
2243 # OpenLDAP --enable-chain
2244         # Check whether --enable-chain or --disable-chain was given.
2245 if test "${enable_chain+set}" = set; then
2246   enableval="$enable_chain"
2247   
2248         ol_arg=invalid
2249         for ol_val in no yes mod ; do
2250                 if test "$enableval" = "$ol_val" ; then
2251                         ol_arg="$ol_val"
2252                 fi
2253         done
2254         if test "$ol_arg" = "invalid" ; then
2255                 { echo "configure: error: bad value $enableval for --enable-chain" 1>&2; exit 1; }
2256         fi
2257         ol_enable_chain="$ol_arg"
2258
2259 else
2260         ol_enable_chain="no"
2261 fi
2262 # end --enable-chain
2263
2264 # OpenLDAP --enable-denyop
2265         # Check whether --enable-denyop or --disable-denyop was given.
2266 if test "${enable_denyop+set}" = set; then
2267   enableval="$enable_denyop"
2268   
2269         ol_arg=invalid
2270         for ol_val in no yes mod ; do
2271                 if test "$enableval" = "$ol_val" ; then
2272                         ol_arg="$ol_val"
2273                 fi
2274         done
2275         if test "$ol_arg" = "invalid" ; then
2276                 { echo "configure: error: bad value $enableval for --enable-denyop" 1>&2; exit 1; }
2277         fi
2278         ol_enable_denyop="$ol_arg"
2279
2280 else
2281         ol_enable_denyop="no"
2282 fi
2283 # end --enable-denyop
2284
2285 # OpenLDAP --enable-dyngroup
2286         # Check whether --enable-dyngroup or --disable-dyngroup was given.
2287 if test "${enable_dyngroup+set}" = set; then
2288   enableval="$enable_dyngroup"
2289   
2290         ol_arg=invalid
2291         for ol_val in no yes mod ; do
2292                 if test "$enableval" = "$ol_val" ; then
2293                         ol_arg="$ol_val"
2294                 fi
2295         done
2296         if test "$ol_arg" = "invalid" ; then
2297                 { echo "configure: error: bad value $enableval for --enable-dyngroup" 1>&2; exit 1; }
2298         fi
2299         ol_enable_dyngroup="$ol_arg"
2300
2301 else
2302         ol_enable_dyngroup="no"
2303 fi
2304 # end --enable-dyngroup
2305
2306 # OpenLDAP --enable-lastmod
2307         # Check whether --enable-lastmod or --disable-lastmod was given.
2308 if test "${enable_lastmod+set}" = set; then
2309   enableval="$enable_lastmod"
2310   
2311         ol_arg=invalid
2312         for ol_val in no yes mod ; do
2313                 if test "$enableval" = "$ol_val" ; then
2314                         ol_arg="$ol_val"
2315                 fi
2316         done
2317         if test "$ol_arg" = "invalid" ; then
2318                 { echo "configure: error: bad value $enableval for --enable-lastmod" 1>&2; exit 1; }
2319         fi
2320         ol_enable_lastmod="$ol_arg"
2321
2322 else
2323         ol_enable_lastmod="no"
2324 fi
2325 # end --enable-lastmod
2326
2327 # OpenLDAP --enable-ppolicy
2328         # Check whether --enable-ppolicy or --disable-ppolicy was given.
2329 if test "${enable_ppolicy+set}" = set; then
2330   enableval="$enable_ppolicy"
2331   
2332         ol_arg=invalid
2333         for ol_val in no yes mod ; do
2334                 if test "$enableval" = "$ol_val" ; then
2335                         ol_arg="$ol_val"
2336                 fi
2337         done
2338         if test "$ol_arg" = "invalid" ; then
2339                 { echo "configure: error: bad value $enableval for --enable-ppolicy" 1>&2; exit 1; }
2340         fi
2341         ol_enable_ppolicy="$ol_arg"
2342
2343 else
2344         ol_enable_ppolicy="no"
2345 fi
2346 # end --enable-ppolicy
2347
2348 # OpenLDAP --enable-proxycache
2349         # Check whether --enable-proxycache or --disable-proxycache was given.
2350 if test "${enable_proxycache+set}" = set; then
2351   enableval="$enable_proxycache"
2352   
2353         ol_arg=invalid
2354         for ol_val in no yes mod ; do
2355                 if test "$enableval" = "$ol_val" ; then
2356                         ol_arg="$ol_val"
2357                 fi
2358         done
2359         if test "$ol_arg" = "invalid" ; then
2360                 { echo "configure: error: bad value $enableval for --enable-proxycache" 1>&2; exit 1; }
2361         fi
2362         ol_enable_proxycache="$ol_arg"
2363
2364 else
2365         ol_enable_proxycache="no"
2366 fi
2367 # end --enable-proxycache
2368
2369 # OpenLDAP --enable-refint
2370         # Check whether --enable-refint or --disable-refint was given.
2371 if test "${enable_refint+set}" = set; then
2372   enableval="$enable_refint"
2373   
2374         ol_arg=invalid
2375         for ol_val in no yes mod ; do
2376                 if test "$enableval" = "$ol_val" ; then
2377                         ol_arg="$ol_val"
2378                 fi
2379         done
2380         if test "$ol_arg" = "invalid" ; then
2381                 { echo "configure: error: bad value $enableval for --enable-refint" 1>&2; exit 1; }
2382         fi
2383         ol_enable_refint="$ol_arg"
2384
2385 else
2386         ol_enable_refint="no"
2387 fi
2388 # end --enable-refint
2389
2390 # OpenLDAP --enable-rwm
2391         # Check whether --enable-rwm or --disable-rwm was given.
2392 if test "${enable_rwm+set}" = set; then
2393   enableval="$enable_rwm"
2394   
2395         ol_arg=invalid
2396         for ol_val in no yes mod ; do
2397                 if test "$enableval" = "$ol_val" ; then
2398                         ol_arg="$ol_val"
2399                 fi
2400         done
2401         if test "$ol_arg" = "invalid" ; then
2402                 { echo "configure: error: bad value $enableval for --enable-rwm" 1>&2; exit 1; }
2403         fi
2404         ol_enable_rwm="$ol_arg"
2405
2406 else
2407         ol_enable_rwm="no"
2408 fi
2409 # end --enable-rwm
2410
2411 # OpenLDAP --enable-unique
2412         # Check whether --enable-unique or --disable-unique was given.
2413 if test "${enable_unique+set}" = set; then
2414   enableval="$enable_unique"
2415   
2416         ol_arg=invalid
2417         for ol_val in no yes mod ; do
2418                 if test "$enableval" = "$ol_val" ; then
2419                         ol_arg="$ol_val"
2420                 fi
2421         done
2422         if test "$ol_arg" = "invalid" ; then
2423                 { echo "configure: error: bad value $enableval for --enable-unique" 1>&2; exit 1; }
2424         fi
2425         ol_enable_unique="$ol_arg"
2426
2427 else
2428         ol_enable_unique="no"
2429 fi
2430 # end --enable-unique
2431
2432
2433
2434 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2435 if test "${with_xxslurpdoptions+set}" = set; then
2436   withval="$with_xxslurpdoptions"
2437   :
2438 fi
2439
2440 # OpenLDAP --enable-slurpd
2441         # Check whether --enable-slurpd or --disable-slurpd was given.
2442 if test "${enable_slurpd+set}" = set; then
2443   enableval="$enable_slurpd"
2444   
2445         ol_arg=invalid
2446         for ol_val in auto yes no ; do
2447                 if test "$enableval" = "$ol_val" ; then
2448                         ol_arg="$ol_val"
2449                 fi
2450         done
2451         if test "$ol_arg" = "invalid" ; then
2452                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2453         fi
2454         ol_enable_slurpd="$ol_arg"
2455
2456 else
2457         ol_enable_slurpd="auto"
2458 fi
2459 # end --enable-slurpd
2460
2461 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2462 if test "${with_xxliboptions+set}" = set; then
2463   withval="$with_xxliboptions"
2464   :
2465 fi
2466
2467 # Check whether --enable-static or --disable-static was given.
2468 if test "${enable_static+set}" = set; then
2469   enableval="$enable_static"
2470   p=${PACKAGE-default}
2471 case $enableval in
2472 yes) enable_static=yes ;;
2473 no) enable_static=no ;;
2474 *)
2475   enable_static=no
2476   # Look at the argument we got.  We use all the common list separators.
2477   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2478   for pkg in $enableval; do
2479     if test "X$pkg" = "X$p"; then
2480       enable_static=yes
2481     fi
2482   done
2483   IFS="$ac_save_ifs"
2484   ;;
2485 esac
2486 else
2487   enable_static=yes
2488 fi
2489
2490 # Check whether --enable-shared or --disable-shared was given.
2491 if test "${enable_shared+set}" = set; then
2492   enableval="$enable_shared"
2493   p=${PACKAGE-default}
2494 case $enableval in
2495 yes) enable_shared=yes ;;
2496 no) enable_shared=no ;;
2497 *)
2498   enable_shared=no
2499   # Look at the argument we got.  We use all the common list separators.
2500   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2501   for pkg in $enableval; do
2502     if test "X$pkg" = "X$p"; then
2503       enable_shared=yes
2504     fi
2505   done
2506   IFS="$ac_save_ifs"
2507   ;;
2508 esac
2509 else
2510   enable_shared=yes
2511 fi
2512
2513
2514
2515 # Activate any backends that were not explicitly enabled.
2516 # Note that back_bdb defaults to "yes" so this loop won't touch it.
2517 if test $ol_enable_backends != no ; then
2518         for i in $Backends; do
2519                 eval "ol_tmp=\$ol_enable_$i"
2520                 if test $ol_tmp = no ; then
2521                         eval "ol_enable_$i=$ol_enable_backends"
2522                 fi
2523         done
2524 fi
2525 # Activate the overlays
2526 if test $ol_enable_overlays != no ; then
2527         for i in $Overlays; do
2528                 eval "ol_tmp=\$ol_enable_$i"
2529                 if test $ol_tmp = no ; then
2530                         eval "ol_enable_$i=$ol_enable_overlays"
2531                 fi
2532         done
2533 fi
2534
2535 # validate options
2536 if test $ol_enable_slapd = no ; then
2537                 if test $ol_enable_slapi = yes ; then
2538                 echo "configure: warning: slapd disabled, ignoring --enable-slapi argument" 1>&2
2539         fi
2540         if test $ol_enable_backends != no ; then
2541                 echo "configure: warning: slapd disabled, ignoring --enable-backends argument" 1>&2
2542         fi
2543         for i in $Backends; do
2544                 eval "ol_tmp=\$ol_enable_$i"
2545                 if test $ol_tmp != no ; then
2546                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2547                         eval "ol_enable_$i=no"
2548                 fi
2549         done
2550         if test $ol_enable_modules = yes ; then
2551                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2552         fi
2553         if test $ol_enable_multimaster = yes ; then
2554                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2555         fi
2556         if test $ol_enable_wrappers = yes ; then
2557                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2558         fi
2559         if test $ol_enable_rlookups = yes ; then
2560                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2561         fi
2562         if test $ol_enable_aci = yes ; then
2563                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2564         fi
2565         if test $ol_with_ldbm_api != auto ; then
2566                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2567         fi
2568         if test $ol_with_ldbm_type != auto ; then
2569                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2570         fi
2571         if test $ol_enable_slurpd = yes ; then
2572                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2573         fi
2574         if test $ol_enable_rewrite = yes ; then
2575                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2576         fi
2577                 if test $ol_enable_overlays != no ; then
2578                 echo "configure: warning: slapd disabled, ignoring --enable-overlays argument" 1>&2
2579         fi
2580         for i in $Overlays; do
2581                 eval "ol_tmp=\$ol_enable_$i"
2582                 if test $ol_tmp != no ; then
2583                         echo "configure: warning: slapd disabled, ignoring --enable-$i argument" 1>&2
2584                         eval "ol_enable_$i=no"
2585                 fi
2586         done
2587
2588         # force settings to no
2589         ol_enable_slapi=no
2590
2591         ol_enable_backends=no
2592         ol_enable_overlays=no
2593         ol_enable_modules=no
2594         ol_enable_multimaster=no
2595         ol_enable_rlookups=no
2596         ol_enable_aci=no
2597         ol_enable_wrappers=no
2598
2599         ol_with_ldbm_api=no
2600         ol_with_ldbm_type=no
2601
2602         ol_enable_slurpd=no
2603
2604         ol_enable_rewrite=no
2605
2606 elif test $ol_enable_ldbm = no ; then
2607         
2608         if test $ol_with_ldbm_api != auto ; then
2609                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2610         fi
2611
2612         if test $ol_with_ldbm_type != auto ; then
2613                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2614         fi
2615
2616         if test $ol_enable_modules != yes -a \
2617                 $ol_enable_bdb = no -a \
2618                 $ol_enable_dnssrv = no -a \
2619                 $ol_enable_hdb = no -a \
2620                 $ol_enable_ldap = no -a \
2621                 $ol_enable_meta = no -a \
2622                 $ol_enable_monitor = no -a \
2623                 $ol_enable_null = no -a \
2624                 $ol_enable_passwd = no -a \
2625                 $ol_enable_perl = no -a \
2626                 $ol_enable_relay = no -a \
2627                 $ol_enable_shell = no -a \
2628                 $ol_enable_sql = no ; then
2629
2630                 if test $ol_enable_slapd = yes ; then
2631                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2632                 else
2633                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2634                         ol_enable_slapd=no
2635                 fi
2636         fi
2637
2638         ol_with_ldbm_api=no
2639         ol_with_ldbm_type=no
2640
2641         if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
2642                 ol_with_ldbm_api=berkeley
2643         fi
2644
2645 else
2646                 if test $ol_with_ldbm_api = gdbm -a \
2647                 $ol_with_ldbm_type = btree ; then
2648                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2649         fi
2650         if test $ol_with_ldbm_api = mdbm -a \
2651                 $ol_with_ldbm_type = btree ; then
2652                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2653         fi
2654         if test $ol_with_ldbm_api = ndbm -a \
2655                 $ol_with_ldbm_type = btree ; then
2656                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2657         fi
2658
2659         if test $ol_enable_bdb != no -o $ol_enable_hdb != no ; then
2660                 if test $ol_with_ldbm_api = auto ; then
2661                         ol_with_ldbm_api=berkeley
2662                 elif test $ol_with_ldbm_api != berkeley ; then
2663                         { echo "configure: error: LDBM API not compatible with BDB/HDB" 1>&2; exit 1; }
2664                 fi
2665         fi
2666 fi
2667
2668 if test $ol_enable_chain != no -a $ol_enable_ldap = no ; then
2669         { echo "configure: error: --enable-chain requires --enable-ldap" 1>&2; exit 1; }
2670 fi
2671
2672 if test $ol_enable_meta = yes -a $ol_enable_ldap = no ; then
2673         { echo "configure: error: --enable-meta requires --enable-ldap" 1>&2; exit 1; }
2674 fi
2675
2676 if test $ol_enable_slurpd = yes ; then
2677                 if test $ol_with_threads = no ; then
2678                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2679         fi
2680 fi
2681
2682 if test $ol_enable_lmpasswd = yes ; then
2683         if test $ol_with_tls = no ; then
2684                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2685         fi
2686 fi
2687
2688 if test $ol_enable_kbind = yes ; then
2689         if test $ol_with_kerberos = no ; then
2690                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2691         elif test $ol_with_kerberos = auto ; then
2692                 ol_with_kerberos=yes
2693         fi
2694
2695 elif test $ol_enable_kbind = no ; then
2696         if test $ol_with_kerberos = auto ; then
2697                 ol_with_kerberos=no
2698         elif test $ol_with_kerberos != no ; then
2699                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2700                 ol_with_kerberos=no
2701         fi
2702 fi
2703
2704 if test $ol_enable_spasswd = yes ; then
2705         if test $ol_with_cyrus_sasl = no ; then
2706                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2707         fi
2708         ol_with_cyrus_sasl=yes
2709 fi
2710
2711 echo "$ac_t""done" 1>&6
2712
2713 LDAP_LIBS=
2714 LDBM_LIBS=
2715 LTHREAD_LIBS=
2716 LUTIL_LIBS=
2717
2718 SLAPD_LIBS=
2719 SLURPD_LIBS=
2720
2721 BUILD_SLAPD=no
2722 BUILD_SLURPD=no
2723
2724 BUILD_THREAD=no
2725
2726 BUILD_SLAPI=no
2727 SLAPD_SLAPI_DEPEND=
2728
2729 BUILD_BDB=no
2730 BUILD_DNSSRV=no
2731 BUILD_HDB=no
2732 BUILD_LDAP=no
2733 BUILD_LDBM=no
2734 BUILD_META=no
2735 BUILD_MONITOR=no
2736 BUILD_NULL=no
2737 BUILD_PASSWD=no
2738 BUILD_PERL=no
2739 BUILD_RELAY=no
2740 BUILD_SHELL=no
2741 BUILD_SQL=no
2742
2743 BUILD_CHAIN=no
2744 BUILD_DENYOP=no
2745 BUILD_DYNGROUP=no
2746 BUILD_LASTMOD=no
2747 BUILD_PPOLICY=no
2748 BUILD_PROXYCACHE=no
2749 BUILD_REFINT=no
2750 BUILD_RWM=no
2751 BUILD_UNIQUE=no
2752
2753 SLAPD_DYNAMIC_OVERLAYS=
2754
2755 SLAPD_MODULES_LDFLAGS=
2756 SLAPD_MODULES_CPPFLAGS=
2757
2758 SLAPD_STATIC_BACKENDS=
2759 SLAPD_DYNAMIC_BACKENDS=
2760
2761 SLAPD_PERL_LDFLAGS=
2762 MOD_PERL_LDFLAGS=
2763 PERL_CPPFLAGS=
2764
2765 SLAPD_SQL_LDFLAGS=
2766 SLAPD_SQL_LIBS=
2767 SLAPD_SQL_INCLUDES=
2768
2769 KRB4_LIBS=
2770 KRB5_LIBS=
2771 SASL_LIBS=
2772 TLS_LIBS=
2773 MODULES_LIBS=
2774 SLAPI_LIBS=
2775 LIBSLAPI=
2776 LIBSLAPITOOLS=
2777 AUTH_LIBS=
2778
2779 SLAPD_SLP_LIBS=
2780
2781
2782 cat >> confdefs.h <<\EOF
2783 #define HAVE_MKVERSION 1
2784 EOF
2785
2786
2787
2788
2789 ol_aix_threads=no
2790 case "$target" in
2791 *-*-aix*)       if test -z "$CC" ; then
2792                 case "$ol_with_threads" in
2793                 auto | yes |  posix) ol_aix_threads=yes ;;
2794                 esac
2795         fi
2796 ;;
2797 esac
2798
2799 if test $ol_aix_threads = yes ; then
2800         if test -z "${CC}" ; then
2801                 for ac_prog in cc_r xlc_r cc
2802 do
2803 # Extract the first word of "$ac_prog", so it can be a program name with args.
2804 set dummy $ac_prog; ac_word=$2
2805 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2806 echo "configure:2807: checking for $ac_word" >&5
2807 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2808   echo $ac_n "(cached) $ac_c" 1>&6
2809 else
2810   if test -n "$CC"; then
2811   ac_cv_prog_CC="$CC" # Let the user override the test.
2812 else
2813   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2814   ac_dummy="$PATH"
2815   for ac_dir in $ac_dummy; do
2816     test -z "$ac_dir" && ac_dir=.
2817     if test -f $ac_dir/$ac_word; then
2818       ac_cv_prog_CC="$ac_prog"
2819       break
2820     fi
2821   done
2822   IFS="$ac_save_ifs"
2823 fi
2824 fi
2825 CC="$ac_cv_prog_CC"
2826 if test -n "$CC"; then
2827   echo "$ac_t""$CC" 1>&6
2828 else
2829   echo "$ac_t""no" 1>&6
2830 fi
2831
2832 test -n "$CC" && break
2833 done
2834
2835
2836                 if test "$CC" = cc ; then
2837                                                 if test $ol_with_threads != auto ; then
2838                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
2839                         else
2840                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
2841                         fi
2842                         ol_with_threads=no
2843                 fi
2844         fi
2845
2846         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
2847                 ol_with_threads=posix
2848                 ol_cv_pthread_create=yes
2849         fi
2850 fi
2851
2852 if test -z "${CC}"; then
2853         for ac_prog in cc gcc
2854 do
2855 # Extract the first word of "$ac_prog", so it can be a program name with args.
2856 set dummy $ac_prog; ac_word=$2
2857 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2858 echo "configure:2859: checking for $ac_word" >&5
2859 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2860   echo $ac_n "(cached) $ac_c" 1>&6
2861 else
2862   if test -n "$CC"; then
2863   ac_cv_prog_CC="$CC" # Let the user override the test.
2864 else
2865   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2866   ac_dummy="$PATH"
2867   for ac_dir in $ac_dummy; do
2868     test -z "$ac_dir" && ac_dir=.
2869     if test -f $ac_dir/$ac_word; then
2870       ac_cv_prog_CC="$ac_prog"
2871       break
2872     fi
2873   done
2874   IFS="$ac_save_ifs"
2875 fi
2876 fi
2877 CC="$ac_cv_prog_CC"
2878 if test -n "$CC"; then
2879   echo "$ac_t""$CC" 1>&6
2880 else
2881   echo "$ac_t""no" 1>&6
2882 fi
2883
2884 test -n "$CC" && break
2885 done
2886 test -n "$CC" || CC="missing"
2887
2888
2889         if test "${CC}" = "missing" ; then
2890                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
2891         fi
2892 fi
2893
2894 if test -z "${AR}"; then
2895         for ac_prog in ar gar
2896 do
2897 # Extract the first word of "$ac_prog", so it can be a program name with args.
2898 set dummy $ac_prog; ac_word=$2
2899 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2900 echo "configure:2901: checking for $ac_word" >&5
2901 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
2902   echo $ac_n "(cached) $ac_c" 1>&6
2903 else
2904   if test -n "$AR"; then
2905   ac_cv_prog_AR="$AR" # Let the user override the test.
2906 else
2907   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2908   ac_dummy="$PATH"
2909   for ac_dir in $ac_dummy; do
2910     test -z "$ac_dir" && ac_dir=.
2911     if test -f $ac_dir/$ac_word; then
2912       ac_cv_prog_AR="$ac_prog"
2913       break
2914     fi
2915   done
2916   IFS="$ac_save_ifs"
2917 fi
2918 fi
2919 AR="$ac_cv_prog_AR"
2920 if test -n "$AR"; then
2921   echo "$ac_t""$AR" 1>&6
2922 else
2923   echo "$ac_t""no" 1>&6
2924 fi
2925
2926 test -n "$AR" && break
2927 done
2928 test -n "$AR" || AR="missing"
2929
2930
2931         if test "${AR}" = "missing" ; then
2932                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
2933         fi
2934 fi
2935
2936
2937
2938 # Find the correct PATH separator.  Usually this is `:', but
2939 # DJGPP uses `;' like DOS.
2940 if test "X${PATH_SEPARATOR+set}" != Xset; then
2941   UNAME=${UNAME-`uname 2>/dev/null`}
2942   case X$UNAME in
2943     *-DOS) lt_cv_sys_path_separator=';' ;;
2944     *)     lt_cv_sys_path_separator=':' ;;
2945   esac
2946   PATH_SEPARATOR=$lt_cv_sys_path_separator
2947 fi
2948
2949 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
2950 echo "configure:2951: checking for Cygwin environment" >&5
2951 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
2952   echo $ac_n "(cached) $ac_c" 1>&6
2953 else
2954   cat > conftest.$ac_ext <<EOF
2955 #line 2956 "configure"
2956 #include "confdefs.h"
2957
2958 int main() {
2959
2960 #ifndef __CYGWIN__
2961 #define __CYGWIN__ __CYGWIN32__
2962 #endif
2963 return __CYGWIN__;
2964 ; return 0; }
2965 EOF
2966 if { (eval echo configure:2967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2967   rm -rf conftest*
2968   ac_cv_cygwin=yes
2969 else
2970   echo "configure: failed program was:" >&5
2971   cat conftest.$ac_ext >&5
2972   rm -rf conftest*
2973   ac_cv_cygwin=no
2974 fi
2975 rm -f conftest*
2976 fi
2977
2978 echo "$ac_t""$ac_cv_cygwin" 1>&6
2979 CYGWIN=
2980 test "$ac_cv_cygwin" = yes && CYGWIN=yes
2981 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
2982 echo "configure:2983: checking for mingw32 environment" >&5
2983 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
2984   echo $ac_n "(cached) $ac_c" 1>&6
2985 else
2986   cat > conftest.$ac_ext <<EOF
2987 #line 2988 "configure"
2988 #include "confdefs.h"
2989
2990 int main() {
2991 return __MINGW32__;
2992 ; return 0; }
2993 EOF
2994 if { (eval echo configure:2995: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
2995   rm -rf conftest*
2996   ac_cv_mingw32=yes
2997 else
2998   echo "configure: failed program was:" >&5
2999   cat conftest.$ac_ext >&5
3000   rm -rf conftest*
3001   ac_cv_mingw32=no
3002 fi
3003 rm -f conftest*
3004 fi
3005
3006 echo "$ac_t""$ac_cv_mingw32" 1>&6
3007 MINGW32=
3008 test "$ac_cv_mingw32" = yes && MINGW32=yes
3009 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3010 echo "configure:3011: checking for EMX OS/2 environment" >&5
3011 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3012   echo $ac_n "(cached) $ac_c" 1>&6
3013 else
3014   cat > conftest.$ac_ext <<EOF
3015 #line 3016 "configure"
3016 #include "confdefs.h"
3017
3018 int main() {
3019 return __EMX__;
3020 ; return 0; }
3021 EOF
3022 if { (eval echo configure:3023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3023   rm -rf conftest*
3024   ac_cv_emxos2=yes
3025 else
3026   echo "configure: failed program was:" >&5
3027   cat conftest.$ac_ext >&5
3028   rm -rf conftest*
3029   ac_cv_emxos2=no
3030 fi
3031 rm -f conftest*
3032 fi
3033
3034 echo "$ac_t""$ac_cv_emxos2" 1>&6
3035 EMXOS2=
3036 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3037 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3038 echo "configure:3039: checking how to run the C preprocessor" >&5
3039 # On Suns, sometimes $CPP names a directory.
3040 if test -n "$CPP" && test -d "$CPP"; then
3041   CPP=
3042 fi
3043 if test -z "$CPP"; then
3044 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3045   echo $ac_n "(cached) $ac_c" 1>&6
3046 else
3047     # This must be in double quotes, not single quotes, because CPP may get
3048   # substituted into the Makefile and "${CC-cc}" will confuse make.
3049   CPP="${CC-cc} -E"
3050   # On the NeXT, cc -E runs the code through the compiler's parser,
3051   # not just through cpp.
3052   cat > conftest.$ac_ext <<EOF
3053 #line 3054 "configure"
3054 #include "confdefs.h"
3055 #include <assert.h>
3056 Syntax Error
3057 EOF
3058 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3059 { (eval echo configure:3060: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3060 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3061 if test -z "$ac_err"; then
3062   :
3063 else
3064   echo "$ac_err" >&5
3065   echo "configure: failed program was:" >&5
3066   cat conftest.$ac_ext >&5
3067   rm -rf conftest*
3068   CPP="${CC-cc} -E -traditional-cpp"
3069   cat > conftest.$ac_ext <<EOF
3070 #line 3071 "configure"
3071 #include "confdefs.h"
3072 #include <assert.h>
3073 Syntax Error
3074 EOF
3075 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3076 { (eval echo configure:3077: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3077 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3078 if test -z "$ac_err"; then
3079   :
3080 else
3081   echo "$ac_err" >&5
3082   echo "configure: failed program was:" >&5
3083   cat conftest.$ac_ext >&5
3084   rm -rf conftest*
3085   CPP="${CC-cc} -nologo -E"
3086   cat > conftest.$ac_ext <<EOF
3087 #line 3088 "configure"
3088 #include "confdefs.h"
3089 #include <assert.h>
3090 Syntax Error
3091 EOF
3092 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3093 { (eval echo configure:3094: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3094 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3095 if test -z "$ac_err"; then
3096   :
3097 else
3098   echo "$ac_err" >&5
3099   echo "configure: failed program was:" >&5
3100   cat conftest.$ac_ext >&5
3101   rm -rf conftest*
3102   CPP=/lib/cpp
3103 fi
3104 rm -f conftest*
3105 fi
3106 rm -f conftest*
3107 fi
3108 rm -f conftest*
3109   ac_cv_prog_CPP="$CPP"
3110 fi
3111   CPP="$ac_cv_prog_CPP"
3112 else
3113   ac_cv_prog_CPP="$CPP"
3114 fi
3115 echo "$ac_t""$CPP" 1>&6
3116
3117 # Check whether --enable-fast-install or --disable-fast-install was given.
3118 if test "${enable_fast_install+set}" = set; then
3119   enableval="$enable_fast_install"
3120   p=${PACKAGE-default}
3121 case $enableval in
3122 yes) enable_fast_install=yes ;;
3123 no) enable_fast_install=no ;;
3124 *)
3125   enable_fast_install=no
3126   # Look at the argument we got.  We use all the common list separators.
3127   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3128   for pkg in $enableval; do
3129     if test "X$pkg" = "X$p"; then
3130       enable_fast_install=yes
3131     fi
3132   done
3133   IFS="$ac_save_ifs"
3134   ;;
3135 esac
3136 else
3137   enable_fast_install=yes
3138 fi
3139
3140 # Extract the first word of "gcc", so it can be a program name with args.
3141 set dummy gcc; ac_word=$2
3142 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3143 echo "configure:3144: checking for $ac_word" >&5
3144 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3145   echo $ac_n "(cached) $ac_c" 1>&6
3146 else
3147   if test -n "$CC"; then
3148   ac_cv_prog_CC="$CC" # Let the user override the test.
3149 else
3150   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3151   ac_dummy="$PATH"
3152   for ac_dir in $ac_dummy; do
3153     test -z "$ac_dir" && ac_dir=.
3154     if test -f $ac_dir/$ac_word; then
3155       ac_cv_prog_CC="gcc"
3156       break
3157     fi
3158   done
3159   IFS="$ac_save_ifs"
3160 fi
3161 fi
3162 CC="$ac_cv_prog_CC"
3163 if test -n "$CC"; then
3164   echo "$ac_t""$CC" 1>&6
3165 else
3166   echo "$ac_t""no" 1>&6
3167 fi
3168
3169 if test -z "$CC"; then
3170   # Extract the first word of "cc", so it can be a program name with args.
3171 set dummy cc; ac_word=$2
3172 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3173 echo "configure:3174: checking for $ac_word" >&5
3174 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3175   echo $ac_n "(cached) $ac_c" 1>&6
3176 else
3177   if test -n "$CC"; then
3178   ac_cv_prog_CC="$CC" # Let the user override the test.
3179 else
3180   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3181   ac_prog_rejected=no
3182   ac_dummy="$PATH"
3183   for ac_dir in $ac_dummy; do
3184     test -z "$ac_dir" && ac_dir=.
3185     if test -f $ac_dir/$ac_word; then
3186       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3187         ac_prog_rejected=yes
3188         continue
3189       fi
3190       ac_cv_prog_CC="cc"
3191       break
3192     fi
3193   done
3194   IFS="$ac_save_ifs"
3195 if test $ac_prog_rejected = yes; then
3196   # We found a bogon in the path, so make sure we never use it.
3197   set dummy $ac_cv_prog_CC
3198   shift
3199   if test $# -gt 0; then
3200     # We chose a different compiler from the bogus one.
3201     # However, it has the same basename, so the bogon will be chosen
3202     # first if we set CC to just the basename; use the full file name.
3203     shift
3204     set dummy "$ac_dir/$ac_word" "$@"
3205     shift
3206     ac_cv_prog_CC="$@"
3207   fi
3208 fi
3209 fi
3210 fi
3211 CC="$ac_cv_prog_CC"
3212 if test -n "$CC"; then
3213   echo "$ac_t""$CC" 1>&6
3214 else
3215   echo "$ac_t""no" 1>&6
3216 fi
3217
3218   if test -z "$CC"; then
3219     case "`uname -s`" in
3220     *win32* | *WIN32* | *CYGWIN*)
3221       # Extract the first word of "cl", so it can be a program name with args.
3222 set dummy cl; ac_word=$2
3223 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3224 echo "configure:3225: checking for $ac_word" >&5
3225 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3226   echo $ac_n "(cached) $ac_c" 1>&6
3227 else
3228   if test -n "$CC"; then
3229   ac_cv_prog_CC="$CC" # Let the user override the test.
3230 else
3231   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3232   ac_dummy="$PATH"
3233   for ac_dir in $ac_dummy; do
3234     test -z "$ac_dir" && ac_dir=.
3235     if test -f $ac_dir/$ac_word; then
3236       ac_cv_prog_CC="cl"
3237       break
3238     fi
3239   done
3240   IFS="$ac_save_ifs"
3241 fi
3242 fi
3243 CC="$ac_cv_prog_CC"
3244 if test -n "$CC"; then
3245   echo "$ac_t""$CC" 1>&6
3246 else
3247   echo "$ac_t""no" 1>&6
3248 fi
3249  ;;
3250     esac
3251   fi
3252   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3253 fi
3254
3255 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3256 echo "configure:3257: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3257
3258 ac_ext=c
3259 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3260 ac_cpp='$CPP $CPPFLAGS'
3261 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3262 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3263 cross_compiling=$ac_cv_prog_cc_cross
3264
3265 cat > conftest.$ac_ext << EOF
3266
3267 #line 3268 "configure"
3268 #include "confdefs.h"
3269
3270 main(){return(0);}
3271 EOF
3272 if { (eval echo configure:3273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3273   ac_cv_prog_cc_works=yes
3274   # If we can't run a trivial program, we are probably using a cross compiler.
3275   if (./conftest; exit) 2>/dev/null; then
3276     ac_cv_prog_cc_cross=no
3277   else
3278     ac_cv_prog_cc_cross=yes
3279   fi
3280 else
3281   echo "configure: failed program was:" >&5
3282   cat conftest.$ac_ext >&5
3283   ac_cv_prog_cc_works=no
3284 fi
3285 rm -fr conftest*
3286 ac_ext=c
3287 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3288 ac_cpp='$CPP $CPPFLAGS'
3289 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3290 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3291 cross_compiling=$ac_cv_prog_cc_cross
3292
3293 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3294 if test $ac_cv_prog_cc_works = no; then
3295   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3296 fi
3297 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3298 echo "configure:3299: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3299 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3300 cross_compiling=$ac_cv_prog_cc_cross
3301
3302 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3303 echo "configure:3304: checking whether we are using GNU C" >&5
3304 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3305   echo $ac_n "(cached) $ac_c" 1>&6
3306 else
3307   cat > conftest.c <<EOF
3308 #ifdef __GNUC__
3309   yes;
3310 #endif
3311 EOF
3312 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3313: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3313   ac_cv_prog_gcc=yes
3314 else
3315   ac_cv_prog_gcc=no
3316 fi
3317 fi
3318
3319 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3320
3321 if test $ac_cv_prog_gcc = yes; then
3322   GCC=yes
3323 else
3324   GCC=
3325 fi
3326
3327 ac_test_CFLAGS="${CFLAGS+set}"
3328 ac_save_CFLAGS="$CFLAGS"
3329 CFLAGS=
3330 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3331 echo "configure:3332: checking whether ${CC-cc} accepts -g" >&5
3332 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3333   echo $ac_n "(cached) $ac_c" 1>&6
3334 else
3335   echo 'void f(){}' > conftest.c
3336 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3337   ac_cv_prog_cc_g=yes
3338 else
3339   ac_cv_prog_cc_g=no
3340 fi
3341 rm -f conftest*
3342
3343 fi
3344
3345 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3346 if test "$ac_test_CFLAGS" = set; then
3347   CFLAGS="$ac_save_CFLAGS"
3348 elif test $ac_cv_prog_cc_g = yes; then
3349   if test "$GCC" = yes; then
3350     CFLAGS="-g -O2"
3351   else
3352     CFLAGS="-g"
3353   fi
3354 else
3355   if test "$GCC" = yes; then
3356     CFLAGS="-O2"
3357   else
3358     CFLAGS=
3359   fi
3360 fi
3361
3362 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3363 if test "${with_gnu_ld+set}" = set; then
3364   withval="$with_gnu_ld"
3365   test "$withval" = no || with_gnu_ld=yes
3366 else
3367   with_gnu_ld=no
3368 fi
3369
3370 ac_prog=ld
3371 if test "$GCC" = yes; then
3372   # Check if gcc -print-prog-name=ld gives a path.
3373   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3374 echo "configure:3375: checking for ld used by GCC" >&5
3375   case $host in
3376   *-*-mingw*)
3377     # gcc leaves a trailing carriage return which upsets mingw
3378     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3379   *)
3380     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3381   esac
3382   case $ac_prog in
3383     # Accept absolute paths.
3384     [\\/]* | [A-Za-z]:[\\/]*)
3385       re_direlt='/[^/][^/]*/\.\./'
3386       # Canonicalize the path of ld
3387       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3388       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3389         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3390       done
3391       test -z "$LD" && LD="$ac_prog"
3392       ;;
3393   "")
3394     # If it fails, then pretend we aren't using GCC.
3395     ac_prog=ld
3396     ;;
3397   *)
3398     # If it is relative, then search for the first ld in PATH.
3399     with_gnu_ld=unknown
3400     ;;
3401   esac
3402 elif test "$with_gnu_ld" = yes; then
3403   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3404 echo "configure:3405: checking for GNU ld" >&5
3405 else
3406   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3407 echo "configure:3408: checking for non-GNU ld" >&5
3408 fi
3409 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3410   echo $ac_n "(cached) $ac_c" 1>&6
3411 else
3412   if test -z "$LD"; then
3413   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3414   for ac_dir in $PATH; do
3415     test -z "$ac_dir" && ac_dir=.
3416     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3417       lt_cv_path_LD="$ac_dir/$ac_prog"
3418       # Check to see if the program is GNU ld.  I'd rather use --version,
3419       # but apparently some GNU ld's only accept -v.
3420       # Break only if it was the GNU/non-GNU ld that we prefer.
3421       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3422         test "$with_gnu_ld" != no && break
3423       else
3424         test "$with_gnu_ld" != yes && break
3425       fi
3426     fi
3427   done
3428   IFS="$ac_save_ifs"
3429 else
3430   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3431 fi
3432 fi
3433
3434 LD="$lt_cv_path_LD"
3435 if test -n "$LD"; then
3436   echo "$ac_t""$LD" 1>&6
3437 else
3438   echo "$ac_t""no" 1>&6
3439 fi
3440 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3441 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3442 echo "configure:3443: checking if the linker ($LD) is GNU ld" >&5
3443 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3444   echo $ac_n "(cached) $ac_c" 1>&6
3445 else
3446   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3447 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3448   lt_cv_prog_gnu_ld=yes
3449 else
3450   lt_cv_prog_gnu_ld=no
3451 fi
3452 fi
3453
3454 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3455 with_gnu_ld=$lt_cv_prog_gnu_ld
3456
3457
3458 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3459 echo "configure:3460: checking for $LD option to reload object files" >&5
3460 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3461   echo $ac_n "(cached) $ac_c" 1>&6
3462 else
3463   lt_cv_ld_reload_flag='-r'
3464 fi
3465
3466 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3467 reload_flag=$lt_cv_ld_reload_flag
3468 test -n "$reload_flag" && reload_flag=" $reload_flag"
3469
3470 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3471 echo "configure:3472: checking for BSD-compatible nm" >&5
3472 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3473   echo $ac_n "(cached) $ac_c" 1>&6
3474 else
3475   if test -n "$NM"; then
3476   # Let the user override the test.
3477   lt_cv_path_NM="$NM"
3478 else
3479   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3480   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3481     test -z "$ac_dir" && ac_dir=.
3482     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3483     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3484       # Check to see if the nm accepts a BSD-compat flag.
3485       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3486       #   nm: unknown option "B" ignored
3487       # Tru64's nm complains that /dev/null is an invalid object file
3488       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3489         lt_cv_path_NM="$tmp_nm -B"
3490         break
3491       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3492         lt_cv_path_NM="$tmp_nm -p"
3493         break
3494       else
3495         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3496         continue # so that we can try to find one that supports BSD flags
3497       fi
3498     fi
3499   done
3500   IFS="$ac_save_ifs"
3501   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3502 fi
3503 fi
3504
3505 NM="$lt_cv_path_NM"
3506 echo "$ac_t""$NM" 1>&6
3507
3508 echo $ac_n "checking for a sed that does not truncate output""... $ac_c" 1>&6
3509 echo "configure:3510: checking for a sed that does not truncate output" >&5
3510 if eval "test \"\${lt_cv_path_SED+set}\" = set"; then
3511   echo $ac_n "(cached) $ac_c" 1>&6
3512 else
3513   # Loop through the user's path and test for sed and gsed.
3514 # Then use that list of sed's as ones to test for truncation.
3515 as_executable_p="test -f"
3516 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3517 for as_dir in $PATH
3518 do
3519   IFS=$as_save_IFS
3520   test -z "$as_dir" && as_dir=.
3521   for ac_prog in sed gsed; do
3522     for ac_exec_ext in '' $ac_executable_extensions; do
3523       if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3524         _sed_list="$_sed_list $as_dir/$ac_prog$ac_exec_ext"
3525       fi
3526     done
3527   done
3528 done
3529
3530   # Create a temporary directory, and hook for its removal unless debugging.
3531 $debug ||
3532 {
3533   trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
3534   trap '{ (exit 1); exit 1; }' 1 2 13 15
3535 }
3536
3537 # Create a (secure) tmp directory for tmp files.
3538 : ${TMPDIR=/tmp}
3539 {
3540   tmp=`(umask 077 && mktemp -d -q "$TMPDIR/sedXXXXXX") 2>/dev/null` &&
3541   test -n "$tmp" && test -d "$tmp"
3542 }  ||
3543 {
3544   tmp=$TMPDIR/sed$$-$RANDOM
3545   (umask 077 && mkdir $tmp)
3546 } ||
3547 {
3548    echo "$me: cannot create a temporary directory in $TMPDIR" >&2
3549    { (exit 1); exit 1; }
3550 }
3551   _max=0
3552   _count=0
3553   # Add /usr/xpg4/bin/sed as it is typically found on Solaris
3554   # along with /bin/sed that truncates output.
3555   for _sed in $_sed_list /usr/xpg4/bin/sed; do
3556     test ! -f ${_sed} && break
3557     cat /dev/null > "$tmp/sed.in"
3558     _count=0
3559     echo ${ECHO_N-$ac_n} "0123456789${ECHO_C-$ac_c}" >"$tmp/sed.in"
3560     # Check for GNU sed and select it if it is found.
3561     if "${_sed}" --version 2>&1 < /dev/null | egrep '(GNU)' > /dev/null; then
3562       lt_cv_path_SED=${_sed}
3563       break
3564     fi
3565     while true; do
3566       cat "$tmp/sed.in" "$tmp/sed.in" >"$tmp/sed.tmp"
3567       mv "$tmp/sed.tmp" "$tmp/sed.in"
3568       cp "$tmp/sed.in" "$tmp/sed.nl"
3569       echo >>"$tmp/sed.nl"
3570       ${_sed} -e 's/a$//' < "$tmp/sed.nl" >"$tmp/sed.out" || break
3571       cmp -s "$tmp/sed.out" "$tmp/sed.nl" || break
3572       # 40000 chars as input seems more than enough
3573       test $_count -gt 10 && break
3574       _count=`expr $_count + 1`
3575       if test $_count -gt $_max; then
3576         _max=$_count
3577         lt_cv_path_SED=$_sed
3578       fi
3579     done
3580   done
3581   rm -rf "$tmp"
3582
3583 fi
3584
3585 if test "X$SED" != "X"; then
3586   lt_cv_path_SED=$SED
3587 else
3588   SED=$lt_cv_path_SED
3589 fi
3590 echo "$ac_t""$SED" 1>&6
3591
3592 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3593 echo "configure:3594: checking whether ln -s works" >&5
3594 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3595   echo $ac_n "(cached) $ac_c" 1>&6
3596 else
3597   rm -f conftestdata
3598 if ln -s X conftestdata 2>/dev/null
3599 then
3600   rm -f conftestdata
3601   ac_cv_prog_LN_S="ln -s"
3602 else
3603   ac_cv_prog_LN_S=ln
3604 fi
3605 fi
3606 LN_S="$ac_cv_prog_LN_S"
3607 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3608   echo "$ac_t""yes" 1>&6
3609 else
3610   echo "$ac_t""no" 1>&6
3611 fi
3612
3613 echo $ac_n "checking how to recognise dependent libraries""... $ac_c" 1>&6
3614 echo "configure:3615: checking how to recognise dependent libraries" >&5
3615 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3616   echo $ac_n "(cached) $ac_c" 1>&6
3617 else
3618   lt_cv_file_magic_cmd='$MAGIC_CMD'
3619 lt_cv_file_magic_test_file=
3620 lt_cv_deplibs_check_method='unknown'
3621 # Need to set the preceding variable on all platforms that support
3622 # interlibrary dependencies.
3623 # 'none' -- dependencies not supported.
3624 # `unknown' -- same as none, but documents that we really don't know.
3625 # 'pass_all' -- all dependencies passed with no checks.
3626 # 'test_compile' -- check by making test program.
3627 # 'file_magic [[regex]]' -- check by looking for files in library path
3628 # which responds to the $file_magic_cmd with a given egrep regex.
3629 # If you have `file' or equivalent on your system and you're not sure
3630 # whether `pass_all' will *always* work, you probably want this one.
3631
3632 case $host_os in
3633 aix4* | aix5*)
3634   lt_cv_deplibs_check_method=pass_all
3635   ;;
3636
3637 beos*)
3638   lt_cv_deplibs_check_method=pass_all
3639   ;;
3640
3641 bsdi4*)
3642   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3643   lt_cv_file_magic_cmd='/usr/bin/file -L'
3644   lt_cv_file_magic_test_file=/shlib/libc.so
3645   ;;
3646
3647 cygwin* | mingw* | pw32*)
3648   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3649   lt_cv_file_magic_cmd='$OBJDUMP -f'
3650   ;;
3651
3652 darwin* | rhapsody*)
3653   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3654   lt_cv_file_magic_cmd='/usr/bin/file -L'
3655   case "$host_os" in
3656   rhapsody* | darwin1.[012])
3657     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3658     ;;
3659   *) # Darwin 1.3 on
3660     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3661     ;;
3662   esac
3663   ;;
3664
3665 freebsd*)
3666   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3667     case $host_cpu in
3668     i*86 )
3669       # Not sure whether the presence of OpenBSD here was a mistake.
3670       # Let's accept both of them until this is cleared up.
3671       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3672       lt_cv_file_magic_cmd=/usr/bin/file
3673       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3674       ;;
3675     esac
3676   else
3677     lt_cv_deplibs_check_method=pass_all
3678   fi
3679   ;;
3680
3681 gnu*)
3682   lt_cv_deplibs_check_method=pass_all
3683   ;;
3684
3685 hpux10.20*|hpux11*)
3686   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3687   lt_cv_file_magic_cmd=/usr/bin/file
3688   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3689   ;;
3690
3691 irix5* | irix6* | nonstopux*)
3692   case $host_os in
3693   irix5* | nonstopux*)
3694     # this will be overridden with pass_all, but let us keep it just in case
3695     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3696     ;;
3697   *)
3698     case $LD in
3699     *-32|*"-32 ") libmagic=32-bit;;
3700     *-n32|*"-n32 ") libmagic=N32;;
3701     *-64|*"-64 ") libmagic=64-bit;;
3702     *) libmagic=never-match;;
3703     esac
3704     # this will be overridden with pass_all, but let us keep it just in case
3705     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3706     ;;
3707   esac
3708   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3709   lt_cv_deplibs_check_method=pass_all
3710   ;;
3711
3712 # This must be Linux ELF.
3713 linux-gnu*)
3714   case $host_cpu in
3715   alpha* | hppa* | i*86 | mips | mipsel | powerpc* | sparc* | ia64*)
3716     lt_cv_deplibs_check_method=pass_all ;;
3717   *)
3718     # glibc up to 2.1.1 does not perform some relocations on ARM
3719     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3720   esac
3721   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3722   ;;
3723
3724 netbsd*)
3725   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3726     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3727   else
3728     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3729   fi
3730   ;;
3731
3732 newos6*)
3733   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3734   lt_cv_file_magic_cmd=/usr/bin/file
3735   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3736   ;;
3737
3738 openbsd*)
3739   lt_cv_file_magic_cmd=/usr/bin/file
3740   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3741   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3742     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3743   else
3744     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3745   fi
3746   ;;
3747
3748 openedition*)
3749   lt_cv_deplibs_check_method=pass_all
3750   ;;
3751
3752 osf3* | osf4* | osf5*)
3753   # this will be overridden with pass_all, but let us keep it just in case
3754   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3755   lt_cv_file_magic_test_file=/shlib/libc.so
3756   lt_cv_deplibs_check_method=pass_all
3757   ;;
3758
3759 sco3.2v5*)
3760   lt_cv_deplibs_check_method=pass_all
3761   ;;
3762
3763 solaris*)
3764   lt_cv_deplibs_check_method=pass_all
3765   lt_cv_file_magic_test_file=/lib/libc.so
3766   ;;
3767
3768 sysv5uw[78]* | sysv4*uw2*)
3769   lt_cv_deplibs_check_method=pass_all
3770   ;;
3771
3772 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3773   case $host_vendor in
3774   motorola)
3775     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]'
3776     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3777     ;;
3778   ncr)
3779     lt_cv_deplibs_check_method=pass_all
3780     ;;
3781   sequent)
3782     lt_cv_file_magic_cmd='/bin/file'
3783     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3784     ;;
3785   sni)
3786     lt_cv_file_magic_cmd='/bin/file'
3787     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3788     lt_cv_file_magic_test_file=/lib/libc.so
3789     ;;
3790   siemens)
3791     lt_cv_deplibs_check_method=pass_all
3792     ;;
3793   esac
3794   ;;
3795 esac
3796
3797 fi
3798
3799 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3800 file_magic_cmd=$lt_cv_file_magic_cmd
3801 deplibs_check_method=$lt_cv_deplibs_check_method
3802
3803 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3804 echo "configure:3805: checking for object suffix" >&5
3805 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3806   echo $ac_n "(cached) $ac_c" 1>&6
3807 else
3808   rm -f conftest*
3809 echo 'int i = 1;' > conftest.$ac_ext
3810 if { (eval echo configure:3811: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3811   for ac_file in conftest.*; do
3812     case $ac_file in
3813     *.c) ;;
3814     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3815     esac
3816   done
3817 else
3818   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3819 fi
3820 rm -f conftest*
3821 fi
3822
3823 echo "$ac_t""$ac_cv_objext" 1>&6
3824 OBJEXT=$ac_cv_objext
3825 ac_objext=$ac_cv_objext
3826
3827
3828
3829
3830 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3831 echo "configure:3832: checking for executable suffix" >&5
3832 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3833   echo $ac_n "(cached) $ac_c" 1>&6
3834 else
3835   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3836   ac_cv_exeext=.exe
3837 else
3838   rm -f conftest*
3839   echo 'int main () { return 0; }' > conftest.$ac_ext
3840   ac_cv_exeext=
3841   if { (eval echo configure:3842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3842     for file in conftest.*; do
3843       case $file in
3844       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3845       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3846       esac
3847     done
3848   else
3849     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3850   fi
3851   rm -f conftest*
3852   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3853 fi
3854 fi
3855
3856 EXEEXT=""
3857 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3858 echo "$ac_t""${ac_cv_exeext}" 1>&6
3859 ac_exeext=$EXEEXT
3860
3861 if test $host != $build; then
3862   ac_tool_prefix=${host_alias}-
3863 else
3864   ac_tool_prefix=
3865 fi
3866
3867
3868
3869
3870 # Check for command to grab the raw symbol name followed by C symbol from nm.
3871 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3872 echo "configure:3873: checking command to parse $NM output" >&5
3873 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3874   echo $ac_n "(cached) $ac_c" 1>&6
3875 else
3876   
3877 # These are sane defaults that work on at least a few old systems.
3878 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3879
3880 # Character class describing NM global symbol codes.
3881 symcode='[BCDEGRST]'
3882
3883 # Regexp to match symbols that can be accessed directly from C.
3884 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3885
3886 # Transform the above into a raw symbol and a C symbol.
3887 symxfrm='\1 \2\3 \3'
3888
3889 # Transform an extracted symbol line into a proper C declaration
3890 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3891
3892 # Transform an extracted symbol line into symbol name and symbol address
3893 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'"
3894
3895 # Define system-specific variables.
3896 case $host_os in
3897 aix*)
3898   symcode='[BCDT]'
3899   ;;
3900 cygwin* | mingw* | pw32*)
3901   symcode='[ABCDGISTW]'
3902   ;;
3903 hpux*) # Its linker distinguishes data from code symbols
3904   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3905   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'"
3906   ;;
3907 irix* | nonstopux*)
3908   symcode='[BCDEGRST]'
3909   ;;
3910 osf*)
3911   symcode='[BCDEGQRST]'
3912   ;;
3913 solaris* | sysv5*)
3914   symcode='[BDT]'
3915   ;;
3916 sysv4)
3917   symcode='[DFNSTU]'
3918   ;;
3919 esac
3920
3921 # Handle CRLF in mingw tool chain
3922 opt_cr=
3923 case $host_os in
3924 mingw*)
3925   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3926   ;;
3927 esac
3928
3929 # If we're using GNU nm, then use its standard symbol codes.
3930 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3931   symcode='[ABCDGISTW]'
3932 fi
3933
3934 # Try without a prefix undercore, then with it.
3935 for ac_symprfx in "" "_"; do
3936
3937   # Write the raw and C identifiers.
3938 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
3939
3940   # Check to see that the pipe works correctly.
3941   pipe_works=no
3942   rm -f conftest*
3943   cat > conftest.$ac_ext <<EOF
3944 #ifdef __cplusplus
3945 extern "C" {
3946 #endif
3947 char nm_test_var;
3948 void nm_test_func(){}
3949 #ifdef __cplusplus
3950 }
3951 #endif
3952 int main(){nm_test_var='a';nm_test_func();return(0);}
3953 EOF
3954
3955   if { (eval echo configure:3956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3956     # Now try to grab the symbols.
3957     nlist=conftest.nm
3958     if { (eval echo configure:3959: \"$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
3959       # Try sorting and uniquifying the output.
3960       if sort "$nlist" | uniq > "$nlist"T; then
3961         mv -f "$nlist"T "$nlist"
3962       else
3963         rm -f "$nlist"T
3964       fi
3965
3966       # Make sure that we snagged all the symbols we need.
3967       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
3968         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
3969           cat <<EOF > conftest.$ac_ext
3970 #ifdef __cplusplus
3971 extern "C" {
3972 #endif
3973
3974 EOF
3975           # Now generate the symbol file.
3976           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
3977
3978           cat <<EOF >> conftest.$ac_ext
3979 #if defined (__STDC__) && __STDC__
3980 # define lt_ptr void *
3981 #else
3982 # define lt_ptr char *
3983 # define const
3984 #endif
3985
3986 /* The mapping between symbol names and symbols. */
3987 const struct {
3988   const char *name;
3989   lt_ptr address;
3990 }
3991 lt_preloaded_symbols[] =
3992 {
3993 EOF
3994           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
3995           cat <<\EOF >> conftest.$ac_ext
3996   {0, (lt_ptr) 0}
3997 };
3998
3999 #ifdef __cplusplus
4000 }
4001 #endif
4002 EOF
4003           # Now try linking the two files.
4004           mv conftest.$ac_objext conftstm.$ac_objext
4005           save_LIBS="$LIBS"
4006           save_CFLAGS="$CFLAGS"
4007           LIBS="conftstm.$ac_objext"
4008           CFLAGS="$CFLAGS$no_builtin_flag"
4009           if { (eval echo configure:4010: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest$ac_exeext; then
4010             pipe_works=yes
4011           fi
4012           LIBS="$save_LIBS"
4013           CFLAGS="$save_CFLAGS"
4014         else
4015           echo "cannot find nm_test_func in $nlist" >&5
4016         fi
4017       else
4018         echo "cannot find nm_test_var in $nlist" >&5
4019       fi
4020     else
4021       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4022     fi
4023   else
4024     echo "$progname: failed program was:" >&5
4025     cat conftest.$ac_ext >&5
4026   fi
4027   rm -f conftest* conftst*
4028
4029   # Do not use the global_symbol_pipe unless it works.
4030   if test "$pipe_works" = yes; then
4031     break
4032   else
4033     lt_cv_sys_global_symbol_pipe=
4034   fi
4035 done
4036
4037 fi
4038
4039 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4040 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4041   global_symbol_to_cdecl=
4042   global_symbol_to_c_name_address=
4043 else
4044   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4045   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4046 fi
4047 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4048 then
4049   echo "$ac_t""failed" 1>&6
4050 else
4051   echo "$ac_t""ok" 1>&6
4052 fi
4053
4054 for ac_hdr in dlfcn.h
4055 do
4056 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4057 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4058 echo "configure:4059: checking for $ac_hdr" >&5
4059 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4060   echo $ac_n "(cached) $ac_c" 1>&6
4061 else
4062   cat > conftest.$ac_ext <<EOF
4063 #line 4064 "configure"
4064 #include "confdefs.h"
4065 #include <$ac_hdr>
4066 EOF
4067 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4068 { (eval echo configure:4069: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4069 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4070 if test -z "$ac_err"; then
4071   rm -rf conftest*
4072   eval "ac_cv_header_$ac_safe=yes"
4073 else
4074   echo "$ac_err" >&5
4075   echo "configure: failed program was:" >&5
4076   cat conftest.$ac_ext >&5
4077   rm -rf conftest*
4078   eval "ac_cv_header_$ac_safe=no"
4079 fi
4080 rm -f conftest*
4081 fi
4082 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4083   echo "$ac_t""yes" 1>&6
4084     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4085   cat >> confdefs.h <<EOF
4086 #define $ac_tr_hdr 1
4087 EOF
4088  
4089 else
4090   echo "$ac_t""no" 1>&6
4091 fi
4092 done
4093
4094
4095
4096
4097
4098
4099 # Only perform the check for file, if the check method requires it
4100 case $deplibs_check_method in
4101 file_magic*)
4102   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4103     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4104 echo "configure:4105: checking for ${ac_tool_prefix}file" >&5
4105 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4106   echo $ac_n "(cached) $ac_c" 1>&6
4107 else
4108   case $MAGIC_CMD in
4109   /*)
4110   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4111   ;;
4112   ?:/*)
4113   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4114   ;;
4115   *)
4116   ac_save_MAGIC_CMD="$MAGIC_CMD"
4117   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4118   ac_dummy="/usr/bin:$PATH"
4119   for ac_dir in $ac_dummy; do
4120     test -z "$ac_dir" && ac_dir=.
4121     if test -f $ac_dir/${ac_tool_prefix}file; then
4122       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4123       if test -n "$file_magic_test_file"; then
4124         case $deplibs_check_method in
4125         "file_magic "*)
4126           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4127           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4128           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4129             egrep "$file_magic_regex" > /dev/null; then
4130             :
4131           else
4132             cat <<EOF 1>&2
4133
4134 *** Warning: the command libtool uses to detect shared libraries,
4135 *** $file_magic_cmd, produces output that libtool cannot recognize.
4136 *** The result is that libtool may fail to recognize shared libraries
4137 *** as such.  This will affect the creation of libtool libraries that
4138 *** depend on shared libraries, but programs linked with such libtool
4139 *** libraries will work regardless of this problem.  Nevertheless, you
4140 *** may want to report the problem to your system manager and/or to
4141 *** bug-libtool@gnu.org
4142
4143 EOF
4144           fi ;;
4145         esac
4146       fi
4147       break
4148     fi
4149   done
4150   IFS="$ac_save_ifs"
4151   MAGIC_CMD="$ac_save_MAGIC_CMD"
4152   ;;
4153 esac
4154 fi
4155
4156 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4157 if test -n "$MAGIC_CMD"; then
4158   echo "$ac_t""$MAGIC_CMD" 1>&6
4159 else
4160   echo "$ac_t""no" 1>&6
4161 fi
4162
4163 if test -z "$lt_cv_path_MAGIC_CMD"; then
4164   if test -n "$ac_tool_prefix"; then
4165     echo $ac_n "checking for file""... $ac_c" 1>&6
4166 echo "configure:4167: checking for file" >&5
4167 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4168   echo $ac_n "(cached) $ac_c" 1>&6
4169 else
4170   case $MAGIC_CMD in
4171   /*)
4172   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4173   ;;
4174   ?:/*)
4175   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4176   ;;
4177   *)
4178   ac_save_MAGIC_CMD="$MAGIC_CMD"
4179   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4180   ac_dummy="/usr/bin:$PATH"
4181   for ac_dir in $ac_dummy; do
4182     test -z "$ac_dir" && ac_dir=.
4183     if test -f $ac_dir/file; then
4184       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4185       if test -n "$file_magic_test_file"; then
4186         case $deplibs_check_method in
4187         "file_magic "*)
4188           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4189           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4190           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4191             egrep "$file_magic_regex" > /dev/null; then
4192             :
4193           else
4194             cat <<EOF 1>&2
4195
4196 *** Warning: the command libtool uses to detect shared libraries,
4197 *** $file_magic_cmd, produces output that libtool cannot recognize.
4198 *** The result is that libtool may fail to recognize shared libraries
4199 *** as such.  This will affect the creation of libtool libraries that
4200 *** depend on shared libraries, but programs linked with such libtool
4201 *** libraries will work regardless of this problem.  Nevertheless, you
4202 *** may want to report the problem to your system manager and/or to
4203 *** bug-libtool@gnu.org
4204
4205 EOF
4206           fi ;;
4207         esac
4208       fi
4209       break
4210     fi
4211   done
4212   IFS="$ac_save_ifs"
4213   MAGIC_CMD="$ac_save_MAGIC_CMD"
4214   ;;
4215 esac
4216 fi
4217
4218 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4219 if test -n "$MAGIC_CMD"; then
4220   echo "$ac_t""$MAGIC_CMD" 1>&6
4221 else
4222   echo "$ac_t""no" 1>&6
4223 fi
4224
4225   else
4226     MAGIC_CMD=:
4227   fi
4228 fi
4229
4230   fi
4231   ;;
4232 esac
4233
4234 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4235 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4236 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4237 echo "configure:4238: checking for $ac_word" >&5
4238 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4239   echo $ac_n "(cached) $ac_c" 1>&6
4240 else
4241   if test -n "$RANLIB"; then
4242   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4243 else
4244   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4245   ac_dummy="$PATH"
4246   for ac_dir in $ac_dummy; do
4247     test -z "$ac_dir" && ac_dir=.
4248     if test -f $ac_dir/$ac_word; then
4249       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4250       break
4251     fi
4252   done
4253   IFS="$ac_save_ifs"
4254 fi
4255 fi
4256 RANLIB="$ac_cv_prog_RANLIB"
4257 if test -n "$RANLIB"; then
4258   echo "$ac_t""$RANLIB" 1>&6
4259 else
4260   echo "$ac_t""no" 1>&6
4261 fi
4262
4263
4264 if test -z "$ac_cv_prog_RANLIB"; then
4265 if test -n "$ac_tool_prefix"; then
4266   # Extract the first word of "ranlib", so it can be a program name with args.
4267 set dummy ranlib; ac_word=$2
4268 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4269 echo "configure:4270: checking for $ac_word" >&5
4270 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4271   echo $ac_n "(cached) $ac_c" 1>&6
4272 else
4273   if test -n "$RANLIB"; then
4274   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4275 else
4276   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4277   ac_dummy="$PATH"
4278   for ac_dir in $ac_dummy; do
4279     test -z "$ac_dir" && ac_dir=.
4280     if test -f $ac_dir/$ac_word; then
4281       ac_cv_prog_RANLIB="ranlib"
4282       break
4283     fi
4284   done
4285   IFS="$ac_save_ifs"
4286   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4287 fi
4288 fi
4289 RANLIB="$ac_cv_prog_RANLIB"
4290 if test -n "$RANLIB"; then
4291   echo "$ac_t""$RANLIB" 1>&6
4292 else
4293   echo "$ac_t""no" 1>&6
4294 fi
4295
4296 else
4297   RANLIB=":"
4298 fi
4299 fi
4300
4301 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4302 set dummy ${ac_tool_prefix}strip; ac_word=$2
4303 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4304 echo "configure:4305: checking for $ac_word" >&5
4305 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4306   echo $ac_n "(cached) $ac_c" 1>&6
4307 else
4308   if test -n "$STRIP"; then
4309   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4310 else
4311   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4312   ac_dummy="$PATH"
4313   for ac_dir in $ac_dummy; do
4314     test -z "$ac_dir" && ac_dir=.
4315     if test -f $ac_dir/$ac_word; then
4316       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4317       break
4318     fi
4319   done
4320   IFS="$ac_save_ifs"
4321 fi
4322 fi
4323 STRIP="$ac_cv_prog_STRIP"
4324 if test -n "$STRIP"; then
4325   echo "$ac_t""$STRIP" 1>&6
4326 else
4327   echo "$ac_t""no" 1>&6
4328 fi
4329
4330
4331 if test -z "$ac_cv_prog_STRIP"; then
4332 if test -n "$ac_tool_prefix"; then
4333   # Extract the first word of "strip", so it can be a program name with args.
4334 set dummy strip; ac_word=$2
4335 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4336 echo "configure:4337: checking for $ac_word" >&5
4337 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4338   echo $ac_n "(cached) $ac_c" 1>&6
4339 else
4340   if test -n "$STRIP"; then
4341   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4342 else
4343   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4344   ac_dummy="$PATH"
4345   for ac_dir in $ac_dummy; do
4346     test -z "$ac_dir" && ac_dir=.
4347     if test -f $ac_dir/$ac_word; then
4348       ac_cv_prog_STRIP="strip"
4349       break
4350     fi
4351   done
4352   IFS="$ac_save_ifs"
4353   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4354 fi
4355 fi
4356 STRIP="$ac_cv_prog_STRIP"
4357 if test -n "$STRIP"; then
4358   echo "$ac_t""$STRIP" 1>&6
4359 else
4360   echo "$ac_t""no" 1>&6
4361 fi
4362
4363 else
4364   STRIP=":"
4365 fi
4366 fi
4367
4368
4369 enable_dlopen=yes
4370 enable_win32_dll=yes
4371
4372 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4373 if test "${enable_libtool_lock+set}" = set; then
4374   enableval="$enable_libtool_lock"
4375   :
4376 fi
4377
4378 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4379
4380 # Some flags need to be propagated to the compiler or linker for good
4381 # libtool support.
4382 case $host in
4383 *-*-irix6*)
4384   # Find out which ABI we are using.
4385   echo '#line 4386 "configure"' > conftest.$ac_ext
4386   if { (eval echo configure:4387: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4387     case `/usr/bin/file conftest.$ac_objext` in
4388     *32-bit*)
4389       LD="${LD-ld} -32"
4390       ;;
4391     *N32*)
4392       LD="${LD-ld} -n32"
4393       ;;
4394     *64-bit*)
4395       LD="${LD-ld} -64"
4396       ;;
4397     esac
4398   fi
4399   rm -rf conftest*
4400   ;;
4401
4402 *-*-sco3.2v5*)
4403   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4404   SAVE_CFLAGS="$CFLAGS"
4405   CFLAGS="$CFLAGS -belf"
4406   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4407 echo "configure:4408: checking whether the C compiler needs -belf" >&5
4408 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4409   echo $ac_n "(cached) $ac_c" 1>&6
4410 else
4411   
4412      ac_ext=c
4413 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4414 ac_cpp='$CPP $CPPFLAGS'
4415 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4416 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4417 cross_compiling=$ac_cv_prog_cc_cross
4418
4419      cat > conftest.$ac_ext <<EOF
4420 #line 4421 "configure"
4421 #include "confdefs.h"
4422
4423 int main() {
4424
4425 ; return 0; }
4426 EOF
4427 if { (eval echo configure:4428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4428   rm -rf conftest*
4429   lt_cv_cc_needs_belf=yes
4430 else
4431   echo "configure: failed program was:" >&5
4432   cat conftest.$ac_ext >&5
4433   rm -rf conftest*
4434   lt_cv_cc_needs_belf=no
4435 fi
4436 rm -f conftest*
4437      ac_ext=c
4438 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4439 ac_cpp='$CPP $CPPFLAGS'
4440 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4441 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4442 cross_compiling=$ac_cv_prog_cc_cross
4443
4444 fi
4445
4446 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4447   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4448     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4449     CFLAGS="$SAVE_CFLAGS"
4450   fi
4451   ;;
4452
4453 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4454   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4455 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4456 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4457 echo "configure:4458: checking for $ac_word" >&5
4458 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4459   echo $ac_n "(cached) $ac_c" 1>&6
4460 else
4461   if test -n "$DLLTOOL"; then
4462   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4463 else
4464   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4465   ac_dummy="$PATH"
4466   for ac_dir in $ac_dummy; do
4467     test -z "$ac_dir" && ac_dir=.
4468     if test -f $ac_dir/$ac_word; then
4469       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4470       break
4471     fi
4472   done
4473   IFS="$ac_save_ifs"
4474 fi
4475 fi
4476 DLLTOOL="$ac_cv_prog_DLLTOOL"
4477 if test -n "$DLLTOOL"; then
4478   echo "$ac_t""$DLLTOOL" 1>&6
4479 else
4480   echo "$ac_t""no" 1>&6
4481 fi
4482
4483
4484 if test -z "$ac_cv_prog_DLLTOOL"; then
4485 if test -n "$ac_tool_prefix"; then
4486   # Extract the first word of "dlltool", so it can be a program name with args.
4487 set dummy dlltool; ac_word=$2
4488 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4489 echo "configure:4490: checking for $ac_word" >&5
4490 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4491   echo $ac_n "(cached) $ac_c" 1>&6
4492 else
4493   if test -n "$DLLTOOL"; then
4494   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4495 else
4496   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4497   ac_dummy="$PATH"
4498   for ac_dir in $ac_dummy; do
4499     test -z "$ac_dir" && ac_dir=.
4500     if test -f $ac_dir/$ac_word; then
4501       ac_cv_prog_DLLTOOL="dlltool"
4502       break
4503     fi
4504   done
4505   IFS="$ac_save_ifs"
4506   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4507 fi
4508 fi
4509 DLLTOOL="$ac_cv_prog_DLLTOOL"
4510 if test -n "$DLLTOOL"; then
4511   echo "$ac_t""$DLLTOOL" 1>&6
4512 else
4513   echo "$ac_t""no" 1>&6
4514 fi
4515
4516 else
4517   DLLTOOL="false"
4518 fi
4519 fi
4520
4521   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4522 set dummy ${ac_tool_prefix}as; ac_word=$2
4523 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4524 echo "configure:4525: checking for $ac_word" >&5
4525 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4526   echo $ac_n "(cached) $ac_c" 1>&6
4527 else
4528   if test -n "$AS"; then
4529   ac_cv_prog_AS="$AS" # Let the user override the test.
4530 else
4531   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4532   ac_dummy="$PATH"
4533   for ac_dir in $ac_dummy; do
4534     test -z "$ac_dir" && ac_dir=.
4535     if test -f $ac_dir/$ac_word; then
4536       ac_cv_prog_AS="${ac_tool_prefix}as"
4537       break
4538     fi
4539   done
4540   IFS="$ac_save_ifs"
4541 fi
4542 fi
4543 AS="$ac_cv_prog_AS"
4544 if test -n "$AS"; then
4545   echo "$ac_t""$AS" 1>&6
4546 else
4547   echo "$ac_t""no" 1>&6
4548 fi
4549
4550
4551 if test -z "$ac_cv_prog_AS"; then
4552 if test -n "$ac_tool_prefix"; then
4553   # Extract the first word of "as", so it can be a program name with args.
4554 set dummy as; ac_word=$2
4555 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4556 echo "configure:4557: checking for $ac_word" >&5
4557 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4558   echo $ac_n "(cached) $ac_c" 1>&6
4559 else
4560   if test -n "$AS"; then
4561   ac_cv_prog_AS="$AS" # Let the user override the test.
4562 else
4563   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4564   ac_dummy="$PATH"
4565   for ac_dir in $ac_dummy; do
4566     test -z "$ac_dir" && ac_dir=.
4567     if test -f $ac_dir/$ac_word; then
4568       ac_cv_prog_AS="as"
4569       break
4570     fi
4571   done
4572   IFS="$ac_save_ifs"
4573   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4574 fi
4575 fi
4576 AS="$ac_cv_prog_AS"
4577 if test -n "$AS"; then
4578   echo "$ac_t""$AS" 1>&6
4579 else
4580   echo "$ac_t""no" 1>&6
4581 fi
4582
4583 else
4584   AS="false"
4585 fi
4586 fi
4587
4588   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4589 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4590 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4591 echo "configure:4592: checking for $ac_word" >&5
4592 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4593   echo $ac_n "(cached) $ac_c" 1>&6
4594 else
4595   if test -n "$OBJDUMP"; then
4596   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4597 else
4598   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4599   ac_dummy="$PATH"
4600   for ac_dir in $ac_dummy; do
4601     test -z "$ac_dir" && ac_dir=.
4602     if test -f $ac_dir/$ac_word; then
4603       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4604       break
4605     fi
4606   done
4607   IFS="$ac_save_ifs"
4608 fi
4609 fi
4610 OBJDUMP="$ac_cv_prog_OBJDUMP"
4611 if test -n "$OBJDUMP"; then
4612   echo "$ac_t""$OBJDUMP" 1>&6
4613 else
4614   echo "$ac_t""no" 1>&6
4615 fi
4616
4617
4618 if test -z "$ac_cv_prog_OBJDUMP"; then
4619 if test -n "$ac_tool_prefix"; then
4620   # Extract the first word of "objdump", so it can be a program name with args.
4621 set dummy objdump; ac_word=$2
4622 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4623 echo "configure:4624: checking for $ac_word" >&5
4624 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4625   echo $ac_n "(cached) $ac_c" 1>&6
4626 else
4627   if test -n "$OBJDUMP"; then
4628   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4629 else
4630   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4631   ac_dummy="$PATH"
4632   for ac_dir in $ac_dummy; do
4633     test -z "$ac_dir" && ac_dir=.
4634     if test -f $ac_dir/$ac_word; then
4635       ac_cv_prog_OBJDUMP="objdump"
4636       break
4637     fi
4638   done
4639   IFS="$ac_save_ifs"
4640   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4641 fi
4642 fi
4643 OBJDUMP="$ac_cv_prog_OBJDUMP"
4644 if test -n "$OBJDUMP"; then
4645   echo "$ac_t""$OBJDUMP" 1>&6
4646 else
4647   echo "$ac_t""no" 1>&6
4648 fi
4649
4650 else
4651   OBJDUMP="false"
4652 fi
4653 fi
4654
4655
4656   # recent cygwin and mingw systems supply a stub DllMain which the user
4657   # can override, but on older systems we have to supply one
4658   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4659 echo "configure:4660: checking if libtool should supply DllMain function" >&5
4660 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4661   echo $ac_n "(cached) $ac_c" 1>&6
4662 else
4663   cat > conftest.$ac_ext <<EOF
4664 #line 4665 "configure"
4665 #include "confdefs.h"
4666
4667 int main() {
4668 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4669       DllMain (0, 0, 0);
4670 ; return 0; }
4671 EOF
4672 if { (eval echo configure:4673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4673   rm -rf conftest*
4674   lt_cv_need_dllmain=no
4675 else
4676   echo "configure: failed program was:" >&5
4677   cat conftest.$ac_ext >&5
4678   rm -rf conftest*
4679   lt_cv_need_dllmain=yes
4680 fi
4681 rm -f conftest*
4682 fi
4683
4684 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4685
4686   case $host/$CC in
4687   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4688     # old mingw systems require "-dll" to link a DLL, while more recent ones
4689     # require "-mdll"
4690     SAVE_CFLAGS="$CFLAGS"
4691     CFLAGS="$CFLAGS -mdll"
4692     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4693 echo "configure:4694: checking how to link DLLs" >&5
4694 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4695   echo $ac_n "(cached) $ac_c" 1>&6
4696 else
4697   cat > conftest.$ac_ext <<EOF
4698 #line 4699 "configure"
4699 #include "confdefs.h"
4700
4701 int main() {
4702
4703 ; return 0; }
4704 EOF
4705 if { (eval echo configure:4706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4706   rm -rf conftest*
4707   lt_cv_cc_dll_switch=-mdll
4708 else
4709   echo "configure: failed program was:" >&5
4710   cat conftest.$ac_ext >&5
4711   rm -rf conftest*
4712   lt_cv_cc_dll_switch=-dll
4713 fi
4714 rm -f conftest*
4715 fi
4716
4717 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4718     CFLAGS="$SAVE_CFLAGS" ;;
4719   *-*-cygwin* | *-*-pw32*)
4720     # cygwin systems need to pass --dll to the linker, and not link
4721     # crt.o which will require a WinMain@16 definition.
4722     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4723   esac
4724   ;;
4725   
4726 esac
4727
4728 # Sed substitution that helps us do robust quoting.  It backslashifies
4729 # metacharacters that are still active within double-quoted strings.
4730 Xsed='sed -e s/^X//'
4731 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4732
4733 # Same as above, but do not quote variable references.
4734 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4735
4736 # Sed substitution to delay expansion of an escaped shell variable in a
4737 # double_quote_subst'ed string.
4738 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4739
4740 # Constants:
4741 rm="rm -f"
4742
4743 # Global variables:
4744 default_ofile=libtool
4745 can_build_shared=yes
4746
4747 # All known linkers require a `.a' archive for static linking (except M$VC,
4748 # which needs '.lib').
4749 libext=a
4750 ltmain="$ac_aux_dir/ltmain.sh"
4751 ofile="$default_ofile"
4752 with_gnu_ld="$lt_cv_prog_gnu_ld"
4753 need_locks="$enable_libtool_lock"
4754
4755 old_CC="$CC"
4756 old_CFLAGS="$CFLAGS"
4757
4758 # Set sane defaults for various variables
4759 test -z "$AR" && AR=ar
4760 test -z "$AR_FLAGS" && AR_FLAGS=cru
4761 test -z "$AS" && AS=as
4762 test -z "$CC" && CC=cc
4763 test -z "$DLLTOOL" && DLLTOOL=dlltool
4764 test -z "$LD" && LD=ld
4765 test -z "$LN_S" && LN_S="ln -s"
4766 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4767 test -z "$NM" && NM=nm
4768 test -z "$OBJDUMP" && OBJDUMP=objdump
4769 test -z "$RANLIB" && RANLIB=:
4770 test -z "$STRIP" && STRIP=:
4771 test -z "$ac_objext" && ac_objext=o
4772
4773 if test x"$host" != x"$build"; then
4774   ac_tool_prefix=${host_alias}-
4775 else
4776   ac_tool_prefix=
4777 fi
4778
4779 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4780 case $host_os in
4781 linux-gnu*) ;;
4782 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4783 esac
4784
4785 case $host_os in
4786 aix3*)
4787   # AIX sometimes has problems with the GCC collect2 program.  For some
4788   # reason, if we set the COLLECT_NAMES environment variable, the problems
4789   # vanish in a puff of smoke.
4790   if test "X${COLLECT_NAMES+set}" != Xset; then
4791     COLLECT_NAMES=
4792     export COLLECT_NAMES
4793   fi
4794   ;;
4795 esac
4796
4797 # Determine commands to create old-style static archives.
4798 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4799 old_postinstall_cmds='chmod 644 $oldlib'
4800 old_postuninstall_cmds=
4801
4802 if test -n "$RANLIB"; then
4803   case $host_os in
4804   openbsd*)
4805     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4806     ;;
4807   *)
4808     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4809     ;;
4810   esac
4811   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4812 fi
4813
4814 # Allow CC to be a program name with arguments.
4815 set dummy $CC
4816 compiler="$2"
4817
4818 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4819 echo "configure:4820: checking for objdir" >&5
4820 rm -f .libs 2>/dev/null
4821 mkdir .libs 2>/dev/null
4822 if test -d .libs; then
4823   objdir=.libs
4824 else
4825   # MS-DOS does not allow filenames that begin with a dot.
4826   objdir=_libs
4827 fi
4828 rmdir .libs 2>/dev/null
4829 echo "$ac_t""$objdir" 1>&6
4830
4831
4832 # Check whether --with-pic or --without-pic was given.
4833 if test "${with_pic+set}" = set; then
4834   withval="$with_pic"
4835   pic_mode="$withval"
4836 else
4837   pic_mode=default
4838 fi
4839
4840 test -z "$pic_mode" && pic_mode=default
4841
4842 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4843 # in isolation, and that seeing it set (from the cache) indicates that
4844 # the associated values are set (in the cache) correctly too.
4845 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4846 echo "configure:4847: checking for $compiler option to produce PIC" >&5
4847 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4848   echo $ac_n "(cached) $ac_c" 1>&6
4849 else
4850    lt_cv_prog_cc_pic=
4851   lt_cv_prog_cc_shlib=
4852   lt_cv_prog_cc_wl=
4853   lt_cv_prog_cc_static=
4854   lt_cv_prog_cc_no_builtin=
4855   lt_cv_prog_cc_can_build_shared=$can_build_shared
4856
4857   if test "$GCC" = yes; then
4858     lt_cv_prog_cc_wl='-Wl,'
4859     lt_cv_prog_cc_static='-static'
4860
4861     case $host_os in
4862     aix*)
4863       # Below there is a dirty hack to force normal static linking with -ldl
4864       # The problem is because libdl dynamically linked with both libc and
4865       # libC (AIX C++ library), which obviously doesn't included in libraries
4866       # list by gcc. This cause undefined symbols with -static flags.
4867       # This hack allows C programs to be linked with "-static -ldl", but
4868       # not sure about C++ programs.
4869       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4870       ;;
4871     amigaos*)
4872       # FIXME: we need at least 68020 code to build shared libraries, but
4873       # adding the `-m68020' flag to GCC prevents building anything better,
4874       # like `-m68040'.
4875       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4876       ;;
4877     beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
4878       # PIC is the default for these OSes.
4879       ;;
4880     darwin* | rhapsody*)
4881       # PIC is the default on this platform
4882       # Common symbols not allowed in MH_DYLIB files
4883       lt_cv_prog_cc_pic='-fno-common'
4884       ;;
4885     cygwin* | mingw* | pw32* | os2*)
4886       # This hack is so that the source file can tell whether it is being
4887       # built for inclusion in a dll (and should export symbols for example).
4888       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4889       ;;
4890     sysv4*MP*)
4891       if test -d /usr/nec; then
4892          lt_cv_prog_cc_pic=-Kconform_pic
4893       fi
4894       ;;
4895     *)
4896       lt_cv_prog_cc_pic='-fPIC'
4897       ;;
4898     esac
4899   else
4900     # PORTME Check for PIC flags for the system compiler.
4901     case $host_os in
4902     aix3* | aix4* | aix5*)
4903       lt_cv_prog_cc_wl='-Wl,'
4904       # All AIX code is PIC.
4905       if test "$host_cpu" = ia64; then
4906         # AIX 5 now supports IA64 processor
4907         lt_cv_prog_cc_static='-Bstatic'
4908       else
4909         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4910       fi
4911       ;;
4912
4913     hpux9* | hpux10* | hpux11*)
4914       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4915       lt_cv_prog_cc_wl='-Wl,'
4916       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4917       lt_cv_prog_cc_pic='+Z'
4918       ;;
4919
4920     irix5* | irix6* | nonstopux*)
4921       lt_cv_prog_cc_wl='-Wl,'
4922       lt_cv_prog_cc_static='-non_shared'
4923       # PIC (with -KPIC) is the default.
4924       ;;
4925
4926     cygwin* | mingw* | pw32* | os2*)
4927       # This hack is so that the source file can tell whether it is being
4928       # built for inclusion in a dll (and should export symbols for example).
4929       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4930       ;;
4931
4932     newsos6)
4933       lt_cv_prog_cc_pic='-KPIC'
4934       lt_cv_prog_cc_static='-Bstatic'
4935       ;;
4936     
4937     openedition)
4938       # XPLINK code is PIC by default
4939       ;;
4940
4941     osf3* | osf4* | osf5*)
4942       # All OSF/1 code is PIC.
4943       lt_cv_prog_cc_wl='-Wl,'
4944       lt_cv_prog_cc_static='-non_shared'
4945       ;;
4946
4947     sco3.2v5*)
4948       lt_cv_prog_cc_pic='-Kpic'
4949       lt_cv_prog_cc_static='-dn'
4950       lt_cv_prog_cc_shlib='-belf'
4951       ;;
4952
4953     solaris*)
4954       lt_cv_prog_cc_pic='-KPIC'
4955       lt_cv_prog_cc_static='-Bstatic'
4956       lt_cv_prog_cc_wl='-Wl,'
4957       ;;
4958
4959     sunos4*)
4960       lt_cv_prog_cc_pic='-PIC'
4961       lt_cv_prog_cc_static='-Bstatic'
4962       lt_cv_prog_cc_wl='-Qoption ld '
4963       ;;
4964
4965     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
4966       lt_cv_prog_cc_pic='-KPIC'
4967       lt_cv_prog_cc_static='-Bstatic'
4968       lt_cv_prog_cc_wl='-Wl,'
4969       ;;
4970
4971     uts4*)
4972       lt_cv_prog_cc_pic='-pic'
4973       lt_cv_prog_cc_static='-Bstatic'
4974       ;;
4975
4976     sysv4*MP*)
4977       if test -d /usr/nec ;then
4978         lt_cv_prog_cc_pic='-Kconform_pic'
4979         lt_cv_prog_cc_static='-Bstatic'
4980       fi
4981       ;;
4982
4983     *)
4984       lt_cv_prog_cc_can_build_shared=no
4985       ;;
4986     esac
4987   fi
4988
4989 fi
4990
4991 if test -z "$lt_cv_prog_cc_pic"; then
4992   echo "$ac_t""none" 1>&6
4993 else
4994   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
4995
4996   # Check to make sure the pic_flag actually works.
4997   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
4998 echo "configure:4999: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
4999   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5000   echo $ac_n "(cached) $ac_c" 1>&6
5001 else
5002       save_CFLAGS="$CFLAGS"
5003     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5004     cat > conftest.$ac_ext <<EOF
5005 #line 5006 "configure"
5006 #include "confdefs.h"
5007
5008 int main() {
5009
5010 ; return 0; }
5011 EOF
5012 if { (eval echo configure:5013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5013   rm -rf conftest*
5014         case $host_os in
5015       hpux9* | hpux10* | hpux11*)
5016         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5017         # they create non-PIC objects.  So, if there were any warnings, we
5018         # assume that PIC is not supported.
5019         if test -s conftest.err; then
5020           lt_cv_prog_cc_pic_works=no
5021         else
5022           lt_cv_prog_cc_pic_works=yes
5023         fi
5024         ;;
5025       *)
5026         lt_cv_prog_cc_pic_works=yes
5027         ;;
5028       esac
5029     
5030 else
5031   echo "configure: failed program was:" >&5
5032   cat conftest.$ac_ext >&5
5033   rm -rf conftest*
5034         lt_cv_prog_cc_pic_works=no
5035     
5036 fi
5037 rm -f conftest*
5038     CFLAGS="$save_CFLAGS"
5039   
5040 fi
5041
5042
5043   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5044     lt_cv_prog_cc_pic=
5045     lt_cv_prog_cc_can_build_shared=no
5046   else
5047     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5048   fi
5049
5050   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5051 fi
5052
5053 # Check for any special shared library compilation flags.
5054 if test -n "$lt_cv_prog_cc_shlib"; then
5055   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5056   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5057   else
5058    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5059     lt_cv_prog_cc_can_build_shared=no
5060   fi
5061 fi
5062
5063 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5064 echo "configure:5065: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5065 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5066   echo $ac_n "(cached) $ac_c" 1>&6
5067 else
5068     lt_cv_prog_cc_static_works=no
5069   save_LDFLAGS="$LDFLAGS"
5070   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5071   cat > conftest.$ac_ext <<EOF
5072 #line 5073 "configure"
5073 #include "confdefs.h"
5074
5075 int main() {
5076
5077 ; return 0; }
5078 EOF
5079 if { (eval echo configure:5080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5080   rm -rf conftest*
5081   lt_cv_prog_cc_static_works=yes
5082 else
5083   echo "configure: failed program was:" >&5
5084   cat conftest.$ac_ext >&5
5085 fi
5086 rm -f conftest*
5087   LDFLAGS="$save_LDFLAGS"
5088
5089 fi
5090
5091
5092 # Belt *and* braces to stop my trousers falling down:
5093 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5094 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5095
5096 pic_flag="$lt_cv_prog_cc_pic"
5097 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5098 wl="$lt_cv_prog_cc_wl"
5099 link_static_flag="$lt_cv_prog_cc_static"
5100 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5101 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5102
5103
5104 # Check to see if options -o and -c are simultaneously supported by compiler
5105 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5106 echo "configure:5107: checking if $compiler supports -c -o file.$ac_objext" >&5
5107 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5108   echo $ac_n "(cached) $ac_c" 1>&6
5109 else
5110   
5111 $rm -r conftest 2>/dev/null
5112 mkdir conftest
5113 cd conftest
5114 echo "int some_variable = 0;" > conftest.$ac_ext
5115 mkdir out
5116 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5117 # that will create temporary files in the current directory regardless of
5118 # the output directory.  Thus, making CWD read-only will cause this test
5119 # to fail, enabling locking or at least warning the user not to do parallel
5120 # builds.
5121 chmod -w .
5122 save_CFLAGS="$CFLAGS"
5123 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5124 compiler_c_o=no
5125 if { (eval echo configure:5126: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5126   # The compiler can only warn and ignore the option if not recognized
5127   # So say no if there are warnings
5128   if test -s out/conftest.err; then
5129     lt_cv_compiler_c_o=no
5130   else
5131     lt_cv_compiler_c_o=yes
5132   fi
5133 else
5134   # Append any errors to the config.log.
5135   cat out/conftest.err 1>&5
5136   lt_cv_compiler_c_o=no
5137 fi
5138 CFLAGS="$save_CFLAGS"
5139 chmod u+w .
5140 $rm conftest* out/*
5141 rmdir out
5142 cd ..
5143 rmdir conftest
5144 $rm -r conftest 2>/dev/null
5145
5146 fi
5147
5148 compiler_c_o=$lt_cv_compiler_c_o
5149 echo "$ac_t""$compiler_c_o" 1>&6
5150
5151 if test x"$compiler_c_o" = x"yes"; then
5152   # Check to see if we can write to a .lo
5153   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5154 echo "configure:5155: checking if $compiler supports -c -o file.lo" >&5
5155   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5156   echo $ac_n "(cached) $ac_c" 1>&6
5157 else
5158   
5159   lt_cv_compiler_o_lo=no
5160   save_CFLAGS="$CFLAGS"
5161   CFLAGS="$CFLAGS -c -o conftest.lo"
5162   save_objext="$ac_objext"
5163   ac_objext=lo
5164   cat > conftest.$ac_ext <<EOF
5165 #line 5166 "configure"
5166 #include "confdefs.h"
5167
5168 int main() {
5169 int some_variable = 0;
5170 ; return 0; }
5171 EOF
5172 if { (eval echo configure:5173: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5173   rm -rf conftest*
5174       # The compiler can only warn and ignore the option if not recognized
5175     # So say no if there are warnings
5176     if test -s conftest.err; then
5177       lt_cv_compiler_o_lo=no
5178     else
5179       lt_cv_compiler_o_lo=yes
5180     fi
5181   
5182 else
5183   echo "configure: failed program was:" >&5
5184   cat conftest.$ac_ext >&5
5185 fi
5186 rm -f conftest*
5187   ac_objext="$save_objext"
5188   CFLAGS="$save_CFLAGS"
5189   
5190 fi
5191
5192   compiler_o_lo=$lt_cv_compiler_o_lo
5193   echo "$ac_t""$compiler_o_lo" 1>&6
5194 else
5195   compiler_o_lo=no
5196 fi
5197
5198 # Check to see if we can do hard links to lock some files if needed
5199 hard_links="nottested"
5200 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5201   # do not overwrite the value of need_locks provided by the user
5202   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5203 echo "configure:5204: checking if we can lock with hard links" >&5
5204   hard_links=yes
5205   $rm conftest*
5206   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5207   touch conftest.a
5208   ln conftest.a conftest.b 2>&5 || hard_links=no
5209   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5210   echo "$ac_t""$hard_links" 1>&6
5211   if test "$hard_links" = no; then
5212     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5213     need_locks=warn
5214   fi
5215 else
5216   need_locks=no
5217 fi
5218
5219 if test "$GCC" = yes; then
5220   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5221   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5222 echo "configure:5223: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5223   echo "int some_variable = 0;" > conftest.$ac_ext
5224   save_CFLAGS="$CFLAGS"
5225   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5226   compiler_rtti_exceptions=no
5227   cat > conftest.$ac_ext <<EOF
5228 #line 5229 "configure"
5229 #include "confdefs.h"
5230
5231 int main() {
5232 int some_variable = 0;
5233 ; return 0; }
5234 EOF
5235 if { (eval echo configure:5236: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5236   rm -rf conftest*
5237       # The compiler can only warn and ignore the option if not recognized
5238     # So say no if there are warnings
5239     if test -s conftest.err; then
5240       compiler_rtti_exceptions=no
5241     else
5242       compiler_rtti_exceptions=yes
5243     fi
5244   
5245 else
5246   echo "configure: failed program was:" >&5
5247   cat conftest.$ac_ext >&5
5248 fi
5249 rm -f conftest*
5250   CFLAGS="$save_CFLAGS"
5251   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5252
5253   if test "$compiler_rtti_exceptions" = "yes"; then
5254     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5255   else
5256     no_builtin_flag=' -fno-builtin'
5257   fi
5258 fi
5259
5260 # See if the linker supports building shared libraries.
5261 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5262 echo "configure:5263: checking whether the linker ($LD) supports shared libraries" >&5
5263
5264 allow_undefined_flag=
5265 no_undefined_flag=
5266 need_lib_prefix=unknown
5267 need_version=unknown
5268 # when you set need_version to no, make sure it does not cause -set_version
5269 # flags to be left without arguments
5270 archive_cmds=
5271 archive_expsym_cmds=
5272 old_archive_from_new_cmds=
5273 old_archive_from_expsyms_cmds=
5274 export_dynamic_flag_spec=
5275 whole_archive_flag_spec=
5276 thread_safe_flag_spec=
5277 hardcode_into_libs=no
5278 hardcode_libdir_flag_spec=
5279 hardcode_libdir_separator=
5280 hardcode_direct=no
5281 hardcode_minus_L=no
5282 hardcode_shlibpath_var=unsupported
5283 runpath_var=
5284 link_all_deplibs=unknown
5285 always_export_symbols=no
5286 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5287 # include_expsyms should be a list of space-separated symbols to be *always*
5288 # included in the symbol list
5289 include_expsyms=
5290 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5291 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5292 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5293 # as well as any symbol that contains `d'.
5294 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5295 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5296 # platforms (ab)use it in PIC code, but their linkers get confused if
5297 # the symbol is explicitly referenced.  Since portable code cannot
5298 # rely on this symbol name, it's probably fine to never include it in
5299 # preloaded symbol tables.
5300 extract_expsyms_cmds=
5301
5302 case $host_os in
5303 cygwin* | mingw* | pw32*)
5304   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5305   # When not using gcc, we currently assume that we are using
5306   # Microsoft Visual C++.
5307   if test "$GCC" != yes; then
5308     with_gnu_ld=no
5309   fi
5310   ;;
5311 openbsd*)
5312   with_gnu_ld=no
5313   ;;
5314 esac
5315
5316 ld_shlibs=yes
5317 if test "$with_gnu_ld" = yes; then
5318   # If archive_cmds runs LD, not CC, wlarc should be empty
5319   wlarc='${wl}'
5320
5321   # See if GNU ld supports shared libraries.
5322   case $host_os in
5323   aix3* | aix4* | aix5*)
5324     # On AIX, the GNU linker is very broken
5325     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5326     ld_shlibs=no
5327     cat <<EOF 1>&2
5328
5329 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5330 *** to be unable to reliably create shared libraries on AIX.
5331 *** Therefore, libtool is disabling shared libraries support.  If you
5332 *** really care for shared libraries, you may want to modify your PATH
5333 *** so that a non-GNU linker is found, and then restart.
5334
5335 EOF
5336     ;;
5337
5338   amigaos*)
5339     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)'
5340     hardcode_libdir_flag_spec='-L$libdir'
5341     hardcode_minus_L=yes
5342
5343     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5344     # that the semantics of dynamic libraries on AmigaOS, at least up
5345     # to version 4, is to share data among multiple programs linked
5346     # with the same dynamic library.  Since this doesn't match the
5347     # behavior of shared libraries on other platforms, we can use
5348     # them.
5349     ld_shlibs=no
5350     ;;
5351
5352   beos*)
5353     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5354       allow_undefined_flag=unsupported
5355       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5356       # support --undefined.  This deserves some investigation.  FIXME
5357       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5358     else
5359       ld_shlibs=no
5360     fi
5361     ;;
5362
5363   cygwin* | mingw* | pw32*)
5364     # hardcode_libdir_flag_spec is actually meaningless, as there is
5365     # no search path for DLLs.
5366     hardcode_libdir_flag_spec='-L$libdir'
5367     allow_undefined_flag=unsupported
5368     always_export_symbols=yes
5369
5370     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5371       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5372       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5373       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5374       else $CC -o impgen impgen.c ; fi)~
5375       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5376
5377     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5378
5379     # cygwin and mingw dlls have different entry points and sets of symbols
5380     # to exclude.
5381     # FIXME: what about values for MSVC?
5382     dll_entry=__cygwin_dll_entry@12
5383     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5384     case $host_os in
5385     mingw*)
5386       # mingw values
5387       dll_entry=_DllMainCRTStartup@12
5388       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5389       ;;
5390     esac
5391
5392     # mingw and cygwin differ, and it's simplest to just exclude the union
5393     # of the two symbol sets.
5394     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5395
5396     # recent cygwin and mingw systems supply a stub DllMain which the user
5397     # can override, but on older systems we have to supply one (in ltdll.c)
5398     if test "x$lt_cv_need_dllmain" = "xyes"; then
5399       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5400       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~
5401         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5402     else
5403       ltdll_obj=
5404       ltdll_cmds=
5405     fi
5406
5407     # Extract the symbol export list from an `--export-all' def file,
5408     # then regenerate the def file from the symbol export list, so that
5409     # the compiled dll only exports the symbol export list.
5410     # Be careful not to strip the DATA tag left be newer dlltools.
5411     export_symbols_cmds="$ltdll_cmds"'
5412       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5413       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5414
5415     # If the export-symbols file already is a .def file (1st line
5416     # is EXPORTS), use it as is.
5417     # If DATA tags from a recent dlltool are present, honour them!
5418     archive_expsym_cmds='if test "x`sed 1q $export_symbols`" = xEXPORTS; then
5419         cp $export_symbols $output_objdir/$soname-def;
5420       else
5421         echo EXPORTS > $output_objdir/$soname-def;
5422         _lt_hint=1;
5423         cat $export_symbols | while read symbol; do
5424          set dummy \$symbol;
5425          case \$# in
5426            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5427            4) echo "   \$2 \$3 \$4 ; " >> $output_objdir/$soname-def; _lt_hint=`expr \$_lt_hint - 1`;;
5428            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5429          esac;
5430          _lt_hint=`expr 1 + \$_lt_hint`;
5431         done;
5432       fi~
5433       '"$ltdll_cmds"'
5434       $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~
5435       $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~
5436       $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~
5437       $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~
5438       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5439     ;;
5440
5441   netbsd*)
5442     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5443       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5444       wlarc=
5445     else
5446       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5447       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5448     fi
5449     ;;
5450
5451   solaris* | sysv5*)
5452     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5453       ld_shlibs=no
5454       cat <<EOF 1>&2
5455
5456 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5457 *** create shared libraries on Solaris systems.  Therefore, libtool
5458 *** is disabling shared libraries support.  We urge you to upgrade GNU
5459 *** binutils to release 2.9.1 or newer.  Another option is to modify
5460 *** your PATH or compiler configuration so that the native linker is
5461 *** used, and then restart.
5462
5463 EOF
5464     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5465       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5466       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5467     else
5468       ld_shlibs=no
5469     fi
5470     ;;
5471
5472   sunos4*)
5473     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5474     wlarc=
5475     hardcode_direct=yes
5476     hardcode_shlibpath_var=no
5477     ;;
5478
5479   *)
5480     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5481       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5482       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5483     else
5484       ld_shlibs=no
5485     fi
5486     ;;
5487   esac
5488
5489   if test "$ld_shlibs" = yes; then
5490     runpath_var=LD_RUN_PATH
5491     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5492     export_dynamic_flag_spec='${wl}--export-dynamic'
5493     case $host_os in
5494     cygwin* | mingw* | pw32*)
5495       # dlltool doesn't understand --whole-archive et. al.
5496       whole_archive_flag_spec=
5497       ;;
5498     *)
5499       # ancient GNU ld didn't support --whole-archive et. al.
5500       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5501         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5502       else
5503         whole_archive_flag_spec=
5504       fi
5505       ;;
5506     esac
5507   fi
5508 else
5509   # PORTME fill in a description of your system's linker (not GNU ld)
5510   case $host_os in
5511   aix3*)
5512     allow_undefined_flag=unsupported
5513     always_export_symbols=yes
5514     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'
5515     # Note: this linker hardcodes the directories in LIBPATH if there
5516     # are no directories specified by -L.
5517     hardcode_minus_L=yes
5518     if test "$GCC" = yes && test -z "$link_static_flag"; then
5519       # Neither direct hardcoding nor static linking is supported with a
5520       # broken collect2.
5521       hardcode_direct=unsupported
5522     fi
5523     ;;
5524
5525   aix4* | aix5*)
5526     if test "$host_cpu" = ia64; then
5527       # On IA64, the linker does run time linking by default, so we don't
5528       # have to do anything special.
5529       aix_use_runtimelinking=no
5530       exp_sym_flag='-Bexport'
5531       no_entry_flag=""
5532     else
5533       aix_use_runtimelinking=no
5534
5535       # Test if we are trying to use run time linking or normal
5536       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5537       # need to do runtime linking.
5538       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5539         for ld_flag in $LDFLAGS; do
5540           case $ld_flag in
5541           *-brtl*)
5542             aix_use_runtimelinking=yes
5543             break
5544           ;;
5545           esac
5546         done
5547       esac
5548
5549       exp_sym_flag='-bexport'
5550       no_entry_flag='-bnoentry'
5551     fi
5552
5553     # When large executables or shared objects are built, AIX ld can
5554     # have problems creating the table of contents.  If linking a library
5555     # or program results in "error TOC overflow" add -mminimal-toc to
5556     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5557     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5558
5559     hardcode_direct=yes
5560     archive_cmds=''
5561     hardcode_libdir_separator=':'
5562     if test "$GCC" = yes; then
5563       case $host_os in aix4.[012]|aix4.[012].*)
5564         collect2name=`${CC} -print-prog-name=collect2`
5565         if test -f "$collect2name" && \
5566           strings "$collect2name" | grep resolve_lib_name >/dev/null
5567         then
5568           # We have reworked collect2
5569           hardcode_direct=yes
5570         else
5571           # We have old collect2
5572           hardcode_direct=unsupported
5573           # It fails to find uninstalled libraries when the uninstalled
5574           # path is not listed in the libpath.  Setting hardcode_minus_L
5575           # to unsupported forces relinking
5576           hardcode_minus_L=yes
5577           hardcode_libdir_flag_spec='-L$libdir'
5578           hardcode_libdir_separator=
5579         fi
5580       esac
5581
5582       shared_flag='-shared'
5583     else
5584       # not using gcc
5585       if test "$host_cpu" = ia64; then
5586         shared_flag='${wl}-G'
5587       else
5588         if test "$aix_use_runtimelinking" = yes; then
5589           shared_flag='${wl}-G'
5590         else
5591           shared_flag='${wl}-bM:SRE'
5592         fi
5593       fi
5594     fi
5595
5596     # It seems that -bexpall can do strange things, so it is better to
5597     # generate a list of symbols to export.
5598     always_export_symbols=yes
5599     if test "$aix_use_runtimelinking" = yes; then
5600       # Warning - without using the other runtime loading flags (-brtl),
5601       # -berok will link without error, but may produce a broken library.
5602       allow_undefined_flag='-berok'
5603       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5604       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"
5605     else
5606       if test "$host_cpu" = ia64; then
5607         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5608         allow_undefined_flag="-z nodefs"
5609         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"
5610       else
5611         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5612         # Warning - without using the other run time loading flags,
5613         # -berok will link without error, but may produce a broken library.
5614         allow_undefined_flag='${wl}-berok'
5615         # This is a bit strange, but is similar to how AIX traditionally builds
5616         # it's shared libraries.
5617         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'
5618       fi
5619     fi
5620     ;;
5621
5622   amigaos*)
5623     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)'
5624     hardcode_libdir_flag_spec='-L$libdir'
5625     hardcode_minus_L=yes
5626     # see comment about different semantics on the GNU ld section
5627     ld_shlibs=no
5628     ;;
5629
5630   cygwin* | mingw* | pw32*)
5631     # When not using gcc, we currently assume that we are using
5632     # Microsoft Visual C++.
5633     # hardcode_libdir_flag_spec is actually meaningless, as there is
5634     # no search path for DLLs.
5635     hardcode_libdir_flag_spec=' '
5636     allow_undefined_flag=unsupported
5637     # Tell ltmain to make .lib files, not .a files.
5638     libext=lib
5639     # FIXME: Setting linknames here is a bad hack.
5640     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5641     # The linker will automatically build a .lib file if we build a DLL.
5642     old_archive_from_new_cmds='true'
5643     # FIXME: Should let the user specify the lib program.
5644     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5645     fix_srcfile_path='`cygpath -w "$srcfile"`'
5646     ;;
5647
5648   darwin* | rhapsody*)
5649     case "$host_os" in
5650     rhapsody* | darwin1.[012])
5651       allow_undefined_flag='-undefined suppress'
5652       ;;
5653     *) # Darwin 1.3 on
5654       allow_undefined_flag='-flat_namespace -undefined suppress'
5655       ;;
5656     esac
5657     # FIXME: Relying on posixy $() will cause problems for
5658     #        cross-compilation, but unfortunately the echo tests do not
5659     #        yet detect zsh echo's removal of \ escapes.  Also zsh mangles
5660     #        `"' quotes if we put them in here... so don't!
5661     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)'
5662     # We need to add '_' to the symbols in $export_symbols first
5663     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5664     hardcode_direct=yes
5665     hardcode_shlibpath_var=no
5666     whole_archive_flag_spec='-all_load $convenience'
5667     ;;
5668
5669   freebsd1*)
5670     ld_shlibs=no
5671     ;;
5672
5673   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5674   # support.  Future versions do this automatically, but an explicit c++rt0.o
5675   # does not break anything, and helps significantly (at the cost of a little
5676   # extra space).
5677   freebsd2.2*)
5678     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5679     hardcode_libdir_flag_spec='-R$libdir'
5680     hardcode_direct=yes
5681     hardcode_shlibpath_var=no
5682     ;;
5683
5684   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5685   freebsd2*)
5686     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5687     hardcode_direct=yes
5688     hardcode_minus_L=yes
5689     hardcode_shlibpath_var=no
5690     ;;
5691
5692   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5693   freebsd*)
5694     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5695     hardcode_libdir_flag_spec='-R$libdir'
5696     hardcode_direct=yes
5697     hardcode_shlibpath_var=no
5698     ;;
5699
5700   hpux9* | hpux10* | hpux11*)
5701     case $host_os in
5702     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' ;;
5703     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5704     esac
5705     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5706     hardcode_libdir_separator=:
5707     hardcode_direct=yes
5708     hardcode_minus_L=yes # Not in the search PATH, but as the default
5709                          # location of the library.
5710     export_dynamic_flag_spec='${wl}-E'
5711     ;;
5712
5713   irix5* | irix6* | nonstopux*)
5714     if test "$GCC" = yes; then
5715       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'
5716       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5717     else
5718       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'
5719       hardcode_libdir_flag_spec='-rpath $libdir'
5720     fi
5721     hardcode_libdir_separator=:
5722     link_all_deplibs=yes
5723     ;;
5724
5725   netbsd*)
5726     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5727       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5728     else
5729       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5730     fi
5731     hardcode_libdir_flag_spec='-R$libdir'
5732     hardcode_direct=yes
5733     hardcode_shlibpath_var=no
5734     ;;
5735
5736   newsos6)
5737     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5738     hardcode_direct=yes
5739     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5740     hardcode_libdir_separator=:
5741     hardcode_shlibpath_var=no
5742     ;;
5743
5744   openbsd*)
5745     hardcode_direct=yes
5746     hardcode_shlibpath_var=no
5747     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5748       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5749       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5750       export_dynamic_flag_spec='${wl}-E'
5751     else
5752       case "$host_os" in
5753       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5754         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5755         hardcode_libdir_flag_spec='-R$libdir'
5756         ;;
5757       *)
5758         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
5759         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5760         ;;
5761       esac
5762     fi
5763     ;;
5764
5765   openedition*)
5766     archive_cmds="\$CC -Wl,DLL \$libobjs \$deplibs \$compiler_flags -o \$lib &&
5767         cp \$linknames \$output_objdir && linknames=''"
5768     export_dynamic_flag_spec="-Wl,DLL"
5769     ;;
5770
5771   os2*)
5772     hardcode_libdir_flag_spec='-L$libdir'
5773     hardcode_minus_L=yes
5774     allow_undefined_flag=unsupported
5775     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'
5776     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5777     ;;
5778
5779   osf3*)
5780     if test "$GCC" = yes; then
5781       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5782       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'
5783     else
5784       allow_undefined_flag=' -expect_unresolved \*'
5785       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'
5786     fi
5787     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5788     hardcode_libdir_separator=:
5789     ;;
5790
5791   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5792     if test "$GCC" = yes; then
5793       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5794       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'
5795       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5796     else
5797       allow_undefined_flag=' -expect_unresolved \*'
5798       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'
5799       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5800       $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'
5801
5802       #Both c and cxx compiler support -rpath directly
5803       hardcode_libdir_flag_spec='-rpath $libdir'
5804     fi
5805     hardcode_libdir_separator=:
5806     ;;
5807
5808   sco3.2v5*)
5809     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5810     hardcode_shlibpath_var=no
5811     runpath_var=LD_RUN_PATH
5812     hardcode_runpath_var=yes
5813     export_dynamic_flag_spec='${wl}-Bexport'
5814     ;;
5815
5816   solaris*)
5817     # gcc --version < 3.0 without binutils cannot create self contained
5818     # shared libraries reliably, requiring libgcc.a to resolve some of
5819     # the object symbols generated in some cases.  Libraries that use
5820     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5821     # a copy of libgcc.a into every shared library to guarantee resolving
5822     # such symbols causes other problems:  According to Tim Van Holder
5823     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5824     # (to the application) exception stack for one thing.
5825     no_undefined_flag=' -z defs'
5826     if test "$GCC" = yes; then
5827       case `$CC --version 2>/dev/null` in
5828       [12].*)
5829         cat <<EOF 1>&2
5830
5831 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5832 *** create self contained shared libraries on Solaris systems, without
5833 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5834 *** -no-undefined support, which will at least allow you to build shared
5835 *** libraries.  However, you may find that when you link such libraries
5836 *** into an application without using GCC, you have to manually add
5837 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5838 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5839 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5840
5841 EOF
5842         no_undefined_flag=
5843         ;;
5844       esac
5845     fi
5846     # $CC -shared without GNU ld will not create a library from C++
5847     # object files and a static libstdc++, better avoid it by now
5848     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5849     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5850                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5851     hardcode_libdir_flag_spec='-R$libdir'
5852     hardcode_shlibpath_var=no
5853     case $host_os in
5854     solaris2.[0-5] | solaris2.[0-5].*) ;;
5855     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5856       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5857     esac
5858     link_all_deplibs=yes
5859     ;;
5860
5861   sunos4*)
5862     if test "x$host_vendor" = xsequent; then
5863       # Use $CC to link under sequent, because it throws in some extra .o
5864       # files that make .init and .fini sections work.
5865       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5866     else
5867       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5868     fi
5869     hardcode_libdir_flag_spec='-L$libdir'
5870     hardcode_direct=yes
5871     hardcode_minus_L=yes
5872     hardcode_shlibpath_var=no
5873     ;;
5874
5875   sysv4)
5876     case $host_vendor in
5877       sni)
5878         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5879         hardcode_direct=yes # is this really true???
5880         ;;
5881       siemens)
5882         ## LD is ld it makes a PLAMLIB
5883         ## CC just makes a GrossModule.
5884         archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5885         reload_cmds='$CC -r -o $output$reload_objs'
5886         hardcode_direct=no
5887         ;;
5888       motorola)
5889         archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5890         hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5891         ;;
5892     esac
5893     runpath_var='LD_RUN_PATH'
5894     hardcode_shlibpath_var=no
5895     ;;
5896
5897   sysv4.3*)
5898     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5899     hardcode_shlibpath_var=no
5900     export_dynamic_flag_spec='-Bexport'
5901     ;;
5902
5903   sysv5*)
5904     no_undefined_flag=' -z text'
5905     # $CC -shared without GNU ld will not create a library from C++
5906     # object files and a static libstdc++, better avoid it by now
5907     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5908     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5909                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5910     hardcode_libdir_flag_spec=
5911     hardcode_shlibpath_var=no
5912     runpath_var='LD_RUN_PATH'
5913     ;;
5914
5915   uts4*)
5916     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5917     hardcode_libdir_flag_spec='-L$libdir'
5918     hardcode_shlibpath_var=no
5919     ;;
5920
5921   dgux*)
5922     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5923     hardcode_libdir_flag_spec='-L$libdir'
5924     hardcode_shlibpath_var=no
5925     ;;
5926
5927   sysv4*MP*)
5928     if test -d /usr/nec; then
5929       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5930       hardcode_shlibpath_var=no
5931       runpath_var=LD_RUN_PATH
5932       hardcode_runpath_var=yes
5933       ld_shlibs=yes
5934     fi
5935     ;;
5936
5937   sysv4.2uw2*)
5938     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5939     hardcode_direct=yes
5940     hardcode_minus_L=no
5941     hardcode_shlibpath_var=no
5942     hardcode_runpath_var=yes
5943     runpath_var=LD_RUN_PATH
5944     ;;
5945
5946   sysv5uw7* | unixware7*)
5947     no_undefined_flag='${wl}-z ${wl}text'
5948     if test "$GCC" = yes; then
5949       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5950     else
5951       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5952     fi
5953     runpath_var='LD_RUN_PATH'
5954     hardcode_shlibpath_var=no
5955     ;;
5956
5957   *)
5958     ld_shlibs=no
5959     ;;
5960   esac
5961 fi
5962 echo "$ac_t""$ld_shlibs" 1>&6
5963 test "$ld_shlibs" = no && can_build_shared=no
5964
5965 # Check hardcoding attributes.
5966 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
5967 echo "configure:5968: checking how to hardcode library paths into programs" >&5
5968 hardcode_action=
5969 if test -n "$hardcode_libdir_flag_spec" || \
5970    test -n "$runpath_var"; then
5971
5972   # We can hardcode non-existant directories.
5973   if test "$hardcode_direct" != no &&
5974      # If the only mechanism to avoid hardcoding is shlibpath_var, we
5975      # have to relink, otherwise we might link with an installed library
5976      # when we should be linking with a yet-to-be-installed one
5977      ## test "$hardcode_shlibpath_var" != no &&
5978      test "$hardcode_minus_L" != no; then
5979     # Linking always hardcodes the temporary library directory.
5980     hardcode_action=relink
5981   else
5982     # We can link without hardcoding, and we can hardcode nonexisting dirs.
5983     hardcode_action=immediate
5984   fi
5985 else
5986   # We cannot hardcode anything, or else we can only hardcode existing
5987   # directories.
5988   hardcode_action=unsupported
5989 fi
5990 echo "$ac_t""$hardcode_action" 1>&6
5991
5992 striplib=
5993 old_striplib=
5994 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
5995 echo "configure:5996: checking whether stripping libraries is possible" >&5
5996 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
5997   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
5998   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
5999   echo "$ac_t""yes" 1>&6
6000 else
6001   echo "$ac_t""no" 1>&6
6002 fi
6003
6004 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6005 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6006
6007 # PORTME Fill in your ld.so characteristics
6008 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6009 echo "configure:6010: checking dynamic linker characteristics" >&5
6010 library_names_spec=
6011 libname_spec='lib$name'
6012 soname_spec=
6013 postinstall_cmds=
6014 postuninstall_cmds=
6015 finish_cmds=
6016 finish_eval=
6017 shlibpath_var=
6018 shlibpath_overrides_runpath=unknown
6019 version_type=none
6020 dynamic_linker="$host_os ld.so"
6021 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6022 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6023
6024 case $host_os in
6025 aix3*)
6026   version_type=linux
6027   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6028   shlibpath_var=LIBPATH
6029
6030   # AIX has no versioning support, so we append a major version to the name.
6031   soname_spec='${libname}${release}.so$major'
6032   ;;
6033
6034 aix4* | aix5*)
6035   version_type=linux
6036   need_lib_prefix=no
6037   need_version=no
6038   hardcode_into_libs=yes
6039   if test "$host_cpu" = ia64; then
6040     # AIX 5 supports IA64
6041     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6042     shlibpath_var=LD_LIBRARY_PATH
6043   else
6044     # With GCC up to 2.95.x, collect2 would create an import file
6045     # for dependence libraries.  The import file would start with
6046     # the line `#! .'.  This would cause the generated library to
6047     # depend on `.', always an invalid library.  This was fixed in
6048     # development snapshots of GCC prior to 3.0.
6049     case $host_os in
6050       aix4 | aix4.[01] | aix4.[01].*)
6051         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6052              echo ' yes '
6053              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6054           :
6055         else
6056           can_build_shared=no
6057         fi
6058         ;;
6059     esac
6060     # AIX (on Power*) has no versioning support, so currently we can
6061     # not hardcode correct soname into executable. Probably we can
6062     # add versioning support to collect2, so additional links can
6063     # be useful in future.
6064     if test "$aix_use_runtimelinking" = yes; then
6065       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6066       # instead of lib<name>.a to let people know that these are not
6067       # typical AIX shared libraries.
6068       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6069     else
6070       # We preserve .a as extension for shared libraries through AIX4.2
6071       # and later when we are not doing run time linking.
6072       library_names_spec='${libname}${release}.a $libname.a'
6073       soname_spec='${libname}${release}.so$major'
6074     fi
6075     shlibpath_var=LIBPATH
6076   fi
6077   hardcode_into_libs=yes
6078   ;;
6079
6080 amigaos*)
6081   library_names_spec='$libname.ixlibrary $libname.a'
6082   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6083   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'
6084   ;;
6085
6086 beos*)
6087   library_names_spec='${libname}.so'
6088   dynamic_linker="$host_os ld.so"
6089   shlibpath_var=LIBRARY_PATH
6090   ;;
6091
6092 bsdi4*)
6093   version_type=linux
6094   need_version=no
6095   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6096   soname_spec='${libname}${release}.so$major'
6097   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6098   shlibpath_var=LD_LIBRARY_PATH
6099   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6100   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6101   export_dynamic_flag_spec=-rdynamic
6102   # the default ld.so.conf also contains /usr/contrib/lib and
6103   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6104   # libtool to hard-code these into programs
6105   ;;
6106
6107 cygwin* | mingw* | pw32*)
6108   version_type=windows
6109   need_version=no
6110   need_lib_prefix=no
6111   case $GCC,$host_os in
6112   yes,cygwin*)
6113     library_names_spec='$libname.dll.a'
6114     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6115     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6116       dldir=$destdir/`dirname \$dlpath`~
6117       test -d \$dldir || mkdir -p \$dldir~
6118       $install_prog .libs/$dlname \$dldir/$dlname'
6119     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6120       dlpath=$dir/\$dldll~
6121        $rm \$dlpath'
6122     ;;
6123   yes,mingw*)
6124     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6125     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g" -e "s,=/,/,g"`
6126     ;;
6127   yes,pw32*)
6128     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6129     ;;
6130   *)
6131     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6132     ;;
6133   esac
6134   dynamic_linker='Win32 ld.exe'
6135   # FIXME: first we should search . and the directory the executable is in
6136   shlibpath_var=PATH
6137   ;;
6138
6139 darwin* | rhapsody*)
6140   dynamic_linker="$host_os dyld"
6141   version_type=darwin
6142   need_lib_prefix=no
6143   need_version=no
6144   # FIXME: Relying on posixy $() will cause problems for
6145   #        cross-compilation, but unfortunately the echo tests do not
6146   #        yet detect zsh echo's removal of \ escapes.
6147   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)'
6148   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6149   shlibpath_overrides_runpath=yes
6150   shlibpath_var=DYLD_LIBRARY_PATH
6151   ;;
6152
6153 freebsd1*)
6154   dynamic_linker=no
6155   ;;
6156
6157 freebsd*)
6158   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6159   version_type=freebsd-$objformat
6160   case $version_type in
6161     freebsd-elf*)
6162       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6163       need_version=no
6164       need_lib_prefix=no
6165       ;;
6166     freebsd-*)
6167       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6168       need_version=yes
6169       ;;
6170   esac
6171   shlibpath_var=LD_LIBRARY_PATH
6172   case $host_os in
6173   freebsd2*)
6174     shlibpath_overrides_runpath=yes
6175     ;;
6176   *)
6177     shlibpath_overrides_runpath=no
6178     hardcode_into_libs=yes
6179     ;;
6180   esac
6181   ;;
6182
6183 gnu*)
6184   version_type=linux
6185   need_lib_prefix=no
6186   need_version=no
6187   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6188   soname_spec='${libname}${release}.so$major'
6189   shlibpath_var=LD_LIBRARY_PATH
6190   hardcode_into_libs=yes
6191   ;;
6192
6193 hpux9* | hpux10* | hpux11*)
6194   # Give a soname corresponding to the major version so that dld.sl refuses to
6195   # link against other versions.
6196   dynamic_linker="$host_os dld.sl"
6197   version_type=sunos
6198   need_lib_prefix=no
6199   need_version=no
6200   shlibpath_var=SHLIB_PATH
6201   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6202   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6203   soname_spec='${libname}${release}.sl$major'
6204   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6205   postinstall_cmds='chmod 555 $lib'
6206   ;;
6207
6208 irix5* | irix6* | nonstopux*)
6209   case $host_os in
6210     nonstopux*) version_type=nonstopux ;;
6211     *)          version_type=irix ;;
6212   esac
6213   need_lib_prefix=no
6214   need_version=no
6215   soname_spec='${libname}${release}.so$major'
6216   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6217   case $host_os in
6218   irix5* | nonstopux*)
6219     libsuff= shlibsuff=
6220     ;;
6221   *)
6222     case $LD in # libtool.m4 will add one of these switches to LD
6223     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6224     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6225     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6226     *) libsuff= shlibsuff= libmagic=never-match;;
6227     esac
6228     ;;
6229   esac
6230   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6231   shlibpath_overrides_runpath=no
6232   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6233   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6234   ;;
6235
6236 # No shared lib support for Linux oldld, aout, or coff.
6237 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6238   dynamic_linker=no
6239   ;;
6240
6241 # This must be Linux ELF.
6242 linux-gnu*)
6243   version_type=linux
6244   need_lib_prefix=no
6245   need_version=no
6246   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6247   soname_spec='${libname}${release}.so$major'
6248   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6249   shlibpath_var=LD_LIBRARY_PATH
6250   shlibpath_overrides_runpath=no
6251   # This implies no fast_install, which is unacceptable.
6252   # Some rework will be needed to allow for fast_install
6253   # before this can be enabled.
6254   hardcode_into_libs=yes
6255
6256   # We used to test for /lib/ld.so.1 and disable shared libraries on
6257   # powerpc, because MkLinux only supported shared libraries with the
6258   # GNU dynamic linker.  Since this was broken with cross compilers,
6259   # most powerpc-linux boxes support dynamic linking these days and
6260   # people can always --disable-shared, the test was removed, and we
6261   # assume the GNU/Linux dynamic linker is in use.
6262   dynamic_linker='GNU/Linux ld.so'
6263   ;;
6264
6265 netbsd*)
6266   version_type=sunos
6267   need_lib_prefix=no
6268   need_version=no
6269   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6270     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6271     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6272     dynamic_linker='NetBSD (a.out) ld.so'
6273   else
6274     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6275     soname_spec='${libname}${release}.so$major'
6276     dynamic_linker='NetBSD ld.elf_so'
6277   fi
6278   shlibpath_var=LD_LIBRARY_PATH
6279   shlibpath_overrides_runpath=yes
6280   hardcode_into_libs=yes
6281   ;;
6282
6283 newsos6)
6284   version_type=linux
6285   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6286   shlibpath_var=LD_LIBRARY_PATH
6287   shlibpath_overrides_runpath=yes
6288   ;;
6289
6290 openbsd*)
6291   version_type=sunos
6292   need_lib_prefix=no
6293   need_version=no
6294   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6295     case "$host_os" in
6296     openbsd2.[89] | openbsd2.[89].*)
6297       shlibpath_overrides_runpath=no
6298       ;;
6299     *)
6300       shlibpath_overrides_runpath=yes
6301       ;;
6302     esac
6303   else
6304     shlibpath_overrides_runpath=yes
6305   fi
6306   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6307   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6308   shlibpath_var=LD_LIBRARY_PATH
6309   ;;
6310
6311 openedition*)
6312   need_lib_prefix=no
6313   need_version=no
6314   shlibpath_overrides_runpath=yes
6315   shlibpath_var=LIBPATH
6316   postinstall_cmds="rm \$destdir/\$linkname; cp \$linkname \$destdir; chmod a+x \$lib"
6317   # the library's exports are in libname.x; this is the file that must
6318   # actually be linked with to use a DLL.
6319   library_names_spec="\${libname}\${release}.so\$versuffix \${libname}.x"
6320   ;;
6321
6322 os2*)
6323   libname_spec='$name'
6324   need_lib_prefix=no
6325   library_names_spec='$libname.dll $libname.a'
6326   dynamic_linker='OS/2 ld.exe'
6327   shlibpath_var=LIBPATH
6328   ;;
6329
6330 osf3* | osf4* | osf5*)
6331   version_type=osf
6332   need_version=no
6333   soname_spec='${libname}${release}.so$major'
6334   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6335   shlibpath_var=LD_LIBRARY_PATH
6336   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6337   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6338   hardcode_into_libs=yes
6339   ;;
6340
6341 sco3.2v5*)
6342   version_type=osf
6343   soname_spec='${libname}${release}.so$major'
6344   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6345   shlibpath_var=LD_LIBRARY_PATH
6346   ;;
6347
6348 solaris*)
6349   version_type=linux
6350   need_lib_prefix=no
6351   need_version=no
6352   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6353   soname_spec='${libname}${release}.so$major'
6354   shlibpath_var=LD_LIBRARY_PATH
6355   shlibpath_overrides_runpath=yes
6356   hardcode_into_libs=yes
6357   # ldd complains unless libraries are executable
6358   postinstall_cmds='chmod +x $lib'
6359   ;;
6360
6361 sunos4*)
6362   version_type=sunos
6363   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6364   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6365   shlibpath_var=LD_LIBRARY_PATH
6366   shlibpath_overrides_runpath=yes
6367   if test "$with_gnu_ld" = yes; then
6368     need_lib_prefix=no
6369   fi
6370   need_version=yes
6371   ;;
6372
6373 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6374   version_type=linux
6375   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6376   soname_spec='${libname}${release}.so$major'
6377   shlibpath_var=LD_LIBRARY_PATH
6378   case $host_vendor in
6379     sni)
6380       shlibpath_overrides_runpath=no
6381       need_lib_prefix=no
6382       export_dynamic_flag_spec='${wl}-Blargedynsym'
6383       runpath_var=LD_RUN_PATH
6384       ;;
6385     siemens)
6386       need_lib_prefix=no
6387       ;;
6388     motorola)
6389       need_lib_prefix=no
6390       need_version=no
6391       shlibpath_overrides_runpath=no
6392       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6393       ;;
6394   esac
6395   ;;
6396
6397 uts4*)
6398   version_type=linux
6399   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6400   soname_spec='${libname}${release}.so$major'
6401   shlibpath_var=LD_LIBRARY_PATH
6402   ;;
6403
6404 dgux*)
6405   version_type=linux
6406   need_lib_prefix=no
6407   need_version=no
6408   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6409   soname_spec='${libname}${release}.so$major'
6410   shlibpath_var=LD_LIBRARY_PATH
6411   ;;
6412
6413 sysv4*MP*)
6414   if test -d /usr/nec ;then
6415     version_type=linux
6416     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6417     soname_spec='$libname.so.$major'
6418     shlibpath_var=LD_LIBRARY_PATH
6419   fi
6420   ;;
6421
6422 *)
6423   dynamic_linker=no
6424   ;;
6425 esac
6426 echo "$ac_t""$dynamic_linker" 1>&6
6427 test "$dynamic_linker" = no && can_build_shared=no
6428
6429 # Report the final consequences.
6430 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6431 echo "configure:6432: checking if libtool supports shared libraries" >&5
6432 echo "$ac_t""$can_build_shared" 1>&6
6433
6434 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6435 echo "configure:6436: checking whether to build shared libraries" >&5
6436 test "$can_build_shared" = "no" && enable_shared=no
6437
6438 # On AIX, shared libraries and static libraries use the same namespace, and
6439 # are all built from PIC.
6440 case "$host_os" in
6441 aix3*)
6442   test "$enable_shared" = yes && enable_static=no
6443   if test -n "$RANLIB"; then
6444     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6445     postinstall_cmds='$RANLIB $lib'
6446   fi
6447   ;;
6448
6449 aix4*)
6450   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6451     test "$enable_shared" = yes && enable_static=no
6452   fi
6453   ;;
6454 esac
6455 echo "$ac_t""$enable_shared" 1>&6
6456
6457 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6458 echo "configure:6459: checking whether to build static libraries" >&5
6459 # Make sure either enable_shared or enable_static is yes.
6460 test "$enable_shared" = yes || enable_static=yes
6461 echo "$ac_t""$enable_static" 1>&6
6462
6463 if test "$hardcode_action" = relink; then
6464   # Fast installation is not supported
6465   enable_fast_install=no
6466 elif test "$shlibpath_overrides_runpath" = yes ||
6467      test "$enable_shared" = no; then
6468   # Fast installation is not necessary
6469   enable_fast_install=needless
6470 fi
6471
6472 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6473 if test "$GCC" = yes; then
6474   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6475 fi
6476
6477 if test "x$enable_dlopen" != xyes; then
6478   enable_dlopen=unknown
6479   enable_dlopen_self=unknown
6480   enable_dlopen_self_static=unknown
6481 else
6482   lt_cv_dlopen=no
6483   lt_cv_dlopen_libs=
6484
6485   case $host_os in
6486   beos*)
6487     lt_cv_dlopen="load_add_on"
6488     lt_cv_dlopen_libs=
6489     lt_cv_dlopen_self=yes
6490     ;;
6491
6492   cygwin* | mingw* | pw32*)
6493     lt_cv_dlopen="LoadLibrary"
6494     lt_cv_dlopen_libs=
6495    ;;
6496
6497   *)
6498     echo $ac_n "checking for dllload""... $ac_c" 1>&6
6499 echo "configure:6500: checking for dllload" >&5
6500 if eval "test \"\${ac_cv_func_dllload+set}\" = set"; then
6501   echo $ac_n "(cached) $ac_c" 1>&6
6502 else
6503   cat > conftest.$ac_ext <<EOF
6504 #line 6505 "configure"
6505 #include "confdefs.h"
6506 /* System header to define __stub macros and hopefully few prototypes,
6507     which can conflict with char dllload(); below.  */
6508 #include <assert.h>
6509 /* Override any gcc2 internal prototype to avoid an error.  */
6510 /* We use char because int might match the return type of a gcc2
6511     builtin and then its argument prototype would still apply.  */
6512 char dllload();
6513 char (*f)();
6514
6515 int main() {
6516
6517 /* The GNU C library defines this for functions which it implements
6518     to always fail with ENOSYS.  Some functions are actually named
6519     something starting with __ and the normal name is an alias.  */
6520 #if defined (__stub_dllload) || defined (__stub___dllload)
6521 choke me
6522 #else
6523 f = dllload;
6524 #endif
6525
6526 ; return 0; }
6527 EOF
6528 if { (eval echo configure:6529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6529   rm -rf conftest*
6530   eval "ac_cv_func_dllload=yes"
6531 else
6532   echo "configure: failed program was:" >&5
6533   cat conftest.$ac_ext >&5
6534   rm -rf conftest*
6535   eval "ac_cv_func_dllload=no"
6536 fi
6537 rm -f conftest*
6538 fi
6539
6540 if eval "test \"`echo '$ac_cv_func_'dllload`\" = yes"; then
6541   echo "$ac_t""yes" 1>&6
6542   lt_cv_dlopen="dllload"
6543 else
6544   echo "$ac_t""no" 1>&6
6545 echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6546 echo "configure:6547: checking for shl_load" >&5
6547 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6548   echo $ac_n "(cached) $ac_c" 1>&6
6549 else
6550   cat > conftest.$ac_ext <<EOF
6551 #line 6552 "configure"
6552 #include "confdefs.h"
6553 /* System header to define __stub macros and hopefully few prototypes,
6554     which can conflict with char shl_load(); below.  */
6555 #include <assert.h>
6556 /* Override any gcc2 internal prototype to avoid an error.  */
6557 /* We use char because int might match the return type of a gcc2
6558     builtin and then its argument prototype would still apply.  */
6559 char shl_load();
6560 char (*f)();
6561
6562 int main() {
6563
6564 /* The GNU C library defines this for functions which it implements
6565     to always fail with ENOSYS.  Some functions are actually named
6566     something starting with __ and the normal name is an alias.  */
6567 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6568 choke me
6569 #else
6570 f = shl_load;
6571 #endif
6572
6573 ; return 0; }
6574 EOF
6575 if { (eval echo configure:6576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6576   rm -rf conftest*
6577   eval "ac_cv_func_shl_load=yes"
6578 else
6579   echo "configure: failed program was:" >&5
6580   cat conftest.$ac_ext >&5
6581   rm -rf conftest*
6582   eval "ac_cv_func_shl_load=no"
6583 fi
6584 rm -f conftest*
6585 fi
6586
6587 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6588   echo "$ac_t""yes" 1>&6
6589   lt_cv_dlopen="shl_load"
6590 else
6591   echo "$ac_t""no" 1>&6
6592 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6593 echo "configure:6594: checking for shl_load in -ldld" >&5
6594 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6595 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6596   echo $ac_n "(cached) $ac_c" 1>&6
6597 else
6598   ac_save_LIBS="$LIBS"
6599 LIBS="-ldld  $LIBS"
6600 cat > conftest.$ac_ext <<EOF
6601 #line 6602 "configure"
6602 #include "confdefs.h"
6603 /* Override any gcc2 internal prototype to avoid an error.  */
6604 /* We use char because int might match the return type of a gcc2
6605     builtin and then its argument prototype would still apply.  */
6606 char shl_load();
6607
6608 int main() {
6609 shl_load()
6610 ; return 0; }
6611 EOF
6612 if { (eval echo configure:6613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6613   rm -rf conftest*
6614   eval "ac_cv_lib_$ac_lib_var=yes"
6615 else
6616   echo "configure: failed program was:" >&5
6617   cat conftest.$ac_ext >&5
6618   rm -rf conftest*
6619   eval "ac_cv_lib_$ac_lib_var=no"
6620 fi
6621 rm -f conftest*
6622 LIBS="$ac_save_LIBS"
6623
6624 fi
6625 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6626   echo "$ac_t""yes" 1>&6
6627   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6628 else
6629   echo "$ac_t""no" 1>&6
6630 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6631 echo "configure:6632: checking for dlopen" >&5
6632 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6633   echo $ac_n "(cached) $ac_c" 1>&6
6634 else
6635   cat > conftest.$ac_ext <<EOF
6636 #line 6637 "configure"
6637 #include "confdefs.h"
6638 /* System header to define __stub macros and hopefully few prototypes,
6639     which can conflict with char dlopen(); below.  */
6640 #include <assert.h>
6641 /* Override any gcc2 internal prototype to avoid an error.  */
6642 /* We use char because int might match the return type of a gcc2
6643     builtin and then its argument prototype would still apply.  */
6644 char dlopen();
6645 char (*f)();
6646
6647 int main() {
6648
6649 /* The GNU C library defines this for functions which it implements
6650     to always fail with ENOSYS.  Some functions are actually named
6651     something starting with __ and the normal name is an alias.  */
6652 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6653 choke me
6654 #else
6655 f = dlopen;
6656 #endif
6657
6658 ; return 0; }
6659 EOF
6660 if { (eval echo configure:6661: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6661   rm -rf conftest*
6662   eval "ac_cv_func_dlopen=yes"
6663 else
6664   echo "configure: failed program was:" >&5
6665   cat conftest.$ac_ext >&5
6666   rm -rf conftest*
6667   eval "ac_cv_func_dlopen=no"
6668 fi
6669 rm -f conftest*
6670 fi
6671
6672 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6673   echo "$ac_t""yes" 1>&6
6674   lt_cv_dlopen="dlopen"
6675 else
6676   echo "$ac_t""no" 1>&6
6677 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6678 echo "configure:6679: checking for dlopen in -ldl" >&5
6679 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6680 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6681   echo $ac_n "(cached) $ac_c" 1>&6
6682 else
6683   ac_save_LIBS="$LIBS"
6684 LIBS="-ldl  $LIBS"
6685 cat > conftest.$ac_ext <<EOF
6686 #line 6687 "configure"
6687 #include "confdefs.h"
6688 /* Override any gcc2 internal prototype to avoid an error.  */
6689 /* We use char because int might match the return type of a gcc2
6690     builtin and then its argument prototype would still apply.  */
6691 char dlopen();
6692
6693 int main() {
6694 dlopen()
6695 ; return 0; }
6696 EOF
6697 if { (eval echo configure:6698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6698   rm -rf conftest*
6699   eval "ac_cv_lib_$ac_lib_var=yes"
6700 else
6701   echo "configure: failed program was:" >&5
6702   cat conftest.$ac_ext >&5
6703   rm -rf conftest*
6704   eval "ac_cv_lib_$ac_lib_var=no"
6705 fi
6706 rm -f conftest*
6707 LIBS="$ac_save_LIBS"
6708
6709 fi
6710 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6711   echo "$ac_t""yes" 1>&6
6712   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6713 else
6714   echo "$ac_t""no" 1>&6
6715 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6716 echo "configure:6717: checking for dlopen in -lsvld" >&5
6717 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6718 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6719   echo $ac_n "(cached) $ac_c" 1>&6
6720 else
6721   ac_save_LIBS="$LIBS"
6722 LIBS="-lsvld  $LIBS"
6723 cat > conftest.$ac_ext <<EOF
6724 #line 6725 "configure"
6725 #include "confdefs.h"
6726 /* Override any gcc2 internal prototype to avoid an error.  */
6727 /* We use char because int might match the return type of a gcc2
6728     builtin and then its argument prototype would still apply.  */
6729 char dlopen();
6730
6731 int main() {
6732 dlopen()
6733 ; return 0; }
6734 EOF
6735 if { (eval echo configure:6736: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6736   rm -rf conftest*
6737   eval "ac_cv_lib_$ac_lib_var=yes"
6738 else
6739   echo "configure: failed program was:" >&5
6740   cat conftest.$ac_ext >&5
6741   rm -rf conftest*
6742   eval "ac_cv_lib_$ac_lib_var=no"
6743 fi
6744 rm -f conftest*
6745 LIBS="$ac_save_LIBS"
6746
6747 fi
6748 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6749   echo "$ac_t""yes" 1>&6
6750   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6751 else
6752   echo "$ac_t""no" 1>&6
6753 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6754 echo "configure:6755: checking for dld_link in -ldld" >&5
6755 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6756 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6757   echo $ac_n "(cached) $ac_c" 1>&6
6758 else
6759   ac_save_LIBS="$LIBS"
6760 LIBS="-ldld  $LIBS"
6761 cat > conftest.$ac_ext <<EOF
6762 #line 6763 "configure"
6763 #include "confdefs.h"
6764 /* Override any gcc2 internal prototype to avoid an error.  */
6765 /* We use char because int might match the return type of a gcc2
6766     builtin and then its argument prototype would still apply.  */
6767 char dld_link();
6768
6769 int main() {
6770 dld_link()
6771 ; return 0; }
6772 EOF
6773 if { (eval echo configure:6774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6774   rm -rf conftest*
6775   eval "ac_cv_lib_$ac_lib_var=yes"
6776 else
6777   echo "configure: failed program was:" >&5
6778   cat conftest.$ac_ext >&5
6779   rm -rf conftest*
6780   eval "ac_cv_lib_$ac_lib_var=no"
6781 fi
6782 rm -f conftest*
6783 LIBS="$ac_save_LIBS"
6784
6785 fi
6786 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6787   echo "$ac_t""yes" 1>&6
6788   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6789 else
6790   echo "$ac_t""no" 1>&6
6791 fi
6792
6793               
6794 fi
6795
6796             
6797 fi
6798
6799           
6800 fi
6801
6802         
6803 fi
6804
6805       
6806 fi
6807
6808     
6809 fi
6810
6811     ;;
6812   esac
6813
6814   if test "x$lt_cv_dlopen" != xno; then
6815     enable_dlopen=yes
6816   else
6817     enable_dlopen=no
6818   fi
6819
6820   case $lt_cv_dlopen in
6821   dlopen)
6822     save_CPPFLAGS="$CPPFLAGS"
6823         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6824
6825     save_LDFLAGS="$LDFLAGS"
6826     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6827
6828     save_LIBS="$LIBS"
6829     LIBS="$lt_cv_dlopen_libs $LIBS"
6830
6831     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6832 echo "configure:6833: checking whether a program can dlopen itself" >&5
6833 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6834   echo $ac_n "(cached) $ac_c" 1>&6
6835 else
6836           if test "$cross_compiling" = yes; then :
6837   lt_cv_dlopen_self=cross
6838 else
6839     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6840   lt_status=$lt_dlunknown
6841   cat > conftest.$ac_ext <<EOF
6842 #line 6843 "configure"
6843 #include "confdefs.h"
6844
6845 #if HAVE_DLFCN_H
6846 #include <dlfcn.h>
6847 #endif
6848
6849 #include <stdio.h>
6850
6851 #ifdef RTLD_GLOBAL
6852 #  define LT_DLGLOBAL           RTLD_GLOBAL
6853 #else
6854 #  ifdef DL_GLOBAL
6855 #    define LT_DLGLOBAL         DL_GLOBAL
6856 #  else
6857 #    define LT_DLGLOBAL         0
6858 #  endif
6859 #endif
6860
6861 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6862    find out it does not work in some platform. */
6863 #ifndef LT_DLLAZY_OR_NOW
6864 #  ifdef RTLD_LAZY
6865 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6866 #  else
6867 #    ifdef DL_LAZY
6868 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6869 #    else
6870 #      ifdef RTLD_NOW
6871 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6872 #      else
6873 #        ifdef DL_NOW
6874 #          define LT_DLLAZY_OR_NOW      DL_NOW
6875 #        else
6876 #          define LT_DLLAZY_OR_NOW      0
6877 #        endif
6878 #      endif
6879 #    endif
6880 #  endif
6881 #endif
6882
6883 #ifdef __cplusplus
6884 extern "C" void exit (int);
6885 #endif
6886
6887 void fnord() { int i=42;}
6888 int main ()
6889 {
6890   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6891   int status = $lt_dlunknown;
6892
6893   if (self)
6894     {
6895       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6896       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6897       /* dlclose (self); */
6898     }
6899
6900     exit (status);
6901 }
6902 EOF
6903   if { (eval echo configure:6904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6904     (./conftest; exit; ) 2>/dev/null
6905     lt_status=$?
6906     case x$lt_status in
6907       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6908       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6909       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6910     esac
6911   else :
6912     # compilation failed
6913     lt_cv_dlopen_self=no
6914   fi
6915 fi
6916 rm -fr conftest*
6917
6918     
6919 fi
6920
6921 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6922
6923     if test "x$lt_cv_dlopen_self" = xyes; then
6924       LDFLAGS="$LDFLAGS $link_static_flag"
6925       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6926 echo "configure:6927: checking whether a statically linked program can dlopen itself" >&5
6927 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6928   echo $ac_n "(cached) $ac_c" 1>&6
6929 else
6930           if test "$cross_compiling" = yes; then :
6931   lt_cv_dlopen_self_static=cross
6932 else
6933     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6934   lt_status=$lt_dlunknown
6935   cat > conftest.$ac_ext <<EOF
6936 #line 6937 "configure"
6937 #include "confdefs.h"
6938
6939 #if HAVE_DLFCN_H
6940 #include <dlfcn.h>
6941 #endif
6942
6943 #include <stdio.h>
6944
6945 #ifdef RTLD_GLOBAL
6946 #  define LT_DLGLOBAL           RTLD_GLOBAL
6947 #else
6948 #  ifdef DL_GLOBAL
6949 #    define LT_DLGLOBAL         DL_GLOBAL
6950 #  else
6951 #    define LT_DLGLOBAL         0
6952 #  endif
6953 #endif
6954
6955 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6956    find out it does not work in some platform. */
6957 #ifndef LT_DLLAZY_OR_NOW
6958 #  ifdef RTLD_LAZY
6959 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6960 #  else
6961 #    ifdef DL_LAZY
6962 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6963 #    else
6964 #      ifdef RTLD_NOW
6965 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6966 #      else
6967 #        ifdef DL_NOW
6968 #          define LT_DLLAZY_OR_NOW      DL_NOW
6969 #        else
6970 #          define LT_DLLAZY_OR_NOW      0
6971 #        endif
6972 #      endif
6973 #    endif
6974 #  endif
6975 #endif
6976
6977 #ifdef __cplusplus
6978 extern "C" void exit (int);
6979 #endif
6980
6981 void fnord() { int i=42;}
6982 int main ()
6983 {
6984   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6985   int status = $lt_dlunknown;
6986
6987   if (self)
6988     {
6989       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6990       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6991       /* dlclose (self); */
6992     }
6993
6994     exit (status);
6995 }
6996 EOF
6997   if { (eval echo configure:6998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6998     (./conftest; exit; ) 2>/dev/null
6999     lt_status=$?
7000     case x$lt_status in
7001       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7002       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7003       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7004     esac
7005   else :
7006     # compilation failed
7007     lt_cv_dlopen_self_static=no
7008   fi
7009 fi
7010 rm -fr conftest*
7011
7012       
7013 fi
7014
7015 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7016     fi
7017
7018     CPPFLAGS="$save_CPPFLAGS"
7019     LDFLAGS="$save_LDFLAGS"
7020     LIBS="$save_LIBS"
7021     ;;
7022   esac
7023
7024   case $lt_cv_dlopen_self in
7025   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7026   *) enable_dlopen_self=unknown ;;
7027   esac
7028
7029   case $lt_cv_dlopen_self_static in
7030   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7031   *) enable_dlopen_self_static=unknown ;;
7032   esac
7033 fi
7034
7035
7036 if test "$enable_shared" = yes && test "$GCC" = yes; then
7037   case $archive_cmds in
7038   *'~'*)
7039     # FIXME: we may have to deal with multi-command sequences.
7040     ;;
7041   '$CC '*)
7042     # Test whether the compiler implicitly links with -lc since on some
7043     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7044     # to ld, don't add -lc before -lgcc.
7045     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7046 echo "configure:7047: checking whether -lc should be explicitly linked in" >&5
7047     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7048   echo $ac_n "(cached) $ac_c" 1>&6
7049 else
7050   $rm conftest*
7051     echo 'static int dummy;' > conftest.$ac_ext
7052
7053     if { (eval echo configure:7054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7054       soname=conftest
7055       lib=conftest
7056       libobjs=conftest.$ac_objext
7057       deplibs=
7058       wl=$lt_cv_prog_cc_wl
7059       compiler_flags=-v
7060       linker_flags=-v
7061       verstring=
7062       output_objdir=.
7063       libname=conftest
7064       save_allow_undefined_flag=$allow_undefined_flag
7065       allow_undefined_flag=
7066       if { (eval echo configure:7067: \"$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; }
7067       then
7068         lt_cv_archive_cmds_need_lc=no
7069       else
7070         lt_cv_archive_cmds_need_lc=yes
7071       fi
7072       allow_undefined_flag=$save_allow_undefined_flag
7073     else
7074       cat conftest.err 1>&5
7075     fi
7076 fi
7077
7078     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7079     ;;
7080   esac
7081 fi
7082 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7083
7084 # The second clause should only fire when bootstrapping the
7085 # libtool distribution, otherwise you forgot to ship ltmain.sh
7086 # with your package, and you will get complaints that there are
7087 # no rules to generate ltmain.sh.
7088 if test -f "$ltmain"; then
7089   :
7090 else
7091   # If there is no Makefile yet, we rely on a make rule to execute
7092   # `config.status --recheck' to rerun these tests and create the
7093   # libtool script then.
7094   test -f Makefile && make "$ltmain"
7095 fi
7096
7097 if test -f "$ltmain"; then
7098   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7099   $rm -f "${ofile}T"
7100
7101   echo creating $ofile
7102
7103   # Now quote all the things that may contain metacharacters while being
7104   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7105   # variables and quote the copies for generation of the libtool script.
7106   for var in echo old_CC old_CFLAGS SED \
7107     AR AR_FLAGS CC LD LN_S NM SHELL \
7108     reload_flag reload_cmds wl \
7109     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7110     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7111     library_names_spec soname_spec \
7112     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7113     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7114     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7115     old_striplib striplib file_magic_cmd export_symbols_cmds \
7116     deplibs_check_method allow_undefined_flag no_undefined_flag \
7117     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7118     global_symbol_to_c_name_address \
7119     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7120     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7121     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7122
7123     case $var in
7124     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7125     old_postinstall_cmds | old_postuninstall_cmds | \
7126     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7127     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7128     postinstall_cmds | postuninstall_cmds | \
7129     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7130       # Double-quote double-evaled strings.
7131       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7132       ;;
7133     *)
7134       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7135       ;;
7136     esac
7137   done
7138
7139   cat <<__EOF__ > "${ofile}T"
7140 #! $SHELL
7141
7142 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7143 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7144 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7145 #
7146 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7147 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7148 #
7149 # This program is free software; you can redistribute it and/or modify
7150 # it under the terms of the GNU General Public License as published by
7151 # the Free Software Foundation; either version 2 of the License, or
7152 # (at your option) any later version.
7153 #
7154 # This program is distributed in the hope that it will be useful, but
7155 # WITHOUT ANY WARRANTY; without even the implied warranty of
7156 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7157 # General Public License for more details.
7158 #
7159 # You should have received a copy of the GNU General Public License
7160 # along with this program; if not, write to the Free Software
7161 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7162 #
7163 # As a special exception to the GNU General Public License, if you
7164 # distribute this file as part of a program that contains a
7165 # configuration script generated by Autoconf, you may include it under
7166 # the same distribution terms that you use for the rest of that program.
7167
7168 # A sed that does not truncate output.
7169 SED=$lt_SED
7170
7171 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7172 Xsed="${SED} -e s/^X//"
7173
7174 # The HP-UX ksh and POSIX shell print the target directory to stdout
7175 # if CDPATH is set.
7176 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7177
7178 # ### BEGIN LIBTOOL CONFIG
7179
7180 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7181
7182 # Shell to use when invoking shell scripts.
7183 SHELL=$lt_SHELL
7184
7185 # Whether or not to build shared libraries.
7186 build_libtool_libs=$enable_shared
7187
7188 # Whether or not to build static libraries.
7189 build_old_libs=$enable_static
7190
7191 # Whether or not to add -lc for building shared libraries.
7192 build_libtool_need_lc=$need_lc
7193
7194 # Whether or not to optimize for fast installation.
7195 fast_install=$enable_fast_install
7196
7197 # The host system.
7198 host_alias=$host_alias
7199 host=$host
7200
7201 # An echo program that does not interpret backslashes.
7202 echo=$lt_echo
7203
7204 # The archiver.
7205 AR=$lt_AR
7206 AR_FLAGS=$lt_AR_FLAGS
7207
7208 # The default C compiler.
7209 CC=$lt_CC
7210
7211 # Is the compiler the GNU C compiler?
7212 with_gcc=$GCC
7213
7214 # The linker used to build libraries.
7215 LD=$lt_LD
7216
7217 # Whether we need hard or soft links.
7218 LN_S=$lt_LN_S
7219
7220 # A BSD-compatible nm program.
7221 NM=$lt_NM
7222
7223 # A symbol stripping program
7224 STRIP=$STRIP
7225
7226 # Used to examine libraries when file_magic_cmd begins "file"
7227 MAGIC_CMD=$MAGIC_CMD
7228
7229 # Used on cygwin: DLL creation program.
7230 DLLTOOL="$DLLTOOL"
7231
7232 # Used on cygwin: object dumper.
7233 OBJDUMP="$OBJDUMP"
7234
7235 # Used on cygwin: assembler.
7236 AS="$AS"
7237
7238 # The name of the directory that contains temporary libtool files.
7239 objdir=$objdir
7240
7241 # How to create reloadable object files.
7242 reload_flag=$lt_reload_flag
7243 reload_cmds=$lt_reload_cmds
7244
7245 # How to pass a linker flag through the compiler.
7246 wl=$lt_wl
7247
7248 # Object file suffix (normally "o").
7249 objext="$ac_objext"
7250
7251 # Old archive suffix (normally "a").
7252 libext="$libext"
7253
7254 # Executable file suffix (normally "").
7255 exeext="$exeext"
7256
7257 # Additional compiler flags for building library objects.
7258 pic_flag=$lt_pic_flag
7259 pic_mode=$pic_mode
7260
7261 # Does compiler simultaneously support -c and -o options?
7262 compiler_c_o=$lt_compiler_c_o
7263
7264 # Can we write directly to a .lo ?
7265 compiler_o_lo=$lt_compiler_o_lo
7266
7267 # Must we lock files when doing compilation ?
7268 need_locks=$lt_need_locks
7269
7270 # Do we need the lib prefix for modules?
7271 need_lib_prefix=$need_lib_prefix
7272
7273 # Do we need a version for libraries?
7274 need_version=$need_version
7275
7276 # Whether dlopen is supported.
7277 dlopen_support=$enable_dlopen
7278
7279 # Whether dlopen of programs is supported.
7280 dlopen_self=$enable_dlopen_self
7281
7282 # Whether dlopen of statically linked programs is supported.
7283 dlopen_self_static=$enable_dlopen_self_static
7284
7285 # Compiler flag to prevent dynamic linking.
7286 link_static_flag=$lt_link_static_flag
7287
7288 # Compiler flag to turn off builtin functions.
7289 no_builtin_flag=$lt_no_builtin_flag
7290
7291 # Compiler flag to allow reflexive dlopens.
7292 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7293
7294 # Compiler flag to generate shared objects directly from archives.
7295 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7296
7297 # Compiler flag to generate thread-safe objects.
7298 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7299
7300 # Library versioning type.
7301 version_type=$version_type
7302
7303 # Format of library name prefix.
7304 libname_spec=$lt_libname_spec
7305
7306 # List of archive names.  First name is the real one, the rest are links.
7307 # The last name is the one that the linker finds with -lNAME.
7308 library_names_spec=$lt_library_names_spec
7309
7310 # The coded name of the library, if different from the real name.
7311 soname_spec=$lt_soname_spec
7312
7313 # Commands used to build and install an old-style archive.
7314 RANLIB=$lt_RANLIB
7315 old_archive_cmds=$lt_old_archive_cmds
7316 old_postinstall_cmds=$lt_old_postinstall_cmds
7317 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7318
7319 # Create an old-style archive from a shared archive.
7320 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7321
7322 # Create a temporary old-style archive to link instead of a shared archive.
7323 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7324
7325 # Commands used to build and install a shared archive.
7326 archive_cmds=$lt_archive_cmds
7327 archive_expsym_cmds=$lt_archive_expsym_cmds
7328 postinstall_cmds=$lt_postinstall_cmds
7329 postuninstall_cmds=$lt_postuninstall_cmds
7330
7331 # Commands to strip libraries.
7332 old_striplib=$lt_old_striplib
7333 striplib=$lt_striplib
7334
7335 # Method to check whether dependent libraries are shared objects.
7336 deplibs_check_method=$lt_deplibs_check_method
7337
7338 # Command to use when deplibs_check_method == file_magic.
7339 file_magic_cmd=$lt_file_magic_cmd
7340
7341 # Flag that allows shared libraries with undefined symbols to be built.
7342 allow_undefined_flag=$lt_allow_undefined_flag
7343
7344 # Flag that forces no undefined symbols.
7345 no_undefined_flag=$lt_no_undefined_flag
7346
7347 # Commands used to finish a libtool library installation in a directory.
7348 finish_cmds=$lt_finish_cmds
7349
7350 # Same as above, but a single script fragment to be evaled but not shown.
7351 finish_eval=$lt_finish_eval
7352
7353 # Take the output of nm and produce a listing of raw symbols and C names.
7354 global_symbol_pipe=$lt_global_symbol_pipe
7355
7356 # Transform the output of nm in a proper C declaration
7357 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7358
7359 # Transform the output of nm in a C name address pair
7360 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7361
7362 # This is the shared library runtime path variable.
7363 runpath_var=$runpath_var
7364
7365 # This is the shared library path variable.
7366 shlibpath_var=$shlibpath_var
7367
7368 # Is shlibpath searched before the hard-coded library search path?
7369 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7370
7371 # How to hardcode a shared library path into an executable.
7372 hardcode_action=$hardcode_action
7373
7374 # Whether we should hardcode library paths into libraries.
7375 hardcode_into_libs=$hardcode_into_libs
7376
7377 # Flag to hardcode \$libdir into a binary during linking.
7378 # This must work even if \$libdir does not exist.
7379 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7380
7381 # Whether we need a single -rpath flag with a separated argument.
7382 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7383
7384 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7385 # resulting binary.
7386 hardcode_direct=$hardcode_direct
7387
7388 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7389 # resulting binary.
7390 hardcode_minus_L=$hardcode_minus_L
7391
7392 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7393 # the resulting binary.
7394 hardcode_shlibpath_var=$hardcode_shlibpath_var
7395
7396 # Variables whose values should be saved in libtool wrapper scripts and
7397 # restored at relink time.
7398 variables_saved_for_relink="$variables_saved_for_relink"
7399
7400 # Whether libtool must link a program against all its dependency libraries.
7401 link_all_deplibs=$link_all_deplibs
7402
7403 # Compile-time system search path for libraries
7404 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7405
7406 # Run-time system search path for libraries
7407 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7408
7409 # Fix the shell variable \$srcfile for the compiler.
7410 fix_srcfile_path="$fix_srcfile_path"
7411
7412 # Set to yes if exported symbols are required.
7413 always_export_symbols=$always_export_symbols
7414
7415 # The commands to list exported symbols.
7416 export_symbols_cmds=$lt_export_symbols_cmds
7417
7418 # The commands to extract the exported symbol list from a shared archive.
7419 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7420
7421 # Symbols that should not be listed in the preloaded symbols.
7422 exclude_expsyms=$lt_exclude_expsyms
7423
7424 # Symbols that must always be exported.
7425 include_expsyms=$lt_include_expsyms
7426
7427 # ### END LIBTOOL CONFIG
7428
7429 __EOF__
7430
7431   case $host_os in
7432   aix3*)
7433     cat <<\EOF >> "${ofile}T"
7434
7435 # AIX sometimes has problems with the GCC collect2 program.  For some
7436 # reason, if we set the COLLECT_NAMES environment variable, the problems
7437 # vanish in a puff of smoke.
7438 if test "X${COLLECT_NAMES+set}" != Xset; then
7439   COLLECT_NAMES=
7440   export COLLECT_NAMES
7441 fi
7442 EOF
7443     ;;
7444   esac
7445
7446   case $host_os in
7447   cygwin* | mingw* | pw32* | os2*)
7448     cat <<'EOF' >> "${ofile}T"
7449       # This is a source program that is used to create dlls on Windows
7450       # Don't remove nor modify the starting and closing comments
7451 # /* ltdll.c starts here */
7452 # #define WIN32_LEAN_AND_MEAN
7453 # #include <windows.h>
7454 # #undef WIN32_LEAN_AND_MEAN
7455 # #include <stdio.h>
7456 #
7457 # #ifndef __CYGWIN__
7458 # #  ifdef __CYGWIN32__
7459 # #    define __CYGWIN__ __CYGWIN32__
7460 # #  endif
7461 # #endif
7462 #
7463 # #ifdef __cplusplus
7464 # extern "C" {
7465 # #endif
7466 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7467 # #ifdef __cplusplus
7468 # }
7469 # #endif
7470 #
7471 # #ifdef __CYGWIN__
7472 # #include <cygwin/cygwin_dll.h>
7473 # DECLARE_CYGWIN_DLL( DllMain );
7474 # #endif
7475 # HINSTANCE __hDllInstance_base;
7476 #
7477 # BOOL APIENTRY
7478 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7479 # {
7480 #   __hDllInstance_base = hInst;
7481 #   return TRUE;
7482 # }
7483 # /* ltdll.c ends here */
7484         # This is a source program that is used to create import libraries
7485         # on Windows for dlls which lack them. Don't remove nor modify the
7486         # starting and closing comments
7487 # /* impgen.c starts here */
7488 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7489 #
7490 #  This file is part of GNU libtool.
7491 #
7492 #  This program is free software; you can redistribute it and/or modify
7493 #  it under the terms of the GNU General Public License as published by
7494 #  the Free Software Foundation; either version 2 of the License, or
7495 #  (at your option) any later version.
7496 #
7497 #  This program is distributed in the hope that it will be useful,
7498 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7499 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7500 #  GNU General Public License for more details.
7501 #
7502 #  You should have received a copy of the GNU General Public License
7503 #  along with this program; if not, write to the Free Software
7504 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7505 #  */
7506 #
7507 # #include <stdio.h>            /* for printf() */
7508 # #include <unistd.h>           /* for open(), lseek(), read() */
7509 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7510 # #include <string.h>           /* for strdup() */
7511 #
7512 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7513 # #ifndef O_BINARY
7514 # #define O_BINARY 0
7515 # #endif
7516 #
7517 # static unsigned int
7518 # pe_get16 (fd, offset)
7519 #      int fd;
7520 #      int offset;
7521 # {
7522 #   unsigned char b[2];
7523 #   lseek (fd, offset, SEEK_SET);
7524 #   read (fd, b, 2);
7525 #   return b[0] + (b[1]<<8);
7526 # }
7527 #
7528 # static unsigned int
7529 # pe_get32 (fd, offset)
7530 #     int fd;
7531 #     int offset;
7532 # {
7533 #   unsigned char b[4];
7534 #   lseek (fd, offset, SEEK_SET);
7535 #   read (fd, b, 4);
7536 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7537 # }
7538 #
7539 # static unsigned int
7540 # pe_as32 (ptr)
7541 #      void *ptr;
7542 # {
7543 #   unsigned char *b = ptr;
7544 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7545 # }
7546 #
7547 # int
7548 # main (argc, argv)
7549 #     int argc;
7550 #     char *argv[];
7551 # {
7552 #     int dll;
7553 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7554 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7555 #     unsigned long name_rvas, nexp;
7556 #     unsigned char *expdata, *erva;
7557 #     char *filename, *dll_name;
7558 #
7559 #     filename = argv[1];
7560 #
7561 #     dll = open(filename, O_RDONLY|O_BINARY);
7562 #     if (dll < 1)
7563 #       return 1;
7564 #
7565 #     dll_name = filename;
7566 #
7567 #     for (i=0; filename[i]; i++)
7568 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7569 #           dll_name = filename + i +1;
7570 #
7571 #     pe_header_offset = pe_get32 (dll, 0x3c);
7572 #     opthdr_ofs = pe_header_offset + 4 + 20;
7573 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7574 #
7575 #     if (num_entries < 1) /* no exports */
7576 #       return 1;
7577 #
7578 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7579 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7580 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7581 #     secptr = (pe_header_offset + 4 + 20 +
7582 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7583 #
7584 #     expptr = 0;
7585 #     for (i = 0; i < nsections; i++)
7586 #     {
7587 #       char sname[8];
7588 #       unsigned long secptr1 = secptr + 40 * i;
7589 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7590 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7591 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7592 #       lseek(dll, secptr1, SEEK_SET);
7593 #       read(dll, sname, 8);
7594 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7595 #       {
7596 #           expptr = fptr + (export_rva - vaddr);
7597 #           if (export_rva + export_size > vaddr + vsize)
7598 #               export_size = vsize - (export_rva - vaddr);
7599 #           break;
7600 #       }
7601 #     }
7602 #
7603 #     expdata = (unsigned char*)malloc(export_size);
7604 #     lseek (dll, expptr, SEEK_SET);
7605 #     read (dll, expdata, export_size);
7606 #     erva = expdata - export_rva;
7607 #
7608 #     nexp = pe_as32 (expdata+24);
7609 #     name_rvas = pe_as32 (expdata+32);
7610 #
7611 #     printf ("EXPORTS\n");
7612 #     for (i = 0; i<nexp; i++)
7613 #     {
7614 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7615 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7616 #     }
7617 #
7618 #     return 0;
7619 # }
7620 # /* impgen.c ends here */
7621
7622 EOF
7623     ;;
7624   esac
7625
7626   # We use sed instead of cat because bash on DJGPP gets confused if
7627   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7628   # text mode, it properly converts lines to CR/LF.  This bash problem
7629   # is reportedly fixed, but why not run on old versions too?
7630   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7631
7632   mv -f "${ofile}T" "$ofile" || \
7633     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7634   chmod +x "$ofile"
7635 fi
7636
7637
7638
7639
7640
7641 # This can be used to rebuild libtool when needed
7642 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7643
7644 # Always use our own libtool.
7645 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7646
7647 # Prevent multiple expansion
7648
7649
7650
7651 ol_link_perl=no
7652 if test $ol_enable_perl != no ; then
7653         # Extract the first word of "perl", so it can be a program name with args.
7654 set dummy perl; ac_word=$2
7655 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7656 echo "configure:7657: checking for $ac_word" >&5
7657 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7658   echo $ac_n "(cached) $ac_c" 1>&6
7659 else
7660   case "$PERLBIN" in
7661   /*)
7662   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7663   ;;
7664   ?:/*)
7665   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7666   ;;
7667   *)
7668   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7669   ac_dummy="$PATH"
7670   for ac_dir in $ac_dummy; do 
7671     test -z "$ac_dir" && ac_dir=.
7672     if test -f $ac_dir/$ac_word; then
7673       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7674       break
7675     fi
7676   done
7677   IFS="$ac_save_ifs"
7678   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7679   ;;
7680 esac
7681 fi
7682 PERLBIN="$ac_cv_path_PERLBIN"
7683 if test -n "$PERLBIN"; then
7684   echo "$ac_t""$PERLBIN" 1>&6
7685 else
7686   echo "$ac_t""no" 1>&6
7687 fi
7688
7689
7690         if test "no$PERLBIN" = "no" ; then
7691                 if test $ol_enable_perl = yes ; then
7692                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7693                 fi
7694
7695         else
7696                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7697                 PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e 's/ -lc / /' -e 's/ -lc$//'`"
7698
7699                 if test x"$ol_enable_perl" = "xyes" ; then
7700                         SLAPD_PERL_LDFLAGS="$PERL_LDFLAGS"
7701                 else
7702                         MOD_PERL_LDFLAGS="$PERL_LDFLAGS"
7703                 fi
7704                                 ol_link_perl=yes
7705         fi
7706 fi
7707
7708 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7709 echo "configure:7710: checking how to run the C preprocessor" >&5
7710 # On Suns, sometimes $CPP names a directory.
7711 if test -n "$CPP" && test -d "$CPP"; then
7712   CPP=
7713 fi
7714 if test -z "$CPP"; then
7715 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7716   echo $ac_n "(cached) $ac_c" 1>&6
7717 else
7718     # This must be in double quotes, not single quotes, because CPP may get
7719   # substituted into the Makefile and "${CC-cc}" will confuse make.
7720   CPP="${CC-cc} -E"
7721   # On the NeXT, cc -E runs the code through the compiler's parser,
7722   # not just through cpp.
7723   cat > conftest.$ac_ext <<EOF
7724 #line 7725 "configure"
7725 #include "confdefs.h"
7726 #include <assert.h>
7727 Syntax Error
7728 EOF
7729 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7730 { (eval echo configure:7731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7731 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7732 if test -z "$ac_err"; then
7733   :
7734 else
7735   echo "$ac_err" >&5
7736   echo "configure: failed program was:" >&5
7737   cat conftest.$ac_ext >&5
7738   rm -rf conftest*
7739   CPP="${CC-cc} -E -traditional-cpp"
7740   cat > conftest.$ac_ext <<EOF
7741 #line 7742 "configure"
7742 #include "confdefs.h"
7743 #include <assert.h>
7744 Syntax Error
7745 EOF
7746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7747 { (eval echo configure:7748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7749 if test -z "$ac_err"; then
7750   :
7751 else
7752   echo "$ac_err" >&5
7753   echo "configure: failed program was:" >&5
7754   cat conftest.$ac_ext >&5
7755   rm -rf conftest*
7756   CPP="${CC-cc} -nologo -E"
7757   cat > conftest.$ac_ext <<EOF
7758 #line 7759 "configure"
7759 #include "confdefs.h"
7760 #include <assert.h>
7761 Syntax Error
7762 EOF
7763 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7764 { (eval echo configure:7765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7765 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7766 if test -z "$ac_err"; then
7767   :
7768 else
7769   echo "$ac_err" >&5
7770   echo "configure: failed program was:" >&5
7771   cat conftest.$ac_ext >&5
7772   rm -rf conftest*
7773   CPP=/lib/cpp
7774 fi
7775 rm -f conftest*
7776 fi
7777 rm -f conftest*
7778 fi
7779 rm -f conftest*
7780   ac_cv_prog_CPP="$CPP"
7781 fi
7782   CPP="$ac_cv_prog_CPP"
7783 else
7784   ac_cv_prog_CPP="$CPP"
7785 fi
7786 echo "$ac_t""$CPP" 1>&6
7787
7788
7789
7790 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7791 echo "configure:7792: checking for Cygwin environment" >&5
7792 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7793   echo $ac_n "(cached) $ac_c" 1>&6
7794 else
7795   cat > conftest.$ac_ext <<EOF
7796 #line 7797 "configure"
7797 #include "confdefs.h"
7798
7799 int main() {
7800
7801 #ifndef __CYGWIN__
7802 #define __CYGWIN__ __CYGWIN32__
7803 #endif
7804 return __CYGWIN__;
7805 ; return 0; }
7806 EOF
7807 if { (eval echo configure:7808: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7808   rm -rf conftest*
7809   ac_cv_cygwin=yes
7810 else
7811   echo "configure: failed program was:" >&5
7812   cat conftest.$ac_ext >&5
7813   rm -rf conftest*
7814   ac_cv_cygwin=no
7815 fi
7816 rm -f conftest*
7817 fi
7818
7819 echo "$ac_t""$ac_cv_cygwin" 1>&6
7820 CYGWIN=
7821 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7822 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7823 echo "configure:7824: checking for mingw32 environment" >&5
7824 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7825   echo $ac_n "(cached) $ac_c" 1>&6
7826 else
7827   cat > conftest.$ac_ext <<EOF
7828 #line 7829 "configure"
7829 #include "confdefs.h"
7830
7831 int main() {
7832 return __MINGW32__;
7833 ; return 0; }
7834 EOF
7835 if { (eval echo configure:7836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7836   rm -rf conftest*
7837   ac_cv_mingw32=yes
7838 else
7839   echo "configure: failed program was:" >&5
7840   cat conftest.$ac_ext >&5
7841   rm -rf conftest*
7842   ac_cv_mingw32=no
7843 fi
7844 rm -f conftest*
7845 fi
7846
7847 echo "$ac_t""$ac_cv_mingw32" 1>&6
7848 MINGW32=
7849 test "$ac_cv_mingw32" = yes && MINGW32=yes
7850
7851
7852
7853 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7854 echo "configure:7855: checking for executable suffix" >&5
7855 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7856   echo $ac_n "(cached) $ac_c" 1>&6
7857 else
7858   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7859   ac_cv_exeext=.exe
7860 else
7861   rm -f conftest*
7862   echo 'int main () { return 0; }' > conftest.$ac_ext
7863   ac_cv_exeext=
7864   if { (eval echo configure:7865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7865     for file in conftest.*; do
7866       case $file in
7867       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7868       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7869       esac
7870     done
7871   else
7872     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
7873   fi
7874   rm -f conftest*
7875   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
7876 fi
7877 fi
7878
7879 EXEEXT=""
7880 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
7881 echo "$ac_t""${ac_cv_exeext}" 1>&6
7882 ac_exeext=$EXEEXT
7883
7884 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
7885 echo "configure:7886: checking for object suffix" >&5
7886 if eval "test \"\${ac_cv_objext+set}\" = set"; then
7887   echo $ac_n "(cached) $ac_c" 1>&6
7888 else
7889   rm -f conftest*
7890 echo 'int i = 1;' > conftest.$ac_ext
7891 if { (eval echo configure:7892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7892   for ac_file in conftest.*; do
7893     case $ac_file in
7894     *.c) ;;
7895     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
7896     esac
7897   done
7898 else
7899   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
7900 fi
7901 rm -f conftest*
7902 fi
7903
7904 echo "$ac_t""$ac_cv_objext" 1>&6
7905 OBJEXT=$ac_cv_objext
7906 ac_objext=$ac_cv_objext
7907
7908
7909 cat >> confdefs.h <<EOF
7910 #define EXEEXT "${EXEEXT}"
7911 EOF
7912
7913
7914 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
7915 echo "configure:7916: checking for be_app in -lbe" >&5
7916 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
7917 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
7918   echo $ac_n "(cached) $ac_c" 1>&6
7919 else
7920   ac_save_LIBS="$LIBS"
7921 LIBS="-lbe -lroot -lnet $LIBS"
7922 cat > conftest.$ac_ext <<EOF
7923 #line 7924 "configure"
7924 #include "confdefs.h"
7925 /* Override any gcc2 internal prototype to avoid an error.  */
7926 /* We use char because int might match the return type of a gcc2
7927     builtin and then its argument prototype would still apply.  */
7928 char be_app();
7929
7930 int main() {
7931 be_app()
7932 ; return 0; }
7933 EOF
7934 if { (eval echo configure:7935: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
7935   rm -rf conftest*
7936   eval "ac_cv_lib_$ac_lib_var=yes"
7937 else
7938   echo "configure: failed program was:" >&5
7939   cat conftest.$ac_ext >&5
7940   rm -rf conftest*
7941   eval "ac_cv_lib_$ac_lib_var=no"
7942 fi
7943 rm -f conftest*
7944 LIBS="$ac_save_LIBS"
7945
7946 fi
7947 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
7948   echo "$ac_t""yes" 1>&6
7949   LIBS="$LIBS -lbe -lroot -lnet"
7950 else
7951   echo "$ac_t""no" 1>&6
7952 :
7953 fi
7954
7955
7956
7957
7958
7959 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
7960 echo "configure:7961: checking for ${CC-cc} option to accept ANSI C" >&5
7961 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
7962   echo $ac_n "(cached) $ac_c" 1>&6
7963 else
7964   am_cv_prog_cc_stdc=no
7965 ac_save_CC="$CC"
7966 # Don't try gcc -ansi; that turns off useful extensions and
7967 # breaks some systems' header files.
7968 # AIX                   -qlanglvl=ansi
7969 # Ultrix and OSF/1      -std1
7970 # HP-UX 10.20 and later -Ae
7971 # HP-UX older versions  -Aa -D_HPUX_SOURCE
7972 # SVR4                  -Xc -D__EXTENSIONS__
7973 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
7974 do
7975   CC="$ac_save_CC $ac_arg"
7976   cat > conftest.$ac_ext <<EOF
7977 #line 7978 "configure"
7978 #include "confdefs.h"
7979 #include <stdarg.h>
7980 #include <stdio.h>
7981 #include <sys/types.h>
7982 #include <sys/stat.h>
7983 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
7984 struct buf { int x; };
7985 FILE * (*rcsopen) (struct buf *, struct stat *, int);
7986 static char *e (p, i)
7987      char **p;
7988      int i;
7989 {
7990   return p[i];
7991 }
7992 static char *f (char * (*g) (char **, int), char **p, ...)
7993 {
7994   char *s;
7995   va_list v;
7996   va_start (v,p);
7997   s = g (p, va_arg (v,int));
7998   va_end (v);
7999   return s;
8000 }
8001 int test (int i, double x);
8002 struct s1 {int (*f) (int a);};
8003 struct s2 {int (*f) (double a);};
8004 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8005 int argc;
8006 char **argv;
8007
8008 int main() {
8009
8010 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8011
8012 ; return 0; }
8013 EOF
8014 if { (eval echo configure:8015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8015   rm -rf conftest*
8016   am_cv_prog_cc_stdc="$ac_arg"; break
8017 else
8018   echo "configure: failed program was:" >&5
8019   cat conftest.$ac_ext >&5
8020 fi
8021 rm -f conftest*
8022 done
8023 CC="$ac_save_CC"
8024
8025 fi
8026
8027 if test -z "$am_cv_prog_cc_stdc"; then
8028   echo "$ac_t""none needed" 1>&6
8029 else
8030   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8031 fi
8032 case "x$am_cv_prog_cc_stdc" in
8033   x|xno) ;;
8034   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8035 esac
8036
8037 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8038         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8039 fi
8040
8041 # test for make depend flag
8042 OL_MKDEP=
8043 OL_MKDEP_FLAGS=
8044 if test -z "${MKDEP}"; then
8045         OL_MKDEP="${CC-cc}"
8046         if test -z "${MKDEP_FLAGS}"; then
8047                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8048 echo "configure:8049: checking for ${OL_MKDEP} depend flag" >&5
8049 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8050   echo $ac_n "(cached) $ac_c" 1>&6
8051 else
8052   
8053                         ol_cv_mkdep=no
8054                         for flag in "-M" "-xM"; do
8055                                 cat > conftest.c <<EOF
8056  noCode;
8057 EOF
8058                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8059: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8059                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8060                                 then
8061                                         if test ! -f conftest."${ac_object}" ; then
8062                                                 ol_cv_mkdep=$flag
8063                                                 OL_MKDEP_FLAGS="$flag"
8064                                                 break
8065                                         fi
8066                                 fi
8067                         done
8068                         rm -f conftest*
8069                 
8070 fi
8071
8072 echo "$ac_t""$ol_cv_mkdep" 1>&6
8073         else
8074                 cc_cv_mkdep=yes
8075                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8076         fi
8077 else
8078         cc_cv_mkdep=yes
8079         OL_MKDEP="${MKDEP}"
8080         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8081 fi
8082
8083
8084
8085 if test "${ol_cv_mkdep}" = no ; then
8086         # this will soon become an error
8087         echo "configure: warning: do not know how to generate dependencies" 1>&2
8088 fi
8089
8090 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8091 echo "configure:8092: checking for afopen in -ls" >&5
8092 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8093 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8094   echo $ac_n "(cached) $ac_c" 1>&6
8095 else
8096   ac_save_LIBS="$LIBS"
8097 LIBS="-ls  $LIBS"
8098 cat > conftest.$ac_ext <<EOF
8099 #line 8100 "configure"
8100 #include "confdefs.h"
8101 /* Override any gcc2 internal prototype to avoid an error.  */
8102 /* We use char because int might match the return type of a gcc2
8103     builtin and then its argument prototype would still apply.  */
8104 char afopen();
8105
8106 int main() {
8107 afopen()
8108 ; return 0; }
8109 EOF
8110 if { (eval echo configure:8111: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8111   rm -rf conftest*
8112   eval "ac_cv_lib_$ac_lib_var=yes"
8113 else
8114   echo "configure: failed program was:" >&5
8115   cat conftest.$ac_ext >&5
8116   rm -rf conftest*
8117   eval "ac_cv_lib_$ac_lib_var=no"
8118 fi
8119 rm -f conftest*
8120 LIBS="$ac_save_LIBS"
8121
8122 fi
8123 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8124   echo "$ac_t""yes" 1>&6
8125   
8126         AUTH_LIBS=-ls
8127         cat >> confdefs.h <<\EOF
8128 #define HAVE_AIX_SECURITY 1
8129 EOF
8130
8131
8132 else
8133   echo "$ac_t""no" 1>&6
8134 fi
8135
8136
8137 case "$target" in
8138 *-ibm-openedition)
8139         ac_cv_func_getopt=no
8140         cat >> confdefs.h <<\EOF
8141 #define BOTH_STRINGS_H 1
8142 EOF
8143
8144         ;;
8145 esac
8146
8147 ol_link_modules=no
8148 if test $ol_enable_modules != no ; then
8149         for ac_hdr in ltdl.h
8150 do
8151 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8152 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8153 echo "configure:8154: checking for $ac_hdr" >&5
8154 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8155   echo $ac_n "(cached) $ac_c" 1>&6
8156 else
8157   cat > conftest.$ac_ext <<EOF
8158 #line 8159 "configure"
8159 #include "confdefs.h"
8160 #include <$ac_hdr>
8161 EOF
8162 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8163 { (eval echo configure:8164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8164 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8165 if test -z "$ac_err"; then
8166   rm -rf conftest*
8167   eval "ac_cv_header_$ac_safe=yes"
8168 else
8169   echo "$ac_err" >&5
8170   echo "configure: failed program was:" >&5
8171   cat conftest.$ac_ext >&5
8172   rm -rf conftest*
8173   eval "ac_cv_header_$ac_safe=no"
8174 fi
8175 rm -f conftest*
8176 fi
8177 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8178   echo "$ac_t""yes" 1>&6
8179     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8180   cat >> confdefs.h <<EOF
8181 #define $ac_tr_hdr 1
8182 EOF
8183  
8184 else
8185   echo "$ac_t""no" 1>&6
8186 fi
8187 done
8188
8189
8190         if test $ac_cv_header_ltdl_h = no ; then
8191                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8192         fi
8193
8194         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8195 echo "configure:8196: checking for lt_dlinit in -lltdl" >&5
8196 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8197 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8198   echo $ac_n "(cached) $ac_c" 1>&6
8199 else
8200   ac_save_LIBS="$LIBS"
8201 LIBS="-lltdl  $LIBS"
8202 cat > conftest.$ac_ext <<EOF
8203 #line 8204 "configure"
8204 #include "confdefs.h"
8205 /* Override any gcc2 internal prototype to avoid an error.  */
8206 /* We use char because int might match the return type of a gcc2
8207     builtin and then its argument prototype would still apply.  */
8208 char lt_dlinit();
8209
8210 int main() {
8211 lt_dlinit()
8212 ; return 0; }
8213 EOF
8214 if { (eval echo configure:8215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8215   rm -rf conftest*
8216   eval "ac_cv_lib_$ac_lib_var=yes"
8217 else
8218   echo "configure: failed program was:" >&5
8219   cat conftest.$ac_ext >&5
8220   rm -rf conftest*
8221   eval "ac_cv_lib_$ac_lib_var=no"
8222 fi
8223 rm -f conftest*
8224 LIBS="$ac_save_LIBS"
8225
8226 fi
8227 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8228   echo "$ac_t""yes" 1>&6
8229   
8230                 MODULES_LIBS=-lltdl
8231                 cat >> confdefs.h <<\EOF
8232 #define HAVE_LIBLTDL 1
8233 EOF
8234
8235         
8236 else
8237   echo "$ac_t""no" 1>&6
8238 fi
8239
8240
8241         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8242                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8243         fi
8244         ol_link_modules=yes
8245
8246 else
8247         for i in $Backends; do
8248                 eval "ol_tmp=\$ol_enable_$i"
8249                 if test $ol_tmp = mod ; then
8250                         echo "configure: warning: building static $i backend" 1>&2
8251                         eval "ol_enable_$i=yes"
8252                 fi
8253         done
8254         for i in $Overlays; do
8255                 eval "ol_tmp=\$ol_enable_$i"
8256                 if test $ol_tmp = mod ; then
8257                         echo "configure: warning: building static $i overlay" 1>&2
8258                         eval "ol_enable_$i=yes"
8259                 fi
8260         done
8261 fi
8262
8263 # test for EBCDIC
8264 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8265 echo "configure:8266: checking for EBCDIC" >&5
8266 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8267   echo $ac_n "(cached) $ac_c" 1>&6
8268 else
8269   
8270         cat > conftest.$ac_ext <<EOF
8271 #line 8272 "configure"
8272 #include "confdefs.h"
8273
8274 #if !('M' == 0xd4)
8275 #include <__ASCII__/generate_error.h>
8276 #endif
8277
8278 EOF
8279 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8280 { (eval echo configure:8281: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8281 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8282 if test -z "$ac_err"; then
8283   rm -rf conftest*
8284   ol_cv_cpp_ebcdic=yes
8285 else
8286   echo "$ac_err" >&5
8287   echo "configure: failed program was:" >&5
8288   cat conftest.$ac_ext >&5
8289   rm -rf conftest*
8290   ol_cv_cpp_ebcdic=no
8291 fi
8292 rm -f conftest*
8293 fi
8294
8295 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8296 if test $ol_cv_cpp_ebcdic = yes ; then
8297         cat >> confdefs.h <<\EOF
8298 #define HAVE_EBCDIC 1
8299 EOF
8300
8301 fi
8302
8303 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8304 echo "configure:8305: checking for ANSI C header files" >&5
8305 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8306   echo $ac_n "(cached) $ac_c" 1>&6
8307 else
8308   cat > conftest.$ac_ext <<EOF
8309 #line 8310 "configure"
8310 #include "confdefs.h"
8311 #include <stdlib.h>
8312 #include <stdarg.h>
8313 #include <string.h>
8314 #include <float.h>
8315 EOF
8316 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8317 { (eval echo configure:8318: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8318 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8319 if test -z "$ac_err"; then
8320   rm -rf conftest*
8321   ol_cv_header_stdc=yes
8322 else
8323   echo "$ac_err" >&5
8324   echo "configure: failed program was:" >&5
8325   cat conftest.$ac_ext >&5
8326   rm -rf conftest*
8327   ol_cv_header_stdc=no
8328 fi
8329 rm -f conftest*
8330
8331 if test $ol_cv_header_stdc = yes; then
8332   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8333 cat > conftest.$ac_ext <<EOF
8334 #line 8335 "configure"
8335 #include "confdefs.h"
8336 #include <string.h>
8337 EOF
8338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8339   egrep "memchr" >/dev/null 2>&1; then
8340   :
8341 else
8342   rm -rf conftest*
8343   ol_cv_header_stdc=no
8344 fi
8345 rm -f conftest*
8346
8347 fi
8348
8349 if test $ol_cv_header_stdc = yes; then
8350   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8351 cat > conftest.$ac_ext <<EOF
8352 #line 8353 "configure"
8353 #include "confdefs.h"
8354 #include <stdlib.h>
8355 EOF
8356 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8357   egrep "free" >/dev/null 2>&1; then
8358   :
8359 else
8360   rm -rf conftest*
8361   ol_cv_header_stdc=no
8362 fi
8363 rm -f conftest*
8364
8365 fi
8366
8367 if test $ol_cv_header_stdc = yes; then
8368   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8369 if test "$cross_compiling" = yes; then
8370   :
8371 else
8372   cat > conftest.$ac_ext <<EOF
8373 #line 8374 "configure"
8374 #include "confdefs.h"
8375 #include <ctype.h>
8376 #ifndef HAVE_EBCDIC
8377 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8378 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8379 #else
8380 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8381                 || ('j' <= (c) && (c) <= 'r') \
8382                 || ('s' <= (c) && (c) <= 'z'))
8383 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8384 #endif
8385 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8386 int main () { int i; for (i = 0; i < 256; i++)
8387 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8388 exit (0); }
8389
8390 EOF
8391 if { (eval echo configure:8392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8392 then
8393   :
8394 else
8395   echo "configure: failed program was:" >&5
8396   cat conftest.$ac_ext >&5
8397   rm -fr conftest*
8398   ol_cv_header_stdc=no
8399 fi
8400 rm -fr conftest*
8401 fi
8402
8403 fi
8404 fi
8405
8406 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8407 if test $ol_cv_header_stdc = yes; then
8408   cat >> confdefs.h <<\EOF
8409 #define STDC_HEADERS 1
8410 EOF
8411
8412 fi
8413 ac_cv_header_stdc=disable
8414
8415
8416 if test $ol_cv_header_stdc != yes; then
8417         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8418 fi
8419
8420 ac_header_dirent=no
8421 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8422 do
8423 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8424 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8425 echo "configure:8426: checking for $ac_hdr that defines DIR" >&5
8426 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8427   echo $ac_n "(cached) $ac_c" 1>&6
8428 else
8429   cat > conftest.$ac_ext <<EOF
8430 #line 8431 "configure"
8431 #include "confdefs.h"
8432 #include <sys/types.h>
8433 #include <$ac_hdr>
8434 int main() {
8435 DIR *dirp = 0;
8436 ; return 0; }
8437 EOF
8438 if { (eval echo configure:8439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8439   rm -rf conftest*
8440   eval "ac_cv_header_dirent_$ac_safe=yes"
8441 else
8442   echo "configure: failed program was:" >&5
8443   cat conftest.$ac_ext >&5
8444   rm -rf conftest*
8445   eval "ac_cv_header_dirent_$ac_safe=no"
8446 fi
8447 rm -f conftest*
8448 fi
8449 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8450   echo "$ac_t""yes" 1>&6
8451     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8452   cat >> confdefs.h <<EOF
8453 #define $ac_tr_hdr 1
8454 EOF
8455  ac_header_dirent=$ac_hdr; break
8456 else
8457   echo "$ac_t""no" 1>&6
8458 fi
8459 done
8460 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8461 if test $ac_header_dirent = dirent.h; then
8462 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8463 echo "configure:8464: checking for opendir in -ldir" >&5
8464 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8465 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8466   echo $ac_n "(cached) $ac_c" 1>&6
8467 else
8468   ac_save_LIBS="$LIBS"
8469 LIBS="-ldir  $LIBS"
8470 cat > conftest.$ac_ext <<EOF
8471 #line 8472 "configure"
8472 #include "confdefs.h"
8473 /* Override any gcc2 internal prototype to avoid an error.  */
8474 /* We use char because int might match the return type of a gcc2
8475     builtin and then its argument prototype would still apply.  */
8476 char opendir();
8477
8478 int main() {
8479 opendir()
8480 ; return 0; }
8481 EOF
8482 if { (eval echo configure:8483: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8483   rm -rf conftest*
8484   eval "ac_cv_lib_$ac_lib_var=yes"
8485 else
8486   echo "configure: failed program was:" >&5
8487   cat conftest.$ac_ext >&5
8488   rm -rf conftest*
8489   eval "ac_cv_lib_$ac_lib_var=no"
8490 fi
8491 rm -f conftest*
8492 LIBS="$ac_save_LIBS"
8493
8494 fi
8495 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8496   echo "$ac_t""yes" 1>&6
8497   LIBS="$LIBS -ldir"
8498 else
8499   echo "$ac_t""no" 1>&6
8500 fi
8501
8502 else
8503 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8504 echo "configure:8505: checking for opendir in -lx" >&5
8505 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8506 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8507   echo $ac_n "(cached) $ac_c" 1>&6
8508 else
8509   ac_save_LIBS="$LIBS"
8510 LIBS="-lx  $LIBS"
8511 cat > conftest.$ac_ext <<EOF
8512 #line 8513 "configure"
8513 #include "confdefs.h"
8514 /* Override any gcc2 internal prototype to avoid an error.  */
8515 /* We use char because int might match the return type of a gcc2
8516     builtin and then its argument prototype would still apply.  */
8517 char opendir();
8518
8519 int main() {
8520 opendir()
8521 ; return 0; }
8522 EOF
8523 if { (eval echo configure:8524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8524   rm -rf conftest*
8525   eval "ac_cv_lib_$ac_lib_var=yes"
8526 else
8527   echo "configure: failed program was:" >&5
8528   cat conftest.$ac_ext >&5
8529   rm -rf conftest*
8530   eval "ac_cv_lib_$ac_lib_var=no"
8531 fi
8532 rm -f conftest*
8533 LIBS="$ac_save_LIBS"
8534
8535 fi
8536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8537   echo "$ac_t""yes" 1>&6
8538   LIBS="$LIBS -lx"
8539 else
8540   echo "$ac_t""no" 1>&6
8541 fi
8542
8543 fi
8544
8545 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8546 echo "configure:8547: checking for sys/wait.h that is POSIX.1 compatible" >&5
8547 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8548   echo $ac_n "(cached) $ac_c" 1>&6
8549 else
8550   cat > conftest.$ac_ext <<EOF
8551 #line 8552 "configure"
8552 #include "confdefs.h"
8553 #include <sys/types.h>
8554 #include <sys/wait.h>
8555 #ifndef WEXITSTATUS
8556 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8557 #endif
8558 #ifndef WIFEXITED
8559 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8560 #endif
8561 int main() {
8562 int s;
8563 wait (&s);
8564 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8565 ; return 0; }
8566 EOF
8567 if { (eval echo configure:8568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8568   rm -rf conftest*
8569   ac_cv_header_sys_wait_h=yes
8570 else
8571   echo "configure: failed program was:" >&5
8572   cat conftest.$ac_ext >&5
8573   rm -rf conftest*
8574   ac_cv_header_sys_wait_h=no
8575 fi
8576 rm -f conftest*
8577 fi
8578
8579 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8580 if test $ac_cv_header_sys_wait_h = yes; then
8581   cat >> confdefs.h <<\EOF
8582 #define HAVE_SYS_WAIT_H 1
8583 EOF
8584
8585 fi
8586
8587 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8588 echo "configure:8589: checking POSIX termios" >&5
8589 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8590   echo $ac_n "(cached) $ac_c" 1>&6
8591 else
8592   cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8595 #include <sys/types.h>
8596 #include <unistd.h>
8597 #include <termios.h>
8598 int main() {
8599 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8600    tcgetattr(0, 0);
8601 ; return 0; }
8602 EOF
8603 if { (eval echo configure:8604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8604   rm -rf conftest*
8605   am_cv_sys_posix_termios=yes
8606 else
8607   echo "configure: failed program was:" >&5
8608   cat conftest.$ac_ext >&5
8609   rm -rf conftest*
8610   am_cv_sys_posix_termios=no
8611 fi
8612 rm -f conftest*
8613 fi
8614
8615 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8616
8617
8618  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8619 echo "configure:8620: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8620 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8621   echo $ac_n "(cached) $ac_c" 1>&6
8622 else
8623   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8624
8625   gwinsz_in_termios_h=no
8626   if test $am_cv_sys_posix_termios = yes; then
8627     cat > conftest.$ac_ext <<EOF
8628 #line 8629 "configure"
8629 #include "confdefs.h"
8630 #include <sys/types.h>
8631 #     include <termios.h>
8632 #     ifdef TIOCGWINSZ
8633         yes
8634 #     endif
8635     
8636 EOF
8637 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8638   egrep "yes" >/dev/null 2>&1; then
8639   rm -rf conftest*
8640   gwinsz_in_termios_h=yes
8641 fi
8642 rm -f conftest*
8643
8644   fi
8645
8646   if test $gwinsz_in_termios_h = no; then
8647     cat > conftest.$ac_ext <<EOF
8648 #line 8649 "configure"
8649 #include "confdefs.h"
8650 #include <sys/types.h>
8651 #     include <sys/ioctl.h>
8652 #     ifdef TIOCGWINSZ
8653         yes
8654 #     endif
8655     
8656 EOF
8657 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8658   egrep "yes" >/dev/null 2>&1; then
8659   rm -rf conftest*
8660   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8661 fi
8662 rm -f conftest*
8663
8664   fi
8665   
8666 fi
8667
8668 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8669   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8670     cat >> confdefs.h <<\EOF
8671 #define GWINSZ_IN_SYS_IOCTL 1
8672 EOF
8673
8674   fi
8675
8676 if test $am_cv_sys_posix_termios = yes ; then
8677         cat >> confdefs.h <<\EOF
8678 #define HAVE_POSIX_TERMIOS 1
8679 EOF
8680
8681 fi
8682
8683 for ac_hdr in \
8684         arpa/inet.h             \
8685         arpa/nameser.h  \
8686         assert.h                \
8687         bits/types.h    \
8688         conio.h                 \
8689         crypt.h                 \
8690         direct.h                \
8691         errno.h                 \
8692         fcntl.h                 \
8693         filio.h                 \
8694         getopt.h                \
8695         grp.h                   \
8696         io.h                    \
8697         libutil.h               \
8698         limits.h                \
8699         locale.h                \
8700         netinet/tcp.h   \
8701         malloc.h                \
8702         memory.h                \
8703         psap.h                  \
8704         pwd.h                   \
8705         process.h               \
8706         resolv.h                \
8707         sgtty.h                 \
8708         shadow.h                \
8709         stddef.h                \
8710         string.h                \
8711         strings.h               \
8712         sysexits.h              \
8713         sys/file.h              \
8714         sys/filio.h             \
8715         sys/errno.h             \
8716         sys/ioctl.h             \
8717         sys/param.h             \
8718         sys/resource.h  \
8719         sys/select.h    \
8720         sys/socket.h    \
8721         sys/stat.h              \
8722         sys/syslog.h    \
8723         sys/time.h              \
8724         sys/types.h             \
8725         sys/ucred.h             \
8726         sys/uio.h               \
8727         syslog.h                \
8728         termios.h               \
8729         unistd.h                \
8730         winsock.h               \
8731         winsock2.h              \
8732
8733 do
8734 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8735 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8736 echo "configure:8737: checking for $ac_hdr" >&5
8737 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8738   echo $ac_n "(cached) $ac_c" 1>&6
8739 else
8740   cat > conftest.$ac_ext <<EOF
8741 #line 8742 "configure"
8742 #include "confdefs.h"
8743 #include <$ac_hdr>
8744 EOF
8745 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8746 { (eval echo configure:8747: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8747 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8748 if test -z "$ac_err"; then
8749   rm -rf conftest*
8750   eval "ac_cv_header_$ac_safe=yes"
8751 else
8752   echo "$ac_err" >&5
8753   echo "configure: failed program was:" >&5
8754   cat conftest.$ac_ext >&5
8755   rm -rf conftest*
8756   eval "ac_cv_header_$ac_safe=no"
8757 fi
8758 rm -f conftest*
8759 fi
8760 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8761   echo "$ac_t""yes" 1>&6
8762     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8763   cat >> confdefs.h <<EOF
8764 #define $ac_tr_hdr 1
8765 EOF
8766  
8767 else
8768   echo "$ac_t""no" 1>&6
8769 fi
8770 done
8771
8772
8773
8774
8775 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8776 echo "configure:8777: checking for sigset in -lV3" >&5
8777 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8778 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8779   echo $ac_n "(cached) $ac_c" 1>&6
8780 else
8781   ac_save_LIBS="$LIBS"
8782 LIBS="-lV3  $LIBS"
8783 cat > conftest.$ac_ext <<EOF
8784 #line 8785 "configure"
8785 #include "confdefs.h"
8786 /* Override any gcc2 internal prototype to avoid an error.  */
8787 /* We use char because int might match the return type of a gcc2
8788     builtin and then its argument prototype would still apply.  */
8789 char sigset();
8790
8791 int main() {
8792 sigset()
8793 ; return 0; }
8794 EOF
8795 if { (eval echo configure:8796: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8796   rm -rf conftest*
8797   eval "ac_cv_lib_$ac_lib_var=yes"
8798 else
8799   echo "configure: failed program was:" >&5
8800   cat conftest.$ac_ext >&5
8801   rm -rf conftest*
8802   eval "ac_cv_lib_$ac_lib_var=no"
8803 fi
8804 rm -f conftest*
8805 LIBS="$ac_save_LIBS"
8806
8807 fi
8808 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8809   echo "$ac_t""yes" 1>&6
8810     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8811     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8812   cat >> confdefs.h <<EOF
8813 #define $ac_tr_lib 1
8814 EOF
8815
8816   LIBS="-lV3 $LIBS"
8817
8818 else
8819   echo "$ac_t""no" 1>&6
8820 fi
8821
8822
8823 if test "$ac_cv_header_winsock_h" = yes; then
8824 echo $ac_n "checking for winsock""... $ac_c" 1>&6
8825 echo "configure:8826: checking for winsock" >&5
8826 if eval "test \"\${ol_cv_winsock+set}\" = set"; then
8827   echo $ac_n "(cached) $ac_c" 1>&6
8828 else
8829   save_LIBS="$LIBS"
8830 for curlib in ws2_32 wsock32; do
8831         LIBS="$LIBS -l$curlib"
8832         cat > conftest.$ac_ext <<EOF
8833 #line 8834 "configure"
8834 #include "confdefs.h"
8835 #include <winsock.h>
8836                         
8837 int main() {
8838
8839                         socket(0,0,0);
8840                         select(0,NULL,NULL,NULL,NULL);
8841                         closesocket(0);
8842                         gethostname(NULL,0);
8843                         
8844 ; return 0; }
8845 EOF
8846 if { (eval echo configure:8847: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8847   rm -rf conftest*
8848   ol_cv_winsock=yes
8849 else
8850   echo "configure: failed program was:" >&5
8851   cat conftest.$ac_ext >&5
8852   rm -rf conftest*
8853   ol_cv_winsock=no
8854 fi
8855 rm -f conftest*
8856
8857         if test $ol_cv_winsock = yes; then
8858                 cat >> confdefs.h <<\EOF
8859 #define HAVE_WINSOCK 1
8860 EOF
8861
8862                 ac_cv_func_socket=yes
8863                 ac_cv_func_select=yes
8864                 ac_cv_func_closesocket=yes
8865                 ac_cv_func_gethostname=yes
8866                 if test $curlib = ws2_32; then
8867                         ol_cv_winsock=winsock2
8868                         cat >> confdefs.h <<\EOF
8869 #define HAVE_WINSOCK2 1
8870 EOF
8871
8872                 fi
8873                 break
8874         fi
8875         LIBS="$save_LIBS"
8876 done
8877 fi
8878
8879 echo "$ac_t""$ol_cv_winsock" 1>&6
8880 fi
8881
8882
8883 echo $ac_n "checking for socket""... $ac_c" 1>&6
8884 echo "configure:8885: checking for socket" >&5
8885 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
8886   echo $ac_n "(cached) $ac_c" 1>&6
8887 else
8888   cat > conftest.$ac_ext <<EOF
8889 #line 8890 "configure"
8890 #include "confdefs.h"
8891 /* System header to define __stub macros and hopefully few prototypes,
8892     which can conflict with char socket(); below.  */
8893 #include <assert.h>
8894 /* Override any gcc2 internal prototype to avoid an error.  */
8895 /* We use char because int might match the return type of a gcc2
8896     builtin and then its argument prototype would still apply.  */
8897 char socket();
8898 char (*f)();
8899
8900 int main() {
8901
8902 /* The GNU C library defines this for functions which it implements
8903     to always fail with ENOSYS.  Some functions are actually named
8904     something starting with __ and the normal name is an alias.  */
8905 #if defined (__stub_socket) || defined (__stub___socket)
8906 choke me
8907 #else
8908 f = socket;
8909 #endif
8910
8911 ; return 0; }
8912 EOF
8913 if { (eval echo configure:8914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8914   rm -rf conftest*
8915   eval "ac_cv_func_socket=yes"
8916 else
8917   echo "configure: failed program was:" >&5
8918   cat conftest.$ac_ext >&5
8919   rm -rf conftest*
8920   eval "ac_cv_func_socket=no"
8921 fi
8922 rm -f conftest*
8923 fi
8924
8925 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
8926   echo "$ac_t""yes" 1>&6
8927   :
8928 else
8929   echo "$ac_t""no" 1>&6
8930         
8931         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
8932 echo "configure:8933: checking for main in -lsocket" >&5
8933 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
8934 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8935   echo $ac_n "(cached) $ac_c" 1>&6
8936 else
8937   ac_save_LIBS="$LIBS"
8938 LIBS="-lsocket  $LIBS"
8939 cat > conftest.$ac_ext <<EOF
8940 #line 8941 "configure"
8941 #include "confdefs.h"
8942
8943 int main() {
8944 main()
8945 ; return 0; }
8946 EOF
8947 if { (eval echo configure:8948: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8948   rm -rf conftest*
8949   eval "ac_cv_lib_$ac_lib_var=yes"
8950 else
8951   echo "configure: failed program was:" >&5
8952   cat conftest.$ac_ext >&5
8953   rm -rf conftest*
8954   eval "ac_cv_lib_$ac_lib_var=no"
8955 fi
8956 rm -f conftest*
8957 LIBS="$ac_save_LIBS"
8958
8959 fi
8960 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8961   echo "$ac_t""yes" 1>&6
8962     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8963     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8964   cat >> confdefs.h <<EOF
8965 #define $ac_tr_lib 1
8966 EOF
8967
8968   LIBS="-lsocket $LIBS"
8969
8970 else
8971   echo "$ac_t""no" 1>&6
8972 fi
8973
8974         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
8975 echo "configure:8976: checking for main in -lnet" >&5
8976 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
8977 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8978   echo $ac_n "(cached) $ac_c" 1>&6
8979 else
8980   ac_save_LIBS="$LIBS"
8981 LIBS="-lnet  $LIBS"
8982 cat > conftest.$ac_ext <<EOF
8983 #line 8984 "configure"
8984 #include "confdefs.h"
8985
8986 int main() {
8987 main()
8988 ; return 0; }
8989 EOF
8990 if { (eval echo configure:8991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8991   rm -rf conftest*
8992   eval "ac_cv_lib_$ac_lib_var=yes"
8993 else
8994   echo "configure: failed program was:" >&5
8995   cat conftest.$ac_ext >&5
8996   rm -rf conftest*
8997   eval "ac_cv_lib_$ac_lib_var=no"
8998 fi
8999 rm -f conftest*
9000 LIBS="$ac_save_LIBS"
9001
9002 fi
9003 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9004   echo "$ac_t""yes" 1>&6
9005     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9006     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9007   cat >> confdefs.h <<EOF
9008 #define $ac_tr_lib 1
9009 EOF
9010
9011   LIBS="-lnet $LIBS"
9012
9013 else
9014   echo "$ac_t""no" 1>&6
9015 fi
9016
9017         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9018 echo "configure:9019: checking for main in -lnsl_s" >&5
9019 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9020 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9021   echo $ac_n "(cached) $ac_c" 1>&6
9022 else
9023   ac_save_LIBS="$LIBS"
9024 LIBS="-lnsl_s  $LIBS"
9025 cat > conftest.$ac_ext <<EOF
9026 #line 9027 "configure"
9027 #include "confdefs.h"
9028
9029 int main() {
9030 main()
9031 ; return 0; }
9032 EOF
9033 if { (eval echo configure:9034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9034   rm -rf conftest*
9035   eval "ac_cv_lib_$ac_lib_var=yes"
9036 else
9037   echo "configure: failed program was:" >&5
9038   cat conftest.$ac_ext >&5
9039   rm -rf conftest*
9040   eval "ac_cv_lib_$ac_lib_var=no"
9041 fi
9042 rm -f conftest*
9043 LIBS="$ac_save_LIBS"
9044
9045 fi
9046 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9047   echo "$ac_t""yes" 1>&6
9048     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9049     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9050   cat >> confdefs.h <<EOF
9051 #define $ac_tr_lib 1
9052 EOF
9053
9054   LIBS="-lnsl_s $LIBS"
9055
9056 else
9057   echo "$ac_t""no" 1>&6
9058 fi
9059
9060         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9061 echo "configure:9062: checking for main in -lnsl" >&5
9062 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9063 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9064   echo $ac_n "(cached) $ac_c" 1>&6
9065 else
9066   ac_save_LIBS="$LIBS"
9067 LIBS="-lnsl  $LIBS"
9068 cat > conftest.$ac_ext <<EOF
9069 #line 9070 "configure"
9070 #include "confdefs.h"
9071
9072 int main() {
9073 main()
9074 ; return 0; }
9075 EOF
9076 if { (eval echo configure:9077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9077   rm -rf conftest*
9078   eval "ac_cv_lib_$ac_lib_var=yes"
9079 else
9080   echo "configure: failed program was:" >&5
9081   cat conftest.$ac_ext >&5
9082   rm -rf conftest*
9083   eval "ac_cv_lib_$ac_lib_var=no"
9084 fi
9085 rm -f conftest*
9086 LIBS="$ac_save_LIBS"
9087
9088 fi
9089 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9090   echo "$ac_t""yes" 1>&6
9091     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9092     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9093   cat >> confdefs.h <<EOF
9094 #define $ac_tr_lib 1
9095 EOF
9096
9097   LIBS="-lnsl $LIBS"
9098
9099 else
9100   echo "$ac_t""no" 1>&6
9101 fi
9102
9103         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9104 echo "configure:9105: checking for socket in -linet" >&5
9105 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9106 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9107   echo $ac_n "(cached) $ac_c" 1>&6
9108 else
9109   ac_save_LIBS="$LIBS"
9110 LIBS="-linet  $LIBS"
9111 cat > conftest.$ac_ext <<EOF
9112 #line 9113 "configure"
9113 #include "confdefs.h"
9114 /* Override any gcc2 internal prototype to avoid an error.  */
9115 /* We use char because int might match the return type of a gcc2
9116     builtin and then its argument prototype would still apply.  */
9117 char socket();
9118
9119 int main() {
9120 socket()
9121 ; return 0; }
9122 EOF
9123 if { (eval echo configure:9124: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9124   rm -rf conftest*
9125   eval "ac_cv_lib_$ac_lib_var=yes"
9126 else
9127   echo "configure: failed program was:" >&5
9128   cat conftest.$ac_ext >&5
9129   rm -rf conftest*
9130   eval "ac_cv_lib_$ac_lib_var=no"
9131 fi
9132 rm -f conftest*
9133 LIBS="$ac_save_LIBS"
9134
9135 fi
9136 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9137   echo "$ac_t""yes" 1>&6
9138     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9139     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9140   cat >> confdefs.h <<EOF
9141 #define $ac_tr_lib 1
9142 EOF
9143
9144   LIBS="-linet $LIBS"
9145
9146 else
9147   echo "$ac_t""no" 1>&6
9148 fi
9149
9150         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9151 echo "configure:9152: checking for main in -lgen" >&5
9152 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9153 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9154   echo $ac_n "(cached) $ac_c" 1>&6
9155 else
9156   ac_save_LIBS="$LIBS"
9157 LIBS="-lgen  $LIBS"
9158 cat > conftest.$ac_ext <<EOF
9159 #line 9160 "configure"
9160 #include "confdefs.h"
9161
9162 int main() {
9163 main()
9164 ; return 0; }
9165 EOF
9166 if { (eval echo configure:9167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9167   rm -rf conftest*
9168   eval "ac_cv_lib_$ac_lib_var=yes"
9169 else
9170   echo "configure: failed program was:" >&5
9171   cat conftest.$ac_ext >&5
9172   rm -rf conftest*
9173   eval "ac_cv_lib_$ac_lib_var=no"
9174 fi
9175 rm -f conftest*
9176 LIBS="$ac_save_LIBS"
9177
9178 fi
9179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9180   echo "$ac_t""yes" 1>&6
9181     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9182     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9183   cat >> confdefs.h <<EOF
9184 #define $ac_tr_lib 1
9185 EOF
9186
9187   LIBS="-lgen $LIBS"
9188
9189 else
9190   echo "$ac_t""no" 1>&6
9191 fi
9192
9193
9194 fi
9195
9196
9197 echo $ac_n "checking for select""... $ac_c" 1>&6
9198 echo "configure:9199: checking for select" >&5
9199 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9200   echo $ac_n "(cached) $ac_c" 1>&6
9201 else
9202   cat > conftest.$ac_ext <<EOF
9203 #line 9204 "configure"
9204 #include "confdefs.h"
9205 /* System header to define __stub macros and hopefully few prototypes,
9206     which can conflict with char select(); below.  */
9207 #include <assert.h>
9208 /* Override any gcc2 internal prototype to avoid an error.  */
9209 /* We use char because int might match the return type of a gcc2
9210     builtin and then its argument prototype would still apply.  */
9211 char select();
9212 char (*f)();
9213
9214 int main() {
9215
9216 /* The GNU C library defines this for functions which it implements
9217     to always fail with ENOSYS.  Some functions are actually named
9218     something starting with __ and the normal name is an alias.  */
9219 #if defined (__stub_select) || defined (__stub___select)
9220 choke me
9221 #else
9222 f = select;
9223 #endif
9224
9225 ; return 0; }
9226 EOF
9227 if { (eval echo configure:9228: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9228   rm -rf conftest*
9229   eval "ac_cv_func_select=yes"
9230 else
9231   echo "configure: failed program was:" >&5
9232   cat conftest.$ac_ext >&5
9233   rm -rf conftest*
9234   eval "ac_cv_func_select=no"
9235 fi
9236 rm -f conftest*
9237 fi
9238
9239 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9240   echo "$ac_t""yes" 1>&6
9241   :
9242 else
9243   echo "$ac_t""no" 1>&6
9244 { echo "configure: error: select() required." 1>&2; exit 1; }
9245 fi
9246
9247
9248 if test "${ac_cv_header_winsock_h}" != yes; then
9249                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9250 echo "configure:9251: checking types of arguments for select()" >&5
9251  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9252   echo $ac_n "(cached) $ac_c" 1>&6
9253 else
9254    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9255   echo $ac_n "(cached) $ac_c" 1>&6
9256 else
9257     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9258   echo $ac_n "(cached) $ac_c" 1>&6
9259 else
9260      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9261      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9262       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9263        cat > conftest.$ac_ext <<EOF
9264 #line 9265 "configure"
9265 #include "confdefs.h"
9266 #ifdef HAVE_SYS_TYPES_H
9267 #include <sys/types.h>
9268 #endif
9269 #ifdef HAVE_SYS_TIME_H
9270 #include <sys/time.h>
9271 #endif
9272 #ifdef HAVE_SYS_SELECT_H
9273 #include <sys/select.h>
9274 #endif
9275 #ifdef HAVE_SYS_SOCKET_H
9276 #include <sys/socket.h>
9277 #endif
9278 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);
9279 int main() {
9280
9281 ; return 0; }
9282 EOF
9283 if { (eval echo configure:9284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9284   rm -rf conftest*
9285           ac_not_found=no ; break 3
9286 else
9287   echo "configure: failed program was:" >&5
9288   cat conftest.$ac_ext >&5
9289   rm -rf conftest*
9290   ac_not_found=yes
9291 fi
9292 rm -f conftest*
9293       done
9294      done
9295     done
9296    
9297 fi
9298   
9299 fi
9300  
9301 fi
9302  if test "$ac_not_found" = yes; then
9303   ac_cv_func_select_arg1=int 
9304   ac_cv_func_select_arg234='int *' 
9305   ac_cv_func_select_arg5='struct timeval *'
9306  fi
9307  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9308  cat >> confdefs.h <<EOF
9309 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9310 EOF
9311
9312  cat >> confdefs.h <<EOF
9313 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9314 EOF
9315
9316  cat >> confdefs.h <<EOF
9317 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9318 EOF
9319
9320
9321 fi
9322
9323
9324 # strerror checks
9325 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9326 echo "configure:9327: checking declaration of sys_errlist" >&5
9327 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9328   echo $ac_n "(cached) $ac_c" 1>&6
9329 else
9330   
9331         cat > conftest.$ac_ext <<EOF
9332 #line 9333 "configure"
9333 #include "confdefs.h"
9334
9335 #include <stdio.h>
9336 #include <sys/types.h>
9337 #include <errno.h>
9338 #ifdef WINNT
9339 #include <stdlib.h>
9340 #endif 
9341 int main() {
9342 char *c = (char *) *sys_errlist
9343 ; return 0; }
9344 EOF
9345 if { (eval echo configure:9346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9346   rm -rf conftest*
9347   ol_cv_dcl_sys_errlist=yes
9348         ol_cv_have_sys_errlist=yes
9349 else
9350   echo "configure: failed program was:" >&5
9351   cat conftest.$ac_ext >&5
9352   rm -rf conftest*
9353   ol_cv_dcl_sys_errlist=no
9354 fi
9355 rm -f conftest*
9356 fi
9357
9358 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9359 #
9360 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9361 if test $ol_cv_dcl_sys_errlist = no ; then
9362         cat >> confdefs.h <<\EOF
9363 #define DECL_SYS_ERRLIST 1
9364 EOF
9365
9366
9367         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9368 echo "configure:9369: checking existence of sys_errlist" >&5
9369 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9370   echo $ac_n "(cached) $ac_c" 1>&6
9371 else
9372   
9373                 cat > conftest.$ac_ext <<EOF
9374 #line 9375 "configure"
9375 #include "confdefs.h"
9376 #include <errno.h>
9377 int main() {
9378 char *c = (char *) *sys_errlist
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   ol_cv_have_sys_errlist=yes
9384 else
9385   echo "configure: failed program was:" >&5
9386   cat conftest.$ac_ext >&5
9387   rm -rf conftest*
9388   ol_cv_have_sys_errlist=no
9389 fi
9390 rm -f conftest*
9391 fi
9392
9393 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9394 fi
9395 if test $ol_cv_have_sys_errlist = yes ; then
9396         cat >> confdefs.h <<\EOF
9397 #define HAVE_SYS_ERRLIST 1
9398 EOF
9399
9400 fi
9401  for ac_func in strerror strerror_r
9402 do
9403 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
9404 echo "configure:9405: checking for $ac_func" >&5
9405 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
9406   echo $ac_n "(cached) $ac_c" 1>&6
9407 else
9408   cat > conftest.$ac_ext <<EOF
9409 #line 9410 "configure"
9410 #include "confdefs.h"
9411 /* System header to define __stub macros and hopefully few prototypes,
9412     which can conflict with char $ac_func(); below.  */
9413 #include <assert.h>
9414 /* Override any gcc2 internal prototype to avoid an error.  */
9415 /* We use char because int might match the return type of a gcc2
9416     builtin and then its argument prototype would still apply.  */
9417 char $ac_func();
9418 char (*f)();
9419
9420 int main() {
9421
9422 /* The GNU C library defines this for functions which it implements
9423     to always fail with ENOSYS.  Some functions are actually named
9424     something starting with __ and the normal name is an alias.  */
9425 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9426 choke me
9427 #else
9428 f = $ac_func;
9429 #endif
9430
9431 ; return 0; }
9432 EOF
9433 if { (eval echo configure:9434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9434   rm -rf conftest*
9435   eval "ac_cv_func_$ac_func=yes"
9436 else
9437   echo "configure: failed program was:" >&5
9438   cat conftest.$ac_ext >&5
9439   rm -rf conftest*
9440   eval "ac_cv_func_$ac_func=no"
9441 fi
9442 rm -f conftest*
9443 fi
9444
9445 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
9446   echo "$ac_t""yes" 1>&6
9447     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
9448   cat >> confdefs.h <<EOF
9449 #define $ac_tr_func 1
9450 EOF
9451  
9452 else
9453   echo "$ac_t""no" 1>&6
9454 fi
9455 done
9456
9457 ol_cv_func_strerror_r=no
9458 if test "${ac_cv_func_strerror_r}" = yes ; then
9459         echo $ac_n "checking non-posix strerror_r""... $ac_c" 1>&6
9460 echo "configure:9461: checking non-posix strerror_r" >&5
9461 if eval "test \"\${ol_cv_nonposix_strerror_r+set}\" = set"; then
9462   echo $ac_n "(cached) $ac_c" 1>&6
9463 else
9464   
9465         cat > conftest.$ac_ext <<EOF
9466 #line 9467 "configure"
9467 #include "confdefs.h"
9468 #include <string.h>
9469 EOF
9470 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9471   egrep "strerror_r" >/dev/null 2>&1; then
9472   rm -rf conftest*
9473   ol_decl_strerror_r=yes
9474 else
9475   rm -rf conftest*
9476   ol_decl_strerror_r=no
9477 fi
9478 rm -f conftest*
9479
9480         if test $ol_decl_strerror_r = yes ; then
9481                 cat > conftest.$ac_ext <<EOF
9482 #line 9483 "configure"
9483 #include "confdefs.h"
9484 #include <string.h>
9485 int main() {
9486    /* from autoconf 2.59 */
9487                                 char buf[100];
9488                                 char x = *strerror_r (0, buf, sizeof buf);
9489                                 char *p = strerror_r (0, buf, sizeof buf);
9490                         
9491 ; return 0; }
9492 EOF
9493 if { (eval echo configure:9494: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9494   rm -rf conftest*
9495   ol_cv_nonposix_strerror_r=yes
9496 else
9497   echo "configure: failed program was:" >&5
9498   cat conftest.$ac_ext >&5
9499   rm -rf conftest*
9500   ol_cv_nonposix_strerror_r=no
9501 fi
9502 rm -f conftest*
9503         else
9504                 if test "$cross_compiling" = yes; then
9505     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
9506 else
9507   cat > conftest.$ac_ext <<EOF
9508 #line 9509 "configure"
9509 #include "confdefs.h"
9510
9511                         main() {
9512                                 char buf[100];
9513                                 buf[0] = 0;
9514                                 strerror_r( 1, buf, sizeof buf );
9515                                 exit( buf[0] == 0 );
9516                         }
9517                         
9518 EOF
9519 if { (eval echo configure:9520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9520 then
9521   ol_cv_nonposix_strerror_r=yes
9522 else
9523   echo "configure: failed program was:" >&5
9524   cat conftest.$ac_ext >&5
9525   rm -fr conftest*
9526   ol_cv_nonposix_strerror=no
9527 fi
9528 rm -fr conftest*
9529 fi
9530
9531         fi
9532         
9533 fi
9534
9535 echo "$ac_t""$ol_cv_nonposix_strerror_r" 1>&6
9536 if test $ol_cv_nonposix_strerror_r = yes ; then
9537         cat >> confdefs.h <<\EOF
9538 #define HAVE_NONPOSIX_STRERROR_R 1
9539 EOF
9540
9541 fi
9542
9543 elif test "${ac_cv_func_strerror}" = no ; then
9544         echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
9545 echo "configure:9546: checking declaration of sys_errlist" >&5
9546 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
9547   echo $ac_n "(cached) $ac_c" 1>&6
9548 else
9549   
9550         cat > conftest.$ac_ext <<EOF
9551 #line 9552 "configure"
9552 #include "confdefs.h"
9553
9554 #include <stdio.h>
9555 #include <sys/types.h>
9556 #include <errno.h>
9557 #ifdef WINNT
9558 #include <stdlib.h>
9559 #endif 
9560 int main() {
9561 char *c = (char *) *sys_errlist
9562 ; return 0; }
9563 EOF
9564 if { (eval echo configure:9565: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9565   rm -rf conftest*
9566   ol_cv_dcl_sys_errlist=yes
9567         ol_cv_have_sys_errlist=yes
9568 else
9569   echo "configure: failed program was:" >&5
9570   cat conftest.$ac_ext >&5
9571   rm -rf conftest*
9572   ol_cv_dcl_sys_errlist=no
9573 fi
9574 rm -f conftest*
9575 fi
9576
9577 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
9578 #
9579 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
9580 if test $ol_cv_dcl_sys_errlist = no ; then
9581         cat >> confdefs.h <<\EOF
9582 #define DECL_SYS_ERRLIST 1
9583 EOF
9584
9585
9586         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
9587 echo "configure:9588: checking existence of sys_errlist" >&5
9588 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
9589   echo $ac_n "(cached) $ac_c" 1>&6
9590 else
9591   
9592                 cat > conftest.$ac_ext <<EOF
9593 #line 9594 "configure"
9594 #include "confdefs.h"
9595 #include <errno.h>
9596 int main() {
9597 char *c = (char *) *sys_errlist
9598 ; return 0; }
9599 EOF
9600 if { (eval echo configure:9601: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9601   rm -rf conftest*
9602   ol_cv_have_sys_errlist=yes
9603 else
9604   echo "configure: failed program was:" >&5
9605   cat conftest.$ac_ext >&5
9606   rm -rf conftest*
9607   ol_cv_have_sys_errlist=no
9608 fi
9609 rm -f conftest*
9610 fi
9611
9612 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
9613 fi
9614 if test $ol_cv_have_sys_errlist = yes ; then
9615         cat >> confdefs.h <<\EOF
9616 #define HAVE_SYS_ERRLIST 1
9617 EOF
9618
9619 fi
9620
9621 fi
9622
9623
9624 for ac_hdr in regex.h 
9625 do
9626 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9627 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9628 echo "configure:9629: checking for $ac_hdr" >&5
9629 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9630   echo $ac_n "(cached) $ac_c" 1>&6
9631 else
9632   cat > conftest.$ac_ext <<EOF
9633 #line 9634 "configure"
9634 #include "confdefs.h"
9635 #include <$ac_hdr>
9636 EOF
9637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9638 { (eval echo configure:9639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9640 if test -z "$ac_err"; then
9641   rm -rf conftest*
9642   eval "ac_cv_header_$ac_safe=yes"
9643 else
9644   echo "$ac_err" >&5
9645   echo "configure: failed program was:" >&5
9646   cat conftest.$ac_ext >&5
9647   rm -rf conftest*
9648   eval "ac_cv_header_$ac_safe=no"
9649 fi
9650 rm -f conftest*
9651 fi
9652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9653   echo "$ac_t""yes" 1>&6
9654     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9655   cat >> confdefs.h <<EOF
9656 #define $ac_tr_hdr 1
9657 EOF
9658  
9659 else
9660   echo "$ac_t""no" 1>&6
9661 fi
9662 done
9663
9664 if test "$ac_cv_header_regex_h" != yes ; then
9665         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9666 fi
9667
9668 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9669 echo "configure:9670: checking for library containing regfree" >&5
9670 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9671   echo $ac_n "(cached) $ac_c" 1>&6
9672 else
9673   ac_func_search_save_LIBS="$LIBS"
9674 ac_cv_search_regfree="no"
9675 cat > conftest.$ac_ext <<EOF
9676 #line 9677 "configure"
9677 #include "confdefs.h"
9678 /* Override any gcc2 internal prototype to avoid an error.  */
9679 /* We use char because int might match the return type of a gcc2
9680     builtin and then its argument prototype would still apply.  */
9681 char regfree();
9682
9683 int main() {
9684 regfree()
9685 ; return 0; }
9686 EOF
9687 if { (eval echo configure:9688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9688   rm -rf conftest*
9689   ac_cv_search_regfree="none required"
9690 else
9691   echo "configure: failed program was:" >&5
9692   cat conftest.$ac_ext >&5
9693 fi
9694 rm -f conftest*
9695 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9696 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9697 cat > conftest.$ac_ext <<EOF
9698 #line 9699 "configure"
9699 #include "confdefs.h"
9700 /* Override any gcc2 internal prototype to avoid an error.  */
9701 /* We use char because int might match the return type of a gcc2
9702     builtin and then its argument prototype would still apply.  */
9703 char regfree();
9704
9705 int main() {
9706 regfree()
9707 ; return 0; }
9708 EOF
9709 if { (eval echo configure:9710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9710   rm -rf conftest*
9711   ac_cv_search_regfree="-l$ac_lib"
9712 break
9713 else
9714   echo "configure: failed program was:" >&5
9715   cat conftest.$ac_ext >&5
9716 fi
9717 rm -f conftest*
9718 done
9719 LIBS="$ac_func_search_save_LIBS"
9720 fi
9721
9722 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9723 if test "$ac_cv_search_regfree" != "no"; then
9724   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9725   :
9726 else :
9727   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9728 fi
9729
9730
9731 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9732 echo "configure:9733: checking for compatible POSIX regex" >&5
9733 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9734   echo $ac_n "(cached) $ac_c" 1>&6
9735 else
9736   
9737         if test "$cross_compiling" = yes; then
9738   ol_cv_c_posix_regex=cross
9739 else
9740   cat > conftest.$ac_ext <<EOF
9741 #line 9742 "configure"
9742 #include "confdefs.h"
9743
9744 #include <sys/types.h>
9745 #include <regex.h>
9746 static char *pattern, *string;
9747 main()
9748 {
9749         int rc;
9750         regex_t re;
9751
9752         pattern = "^A";
9753
9754         if(regcomp(&re, pattern, 0)) {
9755                 return -1;
9756         }
9757         
9758         string = "ALL MATCH";
9759         
9760         rc = regexec(&re, string, 0, (void*)0, 0);
9761
9762         regfree(&re);
9763
9764         return rc;
9765 }
9766 EOF
9767 if { (eval echo configure:9768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9768 then
9769   ol_cv_c_posix_regex=yes
9770 else
9771   echo "configure: failed program was:" >&5
9772   cat conftest.$ac_ext >&5
9773   rm -fr conftest*
9774   ol_cv_c_posix_regex=no
9775 fi
9776 rm -fr conftest*
9777 fi
9778
9779 fi
9780
9781 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9782
9783 if test "$ol_cv_c_posix_regex" = no ; then
9784         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9785 fi
9786
9787
9788 have_uuid=no
9789 for ac_hdr in sys/uuid.h
9790 do
9791 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9792 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9793 echo "configure:9794: checking for $ac_hdr" >&5
9794 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9795   echo $ac_n "(cached) $ac_c" 1>&6
9796 else
9797   cat > conftest.$ac_ext <<EOF
9798 #line 9799 "configure"
9799 #include "confdefs.h"
9800 #include <$ac_hdr>
9801 EOF
9802 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9803 { (eval echo configure:9804: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9804 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9805 if test -z "$ac_err"; then
9806   rm -rf conftest*
9807   eval "ac_cv_header_$ac_safe=yes"
9808 else
9809   echo "$ac_err" >&5
9810   echo "configure: failed program was:" >&5
9811   cat conftest.$ac_ext >&5
9812   rm -rf conftest*
9813   eval "ac_cv_header_$ac_safe=no"
9814 fi
9815 rm -f conftest*
9816 fi
9817 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9818   echo "$ac_t""yes" 1>&6
9819     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9820   cat >> confdefs.h <<EOF
9821 #define $ac_tr_hdr 1
9822 EOF
9823  
9824 else
9825   echo "$ac_t""no" 1>&6
9826 fi
9827 done
9828
9829 if test $ac_cv_header_sys_uuid_h = yes ; then
9830         save_LIBS="$LIBS"
9831         
9832 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9833 echo "configure:9834: checking for library containing uuid_to_str" >&5
9834 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9835   echo $ac_n "(cached) $ac_c" 1>&6
9836 else
9837   ac_func_search_save_LIBS="$LIBS"
9838 ac_cv_search_uuid_to_str="no"
9839 cat > conftest.$ac_ext <<EOF
9840 #line 9841 "configure"
9841 #include "confdefs.h"
9842 /* Override any gcc2 internal prototype to avoid an error.  */
9843 /* We use char because int might match the return type of a gcc2
9844     builtin and then its argument prototype would still apply.  */
9845 char uuid_to_str();
9846
9847 int main() {
9848 uuid_to_str()
9849 ; return 0; }
9850 EOF
9851 if { (eval echo configure:9852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9852   rm -rf conftest*
9853   ac_cv_search_uuid_to_str="none required"
9854 else
9855   echo "configure: failed program was:" >&5
9856   cat conftest.$ac_ext >&5
9857 fi
9858 rm -f conftest*
9859 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9860 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9861 cat > conftest.$ac_ext <<EOF
9862 #line 9863 "configure"
9863 #include "confdefs.h"
9864 /* Override any gcc2 internal prototype to avoid an error.  */
9865 /* We use char because int might match the return type of a gcc2
9866     builtin and then its argument prototype would still apply.  */
9867 char uuid_to_str();
9868
9869 int main() {
9870 uuid_to_str()
9871 ; return 0; }
9872 EOF
9873 if { (eval echo configure:9874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9874   rm -rf conftest*
9875   ac_cv_search_uuid_to_str="-l$ac_lib"
9876 break
9877 else
9878   echo "configure: failed program was:" >&5
9879   cat conftest.$ac_ext >&5
9880 fi
9881 rm -f conftest*
9882 done
9883 LIBS="$ac_func_search_save_LIBS"
9884 fi
9885
9886 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9887 if test "$ac_cv_search_uuid_to_str" != "no"; then
9888   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9889   have_uuid=yes
9890 else :
9891   :
9892 fi
9893         LIBS="$save_LIBS"
9894
9895         if test have_uuid = yes ; then
9896                 cat >> confdefs.h <<\EOF
9897 #define HAVE_UUID_TO_STR 1
9898 EOF
9899
9900
9901                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9902                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9903         fi
9904 fi
9905
9906 if test $have_uuid = no ; then
9907         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9908 echo "configure:9909: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9909         save_LIBS="$LIBS"
9910         LIBS="$LIBS -lrpcrt4"
9911         cat > conftest.$ac_ext <<EOF
9912 #line 9913 "configure"
9913 #include "confdefs.h"
9914
9915                 int __stdcall UuidCreate(void *);
9916                 int __stdcall UuidToStringA(void *,void **);
9917                 
9918 int main() {
9919
9920                 UuidCreate(0);
9921                 UuidToStringA(0,0);
9922                 
9923 ; return 0; }
9924 EOF
9925 if { (eval echo configure:9926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9926   rm -rf conftest*
9927   need_rpcrt=yes
9928 else
9929   echo "configure: failed program was:" >&5
9930   cat conftest.$ac_ext >&5
9931   rm -rf conftest*
9932   need_rpcrt=no
9933 fi
9934 rm -f conftest*
9935         if test $need_rpcrt = yes; then
9936                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9937         fi
9938         LIBS="$save_LIBS"
9939         echo "$ac_t""$need_rpcrt" 1>&6
9940 fi
9941
9942 ol_link_dnssrv=no
9943 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9944 echo "configure:9945: checking for res_query" >&5
9945 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9946   echo $ac_n "(cached) $ac_c" 1>&6
9947 else
9948   cat > conftest.$ac_ext <<EOF
9949 #line 9950 "configure"
9950 #include "confdefs.h"
9951 /* System header to define __stub macros and hopefully few prototypes,
9952     which can conflict with char res_query(); below.  */
9953 #include <assert.h>
9954 /* Override any gcc2 internal prototype to avoid an error.  */
9955 /* We use char because int might match the return type of a gcc2
9956     builtin and then its argument prototype would still apply.  */
9957 char res_query();
9958 char (*f)();
9959
9960 int main() {
9961
9962 /* The GNU C library defines this for functions which it implements
9963     to always fail with ENOSYS.  Some functions are actually named
9964     something starting with __ and the normal name is an alias.  */
9965 #if defined (__stub_res_query) || defined (__stub___res_query)
9966 choke me
9967 #else
9968 f = res_query;
9969 #endif
9970
9971 ; return 0; }
9972 EOF
9973 if { (eval echo configure:9974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9974   rm -rf conftest*
9975   eval "ac_cv_func_res_query=yes"
9976 else
9977   echo "configure: failed program was:" >&5
9978   cat conftest.$ac_ext >&5
9979   rm -rf conftest*
9980   eval "ac_cv_func_res_query=no"
9981 fi
9982 rm -f conftest*
9983 fi
9984
9985 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9986   echo "$ac_t""yes" 1>&6
9987   :
9988 else
9989   echo "$ac_t""no" 1>&6
9990 fi
9991
9992 if test $ac_cv_func_res_query = no ; then 
9993         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9994 echo "configure:9995: checking for __res_query" >&5
9995 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9996   echo $ac_n "(cached) $ac_c" 1>&6
9997 else
9998   cat > conftest.$ac_ext <<EOF
9999 #line 10000 "configure"
10000 #include "confdefs.h"
10001 /* System header to define __stub macros and hopefully few prototypes,
10002     which can conflict with char __res_query(); below.  */
10003 #include <assert.h>
10004 /* Override any gcc2 internal prototype to avoid an error.  */
10005 /* We use char because int might match the return type of a gcc2
10006     builtin and then its argument prototype would still apply.  */
10007 char __res_query();
10008 char (*f)();
10009
10010 int main() {
10011
10012 /* The GNU C library defines this for functions which it implements
10013     to always fail with ENOSYS.  Some functions are actually named
10014     something starting with __ and the normal name is an alias.  */
10015 #if defined (__stub___res_query) || defined (__stub_____res_query)
10016 choke me
10017 #else
10018 f = __res_query;
10019 #endif
10020
10021 ; return 0; }
10022 EOF
10023 if { (eval echo configure:10024: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10024   rm -rf conftest*
10025   eval "ac_cv_func___res_query=yes"
10026 else
10027   echo "configure: failed program was:" >&5
10028   cat conftest.$ac_ext >&5
10029   rm -rf conftest*
10030   eval "ac_cv_func___res_query=no"
10031 fi
10032 rm -f conftest*
10033 fi
10034
10035 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10036   echo "$ac_t""yes" 1>&6
10037   :
10038 else
10039   echo "$ac_t""no" 1>&6
10040 fi
10041
10042         ac_cv_func_res_query=$ac_cv_func___res_query
10043 fi
10044
10045 if test $ac_cv_func_res_query = no ; then 
10046         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10047 echo "configure:10048: checking for res_query in -lbind" >&5
10048 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10049 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10050   echo $ac_n "(cached) $ac_c" 1>&6
10051 else
10052   ac_save_LIBS="$LIBS"
10053 LIBS="-lbind  $LIBS"
10054 cat > conftest.$ac_ext <<EOF
10055 #line 10056 "configure"
10056 #include "confdefs.h"
10057 /* Override any gcc2 internal prototype to avoid an error.  */
10058 /* We use char because int might match the return type of a gcc2
10059     builtin and then its argument prototype would still apply.  */
10060 char res_query();
10061
10062 int main() {
10063 res_query()
10064 ; return 0; }
10065 EOF
10066 if { (eval echo configure:10067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10067   rm -rf conftest*
10068   eval "ac_cv_lib_$ac_lib_var=yes"
10069 else
10070   echo "configure: failed program was:" >&5
10071   cat conftest.$ac_ext >&5
10072   rm -rf conftest*
10073   eval "ac_cv_lib_$ac_lib_var=no"
10074 fi
10075 rm -f conftest*
10076 LIBS="$ac_save_LIBS"
10077
10078 fi
10079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10080   echo "$ac_t""yes" 1>&6
10081     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10082     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10083   cat >> confdefs.h <<EOF
10084 #define $ac_tr_lib 1
10085 EOF
10086
10087   LIBS="-lbind $LIBS"
10088
10089 else
10090   echo "$ac_t""no" 1>&6
10091 fi
10092
10093         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10094 fi
10095
10096 if test $ac_cv_func_res_query = no ; then 
10097         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10098 echo "configure:10099: checking for __res_query in -lbind" >&5
10099 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10100 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10101   echo $ac_n "(cached) $ac_c" 1>&6
10102 else
10103   ac_save_LIBS="$LIBS"
10104 LIBS="-lbind  $LIBS"
10105 cat > conftest.$ac_ext <<EOF
10106 #line 10107 "configure"
10107 #include "confdefs.h"
10108 /* Override any gcc2 internal prototype to avoid an error.  */
10109 /* We use char because int might match the return type of a gcc2
10110     builtin and then its argument prototype would still apply.  */
10111 char __res_query();
10112
10113 int main() {
10114 __res_query()
10115 ; return 0; }
10116 EOF
10117 if { (eval echo configure:10118: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10118   rm -rf conftest*
10119   eval "ac_cv_lib_$ac_lib_var=yes"
10120 else
10121   echo "configure: failed program was:" >&5
10122   cat conftest.$ac_ext >&5
10123   rm -rf conftest*
10124   eval "ac_cv_lib_$ac_lib_var=no"
10125 fi
10126 rm -f conftest*
10127 LIBS="$ac_save_LIBS"
10128
10129 fi
10130 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10131   echo "$ac_t""yes" 1>&6
10132     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10133     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10134   cat >> confdefs.h <<EOF
10135 #define $ac_tr_lib 1
10136 EOF
10137
10138   LIBS="-lbind $LIBS"
10139
10140 else
10141   echo "$ac_t""no" 1>&6
10142 fi
10143
10144         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10145 fi
10146
10147 if test $ac_cv_func_res_query = no ; then 
10148         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10149 echo "configure:10150: checking for res_query in -lresolv" >&5
10150 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10151 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10152   echo $ac_n "(cached) $ac_c" 1>&6
10153 else
10154   ac_save_LIBS="$LIBS"
10155 LIBS="-lresolv  $LIBS"
10156 cat > conftest.$ac_ext <<EOF
10157 #line 10158 "configure"
10158 #include "confdefs.h"
10159 /* Override any gcc2 internal prototype to avoid an error.  */
10160 /* We use char because int might match the return type of a gcc2
10161     builtin and then its argument prototype would still apply.  */
10162 char res_query();
10163
10164 int main() {
10165 res_query()
10166 ; return 0; }
10167 EOF
10168 if { (eval echo configure:10169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10169   rm -rf conftest*
10170   eval "ac_cv_lib_$ac_lib_var=yes"
10171 else
10172   echo "configure: failed program was:" >&5
10173   cat conftest.$ac_ext >&5
10174   rm -rf conftest*
10175   eval "ac_cv_lib_$ac_lib_var=no"
10176 fi
10177 rm -f conftest*
10178 LIBS="$ac_save_LIBS"
10179
10180 fi
10181 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10182   echo "$ac_t""yes" 1>&6
10183     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10184     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10185   cat >> confdefs.h <<EOF
10186 #define $ac_tr_lib 1
10187 EOF
10188
10189   LIBS="-lresolv $LIBS"
10190
10191 else
10192   echo "$ac_t""no" 1>&6
10193 fi
10194
10195         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10196 fi
10197
10198 if test $ac_cv_func_res_query = no ; then 
10199         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10200 echo "configure:10201: checking for __res_query in -lresolv" >&5
10201 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10202 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10203   echo $ac_n "(cached) $ac_c" 1>&6
10204 else
10205   ac_save_LIBS="$LIBS"
10206 LIBS="-lresolv  $LIBS"
10207 cat > conftest.$ac_ext <<EOF
10208 #line 10209 "configure"
10209 #include "confdefs.h"
10210 /* Override any gcc2 internal prototype to avoid an error.  */
10211 /* We use char because int might match the return type of a gcc2
10212     builtin and then its argument prototype would still apply.  */
10213 char __res_query();
10214
10215 int main() {
10216 __res_query()
10217 ; return 0; }
10218 EOF
10219 if { (eval echo configure:10220: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10220   rm -rf conftest*
10221   eval "ac_cv_lib_$ac_lib_var=yes"
10222 else
10223   echo "configure: failed program was:" >&5
10224   cat conftest.$ac_ext >&5
10225   rm -rf conftest*
10226   eval "ac_cv_lib_$ac_lib_var=no"
10227 fi
10228 rm -f conftest*
10229 LIBS="$ac_save_LIBS"
10230
10231 fi
10232 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10233   echo "$ac_t""yes" 1>&6
10234     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10235     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10236   cat >> confdefs.h <<EOF
10237 #define $ac_tr_lib 1
10238 EOF
10239
10240   LIBS="-lresolv $LIBS"
10241
10242 else
10243   echo "$ac_t""no" 1>&6
10244 fi
10245
10246         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10247 fi
10248
10249 if test $ac_cv_func_res_query = no ; then 
10250         echo $ac_n "checking for _res_9_query in -lresolv""... $ac_c" 1>&6
10251 echo "configure:10252: checking for _res_9_query in -lresolv" >&5
10252 ac_lib_var=`echo resolv'_'_res_9_query | sed 'y%./+-:%__p__%'`
10253 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10254   echo $ac_n "(cached) $ac_c" 1>&6
10255 else
10256   ac_save_LIBS="$LIBS"
10257 LIBS="-lresolv  $LIBS"
10258 cat > conftest.$ac_ext <<EOF
10259 #line 10260 "configure"
10260 #include "confdefs.h"
10261 /* Override any gcc2 internal prototype to avoid an error.  */
10262 /* We use char because int might match the return type of a gcc2
10263     builtin and then its argument prototype would still apply.  */
10264 char _res_9_query();
10265
10266 int main() {
10267 _res_9_query()
10268 ; return 0; }
10269 EOF
10270 if { (eval echo configure:10271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10271   rm -rf conftest*
10272   eval "ac_cv_lib_$ac_lib_var=yes"
10273 else
10274   echo "configure: failed program was:" >&5
10275   cat conftest.$ac_ext >&5
10276   rm -rf conftest*
10277   eval "ac_cv_lib_$ac_lib_var=no"
10278 fi
10279 rm -f conftest*
10280 LIBS="$ac_save_LIBS"
10281
10282 fi
10283 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10284   echo "$ac_t""yes" 1>&6
10285     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10286     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10287   cat >> confdefs.h <<EOF
10288 #define $ac_tr_lib 1
10289 EOF
10290
10291   LIBS="-lresolv $LIBS"
10292
10293 else
10294   echo "$ac_t""no" 1>&6
10295 fi
10296
10297         ac_cv_func_res_query=$ac_cv_lib_resolv_res_9_query
10298 fi
10299
10300 if test "$ac_cv_func_res_query" = yes ; then
10301         cat >> confdefs.h <<\EOF
10302 #define HAVE_RES_QUERY 1
10303 EOF
10304
10305
10306         if test $ol_enable_dnssrv != no ; then
10307                 ol_link_dnssrv=yes
10308         fi
10309 fi
10310
10311 if test "$ol_enable_dnssrv" != no -a "$ol_link_dnssrv" = no ; then
10312         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10313 fi
10314
10315 for ac_func in hstrerror 
10316 do
10317 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10318 echo "configure:10319: checking for $ac_func" >&5
10319 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10320   echo $ac_n "(cached) $ac_c" 1>&6
10321 else
10322   cat > conftest.$ac_ext <<EOF
10323 #line 10324 "configure"
10324 #include "confdefs.h"
10325 /* System header to define __stub macros and hopefully few prototypes,
10326     which can conflict with char $ac_func(); below.  */
10327 #include <assert.h>
10328 /* Override any gcc2 internal prototype to avoid an error.  */
10329 /* We use char because int might match the return type of a gcc2
10330     builtin and then its argument prototype would still apply.  */
10331 char $ac_func();
10332 char (*f)();
10333
10334 int main() {
10335
10336 /* The GNU C library defines this for functions which it implements
10337     to always fail with ENOSYS.  Some functions are actually named
10338     something starting with __ and the normal name is an alias.  */
10339 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10340 choke me
10341 #else
10342 f = $ac_func;
10343 #endif
10344
10345 ; return 0; }
10346 EOF
10347 if { (eval echo configure:10348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10348   rm -rf conftest*
10349   eval "ac_cv_func_$ac_func=yes"
10350 else
10351   echo "configure: failed program was:" >&5
10352   cat conftest.$ac_ext >&5
10353   rm -rf conftest*
10354   eval "ac_cv_func_$ac_func=no"
10355 fi
10356 rm -f conftest*
10357 fi
10358
10359 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10360   echo "$ac_t""yes" 1>&6
10361     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10362   cat >> confdefs.h <<EOF
10363 #define $ac_tr_func 1
10364 EOF
10365  
10366 else
10367   echo "$ac_t""no" 1>&6
10368 fi
10369 done
10370
10371
10372 for ac_func in getaddrinfo getnameinfo gai_strerror inet_ntop 
10373 do
10374 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10375 echo "configure:10376: checking for $ac_func" >&5
10376 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10377   echo $ac_n "(cached) $ac_c" 1>&6
10378 else
10379   cat > conftest.$ac_ext <<EOF
10380 #line 10381 "configure"
10381 #include "confdefs.h"
10382 /* System header to define __stub macros and hopefully few prototypes,
10383     which can conflict with char $ac_func(); below.  */
10384 #include <assert.h>
10385 /* Override any gcc2 internal prototype to avoid an error.  */
10386 /* We use char because int might match the return type of a gcc2
10387     builtin and then its argument prototype would still apply.  */
10388 char $ac_func();
10389 char (*f)();
10390
10391 int main() {
10392
10393 /* The GNU C library defines this for functions which it implements
10394     to always fail with ENOSYS.  Some functions are actually named
10395     something starting with __ and the normal name is an alias.  */
10396 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10397 choke me
10398 #else
10399 f = $ac_func;
10400 #endif
10401
10402 ; return 0; }
10403 EOF
10404 if { (eval echo configure:10405: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10405   rm -rf conftest*
10406   eval "ac_cv_func_$ac_func=yes"
10407 else
10408   echo "configure: failed program was:" >&5
10409   cat conftest.$ac_ext >&5
10410   rm -rf conftest*
10411   eval "ac_cv_func_$ac_func=no"
10412 fi
10413 rm -f conftest*
10414 fi
10415
10416 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10417   echo "$ac_t""yes" 1>&6
10418     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10419   cat >> confdefs.h <<EOF
10420 #define $ac_tr_func 1
10421 EOF
10422  
10423 else
10424   echo "$ac_t""no" 1>&6
10425 fi
10426 done
10427
10428
10429 ol_link_ipv6=no
10430 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10431         if test $ol_enable_ipv6 = yes ; then
10432                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10433         fi
10434 elif test $ol_enable_ipv6 != no ; then
10435         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10436 echo "configure:10437: checking INET6_ADDRSTRLEN" >&5
10437 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10438   echo $ac_n "(cached) $ac_c" 1>&6
10439 else
10440   
10441                 cat > conftest.$ac_ext <<EOF
10442 #line 10443 "configure"
10443 #include "confdefs.h"
10444
10445 #                       include <netinet/in.h>
10446 #                       ifdef INET6_ADDRSTRLEN
10447                                 __has_inet6_addrstrlen__;
10448 #                       endif
10449                 
10450 EOF
10451 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10452   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10453   rm -rf conftest*
10454   ol_cv_inet6_addrstrlen=yes
10455 else
10456   rm -rf conftest*
10457   ol_cv_inet6_addrstrlen=no
10458 fi
10459 rm -f conftest*
10460
10461 fi
10462
10463 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10464
10465
10466         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10467 echo "configure:10468: checking struct sockaddr_storage" >&5
10468 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10469   echo $ac_n "(cached) $ac_c" 1>&6
10470 else
10471   
10472                 cat > conftest.$ac_ext <<EOF
10473 #line 10474 "configure"
10474 #include "confdefs.h"
10475
10476 #include <sys/types.h>
10477 #include <sys/socket.h>
10478
10479 int main() {
10480
10481                         struct sockaddr_storage ss;
10482
10483 ; return 0; }
10484 EOF
10485 if { (eval echo configure:10486: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10486   rm -rf conftest*
10487   ol_cv_struct_sockaddr_storage=yes
10488 else
10489   echo "configure: failed program was:" >&5
10490   cat conftest.$ac_ext >&5
10491   rm -rf conftest*
10492   ol_cv_struct_sockaddr_storage=no
10493 fi
10494 rm -f conftest*
10495 fi
10496
10497 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10498
10499         if test $ol_cv_inet6_addrstrlen = yes \
10500                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10501                 ol_link_ipv6=yes
10502         elif test $ol_enable_ipv6 = yes \
10503                         -a $ol_cv_inet6_addrstrlen = no ; then
10504                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10505         elif test $ol_enable_ipv6 = yes \
10506                         -a $ol_cv_struct_sockaddr_storage = no ; then
10507                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10508         fi
10509 fi
10510
10511 if test $ol_enable_local != no ; then
10512         for ac_hdr in sys/un.h 
10513 do
10514 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10515 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10516 echo "configure:10517: checking for $ac_hdr" >&5
10517 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10518   echo $ac_n "(cached) $ac_c" 1>&6
10519 else
10520   cat > conftest.$ac_ext <<EOF
10521 #line 10522 "configure"
10522 #include "confdefs.h"
10523 #include <$ac_hdr>
10524 EOF
10525 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10526 { (eval echo configure:10527: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10527 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10528 if test -z "$ac_err"; then
10529   rm -rf conftest*
10530   eval "ac_cv_header_$ac_safe=yes"
10531 else
10532   echo "$ac_err" >&5
10533   echo "configure: failed program was:" >&5
10534   cat conftest.$ac_ext >&5
10535   rm -rf conftest*
10536   eval "ac_cv_header_$ac_safe=no"
10537 fi
10538 rm -f conftest*
10539 fi
10540 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10541   echo "$ac_t""yes" 1>&6
10542     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10543   cat >> confdefs.h <<EOF
10544 #define $ac_tr_hdr 1
10545 EOF
10546  
10547 else
10548   echo "$ac_t""no" 1>&6
10549 fi
10550 done
10551
10552
10553         if test $ol_enable_local = auto ; then
10554                 ol_enable_local=$ac_cv_header_sys_un_h
10555         elif test $ac_cv_header_sys_un_h = no ; then
10556                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10557         fi
10558 fi
10559
10560 ol_link_kbind=no
10561 ol_link_krb5=no
10562 ol_link_krb4=no
10563
10564 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10565         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10566         -o $ol_with_kerberos = k425 ; then
10567
10568         for ac_hdr in krb5.h
10569 do
10570 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10571 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10572 echo "configure:10573: checking for $ac_hdr" >&5
10573 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10574   echo $ac_n "(cached) $ac_c" 1>&6
10575 else
10576   cat > conftest.$ac_ext <<EOF
10577 #line 10578 "configure"
10578 #include "confdefs.h"
10579 #include <$ac_hdr>
10580 EOF
10581 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10582 { (eval echo configure:10583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10583 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10584 if test -z "$ac_err"; then
10585   rm -rf conftest*
10586   eval "ac_cv_header_$ac_safe=yes"
10587 else
10588   echo "$ac_err" >&5
10589   echo "configure: failed program was:" >&5
10590   cat conftest.$ac_ext >&5
10591   rm -rf conftest*
10592   eval "ac_cv_header_$ac_safe=no"
10593 fi
10594 rm -f conftest*
10595 fi
10596 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10597   echo "$ac_t""yes" 1>&6
10598     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10599   cat >> confdefs.h <<EOF
10600 #define $ac_tr_hdr 1
10601 EOF
10602  
10603 else
10604   echo "$ac_t""no" 1>&6
10605 fi
10606 done
10607
10608
10609         if test $ac_cv_header_krb5_h = yes ; then
10610                                 for ac_hdr in heim_err.h
10611 do
10612 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10613 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10614 echo "configure:10615: checking for $ac_hdr" >&5
10615 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10616   echo $ac_n "(cached) $ac_c" 1>&6
10617 else
10618   cat > conftest.$ac_ext <<EOF
10619 #line 10620 "configure"
10620 #include "confdefs.h"
10621 #include <$ac_hdr>
10622 EOF
10623 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10624 { (eval echo configure:10625: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10625 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10626 if test -z "$ac_err"; then
10627   rm -rf conftest*
10628   eval "ac_cv_header_$ac_safe=yes"
10629 else
10630   echo "$ac_err" >&5
10631   echo "configure: failed program was:" >&5
10632   cat conftest.$ac_ext >&5
10633   rm -rf conftest*
10634   eval "ac_cv_header_$ac_safe=no"
10635 fi
10636 rm -f conftest*
10637 fi
10638 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10639   echo "$ac_t""yes" 1>&6
10640     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10641   cat >> confdefs.h <<EOF
10642 #define $ac_tr_hdr 1
10643 EOF
10644  
10645 else
10646   echo "$ac_t""no" 1>&6
10647 fi
10648 done
10649
10650                 if test $ac_cv_header_heim_err_h = yes ; then
10651                         krb5_impl=heimdal
10652                 else
10653                         krb5_impl=mit
10654                 fi
10655
10656                 if test $krb5_impl = mit; then
10657                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10658 echo "configure:10659: checking for main in -lk5crypto" >&5
10659 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10660 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10661   echo $ac_n "(cached) $ac_c" 1>&6
10662 else
10663   ac_save_LIBS="$LIBS"
10664 LIBS="-lk5crypto  $LIBS"
10665 cat > conftest.$ac_ext <<EOF
10666 #line 10667 "configure"
10667 #include "confdefs.h"
10668
10669 int main() {
10670 main()
10671 ; return 0; }
10672 EOF
10673 if { (eval echo configure:10674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10674   rm -rf conftest*
10675   eval "ac_cv_lib_$ac_lib_var=yes"
10676 else
10677   echo "configure: failed program was:" >&5
10678   cat conftest.$ac_ext >&5
10679   rm -rf conftest*
10680   eval "ac_cv_lib_$ac_lib_var=no"
10681 fi
10682 rm -f conftest*
10683 LIBS="$ac_save_LIBS"
10684
10685 fi
10686 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10687   echo "$ac_t""yes" 1>&6
10688   krb5crypto=k5crypto
10689 else
10690   echo "$ac_t""no" 1>&6
10691 krb5crypto=crypto
10692 fi
10693
10694
10695                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10696 echo "configure:10697: checking for main in -lkrb5" >&5
10697 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10698 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10699   echo $ac_n "(cached) $ac_c" 1>&6
10700 else
10701   ac_save_LIBS="$LIBS"
10702 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10703 cat > conftest.$ac_ext <<EOF
10704 #line 10705 "configure"
10705 #include "confdefs.h"
10706
10707 int main() {
10708 main()
10709 ; return 0; }
10710 EOF
10711 if { (eval echo configure:10712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10712   rm -rf conftest*
10713   eval "ac_cv_lib_$ac_lib_var=yes"
10714 else
10715   echo "configure: failed program was:" >&5
10716   cat conftest.$ac_ext >&5
10717   rm -rf conftest*
10718   eval "ac_cv_lib_$ac_lib_var=no"
10719 fi
10720 rm -f conftest*
10721 LIBS="$ac_save_LIBS"
10722
10723 fi
10724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10725   echo "$ac_t""yes" 1>&6
10726   have_krb5=yes
10727                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10728 else
10729   echo "$ac_t""no" 1>&6
10730 have_krb5=no
10731 fi
10732
10733
10734                 elif test $krb5_impl = heimdal; then
10735                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10736 echo "configure:10737: checking for main in -ldes" >&5
10737 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10738 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10739   echo $ac_n "(cached) $ac_c" 1>&6
10740 else
10741   ac_save_LIBS="$LIBS"
10742 LIBS="-ldes  $LIBS"
10743 cat > conftest.$ac_ext <<EOF
10744 #line 10745 "configure"
10745 #include "confdefs.h"
10746
10747 int main() {
10748 main()
10749 ; return 0; }
10750 EOF
10751 if { (eval echo configure:10752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10752   rm -rf conftest*
10753   eval "ac_cv_lib_$ac_lib_var=yes"
10754 else
10755   echo "configure: failed program was:" >&5
10756   cat conftest.$ac_ext >&5
10757   rm -rf conftest*
10758   eval "ac_cv_lib_$ac_lib_var=no"
10759 fi
10760 rm -f conftest*
10761 LIBS="$ac_save_LIBS"
10762
10763 fi
10764 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10765   echo "$ac_t""yes" 1>&6
10766   krb5crypto=des
10767 else
10768   echo "$ac_t""no" 1>&6
10769 krb5crypto=crypto
10770 fi
10771
10772
10773                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10774 echo "configure:10775: checking for main in -lkrb5" >&5
10775 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10776 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10777   echo $ac_n "(cached) $ac_c" 1>&6
10778 else
10779   ac_save_LIBS="$LIBS"
10780 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10781 cat > conftest.$ac_ext <<EOF
10782 #line 10783 "configure"
10783 #include "confdefs.h"
10784
10785 int main() {
10786 main()
10787 ; return 0; }
10788 EOF
10789 if { (eval echo configure:10790: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10790   rm -rf conftest*
10791   eval "ac_cv_lib_$ac_lib_var=yes"
10792 else
10793   echo "configure: failed program was:" >&5
10794   cat conftest.$ac_ext >&5
10795   rm -rf conftest*
10796   eval "ac_cv_lib_$ac_lib_var=no"
10797 fi
10798 rm -f conftest*
10799 LIBS="$ac_save_LIBS"
10800
10801 fi
10802 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10803   echo "$ac_t""yes" 1>&6
10804   have_krb5=yes
10805                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10806 else
10807   echo "$ac_t""no" 1>&6
10808 have_krb5=no
10809 fi
10810
10811
10812                         cat >> confdefs.h <<\EOF
10813 #define HAVE_HEIMDAL_KERBEROS 1
10814 EOF
10815
10816
10817                 else
10818                         have_krb5=no
10819                         echo "configure: warning: Unrecognized Kerberos5 Implementation" 1>&2
10820                 fi
10821
10822                 if test $have_krb5 = yes ; then
10823                         ol_link_krb5=yes
10824
10825                         cat >> confdefs.h <<\EOF
10826 #define HAVE_KRB5 1
10827 EOF
10828
10829
10830                         if test $ol_with_kerberos = k5only ; then
10831                                 ol_with_kerberos=found
10832                         fi
10833
10834                 elif test $ol_with_kerberos != auto ; then
10835                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10836                 fi
10837
10838         fi
10839 fi
10840
10841 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10842         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10843
10844         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10845 do
10846 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10847 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10848 echo "configure:10849: checking for $ac_hdr" >&5
10849 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10850   echo $ac_n "(cached) $ac_c" 1>&6
10851 else
10852   cat > conftest.$ac_ext <<EOF
10853 #line 10854 "configure"
10854 #include "confdefs.h"
10855 #include <$ac_hdr>
10856 EOF
10857 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10858 { (eval echo configure:10859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10859 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10860 if test -z "$ac_err"; then
10861   rm -rf conftest*
10862   eval "ac_cv_header_$ac_safe=yes"
10863 else
10864   echo "$ac_err" >&5
10865   echo "configure: failed program was:" >&5
10866   cat conftest.$ac_ext >&5
10867   rm -rf conftest*
10868   eval "ac_cv_header_$ac_safe=no"
10869 fi
10870 rm -f conftest*
10871 fi
10872 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10873   echo "$ac_t""yes" 1>&6
10874     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10875   cat >> confdefs.h <<EOF
10876 #define $ac_tr_hdr 1
10877 EOF
10878  
10879 else
10880   echo "$ac_t""no" 1>&6
10881 fi
10882 done
10883
10884
10885         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10886                 if test $krb5_impl = mit; then
10887                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10888 echo "configure:10889: checking for main in -lkrb4" >&5
10889 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10890 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10891   echo $ac_n "(cached) $ac_c" 1>&6
10892 else
10893   ac_save_LIBS="$LIBS"
10894 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10895 cat > conftest.$ac_ext <<EOF
10896 #line 10897 "configure"
10897 #include "confdefs.h"
10898
10899 int main() {
10900 main()
10901 ; return 0; }
10902 EOF
10903 if { (eval echo configure:10904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10904   rm -rf conftest*
10905   eval "ac_cv_lib_$ac_lib_var=yes"
10906 else
10907   echo "configure: failed program was:" >&5
10908   cat conftest.$ac_ext >&5
10909   rm -rf conftest*
10910   eval "ac_cv_lib_$ac_lib_var=no"
10911 fi
10912 rm -f conftest*
10913 LIBS="$ac_save_LIBS"
10914
10915 fi
10916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10917   echo "$ac_t""yes" 1>&6
10918   have_k425=yes
10919                                 KRB4_LIBS="-lkrb4 -ldes425"
10920 else
10921   echo "$ac_t""no" 1>&6
10922 have_k425=no
10923 fi
10924
10925
10926                 elif test $krb5_impl = heimdal; then
10927                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10928 echo "configure:10929: checking for main in -lkrb4" >&5
10929 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10930 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10931   echo $ac_n "(cached) $ac_c" 1>&6
10932 else
10933   ac_save_LIBS="$LIBS"
10934 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10935 cat > conftest.$ac_ext <<EOF
10936 #line 10937 "configure"
10937 #include "confdefs.h"
10938
10939 int main() {
10940 main()
10941 ; return 0; }
10942 EOF
10943 if { (eval echo configure:10944: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10944   rm -rf conftest*
10945   eval "ac_cv_lib_$ac_lib_var=yes"
10946 else
10947   echo "configure: failed program was:" >&5
10948   cat conftest.$ac_ext >&5
10949   rm -rf conftest*
10950   eval "ac_cv_lib_$ac_lib_var=no"
10951 fi
10952 rm -f conftest*
10953 LIBS="$ac_save_LIBS"
10954
10955 fi
10956 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10957   echo "$ac_t""yes" 1>&6
10958   have_k425=yes
10959                                 KRB4_LIBS="-lkrb4"
10960 else
10961   echo "$ac_t""no" 1>&6
10962 have_k425=no
10963 fi
10964
10965
10966                 else
10967                         have_425=no
10968                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10969                 fi
10970
10971                 if test $have_k425 = yes ; then
10972                         ol_with_kerberos=found
10973                         ol_link_krb4=yes
10974
10975                         cat >> confdefs.h <<\EOF
10976 #define HAVE_KRB425 1
10977 EOF
10978
10979                         cat >> confdefs.h <<\EOF
10980 #define HAVE_KRB4 1
10981 EOF
10982
10983
10984                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10985 echo "configure:10986: checking for des_debug in Kerberos libraries" >&5
10986 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10987   echo $ac_n "(cached) $ac_c" 1>&6
10988 else
10989   
10990                                                                 save_LIBS="$LIBS"
10991                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10992                                 cat > conftest.$ac_ext <<EOF
10993 #line 10994 "configure"
10994 #include "confdefs.h"
10995
10996 #include <kerberosIV/krb.h>
10997 #include <kerberosIV/des.h>
10998 extern int des_debug;
10999
11000 int main() {
11001
11002 des_debug = 1;
11003
11004 ; return 0; }
11005 EOF
11006 if { (eval echo configure:11007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11007   rm -rf conftest*
11008   ol_cv_var_des_debug=yes
11009 else
11010   echo "configure: failed program was:" >&5
11011   cat conftest.$ac_ext >&5
11012   rm -rf conftest*
11013   ol_cv_var_des_debug=no
11014 fi
11015 rm -f conftest*
11016                                                                 LIBS="$save_LIBS"
11017                         
11018 fi
11019
11020 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
11021
11022                         if test $ol_cv_var_des_debug = yes ; then
11023                                 cat >> confdefs.h <<\EOF
11024 #define HAVE_DES_DEBUG 1
11025 EOF
11026
11027                         fi
11028
11029                         LIBS="$save_LIBS"
11030                 fi
11031         fi
11032 fi
11033
11034 if test $ol_link_krb5 = yes ; then
11035         ol_with_kerberos=found
11036 fi
11037
11038 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
11039         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
11040
11041         for ac_hdr in krb.h des.h krb-archaeology.h 
11042 do
11043 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11044 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11045 echo "configure:11046: checking for $ac_hdr" >&5
11046 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11047   echo $ac_n "(cached) $ac_c" 1>&6
11048 else
11049   cat > conftest.$ac_ext <<EOF
11050 #line 11051 "configure"
11051 #include "confdefs.h"
11052 #include <$ac_hdr>
11053 EOF
11054 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11055 { (eval echo configure:11056: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11056 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11057 if test -z "$ac_err"; then
11058   rm -rf conftest*
11059   eval "ac_cv_header_$ac_safe=yes"
11060 else
11061   echo "$ac_err" >&5
11062   echo "configure: failed program was:" >&5
11063   cat conftest.$ac_ext >&5
11064   rm -rf conftest*
11065   eval "ac_cv_header_$ac_safe=no"
11066 fi
11067 rm -f conftest*
11068 fi
11069 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11070   echo "$ac_t""yes" 1>&6
11071     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11072   cat >> confdefs.h <<EOF
11073 #define $ac_tr_hdr 1
11074 EOF
11075  
11076 else
11077   echo "$ac_t""no" 1>&6
11078 fi
11079 done
11080
11081
11082         if test $ac_cv_header_krb_h = yes ; then
11083                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
11084 echo "configure:11085: checking for main in -lkrb" >&5
11085 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
11086 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11087   echo $ac_n "(cached) $ac_c" 1>&6
11088 else
11089   ac_save_LIBS="$LIBS"
11090 LIBS="-lkrb -ldes $LIBS"
11091 cat > conftest.$ac_ext <<EOF
11092 #line 11093 "configure"
11093 #include "confdefs.h"
11094
11095 int main() {
11096 main()
11097 ; return 0; }
11098 EOF
11099 if { (eval echo configure:11100: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11100   rm -rf conftest*
11101   eval "ac_cv_lib_$ac_lib_var=yes"
11102 else
11103   echo "configure: failed program was:" >&5
11104   cat conftest.$ac_ext >&5
11105   rm -rf conftest*
11106   eval "ac_cv_lib_$ac_lib_var=no"
11107 fi
11108 rm -f conftest*
11109 LIBS="$ac_save_LIBS"
11110
11111 fi
11112 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11113   echo "$ac_t""yes" 1>&6
11114   have_k4=yes
11115 else
11116   echo "$ac_t""no" 1>&6
11117 have_k4=no
11118 fi
11119
11120
11121                 if test $have_k4 = yes ; then
11122                         ol_with_kerberos=found
11123                         ol_link_krb4=yes
11124
11125                         cat >> confdefs.h <<\EOF
11126 #define HAVE_KRB4 1
11127 EOF
11128
11129
11130                         KRB4_LIBS="-lkrb -ldes"
11131
11132                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11133                                 cat >> confdefs.h <<\EOF
11134 #define HAVE_KTH_KERBEROS 1
11135 EOF
11136
11137                         fi
11138                 fi
11139         fi
11140 fi
11141
11142 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11143         ol_link_kbind=yes
11144
11145 elif test $ol_enable_kbind = yes ; then
11146         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11147 fi
11148
11149 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11150         cat >> confdefs.h <<\EOF
11151 #define HAVE_KERBEROS 1
11152 EOF
11153
11154
11155 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11156         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11157 fi
11158
11159 ol_link_tls=no
11160 if test $ol_with_tls != no ; then
11161         for ac_hdr in openssl/ssl.h ssl.h
11162 do
11163 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11164 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11165 echo "configure:11166: checking for $ac_hdr" >&5
11166 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11167   echo $ac_n "(cached) $ac_c" 1>&6
11168 else
11169   cat > conftest.$ac_ext <<EOF
11170 #line 11171 "configure"
11171 #include "confdefs.h"
11172 #include <$ac_hdr>
11173 EOF
11174 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11175 { (eval echo configure:11176: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11176 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11177 if test -z "$ac_err"; then
11178   rm -rf conftest*
11179   eval "ac_cv_header_$ac_safe=yes"
11180 else
11181   echo "$ac_err" >&5
11182   echo "configure: failed program was:" >&5
11183   cat conftest.$ac_ext >&5
11184   rm -rf conftest*
11185   eval "ac_cv_header_$ac_safe=no"
11186 fi
11187 rm -f conftest*
11188 fi
11189 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11190   echo "$ac_t""yes" 1>&6
11191     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11192   cat >> confdefs.h <<EOF
11193 #define $ac_tr_hdr 1
11194 EOF
11195  
11196 else
11197   echo "$ac_t""no" 1>&6
11198 fi
11199 done
11200
11201         
11202         if test $ac_cv_header_openssl_ssl_h = yes \
11203                 -o $ac_cv_header_ssl_h = yes ; then
11204                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11205 echo "configure:11206: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11206 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11207 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11208   echo $ac_n "(cached) $ac_c" 1>&6
11209 else
11210   ac_save_LIBS="$LIBS"
11211 LIBS="-lssl -lcrypto $LIBS"
11212 cat > conftest.$ac_ext <<EOF
11213 #line 11214 "configure"
11214 #include "confdefs.h"
11215 /* Override any gcc2 internal prototype to avoid an error.  */
11216 /* We use char because int might match the return type of a gcc2
11217     builtin and then its argument prototype would still apply.  */
11218 char SSLeay_add_ssl_algorithms();
11219
11220 int main() {
11221 SSLeay_add_ssl_algorithms()
11222 ; return 0; }
11223 EOF
11224 if { (eval echo configure:11225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11225   rm -rf conftest*
11226   eval "ac_cv_lib_$ac_lib_var=yes"
11227 else
11228   echo "configure: failed program was:" >&5
11229   cat conftest.$ac_ext >&5
11230   rm -rf conftest*
11231   eval "ac_cv_lib_$ac_lib_var=no"
11232 fi
11233 rm -f conftest*
11234 LIBS="$ac_save_LIBS"
11235
11236 fi
11237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11238   echo "$ac_t""yes" 1>&6
11239   have_ssleay=yes
11240                         need_rsaref=no
11241 else
11242   echo "$ac_t""no" 1>&6
11243 have_ssleay=no
11244 fi
11245
11246                         
11247                 if test $have_ssleay = no ; then
11248                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11249 echo "configure:11250: checking for SSL_library_init in -lssl" >&5
11250 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11251 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11252   echo $ac_n "(cached) $ac_c" 1>&6
11253 else
11254   ac_save_LIBS="$LIBS"
11255 LIBS="-lssl -lcrypto $LIBS"
11256 cat > conftest.$ac_ext <<EOF
11257 #line 11258 "configure"
11258 #include "confdefs.h"
11259 /* Override any gcc2 internal prototype to avoid an error.  */
11260 /* We use char because int might match the return type of a gcc2
11261     builtin and then its argument prototype would still apply.  */
11262 char SSL_library_init();
11263
11264 int main() {
11265 SSL_library_init()
11266 ; return 0; }
11267 EOF
11268 if { (eval echo configure:11269: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11269   rm -rf conftest*
11270   eval "ac_cv_lib_$ac_lib_var=yes"
11271 else
11272   echo "configure: failed program was:" >&5
11273   cat conftest.$ac_ext >&5
11274   rm -rf conftest*
11275   eval "ac_cv_lib_$ac_lib_var=no"
11276 fi
11277 rm -f conftest*
11278 LIBS="$ac_save_LIBS"
11279
11280 fi
11281 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11282   echo "$ac_t""yes" 1>&6
11283   have_ssleay=yes
11284                                 need_rsaref=no
11285 else
11286   echo "$ac_t""no" 1>&6
11287 have_ssleay=no
11288 fi
11289
11290                 fi
11291
11292                 if test $have_ssleay = no ; then
11293                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11294 echo "configure:11295: checking for ssl3_accept in -lssl" >&5
11295 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11296 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11297   echo $ac_n "(cached) $ac_c" 1>&6
11298 else
11299   ac_save_LIBS="$LIBS"
11300 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11301 cat > conftest.$ac_ext <<EOF
11302 #line 11303 "configure"
11303 #include "confdefs.h"
11304 /* Override any gcc2 internal prototype to avoid an error.  */
11305 /* We use char because int might match the return type of a gcc2
11306     builtin and then its argument prototype would still apply.  */
11307 char ssl3_accept();
11308
11309 int main() {
11310 ssl3_accept()
11311 ; return 0; }
11312 EOF
11313 if { (eval echo configure:11314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11314   rm -rf conftest*
11315   eval "ac_cv_lib_$ac_lib_var=yes"
11316 else
11317   echo "configure: failed program was:" >&5
11318   cat conftest.$ac_ext >&5
11319   rm -rf conftest*
11320   eval "ac_cv_lib_$ac_lib_var=no"
11321 fi
11322 rm -f conftest*
11323 LIBS="$ac_save_LIBS"
11324
11325 fi
11326 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11327   echo "$ac_t""yes" 1>&6
11328   have_ssleay=yes
11329                                 need_rsaref=yes
11330 else
11331   echo "$ac_t""no" 1>&6
11332 have_ssleay=no
11333 fi
11334
11335                 fi
11336
11337                 if test $have_ssleay = yes ; then
11338                         ol_with_tls=found
11339                         ol_link_tls=yes
11340
11341                         cat >> confdefs.h <<\EOF
11342 #define HAVE_SSLEAY 1
11343 EOF
11344
11345
11346                         if test $need_rsaref = yes; then
11347                                 cat >> confdefs.h <<\EOF
11348 #define HAVE_RSAREF 1
11349 EOF
11350
11351
11352                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11353                         else
11354                                 TLS_LIBS="-lssl -lcrypto"
11355                         fi
11356                 fi
11357         fi
11358
11359 else
11360         echo "configure: warning: TLS data protection not supported!" 1>&2
11361 fi
11362
11363 WITH_TLS=no
11364 if test $ol_link_tls = yes ; then
11365         cat >> confdefs.h <<\EOF
11366 #define HAVE_TLS 1
11367 EOF
11368
11369         WITH_TLS=yes
11370
11371 elif test $ol_with_tls = auto ; then
11372         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11373         echo "configure: warning: TLS data protection not supported!" 1>&2
11374
11375 elif test $ol_with_tls != no ; then
11376         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11377 fi
11378
11379 if test $ol_enable_lmpasswd != no; then
11380         if test $ol_link_tls != yes ; then
11381                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11382         fi
11383
11384         cat >> confdefs.h <<\EOF
11385 #define SLAPD_LMHASH 1
11386 EOF
11387
11388 fi
11389
11390 ol_link_threads=no
11391
11392 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11393         -o $ol_with_threads = nt ; then
11394
11395         
11396         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11397 echo "configure:11398: checking for _beginthread" >&5
11398 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11399   echo $ac_n "(cached) $ac_c" 1>&6
11400 else
11401   cat > conftest.$ac_ext <<EOF
11402 #line 11403 "configure"
11403 #include "confdefs.h"
11404 /* System header to define __stub macros and hopefully few prototypes,
11405     which can conflict with char _beginthread(); below.  */
11406 #include <assert.h>
11407 /* Override any gcc2 internal prototype to avoid an error.  */
11408 /* We use char because int might match the return type of a gcc2
11409     builtin and then its argument prototype would still apply.  */
11410 char _beginthread();
11411 char (*f)();
11412
11413 int main() {
11414
11415 /* The GNU C library defines this for functions which it implements
11416     to always fail with ENOSYS.  Some functions are actually named
11417     something starting with __ and the normal name is an alias.  */
11418 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11419 choke me
11420 #else
11421 f = _beginthread;
11422 #endif
11423
11424 ; return 0; }
11425 EOF
11426 if { (eval echo configure:11427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11427   rm -rf conftest*
11428   eval "ac_cv_func__beginthread=yes"
11429 else
11430   echo "configure: failed program was:" >&5
11431   cat conftest.$ac_ext >&5
11432   rm -rf conftest*
11433   eval "ac_cv_func__beginthread=no"
11434 fi
11435 rm -f conftest*
11436 fi
11437
11438 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11439   echo "$ac_t""yes" 1>&6
11440   :
11441 else
11442   echo "$ac_t""no" 1>&6
11443 fi
11444
11445
11446         if test $ac_cv_func__beginthread = yes ; then
11447                 cat >> confdefs.h <<\EOF
11448 #define HAVE_NT_THREADS 1
11449 EOF
11450
11451                 ol_cv_nt_threads=yes
11452         fi
11453
11454
11455         if test "$ol_cv_nt_threads" = yes ; then
11456                 ol_link_threads=nt
11457                 ol_with_threads=found
11458                 ol_with_yielding_select=yes
11459
11460                 cat >> confdefs.h <<\EOF
11461 #define HAVE_NT_SERVICE_MANAGER 1
11462 EOF
11463
11464                 cat >> confdefs.h <<\EOF
11465 #define HAVE_NT_EVENT_LOG 1
11466 EOF
11467
11468         fi
11469
11470         if test $ol_with_threads = nt ; then
11471                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11472         fi
11473 fi
11474
11475 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11476         -o $ol_with_threads = posix ; then
11477
11478         for ac_hdr in pthread.h
11479 do
11480 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11481 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11482 echo "configure:11483: checking for $ac_hdr" >&5
11483 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11484   echo $ac_n "(cached) $ac_c" 1>&6
11485 else
11486   cat > conftest.$ac_ext <<EOF
11487 #line 11488 "configure"
11488 #include "confdefs.h"
11489 #include <$ac_hdr>
11490 EOF
11491 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11492 { (eval echo configure:11493: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11493 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11494 if test -z "$ac_err"; then
11495   rm -rf conftest*
11496   eval "ac_cv_header_$ac_safe=yes"
11497 else
11498   echo "$ac_err" >&5
11499   echo "configure: failed program was:" >&5
11500   cat conftest.$ac_ext >&5
11501   rm -rf conftest*
11502   eval "ac_cv_header_$ac_safe=no"
11503 fi
11504 rm -f conftest*
11505 fi
11506 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11507   echo "$ac_t""yes" 1>&6
11508     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11509   cat >> confdefs.h <<EOF
11510 #define $ac_tr_hdr 1
11511 EOF
11512  
11513 else
11514   echo "$ac_t""no" 1>&6
11515 fi
11516 done
11517
11518
11519         if test $ac_cv_header_pthread_h = yes ; then
11520                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11521 echo "configure:11522: checking POSIX thread version" >&5
11522 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11523   echo $ac_n "(cached) $ac_c" 1>&6
11524 else
11525   
11526         cat > conftest.$ac_ext <<EOF
11527 #line 11528 "configure"
11528 #include "confdefs.h"
11529
11530 #               include <pthread.h>
11531         
11532 int main() {
11533
11534                 int i = PTHREAD_CREATE_JOINABLE;
11535         
11536 ; return 0; }
11537 EOF
11538 if { (eval echo configure:11539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11539   rm -rf conftest*
11540   
11541         cat > conftest.$ac_ext <<EOF
11542 #line 11543 "configure"
11543 #include "confdefs.h"
11544 #include <pthread.h>
11545 EOF
11546 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11547   egrep "pthread_detach" >/dev/null 2>&1; then
11548   rm -rf conftest*
11549   ol_cv_pthread_version=10
11550 else
11551   rm -rf conftest*
11552   ol_cv_pthread_version=8
11553 fi
11554 rm -f conftest*
11555
11556 else
11557   echo "configure: failed program was:" >&5
11558   cat conftest.$ac_ext >&5
11559   rm -rf conftest*
11560   
11561         cat > conftest.$ac_ext <<EOF
11562 #line 11563 "configure"
11563 #include "confdefs.h"
11564
11565 #               include <pthread.h>
11566 #               ifdef PTHREAD_CREATE_UNDETACHED
11567                 draft7
11568 #               endif
11569         
11570 EOF
11571 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11572   egrep "draft7" >/dev/null 2>&1; then
11573   rm -rf conftest*
11574   ol_cv_pthread_version=7
11575 else
11576   rm -rf conftest*
11577   
11578         cat > conftest.$ac_ext <<EOF
11579 #line 11580 "configure"
11580 #include "confdefs.h"
11581 #include <pthread.h>
11582 EOF
11583 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11584   egrep "pthread_attr_init" >/dev/null 2>&1; then
11585   rm -rf conftest*
11586   ol_cv_pthread_version=6
11587 else
11588   rm -rf conftest*
11589   
11590         cat > conftest.$ac_ext <<EOF
11591 #line 11592 "configure"
11592 #include "confdefs.h"
11593
11594 #               include <pthread.h>
11595 #ifdef          PTHREAD_MUTEX_INITIALIZER
11596                 draft5
11597 #endif
11598         
11599 EOF
11600 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11601   egrep "draft5" >/dev/null 2>&1; then
11602   rm -rf conftest*
11603   ol_cv_pthread_version=5
11604 else
11605   rm -rf conftest*
11606   ol_cv_pthread_version=4
11607 fi
11608 rm -f conftest*
11609  
11610 fi
11611 rm -f conftest*
11612  
11613 fi
11614 rm -f conftest*
11615  
11616 fi
11617 rm -f conftest*
11618
11619 fi
11620
11621 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11622
11623
11624                 if test $ol_cv_pthread_version != 0 ; then
11625                         cat >> confdefs.h <<EOF
11626 #define HAVE_PTHREADS $ol_cv_pthread_version
11627 EOF
11628
11629                 else
11630                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11631                 fi
11632
11633                 # consider threads found
11634                 ol_with_threads=found
11635
11636                 
11637         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11638 echo "configure:11639: checking for LinuxThreads pthread.h" >&5
11639 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11640   echo $ac_n "(cached) $ac_c" 1>&6
11641 else
11642   cat > conftest.$ac_ext <<EOF
11643 #line 11644 "configure"
11644 #include "confdefs.h"
11645 #include <pthread.h>
11646 EOF
11647 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11648   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11649   rm -rf conftest*
11650   ol_cv_header_linux_threads=yes
11651 else
11652   rm -rf conftest*
11653   ol_cv_header_linux_threads=no
11654 fi
11655 rm -f conftest*
11656
11657                 
11658 fi
11659
11660 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11661         if test $ol_cv_header_linux_threads = yes; then
11662                 cat >> confdefs.h <<\EOF
11663 #define HAVE_LINUX_THREADS 1
11664 EOF
11665
11666         fi
11667
11668                 
11669         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11670 echo "configure:11671: checking for GNU Pth pthread.h" >&5
11671 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11672   echo $ac_n "(cached) $ac_c" 1>&6
11673 else
11674   cat > conftest.$ac_ext <<EOF
11675 #line 11676 "configure"
11676 #include "confdefs.h"
11677 #include <pthread.h>
11678 #ifdef _POSIX_THREAD_IS_GNU_PTH
11679         __gnu_pth__;
11680 #endif
11681
11682 EOF
11683 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11684   egrep "__gnu_pth__" >/dev/null 2>&1; then
11685   rm -rf conftest*
11686   ol_cv_header_gnu_pth_pthread_h=yes
11687 else
11688   rm -rf conftest*
11689   ol_cv_header_gnu_pth_pthread_h=no
11690 fi
11691 rm -f conftest*
11692
11693                 
11694 fi
11695
11696 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11697
11698
11699                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11700                         for ac_hdr in sched.h
11701 do
11702 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11703 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11704 echo "configure:11705: checking for $ac_hdr" >&5
11705 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11706   echo $ac_n "(cached) $ac_c" 1>&6
11707 else
11708   cat > conftest.$ac_ext <<EOF
11709 #line 11710 "configure"
11710 #include "confdefs.h"
11711 #include <$ac_hdr>
11712 EOF
11713 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11714 { (eval echo configure:11715: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11715 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11716 if test -z "$ac_err"; then
11717   rm -rf conftest*
11718   eval "ac_cv_header_$ac_safe=yes"
11719 else
11720   echo "$ac_err" >&5
11721   echo "configure: failed program was:" >&5
11722   cat conftest.$ac_ext >&5
11723   rm -rf conftest*
11724   eval "ac_cv_header_$ac_safe=no"
11725 fi
11726 rm -f conftest*
11727 fi
11728 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11729   echo "$ac_t""yes" 1>&6
11730     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11731   cat >> confdefs.h <<EOF
11732 #define $ac_tr_hdr 1
11733 EOF
11734  
11735 else
11736   echo "$ac_t""no" 1>&6
11737 fi
11738 done
11739
11740                 fi
11741
11742                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11743                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11744 echo "configure:11745: checking for pthread_create in default libraries" >&5
11745 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11746   echo $ac_n "(cached) $ac_c" 1>&6
11747 else
11748   
11749                 if test "$cross_compiling" = yes; then
11750   cat > conftest.$ac_ext <<EOF
11751 #line 11752 "configure"
11752 #include "confdefs.h"
11753 /* pthread test headers */
11754 #include <pthread.h>
11755 #if HAVE_PTHREADS < 7
11756 #include <errno.h>
11757 #endif
11758 #ifndef NULL
11759 #define NULL (void*)0
11760 #endif
11761
11762 static void *task(p)
11763         void *p;
11764 {
11765         return (void *) (p == NULL);
11766 }
11767
11768 int main() {
11769
11770         /* pthread test function */
11771 #ifndef PTHREAD_CREATE_DETACHED
11772 #define PTHREAD_CREATE_DETACHED 1
11773 #endif
11774         pthread_t t;
11775         int status;
11776         int detach = PTHREAD_CREATE_DETACHED;
11777
11778 #if HAVE_PTHREADS > 4
11779         /* Final pthreads */
11780         pthread_attr_t attr;
11781
11782         status = pthread_attr_init(&attr);
11783         if( status ) return status;
11784
11785 #if HAVE_PTHREADS < 7
11786         status = pthread_attr_setdetachstate(&attr, &detach);
11787         if( status < 0 ) status = errno;
11788 #else
11789         status = pthread_attr_setdetachstate(&attr, detach);
11790 #endif
11791         if( status ) return status;
11792         status = pthread_create( &t, &attr, task, NULL );
11793 #if HAVE_PTHREADS < 7
11794         if( status < 0 ) status = errno;
11795 #endif
11796         if( status ) return status;
11797 #else
11798         /* Draft 4 pthreads */
11799         status = pthread_create( &t, pthread_attr_default, task, NULL );
11800         if( status ) return errno;
11801
11802         /* give thread a chance to complete */
11803         /* it should remain joinable and hence detachable */
11804         sleep( 1 );
11805
11806         status = pthread_detach( &t );
11807         if( status ) return errno;
11808 #endif
11809
11810 #ifdef HAVE_LINUX_THREADS
11811         pthread_kill_other_threads_np();
11812 #endif
11813
11814         return 0;
11815
11816 ; return 0; }
11817 EOF
11818 if { (eval echo configure:11819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11819   rm -rf conftest*
11820   ol_cv_pthread_create=yes
11821 else
11822   echo "configure: failed program was:" >&5
11823   cat conftest.$ac_ext >&5
11824   rm -rf conftest*
11825   ol_cv_pthread_create=no
11826 fi
11827 rm -f conftest*
11828 else
11829   cat > conftest.$ac_ext <<EOF
11830 #line 11831 "configure"
11831 #include "confdefs.h"
11832 /* pthread test headers */
11833 #include <pthread.h>
11834 #if HAVE_PTHREADS < 7
11835 #include <errno.h>
11836 #endif
11837 #ifndef NULL
11838 #define NULL (void*)0
11839 #endif
11840
11841 static void *task(p)
11842         void *p;
11843 {
11844         return (void *) (p == NULL);
11845 }
11846
11847
11848 int main(argc, argv)
11849         int argc;
11850         char **argv;
11851 {
11852
11853         /* pthread test function */
11854 #ifndef PTHREAD_CREATE_DETACHED
11855 #define PTHREAD_CREATE_DETACHED 1
11856 #endif
11857         pthread_t t;
11858         int status;
11859         int detach = PTHREAD_CREATE_DETACHED;
11860
11861 #if HAVE_PTHREADS > 4
11862         /* Final pthreads */
11863         pthread_attr_t attr;
11864
11865         status = pthread_attr_init(&attr);
11866         if( status ) return status;
11867
11868 #if HAVE_PTHREADS < 7
11869         status = pthread_attr_setdetachstate(&attr, &detach);
11870         if( status < 0 ) status = errno;
11871 #else
11872         status = pthread_attr_setdetachstate(&attr, detach);
11873 #endif
11874         if( status ) return status;
11875         status = pthread_create( &t, &attr, task, NULL );
11876 #if HAVE_PTHREADS < 7
11877         if( status < 0 ) status = errno;
11878 #endif
11879         if( status ) return status;
11880 #else
11881         /* Draft 4 pthreads */
11882         status = pthread_create( &t, pthread_attr_default, task, NULL );
11883         if( status ) return errno;
11884
11885         /* give thread a chance to complete */
11886         /* it should remain joinable and hence detachable */
11887         sleep( 1 );
11888
11889         status = pthread_detach( &t );
11890         if( status ) return errno;
11891 #endif
11892
11893 #ifdef HAVE_LINUX_THREADS
11894         pthread_kill_other_threads_np();
11895 #endif
11896
11897         return 0;
11898
11899 }
11900
11901 EOF
11902 if { (eval echo configure:11903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11903 then
11904   ol_cv_pthread_create=yes
11905 else
11906   echo "configure: failed program was:" >&5
11907   cat conftest.$ac_ext >&5
11908   rm -fr conftest*
11909   ol_cv_pthread_create=no
11910 fi
11911 rm -fr conftest*
11912 fi
11913
11914 fi
11915
11916 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11917
11918                 if test $ol_cv_pthread_create != no ; then
11919                         ol_link_threads=posix
11920                         ol_link_pthreads=""
11921                 fi
11922                 
11923                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11924 if test "$ol_link_threads" = no ; then
11925         # try -kthread
11926         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11927 echo "configure:11928: checking for pthread link with -kthread" >&5
11928 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11929   echo $ac_n "(cached) $ac_c" 1>&6
11930 else
11931   
11932                 # save the flags
11933                 ol_LIBS="$LIBS"
11934                 LIBS="-kthread $LIBS"
11935
11936                 if test "$cross_compiling" = yes; then
11937   cat > conftest.$ac_ext <<EOF
11938 #line 11939 "configure"
11939 #include "confdefs.h"
11940 /* pthread test headers */
11941 #include <pthread.h>
11942 #if HAVE_PTHREADS < 7
11943 #include <errno.h>
11944 #endif
11945 #ifndef NULL
11946 #define NULL (void*)0
11947 #endif
11948
11949 static void *task(p)
11950         void *p;
11951 {
11952         return (void *) (p == NULL);
11953 }
11954
11955 int main() {
11956
11957         /* pthread test function */
11958 #ifndef PTHREAD_CREATE_DETACHED
11959 #define PTHREAD_CREATE_DETACHED 1
11960 #endif
11961         pthread_t t;
11962         int status;
11963         int detach = PTHREAD_CREATE_DETACHED;
11964
11965 #if HAVE_PTHREADS > 4
11966         /* Final pthreads */
11967         pthread_attr_t attr;
11968
11969         status = pthread_attr_init(&attr);
11970         if( status ) return status;
11971
11972 #if HAVE_PTHREADS < 7
11973         status = pthread_attr_setdetachstate(&attr, &detach);
11974         if( status < 0 ) status = errno;
11975 #else
11976         status = pthread_attr_setdetachstate(&attr, detach);
11977 #endif
11978         if( status ) return status;
11979         status = pthread_create( &t, &attr, task, NULL );
11980 #if HAVE_PTHREADS < 7
11981         if( status < 0 ) status = errno;
11982 #endif
11983         if( status ) return status;
11984 #else
11985         /* Draft 4 pthreads */
11986         status = pthread_create( &t, pthread_attr_default, task, NULL );
11987         if( status ) return errno;
11988
11989         /* give thread a chance to complete */
11990         /* it should remain joinable and hence detachable */
11991         sleep( 1 );
11992
11993         status = pthread_detach( &t );
11994         if( status ) return errno;
11995 #endif
11996
11997 #ifdef HAVE_LINUX_THREADS
11998         pthread_kill_other_threads_np();
11999 #endif
12000
12001         return 0;
12002
12003 ; return 0; }
12004 EOF
12005 if { (eval echo configure:12006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12006   rm -rf conftest*
12007   ol_cv_pthread_kthread=yes
12008 else
12009   echo "configure: failed program was:" >&5
12010   cat conftest.$ac_ext >&5
12011   rm -rf conftest*
12012   ol_cv_pthread_kthread=no
12013 fi
12014 rm -f conftest*
12015 else
12016   cat > conftest.$ac_ext <<EOF
12017 #line 12018 "configure"
12018 #include "confdefs.h"
12019 /* pthread test headers */
12020 #include <pthread.h>
12021 #if HAVE_PTHREADS < 7
12022 #include <errno.h>
12023 #endif
12024 #ifndef NULL
12025 #define NULL (void*)0
12026 #endif
12027
12028 static void *task(p)
12029         void *p;
12030 {
12031         return (void *) (p == NULL);
12032 }
12033
12034
12035 int main(argc, argv)
12036         int argc;
12037         char **argv;
12038 {
12039
12040         /* pthread test function */
12041 #ifndef PTHREAD_CREATE_DETACHED
12042 #define PTHREAD_CREATE_DETACHED 1
12043 #endif
12044         pthread_t t;
12045         int status;
12046         int detach = PTHREAD_CREATE_DETACHED;
12047
12048 #if HAVE_PTHREADS > 4
12049         /* Final pthreads */
12050         pthread_attr_t attr;
12051
12052         status = pthread_attr_init(&attr);
12053         if( status ) return status;
12054
12055 #if HAVE_PTHREADS < 7
12056         status = pthread_attr_setdetachstate(&attr, &detach);
12057         if( status < 0 ) status = errno;
12058 #else
12059         status = pthread_attr_setdetachstate(&attr, detach);
12060 #endif
12061         if( status ) return status;
12062         status = pthread_create( &t, &attr, task, NULL );
12063 #if HAVE_PTHREADS < 7
12064         if( status < 0 ) status = errno;
12065 #endif
12066         if( status ) return status;
12067 #else
12068         /* Draft 4 pthreads */
12069         status = pthread_create( &t, pthread_attr_default, task, NULL );
12070         if( status ) return errno;
12071
12072         /* give thread a chance to complete */
12073         /* it should remain joinable and hence detachable */
12074         sleep( 1 );
12075
12076         status = pthread_detach( &t );
12077         if( status ) return errno;
12078 #endif
12079
12080 #ifdef HAVE_LINUX_THREADS
12081         pthread_kill_other_threads_np();
12082 #endif
12083
12084         return 0;
12085
12086 }
12087
12088 EOF
12089 if { (eval echo configure:12090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12090 then
12091   ol_cv_pthread_kthread=yes
12092 else
12093   echo "configure: failed program was:" >&5
12094   cat conftest.$ac_ext >&5
12095   rm -fr conftest*
12096   ol_cv_pthread_kthread=no
12097 fi
12098 rm -fr conftest*
12099 fi
12100
12101
12102                 # restore the LIBS
12103                 LIBS="$ol_LIBS"
12104         
12105 fi
12106
12107 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12108
12109         if test $ol_cv_pthread_kthread = yes ; then
12110                 ol_link_pthreads="-kthread"
12111                 ol_link_threads=posix
12112         fi
12113 fi
12114
12115                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12116 if test "$ol_link_threads" = no ; then
12117         # try -pthread
12118         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12119 echo "configure:12120: checking for pthread link with -pthread" >&5
12120 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12121   echo $ac_n "(cached) $ac_c" 1>&6
12122 else
12123   
12124                 # save the flags
12125                 ol_LIBS="$LIBS"
12126                 LIBS="-pthread $LIBS"
12127
12128                 if test "$cross_compiling" = yes; then
12129   cat > conftest.$ac_ext <<EOF
12130 #line 12131 "configure"
12131 #include "confdefs.h"
12132 /* pthread test headers */
12133 #include <pthread.h>
12134 #if HAVE_PTHREADS < 7
12135 #include <errno.h>
12136 #endif
12137 #ifndef NULL
12138 #define NULL (void*)0
12139 #endif
12140
12141 static void *task(p)
12142         void *p;
12143 {
12144         return (void *) (p == NULL);
12145 }
12146
12147 int main() {
12148
12149         /* pthread test function */
12150 #ifndef PTHREAD_CREATE_DETACHED
12151 #define PTHREAD_CREATE_DETACHED 1
12152 #endif
12153         pthread_t t;
12154         int status;
12155         int detach = PTHREAD_CREATE_DETACHED;
12156
12157 #if HAVE_PTHREADS > 4
12158         /* Final pthreads */
12159         pthread_attr_t attr;
12160
12161         status = pthread_attr_init(&attr);
12162         if( status ) return status;
12163
12164 #if HAVE_PTHREADS < 7
12165         status = pthread_attr_setdetachstate(&attr, &detach);
12166         if( status < 0 ) status = errno;
12167 #else
12168         status = pthread_attr_setdetachstate(&attr, detach);
12169 #endif
12170         if( status ) return status;
12171         status = pthread_create( &t, &attr, task, NULL );
12172 #if HAVE_PTHREADS < 7
12173         if( status < 0 ) status = errno;
12174 #endif
12175         if( status ) return status;
12176 #else
12177         /* Draft 4 pthreads */
12178         status = pthread_create( &t, pthread_attr_default, task, NULL );
12179         if( status ) return errno;
12180
12181         /* give thread a chance to complete */
12182         /* it should remain joinable and hence detachable */
12183         sleep( 1 );
12184
12185         status = pthread_detach( &t );
12186         if( status ) return errno;
12187 #endif
12188
12189 #ifdef HAVE_LINUX_THREADS
12190         pthread_kill_other_threads_np();
12191 #endif
12192
12193         return 0;
12194
12195 ; return 0; }
12196 EOF
12197 if { (eval echo configure:12198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12198   rm -rf conftest*
12199   ol_cv_pthread_pthread=yes
12200 else
12201   echo "configure: failed program was:" >&5
12202   cat conftest.$ac_ext >&5
12203   rm -rf conftest*
12204   ol_cv_pthread_pthread=no
12205 fi
12206 rm -f conftest*
12207 else
12208   cat > conftest.$ac_ext <<EOF
12209 #line 12210 "configure"
12210 #include "confdefs.h"
12211 /* pthread test headers */
12212 #include <pthread.h>
12213 #if HAVE_PTHREADS < 7
12214 #include <errno.h>
12215 #endif
12216 #ifndef NULL
12217 #define NULL (void*)0
12218 #endif
12219
12220 static void *task(p)
12221         void *p;
12222 {
12223         return (void *) (p == NULL);
12224 }
12225
12226
12227 int main(argc, argv)
12228         int argc;
12229         char **argv;
12230 {
12231
12232         /* pthread test function */
12233 #ifndef PTHREAD_CREATE_DETACHED
12234 #define PTHREAD_CREATE_DETACHED 1
12235 #endif
12236         pthread_t t;
12237         int status;
12238         int detach = PTHREAD_CREATE_DETACHED;
12239
12240 #if HAVE_PTHREADS > 4
12241         /* Final pthreads */
12242         pthread_attr_t attr;
12243
12244         status = pthread_attr_init(&attr);
12245         if( status ) return status;
12246
12247 #if HAVE_PTHREADS < 7
12248         status = pthread_attr_setdetachstate(&attr, &detach);
12249         if( status < 0 ) status = errno;
12250 #else
12251         status = pthread_attr_setdetachstate(&attr, detach);
12252 #endif
12253         if( status ) return status;
12254         status = pthread_create( &t, &attr, task, NULL );
12255 #if HAVE_PTHREADS < 7
12256         if( status < 0 ) status = errno;
12257 #endif
12258         if( status ) return status;
12259 #else
12260         /* Draft 4 pthreads */
12261         status = pthread_create( &t, pthread_attr_default, task, NULL );
12262         if( status ) return errno;
12263
12264         /* give thread a chance to complete */
12265         /* it should remain joinable and hence detachable */
12266         sleep( 1 );
12267
12268         status = pthread_detach( &t );
12269         if( status ) return errno;
12270 #endif
12271
12272 #ifdef HAVE_LINUX_THREADS
12273         pthread_kill_other_threads_np();
12274 #endif
12275
12276         return 0;
12277
12278 }
12279
12280 EOF
12281 if { (eval echo configure:12282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12282 then
12283   ol_cv_pthread_pthread=yes
12284 else
12285   echo "configure: failed program was:" >&5
12286   cat conftest.$ac_ext >&5
12287   rm -fr conftest*
12288   ol_cv_pthread_pthread=no
12289 fi
12290 rm -fr conftest*
12291 fi
12292
12293
12294                 # restore the LIBS
12295                 LIBS="$ol_LIBS"
12296         
12297 fi
12298
12299 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12300
12301         if test $ol_cv_pthread_pthread = yes ; then
12302                 ol_link_pthreads="-pthread"
12303                 ol_link_threads=posix
12304         fi
12305 fi
12306
12307                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12308 if test "$ol_link_threads" = no ; then
12309         # try -pthreads
12310         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12311 echo "configure:12312: checking for pthread link with -pthreads" >&5
12312 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12313   echo $ac_n "(cached) $ac_c" 1>&6
12314 else
12315   
12316                 # save the flags
12317                 ol_LIBS="$LIBS"
12318                 LIBS="-pthreads $LIBS"
12319
12320                 if test "$cross_compiling" = yes; then
12321   cat > conftest.$ac_ext <<EOF
12322 #line 12323 "configure"
12323 #include "confdefs.h"
12324 /* pthread test headers */
12325 #include <pthread.h>
12326 #if HAVE_PTHREADS < 7
12327 #include <errno.h>
12328 #endif
12329 #ifndef NULL
12330 #define NULL (void*)0
12331 #endif
12332
12333 static void *task(p)
12334         void *p;
12335 {
12336         return (void *) (p == NULL);
12337 }
12338
12339 int main() {
12340
12341         /* pthread test function */
12342 #ifndef PTHREAD_CREATE_DETACHED
12343 #define PTHREAD_CREATE_DETACHED 1
12344 #endif
12345         pthread_t t;
12346         int status;
12347         int detach = PTHREAD_CREATE_DETACHED;
12348
12349 #if HAVE_PTHREADS > 4
12350         /* Final pthreads */
12351         pthread_attr_t attr;
12352
12353         status = pthread_attr_init(&attr);
12354         if( status ) return status;
12355
12356 #if HAVE_PTHREADS < 7
12357         status = pthread_attr_setdetachstate(&attr, &detach);
12358         if( status < 0 ) status = errno;
12359 #else
12360         status = pthread_attr_setdetachstate(&attr, detach);
12361 #endif
12362         if( status ) return status;
12363         status = pthread_create( &t, &attr, task, NULL );
12364 #if HAVE_PTHREADS < 7
12365         if( status < 0 ) status = errno;
12366 #endif
12367         if( status ) return status;
12368 #else
12369         /* Draft 4 pthreads */
12370         status = pthread_create( &t, pthread_attr_default, task, NULL );
12371         if( status ) return errno;
12372
12373         /* give thread a chance to complete */
12374         /* it should remain joinable and hence detachable */
12375         sleep( 1 );
12376
12377         status = pthread_detach( &t );
12378         if( status ) return errno;
12379 #endif
12380
12381 #ifdef HAVE_LINUX_THREADS
12382         pthread_kill_other_threads_np();
12383 #endif
12384
12385         return 0;
12386
12387 ; return 0; }
12388 EOF
12389 if { (eval echo configure:12390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12390   rm -rf conftest*
12391   ol_cv_pthread_pthreads=yes
12392 else
12393   echo "configure: failed program was:" >&5
12394   cat conftest.$ac_ext >&5
12395   rm -rf conftest*
12396   ol_cv_pthread_pthreads=no
12397 fi
12398 rm -f conftest*
12399 else
12400   cat > conftest.$ac_ext <<EOF
12401 #line 12402 "configure"
12402 #include "confdefs.h"
12403 /* pthread test headers */
12404 #include <pthread.h>
12405 #if HAVE_PTHREADS < 7
12406 #include <errno.h>
12407 #endif
12408 #ifndef NULL
12409 #define NULL (void*)0
12410 #endif
12411
12412 static void *task(p)
12413         void *p;
12414 {
12415         return (void *) (p == NULL);
12416 }
12417
12418
12419 int main(argc, argv)
12420         int argc;
12421         char **argv;
12422 {
12423
12424         /* pthread test function */
12425 #ifndef PTHREAD_CREATE_DETACHED
12426 #define PTHREAD_CREATE_DETACHED 1
12427 #endif
12428         pthread_t t;
12429         int status;
12430         int detach = PTHREAD_CREATE_DETACHED;
12431
12432 #if HAVE_PTHREADS > 4
12433         /* Final pthreads */
12434         pthread_attr_t attr;
12435
12436         status = pthread_attr_init(&attr);
12437         if( status ) return status;
12438
12439 #if HAVE_PTHREADS < 7
12440         status = pthread_attr_setdetachstate(&attr, &detach);
12441         if( status < 0 ) status = errno;
12442 #else
12443         status = pthread_attr_setdetachstate(&attr, detach);
12444 #endif
12445         if( status ) return status;
12446         status = pthread_create( &t, &attr, task, NULL );
12447 #if HAVE_PTHREADS < 7
12448         if( status < 0 ) status = errno;
12449 #endif
12450         if( status ) return status;
12451 #else
12452         /* Draft 4 pthreads */
12453         status = pthread_create( &t, pthread_attr_default, task, NULL );
12454         if( status ) return errno;
12455
12456         /* give thread a chance to complete */
12457         /* it should remain joinable and hence detachable */
12458         sleep( 1 );
12459
12460         status = pthread_detach( &t );
12461         if( status ) return errno;
12462 #endif
12463
12464 #ifdef HAVE_LINUX_THREADS
12465         pthread_kill_other_threads_np();
12466 #endif
12467
12468         return 0;
12469
12470 }
12471
12472 EOF
12473 if { (eval echo configure:12474: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12474 then
12475   ol_cv_pthread_pthreads=yes
12476 else
12477   echo "configure: failed program was:" >&5
12478   cat conftest.$ac_ext >&5
12479   rm -fr conftest*
12480   ol_cv_pthread_pthreads=no
12481 fi
12482 rm -fr conftest*
12483 fi
12484
12485
12486                 # restore the LIBS
12487                 LIBS="$ol_LIBS"
12488         
12489 fi
12490
12491 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12492
12493         if test $ol_cv_pthread_pthreads = yes ; then
12494                 ol_link_pthreads="-pthreads"
12495                 ol_link_threads=posix
12496         fi
12497 fi
12498
12499                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12500 if test "$ol_link_threads" = no ; then
12501         # try -mthreads
12502         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12503 echo "configure:12504: checking for pthread link with -mthreads" >&5
12504 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12505   echo $ac_n "(cached) $ac_c" 1>&6
12506 else
12507   
12508                 # save the flags
12509                 ol_LIBS="$LIBS"
12510                 LIBS="-mthreads $LIBS"
12511
12512                 if test "$cross_compiling" = yes; then
12513   cat > conftest.$ac_ext <<EOF
12514 #line 12515 "configure"
12515 #include "confdefs.h"
12516 /* pthread test headers */
12517 #include <pthread.h>
12518 #if HAVE_PTHREADS < 7
12519 #include <errno.h>
12520 #endif
12521 #ifndef NULL
12522 #define NULL (void*)0
12523 #endif
12524
12525 static void *task(p)
12526         void *p;
12527 {
12528         return (void *) (p == NULL);
12529 }
12530
12531 int main() {
12532
12533         /* pthread test function */
12534 #ifndef PTHREAD_CREATE_DETACHED
12535 #define PTHREAD_CREATE_DETACHED 1
12536 #endif
12537         pthread_t t;
12538         int status;
12539         int detach = PTHREAD_CREATE_DETACHED;
12540
12541 #if HAVE_PTHREADS > 4
12542         /* Final pthreads */
12543         pthread_attr_t attr;
12544
12545         status = pthread_attr_init(&attr);
12546         if( status ) return status;
12547
12548 #if HAVE_PTHREADS < 7
12549         status = pthread_attr_setdetachstate(&attr, &detach);
12550         if( status < 0 ) status = errno;
12551 #else
12552         status = pthread_attr_setdetachstate(&attr, detach);
12553 #endif
12554         if( status ) return status;
12555         status = pthread_create( &t, &attr, task, NULL );
12556 #if HAVE_PTHREADS < 7
12557         if( status < 0 ) status = errno;
12558 #endif
12559         if( status ) return status;
12560 #else
12561         /* Draft 4 pthreads */
12562         status = pthread_create( &t, pthread_attr_default, task, NULL );
12563         if( status ) return errno;
12564
12565         /* give thread a chance to complete */
12566         /* it should remain joinable and hence detachable */
12567         sleep( 1 );
12568
12569         status = pthread_detach( &t );
12570         if( status ) return errno;
12571 #endif
12572
12573 #ifdef HAVE_LINUX_THREADS
12574         pthread_kill_other_threads_np();
12575 #endif
12576
12577         return 0;
12578
12579 ; return 0; }
12580 EOF
12581 if { (eval echo configure:12582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12582   rm -rf conftest*
12583   ol_cv_pthread_mthreads=yes
12584 else
12585   echo "configure: failed program was:" >&5
12586   cat conftest.$ac_ext >&5
12587   rm -rf conftest*
12588   ol_cv_pthread_mthreads=no
12589 fi
12590 rm -f conftest*
12591 else
12592   cat > conftest.$ac_ext <<EOF
12593 #line 12594 "configure"
12594 #include "confdefs.h"
12595 /* pthread test headers */
12596 #include <pthread.h>
12597 #if HAVE_PTHREADS < 7
12598 #include <errno.h>
12599 #endif
12600 #ifndef NULL
12601 #define NULL (void*)0
12602 #endif
12603
12604 static void *task(p)
12605         void *p;
12606 {
12607         return (void *) (p == NULL);
12608 }
12609
12610
12611 int main(argc, argv)
12612         int argc;
12613         char **argv;
12614 {
12615
12616         /* pthread test function */
12617 #ifndef PTHREAD_CREATE_DETACHED
12618 #define PTHREAD_CREATE_DETACHED 1
12619 #endif
12620         pthread_t t;
12621         int status;
12622         int detach = PTHREAD_CREATE_DETACHED;
12623
12624 #if HAVE_PTHREADS > 4
12625         /* Final pthreads */
12626         pthread_attr_t attr;
12627
12628         status = pthread_attr_init(&attr);
12629         if( status ) return status;
12630
12631 #if HAVE_PTHREADS < 7
12632         status = pthread_attr_setdetachstate(&attr, &detach);
12633         if( status < 0 ) status = errno;
12634 #else
12635         status = pthread_attr_setdetachstate(&attr, detach);
12636 #endif
12637         if( status ) return status;
12638         status = pthread_create( &t, &attr, task, NULL );
12639 #if HAVE_PTHREADS < 7
12640         if( status < 0 ) status = errno;
12641 #endif
12642         if( status ) return status;
12643 #else
12644         /* Draft 4 pthreads */
12645         status = pthread_create( &t, pthread_attr_default, task, NULL );
12646         if( status ) return errno;
12647
12648         /* give thread a chance to complete */
12649         /* it should remain joinable and hence detachable */
12650         sleep( 1 );
12651
12652         status = pthread_detach( &t );
12653         if( status ) return errno;
12654 #endif
12655
12656 #ifdef HAVE_LINUX_THREADS
12657         pthread_kill_other_threads_np();
12658 #endif
12659
12660         return 0;
12661
12662 }
12663
12664 EOF
12665 if { (eval echo configure:12666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12666 then
12667   ol_cv_pthread_mthreads=yes
12668 else
12669   echo "configure: failed program was:" >&5
12670   cat conftest.$ac_ext >&5
12671   rm -fr conftest*
12672   ol_cv_pthread_mthreads=no
12673 fi
12674 rm -fr conftest*
12675 fi
12676
12677
12678                 # restore the LIBS
12679                 LIBS="$ol_LIBS"
12680         
12681 fi
12682
12683 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12684
12685         if test $ol_cv_pthread_mthreads = yes ; then
12686                 ol_link_pthreads="-mthreads"
12687                 ol_link_threads=posix
12688         fi
12689 fi
12690
12691                 # Pthread try link: -thread (ol_cv_pthread_thread)
12692 if test "$ol_link_threads" = no ; then
12693         # try -thread
12694         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12695 echo "configure:12696: checking for pthread link with -thread" >&5
12696 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12697   echo $ac_n "(cached) $ac_c" 1>&6
12698 else
12699   
12700                 # save the flags
12701                 ol_LIBS="$LIBS"
12702                 LIBS="-thread $LIBS"
12703
12704                 if test "$cross_compiling" = yes; then
12705   cat > conftest.$ac_ext <<EOF
12706 #line 12707 "configure"
12707 #include "confdefs.h"
12708 /* pthread test headers */
12709 #include <pthread.h>
12710 #if HAVE_PTHREADS < 7
12711 #include <errno.h>
12712 #endif
12713 #ifndef NULL
12714 #define NULL (void*)0
12715 #endif
12716
12717 static void *task(p)
12718         void *p;
12719 {
12720         return (void *) (p == NULL);
12721 }
12722
12723 int main() {
12724
12725         /* pthread test function */
12726 #ifndef PTHREAD_CREATE_DETACHED
12727 #define PTHREAD_CREATE_DETACHED 1
12728 #endif
12729         pthread_t t;
12730         int status;
12731         int detach = PTHREAD_CREATE_DETACHED;
12732
12733 #if HAVE_PTHREADS > 4
12734         /* Final pthreads */
12735         pthread_attr_t attr;
12736
12737         status = pthread_attr_init(&attr);
12738         if( status ) return status;
12739
12740 #if HAVE_PTHREADS < 7
12741         status = pthread_attr_setdetachstate(&attr, &detach);
12742         if( status < 0 ) status = errno;
12743 #else
12744         status = pthread_attr_setdetachstate(&attr, detach);
12745 #endif
12746         if( status ) return status;
12747         status = pthread_create( &t, &attr, task, NULL );
12748 #if HAVE_PTHREADS < 7
12749         if( status < 0 ) status = errno;
12750 #endif
12751         if( status ) return status;
12752 #else
12753         /* Draft 4 pthreads */
12754         status = pthread_create( &t, pthread_attr_default, task, NULL );
12755         if( status ) return errno;
12756
12757         /* give thread a chance to complete */
12758         /* it should remain joinable and hence detachable */
12759         sleep( 1 );
12760
12761         status = pthread_detach( &t );
12762         if( status ) return errno;
12763 #endif
12764
12765 #ifdef HAVE_LINUX_THREADS
12766         pthread_kill_other_threads_np();
12767 #endif
12768
12769         return 0;
12770
12771 ; return 0; }
12772 EOF
12773 if { (eval echo configure:12774: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12774   rm -rf conftest*
12775   ol_cv_pthread_thread=yes
12776 else
12777   echo "configure: failed program was:" >&5
12778   cat conftest.$ac_ext >&5
12779   rm -rf conftest*
12780   ol_cv_pthread_thread=no
12781 fi
12782 rm -f conftest*
12783 else
12784   cat > conftest.$ac_ext <<EOF
12785 #line 12786 "configure"
12786 #include "confdefs.h"
12787 /* pthread test headers */
12788 #include <pthread.h>
12789 #if HAVE_PTHREADS < 7
12790 #include <errno.h>
12791 #endif
12792 #ifndef NULL
12793 #define NULL (void*)0
12794 #endif
12795
12796 static void *task(p)
12797         void *p;
12798 {
12799         return (void *) (p == NULL);
12800 }
12801
12802
12803 int main(argc, argv)
12804         int argc;
12805         char **argv;
12806 {
12807
12808         /* pthread test function */
12809 #ifndef PTHREAD_CREATE_DETACHED
12810 #define PTHREAD_CREATE_DETACHED 1
12811 #endif
12812         pthread_t t;
12813         int status;
12814         int detach = PTHREAD_CREATE_DETACHED;
12815
12816 #if HAVE_PTHREADS > 4
12817         /* Final pthreads */
12818         pthread_attr_t attr;
12819
12820         status = pthread_attr_init(&attr);
12821         if( status ) return status;
12822
12823 #if HAVE_PTHREADS < 7
12824         status = pthread_attr_setdetachstate(&attr, &detach);
12825         if( status < 0 ) status = errno;
12826 #else
12827         status = pthread_attr_setdetachstate(&attr, detach);
12828 #endif
12829         if( status ) return status;
12830         status = pthread_create( &t, &attr, task, NULL );
12831 #if HAVE_PTHREADS < 7
12832         if( status < 0 ) status = errno;
12833 #endif
12834         if( status ) return status;
12835 #else
12836         /* Draft 4 pthreads */
12837         status = pthread_create( &t, pthread_attr_default, task, NULL );
12838         if( status ) return errno;
12839
12840         /* give thread a chance to complete */
12841         /* it should remain joinable and hence detachable */
12842         sleep( 1 );
12843
12844         status = pthread_detach( &t );
12845         if( status ) return errno;
12846 #endif
12847
12848 #ifdef HAVE_LINUX_THREADS
12849         pthread_kill_other_threads_np();
12850 #endif
12851
12852         return 0;
12853
12854 }
12855
12856 EOF
12857 if { (eval echo configure:12858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12858 then
12859   ol_cv_pthread_thread=yes
12860 else
12861   echo "configure: failed program was:" >&5
12862   cat conftest.$ac_ext >&5
12863   rm -fr conftest*
12864   ol_cv_pthread_thread=no
12865 fi
12866 rm -fr conftest*
12867 fi
12868
12869
12870                 # restore the LIBS
12871                 LIBS="$ol_LIBS"
12872         
12873 fi
12874
12875 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12876
12877         if test $ol_cv_pthread_thread = yes ; then
12878                 ol_link_pthreads="-thread"
12879                 ol_link_threads=posix
12880         fi
12881 fi
12882
12883
12884                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12885 if test "$ol_link_threads" = no ; then
12886         # try -lpthread -lmach -lexc -lc_r
12887         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12888 echo "configure:12889: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12889 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12890   echo $ac_n "(cached) $ac_c" 1>&6
12891 else
12892   
12893                 # save the flags
12894                 ol_LIBS="$LIBS"
12895                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12896
12897                 if test "$cross_compiling" = yes; then
12898   cat > conftest.$ac_ext <<EOF
12899 #line 12900 "configure"
12900 #include "confdefs.h"
12901 /* pthread test headers */
12902 #include <pthread.h>
12903 #if HAVE_PTHREADS < 7
12904 #include <errno.h>
12905 #endif
12906 #ifndef NULL
12907 #define NULL (void*)0
12908 #endif
12909
12910 static void *task(p)
12911         void *p;
12912 {
12913         return (void *) (p == NULL);
12914 }
12915
12916 int main() {
12917
12918         /* pthread test function */
12919 #ifndef PTHREAD_CREATE_DETACHED
12920 #define PTHREAD_CREATE_DETACHED 1
12921 #endif
12922         pthread_t t;
12923         int status;
12924         int detach = PTHREAD_CREATE_DETACHED;
12925
12926 #if HAVE_PTHREADS > 4
12927         /* Final pthreads */
12928         pthread_attr_t attr;
12929
12930         status = pthread_attr_init(&attr);
12931         if( status ) return status;
12932
12933 #if HAVE_PTHREADS < 7
12934         status = pthread_attr_setdetachstate(&attr, &detach);
12935         if( status < 0 ) status = errno;
12936 #else
12937         status = pthread_attr_setdetachstate(&attr, detach);
12938 #endif
12939         if( status ) return status;
12940         status = pthread_create( &t, &attr, task, NULL );
12941 #if HAVE_PTHREADS < 7
12942         if( status < 0 ) status = errno;
12943 #endif
12944         if( status ) return status;
12945 #else
12946         /* Draft 4 pthreads */
12947         status = pthread_create( &t, pthread_attr_default, task, NULL );
12948         if( status ) return errno;
12949
12950         /* give thread a chance to complete */
12951         /* it should remain joinable and hence detachable */
12952         sleep( 1 );
12953
12954         status = pthread_detach( &t );
12955         if( status ) return errno;
12956 #endif
12957
12958 #ifdef HAVE_LINUX_THREADS
12959         pthread_kill_other_threads_np();
12960 #endif
12961
12962         return 0;
12963
12964 ; return 0; }
12965 EOF
12966 if { (eval echo configure:12967: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12967   rm -rf conftest*
12968   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
12969 else
12970   echo "configure: failed program was:" >&5
12971   cat conftest.$ac_ext >&5
12972   rm -rf conftest*
12973   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
12974 fi
12975 rm -f conftest*
12976 else
12977   cat > conftest.$ac_ext <<EOF
12978 #line 12979 "configure"
12979 #include "confdefs.h"
12980 /* pthread test headers */
12981 #include <pthread.h>
12982 #if HAVE_PTHREADS < 7
12983 #include <errno.h>
12984 #endif
12985 #ifndef NULL
12986 #define NULL (void*)0
12987 #endif
12988
12989 static void *task(p)
12990         void *p;
12991 {
12992         return (void *) (p == NULL);
12993 }
12994
12995
12996 int main(argc, argv)
12997         int argc;
12998         char **argv;
12999 {
13000
13001         /* pthread test function */
13002 #ifndef PTHREAD_CREATE_DETACHED
13003 #define PTHREAD_CREATE_DETACHED 1
13004 #endif
13005         pthread_t t;
13006         int status;
13007         int detach = PTHREAD_CREATE_DETACHED;
13008
13009 #if HAVE_PTHREADS > 4
13010         /* Final pthreads */
13011         pthread_attr_t attr;
13012
13013         status = pthread_attr_init(&attr);
13014         if( status ) return status;
13015
13016 #if HAVE_PTHREADS < 7
13017         status = pthread_attr_setdetachstate(&attr, &detach);
13018         if( status < 0 ) status = errno;
13019 #else
13020         status = pthread_attr_setdetachstate(&attr, detach);
13021 #endif
13022         if( status ) return status;
13023         status = pthread_create( &t, &attr, task, NULL );
13024 #if HAVE_PTHREADS < 7
13025         if( status < 0 ) status = errno;
13026 #endif
13027         if( status ) return status;
13028 #else
13029         /* Draft 4 pthreads */
13030         status = pthread_create( &t, pthread_attr_default, task, NULL );
13031         if( status ) return errno;
13032
13033         /* give thread a chance to complete */
13034         /* it should remain joinable and hence detachable */
13035         sleep( 1 );
13036
13037         status = pthread_detach( &t );
13038         if( status ) return errno;
13039 #endif
13040
13041 #ifdef HAVE_LINUX_THREADS
13042         pthread_kill_other_threads_np();
13043 #endif
13044
13045         return 0;
13046
13047 }
13048
13049 EOF
13050 if { (eval echo configure:13051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13051 then
13052   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13053 else
13054   echo "configure: failed program was:" >&5
13055   cat conftest.$ac_ext >&5
13056   rm -fr conftest*
13057   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13058 fi
13059 rm -fr conftest*
13060 fi
13061
13062
13063                 # restore the LIBS
13064                 LIBS="$ol_LIBS"
13065         
13066 fi
13067
13068 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13069
13070         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13071                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13072                 ol_link_threads=posix
13073         fi
13074 fi
13075
13076                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13077 if test "$ol_link_threads" = no ; then
13078         # try -lpthread -lmach -lexc
13079         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13080 echo "configure:13081: checking for pthread link with -lpthread -lmach -lexc" >&5
13081 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13082   echo $ac_n "(cached) $ac_c" 1>&6
13083 else
13084   
13085                 # save the flags
13086                 ol_LIBS="$LIBS"
13087                 LIBS="-lpthread -lmach -lexc $LIBS"
13088
13089                 if test "$cross_compiling" = yes; then
13090   cat > conftest.$ac_ext <<EOF
13091 #line 13092 "configure"
13092 #include "confdefs.h"
13093 /* pthread test headers */
13094 #include <pthread.h>
13095 #if HAVE_PTHREADS < 7
13096 #include <errno.h>
13097 #endif
13098 #ifndef NULL
13099 #define NULL (void*)0
13100 #endif
13101
13102 static void *task(p)
13103         void *p;
13104 {
13105         return (void *) (p == NULL);
13106 }
13107
13108 int main() {
13109
13110         /* pthread test function */
13111 #ifndef PTHREAD_CREATE_DETACHED
13112 #define PTHREAD_CREATE_DETACHED 1
13113 #endif
13114         pthread_t t;
13115         int status;
13116         int detach = PTHREAD_CREATE_DETACHED;
13117
13118 #if HAVE_PTHREADS > 4
13119         /* Final pthreads */
13120         pthread_attr_t attr;
13121
13122         status = pthread_attr_init(&attr);
13123         if( status ) return status;
13124
13125 #if HAVE_PTHREADS < 7
13126         status = pthread_attr_setdetachstate(&attr, &detach);
13127         if( status < 0 ) status = errno;
13128 #else
13129         status = pthread_attr_setdetachstate(&attr, detach);
13130 #endif
13131         if( status ) return status;
13132         status = pthread_create( &t, &attr, task, NULL );
13133 #if HAVE_PTHREADS < 7
13134         if( status < 0 ) status = errno;
13135 #endif
13136         if( status ) return status;
13137 #else
13138         /* Draft 4 pthreads */
13139         status = pthread_create( &t, pthread_attr_default, task, NULL );
13140         if( status ) return errno;
13141
13142         /* give thread a chance to complete */
13143         /* it should remain joinable and hence detachable */
13144         sleep( 1 );
13145
13146         status = pthread_detach( &t );
13147         if( status ) return errno;
13148 #endif
13149
13150 #ifdef HAVE_LINUX_THREADS
13151         pthread_kill_other_threads_np();
13152 #endif
13153
13154         return 0;
13155
13156 ; return 0; }
13157 EOF
13158 if { (eval echo configure:13159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13159   rm -rf conftest*
13160   ol_cv_pthread_lpthread_lmach_lexc=yes
13161 else
13162   echo "configure: failed program was:" >&5
13163   cat conftest.$ac_ext >&5
13164   rm -rf conftest*
13165   ol_cv_pthread_lpthread_lmach_lexc=no
13166 fi
13167 rm -f conftest*
13168 else
13169   cat > conftest.$ac_ext <<EOF
13170 #line 13171 "configure"
13171 #include "confdefs.h"
13172 /* pthread test headers */
13173 #include <pthread.h>
13174 #if HAVE_PTHREADS < 7
13175 #include <errno.h>
13176 #endif
13177 #ifndef NULL
13178 #define NULL (void*)0
13179 #endif
13180
13181 static void *task(p)
13182         void *p;
13183 {
13184         return (void *) (p == NULL);
13185 }
13186
13187
13188 int main(argc, argv)
13189         int argc;
13190         char **argv;
13191 {
13192
13193         /* pthread test function */
13194 #ifndef PTHREAD_CREATE_DETACHED
13195 #define PTHREAD_CREATE_DETACHED 1
13196 #endif
13197         pthread_t t;
13198         int status;
13199         int detach = PTHREAD_CREATE_DETACHED;
13200
13201 #if HAVE_PTHREADS > 4
13202         /* Final pthreads */
13203         pthread_attr_t attr;
13204
13205         status = pthread_attr_init(&attr);
13206         if( status ) return status;
13207
13208 #if HAVE_PTHREADS < 7
13209         status = pthread_attr_setdetachstate(&attr, &detach);
13210         if( status < 0 ) status = errno;
13211 #else
13212         status = pthread_attr_setdetachstate(&attr, detach);
13213 #endif
13214         if( status ) return status;
13215         status = pthread_create( &t, &attr, task, NULL );
13216 #if HAVE_PTHREADS < 7
13217         if( status < 0 ) status = errno;
13218 #endif
13219         if( status ) return status;
13220 #else
13221         /* Draft 4 pthreads */
13222         status = pthread_create( &t, pthread_attr_default, task, NULL );
13223         if( status ) return errno;
13224
13225         /* give thread a chance to complete */
13226         /* it should remain joinable and hence detachable */
13227         sleep( 1 );
13228
13229         status = pthread_detach( &t );
13230         if( status ) return errno;
13231 #endif
13232
13233 #ifdef HAVE_LINUX_THREADS
13234         pthread_kill_other_threads_np();
13235 #endif
13236
13237         return 0;
13238
13239 }
13240
13241 EOF
13242 if { (eval echo configure:13243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13243 then
13244   ol_cv_pthread_lpthread_lmach_lexc=yes
13245 else
13246   echo "configure: failed program was:" >&5
13247   cat conftest.$ac_ext >&5
13248   rm -fr conftest*
13249   ol_cv_pthread_lpthread_lmach_lexc=no
13250 fi
13251 rm -fr conftest*
13252 fi
13253
13254
13255                 # restore the LIBS
13256                 LIBS="$ol_LIBS"
13257         
13258 fi
13259
13260 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13261
13262         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13263                 ol_link_pthreads="-lpthread -lmach -lexc"
13264                 ol_link_threads=posix
13265         fi
13266 fi
13267
13268
13269                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13270 if test "$ol_link_threads" = no ; then
13271         # try -lpthread -Wl,-woff,85
13272         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13273 echo "configure:13274: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13274 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13275   echo $ac_n "(cached) $ac_c" 1>&6
13276 else
13277   
13278                 # save the flags
13279                 ol_LIBS="$LIBS"
13280                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13281
13282                 if test "$cross_compiling" = yes; then
13283   cat > conftest.$ac_ext <<EOF
13284 #line 13285 "configure"
13285 #include "confdefs.h"
13286 /* pthread test headers */
13287 #include <pthread.h>
13288 #if HAVE_PTHREADS < 7
13289 #include <errno.h>
13290 #endif
13291 #ifndef NULL
13292 #define NULL (void*)0
13293 #endif
13294
13295 static void *task(p)
13296         void *p;
13297 {
13298         return (void *) (p == NULL);
13299 }
13300
13301 int main() {
13302
13303         /* pthread test function */
13304 #ifndef PTHREAD_CREATE_DETACHED
13305 #define PTHREAD_CREATE_DETACHED 1
13306 #endif
13307         pthread_t t;
13308         int status;
13309         int detach = PTHREAD_CREATE_DETACHED;
13310
13311 #if HAVE_PTHREADS > 4
13312         /* Final pthreads */
13313         pthread_attr_t attr;
13314
13315         status = pthread_attr_init(&attr);
13316         if( status ) return status;
13317
13318 #if HAVE_PTHREADS < 7
13319         status = pthread_attr_setdetachstate(&attr, &detach);
13320         if( status < 0 ) status = errno;
13321 #else
13322         status = pthread_attr_setdetachstate(&attr, detach);
13323 #endif
13324         if( status ) return status;
13325         status = pthread_create( &t, &attr, task, NULL );
13326 #if HAVE_PTHREADS < 7
13327         if( status < 0 ) status = errno;
13328 #endif
13329         if( status ) return status;
13330 #else
13331         /* Draft 4 pthreads */
13332         status = pthread_create( &t, pthread_attr_default, task, NULL );
13333         if( status ) return errno;
13334
13335         /* give thread a chance to complete */
13336         /* it should remain joinable and hence detachable */
13337         sleep( 1 );
13338
13339         status = pthread_detach( &t );
13340         if( status ) return errno;
13341 #endif
13342
13343 #ifdef HAVE_LINUX_THREADS
13344         pthread_kill_other_threads_np();
13345 #endif
13346
13347         return 0;
13348
13349 ; return 0; }
13350 EOF
13351 if { (eval echo configure:13352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13352   rm -rf conftest*
13353   ol_cv_pthread_lib_lpthread_woff=yes
13354 else
13355   echo "configure: failed program was:" >&5
13356   cat conftest.$ac_ext >&5
13357   rm -rf conftest*
13358   ol_cv_pthread_lib_lpthread_woff=no
13359 fi
13360 rm -f conftest*
13361 else
13362   cat > conftest.$ac_ext <<EOF
13363 #line 13364 "configure"
13364 #include "confdefs.h"
13365 /* pthread test headers */
13366 #include <pthread.h>
13367 #if HAVE_PTHREADS < 7
13368 #include <errno.h>
13369 #endif
13370 #ifndef NULL
13371 #define NULL (void*)0
13372 #endif
13373
13374 static void *task(p)
13375         void *p;
13376 {
13377         return (void *) (p == NULL);
13378 }
13379
13380
13381 int main(argc, argv)
13382         int argc;
13383         char **argv;
13384 {
13385
13386         /* pthread test function */
13387 #ifndef PTHREAD_CREATE_DETACHED
13388 #define PTHREAD_CREATE_DETACHED 1
13389 #endif
13390         pthread_t t;
13391         int status;
13392         int detach = PTHREAD_CREATE_DETACHED;
13393
13394 #if HAVE_PTHREADS > 4
13395         /* Final pthreads */
13396         pthread_attr_t attr;
13397
13398         status = pthread_attr_init(&attr);
13399         if( status ) return status;
13400
13401 #if HAVE_PTHREADS < 7
13402         status = pthread_attr_setdetachstate(&attr, &detach);
13403         if( status < 0 ) status = errno;
13404 #else
13405         status = pthread_attr_setdetachstate(&attr, detach);
13406 #endif
13407         if( status ) return status;
13408         status = pthread_create( &t, &attr, task, NULL );
13409 #if HAVE_PTHREADS < 7
13410         if( status < 0 ) status = errno;
13411 #endif
13412         if( status ) return status;
13413 #else
13414         /* Draft 4 pthreads */
13415         status = pthread_create( &t, pthread_attr_default, task, NULL );
13416         if( status ) return errno;
13417
13418         /* give thread a chance to complete */
13419         /* it should remain joinable and hence detachable */
13420         sleep( 1 );
13421
13422         status = pthread_detach( &t );
13423         if( status ) return errno;
13424 #endif
13425
13426 #ifdef HAVE_LINUX_THREADS
13427         pthread_kill_other_threads_np();
13428 #endif
13429
13430         return 0;
13431
13432 }
13433
13434 EOF
13435 if { (eval echo configure:13436: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13436 then
13437   ol_cv_pthread_lib_lpthread_woff=yes
13438 else
13439   echo "configure: failed program was:" >&5
13440   cat conftest.$ac_ext >&5
13441   rm -fr conftest*
13442   ol_cv_pthread_lib_lpthread_woff=no
13443 fi
13444 rm -fr conftest*
13445 fi
13446
13447
13448                 # restore the LIBS
13449                 LIBS="$ol_LIBS"
13450         
13451 fi
13452
13453 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13454
13455         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13456                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13457                 ol_link_threads=posix
13458         fi
13459 fi
13460
13461
13462                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13463 if test "$ol_link_threads" = no ; then
13464         # try -lpthread
13465         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13466 echo "configure:13467: checking for pthread link with -lpthread" >&5
13467 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13468   echo $ac_n "(cached) $ac_c" 1>&6
13469 else
13470   
13471                 # save the flags
13472                 ol_LIBS="$LIBS"
13473                 LIBS="-lpthread $LIBS"
13474
13475                 if test "$cross_compiling" = yes; then
13476   cat > conftest.$ac_ext <<EOF
13477 #line 13478 "configure"
13478 #include "confdefs.h"
13479 /* pthread test headers */
13480 #include <pthread.h>
13481 #if HAVE_PTHREADS < 7
13482 #include <errno.h>
13483 #endif
13484 #ifndef NULL
13485 #define NULL (void*)0
13486 #endif
13487
13488 static void *task(p)
13489         void *p;
13490 {
13491         return (void *) (p == NULL);
13492 }
13493
13494 int main() {
13495
13496         /* pthread test function */
13497 #ifndef PTHREAD_CREATE_DETACHED
13498 #define PTHREAD_CREATE_DETACHED 1
13499 #endif
13500         pthread_t t;
13501         int status;
13502         int detach = PTHREAD_CREATE_DETACHED;
13503
13504 #if HAVE_PTHREADS > 4
13505         /* Final pthreads */
13506         pthread_attr_t attr;
13507
13508         status = pthread_attr_init(&attr);
13509         if( status ) return status;
13510
13511 #if HAVE_PTHREADS < 7
13512         status = pthread_attr_setdetachstate(&attr, &detach);
13513         if( status < 0 ) status = errno;
13514 #else
13515         status = pthread_attr_setdetachstate(&attr, detach);
13516 #endif
13517         if( status ) return status;
13518         status = pthread_create( &t, &attr, task, NULL );
13519 #if HAVE_PTHREADS < 7
13520         if( status < 0 ) status = errno;
13521 #endif
13522         if( status ) return status;
13523 #else
13524         /* Draft 4 pthreads */
13525         status = pthread_create( &t, pthread_attr_default, task, NULL );
13526         if( status ) return errno;
13527
13528         /* give thread a chance to complete */
13529         /* it should remain joinable and hence detachable */
13530         sleep( 1 );
13531
13532         status = pthread_detach( &t );
13533         if( status ) return errno;
13534 #endif
13535
13536 #ifdef HAVE_LINUX_THREADS
13537         pthread_kill_other_threads_np();
13538 #endif
13539
13540         return 0;
13541
13542 ; return 0; }
13543 EOF
13544 if { (eval echo configure:13545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13545   rm -rf conftest*
13546   ol_cv_pthread_lpthread=yes
13547 else
13548   echo "configure: failed program was:" >&5
13549   cat conftest.$ac_ext >&5
13550   rm -rf conftest*
13551   ol_cv_pthread_lpthread=no
13552 fi
13553 rm -f conftest*
13554 else
13555   cat > conftest.$ac_ext <<EOF
13556 #line 13557 "configure"
13557 #include "confdefs.h"
13558 /* pthread test headers */
13559 #include <pthread.h>
13560 #if HAVE_PTHREADS < 7
13561 #include <errno.h>
13562 #endif
13563 #ifndef NULL
13564 #define NULL (void*)0
13565 #endif
13566
13567 static void *task(p)
13568         void *p;
13569 {
13570         return (void *) (p == NULL);
13571 }
13572
13573
13574 int main(argc, argv)
13575         int argc;
13576         char **argv;
13577 {
13578
13579         /* pthread test function */
13580 #ifndef PTHREAD_CREATE_DETACHED
13581 #define PTHREAD_CREATE_DETACHED 1
13582 #endif
13583         pthread_t t;
13584         int status;
13585         int detach = PTHREAD_CREATE_DETACHED;
13586
13587 #if HAVE_PTHREADS > 4
13588         /* Final pthreads */
13589         pthread_attr_t attr;
13590
13591         status = pthread_attr_init(&attr);
13592         if( status ) return status;
13593
13594 #if HAVE_PTHREADS < 7
13595         status = pthread_attr_setdetachstate(&attr, &detach);
13596         if( status < 0 ) status = errno;
13597 #else
13598         status = pthread_attr_setdetachstate(&attr, detach);
13599 #endif
13600         if( status ) return status;
13601         status = pthread_create( &t, &attr, task, NULL );
13602 #if HAVE_PTHREADS < 7
13603         if( status < 0 ) status = errno;
13604 #endif
13605         if( status ) return status;
13606 #else
13607         /* Draft 4 pthreads */
13608         status = pthread_create( &t, pthread_attr_default, task, NULL );
13609         if( status ) return errno;
13610
13611         /* give thread a chance to complete */
13612         /* it should remain joinable and hence detachable */
13613         sleep( 1 );
13614
13615         status = pthread_detach( &t );
13616         if( status ) return errno;
13617 #endif
13618
13619 #ifdef HAVE_LINUX_THREADS
13620         pthread_kill_other_threads_np();
13621 #endif
13622
13623         return 0;
13624
13625 }
13626
13627 EOF
13628 if { (eval echo configure:13629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13629 then
13630   ol_cv_pthread_lpthread=yes
13631 else
13632   echo "configure: failed program was:" >&5
13633   cat conftest.$ac_ext >&5
13634   rm -fr conftest*
13635   ol_cv_pthread_lpthread=no
13636 fi
13637 rm -fr conftest*
13638 fi
13639
13640
13641                 # restore the LIBS
13642                 LIBS="$ol_LIBS"
13643         
13644 fi
13645
13646 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13647
13648         if test $ol_cv_pthread_lpthread = yes ; then
13649                 ol_link_pthreads="-lpthread"
13650                 ol_link_threads=posix
13651         fi
13652 fi
13653
13654                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13655 if test "$ol_link_threads" = no ; then
13656         # try -lc_r
13657         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13658 echo "configure:13659: checking for pthread link with -lc_r" >&5
13659 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13660   echo $ac_n "(cached) $ac_c" 1>&6
13661 else
13662   
13663                 # save the flags
13664                 ol_LIBS="$LIBS"
13665                 LIBS="-lc_r $LIBS"
13666
13667                 if test "$cross_compiling" = yes; then
13668   cat > conftest.$ac_ext <<EOF
13669 #line 13670 "configure"
13670 #include "confdefs.h"
13671 /* pthread test headers */
13672 #include <pthread.h>
13673 #if HAVE_PTHREADS < 7
13674 #include <errno.h>
13675 #endif
13676 #ifndef NULL
13677 #define NULL (void*)0
13678 #endif
13679
13680 static void *task(p)
13681         void *p;
13682 {
13683         return (void *) (p == NULL);
13684 }
13685
13686 int main() {
13687
13688         /* pthread test function */
13689 #ifndef PTHREAD_CREATE_DETACHED
13690 #define PTHREAD_CREATE_DETACHED 1
13691 #endif
13692         pthread_t t;
13693         int status;
13694         int detach = PTHREAD_CREATE_DETACHED;
13695
13696 #if HAVE_PTHREADS > 4
13697         /* Final pthreads */
13698         pthread_attr_t attr;
13699
13700         status = pthread_attr_init(&attr);
13701         if( status ) return status;
13702
13703 #if HAVE_PTHREADS < 7
13704         status = pthread_attr_setdetachstate(&attr, &detach);
13705         if( status < 0 ) status = errno;
13706 #else
13707         status = pthread_attr_setdetachstate(&attr, detach);
13708 #endif
13709         if( status ) return status;
13710         status = pthread_create( &t, &attr, task, NULL );
13711 #if HAVE_PTHREADS < 7
13712         if( status < 0 ) status = errno;
13713 #endif
13714         if( status ) return status;
13715 #else
13716         /* Draft 4 pthreads */
13717         status = pthread_create( &t, pthread_attr_default, task, NULL );
13718         if( status ) return errno;
13719
13720         /* give thread a chance to complete */
13721         /* it should remain joinable and hence detachable */
13722         sleep( 1 );
13723
13724         status = pthread_detach( &t );
13725         if( status ) return errno;
13726 #endif
13727
13728 #ifdef HAVE_LINUX_THREADS
13729         pthread_kill_other_threads_np();
13730 #endif
13731
13732         return 0;
13733
13734 ; return 0; }
13735 EOF
13736 if { (eval echo configure:13737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13737   rm -rf conftest*
13738   ol_cv_pthread_lc_r=yes
13739 else
13740   echo "configure: failed program was:" >&5
13741   cat conftest.$ac_ext >&5
13742   rm -rf conftest*
13743   ol_cv_pthread_lc_r=no
13744 fi
13745 rm -f conftest*
13746 else
13747   cat > conftest.$ac_ext <<EOF
13748 #line 13749 "configure"
13749 #include "confdefs.h"
13750 /* pthread test headers */
13751 #include <pthread.h>
13752 #if HAVE_PTHREADS < 7
13753 #include <errno.h>
13754 #endif
13755 #ifndef NULL
13756 #define NULL (void*)0
13757 #endif
13758
13759 static void *task(p)
13760         void *p;
13761 {
13762         return (void *) (p == NULL);
13763 }
13764
13765
13766 int main(argc, argv)
13767         int argc;
13768         char **argv;
13769 {
13770
13771         /* pthread test function */
13772 #ifndef PTHREAD_CREATE_DETACHED
13773 #define PTHREAD_CREATE_DETACHED 1
13774 #endif
13775         pthread_t t;
13776         int status;
13777         int detach = PTHREAD_CREATE_DETACHED;
13778
13779 #if HAVE_PTHREADS > 4
13780         /* Final pthreads */
13781         pthread_attr_t attr;
13782
13783         status = pthread_attr_init(&attr);
13784         if( status ) return status;
13785
13786 #if HAVE_PTHREADS < 7
13787         status = pthread_attr_setdetachstate(&attr, &detach);
13788         if( status < 0 ) status = errno;
13789 #else
13790         status = pthread_attr_setdetachstate(&attr, detach);
13791 #endif
13792         if( status ) return status;
13793         status = pthread_create( &t, &attr, task, NULL );
13794 #if HAVE_PTHREADS < 7
13795         if( status < 0 ) status = errno;
13796 #endif
13797         if( status ) return status;
13798 #else
13799         /* Draft 4 pthreads */
13800         status = pthread_create( &t, pthread_attr_default, task, NULL );
13801         if( status ) return errno;
13802
13803         /* give thread a chance to complete */
13804         /* it should remain joinable and hence detachable */
13805         sleep( 1 );
13806
13807         status = pthread_detach( &t );
13808         if( status ) return errno;
13809 #endif
13810
13811 #ifdef HAVE_LINUX_THREADS
13812         pthread_kill_other_threads_np();
13813 #endif
13814
13815         return 0;
13816
13817 }
13818
13819 EOF
13820 if { (eval echo configure:13821: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13821 then
13822   ol_cv_pthread_lc_r=yes
13823 else
13824   echo "configure: failed program was:" >&5
13825   cat conftest.$ac_ext >&5
13826   rm -fr conftest*
13827   ol_cv_pthread_lc_r=no
13828 fi
13829 rm -fr conftest*
13830 fi
13831
13832
13833                 # restore the LIBS
13834                 LIBS="$ol_LIBS"
13835         
13836 fi
13837
13838 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13839
13840         if test $ol_cv_pthread_lc_r = yes ; then
13841                 ol_link_pthreads="-lc_r"
13842                 ol_link_threads=posix
13843         fi
13844 fi
13845
13846
13847                 # Pthread try link: -threads (ol_cv_pthread_threads)
13848 if test "$ol_link_threads" = no ; then
13849         # try -threads
13850         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13851 echo "configure:13852: checking for pthread link with -threads" >&5
13852 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13853   echo $ac_n "(cached) $ac_c" 1>&6
13854 else
13855   
13856                 # save the flags
13857                 ol_LIBS="$LIBS"
13858                 LIBS="-threads $LIBS"
13859
13860                 if test "$cross_compiling" = yes; then
13861   cat > conftest.$ac_ext <<EOF
13862 #line 13863 "configure"
13863 #include "confdefs.h"
13864 /* pthread test headers */
13865 #include <pthread.h>
13866 #if HAVE_PTHREADS < 7
13867 #include <errno.h>
13868 #endif
13869 #ifndef NULL
13870 #define NULL (void*)0
13871 #endif
13872
13873 static void *task(p)
13874         void *p;
13875 {
13876         return (void *) (p == NULL);
13877 }
13878
13879 int main() {
13880
13881         /* pthread test function */
13882 #ifndef PTHREAD_CREATE_DETACHED
13883 #define PTHREAD_CREATE_DETACHED 1
13884 #endif
13885         pthread_t t;
13886         int status;
13887         int detach = PTHREAD_CREATE_DETACHED;
13888
13889 #if HAVE_PTHREADS > 4
13890         /* Final pthreads */
13891         pthread_attr_t attr;
13892
13893         status = pthread_attr_init(&attr);
13894         if( status ) return status;
13895
13896 #if HAVE_PTHREADS < 7
13897         status = pthread_attr_setdetachstate(&attr, &detach);
13898         if( status < 0 ) status = errno;
13899 #else
13900         status = pthread_attr_setdetachstate(&attr, detach);
13901 #endif
13902         if( status ) return status;
13903         status = pthread_create( &t, &attr, task, NULL );
13904 #if HAVE_PTHREADS < 7
13905         if( status < 0 ) status = errno;
13906 #endif
13907         if( status ) return status;
13908 #else
13909         /* Draft 4 pthreads */
13910         status = pthread_create( &t, pthread_attr_default, task, NULL );
13911         if( status ) return errno;
13912
13913         /* give thread a chance to complete */
13914         /* it should remain joinable and hence detachable */
13915         sleep( 1 );
13916
13917         status = pthread_detach( &t );
13918         if( status ) return errno;
13919 #endif
13920
13921 #ifdef HAVE_LINUX_THREADS
13922         pthread_kill_other_threads_np();
13923 #endif
13924
13925         return 0;
13926
13927 ; return 0; }
13928 EOF
13929 if { (eval echo configure:13930: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13930   rm -rf conftest*
13931   ol_cv_pthread_threads=yes
13932 else
13933   echo "configure: failed program was:" >&5
13934   cat conftest.$ac_ext >&5
13935   rm -rf conftest*
13936   ol_cv_pthread_threads=no
13937 fi
13938 rm -f conftest*
13939 else
13940   cat > conftest.$ac_ext <<EOF
13941 #line 13942 "configure"
13942 #include "confdefs.h"
13943 /* pthread test headers */
13944 #include <pthread.h>
13945 #if HAVE_PTHREADS < 7
13946 #include <errno.h>
13947 #endif
13948 #ifndef NULL
13949 #define NULL (void*)0
13950 #endif
13951
13952 static void *task(p)
13953         void *p;
13954 {
13955         return (void *) (p == NULL);
13956 }
13957
13958
13959 int main(argc, argv)
13960         int argc;
13961         char **argv;
13962 {
13963
13964         /* pthread test function */
13965 #ifndef PTHREAD_CREATE_DETACHED
13966 #define PTHREAD_CREATE_DETACHED 1
13967 #endif
13968         pthread_t t;
13969         int status;
13970         int detach = PTHREAD_CREATE_DETACHED;
13971
13972 #if HAVE_PTHREADS > 4
13973         /* Final pthreads */
13974         pthread_attr_t attr;
13975
13976         status = pthread_attr_init(&attr);
13977         if( status ) return status;
13978
13979 #if HAVE_PTHREADS < 7
13980         status = pthread_attr_setdetachstate(&attr, &detach);
13981         if( status < 0 ) status = errno;
13982 #else
13983         status = pthread_attr_setdetachstate(&attr, detach);
13984 #endif
13985         if( status ) return status;
13986         status = pthread_create( &t, &attr, task, NULL );
13987 #if HAVE_PTHREADS < 7
13988         if( status < 0 ) status = errno;
13989 #endif
13990         if( status ) return status;
13991 #else
13992         /* Draft 4 pthreads */
13993         status = pthread_create( &t, pthread_attr_default, task, NULL );
13994         if( status ) return errno;
13995
13996         /* give thread a chance to complete */
13997         /* it should remain joinable and hence detachable */
13998         sleep( 1 );
13999
14000         status = pthread_detach( &t );
14001         if( status ) return errno;
14002 #endif
14003
14004 #ifdef HAVE_LINUX_THREADS
14005         pthread_kill_other_threads_np();
14006 #endif
14007
14008         return 0;
14009
14010 }
14011
14012 EOF
14013 if { (eval echo configure:14014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14014 then
14015   ol_cv_pthread_threads=yes
14016 else
14017   echo "configure: failed program was:" >&5
14018   cat conftest.$ac_ext >&5
14019   rm -fr conftest*
14020   ol_cv_pthread_threads=no
14021 fi
14022 rm -fr conftest*
14023 fi
14024
14025
14026                 # restore the LIBS
14027                 LIBS="$ol_LIBS"
14028         
14029 fi
14030
14031 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14032
14033         if test $ol_cv_pthread_threads = yes ; then
14034                 ol_link_pthreads="-threads"
14035                 ol_link_threads=posix
14036         fi
14037 fi
14038
14039
14040                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14041 if test "$ol_link_threads" = no ; then
14042         # try -lpthreads -lmach -lexc -lc_r
14043         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14044 echo "configure:14045: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14045 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14046   echo $ac_n "(cached) $ac_c" 1>&6
14047 else
14048   
14049                 # save the flags
14050                 ol_LIBS="$LIBS"
14051                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14052
14053                 if test "$cross_compiling" = yes; then
14054   cat > conftest.$ac_ext <<EOF
14055 #line 14056 "configure"
14056 #include "confdefs.h"
14057 /* pthread test headers */
14058 #include <pthread.h>
14059 #if HAVE_PTHREADS < 7
14060 #include <errno.h>
14061 #endif
14062 #ifndef NULL
14063 #define NULL (void*)0
14064 #endif
14065
14066 static void *task(p)
14067         void *p;
14068 {
14069         return (void *) (p == NULL);
14070 }
14071
14072 int main() {
14073
14074         /* pthread test function */
14075 #ifndef PTHREAD_CREATE_DETACHED
14076 #define PTHREAD_CREATE_DETACHED 1
14077 #endif
14078         pthread_t t;
14079         int status;
14080         int detach = PTHREAD_CREATE_DETACHED;
14081
14082 #if HAVE_PTHREADS > 4
14083         /* Final pthreads */
14084         pthread_attr_t attr;
14085
14086         status = pthread_attr_init(&attr);
14087         if( status ) return status;
14088
14089 #if HAVE_PTHREADS < 7
14090         status = pthread_attr_setdetachstate(&attr, &detach);
14091         if( status < 0 ) status = errno;
14092 #else
14093         status = pthread_attr_setdetachstate(&attr, detach);
14094 #endif
14095         if( status ) return status;
14096         status = pthread_create( &t, &attr, task, NULL );
14097 #if HAVE_PTHREADS < 7
14098         if( status < 0 ) status = errno;
14099 #endif
14100         if( status ) return status;
14101 #else
14102         /* Draft 4 pthreads */
14103         status = pthread_create( &t, pthread_attr_default, task, NULL );
14104         if( status ) return errno;
14105
14106         /* give thread a chance to complete */
14107         /* it should remain joinable and hence detachable */
14108         sleep( 1 );
14109
14110         status = pthread_detach( &t );
14111         if( status ) return errno;
14112 #endif
14113
14114 #ifdef HAVE_LINUX_THREADS
14115         pthread_kill_other_threads_np();
14116 #endif
14117
14118         return 0;
14119
14120 ; return 0; }
14121 EOF
14122 if { (eval echo configure:14123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14123   rm -rf conftest*
14124   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14125 else
14126   echo "configure: failed program was:" >&5
14127   cat conftest.$ac_ext >&5
14128   rm -rf conftest*
14129   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14130 fi
14131 rm -f conftest*
14132 else
14133   cat > conftest.$ac_ext <<EOF
14134 #line 14135 "configure"
14135 #include "confdefs.h"
14136 /* pthread test headers */
14137 #include <pthread.h>
14138 #if HAVE_PTHREADS < 7
14139 #include <errno.h>
14140 #endif
14141 #ifndef NULL
14142 #define NULL (void*)0
14143 #endif
14144
14145 static void *task(p)
14146         void *p;
14147 {
14148         return (void *) (p == NULL);
14149 }
14150
14151
14152 int main(argc, argv)
14153         int argc;
14154         char **argv;
14155 {
14156
14157         /* pthread test function */
14158 #ifndef PTHREAD_CREATE_DETACHED
14159 #define PTHREAD_CREATE_DETACHED 1
14160 #endif
14161         pthread_t t;
14162         int status;
14163         int detach = PTHREAD_CREATE_DETACHED;
14164
14165 #if HAVE_PTHREADS > 4
14166         /* Final pthreads */
14167         pthread_attr_t attr;
14168
14169         status = pthread_attr_init(&attr);
14170         if( status ) return status;
14171
14172 #if HAVE_PTHREADS < 7
14173         status = pthread_attr_setdetachstate(&attr, &detach);
14174         if( status < 0 ) status = errno;
14175 #else
14176         status = pthread_attr_setdetachstate(&attr, detach);
14177 #endif
14178         if( status ) return status;
14179         status = pthread_create( &t, &attr, task, NULL );
14180 #if HAVE_PTHREADS < 7
14181         if( status < 0 ) status = errno;
14182 #endif
14183         if( status ) return status;
14184 #else
14185         /* Draft 4 pthreads */
14186         status = pthread_create( &t, pthread_attr_default, task, NULL );
14187         if( status ) return errno;
14188
14189         /* give thread a chance to complete */
14190         /* it should remain joinable and hence detachable */
14191         sleep( 1 );
14192
14193         status = pthread_detach( &t );
14194         if( status ) return errno;
14195 #endif
14196
14197 #ifdef HAVE_LINUX_THREADS
14198         pthread_kill_other_threads_np();
14199 #endif
14200
14201         return 0;
14202
14203 }
14204
14205 EOF
14206 if { (eval echo configure:14207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14207 then
14208   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14209 else
14210   echo "configure: failed program was:" >&5
14211   cat conftest.$ac_ext >&5
14212   rm -fr conftest*
14213   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14214 fi
14215 rm -fr conftest*
14216 fi
14217
14218
14219                 # restore the LIBS
14220                 LIBS="$ol_LIBS"
14221         
14222 fi
14223
14224 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14225
14226         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14227                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14228                 ol_link_threads=posix
14229         fi
14230 fi
14231
14232                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14233 if test "$ol_link_threads" = no ; then
14234         # try -lpthreads -lmach -lexc
14235         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14236 echo "configure:14237: checking for pthread link with -lpthreads -lmach -lexc" >&5
14237 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14238   echo $ac_n "(cached) $ac_c" 1>&6
14239 else
14240   
14241                 # save the flags
14242                 ol_LIBS="$LIBS"
14243                 LIBS="-lpthreads -lmach -lexc $LIBS"
14244
14245                 if test "$cross_compiling" = yes; then
14246   cat > conftest.$ac_ext <<EOF
14247 #line 14248 "configure"
14248 #include "confdefs.h"
14249 /* pthread test headers */
14250 #include <pthread.h>
14251 #if HAVE_PTHREADS < 7
14252 #include <errno.h>
14253 #endif
14254 #ifndef NULL
14255 #define NULL (void*)0
14256 #endif
14257
14258 static void *task(p)
14259         void *p;
14260 {
14261         return (void *) (p == NULL);
14262 }
14263
14264 int main() {
14265
14266         /* pthread test function */
14267 #ifndef PTHREAD_CREATE_DETACHED
14268 #define PTHREAD_CREATE_DETACHED 1
14269 #endif
14270         pthread_t t;
14271         int status;
14272         int detach = PTHREAD_CREATE_DETACHED;
14273
14274 #if HAVE_PTHREADS > 4
14275         /* Final pthreads */
14276         pthread_attr_t attr;
14277
14278         status = pthread_attr_init(&attr);
14279         if( status ) return status;
14280
14281 #if HAVE_PTHREADS < 7
14282         status = pthread_attr_setdetachstate(&attr, &detach);
14283         if( status < 0 ) status = errno;
14284 #else
14285         status = pthread_attr_setdetachstate(&attr, detach);
14286 #endif
14287         if( status ) return status;
14288         status = pthread_create( &t, &attr, task, NULL );
14289 #if HAVE_PTHREADS < 7
14290         if( status < 0 ) status = errno;
14291 #endif
14292         if( status ) return status;
14293 #else
14294         /* Draft 4 pthreads */
14295         status = pthread_create( &t, pthread_attr_default, task, NULL );
14296         if( status ) return errno;
14297
14298         /* give thread a chance to complete */
14299         /* it should remain joinable and hence detachable */
14300         sleep( 1 );
14301
14302         status = pthread_detach( &t );
14303         if( status ) return errno;
14304 #endif
14305
14306 #ifdef HAVE_LINUX_THREADS
14307         pthread_kill_other_threads_np();
14308 #endif
14309
14310         return 0;
14311
14312 ; return 0; }
14313 EOF
14314 if { (eval echo configure:14315: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14315   rm -rf conftest*
14316   ol_cv_pthread_lpthreads_lmach_lexc=yes
14317 else
14318   echo "configure: failed program was:" >&5
14319   cat conftest.$ac_ext >&5
14320   rm -rf conftest*
14321   ol_cv_pthread_lpthreads_lmach_lexc=no
14322 fi
14323 rm -f conftest*
14324 else
14325   cat > conftest.$ac_ext <<EOF
14326 #line 14327 "configure"
14327 #include "confdefs.h"
14328 /* pthread test headers */
14329 #include <pthread.h>
14330 #if HAVE_PTHREADS < 7
14331 #include <errno.h>
14332 #endif
14333 #ifndef NULL
14334 #define NULL (void*)0
14335 #endif
14336
14337 static void *task(p)
14338         void *p;
14339 {
14340         return (void *) (p == NULL);
14341 }
14342
14343
14344 int main(argc, argv)
14345         int argc;
14346         char **argv;
14347 {
14348
14349         /* pthread test function */
14350 #ifndef PTHREAD_CREATE_DETACHED
14351 #define PTHREAD_CREATE_DETACHED 1
14352 #endif
14353         pthread_t t;
14354         int status;
14355         int detach = PTHREAD_CREATE_DETACHED;
14356
14357 #if HAVE_PTHREADS > 4
14358         /* Final pthreads */
14359         pthread_attr_t attr;
14360
14361         status = pthread_attr_init(&attr);
14362         if( status ) return status;
14363
14364 #if HAVE_PTHREADS < 7
14365         status = pthread_attr_setdetachstate(&attr, &detach);
14366         if( status < 0 ) status = errno;
14367 #else
14368         status = pthread_attr_setdetachstate(&attr, detach);
14369 #endif
14370         if( status ) return status;
14371         status = pthread_create( &t, &attr, task, NULL );
14372 #if HAVE_PTHREADS < 7
14373         if( status < 0 ) status = errno;
14374 #endif
14375         if( status ) return status;
14376 #else
14377         /* Draft 4 pthreads */
14378         status = pthread_create( &t, pthread_attr_default, task, NULL );
14379         if( status ) return errno;
14380
14381         /* give thread a chance to complete */
14382         /* it should remain joinable and hence detachable */
14383         sleep( 1 );
14384
14385         status = pthread_detach( &t );
14386         if( status ) return errno;
14387 #endif
14388
14389 #ifdef HAVE_LINUX_THREADS
14390         pthread_kill_other_threads_np();
14391 #endif
14392
14393         return 0;
14394
14395 }
14396
14397 EOF
14398 if { (eval echo configure:14399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14399 then
14400   ol_cv_pthread_lpthreads_lmach_lexc=yes
14401 else
14402   echo "configure: failed program was:" >&5
14403   cat conftest.$ac_ext >&5
14404   rm -fr conftest*
14405   ol_cv_pthread_lpthreads_lmach_lexc=no
14406 fi
14407 rm -fr conftest*
14408 fi
14409
14410
14411                 # restore the LIBS
14412                 LIBS="$ol_LIBS"
14413         
14414 fi
14415
14416 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14417
14418         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14419                 ol_link_pthreads="-lpthreads -lmach -lexc"
14420                 ol_link_threads=posix
14421         fi
14422 fi
14423
14424                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14425 if test "$ol_link_threads" = no ; then
14426         # try -lpthreads -lexc
14427         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14428 echo "configure:14429: checking for pthread link with -lpthreads -lexc" >&5
14429 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14430   echo $ac_n "(cached) $ac_c" 1>&6
14431 else
14432   
14433                 # save the flags
14434                 ol_LIBS="$LIBS"
14435                 LIBS="-lpthreads -lexc $LIBS"
14436
14437                 if test "$cross_compiling" = yes; then
14438   cat > conftest.$ac_ext <<EOF
14439 #line 14440 "configure"
14440 #include "confdefs.h"
14441 /* pthread test headers */
14442 #include <pthread.h>
14443 #if HAVE_PTHREADS < 7
14444 #include <errno.h>
14445 #endif
14446 #ifndef NULL
14447 #define NULL (void*)0
14448 #endif
14449
14450 static void *task(p)
14451         void *p;
14452 {
14453         return (void *) (p == NULL);
14454 }
14455
14456 int main() {
14457
14458         /* pthread test function */
14459 #ifndef PTHREAD_CREATE_DETACHED
14460 #define PTHREAD_CREATE_DETACHED 1
14461 #endif
14462         pthread_t t;
14463         int status;
14464         int detach = PTHREAD_CREATE_DETACHED;
14465
14466 #if HAVE_PTHREADS > 4
14467         /* Final pthreads */
14468         pthread_attr_t attr;
14469
14470         status = pthread_attr_init(&attr);
14471         if( status ) return status;
14472
14473 #if HAVE_PTHREADS < 7
14474         status = pthread_attr_setdetachstate(&attr, &detach);
14475         if( status < 0 ) status = errno;
14476 #else
14477         status = pthread_attr_setdetachstate(&attr, detach);
14478 #endif
14479         if( status ) return status;
14480         status = pthread_create( &t, &attr, task, NULL );
14481 #if HAVE_PTHREADS < 7
14482         if( status < 0 ) status = errno;
14483 #endif
14484         if( status ) return status;
14485 #else
14486         /* Draft 4 pthreads */
14487         status = pthread_create( &t, pthread_attr_default, task, NULL );
14488         if( status ) return errno;
14489
14490         /* give thread a chance to complete */
14491         /* it should remain joinable and hence detachable */
14492         sleep( 1 );
14493
14494         status = pthread_detach( &t );
14495         if( status ) return errno;
14496 #endif
14497
14498 #ifdef HAVE_LINUX_THREADS
14499         pthread_kill_other_threads_np();
14500 #endif
14501
14502         return 0;
14503
14504 ; return 0; }
14505 EOF
14506 if { (eval echo configure:14507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14507   rm -rf conftest*
14508   ol_cv_pthread_lpthreads_lexc=yes
14509 else
14510   echo "configure: failed program was:" >&5
14511   cat conftest.$ac_ext >&5
14512   rm -rf conftest*
14513   ol_cv_pthread_lpthreads_lexc=no
14514 fi
14515 rm -f conftest*
14516 else
14517   cat > conftest.$ac_ext <<EOF
14518 #line 14519 "configure"
14519 #include "confdefs.h"
14520 /* pthread test headers */
14521 #include <pthread.h>
14522 #if HAVE_PTHREADS < 7
14523 #include <errno.h>
14524 #endif
14525 #ifndef NULL
14526 #define NULL (void*)0
14527 #endif
14528
14529 static void *task(p)
14530         void *p;
14531 {
14532         return (void *) (p == NULL);
14533 }
14534
14535
14536 int main(argc, argv)
14537         int argc;
14538         char **argv;
14539 {
14540
14541         /* pthread test function */
14542 #ifndef PTHREAD_CREATE_DETACHED
14543 #define PTHREAD_CREATE_DETACHED 1
14544 #endif
14545         pthread_t t;
14546         int status;
14547         int detach = PTHREAD_CREATE_DETACHED;
14548
14549 #if HAVE_PTHREADS > 4
14550         /* Final pthreads */
14551         pthread_attr_t attr;
14552
14553         status = pthread_attr_init(&attr);
14554         if( status ) return status;
14555
14556 #if HAVE_PTHREADS < 7
14557         status = pthread_attr_setdetachstate(&attr, &detach);
14558         if( status < 0 ) status = errno;
14559 #else
14560         status = pthread_attr_setdetachstate(&attr, detach);
14561 #endif
14562         if( status ) return status;
14563         status = pthread_create( &t, &attr, task, NULL );
14564 #if HAVE_PTHREADS < 7
14565         if( status < 0 ) status = errno;
14566 #endif
14567         if( status ) return status;
14568 #else
14569         /* Draft 4 pthreads */
14570         status = pthread_create( &t, pthread_attr_default, task, NULL );
14571         if( status ) return errno;
14572
14573         /* give thread a chance to complete */
14574         /* it should remain joinable and hence detachable */
14575         sleep( 1 );
14576
14577         status = pthread_detach( &t );
14578         if( status ) return errno;
14579 #endif
14580
14581 #ifdef HAVE_LINUX_THREADS
14582         pthread_kill_other_threads_np();
14583 #endif
14584
14585         return 0;
14586
14587 }
14588
14589 EOF
14590 if { (eval echo configure:14591: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14591 then
14592   ol_cv_pthread_lpthreads_lexc=yes
14593 else
14594   echo "configure: failed program was:" >&5
14595   cat conftest.$ac_ext >&5
14596   rm -fr conftest*
14597   ol_cv_pthread_lpthreads_lexc=no
14598 fi
14599 rm -fr conftest*
14600 fi
14601
14602
14603                 # restore the LIBS
14604                 LIBS="$ol_LIBS"
14605         
14606 fi
14607
14608 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14609
14610         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14611                 ol_link_pthreads="-lpthreads -lexc"
14612                 ol_link_threads=posix
14613         fi
14614 fi
14615
14616
14617                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14618 if test "$ol_link_threads" = no ; then
14619         # try -lpthreads
14620         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14621 echo "configure:14622: checking for pthread link with -lpthreads" >&5
14622 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14623   echo $ac_n "(cached) $ac_c" 1>&6
14624 else
14625   
14626                 # save the flags
14627                 ol_LIBS="$LIBS"
14628                 LIBS="-lpthreads $LIBS"
14629
14630                 if test "$cross_compiling" = yes; then
14631   cat > conftest.$ac_ext <<EOF
14632 #line 14633 "configure"
14633 #include "confdefs.h"
14634 /* pthread test headers */
14635 #include <pthread.h>
14636 #if HAVE_PTHREADS < 7
14637 #include <errno.h>
14638 #endif
14639 #ifndef NULL
14640 #define NULL (void*)0
14641 #endif
14642
14643 static void *task(p)
14644         void *p;
14645 {
14646         return (void *) (p == NULL);
14647 }
14648
14649 int main() {
14650
14651         /* pthread test function */
14652 #ifndef PTHREAD_CREATE_DETACHED
14653 #define PTHREAD_CREATE_DETACHED 1
14654 #endif
14655         pthread_t t;
14656         int status;
14657         int detach = PTHREAD_CREATE_DETACHED;
14658
14659 #if HAVE_PTHREADS > 4
14660         /* Final pthreads */
14661         pthread_attr_t attr;
14662
14663         status = pthread_attr_init(&attr);
14664         if( status ) return status;
14665
14666 #if HAVE_PTHREADS < 7
14667         status = pthread_attr_setdetachstate(&attr, &detach);
14668         if( status < 0 ) status = errno;
14669 #else
14670         status = pthread_attr_setdetachstate(&attr, detach);
14671 #endif
14672         if( status ) return status;
14673         status = pthread_create( &t, &attr, task, NULL );
14674 #if HAVE_PTHREADS < 7
14675         if( status < 0 ) status = errno;
14676 #endif
14677         if( status ) return status;
14678 #else
14679         /* Draft 4 pthreads */
14680         status = pthread_create( &t, pthread_attr_default, task, NULL );
14681         if( status ) return errno;
14682
14683         /* give thread a chance to complete */
14684         /* it should remain joinable and hence detachable */
14685         sleep( 1 );
14686
14687         status = pthread_detach( &t );
14688         if( status ) return errno;
14689 #endif
14690
14691 #ifdef HAVE_LINUX_THREADS
14692         pthread_kill_other_threads_np();
14693 #endif
14694
14695         return 0;
14696
14697 ; return 0; }
14698 EOF
14699 if { (eval echo configure:14700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14700   rm -rf conftest*
14701   ol_cv_pthread_lib_lpthreads=yes
14702 else
14703   echo "configure: failed program was:" >&5
14704   cat conftest.$ac_ext >&5
14705   rm -rf conftest*
14706   ol_cv_pthread_lib_lpthreads=no
14707 fi
14708 rm -f conftest*
14709 else
14710   cat > conftest.$ac_ext <<EOF
14711 #line 14712 "configure"
14712 #include "confdefs.h"
14713 /* pthread test headers */
14714 #include <pthread.h>
14715 #if HAVE_PTHREADS < 7
14716 #include <errno.h>
14717 #endif
14718 #ifndef NULL
14719 #define NULL (void*)0
14720 #endif
14721
14722 static void *task(p)
14723         void *p;
14724 {
14725         return (void *) (p == NULL);
14726 }
14727
14728
14729 int main(argc, argv)
14730         int argc;
14731         char **argv;
14732 {
14733
14734         /* pthread test function */
14735 #ifndef PTHREAD_CREATE_DETACHED
14736 #define PTHREAD_CREATE_DETACHED 1
14737 #endif
14738         pthread_t t;
14739         int status;
14740         int detach = PTHREAD_CREATE_DETACHED;
14741
14742 #if HAVE_PTHREADS > 4
14743         /* Final pthreads */
14744         pthread_attr_t attr;
14745
14746         status = pthread_attr_init(&attr);
14747         if( status ) return status;
14748
14749 #if HAVE_PTHREADS < 7
14750         status = pthread_attr_setdetachstate(&attr, &detach);
14751         if( status < 0 ) status = errno;
14752 #else
14753         status = pthread_attr_setdetachstate(&attr, detach);
14754 #endif
14755         if( status ) return status;
14756         status = pthread_create( &t, &attr, task, NULL );
14757 #if HAVE_PTHREADS < 7
14758         if( status < 0 ) status = errno;
14759 #endif
14760         if( status ) return status;
14761 #else
14762         /* Draft 4 pthreads */
14763         status = pthread_create( &t, pthread_attr_default, task, NULL );
14764         if( status ) return errno;
14765
14766         /* give thread a chance to complete */
14767         /* it should remain joinable and hence detachable */
14768         sleep( 1 );
14769
14770         status = pthread_detach( &t );
14771         if( status ) return errno;
14772 #endif
14773
14774 #ifdef HAVE_LINUX_THREADS
14775         pthread_kill_other_threads_np();
14776 #endif
14777
14778         return 0;
14779
14780 }
14781
14782 EOF
14783 if { (eval echo configure:14784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14784 then
14785   ol_cv_pthread_lib_lpthreads=yes
14786 else
14787   echo "configure: failed program was:" >&5
14788   cat conftest.$ac_ext >&5
14789   rm -fr conftest*
14790   ol_cv_pthread_lib_lpthreads=no
14791 fi
14792 rm -fr conftest*
14793 fi
14794
14795
14796                 # restore the LIBS
14797                 LIBS="$ol_LIBS"
14798         
14799 fi
14800
14801 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14802
14803         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14804                 ol_link_pthreads="-lpthreads"
14805                 ol_link_threads=posix
14806         fi
14807 fi
14808
14809
14810                 if test $ol_link_threads != no ; then
14811                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14812
14813                                                 save_CPPFLAGS="$CPPFLAGS"
14814                         save_LIBS="$LIBS"
14815                         LIBS="$LTHREAD_LIBS $LIBS"
14816
14817                                                                                                 for ac_func in sched_yield pthread_yield thr_yield
14818 do
14819 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14820 echo "configure:14821: checking for $ac_func" >&5
14821 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14822   echo $ac_n "(cached) $ac_c" 1>&6
14823 else
14824   cat > conftest.$ac_ext <<EOF
14825 #line 14826 "configure"
14826 #include "confdefs.h"
14827 /* System header to define __stub macros and hopefully few prototypes,
14828     which can conflict with char $ac_func(); below.  */
14829 #include <assert.h>
14830 /* Override any gcc2 internal prototype to avoid an error.  */
14831 /* We use char because int might match the return type of a gcc2
14832     builtin and then its argument prototype would still apply.  */
14833 char $ac_func();
14834 char (*f)();
14835
14836 int main() {
14837
14838 /* The GNU C library defines this for functions which it implements
14839     to always fail with ENOSYS.  Some functions are actually named
14840     something starting with __ and the normal name is an alias.  */
14841 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14842 choke me
14843 #else
14844 f = $ac_func;
14845 #endif
14846
14847 ; return 0; }
14848 EOF
14849 if { (eval echo configure:14850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14850   rm -rf conftest*
14851   eval "ac_cv_func_$ac_func=yes"
14852 else
14853   echo "configure: failed program was:" >&5
14854   cat conftest.$ac_ext >&5
14855   rm -rf conftest*
14856   eval "ac_cv_func_$ac_func=no"
14857 fi
14858 rm -f conftest*
14859 fi
14860
14861 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14862   echo "$ac_t""yes" 1>&6
14863     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14864   cat >> confdefs.h <<EOF
14865 #define $ac_tr_func 1
14866 EOF
14867  
14868 else
14869   echo "$ac_t""no" 1>&6
14870 fi
14871 done
14872
14873
14874                         if test $ac_cv_func_sched_yield = no -a \
14875                                 $ac_cv_func_pthread_yield = no -a \
14876                                 $ac_cv_func_thr_yield = no ; then
14877                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
14878 echo "configure:14879: checking for sched_yield in -lrt" >&5
14879 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
14880 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
14881   echo $ac_n "(cached) $ac_c" 1>&6
14882 else
14883   ac_save_LIBS="$LIBS"
14884 LIBS="-lrt  $LIBS"
14885 cat > conftest.$ac_ext <<EOF
14886 #line 14887 "configure"
14887 #include "confdefs.h"
14888 /* Override any gcc2 internal prototype to avoid an error.  */
14889 /* We use char because int might match the return type of a gcc2
14890     builtin and then its argument prototype would still apply.  */
14891 char sched_yield();
14892
14893 int main() {
14894 sched_yield()
14895 ; return 0; }
14896 EOF
14897 if { (eval echo configure:14898: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14898   rm -rf conftest*
14899   eval "ac_cv_lib_$ac_lib_var=yes"
14900 else
14901   echo "configure: failed program was:" >&5
14902   cat conftest.$ac_ext >&5
14903   rm -rf conftest*
14904   eval "ac_cv_lib_$ac_lib_var=no"
14905 fi
14906 rm -f conftest*
14907 LIBS="$ac_save_LIBS"
14908
14909 fi
14910 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
14911   echo "$ac_t""yes" 1>&6
14912   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
14913                                         cat >> confdefs.h <<\EOF
14914 #define HAVE_SCHED_YIELD 1
14915 EOF
14916
14917                                         ac_cv_func_sched_yield=yes
14918 else
14919   echo "$ac_t""no" 1>&6
14920 ac_cv_func_sched_yield=no
14921 fi
14922
14923                         fi
14924                         if test $ac_cv_func_sched_yield = no -a \
14925                                 $ac_cv_func_pthread_yield = no -a \
14926                                 "$ac_cv_func_thr_yield" = no ; then
14927                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
14928                         fi
14929
14930                                                 for ac_func in pthread_kill pthread_rwlock_destroy
14931 do
14932 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14933 echo "configure:14934: checking for $ac_func" >&5
14934 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14935   echo $ac_n "(cached) $ac_c" 1>&6
14936 else
14937   cat > conftest.$ac_ext <<EOF
14938 #line 14939 "configure"
14939 #include "confdefs.h"
14940 /* System header to define __stub macros and hopefully few prototypes,
14941     which can conflict with char $ac_func(); below.  */
14942 #include <assert.h>
14943 /* Override any gcc2 internal prototype to avoid an error.  */
14944 /* We use char because int might match the return type of a gcc2
14945     builtin and then its argument prototype would still apply.  */
14946 char $ac_func();
14947 char (*f)();
14948
14949 int main() {
14950
14951 /* The GNU C library defines this for functions which it implements
14952     to always fail with ENOSYS.  Some functions are actually named
14953     something starting with __ and the normal name is an alias.  */
14954 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14955 choke me
14956 #else
14957 f = $ac_func;
14958 #endif
14959
14960 ; return 0; }
14961 EOF
14962 if { (eval echo configure:14963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14963   rm -rf conftest*
14964   eval "ac_cv_func_$ac_func=yes"
14965 else
14966   echo "configure: failed program was:" >&5
14967   cat conftest.$ac_ext >&5
14968   rm -rf conftest*
14969   eval "ac_cv_func_$ac_func=no"
14970 fi
14971 rm -f conftest*
14972 fi
14973
14974 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
14975   echo "$ac_t""yes" 1>&6
14976     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
14977   cat >> confdefs.h <<EOF
14978 #define $ac_tr_func 1
14979 EOF
14980  
14981 else
14982   echo "$ac_t""no" 1>&6
14983 fi
14984 done
14985
14986
14987                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
14988 echo "configure:14989: checking for pthread_detach with <pthread.h>" >&5
14989 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
14990   echo $ac_n "(cached) $ac_c" 1>&6
14991 else
14992   
14993                                                                 cat > conftest.$ac_ext <<EOF
14994 #line 14995 "configure"
14995 #include "confdefs.h"
14996
14997 #include <pthread.h>
14998 #ifndef NULL
14999 #define NULL (void*)0
15000 #endif
15001
15002 int main() {
15003 pthread_detach(NULL);
15004 ; return 0; }
15005 EOF
15006 if { (eval echo configure:15007: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15007   rm -rf conftest*
15008   ol_cv_func_pthread_detach=yes
15009 else
15010   echo "configure: failed program was:" >&5
15011   cat conftest.$ac_ext >&5
15012   rm -rf conftest*
15013   ol_cv_func_pthread_detach=no
15014 fi
15015 rm -f conftest*
15016                         
15017 fi
15018
15019 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15020
15021                         if test $ol_cv_func_pthread_detach = no ; then
15022                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15023                         fi
15024
15025                         cat >> confdefs.h <<\EOF
15026 #define HAVE_PTHREAD_DETACH 1
15027 EOF
15028
15029
15030                                                 for ac_func in \
15031                                 pthread_setconcurrency \
15032                                 pthread_getconcurrency \
15033                                 thr_setconcurrency \
15034                                 thr_getconcurrency \
15035                         
15036 do
15037 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15038 echo "configure:15039: checking for $ac_func" >&5
15039 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15040   echo $ac_n "(cached) $ac_c" 1>&6
15041 else
15042   cat > conftest.$ac_ext <<EOF
15043 #line 15044 "configure"
15044 #include "confdefs.h"
15045 /* System header to define __stub macros and hopefully few prototypes,
15046     which can conflict with char $ac_func(); below.  */
15047 #include <assert.h>
15048 /* Override any gcc2 internal prototype to avoid an error.  */
15049 /* We use char because int might match the return type of a gcc2
15050     builtin and then its argument prototype would still apply.  */
15051 char $ac_func();
15052 char (*f)();
15053
15054 int main() {
15055
15056 /* The GNU C library defines this for functions which it implements
15057     to always fail with ENOSYS.  Some functions are actually named
15058     something starting with __ and the normal name is an alias.  */
15059 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15060 choke me
15061 #else
15062 f = $ac_func;
15063 #endif
15064
15065 ; return 0; }
15066 EOF
15067 if { (eval echo configure:15068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15068   rm -rf conftest*
15069   eval "ac_cv_func_$ac_func=yes"
15070 else
15071   echo "configure: failed program was:" >&5
15072   cat conftest.$ac_ext >&5
15073   rm -rf conftest*
15074   eval "ac_cv_func_$ac_func=no"
15075 fi
15076 rm -f conftest*
15077 fi
15078
15079 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15080   echo "$ac_t""yes" 1>&6
15081     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15082   cat >> confdefs.h <<EOF
15083 #define $ac_tr_func 1
15084 EOF
15085  
15086 else
15087   echo "$ac_t""no" 1>&6
15088 fi
15089 done
15090
15091
15092                         
15093         for ac_func in pthread_kill_other_threads_np
15094 do
15095 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15096 echo "configure:15097: checking for $ac_func" >&5
15097 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15098   echo $ac_n "(cached) $ac_c" 1>&6
15099 else
15100   cat > conftest.$ac_ext <<EOF
15101 #line 15102 "configure"
15102 #include "confdefs.h"
15103 /* System header to define __stub macros and hopefully few prototypes,
15104     which can conflict with char $ac_func(); below.  */
15105 #include <assert.h>
15106 /* Override any gcc2 internal prototype to avoid an error.  */
15107 /* We use char because int might match the return type of a gcc2
15108     builtin and then its argument prototype would still apply.  */
15109 char $ac_func();
15110 char (*f)();
15111
15112 int main() {
15113
15114 /* The GNU C library defines this for functions which it implements
15115     to always fail with ENOSYS.  Some functions are actually named
15116     something starting with __ and the normal name is an alias.  */
15117 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15118 choke me
15119 #else
15120 f = $ac_func;
15121 #endif
15122
15123 ; return 0; }
15124 EOF
15125 if { (eval echo configure:15126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15126   rm -rf conftest*
15127   eval "ac_cv_func_$ac_func=yes"
15128 else
15129   echo "configure: failed program was:" >&5
15130   cat conftest.$ac_ext >&5
15131   rm -rf conftest*
15132   eval "ac_cv_func_$ac_func=no"
15133 fi
15134 rm -f conftest*
15135 fi
15136
15137 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15138   echo "$ac_t""yes" 1>&6
15139     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15140   cat >> confdefs.h <<EOF
15141 #define $ac_tr_func 1
15142 EOF
15143  
15144 else
15145   echo "$ac_t""no" 1>&6
15146 fi
15147 done
15148
15149         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15150 echo "configure:15151: checking for LinuxThreads implementation" >&5
15151 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15152   echo $ac_n "(cached) $ac_c" 1>&6
15153 else
15154   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15155 fi
15156
15157 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15158
15159                         
15160         
15161         
15162         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15163 echo "configure:15164: checking for LinuxThreads consistency" >&5
15164 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15165   echo $ac_n "(cached) $ac_c" 1>&6
15166 else
15167   
15168                 if test $ol_cv_header_linux_threads = yes -a \
15169                         $ol_cv_sys_linux_threads = yes; then
15170                         ol_cv_linux_threads=yes
15171                 elif test $ol_cv_header_linux_threads = no -a \
15172                         $ol_cv_sys_linux_threads = no; then
15173                         ol_cv_linux_threads=no
15174                 else
15175                         ol_cv_linux_threads=error
15176                 fi
15177         
15178 fi
15179
15180 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15181
15182
15183                         if test $ol_cv_linux_threads = error; then
15184                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15185                         fi
15186
15187                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15188 echo "configure:15189: checking if pthread_create() works" >&5
15189 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15190   echo $ac_n "(cached) $ac_c" 1>&6
15191 else
15192   
15193                         if test "$cross_compiling" = yes; then
15194                                 ol_cv_pthread_create_works=yes
15195 else
15196   cat > conftest.$ac_ext <<EOF
15197 #line 15198 "configure"
15198 #include "confdefs.h"
15199 /* pthread test headers */
15200 #include <pthread.h>
15201 #if HAVE_PTHREADS < 7
15202 #include <errno.h>
15203 #endif
15204 #ifndef NULL
15205 #define NULL (void*)0
15206 #endif
15207
15208 static void *task(p)
15209         void *p;
15210 {
15211         return (void *) (p == NULL);
15212 }
15213
15214
15215 int main(argc, argv)
15216         int argc;
15217         char **argv;
15218 {
15219
15220         /* pthread test function */
15221 #ifndef PTHREAD_CREATE_DETACHED
15222 #define PTHREAD_CREATE_DETACHED 1
15223 #endif
15224         pthread_t t;
15225         int status;
15226         int detach = PTHREAD_CREATE_DETACHED;
15227
15228 #if HAVE_PTHREADS > 4
15229         /* Final pthreads */
15230         pthread_attr_t attr;
15231
15232         status = pthread_attr_init(&attr);
15233         if( status ) return status;
15234
15235 #if HAVE_PTHREADS < 7
15236         status = pthread_attr_setdetachstate(&attr, &detach);
15237         if( status < 0 ) status = errno;
15238 #else
15239         status = pthread_attr_setdetachstate(&attr, detach);
15240 #endif
15241         if( status ) return status;
15242         status = pthread_create( &t, &attr, task, NULL );
15243 #if HAVE_PTHREADS < 7
15244         if( status < 0 ) status = errno;
15245 #endif
15246         if( status ) return status;
15247 #else
15248         /* Draft 4 pthreads */
15249         status = pthread_create( &t, pthread_attr_default, task, NULL );
15250         if( status ) return errno;
15251
15252         /* give thread a chance to complete */
15253         /* it should remain joinable and hence detachable */
15254         sleep( 1 );
15255
15256         status = pthread_detach( &t );
15257         if( status ) return errno;
15258 #endif
15259
15260 #ifdef HAVE_LINUX_THREADS
15261         pthread_kill_other_threads_np();
15262 #endif
15263
15264         return 0;
15265
15266 }
15267
15268 EOF
15269 if { (eval echo configure:15270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15270 then
15271   ol_cv_pthread_create_works=yes
15272 else
15273   echo "configure: failed program was:" >&5
15274   cat conftest.$ac_ext >&5
15275   rm -fr conftest*
15276   ol_cv_pthread_create_works=no
15277 fi
15278 rm -fr conftest*
15279 fi
15280
15281 fi
15282
15283 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15284
15285                         if test $ol_cv_pthread_create_works = no ; then
15286                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15287                         fi
15288
15289                                                 if test $ol_with_yielding_select = auto ; then
15290                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15291 echo "configure:15292: checking if select yields when using pthreads" >&5
15292 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15293   echo $ac_n "(cached) $ac_c" 1>&6
15294 else
15295   
15296                                 if test "$cross_compiling" = yes; then
15297   ol_cv_pthread_select_yields=cross
15298 else
15299   cat > conftest.$ac_ext <<EOF
15300 #line 15301 "configure"
15301 #include "confdefs.h"
15302
15303 #include <sys/types.h>
15304 #include <sys/time.h>
15305 #include <unistd.h>
15306 #include <pthread.h>
15307 #ifndef NULL
15308 #define NULL (void*) 0
15309 #endif
15310
15311 static int fildes[2];
15312
15313 static void *task(p)
15314         void *p;
15315 {
15316         int i;
15317         struct timeval tv;
15318
15319         fd_set rfds;
15320
15321         tv.tv_sec=10;
15322         tv.tv_usec=0;
15323
15324         FD_ZERO(&rfds);
15325         FD_SET(fildes[0], &rfds);
15326
15327         /* we're not interested in any fds */
15328         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15329
15330         if(i < 0) {
15331                 perror("select");
15332                 exit(10);
15333         }
15334
15335         exit(0); /* if we exit here, the select blocked the whole process */
15336 }
15337
15338 int main(argc, argv)
15339         int argc;
15340         char **argv;
15341 {
15342         pthread_t t;
15343
15344         /* create a pipe to select */
15345         if(pipe(&fildes[0])) {
15346                 perror("select");
15347                 exit(1);
15348         }
15349
15350 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15351         (void) pthread_setconcurrency(2);
15352 #else
15353 #ifdef HAVE_THR_SETCONCURRENCY
15354         /* Set Solaris LWP concurrency to 2 */
15355         thr_setconcurrency(2);
15356 #endif
15357 #endif
15358
15359 #if HAVE_PTHREADS < 6
15360         pthread_create(&t, pthread_attr_default, task, NULL);
15361 #else
15362         pthread_create(&t, NULL, task, NULL);
15363 #endif
15364
15365         /* make sure task runs first */
15366 #if HAVE_THR_YIELD
15367         thr_yield();
15368 #elif defined( HAVE_SCHED_YIELD )
15369         sched_yield();
15370 #elif defined( HAVE_PTHREAD_YIELD )
15371         pthread_yield();
15372 #endif
15373
15374         exit(2);
15375 }
15376 EOF
15377 if { (eval echo configure:15378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15378 then
15379   ol_cv_pthread_select_yields=no
15380 else
15381   echo "configure: failed program was:" >&5
15382   cat conftest.$ac_ext >&5
15383   rm -fr conftest*
15384   ol_cv_pthread_select_yields=yes
15385 fi
15386 rm -fr conftest*
15387 fi
15388
15389 fi
15390
15391 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15392
15393                                 if test $ol_cv_pthread_select_yields = cross ; then
15394                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15395                                 fi
15396
15397                                 if test $ol_cv_pthread_select_yields = yes ; then
15398                                         ol_with_yielding_select=yes
15399                                 fi
15400                         fi
15401
15402                                                 CPPFLAGS="$save_CPPFLAGS"
15403                         LIBS="$save_LIBS"
15404                 else
15405                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15406                 fi
15407         fi
15408
15409         if test $ol_with_threads = posix ; then
15410                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15411         fi
15412 fi
15413
15414 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15415         -o $ol_with_threads = mach ; then
15416
15417                 for ac_hdr in mach/cthreads.h cthreads.h
15418 do
15419 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15420 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15421 echo "configure:15422: checking for $ac_hdr" >&5
15422 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15423   echo $ac_n "(cached) $ac_c" 1>&6
15424 else
15425   cat > conftest.$ac_ext <<EOF
15426 #line 15427 "configure"
15427 #include "confdefs.h"
15428 #include <$ac_hdr>
15429 EOF
15430 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15431 { (eval echo configure:15432: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15432 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15433 if test -z "$ac_err"; then
15434   rm -rf conftest*
15435   eval "ac_cv_header_$ac_safe=yes"
15436 else
15437   echo "$ac_err" >&5
15438   echo "configure: failed program was:" >&5
15439   cat conftest.$ac_ext >&5
15440   rm -rf conftest*
15441   eval "ac_cv_header_$ac_safe=no"
15442 fi
15443 rm -f conftest*
15444 fi
15445 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15446   echo "$ac_t""yes" 1>&6
15447     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15448   cat >> confdefs.h <<EOF
15449 #define $ac_tr_hdr 1
15450 EOF
15451  
15452 else
15453   echo "$ac_t""no" 1>&6
15454 fi
15455 done
15456
15457         if test $ac_cv_header_mach_cthreads_h = yes ; then
15458                 ol_with_threads=found
15459
15460                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15461 echo "configure:15462: checking for cthread_fork" >&5
15462 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15463   echo $ac_n "(cached) $ac_c" 1>&6
15464 else
15465   cat > conftest.$ac_ext <<EOF
15466 #line 15467 "configure"
15467 #include "confdefs.h"
15468 /* System header to define __stub macros and hopefully few prototypes,
15469     which can conflict with char cthread_fork(); below.  */
15470 #include <assert.h>
15471 /* Override any gcc2 internal prototype to avoid an error.  */
15472 /* We use char because int might match the return type of a gcc2
15473     builtin and then its argument prototype would still apply.  */
15474 char cthread_fork();
15475 char (*f)();
15476
15477 int main() {
15478
15479 /* The GNU C library defines this for functions which it implements
15480     to always fail with ENOSYS.  Some functions are actually named
15481     something starting with __ and the normal name is an alias.  */
15482 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15483 choke me
15484 #else
15485 f = cthread_fork;
15486 #endif
15487
15488 ; return 0; }
15489 EOF
15490 if { (eval echo configure:15491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15491   rm -rf conftest*
15492   eval "ac_cv_func_cthread_fork=yes"
15493 else
15494   echo "configure: failed program was:" >&5
15495   cat conftest.$ac_ext >&5
15496   rm -rf conftest*
15497   eval "ac_cv_func_cthread_fork=no"
15498 fi
15499 rm -f conftest*
15500 fi
15501
15502 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15503   echo "$ac_t""yes" 1>&6
15504   ol_link_threads=yes
15505 else
15506   echo "$ac_t""no" 1>&6
15507 fi
15508
15509
15510                 if test $ol_link_threads = no ; then
15511                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15512 echo "configure:15513: checking for cthread_fork with -all_load" >&5
15513 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15514   echo $ac_n "(cached) $ac_c" 1>&6
15515 else
15516   
15517                                                                 save_LIBS="$LIBS"
15518                                 LIBS="-all_load $LIBS"
15519                                 cat > conftest.$ac_ext <<EOF
15520 #line 15521 "configure"
15521 #include "confdefs.h"
15522 #include <mach/cthreads.h>
15523 int main() {
15524
15525                                         cthread_fork((void *)0, (void *)0);
15526                                         
15527 ; return 0; }
15528 EOF
15529 if { (eval echo configure:15530: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15530   rm -rf conftest*
15531   ol_cv_cthread_all_load=yes
15532 else
15533   echo "configure: failed program was:" >&5
15534   cat conftest.$ac_ext >&5
15535   rm -rf conftest*
15536   ol_cv_cthread_all_load=no
15537 fi
15538 rm -f conftest*
15539                                                                 LIBS="$save_LIBS"
15540                         
15541 fi
15542
15543 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15544
15545                         if test $ol_cv_cthread_all_load = yes ; then
15546                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15547                                 ol_link_threads=mach
15548                                 ol_with_threads=found
15549                         fi
15550                 fi
15551
15552         elif test $ac_cv_header_cthreads_h = yes ; then
15553                                 
15554                 ol_with_threads=found
15555  
15556                                 save_LIBS="$LIBS"
15557                 LIBS="$LIBS -lthreads"
15558                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15559 echo "configure:15560: checking for cthread_fork" >&5
15560 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15561   echo $ac_n "(cached) $ac_c" 1>&6
15562 else
15563   cat > conftest.$ac_ext <<EOF
15564 #line 15565 "configure"
15565 #include "confdefs.h"
15566 /* System header to define __stub macros and hopefully few prototypes,
15567     which can conflict with char cthread_fork(); below.  */
15568 #include <assert.h>
15569 /* Override any gcc2 internal prototype to avoid an error.  */
15570 /* We use char because int might match the return type of a gcc2
15571     builtin and then its argument prototype would still apply.  */
15572 char cthread_fork();
15573 char (*f)();
15574
15575 int main() {
15576
15577 /* The GNU C library defines this for functions which it implements
15578     to always fail with ENOSYS.  Some functions are actually named
15579     something starting with __ and the normal name is an alias.  */
15580 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15581 choke me
15582 #else
15583 f = cthread_fork;
15584 #endif
15585
15586 ; return 0; }
15587 EOF
15588 if { (eval echo configure:15589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15589   rm -rf conftest*
15590   eval "ac_cv_func_cthread_fork=yes"
15591 else
15592   echo "configure: failed program was:" >&5
15593   cat conftest.$ac_ext >&5
15594   rm -rf conftest*
15595   eval "ac_cv_func_cthread_fork=no"
15596 fi
15597 rm -f conftest*
15598 fi
15599
15600 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15601   echo "$ac_t""yes" 1>&6
15602   ol_link_threads=yes
15603 else
15604   echo "$ac_t""no" 1>&6
15605 fi
15606
15607                 LIBS="$save_LIBS"
15608
15609                 if test $ol_link_threads = yes ; then
15610                         LTHREAD_LIBS="-lthreads"
15611                         ol_link_threads=mach
15612                         ol_with_threads=found
15613                 else
15614                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15615                 fi
15616
15617         elif test $ol_with_threads = mach ; then
15618                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15619         fi
15620
15621         if test $ol_link_threads = mach ; then
15622                 cat >> confdefs.h <<\EOF
15623 #define HAVE_MACH_CTHREADS 1
15624 EOF
15625
15626         elif test $ol_with_threads = found ; then
15627                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15628         fi
15629 fi
15630
15631 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15632         -o $ol_with_threads = pth ; then
15633
15634         for ac_hdr in pth.h
15635 do
15636 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15637 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15638 echo "configure:15639: checking for $ac_hdr" >&5
15639 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15640   echo $ac_n "(cached) $ac_c" 1>&6
15641 else
15642   cat > conftest.$ac_ext <<EOF
15643 #line 15644 "configure"
15644 #include "confdefs.h"
15645 #include <$ac_hdr>
15646 EOF
15647 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15648 { (eval echo configure:15649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15649 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15650 if test -z "$ac_err"; then
15651   rm -rf conftest*
15652   eval "ac_cv_header_$ac_safe=yes"
15653 else
15654   echo "$ac_err" >&5
15655   echo "configure: failed program was:" >&5
15656   cat conftest.$ac_ext >&5
15657   rm -rf conftest*
15658   eval "ac_cv_header_$ac_safe=no"
15659 fi
15660 rm -f conftest*
15661 fi
15662 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15663   echo "$ac_t""yes" 1>&6
15664     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15665   cat >> confdefs.h <<EOF
15666 #define $ac_tr_hdr 1
15667 EOF
15668  
15669 else
15670   echo "$ac_t""no" 1>&6
15671 fi
15672 done
15673
15674
15675         if test $ac_cv_header_pth_h = yes ; then
15676                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15677 echo "configure:15678: checking for pth_version in -lpth" >&5
15678 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15679 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15680   echo $ac_n "(cached) $ac_c" 1>&6
15681 else
15682   ac_save_LIBS="$LIBS"
15683 LIBS="-lpth  $LIBS"
15684 cat > conftest.$ac_ext <<EOF
15685 #line 15686 "configure"
15686 #include "confdefs.h"
15687 /* Override any gcc2 internal prototype to avoid an error.  */
15688 /* We use char because int might match the return type of a gcc2
15689     builtin and then its argument prototype would still apply.  */
15690 char pth_version();
15691
15692 int main() {
15693 pth_version()
15694 ; return 0; }
15695 EOF
15696 if { (eval echo configure:15697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15697   rm -rf conftest*
15698   eval "ac_cv_lib_$ac_lib_var=yes"
15699 else
15700   echo "configure: failed program was:" >&5
15701   cat conftest.$ac_ext >&5
15702   rm -rf conftest*
15703   eval "ac_cv_lib_$ac_lib_var=no"
15704 fi
15705 rm -f conftest*
15706 LIBS="$ac_save_LIBS"
15707
15708 fi
15709 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15710   echo "$ac_t""yes" 1>&6
15711   have_pth=yes
15712 else
15713   echo "$ac_t""no" 1>&6
15714 have_pth=no
15715 fi
15716
15717
15718                 if test $have_pth = yes ; then
15719                         cat >> confdefs.h <<\EOF
15720 #define HAVE_GNU_PTH 1
15721 EOF
15722
15723                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15724                         ol_link_threads=pth
15725                         ol_with_threads=found
15726
15727                         if test $ol_with_yielding_select = auto ; then
15728                                 ol_with_yielding_select=yes
15729                         fi
15730                 fi
15731         fi
15732 fi
15733
15734 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15735         -o $ol_with_threads = lwp ; then
15736
15737                 for ac_hdr in thread.h synch.h
15738 do
15739 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15740 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15741 echo "configure:15742: checking for $ac_hdr" >&5
15742 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15743   echo $ac_n "(cached) $ac_c" 1>&6
15744 else
15745   cat > conftest.$ac_ext <<EOF
15746 #line 15747 "configure"
15747 #include "confdefs.h"
15748 #include <$ac_hdr>
15749 EOF
15750 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15751 { (eval echo configure:15752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15752 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15753 if test -z "$ac_err"; then
15754   rm -rf conftest*
15755   eval "ac_cv_header_$ac_safe=yes"
15756 else
15757   echo "$ac_err" >&5
15758   echo "configure: failed program was:" >&5
15759   cat conftest.$ac_ext >&5
15760   rm -rf conftest*
15761   eval "ac_cv_header_$ac_safe=no"
15762 fi
15763 rm -f conftest*
15764 fi
15765 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15766   echo "$ac_t""yes" 1>&6
15767     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15768   cat >> confdefs.h <<EOF
15769 #define $ac_tr_hdr 1
15770 EOF
15771  
15772 else
15773   echo "$ac_t""no" 1>&6
15774 fi
15775 done
15776
15777         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15778                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15779 echo "configure:15780: checking for thr_create in -lthread" >&5
15780 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15781 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15782   echo $ac_n "(cached) $ac_c" 1>&6
15783 else
15784   ac_save_LIBS="$LIBS"
15785 LIBS="-lthread  $LIBS"
15786 cat > conftest.$ac_ext <<EOF
15787 #line 15788 "configure"
15788 #include "confdefs.h"
15789 /* Override any gcc2 internal prototype to avoid an error.  */
15790 /* We use char because int might match the return type of a gcc2
15791     builtin and then its argument prototype would still apply.  */
15792 char thr_create();
15793
15794 int main() {
15795 thr_create()
15796 ; return 0; }
15797 EOF
15798 if { (eval echo configure:15799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15799   rm -rf conftest*
15800   eval "ac_cv_lib_$ac_lib_var=yes"
15801 else
15802   echo "configure: failed program was:" >&5
15803   cat conftest.$ac_ext >&5
15804   rm -rf conftest*
15805   eval "ac_cv_lib_$ac_lib_var=no"
15806 fi
15807 rm -f conftest*
15808 LIBS="$ac_save_LIBS"
15809
15810 fi
15811 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15812   echo "$ac_t""yes" 1>&6
15813   have_thr=yes
15814 else
15815   echo "$ac_t""no" 1>&6
15816 have_thr=no
15817 fi
15818
15819
15820                 if test $have_thr = yes ; then
15821                         cat >> confdefs.h <<\EOF
15822 #define HAVE_THR 1
15823 EOF
15824
15825                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
15826                         ol_link_threads=thr
15827
15828                         if test $ol_with_yielding_select = auto ; then
15829                                 ol_with_yielding_select=yes
15830                         fi
15831
15832                                                 for ac_func in \
15833                                 thr_setconcurrency \
15834                                 thr_getconcurrency \
15835                         
15836 do
15837 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15838 echo "configure:15839: checking for $ac_func" >&5
15839 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15840   echo $ac_n "(cached) $ac_c" 1>&6
15841 else
15842   cat > conftest.$ac_ext <<EOF
15843 #line 15844 "configure"
15844 #include "confdefs.h"
15845 /* System header to define __stub macros and hopefully few prototypes,
15846     which can conflict with char $ac_func(); below.  */
15847 #include <assert.h>
15848 /* Override any gcc2 internal prototype to avoid an error.  */
15849 /* We use char because int might match the return type of a gcc2
15850     builtin and then its argument prototype would still apply.  */
15851 char $ac_func();
15852 char (*f)();
15853
15854 int main() {
15855
15856 /* The GNU C library defines this for functions which it implements
15857     to always fail with ENOSYS.  Some functions are actually named
15858     something starting with __ and the normal name is an alias.  */
15859 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15860 choke me
15861 #else
15862 f = $ac_func;
15863 #endif
15864
15865 ; return 0; }
15866 EOF
15867 if { (eval echo configure:15868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15868   rm -rf conftest*
15869   eval "ac_cv_func_$ac_func=yes"
15870 else
15871   echo "configure: failed program was:" >&5
15872   cat conftest.$ac_ext >&5
15873   rm -rf conftest*
15874   eval "ac_cv_func_$ac_func=no"
15875 fi
15876 rm -f conftest*
15877 fi
15878
15879 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15880   echo "$ac_t""yes" 1>&6
15881     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15882   cat >> confdefs.h <<EOF
15883 #define $ac_tr_func 1
15884 EOF
15885  
15886 else
15887   echo "$ac_t""no" 1>&6
15888 fi
15889 done
15890
15891                 fi
15892         fi
15893
15894                 for ac_hdr in lwp/lwp.h
15895 do
15896 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15897 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15898 echo "configure:15899: checking for $ac_hdr" >&5
15899 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15900   echo $ac_n "(cached) $ac_c" 1>&6
15901 else
15902   cat > conftest.$ac_ext <<EOF
15903 #line 15904 "configure"
15904 #include "confdefs.h"
15905 #include <$ac_hdr>
15906 EOF
15907 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15908 { (eval echo configure:15909: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15909 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15910 if test -z "$ac_err"; then
15911   rm -rf conftest*
15912   eval "ac_cv_header_$ac_safe=yes"
15913 else
15914   echo "$ac_err" >&5
15915   echo "configure: failed program was:" >&5
15916   cat conftest.$ac_ext >&5
15917   rm -rf conftest*
15918   eval "ac_cv_header_$ac_safe=no"
15919 fi
15920 rm -f conftest*
15921 fi
15922 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15923   echo "$ac_t""yes" 1>&6
15924     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15925   cat >> confdefs.h <<EOF
15926 #define $ac_tr_hdr 1
15927 EOF
15928  
15929 else
15930   echo "$ac_t""no" 1>&6
15931 fi
15932 done
15933
15934         if test $ac_cv_header_lwp_lwp_h = yes ; then
15935                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
15936 echo "configure:15937: checking for lwp_create in -llwp" >&5
15937 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
15938 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15939   echo $ac_n "(cached) $ac_c" 1>&6
15940 else
15941   ac_save_LIBS="$LIBS"
15942 LIBS="-llwp  $LIBS"
15943 cat > conftest.$ac_ext <<EOF
15944 #line 15945 "configure"
15945 #include "confdefs.h"
15946 /* Override any gcc2 internal prototype to avoid an error.  */
15947 /* We use char because int might match the return type of a gcc2
15948     builtin and then its argument prototype would still apply.  */
15949 char lwp_create();
15950
15951 int main() {
15952 lwp_create()
15953 ; return 0; }
15954 EOF
15955 if { (eval echo configure:15956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15956   rm -rf conftest*
15957   eval "ac_cv_lib_$ac_lib_var=yes"
15958 else
15959   echo "configure: failed program was:" >&5
15960   cat conftest.$ac_ext >&5
15961   rm -rf conftest*
15962   eval "ac_cv_lib_$ac_lib_var=no"
15963 fi
15964 rm -f conftest*
15965 LIBS="$ac_save_LIBS"
15966
15967 fi
15968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15969   echo "$ac_t""yes" 1>&6
15970   have_lwp=yes
15971 else
15972   echo "$ac_t""no" 1>&6
15973 have_lwp=no
15974 fi
15975
15976
15977                 if test $have_lwp = yes ; then
15978                         cat >> confdefs.h <<\EOF
15979 #define HAVE_LWP 1
15980 EOF
15981
15982                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
15983                         ol_link_threads=lwp
15984
15985                         if test $ol_with_yielding_select = auto ; then
15986                                 ol_with_yielding_select=no
15987                         fi
15988                 fi
15989         fi
15990 fi
15991
15992 if test $ol_with_yielding_select = yes ; then
15993         cat >> confdefs.h <<\EOF
15994 #define HAVE_YIELDING_SELECT 1
15995 EOF
15996
15997 fi
15998
15999 if test $ol_with_threads = manual ; then
16000                 ol_link_threads=yes
16001
16002         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16003
16004         for ac_hdr in pthread.h sched.h
16005 do
16006 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16007 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16008 echo "configure:16009: checking for $ac_hdr" >&5
16009 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16010   echo $ac_n "(cached) $ac_c" 1>&6
16011 else
16012   cat > conftest.$ac_ext <<EOF
16013 #line 16014 "configure"
16014 #include "confdefs.h"
16015 #include <$ac_hdr>
16016 EOF
16017 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16018 { (eval echo configure:16019: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16019 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16020 if test -z "$ac_err"; then
16021   rm -rf conftest*
16022   eval "ac_cv_header_$ac_safe=yes"
16023 else
16024   echo "$ac_err" >&5
16025   echo "configure: failed program was:" >&5
16026   cat conftest.$ac_ext >&5
16027   rm -rf conftest*
16028   eval "ac_cv_header_$ac_safe=no"
16029 fi
16030 rm -f conftest*
16031 fi
16032 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16033   echo "$ac_t""yes" 1>&6
16034     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16035   cat >> confdefs.h <<EOF
16036 #define $ac_tr_hdr 1
16037 EOF
16038  
16039 else
16040   echo "$ac_t""no" 1>&6
16041 fi
16042 done
16043
16044         for ac_func in sched_yield pthread_yield
16045 do
16046 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16047 echo "configure:16048: checking for $ac_func" >&5
16048 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16049   echo $ac_n "(cached) $ac_c" 1>&6
16050 else
16051   cat > conftest.$ac_ext <<EOF
16052 #line 16053 "configure"
16053 #include "confdefs.h"
16054 /* System header to define __stub macros and hopefully few prototypes,
16055     which can conflict with char $ac_func(); below.  */
16056 #include <assert.h>
16057 /* Override any gcc2 internal prototype to avoid an error.  */
16058 /* We use char because int might match the return type of a gcc2
16059     builtin and then its argument prototype would still apply.  */
16060 char $ac_func();
16061 char (*f)();
16062
16063 int main() {
16064
16065 /* The GNU C library defines this for functions which it implements
16066     to always fail with ENOSYS.  Some functions are actually named
16067     something starting with __ and the normal name is an alias.  */
16068 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16069 choke me
16070 #else
16071 f = $ac_func;
16072 #endif
16073
16074 ; return 0; }
16075 EOF
16076 if { (eval echo configure:16077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16077   rm -rf conftest*
16078   eval "ac_cv_func_$ac_func=yes"
16079 else
16080   echo "configure: failed program was:" >&5
16081   cat conftest.$ac_ext >&5
16082   rm -rf conftest*
16083   eval "ac_cv_func_$ac_func=no"
16084 fi
16085 rm -f conftest*
16086 fi
16087
16088 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16089   echo "$ac_t""yes" 1>&6
16090     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16091   cat >> confdefs.h <<EOF
16092 #define $ac_tr_func 1
16093 EOF
16094  
16095 else
16096   echo "$ac_t""no" 1>&6
16097 fi
16098 done
16099
16100         
16101         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16102 echo "configure:16103: checking for LinuxThreads pthread.h" >&5
16103 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16104   echo $ac_n "(cached) $ac_c" 1>&6
16105 else
16106   cat > conftest.$ac_ext <<EOF
16107 #line 16108 "configure"
16108 #include "confdefs.h"
16109 #include <pthread.h>
16110 EOF
16111 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16112   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16113   rm -rf conftest*
16114   ol_cv_header_linux_threads=yes
16115 else
16116   rm -rf conftest*
16117   ol_cv_header_linux_threads=no
16118 fi
16119 rm -f conftest*
16120
16121                 
16122 fi
16123
16124 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16125         if test $ol_cv_header_linux_threads = yes; then
16126                 cat >> confdefs.h <<\EOF
16127 #define HAVE_LINUX_THREADS 1
16128 EOF
16129
16130         fi
16131
16132
16133         for ac_hdr in mach/cthreads.h
16134 do
16135 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16136 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16137 echo "configure:16138: checking for $ac_hdr" >&5
16138 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16139   echo $ac_n "(cached) $ac_c" 1>&6
16140 else
16141   cat > conftest.$ac_ext <<EOF
16142 #line 16143 "configure"
16143 #include "confdefs.h"
16144 #include <$ac_hdr>
16145 EOF
16146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16147 { (eval echo configure:16148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16149 if test -z "$ac_err"; then
16150   rm -rf conftest*
16151   eval "ac_cv_header_$ac_safe=yes"
16152 else
16153   echo "$ac_err" >&5
16154   echo "configure: failed program was:" >&5
16155   cat conftest.$ac_ext >&5
16156   rm -rf conftest*
16157   eval "ac_cv_header_$ac_safe=no"
16158 fi
16159 rm -f conftest*
16160 fi
16161 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16162   echo "$ac_t""yes" 1>&6
16163     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16164   cat >> confdefs.h <<EOF
16165 #define $ac_tr_hdr 1
16166 EOF
16167  
16168 else
16169   echo "$ac_t""no" 1>&6
16170 fi
16171 done
16172
16173         for ac_hdr in lwp/lwp.h
16174 do
16175 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16176 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16177 echo "configure:16178: checking for $ac_hdr" >&5
16178 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16179   echo $ac_n "(cached) $ac_c" 1>&6
16180 else
16181   cat > conftest.$ac_ext <<EOF
16182 #line 16183 "configure"
16183 #include "confdefs.h"
16184 #include <$ac_hdr>
16185 EOF
16186 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16187 { (eval echo configure:16188: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16188 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16189 if test -z "$ac_err"; then
16190   rm -rf conftest*
16191   eval "ac_cv_header_$ac_safe=yes"
16192 else
16193   echo "$ac_err" >&5
16194   echo "configure: failed program was:" >&5
16195   cat conftest.$ac_ext >&5
16196   rm -rf conftest*
16197   eval "ac_cv_header_$ac_safe=no"
16198 fi
16199 rm -f conftest*
16200 fi
16201 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16202   echo "$ac_t""yes" 1>&6
16203     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16204   cat >> confdefs.h <<EOF
16205 #define $ac_tr_hdr 1
16206 EOF
16207  
16208 else
16209   echo "$ac_t""no" 1>&6
16210 fi
16211 done
16212
16213         for ac_hdr in thread.h synch.h
16214 do
16215 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16216 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16217 echo "configure:16218: checking for $ac_hdr" >&5
16218 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16219   echo $ac_n "(cached) $ac_c" 1>&6
16220 else
16221   cat > conftest.$ac_ext <<EOF
16222 #line 16223 "configure"
16223 #include "confdefs.h"
16224 #include <$ac_hdr>
16225 EOF
16226 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16227 { (eval echo configure:16228: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16228 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16229 if test -z "$ac_err"; then
16230   rm -rf conftest*
16231   eval "ac_cv_header_$ac_safe=yes"
16232 else
16233   echo "$ac_err" >&5
16234   echo "configure: failed program was:" >&5
16235   cat conftest.$ac_ext >&5
16236   rm -rf conftest*
16237   eval "ac_cv_header_$ac_safe=no"
16238 fi
16239 rm -f conftest*
16240 fi
16241 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16242   echo "$ac_t""yes" 1>&6
16243     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16244   cat >> confdefs.h <<EOF
16245 #define $ac_tr_hdr 1
16246 EOF
16247  
16248 else
16249   echo "$ac_t""no" 1>&6
16250 fi
16251 done
16252
16253 fi
16254
16255 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16256                         cat >> confdefs.h <<\EOF
16257 #define REENTRANT 1
16258 EOF
16259
16260         cat >> confdefs.h <<\EOF
16261 #define _REENTRANT 1
16262 EOF
16263
16264         cat >> confdefs.h <<\EOF
16265 #define THREAD_SAFE 1
16266 EOF
16267
16268         cat >> confdefs.h <<\EOF
16269 #define _THREAD_SAFE 1
16270 EOF
16271
16272         cat >> confdefs.h <<\EOF
16273 #define THREADSAFE 1
16274 EOF
16275
16276         cat >> confdefs.h <<\EOF
16277 #define _THREADSAFE 1
16278 EOF
16279
16280         cat >> confdefs.h <<\EOF
16281 #define _SGI_MP_SOURCE 1
16282 EOF
16283
16284
16285                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16286 echo "configure:16287: checking for thread specific errno" >&5
16287 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16288   echo $ac_n "(cached) $ac_c" 1>&6
16289 else
16290   
16291                 cat > conftest.$ac_ext <<EOF
16292 #line 16293 "configure"
16293 #include "confdefs.h"
16294 #include <errno.h>
16295 int main() {
16296 errno = 0;
16297 ; return 0; }
16298 EOF
16299 if { (eval echo configure:16300: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16300   rm -rf conftest*
16301   ol_cv_errno_thread_specific=yes
16302 else
16303   echo "configure: failed program was:" >&5
16304   cat conftest.$ac_ext >&5
16305   rm -rf conftest*
16306   ol_cv_errno_thread_specific=no
16307 fi
16308 rm -f conftest*
16309         
16310 fi
16311
16312 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16313
16314                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16315 echo "configure:16316: checking for thread specific h_errno" >&5
16316 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16317   echo $ac_n "(cached) $ac_c" 1>&6
16318 else
16319   
16320                 cat > conftest.$ac_ext <<EOF
16321 #line 16322 "configure"
16322 #include "confdefs.h"
16323 #include <netdb.h>
16324 int main() {
16325 h_errno = 0;
16326 ; return 0; }
16327 EOF
16328 if { (eval echo configure:16329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16329   rm -rf conftest*
16330   ol_cv_h_errno_thread_specific=yes
16331 else
16332   echo "configure: failed program was:" >&5
16333   cat conftest.$ac_ext >&5
16334   rm -rf conftest*
16335   ol_cv_h_errno_thread_specific=no
16336 fi
16337 rm -f conftest*
16338         
16339 fi
16340
16341 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16342
16343         if test $ol_cv_errno_thread_specific != yes \
16344                 -o $ol_cv_h_errno_thread_specific != yes ; then
16345                 LIBS="$LTHREAD_LIBS $LIBS"
16346                 LTHREAD_LIBS=""
16347         fi
16348
16349 fi  
16350
16351 if test $ol_link_threads = no ; then
16352         if test $ol_with_threads = yes ; then
16353                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16354         fi
16355
16356         if test $ol_with_threads = auto ; then
16357                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16358                 ol_with_threads=no
16359         fi
16360
16361         cat >> confdefs.h <<\EOF
16362 #define NO_THREADS 1
16363 EOF
16364
16365         LTHREAD_LIBS=""
16366 fi
16367
16368 if test $ol_link_threads != no ; then
16369         cat >> confdefs.h <<\EOF
16370 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16371 EOF
16372
16373 fi
16374
16375 for ac_func in \
16376         ctime_r                 \
16377         gethostbyname_r gethostbyaddr_r \
16378
16379 do
16380 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16381 echo "configure:16382: checking for $ac_func" >&5
16382 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16383   echo $ac_n "(cached) $ac_c" 1>&6
16384 else
16385   cat > conftest.$ac_ext <<EOF
16386 #line 16387 "configure"
16387 #include "confdefs.h"
16388 /* System header to define __stub macros and hopefully few prototypes,
16389     which can conflict with char $ac_func(); below.  */
16390 #include <assert.h>
16391 /* Override any gcc2 internal prototype to avoid an error.  */
16392 /* We use char because int might match the return type of a gcc2
16393     builtin and then its argument prototype would still apply.  */
16394 char $ac_func();
16395 char (*f)();
16396
16397 int main() {
16398
16399 /* The GNU C library defines this for functions which it implements
16400     to always fail with ENOSYS.  Some functions are actually named
16401     something starting with __ and the normal name is an alias.  */
16402 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16403 choke me
16404 #else
16405 f = $ac_func;
16406 #endif
16407
16408 ; return 0; }
16409 EOF
16410 if { (eval echo configure:16411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16411   rm -rf conftest*
16412   eval "ac_cv_func_$ac_func=yes"
16413 else
16414   echo "configure: failed program was:" >&5
16415   cat conftest.$ac_ext >&5
16416   rm -rf conftest*
16417   eval "ac_cv_func_$ac_func=no"
16418 fi
16419 rm -f conftest*
16420 fi
16421
16422 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16423   echo "$ac_t""yes" 1>&6
16424     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16425   cat >> confdefs.h <<EOF
16426 #define $ac_tr_func 1
16427 EOF
16428  
16429 else
16430   echo "$ac_t""no" 1>&6
16431 fi
16432 done
16433
16434
16435 if test "$ac_cv_func_ctime_r" = no ; then
16436         ol_cv_func_ctime_r_nargs=0
16437 else
16438         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
16439 echo "configure:16440: checking number of arguments of ctime_r" >&5
16440 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
16441   echo $ac_n "(cached) $ac_c" 1>&6
16442 else
16443   cat > conftest.$ac_ext <<EOF
16444 #line 16445 "configure"
16445 #include "confdefs.h"
16446 #include <time.h>
16447 int main() {
16448 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
16449 ; return 0; }
16450 EOF
16451 if { (eval echo configure:16452: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16452   rm -rf conftest*
16453   ol_cv_func_ctime_r_nargs3=yes
16454 else
16455   echo "configure: failed program was:" >&5
16456   cat conftest.$ac_ext >&5
16457   rm -rf conftest*
16458   ol_cv_func_ctime_r_nargs3=no
16459 fi
16460 rm -f conftest*
16461
16462         cat > conftest.$ac_ext <<EOF
16463 #line 16464 "configure"
16464 #include "confdefs.h"
16465 #include <time.h>
16466 int main() {
16467 time_t ti; char *buffer; ctime_r(&ti,buffer);
16468 ; return 0; }
16469 EOF
16470 if { (eval echo configure:16471: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16471   rm -rf conftest*
16472   ol_cv_func_ctime_r_nargs2=yes
16473 else
16474   echo "configure: failed program was:" >&5
16475   cat conftest.$ac_ext >&5
16476   rm -rf conftest*
16477   ol_cv_func_ctime_r_nargs2=no
16478 fi
16479 rm -f conftest*
16480
16481         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
16482                 $ol_cv_func_ctime_r_nargs2 = no ; then
16483
16484                 ol_cv_func_ctime_r_nargs=3
16485
16486         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
16487                 $ol_cv_func_ctime_r_nargs2 = yes ; then
16488
16489                 ol_cv_func_ctime_r_nargs=2
16490
16491         else
16492                 ol_cv_func_ctime_r_nargs=0
16493         fi
16494   
16495 fi
16496
16497 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
16498
16499   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
16500         cat >> confdefs.h <<EOF
16501 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
16502 EOF
16503
16504   fi
16505
16506 fi
16507
16508 if test "$ac_cv_func_gethostbyname_r" = yes ; then
16509         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
16510 echo "configure:16511: checking number of arguments of gethostbyname_r" >&5
16511 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
16512   echo $ac_n "(cached) $ac_c" 1>&6
16513 else
16514   cat > conftest.$ac_ext <<EOF
16515 #line 16516 "configure"
16516 #include "confdefs.h"
16517 #include <sys/types.h>
16518 #include <sys/socket.h>
16519 #include <netinet/in.h>
16520 #include <netdb.h>
16521 #define BUFSIZE (sizeof(struct hostent)+10)
16522 int main() {
16523 struct hostent hent; char buffer[BUFSIZE];
16524                 int bufsize=BUFSIZE;int h_errno;
16525                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
16526                         buffer, bufsize, &h_errno);
16527 ; return 0; }
16528 EOF
16529 if { (eval echo configure:16530: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16530   rm -rf conftest*
16531   ol_cv_func_gethostbyname_r_nargs5=yes
16532 else
16533   echo "configure: failed program was:" >&5
16534   cat conftest.$ac_ext >&5
16535   rm -rf conftest*
16536   ol_cv_func_gethostbyname_r_nargs5=no
16537 fi
16538 rm -f conftest*
16539
16540         cat > conftest.$ac_ext <<EOF
16541 #line 16542 "configure"
16542 #include "confdefs.h"
16543 #include <sys/types.h>
16544 #include <sys/socket.h>
16545 #include <netinet/in.h>
16546 #include <netdb.h>
16547 #define BUFSIZE (sizeof(struct hostent)+10)
16548 int main() {
16549 struct hostent hent;struct hostent *rhent;
16550                 char buffer[BUFSIZE];
16551                 int bufsize=BUFSIZE;int h_errno;
16552                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
16553                         &rhent, &h_errno);
16554 ; return 0; }
16555 EOF
16556 if { (eval echo configure:16557: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16557   rm -rf conftest*
16558   ol_cv_func_gethostbyname_r_nargs6=yes
16559 else
16560   echo "configure: failed program was:" >&5
16561   cat conftest.$ac_ext >&5
16562   rm -rf conftest*
16563   ol_cv_func_gethostbyname_r_nargs6=no
16564 fi
16565 rm -f conftest*
16566
16567         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
16568                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
16569
16570                 ol_cv_func_gethostbyname_r_nargs=5
16571
16572         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
16573                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
16574
16575                 ol_cv_func_gethostbyname_r_nargs=6
16576
16577         else
16578                 ol_cv_func_gethostbyname_r_nargs=0
16579         fi
16580   
16581 fi
16582
16583 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
16584   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
16585         cat >> confdefs.h <<EOF
16586 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
16587 EOF
16588
16589   fi
16590
16591 else
16592         ol_cv_func_gethostbyname_r_nargs=0
16593 fi
16594  
16595 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
16596         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
16597 echo "configure:16598: checking number of arguments of gethostbyaddr_r" >&5
16598 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
16599   echo $ac_n "(cached) $ac_c" 1>&6
16600 else
16601   cat > conftest.$ac_ext <<EOF
16602 #line 16603 "configure"
16603 #include "confdefs.h"
16604 #include <sys/types.h>
16605 #include <sys/socket.h>
16606 #include <netinet/in.h>
16607 #include <netdb.h>
16608 #define BUFSIZE (sizeof(struct hostent)+10)
16609 int main() {
16610 struct hostent hent; char buffer[BUFSIZE]; 
16611             struct in_addr add;
16612             size_t alen=sizeof(struct in_addr);
16613             int bufsize=BUFSIZE;int h_errno;
16614                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16615                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
16616 ; return 0; }
16617 EOF
16618 if { (eval echo configure:16619: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16619   rm -rf conftest*
16620   ol_cv_func_gethostbyaddr_r_nargs7=yes
16621 else
16622   echo "configure: failed program was:" >&5
16623   cat conftest.$ac_ext >&5
16624   rm -rf conftest*
16625   ol_cv_func_gethostbyaddr_r_nargs7=no
16626 fi
16627 rm -f conftest*
16628
16629         cat > conftest.$ac_ext <<EOF
16630 #line 16631 "configure"
16631 #include "confdefs.h"
16632 #include <sys/types.h>
16633 #include <sys/socket.h>
16634 #include <netinet/in.h>
16635 #include <netdb.h>
16636 #define BUFSIZE (sizeof(struct hostent)+10)
16637 int main() {
16638 struct hostent hent;
16639                 struct hostent *rhent; char buffer[BUFSIZE]; 
16640                 struct in_addr add;
16641                 size_t alen=sizeof(struct in_addr);
16642                 int bufsize=BUFSIZE;int h_errno;
16643                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
16644                         alen, AF_INET, &hent, buffer, bufsize, 
16645                         &rhent, &h_errno);
16646 ; return 0; }
16647 EOF
16648 if { (eval echo configure:16649: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
16649   rm -rf conftest*
16650   ol_cv_func_gethostbyaddr_r_nargs8=yes
16651 else
16652   echo "configure: failed program was:" >&5
16653   cat conftest.$ac_ext >&5
16654   rm -rf conftest*
16655   ol_cv_func_gethostbyaddr_r_nargs8=no
16656 fi
16657 rm -f conftest*
16658
16659         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
16660                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
16661
16662                 ol_cv_func_gethostbyaddr_r_nargs=7
16663
16664         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
16665                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
16666
16667                 ol_cv_func_gethostbyaddr_r_nargs=8
16668
16669         else
16670                 ol_cv_func_gethostbyaddr_r_nargs=0
16671         fi
16672   
16673 fi
16674
16675 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
16676   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
16677     cat >> confdefs.h <<EOF
16678 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
16679 EOF
16680
16681   fi
16682
16683 else
16684         ol_cv_func_gethostbyaddr_r_nargs=0
16685 fi
16686
16687 ol_link_ldbm=no 
16688
16689 if test $ol_with_ldbm_api = auto \
16690         -o $ol_with_ldbm_api = berkeley \
16691         -o $ol_with_ldbm_api = bcompat ; then
16692
16693         if test $ol_with_ldbm_api = bcompat; then \
16694                 for ac_hdr in db_185.h db.h
16695 do
16696 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16697 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16698 echo "configure:16699: checking for $ac_hdr" >&5
16699 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16700   echo $ac_n "(cached) $ac_c" 1>&6
16701 else
16702   cat > conftest.$ac_ext <<EOF
16703 #line 16704 "configure"
16704 #include "confdefs.h"
16705 #include <$ac_hdr>
16706 EOF
16707 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16708 { (eval echo configure:16709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16709 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16710 if test -z "$ac_err"; then
16711   rm -rf conftest*
16712   eval "ac_cv_header_$ac_safe=yes"
16713 else
16714   echo "$ac_err" >&5
16715   echo "configure: failed program was:" >&5
16716   cat conftest.$ac_ext >&5
16717   rm -rf conftest*
16718   eval "ac_cv_header_$ac_safe=no"
16719 fi
16720 rm -f conftest*
16721 fi
16722 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16723   echo "$ac_t""yes" 1>&6
16724     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16725   cat >> confdefs.h <<EOF
16726 #define $ac_tr_hdr 1
16727 EOF
16728  
16729 else
16730   echo "$ac_t""no" 1>&6
16731 fi
16732 done
16733
16734 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16735         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16736 echo "configure:16737: checking if Berkeley DB header compatibility" >&5
16737 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16738   echo $ac_n "(cached) $ac_c" 1>&6
16739 else
16740   
16741                 cat > conftest.$ac_ext <<EOF
16742 #line 16743 "configure"
16743 #include "confdefs.h"
16744
16745 #if HAVE_DB_185_H
16746 #       include <db_185.h>
16747 #else
16748 #       include <db.h>
16749 #endif
16750
16751  /* this check could be improved */
16752 #ifndef DB_VERSION_MAJOR
16753 #       define DB_VERSION_MAJOR 1
16754 #endif
16755
16756 #if DB_VERSION_MAJOR == 1 
16757         __db_version_1
16758 #endif
16759
16760 EOF
16761 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16762   egrep "__db_version_1" >/dev/null 2>&1; then
16763   rm -rf conftest*
16764   ol_cv_header_db1=yes
16765 else
16766   rm -rf conftest*
16767   ol_cv_header_db1=no
16768 fi
16769 rm -f conftest*
16770
16771 fi
16772
16773 echo "$ac_t""$ol_cv_header_db1" 1>&6
16774
16775         if test $ol_cv_header_db1 = yes ; then
16776                 ol_cv_lib_db=no
16777 if test $ol_cv_lib_db = no ; then
16778         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16779 echo "configure:16780: checking for Berkeley DB link (default)" >&5
16780 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16781   echo $ac_n "(cached) $ac_c" 1>&6
16782 else
16783   
16784         ol_DB_LIB=
16785         ol_LIBS=$LIBS
16786         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16787
16788         cat > conftest.$ac_ext <<EOF
16789 #line 16790 "configure"
16790 #include "confdefs.h"
16791
16792 #ifdef HAVE_DB_185_H
16793 # include <db_185.h>
16794 #else
16795 # include <db.h>
16796 #endif
16797
16798 #ifndef DB_VERSION_MAJOR
16799 # define DB_VERSION_MAJOR 1
16800 #endif
16801
16802 #ifndef NULL
16803 #define NULL ((void*)0)
16804 #endif
16805
16806 int main() {
16807
16808 #if DB_VERSION_MAJOR > 1
16809         {
16810                 char *version;
16811                 int major, minor, patch;
16812
16813                 version = db_version( &major, &minor, &patch );
16814
16815                 if( major != DB_VERSION_MAJOR ||
16816                         minor < DB_VERSION_MINOR )
16817                 {
16818                         printf("Berkeley DB version mismatch\n"
16819                                 "\theader: %s\n\tlibrary: %s\n",
16820                                 DB_VERSION_STRING, version);
16821                         return 1;
16822                 }
16823         }
16824 #endif
16825
16826 #if DB_VERSION_MAJOR > 2
16827         db_env_create( NULL, 0 );
16828 #elif DB_VERSION_MAJOR > 1
16829         db_appexit( NULL );
16830 #else
16831         (void) dbopen( NULL, 0, 0, 0, NULL);
16832 #endif
16833
16834 ; return 0; }
16835 EOF
16836 if { (eval echo configure:16837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16837   rm -rf conftest*
16838   ol_cv_db_none=yes
16839 else
16840   echo "configure: failed program was:" >&5
16841   cat conftest.$ac_ext >&5
16842   rm -rf conftest*
16843   ol_cv_db_none=no
16844 fi
16845 rm -f conftest*
16846
16847         LIBS="$ol_LIBS"
16848
16849 fi
16850
16851 echo "$ac_t""$ol_cv_db_none" 1>&6
16852
16853         if test $ol_cv_db_none = yes ; then
16854                 ol_cv_lib_db=yes
16855         fi
16856 fi
16857
16858 if test $ol_cv_lib_db = no ; then
16859         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
16860 echo "configure:16861: checking for Berkeley DB link (-ldb42)" >&5
16861 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
16862   echo $ac_n "(cached) $ac_c" 1>&6
16863 else
16864   
16865         ol_DB_LIB=-ldb42
16866         ol_LIBS=$LIBS
16867         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16868
16869         cat > conftest.$ac_ext <<EOF
16870 #line 16871 "configure"
16871 #include "confdefs.h"
16872
16873 #ifdef HAVE_DB_185_H
16874 # include <db_185.h>
16875 #else
16876 # include <db.h>
16877 #endif
16878
16879 #ifndef DB_VERSION_MAJOR
16880 # define DB_VERSION_MAJOR 1
16881 #endif
16882
16883 #ifndef NULL
16884 #define NULL ((void*)0)
16885 #endif
16886
16887 int main() {
16888
16889 #if DB_VERSION_MAJOR > 1
16890         {
16891                 char *version;
16892                 int major, minor, patch;
16893
16894                 version = db_version( &major, &minor, &patch );
16895
16896                 if( major != DB_VERSION_MAJOR ||
16897                         minor < DB_VERSION_MINOR )
16898                 {
16899                         printf("Berkeley DB version mismatch\n"
16900                                 "\theader: %s\n\tlibrary: %s\n",
16901                                 DB_VERSION_STRING, version);
16902                         return 1;
16903                 }
16904         }
16905 #endif
16906
16907 #if DB_VERSION_MAJOR > 2
16908         db_env_create( NULL, 0 );
16909 #elif DB_VERSION_MAJOR > 1
16910         db_appexit( NULL );
16911 #else
16912         (void) dbopen( NULL, 0, 0, 0, NULL);
16913 #endif
16914
16915 ; return 0; }
16916 EOF
16917 if { (eval echo configure:16918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16918   rm -rf conftest*
16919   ol_cv_db_db42=yes
16920 else
16921   echo "configure: failed program was:" >&5
16922   cat conftest.$ac_ext >&5
16923   rm -rf conftest*
16924   ol_cv_db_db42=no
16925 fi
16926 rm -f conftest*
16927
16928         LIBS="$ol_LIBS"
16929
16930 fi
16931
16932 echo "$ac_t""$ol_cv_db_db42" 1>&6
16933
16934         if test $ol_cv_db_db42 = yes ; then
16935                 ol_cv_lib_db=-ldb42
16936         fi
16937 fi
16938
16939 if test $ol_cv_lib_db = no ; then
16940         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
16941 echo "configure:16942: checking for Berkeley DB link (-ldb-42)" >&5
16942 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
16943   echo $ac_n "(cached) $ac_c" 1>&6
16944 else
16945   
16946         ol_DB_LIB=-ldb-42
16947         ol_LIBS=$LIBS
16948         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
16949
16950         cat > conftest.$ac_ext <<EOF
16951 #line 16952 "configure"
16952 #include "confdefs.h"
16953
16954 #ifdef HAVE_DB_185_H
16955 # include <db_185.h>
16956 #else
16957 # include <db.h>
16958 #endif
16959
16960 #ifndef DB_VERSION_MAJOR
16961 # define DB_VERSION_MAJOR 1
16962 #endif
16963
16964 #ifndef NULL
16965 #define NULL ((void*)0)
16966 #endif
16967
16968 int main() {
16969
16970 #if DB_VERSION_MAJOR > 1
16971         {
16972                 char *version;
16973                 int major, minor, patch;
16974
16975                 version = db_version( &major, &minor, &patch );
16976
16977                 if( major != DB_VERSION_MAJOR ||
16978                         minor < DB_VERSION_MINOR )
16979                 {
16980                         printf("Berkeley DB version mismatch\n"
16981                                 "\theader: %s\n\tlibrary: %s\n",
16982                                 DB_VERSION_STRING, version);
16983                         return 1;
16984                 }
16985         }
16986 #endif
16987
16988 #if DB_VERSION_MAJOR > 2
16989         db_env_create( NULL, 0 );
16990 #elif DB_VERSION_MAJOR > 1
16991         db_appexit( NULL );
16992 #else
16993         (void) dbopen( NULL, 0, 0, 0, NULL);
16994 #endif
16995
16996 ; return 0; }
16997 EOF
16998 if { (eval echo configure:16999: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16999   rm -rf conftest*
17000   ol_cv_db_db_42=yes
17001 else
17002   echo "configure: failed program was:" >&5
17003   cat conftest.$ac_ext >&5
17004   rm -rf conftest*
17005   ol_cv_db_db_42=no
17006 fi
17007 rm -f conftest*
17008
17009         LIBS="$ol_LIBS"
17010
17011 fi
17012
17013 echo "$ac_t""$ol_cv_db_db_42" 1>&6
17014
17015         if test $ol_cv_db_db_42 = yes ; then
17016                 ol_cv_lib_db=-ldb-42
17017         fi
17018 fi
17019
17020 if test $ol_cv_lib_db = no ; then
17021         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
17022 echo "configure:17023: checking for Berkeley DB link (-ldb-4.2)" >&5
17023 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
17024   echo $ac_n "(cached) $ac_c" 1>&6
17025 else
17026   
17027         ol_DB_LIB=-ldb-4.2
17028         ol_LIBS=$LIBS
17029         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17030
17031         cat > conftest.$ac_ext <<EOF
17032 #line 17033 "configure"
17033 #include "confdefs.h"
17034
17035 #ifdef HAVE_DB_185_H
17036 # include <db_185.h>
17037 #else
17038 # include <db.h>
17039 #endif
17040
17041 #ifndef DB_VERSION_MAJOR
17042 # define DB_VERSION_MAJOR 1
17043 #endif
17044
17045 #ifndef NULL
17046 #define NULL ((void*)0)
17047 #endif
17048
17049 int main() {
17050
17051 #if DB_VERSION_MAJOR > 1
17052         {
17053                 char *version;
17054                 int major, minor, patch;
17055
17056                 version = db_version( &major, &minor, &patch );
17057
17058                 if( major != DB_VERSION_MAJOR ||
17059                         minor < DB_VERSION_MINOR )
17060                 {
17061                         printf("Berkeley DB version mismatch\n"
17062                                 "\theader: %s\n\tlibrary: %s\n",
17063                                 DB_VERSION_STRING, version);
17064                         return 1;
17065                 }
17066         }
17067 #endif
17068
17069 #if DB_VERSION_MAJOR > 2
17070         db_env_create( NULL, 0 );
17071 #elif DB_VERSION_MAJOR > 1
17072         db_appexit( NULL );
17073 #else
17074         (void) dbopen( NULL, 0, 0, 0, NULL);
17075 #endif
17076
17077 ; return 0; }
17078 EOF
17079 if { (eval echo configure:17080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17080   rm -rf conftest*
17081   ol_cv_db_db_4_dot_2=yes
17082 else
17083   echo "configure: failed program was:" >&5
17084   cat conftest.$ac_ext >&5
17085   rm -rf conftest*
17086   ol_cv_db_db_4_dot_2=no
17087 fi
17088 rm -f conftest*
17089
17090         LIBS="$ol_LIBS"
17091
17092 fi
17093
17094 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
17095
17096         if test $ol_cv_db_db_4_dot_2 = yes ; then
17097                 ol_cv_lib_db=-ldb-4.2
17098         fi
17099 fi
17100
17101 if test $ol_cv_lib_db = no ; then
17102         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
17103 echo "configure:17104: checking for Berkeley DB link (-ldb-4-2)" >&5
17104 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
17105   echo $ac_n "(cached) $ac_c" 1>&6
17106 else
17107   
17108         ol_DB_LIB=-ldb-4-2
17109         ol_LIBS=$LIBS
17110         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17111
17112         cat > conftest.$ac_ext <<EOF
17113 #line 17114 "configure"
17114 #include "confdefs.h"
17115
17116 #ifdef HAVE_DB_185_H
17117 # include <db_185.h>
17118 #else
17119 # include <db.h>
17120 #endif
17121
17122 #ifndef DB_VERSION_MAJOR
17123 # define DB_VERSION_MAJOR 1
17124 #endif
17125
17126 #ifndef NULL
17127 #define NULL ((void*)0)
17128 #endif
17129
17130 int main() {
17131
17132 #if DB_VERSION_MAJOR > 1
17133         {
17134                 char *version;
17135                 int major, minor, patch;
17136
17137                 version = db_version( &major, &minor, &patch );
17138
17139                 if( major != DB_VERSION_MAJOR ||
17140                         minor < DB_VERSION_MINOR )
17141                 {
17142                         printf("Berkeley DB version mismatch\n"
17143                                 "\theader: %s\n\tlibrary: %s\n",
17144                                 DB_VERSION_STRING, version);
17145                         return 1;
17146                 }
17147         }
17148 #endif
17149
17150 #if DB_VERSION_MAJOR > 2
17151         db_env_create( NULL, 0 );
17152 #elif DB_VERSION_MAJOR > 1
17153         db_appexit( NULL );
17154 #else
17155         (void) dbopen( NULL, 0, 0, 0, NULL);
17156 #endif
17157
17158 ; return 0; }
17159 EOF
17160 if { (eval echo configure:17161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17161   rm -rf conftest*
17162   ol_cv_db_db_4_2=yes
17163 else
17164   echo "configure: failed program was:" >&5
17165   cat conftest.$ac_ext >&5
17166   rm -rf conftest*
17167   ol_cv_db_db_4_2=no
17168 fi
17169 rm -f conftest*
17170
17171         LIBS="$ol_LIBS"
17172
17173 fi
17174
17175 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
17176
17177         if test $ol_cv_db_db_4_2 = yes ; then
17178                 ol_cv_lib_db=-ldb-4-2
17179         fi
17180 fi
17181
17182 if test $ol_cv_lib_db = no ; then
17183         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17184 echo "configure:17185: checking for Berkeley DB link (-ldb-4)" >&5
17185 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17186   echo $ac_n "(cached) $ac_c" 1>&6
17187 else
17188   
17189         ol_DB_LIB=-ldb-4
17190         ol_LIBS=$LIBS
17191         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17192
17193         cat > conftest.$ac_ext <<EOF
17194 #line 17195 "configure"
17195 #include "confdefs.h"
17196
17197 #ifdef HAVE_DB_185_H
17198 # include <db_185.h>
17199 #else
17200 # include <db.h>
17201 #endif
17202
17203 #ifndef DB_VERSION_MAJOR
17204 # define DB_VERSION_MAJOR 1
17205 #endif
17206
17207 #ifndef NULL
17208 #define NULL ((void*)0)
17209 #endif
17210
17211 int main() {
17212
17213 #if DB_VERSION_MAJOR > 1
17214         {
17215                 char *version;
17216                 int major, minor, patch;
17217
17218                 version = db_version( &major, &minor, &patch );
17219
17220                 if( major != DB_VERSION_MAJOR ||
17221                         minor < DB_VERSION_MINOR )
17222                 {
17223                         printf("Berkeley DB version mismatch\n"
17224                                 "\theader: %s\n\tlibrary: %s\n",
17225                                 DB_VERSION_STRING, version);
17226                         return 1;
17227                 }
17228         }
17229 #endif
17230
17231 #if DB_VERSION_MAJOR > 2
17232         db_env_create( NULL, 0 );
17233 #elif DB_VERSION_MAJOR > 1
17234         db_appexit( NULL );
17235 #else
17236         (void) dbopen( NULL, 0, 0, 0, NULL);
17237 #endif
17238
17239 ; return 0; }
17240 EOF
17241 if { (eval echo configure:17242: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17242   rm -rf conftest*
17243   ol_cv_db_db_4=yes
17244 else
17245   echo "configure: failed program was:" >&5
17246   cat conftest.$ac_ext >&5
17247   rm -rf conftest*
17248   ol_cv_db_db_4=no
17249 fi
17250 rm -f conftest*
17251
17252         LIBS="$ol_LIBS"
17253
17254 fi
17255
17256 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17257
17258         if test $ol_cv_db_db_4 = yes ; then
17259                 ol_cv_lib_db=-ldb-4
17260         fi
17261 fi
17262
17263 if test $ol_cv_lib_db = no ; then
17264         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17265 echo "configure:17266: checking for Berkeley DB link (-ldb4)" >&5
17266 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17267   echo $ac_n "(cached) $ac_c" 1>&6
17268 else
17269   
17270         ol_DB_LIB=-ldb4
17271         ol_LIBS=$LIBS
17272         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17273
17274         cat > conftest.$ac_ext <<EOF
17275 #line 17276 "configure"
17276 #include "confdefs.h"
17277
17278 #ifdef HAVE_DB_185_H
17279 # include <db_185.h>
17280 #else
17281 # include <db.h>
17282 #endif
17283
17284 #ifndef DB_VERSION_MAJOR
17285 # define DB_VERSION_MAJOR 1
17286 #endif
17287
17288 #ifndef NULL
17289 #define NULL ((void*)0)
17290 #endif
17291
17292 int main() {
17293
17294 #if DB_VERSION_MAJOR > 1
17295         {
17296                 char *version;
17297                 int major, minor, patch;
17298
17299                 version = db_version( &major, &minor, &patch );
17300
17301                 if( major != DB_VERSION_MAJOR ||
17302                         minor < DB_VERSION_MINOR )
17303                 {
17304                         printf("Berkeley DB version mismatch\n"
17305                                 "\theader: %s\n\tlibrary: %s\n",
17306                                 DB_VERSION_STRING, version);
17307                         return 1;
17308                 }
17309         }
17310 #endif
17311
17312 #if DB_VERSION_MAJOR > 2
17313         db_env_create( NULL, 0 );
17314 #elif DB_VERSION_MAJOR > 1
17315         db_appexit( NULL );
17316 #else
17317         (void) dbopen( NULL, 0, 0, 0, NULL);
17318 #endif
17319
17320 ; return 0; }
17321 EOF
17322 if { (eval echo configure:17323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17323   rm -rf conftest*
17324   ol_cv_db_db4=yes
17325 else
17326   echo "configure: failed program was:" >&5
17327   cat conftest.$ac_ext >&5
17328   rm -rf conftest*
17329   ol_cv_db_db4=no
17330 fi
17331 rm -f conftest*
17332
17333         LIBS="$ol_LIBS"
17334
17335 fi
17336
17337 echo "$ac_t""$ol_cv_db_db4" 1>&6
17338
17339         if test $ol_cv_db_db4 = yes ; then
17340                 ol_cv_lib_db=-ldb4
17341         fi
17342 fi
17343
17344 if test $ol_cv_lib_db = no ; then
17345         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17346 echo "configure:17347: checking for Berkeley DB link (-ldb)" >&5
17347 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17348   echo $ac_n "(cached) $ac_c" 1>&6
17349 else
17350   
17351         ol_DB_LIB=-ldb
17352         ol_LIBS=$LIBS
17353         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17354
17355         cat > conftest.$ac_ext <<EOF
17356 #line 17357 "configure"
17357 #include "confdefs.h"
17358
17359 #ifdef HAVE_DB_185_H
17360 # include <db_185.h>
17361 #else
17362 # include <db.h>
17363 #endif
17364
17365 #ifndef DB_VERSION_MAJOR
17366 # define DB_VERSION_MAJOR 1
17367 #endif
17368
17369 #ifndef NULL
17370 #define NULL ((void*)0)
17371 #endif
17372
17373 int main() {
17374
17375 #if DB_VERSION_MAJOR > 1
17376         {
17377                 char *version;
17378                 int major, minor, patch;
17379
17380                 version = db_version( &major, &minor, &patch );
17381
17382                 if( major != DB_VERSION_MAJOR ||
17383                         minor < DB_VERSION_MINOR )
17384                 {
17385                         printf("Berkeley DB version mismatch\n"
17386                                 "\theader: %s\n\tlibrary: %s\n",
17387                                 DB_VERSION_STRING, version);
17388                         return 1;
17389                 }
17390         }
17391 #endif
17392
17393 #if DB_VERSION_MAJOR > 2
17394         db_env_create( NULL, 0 );
17395 #elif DB_VERSION_MAJOR > 1
17396         db_appexit( NULL );
17397 #else
17398         (void) dbopen( NULL, 0, 0, 0, NULL);
17399 #endif
17400
17401 ; return 0; }
17402 EOF
17403 if { (eval echo configure:17404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17404   rm -rf conftest*
17405   ol_cv_db_db=yes
17406 else
17407   echo "configure: failed program was:" >&5
17408   cat conftest.$ac_ext >&5
17409   rm -rf conftest*
17410   ol_cv_db_db=no
17411 fi
17412 rm -f conftest*
17413
17414         LIBS="$ol_LIBS"
17415
17416 fi
17417
17418 echo "$ac_t""$ol_cv_db_db" 1>&6
17419
17420         if test $ol_cv_db_db = yes ; then
17421                 ol_cv_lib_db=-ldb
17422         fi
17423 fi
17424
17425 if test $ol_cv_lib_db = no ; then
17426         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
17427 echo "configure:17428: checking for Berkeley DB link (-ldb41)" >&5
17428 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
17429   echo $ac_n "(cached) $ac_c" 1>&6
17430 else
17431   
17432         ol_DB_LIB=-ldb41
17433         ol_LIBS=$LIBS
17434         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17435
17436         cat > conftest.$ac_ext <<EOF
17437 #line 17438 "configure"
17438 #include "confdefs.h"
17439
17440 #ifdef HAVE_DB_185_H
17441 # include <db_185.h>
17442 #else
17443 # include <db.h>
17444 #endif
17445
17446 #ifndef DB_VERSION_MAJOR
17447 # define DB_VERSION_MAJOR 1
17448 #endif
17449
17450 #ifndef NULL
17451 #define NULL ((void*)0)
17452 #endif
17453
17454 int main() {
17455
17456 #if DB_VERSION_MAJOR > 1
17457         {
17458                 char *version;
17459                 int major, minor, patch;
17460
17461                 version = db_version( &major, &minor, &patch );
17462
17463                 if( major != DB_VERSION_MAJOR ||
17464                         minor < DB_VERSION_MINOR )
17465                 {
17466                         printf("Berkeley DB version mismatch\n"
17467                                 "\theader: %s\n\tlibrary: %s\n",
17468                                 DB_VERSION_STRING, version);
17469                         return 1;
17470                 }
17471         }
17472 #endif
17473
17474 #if DB_VERSION_MAJOR > 2
17475         db_env_create( NULL, 0 );
17476 #elif DB_VERSION_MAJOR > 1
17477         db_appexit( NULL );
17478 #else
17479         (void) dbopen( NULL, 0, 0, 0, NULL);
17480 #endif
17481
17482 ; return 0; }
17483 EOF
17484 if { (eval echo configure:17485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17485   rm -rf conftest*
17486   ol_cv_db_db41=yes
17487 else
17488   echo "configure: failed program was:" >&5
17489   cat conftest.$ac_ext >&5
17490   rm -rf conftest*
17491   ol_cv_db_db41=no
17492 fi
17493 rm -f conftest*
17494
17495         LIBS="$ol_LIBS"
17496
17497 fi
17498
17499 echo "$ac_t""$ol_cv_db_db41" 1>&6
17500
17501         if test $ol_cv_db_db41 = yes ; then
17502                 ol_cv_lib_db=-ldb41
17503         fi
17504 fi
17505
17506 if test $ol_cv_lib_db = no ; then
17507         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
17508 echo "configure:17509: checking for Berkeley DB link (-ldb-41)" >&5
17509 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
17510   echo $ac_n "(cached) $ac_c" 1>&6
17511 else
17512   
17513         ol_DB_LIB=-ldb-41
17514         ol_LIBS=$LIBS
17515         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17516
17517         cat > conftest.$ac_ext <<EOF
17518 #line 17519 "configure"
17519 #include "confdefs.h"
17520
17521 #ifdef HAVE_DB_185_H
17522 # include <db_185.h>
17523 #else
17524 # include <db.h>
17525 #endif
17526
17527 #ifndef DB_VERSION_MAJOR
17528 # define DB_VERSION_MAJOR 1
17529 #endif
17530
17531 #ifndef NULL
17532 #define NULL ((void*)0)
17533 #endif
17534
17535 int main() {
17536
17537 #if DB_VERSION_MAJOR > 1
17538         {
17539                 char *version;
17540                 int major, minor, patch;
17541
17542                 version = db_version( &major, &minor, &patch );
17543
17544                 if( major != DB_VERSION_MAJOR ||
17545                         minor < DB_VERSION_MINOR )
17546                 {
17547                         printf("Berkeley DB version mismatch\n"
17548                                 "\theader: %s\n\tlibrary: %s\n",
17549                                 DB_VERSION_STRING, version);
17550                         return 1;
17551                 }
17552         }
17553 #endif
17554
17555 #if DB_VERSION_MAJOR > 2
17556         db_env_create( NULL, 0 );
17557 #elif DB_VERSION_MAJOR > 1
17558         db_appexit( NULL );
17559 #else
17560         (void) dbopen( NULL, 0, 0, 0, NULL);
17561 #endif
17562
17563 ; return 0; }
17564 EOF
17565 if { (eval echo configure:17566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17566   rm -rf conftest*
17567   ol_cv_db_db_41=yes
17568 else
17569   echo "configure: failed program was:" >&5
17570   cat conftest.$ac_ext >&5
17571   rm -rf conftest*
17572   ol_cv_db_db_41=no
17573 fi
17574 rm -f conftest*
17575
17576         LIBS="$ol_LIBS"
17577
17578 fi
17579
17580 echo "$ac_t""$ol_cv_db_db_41" 1>&6
17581
17582         if test $ol_cv_db_db_41 = yes ; then
17583                 ol_cv_lib_db=-ldb-41
17584         fi
17585 fi
17586
17587 if test $ol_cv_lib_db = no ; then
17588         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
17589 echo "configure:17590: checking for Berkeley DB link (-ldb-4.1)" >&5
17590 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
17591   echo $ac_n "(cached) $ac_c" 1>&6
17592 else
17593   
17594         ol_DB_LIB=-ldb-4.1
17595         ol_LIBS=$LIBS
17596         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17597
17598         cat > conftest.$ac_ext <<EOF
17599 #line 17600 "configure"
17600 #include "confdefs.h"
17601
17602 #ifdef HAVE_DB_185_H
17603 # include <db_185.h>
17604 #else
17605 # include <db.h>
17606 #endif
17607
17608 #ifndef DB_VERSION_MAJOR
17609 # define DB_VERSION_MAJOR 1
17610 #endif
17611
17612 #ifndef NULL
17613 #define NULL ((void*)0)
17614 #endif
17615
17616 int main() {
17617
17618 #if DB_VERSION_MAJOR > 1
17619         {
17620                 char *version;
17621                 int major, minor, patch;
17622
17623                 version = db_version( &major, &minor, &patch );
17624
17625                 if( major != DB_VERSION_MAJOR ||
17626                         minor < DB_VERSION_MINOR )
17627                 {
17628                         printf("Berkeley DB version mismatch\n"
17629                                 "\theader: %s\n\tlibrary: %s\n",
17630                                 DB_VERSION_STRING, version);
17631                         return 1;
17632                 }
17633         }
17634 #endif
17635
17636 #if DB_VERSION_MAJOR > 2
17637         db_env_create( NULL, 0 );
17638 #elif DB_VERSION_MAJOR > 1
17639         db_appexit( NULL );
17640 #else
17641         (void) dbopen( NULL, 0, 0, 0, NULL);
17642 #endif
17643
17644 ; return 0; }
17645 EOF
17646 if { (eval echo configure:17647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17647   rm -rf conftest*
17648   ol_cv_db_db_4_dot_1=yes
17649 else
17650   echo "configure: failed program was:" >&5
17651   cat conftest.$ac_ext >&5
17652   rm -rf conftest*
17653   ol_cv_db_db_4_dot_1=no
17654 fi
17655 rm -f conftest*
17656
17657         LIBS="$ol_LIBS"
17658
17659 fi
17660
17661 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
17662
17663         if test $ol_cv_db_db_4_dot_1 = yes ; then
17664                 ol_cv_lib_db=-ldb-4.1
17665         fi
17666 fi
17667
17668 if test $ol_cv_lib_db = no ; then
17669         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
17670 echo "configure:17671: checking for Berkeley DB link (-ldb-4-1)" >&5
17671 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
17672   echo $ac_n "(cached) $ac_c" 1>&6
17673 else
17674   
17675         ol_DB_LIB=-ldb-4-1
17676         ol_LIBS=$LIBS
17677         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17678
17679         cat > conftest.$ac_ext <<EOF
17680 #line 17681 "configure"
17681 #include "confdefs.h"
17682
17683 #ifdef HAVE_DB_185_H
17684 # include <db_185.h>
17685 #else
17686 # include <db.h>
17687 #endif
17688
17689 #ifndef DB_VERSION_MAJOR
17690 # define DB_VERSION_MAJOR 1
17691 #endif
17692
17693 #ifndef NULL
17694 #define NULL ((void*)0)
17695 #endif
17696
17697 int main() {
17698
17699 #if DB_VERSION_MAJOR > 1
17700         {
17701                 char *version;
17702                 int major, minor, patch;
17703
17704                 version = db_version( &major, &minor, &patch );
17705
17706                 if( major != DB_VERSION_MAJOR ||
17707                         minor < DB_VERSION_MINOR )
17708                 {
17709                         printf("Berkeley DB version mismatch\n"
17710                                 "\theader: %s\n\tlibrary: %s\n",
17711                                 DB_VERSION_STRING, version);
17712                         return 1;
17713                 }
17714         }
17715 #endif
17716
17717 #if DB_VERSION_MAJOR > 2
17718         db_env_create( NULL, 0 );
17719 #elif DB_VERSION_MAJOR > 1
17720         db_appexit( NULL );
17721 #else
17722         (void) dbopen( NULL, 0, 0, 0, NULL);
17723 #endif
17724
17725 ; return 0; }
17726 EOF
17727 if { (eval echo configure:17728: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17728   rm -rf conftest*
17729   ol_cv_db_db_4_1=yes
17730 else
17731   echo "configure: failed program was:" >&5
17732   cat conftest.$ac_ext >&5
17733   rm -rf conftest*
17734   ol_cv_db_db_4_1=no
17735 fi
17736 rm -f conftest*
17737
17738         LIBS="$ol_LIBS"
17739
17740 fi
17741
17742 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
17743
17744         if test $ol_cv_db_db_4_1 = yes ; then
17745                 ol_cv_lib_db=-ldb-4-1
17746         fi
17747 fi
17748
17749 if test $ol_cv_lib_db = no ; then
17750         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17751 echo "configure:17752: checking for Berkeley DB link (-ldb3)" >&5
17752 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17753   echo $ac_n "(cached) $ac_c" 1>&6
17754 else
17755   
17756         ol_DB_LIB=-ldb3
17757         ol_LIBS=$LIBS
17758         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17759
17760         cat > conftest.$ac_ext <<EOF
17761 #line 17762 "configure"
17762 #include "confdefs.h"
17763
17764 #ifdef HAVE_DB_185_H
17765 # include <db_185.h>
17766 #else
17767 # include <db.h>
17768 #endif
17769
17770 #ifndef DB_VERSION_MAJOR
17771 # define DB_VERSION_MAJOR 1
17772 #endif
17773
17774 #ifndef NULL
17775 #define NULL ((void*)0)
17776 #endif
17777
17778 int main() {
17779
17780 #if DB_VERSION_MAJOR > 1
17781         {
17782                 char *version;
17783                 int major, minor, patch;
17784
17785                 version = db_version( &major, &minor, &patch );
17786
17787                 if( major != DB_VERSION_MAJOR ||
17788                         minor < DB_VERSION_MINOR )
17789                 {
17790                         printf("Berkeley DB version mismatch\n"
17791                                 "\theader: %s\n\tlibrary: %s\n",
17792                                 DB_VERSION_STRING, version);
17793                         return 1;
17794                 }
17795         }
17796 #endif
17797
17798 #if DB_VERSION_MAJOR > 2
17799         db_env_create( NULL, 0 );
17800 #elif DB_VERSION_MAJOR > 1
17801         db_appexit( NULL );
17802 #else
17803         (void) dbopen( NULL, 0, 0, 0, NULL);
17804 #endif
17805
17806 ; return 0; }
17807 EOF
17808 if { (eval echo configure:17809: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17809   rm -rf conftest*
17810   ol_cv_db_db3=yes
17811 else
17812   echo "configure: failed program was:" >&5
17813   cat conftest.$ac_ext >&5
17814   rm -rf conftest*
17815   ol_cv_db_db3=no
17816 fi
17817 rm -f conftest*
17818
17819         LIBS="$ol_LIBS"
17820
17821 fi
17822
17823 echo "$ac_t""$ol_cv_db_db3" 1>&6
17824
17825         if test $ol_cv_db_db3 = yes ; then
17826                 ol_cv_lib_db=-ldb3
17827         fi
17828 fi
17829
17830 if test $ol_cv_lib_db = no ; then
17831         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17832 echo "configure:17833: checking for Berkeley DB link (-ldb-3)" >&5
17833 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17834   echo $ac_n "(cached) $ac_c" 1>&6
17835 else
17836   
17837         ol_DB_LIB=-ldb-3
17838         ol_LIBS=$LIBS
17839         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17840
17841         cat > conftest.$ac_ext <<EOF
17842 #line 17843 "configure"
17843 #include "confdefs.h"
17844
17845 #ifdef HAVE_DB_185_H
17846 # include <db_185.h>
17847 #else
17848 # include <db.h>
17849 #endif
17850
17851 #ifndef DB_VERSION_MAJOR
17852 # define DB_VERSION_MAJOR 1
17853 #endif
17854
17855 #ifndef NULL
17856 #define NULL ((void*)0)
17857 #endif
17858
17859 int main() {
17860
17861 #if DB_VERSION_MAJOR > 1
17862         {
17863                 char *version;
17864                 int major, minor, patch;
17865
17866                 version = db_version( &major, &minor, &patch );
17867
17868                 if( major != DB_VERSION_MAJOR ||
17869                         minor < DB_VERSION_MINOR )
17870                 {
17871                         printf("Berkeley DB version mismatch\n"
17872                                 "\theader: %s\n\tlibrary: %s\n",
17873                                 DB_VERSION_STRING, version);
17874                         return 1;
17875                 }
17876         }
17877 #endif
17878
17879 #if DB_VERSION_MAJOR > 2
17880         db_env_create( NULL, 0 );
17881 #elif DB_VERSION_MAJOR > 1
17882         db_appexit( NULL );
17883 #else
17884         (void) dbopen( NULL, 0, 0, 0, NULL);
17885 #endif
17886
17887 ; return 0; }
17888 EOF
17889 if { (eval echo configure:17890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17890   rm -rf conftest*
17891   ol_cv_db_db_3=yes
17892 else
17893   echo "configure: failed program was:" >&5
17894   cat conftest.$ac_ext >&5
17895   rm -rf conftest*
17896   ol_cv_db_db_3=no
17897 fi
17898 rm -f conftest*
17899
17900         LIBS="$ol_LIBS"
17901
17902 fi
17903
17904 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17905
17906         if test $ol_cv_db_db_3 = yes ; then
17907                 ol_cv_lib_db=-ldb-3
17908         fi
17909 fi
17910
17911 if test $ol_cv_lib_db = no ; then
17912         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17913 echo "configure:17914: checking for Berkeley DB link (-ldb2)" >&5
17914 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17915   echo $ac_n "(cached) $ac_c" 1>&6
17916 else
17917   
17918         ol_DB_LIB=-ldb2
17919         ol_LIBS=$LIBS
17920         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
17921
17922         cat > conftest.$ac_ext <<EOF
17923 #line 17924 "configure"
17924 #include "confdefs.h"
17925
17926 #ifdef HAVE_DB_185_H
17927 # include <db_185.h>
17928 #else
17929 # include <db.h>
17930 #endif
17931
17932 #ifndef DB_VERSION_MAJOR
17933 # define DB_VERSION_MAJOR 1
17934 #endif
17935
17936 #ifndef NULL
17937 #define NULL ((void*)0)
17938 #endif
17939
17940 int main() {
17941
17942 #if DB_VERSION_MAJOR > 1
17943         {
17944                 char *version;
17945                 int major, minor, patch;
17946
17947                 version = db_version( &major, &minor, &patch );
17948
17949                 if( major != DB_VERSION_MAJOR ||
17950                         minor < DB_VERSION_MINOR )
17951                 {
17952                         printf("Berkeley DB version mismatch\n"
17953                                 "\theader: %s\n\tlibrary: %s\n",
17954                                 DB_VERSION_STRING, version);
17955                         return 1;
17956                 }
17957         }
17958 #endif
17959
17960 #if DB_VERSION_MAJOR > 2
17961         db_env_create( NULL, 0 );
17962 #elif DB_VERSION_MAJOR > 1
17963         db_appexit( NULL );
17964 #else
17965         (void) dbopen( NULL, 0, 0, 0, NULL);
17966 #endif
17967
17968 ; return 0; }
17969 EOF
17970 if { (eval echo configure:17971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17971   rm -rf conftest*
17972   ol_cv_db_db2=yes
17973 else
17974   echo "configure: failed program was:" >&5
17975   cat conftest.$ac_ext >&5
17976   rm -rf conftest*
17977   ol_cv_db_db2=no
17978 fi
17979 rm -f conftest*
17980
17981         LIBS="$ol_LIBS"
17982
17983 fi
17984
17985 echo "$ac_t""$ol_cv_db_db2" 1>&6
17986
17987         if test $ol_cv_db_db2 = yes ; then
17988                 ol_cv_lib_db=-ldb2
17989         fi
17990 fi
17991
17992 if test $ol_cv_lib_db = no ; then
17993         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17994 echo "configure:17995: checking for Berkeley DB link (-ldb-2)" >&5
17995 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17996   echo $ac_n "(cached) $ac_c" 1>&6
17997 else
17998   
17999         ol_DB_LIB=-ldb-2
18000         ol_LIBS=$LIBS
18001         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18002
18003         cat > conftest.$ac_ext <<EOF
18004 #line 18005 "configure"
18005 #include "confdefs.h"
18006
18007 #ifdef HAVE_DB_185_H
18008 # include <db_185.h>
18009 #else
18010 # include <db.h>
18011 #endif
18012
18013 #ifndef DB_VERSION_MAJOR
18014 # define DB_VERSION_MAJOR 1
18015 #endif
18016
18017 #ifndef NULL
18018 #define NULL ((void*)0)
18019 #endif
18020
18021 int main() {
18022
18023 #if DB_VERSION_MAJOR > 1
18024         {
18025                 char *version;
18026                 int major, minor, patch;
18027
18028                 version = db_version( &major, &minor, &patch );
18029
18030                 if( major != DB_VERSION_MAJOR ||
18031                         minor < DB_VERSION_MINOR )
18032                 {
18033                         printf("Berkeley DB version mismatch\n"
18034                                 "\theader: %s\n\tlibrary: %s\n",
18035                                 DB_VERSION_STRING, version);
18036                         return 1;
18037                 }
18038         }
18039 #endif
18040
18041 #if DB_VERSION_MAJOR > 2
18042         db_env_create( NULL, 0 );
18043 #elif DB_VERSION_MAJOR > 1
18044         db_appexit( NULL );
18045 #else
18046         (void) dbopen( NULL, 0, 0, 0, NULL);
18047 #endif
18048
18049 ; return 0; }
18050 EOF
18051 if { (eval echo configure:18052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18052   rm -rf conftest*
18053   ol_cv_db_db_2=yes
18054 else
18055   echo "configure: failed program was:" >&5
18056   cat conftest.$ac_ext >&5
18057   rm -rf conftest*
18058   ol_cv_db_db_2=no
18059 fi
18060 rm -f conftest*
18061
18062         LIBS="$ol_LIBS"
18063
18064 fi
18065
18066 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18067
18068         if test $ol_cv_db_db_2 = yes ; then
18069                 ol_cv_lib_db=-ldb-2
18070         fi
18071 fi
18072
18073 if test $ol_cv_lib_db = no ; then
18074         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18075 echo "configure:18076: checking for Berkeley DB link (-ldb1)" >&5
18076 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18077   echo $ac_n "(cached) $ac_c" 1>&6
18078 else
18079   
18080         ol_DB_LIB=-ldb1
18081         ol_LIBS=$LIBS
18082         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18083
18084         cat > conftest.$ac_ext <<EOF
18085 #line 18086 "configure"
18086 #include "confdefs.h"
18087
18088 #ifdef HAVE_DB_185_H
18089 # include <db_185.h>
18090 #else
18091 # include <db.h>
18092 #endif
18093
18094 #ifndef DB_VERSION_MAJOR
18095 # define DB_VERSION_MAJOR 1
18096 #endif
18097
18098 #ifndef NULL
18099 #define NULL ((void*)0)
18100 #endif
18101
18102 int main() {
18103
18104 #if DB_VERSION_MAJOR > 1
18105         {
18106                 char *version;
18107                 int major, minor, patch;
18108
18109                 version = db_version( &major, &minor, &patch );
18110
18111                 if( major != DB_VERSION_MAJOR ||
18112                         minor < DB_VERSION_MINOR )
18113                 {
18114                         printf("Berkeley DB version mismatch\n"
18115                                 "\theader: %s\n\tlibrary: %s\n",
18116                                 DB_VERSION_STRING, version);
18117                         return 1;
18118                 }
18119         }
18120 #endif
18121
18122 #if DB_VERSION_MAJOR > 2
18123         db_env_create( NULL, 0 );
18124 #elif DB_VERSION_MAJOR > 1
18125         db_appexit( NULL );
18126 #else
18127         (void) dbopen( NULL, 0, 0, 0, NULL);
18128 #endif
18129
18130 ; return 0; }
18131 EOF
18132 if { (eval echo configure:18133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18133   rm -rf conftest*
18134   ol_cv_db_db1=yes
18135 else
18136   echo "configure: failed program was:" >&5
18137   cat conftest.$ac_ext >&5
18138   rm -rf conftest*
18139   ol_cv_db_db1=no
18140 fi
18141 rm -f conftest*
18142
18143         LIBS="$ol_LIBS"
18144
18145 fi
18146
18147 echo "$ac_t""$ol_cv_db_db1" 1>&6
18148
18149         if test $ol_cv_db_db1 = yes ; then
18150                 ol_cv_lib_db=-ldb1
18151         fi
18152 fi
18153
18154 if test $ol_cv_lib_db = no ; then
18155         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18156 echo "configure:18157: checking for Berkeley DB link (-ldb-1)" >&5
18157 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18158   echo $ac_n "(cached) $ac_c" 1>&6
18159 else
18160   
18161         ol_DB_LIB=-ldb-1
18162         ol_LIBS=$LIBS
18163         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18164
18165         cat > conftest.$ac_ext <<EOF
18166 #line 18167 "configure"
18167 #include "confdefs.h"
18168
18169 #ifdef HAVE_DB_185_H
18170 # include <db_185.h>
18171 #else
18172 # include <db.h>
18173 #endif
18174
18175 #ifndef DB_VERSION_MAJOR
18176 # define DB_VERSION_MAJOR 1
18177 #endif
18178
18179 #ifndef NULL
18180 #define NULL ((void*)0)
18181 #endif
18182
18183 int main() {
18184
18185 #if DB_VERSION_MAJOR > 1
18186         {
18187                 char *version;
18188                 int major, minor, patch;
18189
18190                 version = db_version( &major, &minor, &patch );
18191
18192                 if( major != DB_VERSION_MAJOR ||
18193                         minor < DB_VERSION_MINOR )
18194                 {
18195                         printf("Berkeley DB version mismatch\n"
18196                                 "\theader: %s\n\tlibrary: %s\n",
18197                                 DB_VERSION_STRING, version);
18198                         return 1;
18199                 }
18200         }
18201 #endif
18202
18203 #if DB_VERSION_MAJOR > 2
18204         db_env_create( NULL, 0 );
18205 #elif DB_VERSION_MAJOR > 1
18206         db_appexit( NULL );
18207 #else
18208         (void) dbopen( NULL, 0, 0, 0, NULL);
18209 #endif
18210
18211 ; return 0; }
18212 EOF
18213 if { (eval echo configure:18214: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18214   rm -rf conftest*
18215   ol_cv_db_db_1=yes
18216 else
18217   echo "configure: failed program was:" >&5
18218   cat conftest.$ac_ext >&5
18219   rm -rf conftest*
18220   ol_cv_db_db_1=no
18221 fi
18222 rm -f conftest*
18223
18224         LIBS="$ol_LIBS"
18225
18226 fi
18227
18228 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18229
18230         if test $ol_cv_db_db_1 = yes ; then
18231                 ol_cv_lib_db=-ldb-1
18232         fi
18233 fi
18234
18235
18236                 if test "$ol_cv_lib_db" != no ; then
18237                         ol_cv_berkeley_db=yes
18238                 fi
18239         fi
18240 fi
18241
18242         else
18243                 ol_cv_berkeley_db=no
18244 for ac_hdr in db.h
18245 do
18246 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18247 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18248 echo "configure:18249: checking for $ac_hdr" >&5
18249 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18250   echo $ac_n "(cached) $ac_c" 1>&6
18251 else
18252   cat > conftest.$ac_ext <<EOF
18253 #line 18254 "configure"
18254 #include "confdefs.h"
18255 #include <$ac_hdr>
18256 EOF
18257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18258 { (eval echo configure:18259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18260 if test -z "$ac_err"; then
18261   rm -rf conftest*
18262   eval "ac_cv_header_$ac_safe=yes"
18263 else
18264   echo "$ac_err" >&5
18265   echo "configure: failed program was:" >&5
18266   cat conftest.$ac_ext >&5
18267   rm -rf conftest*
18268   eval "ac_cv_header_$ac_safe=no"
18269 fi
18270 rm -f conftest*
18271 fi
18272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18273   echo "$ac_t""yes" 1>&6
18274     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18275   cat >> confdefs.h <<EOF
18276 #define $ac_tr_hdr 1
18277 EOF
18278  
18279 else
18280   echo "$ac_t""no" 1>&6
18281 fi
18282 done
18283
18284 if test $ac_cv_header_db_h = yes; then
18285         ol_cv_lib_db=no
18286 if test $ol_cv_lib_db = no ; then
18287         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
18288 echo "configure:18289: checking for Berkeley DB link (default)" >&5
18289 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
18290   echo $ac_n "(cached) $ac_c" 1>&6
18291 else
18292   
18293         ol_DB_LIB=
18294         ol_LIBS=$LIBS
18295         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18296
18297         cat > conftest.$ac_ext <<EOF
18298 #line 18299 "configure"
18299 #include "confdefs.h"
18300
18301 #ifdef HAVE_DB_185_H
18302 # include <db_185.h>
18303 #else
18304 # include <db.h>
18305 #endif
18306
18307 #ifndef DB_VERSION_MAJOR
18308 # define DB_VERSION_MAJOR 1
18309 #endif
18310
18311 #ifndef NULL
18312 #define NULL ((void*)0)
18313 #endif
18314
18315 int main() {
18316
18317 #if DB_VERSION_MAJOR > 1
18318         {
18319                 char *version;
18320                 int major, minor, patch;
18321
18322                 version = db_version( &major, &minor, &patch );
18323
18324                 if( major != DB_VERSION_MAJOR ||
18325                         minor < DB_VERSION_MINOR )
18326                 {
18327                         printf("Berkeley DB version mismatch\n"
18328                                 "\theader: %s\n\tlibrary: %s\n",
18329                                 DB_VERSION_STRING, version);
18330                         return 1;
18331                 }
18332         }
18333 #endif
18334
18335 #if DB_VERSION_MAJOR > 2
18336         db_env_create( NULL, 0 );
18337 #elif DB_VERSION_MAJOR > 1
18338         db_appexit( NULL );
18339 #else
18340         (void) dbopen( NULL, 0, 0, 0, NULL);
18341 #endif
18342
18343 ; return 0; }
18344 EOF
18345 if { (eval echo configure:18346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18346   rm -rf conftest*
18347   ol_cv_db_none=yes
18348 else
18349   echo "configure: failed program was:" >&5
18350   cat conftest.$ac_ext >&5
18351   rm -rf conftest*
18352   ol_cv_db_none=no
18353 fi
18354 rm -f conftest*
18355
18356         LIBS="$ol_LIBS"
18357
18358 fi
18359
18360 echo "$ac_t""$ol_cv_db_none" 1>&6
18361
18362         if test $ol_cv_db_none = yes ; then
18363                 ol_cv_lib_db=yes
18364         fi
18365 fi
18366
18367 if test $ol_cv_lib_db = no ; then
18368         echo $ac_n "checking for Berkeley DB link (-ldb42)""... $ac_c" 1>&6
18369 echo "configure:18370: checking for Berkeley DB link (-ldb42)" >&5
18370 if eval "test \"\${ol_cv_db_db42+set}\" = set"; then
18371   echo $ac_n "(cached) $ac_c" 1>&6
18372 else
18373   
18374         ol_DB_LIB=-ldb42
18375         ol_LIBS=$LIBS
18376         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18377
18378         cat > conftest.$ac_ext <<EOF
18379 #line 18380 "configure"
18380 #include "confdefs.h"
18381
18382 #ifdef HAVE_DB_185_H
18383 # include <db_185.h>
18384 #else
18385 # include <db.h>
18386 #endif
18387
18388 #ifndef DB_VERSION_MAJOR
18389 # define DB_VERSION_MAJOR 1
18390 #endif
18391
18392 #ifndef NULL
18393 #define NULL ((void*)0)
18394 #endif
18395
18396 int main() {
18397
18398 #if DB_VERSION_MAJOR > 1
18399         {
18400                 char *version;
18401                 int major, minor, patch;
18402
18403                 version = db_version( &major, &minor, &patch );
18404
18405                 if( major != DB_VERSION_MAJOR ||
18406                         minor < DB_VERSION_MINOR )
18407                 {
18408                         printf("Berkeley DB version mismatch\n"
18409                                 "\theader: %s\n\tlibrary: %s\n",
18410                                 DB_VERSION_STRING, version);
18411                         return 1;
18412                 }
18413         }
18414 #endif
18415
18416 #if DB_VERSION_MAJOR > 2
18417         db_env_create( NULL, 0 );
18418 #elif DB_VERSION_MAJOR > 1
18419         db_appexit( NULL );
18420 #else
18421         (void) dbopen( NULL, 0, 0, 0, NULL);
18422 #endif
18423
18424 ; return 0; }
18425 EOF
18426 if { (eval echo configure:18427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18427   rm -rf conftest*
18428   ol_cv_db_db42=yes
18429 else
18430   echo "configure: failed program was:" >&5
18431   cat conftest.$ac_ext >&5
18432   rm -rf conftest*
18433   ol_cv_db_db42=no
18434 fi
18435 rm -f conftest*
18436
18437         LIBS="$ol_LIBS"
18438
18439 fi
18440
18441 echo "$ac_t""$ol_cv_db_db42" 1>&6
18442
18443         if test $ol_cv_db_db42 = yes ; then
18444                 ol_cv_lib_db=-ldb42
18445         fi
18446 fi
18447
18448 if test $ol_cv_lib_db = no ; then
18449         echo $ac_n "checking for Berkeley DB link (-ldb-42)""... $ac_c" 1>&6
18450 echo "configure:18451: checking for Berkeley DB link (-ldb-42)" >&5
18451 if eval "test \"\${ol_cv_db_db_42+set}\" = set"; then
18452   echo $ac_n "(cached) $ac_c" 1>&6
18453 else
18454   
18455         ol_DB_LIB=-ldb-42
18456         ol_LIBS=$LIBS
18457         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18458
18459         cat > conftest.$ac_ext <<EOF
18460 #line 18461 "configure"
18461 #include "confdefs.h"
18462
18463 #ifdef HAVE_DB_185_H
18464 # include <db_185.h>
18465 #else
18466 # include <db.h>
18467 #endif
18468
18469 #ifndef DB_VERSION_MAJOR
18470 # define DB_VERSION_MAJOR 1
18471 #endif
18472
18473 #ifndef NULL
18474 #define NULL ((void*)0)
18475 #endif
18476
18477 int main() {
18478
18479 #if DB_VERSION_MAJOR > 1
18480         {
18481                 char *version;
18482                 int major, minor, patch;
18483
18484                 version = db_version( &major, &minor, &patch );
18485
18486                 if( major != DB_VERSION_MAJOR ||
18487                         minor < DB_VERSION_MINOR )
18488                 {
18489                         printf("Berkeley DB version mismatch\n"
18490                                 "\theader: %s\n\tlibrary: %s\n",
18491                                 DB_VERSION_STRING, version);
18492                         return 1;
18493                 }
18494         }
18495 #endif
18496
18497 #if DB_VERSION_MAJOR > 2
18498         db_env_create( NULL, 0 );
18499 #elif DB_VERSION_MAJOR > 1
18500         db_appexit( NULL );
18501 #else
18502         (void) dbopen( NULL, 0, 0, 0, NULL);
18503 #endif
18504
18505 ; return 0; }
18506 EOF
18507 if { (eval echo configure:18508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18508   rm -rf conftest*
18509   ol_cv_db_db_42=yes
18510 else
18511   echo "configure: failed program was:" >&5
18512   cat conftest.$ac_ext >&5
18513   rm -rf conftest*
18514   ol_cv_db_db_42=no
18515 fi
18516 rm -f conftest*
18517
18518         LIBS="$ol_LIBS"
18519
18520 fi
18521
18522 echo "$ac_t""$ol_cv_db_db_42" 1>&6
18523
18524         if test $ol_cv_db_db_42 = yes ; then
18525                 ol_cv_lib_db=-ldb-42
18526         fi
18527 fi
18528
18529 if test $ol_cv_lib_db = no ; then
18530         echo $ac_n "checking for Berkeley DB link (-ldb-4.2)""... $ac_c" 1>&6
18531 echo "configure:18532: checking for Berkeley DB link (-ldb-4.2)" >&5
18532 if eval "test \"\${ol_cv_db_db_4_dot_2+set}\" = set"; then
18533   echo $ac_n "(cached) $ac_c" 1>&6
18534 else
18535   
18536         ol_DB_LIB=-ldb-4.2
18537         ol_LIBS=$LIBS
18538         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18539
18540         cat > conftest.$ac_ext <<EOF
18541 #line 18542 "configure"
18542 #include "confdefs.h"
18543
18544 #ifdef HAVE_DB_185_H
18545 # include <db_185.h>
18546 #else
18547 # include <db.h>
18548 #endif
18549
18550 #ifndef DB_VERSION_MAJOR
18551 # define DB_VERSION_MAJOR 1
18552 #endif
18553
18554 #ifndef NULL
18555 #define NULL ((void*)0)
18556 #endif
18557
18558 int main() {
18559
18560 #if DB_VERSION_MAJOR > 1
18561         {
18562                 char *version;
18563                 int major, minor, patch;
18564
18565                 version = db_version( &major, &minor, &patch );
18566
18567                 if( major != DB_VERSION_MAJOR ||
18568                         minor < DB_VERSION_MINOR )
18569                 {
18570                         printf("Berkeley DB version mismatch\n"
18571                                 "\theader: %s\n\tlibrary: %s\n",
18572                                 DB_VERSION_STRING, version);
18573                         return 1;
18574                 }
18575         }
18576 #endif
18577
18578 #if DB_VERSION_MAJOR > 2
18579         db_env_create( NULL, 0 );
18580 #elif DB_VERSION_MAJOR > 1
18581         db_appexit( NULL );
18582 #else
18583         (void) dbopen( NULL, 0, 0, 0, NULL);
18584 #endif
18585
18586 ; return 0; }
18587 EOF
18588 if { (eval echo configure:18589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18589   rm -rf conftest*
18590   ol_cv_db_db_4_dot_2=yes
18591 else
18592   echo "configure: failed program was:" >&5
18593   cat conftest.$ac_ext >&5
18594   rm -rf conftest*
18595   ol_cv_db_db_4_dot_2=no
18596 fi
18597 rm -f conftest*
18598
18599         LIBS="$ol_LIBS"
18600
18601 fi
18602
18603 echo "$ac_t""$ol_cv_db_db_4_dot_2" 1>&6
18604
18605         if test $ol_cv_db_db_4_dot_2 = yes ; then
18606                 ol_cv_lib_db=-ldb-4.2
18607         fi
18608 fi
18609
18610 if test $ol_cv_lib_db = no ; then
18611         echo $ac_n "checking for Berkeley DB link (-ldb-4-2)""... $ac_c" 1>&6
18612 echo "configure:18613: checking for Berkeley DB link (-ldb-4-2)" >&5
18613 if eval "test \"\${ol_cv_db_db_4_2+set}\" = set"; then
18614   echo $ac_n "(cached) $ac_c" 1>&6
18615 else
18616   
18617         ol_DB_LIB=-ldb-4-2
18618         ol_LIBS=$LIBS
18619         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18620
18621         cat > conftest.$ac_ext <<EOF
18622 #line 18623 "configure"
18623 #include "confdefs.h"
18624
18625 #ifdef HAVE_DB_185_H
18626 # include <db_185.h>
18627 #else
18628 # include <db.h>
18629 #endif
18630
18631 #ifndef DB_VERSION_MAJOR
18632 # define DB_VERSION_MAJOR 1
18633 #endif
18634
18635 #ifndef NULL
18636 #define NULL ((void*)0)
18637 #endif
18638
18639 int main() {
18640
18641 #if DB_VERSION_MAJOR > 1
18642         {
18643                 char *version;
18644                 int major, minor, patch;
18645
18646                 version = db_version( &major, &minor, &patch );
18647
18648                 if( major != DB_VERSION_MAJOR ||
18649                         minor < DB_VERSION_MINOR )
18650                 {
18651                         printf("Berkeley DB version mismatch\n"
18652                                 "\theader: %s\n\tlibrary: %s\n",
18653                                 DB_VERSION_STRING, version);
18654                         return 1;
18655                 }
18656         }
18657 #endif
18658
18659 #if DB_VERSION_MAJOR > 2
18660         db_env_create( NULL, 0 );
18661 #elif DB_VERSION_MAJOR > 1
18662         db_appexit( NULL );
18663 #else
18664         (void) dbopen( NULL, 0, 0, 0, NULL);
18665 #endif
18666
18667 ; return 0; }
18668 EOF
18669 if { (eval echo configure:18670: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18670   rm -rf conftest*
18671   ol_cv_db_db_4_2=yes
18672 else
18673   echo "configure: failed program was:" >&5
18674   cat conftest.$ac_ext >&5
18675   rm -rf conftest*
18676   ol_cv_db_db_4_2=no
18677 fi
18678 rm -f conftest*
18679
18680         LIBS="$ol_LIBS"
18681
18682 fi
18683
18684 echo "$ac_t""$ol_cv_db_db_4_2" 1>&6
18685
18686         if test $ol_cv_db_db_4_2 = yes ; then
18687                 ol_cv_lib_db=-ldb-4-2
18688         fi
18689 fi
18690
18691 if test $ol_cv_lib_db = no ; then
18692         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18693 echo "configure:18694: checking for Berkeley DB link (-ldb-4)" >&5
18694 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18695   echo $ac_n "(cached) $ac_c" 1>&6
18696 else
18697   
18698         ol_DB_LIB=-ldb-4
18699         ol_LIBS=$LIBS
18700         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18701
18702         cat > conftest.$ac_ext <<EOF
18703 #line 18704 "configure"
18704 #include "confdefs.h"
18705
18706 #ifdef HAVE_DB_185_H
18707 # include <db_185.h>
18708 #else
18709 # include <db.h>
18710 #endif
18711
18712 #ifndef DB_VERSION_MAJOR
18713 # define DB_VERSION_MAJOR 1
18714 #endif
18715
18716 #ifndef NULL
18717 #define NULL ((void*)0)
18718 #endif
18719
18720 int main() {
18721
18722 #if DB_VERSION_MAJOR > 1
18723         {
18724                 char *version;
18725                 int major, minor, patch;
18726
18727                 version = db_version( &major, &minor, &patch );
18728
18729                 if( major != DB_VERSION_MAJOR ||
18730                         minor < DB_VERSION_MINOR )
18731                 {
18732                         printf("Berkeley DB version mismatch\n"
18733                                 "\theader: %s\n\tlibrary: %s\n",
18734                                 DB_VERSION_STRING, version);
18735                         return 1;
18736                 }
18737         }
18738 #endif
18739
18740 #if DB_VERSION_MAJOR > 2
18741         db_env_create( NULL, 0 );
18742 #elif DB_VERSION_MAJOR > 1
18743         db_appexit( NULL );
18744 #else
18745         (void) dbopen( NULL, 0, 0, 0, NULL);
18746 #endif
18747
18748 ; return 0; }
18749 EOF
18750 if { (eval echo configure:18751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18751   rm -rf conftest*
18752   ol_cv_db_db_4=yes
18753 else
18754   echo "configure: failed program was:" >&5
18755   cat conftest.$ac_ext >&5
18756   rm -rf conftest*
18757   ol_cv_db_db_4=no
18758 fi
18759 rm -f conftest*
18760
18761         LIBS="$ol_LIBS"
18762
18763 fi
18764
18765 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18766
18767         if test $ol_cv_db_db_4 = yes ; then
18768                 ol_cv_lib_db=-ldb-4
18769         fi
18770 fi
18771
18772 if test $ol_cv_lib_db = no ; then
18773         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
18774 echo "configure:18775: checking for Berkeley DB link (-ldb4)" >&5
18775 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
18776   echo $ac_n "(cached) $ac_c" 1>&6
18777 else
18778   
18779         ol_DB_LIB=-ldb4
18780         ol_LIBS=$LIBS
18781         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18782
18783         cat > conftest.$ac_ext <<EOF
18784 #line 18785 "configure"
18785 #include "confdefs.h"
18786
18787 #ifdef HAVE_DB_185_H
18788 # include <db_185.h>
18789 #else
18790 # include <db.h>
18791 #endif
18792
18793 #ifndef DB_VERSION_MAJOR
18794 # define DB_VERSION_MAJOR 1
18795 #endif
18796
18797 #ifndef NULL
18798 #define NULL ((void*)0)
18799 #endif
18800
18801 int main() {
18802
18803 #if DB_VERSION_MAJOR > 1
18804         {
18805                 char *version;
18806                 int major, minor, patch;
18807
18808                 version = db_version( &major, &minor, &patch );
18809
18810                 if( major != DB_VERSION_MAJOR ||
18811                         minor < DB_VERSION_MINOR )
18812                 {
18813                         printf("Berkeley DB version mismatch\n"
18814                                 "\theader: %s\n\tlibrary: %s\n",
18815                                 DB_VERSION_STRING, version);
18816                         return 1;
18817                 }
18818         }
18819 #endif
18820
18821 #if DB_VERSION_MAJOR > 2
18822         db_env_create( NULL, 0 );
18823 #elif DB_VERSION_MAJOR > 1
18824         db_appexit( NULL );
18825 #else
18826         (void) dbopen( NULL, 0, 0, 0, NULL);
18827 #endif
18828
18829 ; return 0; }
18830 EOF
18831 if { (eval echo configure:18832: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18832   rm -rf conftest*
18833   ol_cv_db_db4=yes
18834 else
18835   echo "configure: failed program was:" >&5
18836   cat conftest.$ac_ext >&5
18837   rm -rf conftest*
18838   ol_cv_db_db4=no
18839 fi
18840 rm -f conftest*
18841
18842         LIBS="$ol_LIBS"
18843
18844 fi
18845
18846 echo "$ac_t""$ol_cv_db_db4" 1>&6
18847
18848         if test $ol_cv_db_db4 = yes ; then
18849                 ol_cv_lib_db=-ldb4
18850         fi
18851 fi
18852
18853 if test $ol_cv_lib_db = no ; then
18854         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18855 echo "configure:18856: checking for Berkeley DB link (-ldb)" >&5
18856 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18857   echo $ac_n "(cached) $ac_c" 1>&6
18858 else
18859   
18860         ol_DB_LIB=-ldb
18861         ol_LIBS=$LIBS
18862         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18863
18864         cat > conftest.$ac_ext <<EOF
18865 #line 18866 "configure"
18866 #include "confdefs.h"
18867
18868 #ifdef HAVE_DB_185_H
18869 # include <db_185.h>
18870 #else
18871 # include <db.h>
18872 #endif
18873
18874 #ifndef DB_VERSION_MAJOR
18875 # define DB_VERSION_MAJOR 1
18876 #endif
18877
18878 #ifndef NULL
18879 #define NULL ((void*)0)
18880 #endif
18881
18882 int main() {
18883
18884 #if DB_VERSION_MAJOR > 1
18885         {
18886                 char *version;
18887                 int major, minor, patch;
18888
18889                 version = db_version( &major, &minor, &patch );
18890
18891                 if( major != DB_VERSION_MAJOR ||
18892                         minor < DB_VERSION_MINOR )
18893                 {
18894                         printf("Berkeley DB version mismatch\n"
18895                                 "\theader: %s\n\tlibrary: %s\n",
18896                                 DB_VERSION_STRING, version);
18897                         return 1;
18898                 }
18899         }
18900 #endif
18901
18902 #if DB_VERSION_MAJOR > 2
18903         db_env_create( NULL, 0 );
18904 #elif DB_VERSION_MAJOR > 1
18905         db_appexit( NULL );
18906 #else
18907         (void) dbopen( NULL, 0, 0, 0, NULL);
18908 #endif
18909
18910 ; return 0; }
18911 EOF
18912 if { (eval echo configure:18913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18913   rm -rf conftest*
18914   ol_cv_db_db=yes
18915 else
18916   echo "configure: failed program was:" >&5
18917   cat conftest.$ac_ext >&5
18918   rm -rf conftest*
18919   ol_cv_db_db=no
18920 fi
18921 rm -f conftest*
18922
18923         LIBS="$ol_LIBS"
18924
18925 fi
18926
18927 echo "$ac_t""$ol_cv_db_db" 1>&6
18928
18929         if test $ol_cv_db_db = yes ; then
18930                 ol_cv_lib_db=-ldb
18931         fi
18932 fi
18933
18934 if test $ol_cv_lib_db = no ; then
18935         echo $ac_n "checking for Berkeley DB link (-ldb41)""... $ac_c" 1>&6
18936 echo "configure:18937: checking for Berkeley DB link (-ldb41)" >&5
18937 if eval "test \"\${ol_cv_db_db41+set}\" = set"; then
18938   echo $ac_n "(cached) $ac_c" 1>&6
18939 else
18940   
18941         ol_DB_LIB=-ldb41
18942         ol_LIBS=$LIBS
18943         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
18944
18945         cat > conftest.$ac_ext <<EOF
18946 #line 18947 "configure"
18947 #include "confdefs.h"
18948
18949 #ifdef HAVE_DB_185_H
18950 # include <db_185.h>
18951 #else
18952 # include <db.h>
18953 #endif
18954
18955 #ifndef DB_VERSION_MAJOR
18956 # define DB_VERSION_MAJOR 1
18957 #endif
18958
18959 #ifndef NULL
18960 #define NULL ((void*)0)
18961 #endif
18962
18963 int main() {
18964
18965 #if DB_VERSION_MAJOR > 1
18966         {
18967                 char *version;
18968                 int major, minor, patch;
18969
18970                 version = db_version( &major, &minor, &patch );
18971
18972                 if( major != DB_VERSION_MAJOR ||
18973                         minor < DB_VERSION_MINOR )
18974                 {
18975                         printf("Berkeley DB version mismatch\n"
18976                                 "\theader: %s\n\tlibrary: %s\n",
18977                                 DB_VERSION_STRING, version);
18978                         return 1;
18979                 }
18980         }
18981 #endif
18982
18983 #if DB_VERSION_MAJOR > 2
18984         db_env_create( NULL, 0 );
18985 #elif DB_VERSION_MAJOR > 1
18986         db_appexit( NULL );
18987 #else
18988         (void) dbopen( NULL, 0, 0, 0, NULL);
18989 #endif
18990
18991 ; return 0; }
18992 EOF
18993 if { (eval echo configure:18994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18994   rm -rf conftest*
18995   ol_cv_db_db41=yes
18996 else
18997   echo "configure: failed program was:" >&5
18998   cat conftest.$ac_ext >&5
18999   rm -rf conftest*
19000   ol_cv_db_db41=no
19001 fi
19002 rm -f conftest*
19003
19004         LIBS="$ol_LIBS"
19005
19006 fi
19007
19008 echo "$ac_t""$ol_cv_db_db41" 1>&6
19009
19010         if test $ol_cv_db_db41 = yes ; then
19011                 ol_cv_lib_db=-ldb41
19012         fi
19013 fi
19014
19015 if test $ol_cv_lib_db = no ; then
19016         echo $ac_n "checking for Berkeley DB link (-ldb-41)""... $ac_c" 1>&6
19017 echo "configure:19018: checking for Berkeley DB link (-ldb-41)" >&5
19018 if eval "test \"\${ol_cv_db_db_41+set}\" = set"; then
19019   echo $ac_n "(cached) $ac_c" 1>&6
19020 else
19021   
19022         ol_DB_LIB=-ldb-41
19023         ol_LIBS=$LIBS
19024         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19025
19026         cat > conftest.$ac_ext <<EOF
19027 #line 19028 "configure"
19028 #include "confdefs.h"
19029
19030 #ifdef HAVE_DB_185_H
19031 # include <db_185.h>
19032 #else
19033 # include <db.h>
19034 #endif
19035
19036 #ifndef DB_VERSION_MAJOR
19037 # define DB_VERSION_MAJOR 1
19038 #endif
19039
19040 #ifndef NULL
19041 #define NULL ((void*)0)
19042 #endif
19043
19044 int main() {
19045
19046 #if DB_VERSION_MAJOR > 1
19047         {
19048                 char *version;
19049                 int major, minor, patch;
19050
19051                 version = db_version( &major, &minor, &patch );
19052
19053                 if( major != DB_VERSION_MAJOR ||
19054                         minor < DB_VERSION_MINOR )
19055                 {
19056                         printf("Berkeley DB version mismatch\n"
19057                                 "\theader: %s\n\tlibrary: %s\n",
19058                                 DB_VERSION_STRING, version);
19059                         return 1;
19060                 }
19061         }
19062 #endif
19063
19064 #if DB_VERSION_MAJOR > 2
19065         db_env_create( NULL, 0 );
19066 #elif DB_VERSION_MAJOR > 1
19067         db_appexit( NULL );
19068 #else
19069         (void) dbopen( NULL, 0, 0, 0, NULL);
19070 #endif
19071
19072 ; return 0; }
19073 EOF
19074 if { (eval echo configure:19075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19075   rm -rf conftest*
19076   ol_cv_db_db_41=yes
19077 else
19078   echo "configure: failed program was:" >&5
19079   cat conftest.$ac_ext >&5
19080   rm -rf conftest*
19081   ol_cv_db_db_41=no
19082 fi
19083 rm -f conftest*
19084
19085         LIBS="$ol_LIBS"
19086
19087 fi
19088
19089 echo "$ac_t""$ol_cv_db_db_41" 1>&6
19090
19091         if test $ol_cv_db_db_41 = yes ; then
19092                 ol_cv_lib_db=-ldb-41
19093         fi
19094 fi
19095
19096 if test $ol_cv_lib_db = no ; then
19097         echo $ac_n "checking for Berkeley DB link (-ldb-4.1)""... $ac_c" 1>&6
19098 echo "configure:19099: checking for Berkeley DB link (-ldb-4.1)" >&5
19099 if eval "test \"\${ol_cv_db_db_4_dot_1+set}\" = set"; then
19100   echo $ac_n "(cached) $ac_c" 1>&6
19101 else
19102   
19103         ol_DB_LIB=-ldb-4.1
19104         ol_LIBS=$LIBS
19105         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19106
19107         cat > conftest.$ac_ext <<EOF
19108 #line 19109 "configure"
19109 #include "confdefs.h"
19110
19111 #ifdef HAVE_DB_185_H
19112 # include <db_185.h>
19113 #else
19114 # include <db.h>
19115 #endif
19116
19117 #ifndef DB_VERSION_MAJOR
19118 # define DB_VERSION_MAJOR 1
19119 #endif
19120
19121 #ifndef NULL
19122 #define NULL ((void*)0)
19123 #endif
19124
19125 int main() {
19126
19127 #if DB_VERSION_MAJOR > 1
19128         {
19129                 char *version;
19130                 int major, minor, patch;
19131
19132                 version = db_version( &major, &minor, &patch );
19133
19134                 if( major != DB_VERSION_MAJOR ||
19135                         minor < DB_VERSION_MINOR )
19136                 {
19137                         printf("Berkeley DB version mismatch\n"
19138                                 "\theader: %s\n\tlibrary: %s\n",
19139                                 DB_VERSION_STRING, version);
19140                         return 1;
19141                 }
19142         }
19143 #endif
19144
19145 #if DB_VERSION_MAJOR > 2
19146         db_env_create( NULL, 0 );
19147 #elif DB_VERSION_MAJOR > 1
19148         db_appexit( NULL );
19149 #else
19150         (void) dbopen( NULL, 0, 0, 0, NULL);
19151 #endif
19152
19153 ; return 0; }
19154 EOF
19155 if { (eval echo configure:19156: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19156   rm -rf conftest*
19157   ol_cv_db_db_4_dot_1=yes
19158 else
19159   echo "configure: failed program was:" >&5
19160   cat conftest.$ac_ext >&5
19161   rm -rf conftest*
19162   ol_cv_db_db_4_dot_1=no
19163 fi
19164 rm -f conftest*
19165
19166         LIBS="$ol_LIBS"
19167
19168 fi
19169
19170 echo "$ac_t""$ol_cv_db_db_4_dot_1" 1>&6
19171
19172         if test $ol_cv_db_db_4_dot_1 = yes ; then
19173                 ol_cv_lib_db=-ldb-4.1
19174         fi
19175 fi
19176
19177 if test $ol_cv_lib_db = no ; then
19178         echo $ac_n "checking for Berkeley DB link (-ldb-4-1)""... $ac_c" 1>&6
19179 echo "configure:19180: checking for Berkeley DB link (-ldb-4-1)" >&5
19180 if eval "test \"\${ol_cv_db_db_4_1+set}\" = set"; then
19181   echo $ac_n "(cached) $ac_c" 1>&6
19182 else
19183   
19184         ol_DB_LIB=-ldb-4-1
19185         ol_LIBS=$LIBS
19186         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19187
19188         cat > conftest.$ac_ext <<EOF
19189 #line 19190 "configure"
19190 #include "confdefs.h"
19191
19192 #ifdef HAVE_DB_185_H
19193 # include <db_185.h>
19194 #else
19195 # include <db.h>
19196 #endif
19197
19198 #ifndef DB_VERSION_MAJOR
19199 # define DB_VERSION_MAJOR 1
19200 #endif
19201
19202 #ifndef NULL
19203 #define NULL ((void*)0)
19204 #endif
19205
19206 int main() {
19207
19208 #if DB_VERSION_MAJOR > 1
19209         {
19210                 char *version;
19211                 int major, minor, patch;
19212
19213                 version = db_version( &major, &minor, &patch );
19214
19215                 if( major != DB_VERSION_MAJOR ||
19216                         minor < DB_VERSION_MINOR )
19217                 {
19218                         printf("Berkeley DB version mismatch\n"
19219                                 "\theader: %s\n\tlibrary: %s\n",
19220                                 DB_VERSION_STRING, version);
19221                         return 1;
19222                 }
19223         }
19224 #endif
19225
19226 #if DB_VERSION_MAJOR > 2
19227         db_env_create( NULL, 0 );
19228 #elif DB_VERSION_MAJOR > 1
19229         db_appexit( NULL );
19230 #else
19231         (void) dbopen( NULL, 0, 0, 0, NULL);
19232 #endif
19233
19234 ; return 0; }
19235 EOF
19236 if { (eval echo configure:19237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19237   rm -rf conftest*
19238   ol_cv_db_db_4_1=yes
19239 else
19240   echo "configure: failed program was:" >&5
19241   cat conftest.$ac_ext >&5
19242   rm -rf conftest*
19243   ol_cv_db_db_4_1=no
19244 fi
19245 rm -f conftest*
19246
19247         LIBS="$ol_LIBS"
19248
19249 fi
19250
19251 echo "$ac_t""$ol_cv_db_db_4_1" 1>&6
19252
19253         if test $ol_cv_db_db_4_1 = yes ; then
19254                 ol_cv_lib_db=-ldb-4-1
19255         fi
19256 fi
19257
19258 if test $ol_cv_lib_db = no ; then
19259         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
19260 echo "configure:19261: checking for Berkeley DB link (-ldb3)" >&5
19261 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
19262   echo $ac_n "(cached) $ac_c" 1>&6
19263 else
19264   
19265         ol_DB_LIB=-ldb3
19266         ol_LIBS=$LIBS
19267         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19268
19269         cat > conftest.$ac_ext <<EOF
19270 #line 19271 "configure"
19271 #include "confdefs.h"
19272
19273 #ifdef HAVE_DB_185_H
19274 # include <db_185.h>
19275 #else
19276 # include <db.h>
19277 #endif
19278
19279 #ifndef DB_VERSION_MAJOR
19280 # define DB_VERSION_MAJOR 1
19281 #endif
19282
19283 #ifndef NULL
19284 #define NULL ((void*)0)
19285 #endif
19286
19287 int main() {
19288
19289 #if DB_VERSION_MAJOR > 1
19290         {
19291                 char *version;
19292                 int major, minor, patch;
19293
19294                 version = db_version( &major, &minor, &patch );
19295
19296                 if( major != DB_VERSION_MAJOR ||
19297                         minor < DB_VERSION_MINOR )
19298                 {
19299                         printf("Berkeley DB version mismatch\n"
19300                                 "\theader: %s\n\tlibrary: %s\n",
19301                                 DB_VERSION_STRING, version);
19302                         return 1;
19303                 }
19304         }
19305 #endif
19306
19307 #if DB_VERSION_MAJOR > 2
19308         db_env_create( NULL, 0 );
19309 #elif DB_VERSION_MAJOR > 1
19310         db_appexit( NULL );
19311 #else
19312         (void) dbopen( NULL, 0, 0, 0, NULL);
19313 #endif
19314
19315 ; return 0; }
19316 EOF
19317 if { (eval echo configure:19318: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19318   rm -rf conftest*
19319   ol_cv_db_db3=yes
19320 else
19321   echo "configure: failed program was:" >&5
19322   cat conftest.$ac_ext >&5
19323   rm -rf conftest*
19324   ol_cv_db_db3=no
19325 fi
19326 rm -f conftest*
19327
19328         LIBS="$ol_LIBS"
19329
19330 fi
19331
19332 echo "$ac_t""$ol_cv_db_db3" 1>&6
19333
19334         if test $ol_cv_db_db3 = yes ; then
19335                 ol_cv_lib_db=-ldb3
19336         fi
19337 fi
19338
19339 if test $ol_cv_lib_db = no ; then
19340         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
19341 echo "configure:19342: checking for Berkeley DB link (-ldb-3)" >&5
19342 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
19343   echo $ac_n "(cached) $ac_c" 1>&6
19344 else
19345   
19346         ol_DB_LIB=-ldb-3
19347         ol_LIBS=$LIBS
19348         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19349
19350         cat > conftest.$ac_ext <<EOF
19351 #line 19352 "configure"
19352 #include "confdefs.h"
19353
19354 #ifdef HAVE_DB_185_H
19355 # include <db_185.h>
19356 #else
19357 # include <db.h>
19358 #endif
19359
19360 #ifndef DB_VERSION_MAJOR
19361 # define DB_VERSION_MAJOR 1
19362 #endif
19363
19364 #ifndef NULL
19365 #define NULL ((void*)0)
19366 #endif
19367
19368 int main() {
19369
19370 #if DB_VERSION_MAJOR > 1
19371         {
19372                 char *version;
19373                 int major, minor, patch;
19374
19375                 version = db_version( &major, &minor, &patch );
19376
19377                 if( major != DB_VERSION_MAJOR ||
19378                         minor < DB_VERSION_MINOR )
19379                 {
19380                         printf("Berkeley DB version mismatch\n"
19381                                 "\theader: %s\n\tlibrary: %s\n",
19382                                 DB_VERSION_STRING, version);
19383                         return 1;
19384                 }
19385         }
19386 #endif
19387
19388 #if DB_VERSION_MAJOR > 2
19389         db_env_create( NULL, 0 );
19390 #elif DB_VERSION_MAJOR > 1
19391         db_appexit( NULL );
19392 #else
19393         (void) dbopen( NULL, 0, 0, 0, NULL);
19394 #endif
19395
19396 ; return 0; }
19397 EOF
19398 if { (eval echo configure:19399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19399   rm -rf conftest*
19400   ol_cv_db_db_3=yes
19401 else
19402   echo "configure: failed program was:" >&5
19403   cat conftest.$ac_ext >&5
19404   rm -rf conftest*
19405   ol_cv_db_db_3=no
19406 fi
19407 rm -f conftest*
19408
19409         LIBS="$ol_LIBS"
19410
19411 fi
19412
19413 echo "$ac_t""$ol_cv_db_db_3" 1>&6
19414
19415         if test $ol_cv_db_db_3 = yes ; then
19416                 ol_cv_lib_db=-ldb-3
19417         fi
19418 fi
19419
19420 if test $ol_cv_lib_db = no ; then
19421         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
19422 echo "configure:19423: checking for Berkeley DB link (-ldb2)" >&5
19423 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
19424   echo $ac_n "(cached) $ac_c" 1>&6
19425 else
19426   
19427         ol_DB_LIB=-ldb2
19428         ol_LIBS=$LIBS
19429         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19430
19431         cat > conftest.$ac_ext <<EOF
19432 #line 19433 "configure"
19433 #include "confdefs.h"
19434
19435 #ifdef HAVE_DB_185_H
19436 # include <db_185.h>
19437 #else
19438 # include <db.h>
19439 #endif
19440
19441 #ifndef DB_VERSION_MAJOR
19442 # define DB_VERSION_MAJOR 1
19443 #endif
19444
19445 #ifndef NULL
19446 #define NULL ((void*)0)
19447 #endif
19448
19449 int main() {
19450
19451 #if DB_VERSION_MAJOR > 1
19452         {
19453                 char *version;
19454                 int major, minor, patch;
19455
19456                 version = db_version( &major, &minor, &patch );
19457
19458                 if( major != DB_VERSION_MAJOR ||
19459                         minor < DB_VERSION_MINOR )
19460                 {
19461                         printf("Berkeley DB version mismatch\n"
19462                                 "\theader: %s\n\tlibrary: %s\n",
19463                                 DB_VERSION_STRING, version);
19464                         return 1;
19465                 }
19466         }
19467 #endif
19468
19469 #if DB_VERSION_MAJOR > 2
19470         db_env_create( NULL, 0 );
19471 #elif DB_VERSION_MAJOR > 1
19472         db_appexit( NULL );
19473 #else
19474         (void) dbopen( NULL, 0, 0, 0, NULL);
19475 #endif
19476
19477 ; return 0; }
19478 EOF
19479 if { (eval echo configure:19480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19480   rm -rf conftest*
19481   ol_cv_db_db2=yes
19482 else
19483   echo "configure: failed program was:" >&5
19484   cat conftest.$ac_ext >&5
19485   rm -rf conftest*
19486   ol_cv_db_db2=no
19487 fi
19488 rm -f conftest*
19489
19490         LIBS="$ol_LIBS"
19491
19492 fi
19493
19494 echo "$ac_t""$ol_cv_db_db2" 1>&6
19495
19496         if test $ol_cv_db_db2 = yes ; then
19497                 ol_cv_lib_db=-ldb2
19498         fi
19499 fi
19500
19501 if test $ol_cv_lib_db = no ; then
19502         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
19503 echo "configure:19504: checking for Berkeley DB link (-ldb-2)" >&5
19504 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
19505   echo $ac_n "(cached) $ac_c" 1>&6
19506 else
19507   
19508         ol_DB_LIB=-ldb-2
19509         ol_LIBS=$LIBS
19510         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19511
19512         cat > conftest.$ac_ext <<EOF
19513 #line 19514 "configure"
19514 #include "confdefs.h"
19515
19516 #ifdef HAVE_DB_185_H
19517 # include <db_185.h>
19518 #else
19519 # include <db.h>
19520 #endif
19521
19522 #ifndef DB_VERSION_MAJOR
19523 # define DB_VERSION_MAJOR 1
19524 #endif
19525
19526 #ifndef NULL
19527 #define NULL ((void*)0)
19528 #endif
19529
19530 int main() {
19531
19532 #if DB_VERSION_MAJOR > 1
19533         {
19534                 char *version;
19535                 int major, minor, patch;
19536
19537                 version = db_version( &major, &minor, &patch );
19538
19539                 if( major != DB_VERSION_MAJOR ||
19540                         minor < DB_VERSION_MINOR )
19541                 {
19542                         printf("Berkeley DB version mismatch\n"
19543                                 "\theader: %s\n\tlibrary: %s\n",
19544                                 DB_VERSION_STRING, version);
19545                         return 1;
19546                 }
19547         }
19548 #endif
19549
19550 #if DB_VERSION_MAJOR > 2
19551         db_env_create( NULL, 0 );
19552 #elif DB_VERSION_MAJOR > 1
19553         db_appexit( NULL );
19554 #else
19555         (void) dbopen( NULL, 0, 0, 0, NULL);
19556 #endif
19557
19558 ; return 0; }
19559 EOF
19560 if { (eval echo configure:19561: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19561   rm -rf conftest*
19562   ol_cv_db_db_2=yes
19563 else
19564   echo "configure: failed program was:" >&5
19565   cat conftest.$ac_ext >&5
19566   rm -rf conftest*
19567   ol_cv_db_db_2=no
19568 fi
19569 rm -f conftest*
19570
19571         LIBS="$ol_LIBS"
19572
19573 fi
19574
19575 echo "$ac_t""$ol_cv_db_db_2" 1>&6
19576
19577         if test $ol_cv_db_db_2 = yes ; then
19578                 ol_cv_lib_db=-ldb-2
19579         fi
19580 fi
19581
19582 if test $ol_cv_lib_db = no ; then
19583         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
19584 echo "configure:19585: checking for Berkeley DB link (-ldb1)" >&5
19585 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
19586   echo $ac_n "(cached) $ac_c" 1>&6
19587 else
19588   
19589         ol_DB_LIB=-ldb1
19590         ol_LIBS=$LIBS
19591         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19592
19593         cat > conftest.$ac_ext <<EOF
19594 #line 19595 "configure"
19595 #include "confdefs.h"
19596
19597 #ifdef HAVE_DB_185_H
19598 # include <db_185.h>
19599 #else
19600 # include <db.h>
19601 #endif
19602
19603 #ifndef DB_VERSION_MAJOR
19604 # define DB_VERSION_MAJOR 1
19605 #endif
19606
19607 #ifndef NULL
19608 #define NULL ((void*)0)
19609 #endif
19610
19611 int main() {
19612
19613 #if DB_VERSION_MAJOR > 1
19614         {
19615                 char *version;
19616                 int major, minor, patch;
19617
19618                 version = db_version( &major, &minor, &patch );
19619
19620                 if( major != DB_VERSION_MAJOR ||
19621                         minor < DB_VERSION_MINOR )
19622                 {
19623                         printf("Berkeley DB version mismatch\n"
19624                                 "\theader: %s\n\tlibrary: %s\n",
19625                                 DB_VERSION_STRING, version);
19626                         return 1;
19627                 }
19628         }
19629 #endif
19630
19631 #if DB_VERSION_MAJOR > 2
19632         db_env_create( NULL, 0 );
19633 #elif DB_VERSION_MAJOR > 1
19634         db_appexit( NULL );
19635 #else
19636         (void) dbopen( NULL, 0, 0, 0, NULL);
19637 #endif
19638
19639 ; return 0; }
19640 EOF
19641 if { (eval echo configure:19642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19642   rm -rf conftest*
19643   ol_cv_db_db1=yes
19644 else
19645   echo "configure: failed program was:" >&5
19646   cat conftest.$ac_ext >&5
19647   rm -rf conftest*
19648   ol_cv_db_db1=no
19649 fi
19650 rm -f conftest*
19651
19652         LIBS="$ol_LIBS"
19653
19654 fi
19655
19656 echo "$ac_t""$ol_cv_db_db1" 1>&6
19657
19658         if test $ol_cv_db_db1 = yes ; then
19659                 ol_cv_lib_db=-ldb1
19660         fi
19661 fi
19662
19663 if test $ol_cv_lib_db = no ; then
19664         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
19665 echo "configure:19666: checking for Berkeley DB link (-ldb-1)" >&5
19666 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
19667   echo $ac_n "(cached) $ac_c" 1>&6
19668 else
19669   
19670         ol_DB_LIB=-ldb-1
19671         ol_LIBS=$LIBS
19672         LIBS="$ol_DB_LIB $LTHREAD_LIBS $LIBS"
19673
19674         cat > conftest.$ac_ext <<EOF
19675 #line 19676 "configure"
19676 #include "confdefs.h"
19677
19678 #ifdef HAVE_DB_185_H
19679 # include <db_185.h>
19680 #else
19681 # include <db.h>
19682 #endif
19683
19684 #ifndef DB_VERSION_MAJOR
19685 # define DB_VERSION_MAJOR 1
19686 #endif
19687
19688 #ifndef NULL
19689 #define NULL ((void*)0)
19690 #endif
19691
19692 int main() {
19693
19694 #if DB_VERSION_MAJOR > 1
19695         {
19696                 char *version;
19697                 int major, minor, patch;
19698
19699                 version = db_version( &major, &minor, &patch );
19700
19701                 if( major != DB_VERSION_MAJOR ||
19702                         minor < DB_VERSION_MINOR )
19703                 {
19704                         printf("Berkeley DB version mismatch\n"
19705                                 "\theader: %s\n\tlibrary: %s\n",
19706                                 DB_VERSION_STRING, version);
19707                         return 1;
19708                 }
19709         }
19710 #endif
19711
19712 #if DB_VERSION_MAJOR > 2
19713         db_env_create( NULL, 0 );
19714 #elif DB_VERSION_MAJOR > 1
19715         db_appexit( NULL );
19716 #else
19717         (void) dbopen( NULL, 0, 0, 0, NULL);
19718 #endif
19719
19720 ; return 0; }
19721 EOF
19722 if { (eval echo configure:19723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19723   rm -rf conftest*
19724   ol_cv_db_db_1=yes
19725 else
19726   echo "configure: failed program was:" >&5
19727   cat conftest.$ac_ext >&5
19728   rm -rf conftest*
19729   ol_cv_db_db_1=no
19730 fi
19731 rm -f conftest*
19732
19733         LIBS="$ol_LIBS"
19734
19735 fi
19736
19737 echo "$ac_t""$ol_cv_db_db_1" 1>&6
19738
19739         if test $ol_cv_db_db_1 = yes ; then
19740                 ol_cv_lib_db=-ldb-1
19741         fi
19742 fi
19743
19744
19745         if test "$ol_cv_lib_db" != no ; then
19746                 ol_cv_berkeley_db=yes
19747                 echo $ac_n "checking for Berkeley DB version match""... $ac_c" 1>&6
19748 echo "configure:19749: checking for Berkeley DB version match" >&5
19749 if eval "test \"\${ol_cv_berkeley_db_version+set}\" = set"; then
19750   echo $ac_n "(cached) $ac_c" 1>&6
19751 else
19752   
19753         ol_LIBS="$LIBS"
19754         LIBS="$LTHREAD_LIBS $LIBS"
19755         if test $ol_cv_lib_db != yes ; then
19756                 LIBS="$ol_cv_lib_db $LIBS"
19757         fi
19758
19759         if test "$cross_compiling" = yes; then
19760   ol_cv_berkeley_db_version=cross
19761 else
19762   cat > conftest.$ac_ext <<EOF
19763 #line 19764 "configure"
19764 #include "confdefs.h"
19765
19766 #ifdef HAVE_DB_185_H
19767         choke me;
19768 #else
19769 #include <db.h>
19770 #endif
19771 #ifndef DB_VERSION_MAJOR
19772 # define DB_VERSION_MAJOR 1
19773 #endif
19774 #ifndef NULL
19775 #define NULL ((void *)0)
19776 #endif
19777 main()
19778 {
19779 #if DB_VERSION_MAJOR > 1
19780         char *version;
19781         int major, minor, patch;
19782
19783         version = db_version( &major, &minor, &patch );
19784
19785         if( major != DB_VERSION_MAJOR || minor < DB_VERSION_MINOR ) {
19786                 printf("Berkeley DB version mismatch\n"
19787                         "\theader: %s\n\tlibrary: %s\n",
19788                         DB_VERSION_STRING, version);
19789                 return 1;
19790         }
19791 #endif
19792
19793         return 0;
19794 }
19795 EOF
19796 if { (eval echo configure:19797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19797 then
19798   ol_cv_berkeley_db_version=yes
19799 else
19800   echo "configure: failed program was:" >&5
19801   cat conftest.$ac_ext >&5
19802   rm -fr conftest*
19803   ol_cv_berkeley_db_version=no
19804 fi
19805 rm -fr conftest*
19806 fi
19807
19808
19809         LIBS="$ol_LIBS"
19810
19811 fi
19812
19813 echo "$ac_t""$ol_cv_berkeley_db_version" 1>&6
19814
19815         if test $ol_cv_berkeley_db_version = no ; then
19816                 { echo "configure: error: Berkeley DB version mismatch" 1>&2; exit 1; }
19817         fi
19818
19819                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
19820 echo "configure:19821: checking for Berkeley DB thread support" >&5
19821 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
19822   echo $ac_n "(cached) $ac_c" 1>&6
19823 else
19824   
19825         ol_LIBS="$LIBS"
19826         LIBS="$LTHREAD_LIBS $LIBS"
19827         if test $ol_cv_lib_db != yes ; then
19828                 LIBS="$ol_cv_lib_db $LIBS"
19829         fi
19830
19831         if test "$cross_compiling" = yes; then
19832   ol_cv_berkeley_db_thread=cross
19833 else
19834   cat > conftest.$ac_ext <<EOF
19835 #line 19836 "configure"
19836 #include "confdefs.h"
19837
19838 #ifdef HAVE_DB_185_H
19839         choke me;
19840 #else
19841 #include <db.h>
19842 #endif
19843 #ifndef NULL
19844 #define NULL ((void *)0)
19845 #endif
19846 main()
19847 {
19848         int rc;
19849         u_int32_t flags = DB_CREATE |
19850 #ifdef DB_PRIVATE
19851                 DB_PRIVATE |
19852 #endif
19853                 DB_THREAD;
19854
19855 #if DB_VERSION_MAJOR > 2
19856         DB_ENV *env = NULL;
19857
19858         rc = db_env_create( &env, 0 );
19859
19860         flags |= DB_INIT_MPOOL;
19861 #ifdef DB_MPOOL_PRIVATE
19862         flags |= DB_MPOOL_PRIVATE;
19863 #endif
19864
19865         if( rc ) {
19866                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19867                 return rc;
19868         }
19869
19870 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
19871         rc = env->open( env, NULL, flags, 0 );
19872 #else
19873         rc = env->open( env, NULL, NULL, flags, 0 );
19874 #endif
19875
19876         if ( rc == 0 ) {
19877                 rc = env->close( env, 0 );
19878         }
19879
19880         if( rc ) {
19881                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
19882                 return rc;
19883         }
19884
19885 #else
19886         DB_ENV env;
19887         memset( &env, '\0', sizeof(env) );
19888
19889         rc = db_appinit( NULL, NULL, &env, flags );
19890
19891         if( rc == 0 ) {
19892                 db_appexit( &env );
19893         }
19894
19895         unlink("__db_mpool.share");
19896         unlink("__db_lock.share");
19897 #endif
19898
19899         return rc;
19900 }
19901 EOF
19902 if { (eval echo configure:19903: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19903 then
19904   ol_cv_berkeley_db_thread=yes
19905 else
19906   echo "configure: failed program was:" >&5
19907   cat conftest.$ac_ext >&5
19908   rm -fr conftest*
19909   ol_cv_berkeley_db_thread=no
19910 fi
19911 rm -fr conftest*
19912 fi
19913
19914
19915         LIBS="$ol_LIBS"
19916
19917 fi
19918
19919 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
19920
19921         if test $ol_cv_berkeley_db_thread != no ; then
19922                 cat >> confdefs.h <<\EOF
19923 #define HAVE_BERKELEY_DB_THREAD 1
19924 EOF
19925
19926         fi
19927
19928         fi
19929 fi
19930
19931         fi
19932
19933         if test $ol_cv_berkeley_db != no ; then
19934                 cat >> confdefs.h <<\EOF
19935 #define HAVE_BERKELEY_DB 1
19936 EOF
19937
19938
19939                 ol_link_ldbm=berkeley
19940                 ol_with_ldbm_api=berkeley
19941
19942                 if test $ol_with_ldbm_type = hash ; then
19943                         cat >> confdefs.h <<\EOF
19944 #define LDBM_USE_DBHASH 1
19945 EOF
19946
19947                 else
19948                         cat >> confdefs.h <<\EOF
19949 #define LDBM_USE_DBBTREE 1
19950 EOF
19951
19952                 fi
19953
19954                                                 if test $ol_cv_lib_db != yes ; then
19955                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
19956                 fi
19957         fi
19958 fi
19959
19960 if test $ol_enable_bdb != no -o $ol_enable_hdb != no; then
19961         if test $ol_link_ldbm != berkeley ; then
19962                 { echo "configure: error: BDB/HDB: BerkeleyDB not available" 1>&2; exit 1; }
19963         else
19964                 echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
19965 echo "configure:19966: checking Berkeley DB version for BDB backend" >&5
19966 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
19967   echo $ac_n "(cached) $ac_c" 1>&6
19968 else
19969   
19970         cat > conftest.$ac_ext <<EOF
19971 #line 19972 "configure"
19972 #include "confdefs.h"
19973
19974 #include <db.h>
19975
19976  /* this check could be improved */
19977 #ifndef DB_VERSION_MAJOR
19978 #       define DB_VERSION_MAJOR 1
19979 #endif
19980 #ifndef DB_VERSION_MINOR
19981 #       define DB_VERSION_MINOR 0
19982 #endif
19983
19984 /* require 4.2 or later */
19985 #if (DB_VERSION_MAJOR >= 4) && (DB_VERSION_MINOR >= 2)
19986         __db_version_compat
19987 #endif
19988         
19989 EOF
19990 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19991   egrep "__db_version_compat" >/dev/null 2>&1; then
19992   rm -rf conftest*
19993   ol_cv_bdb_compat=yes
19994 else
19995   rm -rf conftest*
19996   ol_cv_bdb_compat=no
19997 fi
19998 rm -f conftest*
19999
20000 fi
20001
20002 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
20003
20004
20005                 if test $ol_cv_bdb_compat != yes ; then
20006                         { echo "configure: error: BDB/HDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
20007                 fi
20008         fi
20009 fi
20010
20011 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
20012         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
20013         ol_with_ldbm_api=none
20014 fi
20015
20016 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
20017         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
20018 echo "configure:20019: checking for MDBM library" >&5
20019 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
20020   echo $ac_n "(cached) $ac_c" 1>&6
20021 else
20022         ol_LIBS="$LIBS"
20023         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
20024 echo "configure:20025: checking for mdbm_set_chain" >&5
20025 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
20026   echo $ac_n "(cached) $ac_c" 1>&6
20027 else
20028   cat > conftest.$ac_ext <<EOF
20029 #line 20030 "configure"
20030 #include "confdefs.h"
20031 /* System header to define __stub macros and hopefully few prototypes,
20032     which can conflict with char mdbm_set_chain(); below.  */
20033 #include <assert.h>
20034 /* Override any gcc2 internal prototype to avoid an error.  */
20035 /* We use char because int might match the return type of a gcc2
20036     builtin and then its argument prototype would still apply.  */
20037 char mdbm_set_chain();
20038 char (*f)();
20039
20040 int main() {
20041
20042 /* The GNU C library defines this for functions which it implements
20043     to always fail with ENOSYS.  Some functions are actually named
20044     something starting with __ and the normal name is an alias.  */
20045 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
20046 choke me
20047 #else
20048 f = mdbm_set_chain;
20049 #endif
20050
20051 ; return 0; }
20052 EOF
20053 if { (eval echo configure:20054: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20054   rm -rf conftest*
20055   eval "ac_cv_func_mdbm_set_chain=yes"
20056 else
20057   echo "configure: failed program was:" >&5
20058   cat conftest.$ac_ext >&5
20059   rm -rf conftest*
20060   eval "ac_cv_func_mdbm_set_chain=no"
20061 fi
20062 rm -f conftest*
20063 fi
20064
20065 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
20066   echo "$ac_t""yes" 1>&6
20067   ol_cv_lib_mdbm=yes
20068 else
20069   echo "$ac_t""no" 1>&6
20070
20071                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
20072 echo "configure:20073: checking for mdbm_set_chain in -lmdbm" >&5
20073 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
20074 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20075   echo $ac_n "(cached) $ac_c" 1>&6
20076 else
20077   ac_save_LIBS="$LIBS"
20078 LIBS="-lmdbm  $LIBS"
20079 cat > conftest.$ac_ext <<EOF
20080 #line 20081 "configure"
20081 #include "confdefs.h"
20082 /* Override any gcc2 internal prototype to avoid an error.  */
20083 /* We use char because int might match the return type of a gcc2
20084     builtin and then its argument prototype would still apply.  */
20085 char mdbm_set_chain();
20086
20087 int main() {
20088 mdbm_set_chain()
20089 ; return 0; }
20090 EOF
20091 if { (eval echo configure:20092: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20092   rm -rf conftest*
20093   eval "ac_cv_lib_$ac_lib_var=yes"
20094 else
20095   echo "configure: failed program was:" >&5
20096   cat conftest.$ac_ext >&5
20097   rm -rf conftest*
20098   eval "ac_cv_lib_$ac_lib_var=no"
20099 fi
20100 rm -f conftest*
20101 LIBS="$ac_save_LIBS"
20102
20103 fi
20104 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20105   echo "$ac_t""yes" 1>&6
20106   ol_cv_lib_mdbm=-lmdbm
20107 else
20108   echo "$ac_t""no" 1>&6
20109 ol_cv_lib_mdbm=no
20110 fi
20111
20112         
20113 fi
20114
20115         LIBS="$ol_LIBS"
20116
20117 fi
20118
20119 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
20120
20121
20122  for ac_hdr in mdbm.h
20123 do
20124 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20125 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20126 echo "configure:20127: checking for $ac_hdr" >&5
20127 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20128   echo $ac_n "(cached) $ac_c" 1>&6
20129 else
20130   cat > conftest.$ac_ext <<EOF
20131 #line 20132 "configure"
20132 #include "confdefs.h"
20133 #include <$ac_hdr>
20134 EOF
20135 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20136 { (eval echo configure:20137: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20137 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20138 if test -z "$ac_err"; then
20139   rm -rf conftest*
20140   eval "ac_cv_header_$ac_safe=yes"
20141 else
20142   echo "$ac_err" >&5
20143   echo "configure: failed program was:" >&5
20144   cat conftest.$ac_ext >&5
20145   rm -rf conftest*
20146   eval "ac_cv_header_$ac_safe=no"
20147 fi
20148 rm -f conftest*
20149 fi
20150 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20151   echo "$ac_t""yes" 1>&6
20152     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20153   cat >> confdefs.h <<EOF
20154 #define $ac_tr_hdr 1
20155 EOF
20156  
20157 else
20158   echo "$ac_t""no" 1>&6
20159 fi
20160 done
20161
20162  echo $ac_n "checking for db""... $ac_c" 1>&6
20163 echo "configure:20164: checking for db" >&5
20164 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
20165   echo $ac_n "(cached) $ac_c" 1>&6
20166 else
20167   
20168         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
20169                 ol_cv_mdbm=no
20170         else
20171                 ol_cv_mdbm=yes
20172         fi
20173
20174 fi
20175
20176 echo "$ac_t""$ol_cv_mdbm" 1>&6
20177  if test $ol_cv_mdbm = yes ; then
20178         cat >> confdefs.h <<\EOF
20179 #define HAVE_MDBM 1
20180 EOF
20181
20182  fi
20183
20184
20185         if test $ol_cv_mdbm = yes ; then
20186                 ol_link_ldbm=mdbm
20187                 ol_with_ldbm_api=mdbm
20188                 if test $ol_cv_lib_mdbm != yes ; then
20189                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
20190                 fi
20191         fi
20192 fi
20193
20194 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
20195         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
20196 echo "configure:20197: checking for GDBM library" >&5
20197 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
20198   echo $ac_n "(cached) $ac_c" 1>&6
20199 else
20200         ol_LIBS="$LIBS"
20201         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
20202 echo "configure:20203: checking for gdbm_open" >&5
20203 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
20204   echo $ac_n "(cached) $ac_c" 1>&6
20205 else
20206   cat > conftest.$ac_ext <<EOF
20207 #line 20208 "configure"
20208 #include "confdefs.h"
20209 /* System header to define __stub macros and hopefully few prototypes,
20210     which can conflict with char gdbm_open(); below.  */
20211 #include <assert.h>
20212 /* Override any gcc2 internal prototype to avoid an error.  */
20213 /* We use char because int might match the return type of a gcc2
20214     builtin and then its argument prototype would still apply.  */
20215 char gdbm_open();
20216 char (*f)();
20217
20218 int main() {
20219
20220 /* The GNU C library defines this for functions which it implements
20221     to always fail with ENOSYS.  Some functions are actually named
20222     something starting with __ and the normal name is an alias.  */
20223 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
20224 choke me
20225 #else
20226 f = gdbm_open;
20227 #endif
20228
20229 ; return 0; }
20230 EOF
20231 if { (eval echo configure:20232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20232   rm -rf conftest*
20233   eval "ac_cv_func_gdbm_open=yes"
20234 else
20235   echo "configure: failed program was:" >&5
20236   cat conftest.$ac_ext >&5
20237   rm -rf conftest*
20238   eval "ac_cv_func_gdbm_open=no"
20239 fi
20240 rm -f conftest*
20241 fi
20242
20243 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
20244   echo "$ac_t""yes" 1>&6
20245   ol_cv_lib_gdbm=yes
20246 else
20247   echo "$ac_t""no" 1>&6
20248
20249                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
20250 echo "configure:20251: checking for gdbm_open in -lgdbm" >&5
20251 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
20252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20253   echo $ac_n "(cached) $ac_c" 1>&6
20254 else
20255   ac_save_LIBS="$LIBS"
20256 LIBS="-lgdbm  $LIBS"
20257 cat > conftest.$ac_ext <<EOF
20258 #line 20259 "configure"
20259 #include "confdefs.h"
20260 /* Override any gcc2 internal prototype to avoid an error.  */
20261 /* We use char because int might match the return type of a gcc2
20262     builtin and then its argument prototype would still apply.  */
20263 char gdbm_open();
20264
20265 int main() {
20266 gdbm_open()
20267 ; return 0; }
20268 EOF
20269 if { (eval echo configure:20270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20270   rm -rf conftest*
20271   eval "ac_cv_lib_$ac_lib_var=yes"
20272 else
20273   echo "configure: failed program was:" >&5
20274   cat conftest.$ac_ext >&5
20275   rm -rf conftest*
20276   eval "ac_cv_lib_$ac_lib_var=no"
20277 fi
20278 rm -f conftest*
20279 LIBS="$ac_save_LIBS"
20280
20281 fi
20282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20283   echo "$ac_t""yes" 1>&6
20284   ol_cv_lib_gdbm=-lgdbm
20285 else
20286   echo "$ac_t""no" 1>&6
20287 ol_cv_lib_gdbm=no
20288 fi
20289
20290         
20291 fi
20292
20293         LIBS="$ol_LIBS"
20294
20295 fi
20296
20297 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
20298
20299
20300  for ac_hdr in gdbm.h
20301 do
20302 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20303 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20304 echo "configure:20305: checking for $ac_hdr" >&5
20305 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20306   echo $ac_n "(cached) $ac_c" 1>&6
20307 else
20308   cat > conftest.$ac_ext <<EOF
20309 #line 20310 "configure"
20310 #include "confdefs.h"
20311 #include <$ac_hdr>
20312 EOF
20313 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20314 { (eval echo configure:20315: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20315 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20316 if test -z "$ac_err"; then
20317   rm -rf conftest*
20318   eval "ac_cv_header_$ac_safe=yes"
20319 else
20320   echo "$ac_err" >&5
20321   echo "configure: failed program was:" >&5
20322   cat conftest.$ac_ext >&5
20323   rm -rf conftest*
20324   eval "ac_cv_header_$ac_safe=no"
20325 fi
20326 rm -f conftest*
20327 fi
20328 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20329   echo "$ac_t""yes" 1>&6
20330     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20331   cat >> confdefs.h <<EOF
20332 #define $ac_tr_hdr 1
20333 EOF
20334  
20335 else
20336   echo "$ac_t""no" 1>&6
20337 fi
20338 done
20339
20340  echo $ac_n "checking for db""... $ac_c" 1>&6
20341 echo "configure:20342: checking for db" >&5
20342 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
20343   echo $ac_n "(cached) $ac_c" 1>&6
20344 else
20345   
20346         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
20347                 ol_cv_gdbm=no
20348         else
20349                 ol_cv_gdbm=yes
20350         fi
20351
20352 fi
20353
20354 echo "$ac_t""$ol_cv_gdbm" 1>&6
20355  if test $ol_cv_gdbm = yes ; then
20356         cat >> confdefs.h <<\EOF
20357 #define HAVE_GDBM 1
20358 EOF
20359
20360  fi
20361
20362
20363         if test $ol_cv_gdbm = yes ; then
20364                 ol_link_ldbm=gdbm
20365                 ol_with_ldbm_api=gdbm
20366
20367                 if test $ol_cv_lib_gdbm != yes ; then
20368                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
20369                 fi
20370         fi
20371 fi
20372
20373 if test $ol_with_ldbm_api = ndbm ; then
20374         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
20375 echo "configure:20376: checking for NDBM library" >&5
20376 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
20377   echo $ac_n "(cached) $ac_c" 1>&6
20378 else
20379         ol_LIBS="$LIBS"
20380         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
20381 echo "configure:20382: checking for dbm_open" >&5
20382 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
20383   echo $ac_n "(cached) $ac_c" 1>&6
20384 else
20385   cat > conftest.$ac_ext <<EOF
20386 #line 20387 "configure"
20387 #include "confdefs.h"
20388 /* System header to define __stub macros and hopefully few prototypes,
20389     which can conflict with char dbm_open(); below.  */
20390 #include <assert.h>
20391 /* Override any gcc2 internal prototype to avoid an error.  */
20392 /* We use char because int might match the return type of a gcc2
20393     builtin and then its argument prototype would still apply.  */
20394 char dbm_open();
20395 char (*f)();
20396
20397 int main() {
20398
20399 /* The GNU C library defines this for functions which it implements
20400     to always fail with ENOSYS.  Some functions are actually named
20401     something starting with __ and the normal name is an alias.  */
20402 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
20403 choke me
20404 #else
20405 f = dbm_open;
20406 #endif
20407
20408 ; return 0; }
20409 EOF
20410 if { (eval echo configure:20411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20411   rm -rf conftest*
20412   eval "ac_cv_func_dbm_open=yes"
20413 else
20414   echo "configure: failed program was:" >&5
20415   cat conftest.$ac_ext >&5
20416   rm -rf conftest*
20417   eval "ac_cv_func_dbm_open=no"
20418 fi
20419 rm -f conftest*
20420 fi
20421
20422 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
20423   echo "$ac_t""yes" 1>&6
20424   ol_cv_lib_ndbm=yes
20425 else
20426   echo "$ac_t""no" 1>&6
20427
20428                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
20429 echo "configure:20430: checking for dbm_open in -lndbm" >&5
20430 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20431 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20432   echo $ac_n "(cached) $ac_c" 1>&6
20433 else
20434   ac_save_LIBS="$LIBS"
20435 LIBS="-lndbm  $LIBS"
20436 cat > conftest.$ac_ext <<EOF
20437 #line 20438 "configure"
20438 #include "confdefs.h"
20439 /* Override any gcc2 internal prototype to avoid an error.  */
20440 /* We use char because int might match the return type of a gcc2
20441     builtin and then its argument prototype would still apply.  */
20442 char dbm_open();
20443
20444 int main() {
20445 dbm_open()
20446 ; return 0; }
20447 EOF
20448 if { (eval echo configure:20449: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20449   rm -rf conftest*
20450   eval "ac_cv_lib_$ac_lib_var=yes"
20451 else
20452   echo "configure: failed program was:" >&5
20453   cat conftest.$ac_ext >&5
20454   rm -rf conftest*
20455   eval "ac_cv_lib_$ac_lib_var=no"
20456 fi
20457 rm -f conftest*
20458 LIBS="$ac_save_LIBS"
20459
20460 fi
20461 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20462   echo "$ac_t""yes" 1>&6
20463   ol_cv_lib_ndbm=-lndbm
20464 else
20465   echo "$ac_t""no" 1>&6
20466
20467                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
20468 echo "configure:20469: checking for dbm_open in -ldbm" >&5
20469 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
20470 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20471   echo $ac_n "(cached) $ac_c" 1>&6
20472 else
20473   ac_save_LIBS="$LIBS"
20474 LIBS="-ldbm  $LIBS"
20475 cat > conftest.$ac_ext <<EOF
20476 #line 20477 "configure"
20477 #include "confdefs.h"
20478 /* Override any gcc2 internal prototype to avoid an error.  */
20479 /* We use char because int might match the return type of a gcc2
20480     builtin and then its argument prototype would still apply.  */
20481 char dbm_open();
20482
20483 int main() {
20484 dbm_open()
20485 ; return 0; }
20486 EOF
20487 if { (eval echo configure:20488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20488   rm -rf conftest*
20489   eval "ac_cv_lib_$ac_lib_var=yes"
20490 else
20491   echo "configure: failed program was:" >&5
20492   cat conftest.$ac_ext >&5
20493   rm -rf conftest*
20494   eval "ac_cv_lib_$ac_lib_var=no"
20495 fi
20496 rm -f conftest*
20497 LIBS="$ac_save_LIBS"
20498
20499 fi
20500 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20501   echo "$ac_t""yes" 1>&6
20502   ol_cv_lib_ndbm=-ldbm
20503 else
20504   echo "$ac_t""no" 1>&6
20505 ol_cv_lib_ndbm=no
20506 fi
20507                 
20508 fi
20509
20510         
20511 fi
20512
20513         LIBS="$ol_LIBS"
20514
20515 fi
20516
20517 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
20518
20519
20520  for ac_hdr in ndbm.h
20521 do
20522 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20523 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20524 echo "configure:20525: checking for $ac_hdr" >&5
20525 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20526   echo $ac_n "(cached) $ac_c" 1>&6
20527 else
20528   cat > conftest.$ac_ext <<EOF
20529 #line 20530 "configure"
20530 #include "confdefs.h"
20531 #include <$ac_hdr>
20532 EOF
20533 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20534 { (eval echo configure:20535: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20535 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20536 if test -z "$ac_err"; then
20537   rm -rf conftest*
20538   eval "ac_cv_header_$ac_safe=yes"
20539 else
20540   echo "$ac_err" >&5
20541   echo "configure: failed program was:" >&5
20542   cat conftest.$ac_ext >&5
20543   rm -rf conftest*
20544   eval "ac_cv_header_$ac_safe=no"
20545 fi
20546 rm -f conftest*
20547 fi
20548 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20549   echo "$ac_t""yes" 1>&6
20550     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20551   cat >> confdefs.h <<EOF
20552 #define $ac_tr_hdr 1
20553 EOF
20554  
20555 else
20556   echo "$ac_t""no" 1>&6
20557 fi
20558 done
20559
20560  echo $ac_n "checking for db""... $ac_c" 1>&6
20561 echo "configure:20562: checking for db" >&5
20562 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
20563   echo $ac_n "(cached) $ac_c" 1>&6
20564 else
20565   
20566         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
20567                 ol_cv_ndbm=no
20568         else
20569                 ol_cv_ndbm=yes
20570         fi
20571
20572 fi
20573
20574 echo "$ac_t""$ol_cv_ndbm" 1>&6
20575  if test $ol_cv_ndbm = yes ; then
20576         cat >> confdefs.h <<\EOF
20577 #define HAVE_NDBM 1
20578 EOF
20579
20580  fi
20581
20582
20583         if test $ol_cv_ndbm = yes ; then
20584                 ol_link_ldbm=ndbm
20585                 ol_with_ldbm_api=ndbm
20586
20587                 if test $ol_cv_lib_ndbm != yes ; then
20588                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
20589                 fi
20590         fi
20591 fi
20592
20593 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
20594         { echo "configure: error: could not find suitable LDBM backend" 1>&2; exit 1; }
20595 fi
20596
20597 if test $ol_enable_bdb = yes -o \
20598         $ol_enable_hdb = yes -o \
20599         $ol_enable_ldbm = yes ; then
20600         SLAPD_LIBS="$SLAPD_LIBS \$(LDBM_LIBS)"
20601 fi
20602
20603
20604 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
20605         BUILD_LIBS_DYNAMIC=shared
20606         cat >> confdefs.h <<\EOF
20607 #define LDAP_LIBS_DYNAMIC 1
20608 EOF
20609
20610         LTSTATIC=""
20611 else
20612         BUILD_LIBS_DYNAMIC=static
20613         LTSTATIC="-static"
20614 fi
20615
20616 if test $ol_enable_wrappers != no ; then
20617         for ac_hdr in tcpd.h
20618 do
20619 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20620 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20621 echo "configure:20622: checking for $ac_hdr" >&5
20622 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20623   echo $ac_n "(cached) $ac_c" 1>&6
20624 else
20625   cat > conftest.$ac_ext <<EOF
20626 #line 20627 "configure"
20627 #include "confdefs.h"
20628 #include <$ac_hdr>
20629 EOF
20630 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20631 { (eval echo configure:20632: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20632 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20633 if test -z "$ac_err"; then
20634   rm -rf conftest*
20635   eval "ac_cv_header_$ac_safe=yes"
20636 else
20637   echo "$ac_err" >&5
20638   echo "configure: failed program was:" >&5
20639   cat conftest.$ac_ext >&5
20640   rm -rf conftest*
20641   eval "ac_cv_header_$ac_safe=no"
20642 fi
20643 rm -f conftest*
20644 fi
20645 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20646   echo "$ac_t""yes" 1>&6
20647     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20648   cat >> confdefs.h <<EOF
20649 #define $ac_tr_hdr 1
20650 EOF
20651  
20652                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
20653 echo "configure:20654: checking for TCP wrappers library" >&5
20654                 save_LIBS="$LIBS"
20655                 LIBS="$LIBS -lwrap"
20656                 cat > conftest.$ac_ext <<EOF
20657 #line 20658 "configure"
20658 #include "confdefs.h"
20659
20660 #include <tcpd.h>
20661 int allow_severity = 0;
20662 int deny_severity  = 0;
20663
20664 struct request_info *req;
20665                 
20666 int main() {
20667
20668 hosts_access(req)
20669                 
20670 ; return 0; }
20671 EOF
20672 if { (eval echo configure:20673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20673   rm -rf conftest*
20674   echo "$ac_t""-lwrap" 1>&6
20675                 have_wrappers=yes
20676                 LIBS="$save_LIBS"
20677 else
20678   echo "configure: failed program was:" >&5
20679   cat conftest.$ac_ext >&5
20680   rm -rf conftest*
20681   
20682                                 LIBS="$LIBS -lnsl"
20683                 cat > conftest.$ac_ext <<EOF
20684 #line 20685 "configure"
20685 #include "confdefs.h"
20686
20687 #include <tcpd.h>
20688 int allow_severity = 0;
20689 int deny_severity  = 0;
20690
20691 struct request_info *req;
20692                 
20693 int main() {
20694
20695 hosts_access(req)
20696                 
20697 ; return 0; }
20698 EOF
20699 if { (eval echo configure:20700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20700   rm -rf conftest*
20701   echo "$ac_t""-lwrap -lnsl" 1>&6
20702                 have_wrappers=yes
20703                 LIBS="$save_LIBS -lnsl"
20704 else
20705   echo "configure: failed program was:" >&5
20706   cat conftest.$ac_ext >&5
20707   rm -rf conftest*
20708   
20709                 echo "$ac_t""no" 1>&6
20710                 have_wrappers=no
20711                 LIBS=$save_LIBS
20712 fi
20713 rm -f conftest*
20714 fi
20715 rm -f conftest*
20716 else
20717   echo "$ac_t""no" 1>&6
20718 have_wrappers=no
20719 fi
20720 done
20721
20722
20723         if test $have_wrappers = yes ; then
20724                 cat >> confdefs.h <<\EOF
20725 #define HAVE_TCPD 1
20726 EOF
20727
20728                 WRAP_LIBS="-lwrap"
20729         elif test $ol_enable_wrappers = yes ; then
20730                 { echo "configure: error: could not find TCP wrappers, select apppropriate options or disable" 1>&2; exit 1; }
20731         else
20732                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
20733                 WRAP_LIBS=""
20734         fi
20735 fi
20736
20737 if test $ol_enable_syslog != no ; then
20738         echo $ac_n "checking for openlog""... $ac_c" 1>&6
20739 echo "configure:20740: checking for openlog" >&5
20740 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
20741   echo $ac_n "(cached) $ac_c" 1>&6
20742 else
20743   cat > conftest.$ac_ext <<EOF
20744 #line 20745 "configure"
20745 #include "confdefs.h"
20746 /* System header to define __stub macros and hopefully few prototypes,
20747     which can conflict with char openlog(); below.  */
20748 #include <assert.h>
20749 /* Override any gcc2 internal prototype to avoid an error.  */
20750 /* We use char because int might match the return type of a gcc2
20751     builtin and then its argument prototype would still apply.  */
20752 char openlog();
20753 char (*f)();
20754
20755 int main() {
20756
20757 /* The GNU C library defines this for functions which it implements
20758     to always fail with ENOSYS.  Some functions are actually named
20759     something starting with __ and the normal name is an alias.  */
20760 #if defined (__stub_openlog) || defined (__stub___openlog)
20761 choke me
20762 #else
20763 f = openlog;
20764 #endif
20765
20766 ; return 0; }
20767 EOF
20768 if { (eval echo configure:20769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20769   rm -rf conftest*
20770   eval "ac_cv_func_openlog=yes"
20771 else
20772   echo "configure: failed program was:" >&5
20773   cat conftest.$ac_ext >&5
20774   rm -rf conftest*
20775   eval "ac_cv_func_openlog=no"
20776 fi
20777 rm -f conftest*
20778 fi
20779
20780 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
20781   echo "$ac_t""yes" 1>&6
20782   :
20783 else
20784   echo "$ac_t""no" 1>&6
20785 fi
20786
20787         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
20788                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
20789         fi
20790         ol_enable_syslog=$ac_cv_func_openlog
20791 fi
20792
20793
20794 ol_link_sql=no
20795 if test $ol_enable_sql != no ; then
20796         for ac_hdr in sql.h sqlext.h
20797 do
20798 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20799 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20800 echo "configure:20801: checking for $ac_hdr" >&5
20801 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20802   echo $ac_n "(cached) $ac_c" 1>&6
20803 else
20804   cat > conftest.$ac_ext <<EOF
20805 #line 20806 "configure"
20806 #include "confdefs.h"
20807 #include <$ac_hdr>
20808 EOF
20809 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20810 { (eval echo configure:20811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20811 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20812 if test -z "$ac_err"; then
20813   rm -rf conftest*
20814   eval "ac_cv_header_$ac_safe=yes"
20815 else
20816   echo "$ac_err" >&5
20817   echo "configure: failed program was:" >&5
20818   cat conftest.$ac_ext >&5
20819   rm -rf conftest*
20820   eval "ac_cv_header_$ac_safe=no"
20821 fi
20822 rm -f conftest*
20823 fi
20824 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20825   echo "$ac_t""yes" 1>&6
20826     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20827   cat >> confdefs.h <<EOF
20828 #define $ac_tr_hdr 1
20829 EOF
20830  
20831 else
20832   echo "$ac_t""no" 1>&6
20833 { echo "configure: error: could not locate SQL headers" 1>&2; exit 1; }
20834         
20835 fi
20836 done
20837
20838
20839         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
20840 echo "configure:20841: checking for SQLDriverConnect in -liodbc" >&5
20841 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20842 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20843   echo $ac_n "(cached) $ac_c" 1>&6
20844 else
20845   ac_save_LIBS="$LIBS"
20846 LIBS="-liodbc  $LIBS"
20847 cat > conftest.$ac_ext <<EOF
20848 #line 20849 "configure"
20849 #include "confdefs.h"
20850 /* Override any gcc2 internal prototype to avoid an error.  */
20851 /* We use char because int might match the return type of a gcc2
20852     builtin and then its argument prototype would still apply.  */
20853 char SQLDriverConnect();
20854
20855 int main() {
20856 SQLDriverConnect()
20857 ; return 0; }
20858 EOF
20859 if { (eval echo configure:20860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20860   rm -rf conftest*
20861   eval "ac_cv_lib_$ac_lib_var=yes"
20862 else
20863   echo "configure: failed program was:" >&5
20864   cat conftest.$ac_ext >&5
20865   rm -rf conftest*
20866   eval "ac_cv_lib_$ac_lib_var=no"
20867 fi
20868 rm -f conftest*
20869 LIBS="$ac_save_LIBS"
20870
20871 fi
20872 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20873   echo "$ac_t""yes" 1>&6
20874   have_iodbc=yes
20875 else
20876   echo "$ac_t""no" 1>&6
20877 have_iodbc=no
20878 fi
20879
20880         if test $have_iodbc = yes ; then
20881                 ol_link_sql="-liodbc"
20882         else
20883                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
20884 echo "configure:20885: checking for SQLDriverConnect in -lodbc" >&5
20885 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
20886 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20887   echo $ac_n "(cached) $ac_c" 1>&6
20888 else
20889   ac_save_LIBS="$LIBS"
20890 LIBS="-lodbc  $LIBS"
20891 cat > conftest.$ac_ext <<EOF
20892 #line 20893 "configure"
20893 #include "confdefs.h"
20894 /* Override any gcc2 internal prototype to avoid an error.  */
20895 /* We use char because int might match the return type of a gcc2
20896     builtin and then its argument prototype would still apply.  */
20897 char SQLDriverConnect();
20898
20899 int main() {
20900 SQLDriverConnect()
20901 ; return 0; }
20902 EOF
20903 if { (eval echo configure:20904: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20904   rm -rf conftest*
20905   eval "ac_cv_lib_$ac_lib_var=yes"
20906 else
20907   echo "configure: failed program was:" >&5
20908   cat conftest.$ac_ext >&5
20909   rm -rf conftest*
20910   eval "ac_cv_lib_$ac_lib_var=no"
20911 fi
20912 rm -f conftest*
20913 LIBS="$ac_save_LIBS"
20914
20915 fi
20916 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20917   echo "$ac_t""yes" 1>&6
20918   have_odbc=yes
20919 else
20920   echo "$ac_t""no" 1>&6
20921 have_odbc=no
20922 fi
20923
20924                 if test $have_odbc = yes ; then
20925                         ol_link_sql="-lodbc"
20926                 fi
20927         fi
20928
20929         if test $ol_link_sql != no ; then
20930                 SLAPD_SQL_LIBS="$ol_link_sql"
20931
20932         elif test $ol_enable_sql != auto ; then
20933                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
20934         fi
20935 fi
20936
20937 WITH_SASL=no
20938 ol_link_sasl=no
20939 ol_link_spasswd=no
20940 if test $ol_with_cyrus_sasl != no ; then
20941         for ac_hdr in sasl/sasl.h sasl.h
20942 do
20943 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20944 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20945 echo "configure:20946: checking for $ac_hdr" >&5
20946 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20947   echo $ac_n "(cached) $ac_c" 1>&6
20948 else
20949   cat > conftest.$ac_ext <<EOF
20950 #line 20951 "configure"
20951 #include "confdefs.h"
20952 #include <$ac_hdr>
20953 EOF
20954 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20955 { (eval echo configure:20956: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20956 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20957 if test -z "$ac_err"; then
20958   rm -rf conftest*
20959   eval "ac_cv_header_$ac_safe=yes"
20960 else
20961   echo "$ac_err" >&5
20962   echo "configure: failed program was:" >&5
20963   cat conftest.$ac_ext >&5
20964   rm -rf conftest*
20965   eval "ac_cv_header_$ac_safe=no"
20966 fi
20967 rm -f conftest*
20968 fi
20969 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20970   echo "$ac_t""yes" 1>&6
20971     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20972   cat >> confdefs.h <<EOF
20973 #define $ac_tr_hdr 1
20974 EOF
20975  
20976 else
20977   echo "$ac_t""no" 1>&6
20978 fi
20979 done
20980
20981
20982         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
20983                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
20984 echo "configure:20985: checking for sasl_client_init in -lsasl2" >&5
20985 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20986 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20987   echo $ac_n "(cached) $ac_c" 1>&6
20988 else
20989   ac_save_LIBS="$LIBS"
20990 LIBS="-lsasl2  $LIBS"
20991 cat > conftest.$ac_ext <<EOF
20992 #line 20993 "configure"
20993 #include "confdefs.h"
20994 /* Override any gcc2 internal prototype to avoid an error.  */
20995 /* We use char because int might match the return type of a gcc2
20996     builtin and then its argument prototype would still apply.  */
20997 char sasl_client_init();
20998
20999 int main() {
21000 sasl_client_init()
21001 ; return 0; }
21002 EOF
21003 if { (eval echo configure:21004: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21004   rm -rf conftest*
21005   eval "ac_cv_lib_$ac_lib_var=yes"
21006 else
21007   echo "configure: failed program was:" >&5
21008   cat conftest.$ac_ext >&5
21009   rm -rf conftest*
21010   eval "ac_cv_lib_$ac_lib_var=no"
21011 fi
21012 rm -f conftest*
21013 LIBS="$ac_save_LIBS"
21014
21015 fi
21016 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21017   echo "$ac_t""yes" 1>&6
21018   ol_link_sasl="-lsasl2"
21019 else
21020   echo "$ac_t""no" 1>&6
21021 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
21022 echo "configure:21023: checking for sasl_client_init in -lsasl" >&5
21023 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
21024 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21025   echo $ac_n "(cached) $ac_c" 1>&6
21026 else
21027   ac_save_LIBS="$LIBS"
21028 LIBS="-lsasl  $LIBS"
21029 cat > conftest.$ac_ext <<EOF
21030 #line 21031 "configure"
21031 #include "confdefs.h"
21032 /* Override any gcc2 internal prototype to avoid an error.  */
21033 /* We use char because int might match the return type of a gcc2
21034     builtin and then its argument prototype would still apply.  */
21035 char sasl_client_init();
21036
21037 int main() {
21038 sasl_client_init()
21039 ; return 0; }
21040 EOF
21041 if { (eval echo configure:21042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21042   rm -rf conftest*
21043   eval "ac_cv_lib_$ac_lib_var=yes"
21044 else
21045   echo "configure: failed program was:" >&5
21046   cat conftest.$ac_ext >&5
21047   rm -rf conftest*
21048   eval "ac_cv_lib_$ac_lib_var=no"
21049 fi
21050 rm -f conftest*
21051 LIBS="$ac_save_LIBS"
21052
21053 fi
21054 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21055   echo "$ac_t""yes" 1>&6
21056   ol_link_sasl="-lsasl"
21057 else
21058   echo "$ac_t""no" 1>&6
21059 fi
21060
21061 fi
21062
21063         fi
21064
21065         if test $ol_link_sasl = no ; then
21066                 if test $ol_with_cyrus_sasl != auto ; then
21067                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
21068                 else
21069                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
21070                         echo "configure: warning: SASL authentication not supported!" 1>&2
21071                         if test $ol_link_tls = no ; then
21072                                 echo "configure: warning: Strong authentication not supported!" 1>&2
21073                         fi
21074                 fi
21075         else
21076                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
21077 echo "configure:21078: checking Cyrus SASL library version" >&5
21078 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
21079   echo $ac_n "(cached) $ac_c" 1>&6
21080 else
21081   
21082         cat > conftest.$ac_ext <<EOF
21083 #line 21084 "configure"
21084 #include "confdefs.h"
21085
21086 #ifdef HAVE_SASL_SASL_H
21087 #include <sasl/sasl.h>
21088 #else
21089 #include <sasl.h>
21090 #endif
21091
21092 /* Require 2.1.15+ */
21093 #if SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
21094         char *__sasl_compat = "2.2+ or better okay (we guess)";
21095 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
21096         && SASL_VERSION_STEP >=15
21097         char *__sasl_compat = "2.1.15+ or better okay";
21098 #endif
21099         
21100 EOF
21101 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21102   egrep "__sasl_compat" >/dev/null 2>&1; then
21103   rm -rf conftest*
21104   ol_cv_sasl_compat=yes
21105 else
21106   rm -rf conftest*
21107   ol_cv_sasl_compat=no
21108 fi
21109 rm -f conftest*
21110
21111 fi
21112
21113 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
21114
21115                 if test $ol_cv_sasl_compat = no ; then
21116                         ol_link_sasl=no
21117                         { echo "configure: error: Cyrus SASL library located but is incompatible" 1>&2; exit 1; }
21118                 fi
21119
21120                 cat >> confdefs.h <<\EOF
21121 #define HAVE_CYRUS_SASL 1
21122 EOF
21123
21124                 SASL_LIBS="$ol_link_sasl"
21125                 if test $ol_enable_spasswd != no ; then
21126                         ol_link_spasswd=yes
21127                 fi
21128
21129                 ac_save_LIBS="$LIBS"
21130                 LIBS="$LIBS $ol_link_sasl"
21131                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
21132 echo "configure:21133: checking for sasl_version" >&5
21133 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
21134   echo $ac_n "(cached) $ac_c" 1>&6
21135 else
21136   cat > conftest.$ac_ext <<EOF
21137 #line 21138 "configure"
21138 #include "confdefs.h"
21139 /* System header to define __stub macros and hopefully few prototypes,
21140     which can conflict with char sasl_version(); below.  */
21141 #include <assert.h>
21142 /* Override any gcc2 internal prototype to avoid an error.  */
21143 /* We use char because int might match the return type of a gcc2
21144     builtin and then its argument prototype would still apply.  */
21145 char sasl_version();
21146 char (*f)();
21147
21148 int main() {
21149
21150 /* The GNU C library defines this for functions which it implements
21151     to always fail with ENOSYS.  Some functions are actually named
21152     something starting with __ and the normal name is an alias.  */
21153 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
21154 choke me
21155 #else
21156 f = sasl_version;
21157 #endif
21158
21159 ; return 0; }
21160 EOF
21161 if { (eval echo configure:21162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21162   rm -rf conftest*
21163   eval "ac_cv_func_sasl_version=yes"
21164 else
21165   echo "configure: failed program was:" >&5
21166   cat conftest.$ac_ext >&5
21167   rm -rf conftest*
21168   eval "ac_cv_func_sasl_version=no"
21169 fi
21170 rm -f conftest*
21171 fi
21172
21173 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
21174   echo "$ac_t""yes" 1>&6
21175   cat >> confdefs.h <<\EOF
21176 #define HAVE_SASL_VERSION 1
21177 EOF
21178
21179 else
21180   echo "$ac_t""no" 1>&6
21181 fi
21182
21183                 LIBS="$ac_save_LIBS"
21184
21185                 WITH_SASL=yes
21186         fi
21187
21188 else
21189         echo "configure: warning: SASL authentication not supported!" 1>&2
21190         if test $ol_link_tls = no ; then
21191                 echo "configure: warning: Strong authentication not supported!" 1>&2
21192         fi
21193 fi
21194
21195 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
21196         dev=no
21197         if test -r /dev/urandom ; then
21198                 dev="/dev/urandom";
21199         elif test -r /idev/urandom ; then
21200                 dev="/idev/urandom";
21201         elif test -r /dev/srandom ; then
21202                 dev="/dev/srandom";
21203         elif test -r /dev/random ; then
21204                 dev="/dev/random";
21205         elif test -r /idev/random ; then
21206                 dev="/idev/random";
21207         fi
21208
21209         if test $dev != no ; then
21210                 cat >> confdefs.h <<EOF
21211 #define URANDOM_DEVICE "$dev"
21212 EOF
21213
21214         fi
21215 fi
21216
21217 ol_link_fetch=no
21218 if test $ol_with_fetch != no ; then
21219         ol_LIBS=$LIBS
21220 LIBS="-lfetch -lcom_err $LIBS"
21221 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
21222 echo "configure:21223: checking fetch(3) library" >&5
21223 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
21224   echo $ac_n "(cached) $ac_c" 1>&6
21225 else
21226   
21227         cat > conftest.$ac_ext <<EOF
21228 #line 21229 "configure"
21229 #include "confdefs.h"
21230
21231 #include <sys/param.h>
21232 #include <stdio.h>
21233 #include <fetch.h>
21234 int main() {
21235 struct url *u = fetchParseURL("file:///"); 
21236 ; return 0; }
21237 EOF
21238 if { (eval echo configure:21239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21239   rm -rf conftest*
21240   ol_cv_lib_fetch=yes
21241 else
21242   echo "configure: failed program was:" >&5
21243   cat conftest.$ac_ext >&5
21244   rm -rf conftest*
21245   ol_cv_lib_fetch=no
21246 fi
21247 rm -f conftest*
21248 fi
21249
21250 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
21251 LIBS=$ol_LIBS
21252 if test $ol_cv_lib_fetch != no ; then
21253         ol_link_fetch="-lfetch -lcom_err"
21254         cat >> confdefs.h <<\EOF
21255 #define HAVE_FETCH 1
21256 EOF
21257
21258 fi
21259
21260
21261         if test $ol_cv_lib_fetch != no ; then
21262                 LUTIL_LIBS="$LUTIL_LIBS $ol_link_fetch"
21263                 ol_link_fetch=freebsd
21264
21265         elif test $ol_with_fetch != auto ; then
21266                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
21267         fi 
21268 fi
21269
21270 if test $ol_enable_crypt != no ; then
21271         save_LIBS="$LIBS"
21272         LIBS="$TLS_LIBS $LIBS"
21273
21274         echo $ac_n "checking for crypt""... $ac_c" 1>&6
21275 echo "configure:21276: checking for crypt" >&5
21276 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
21277   echo $ac_n "(cached) $ac_c" 1>&6
21278 else
21279   cat > conftest.$ac_ext <<EOF
21280 #line 21281 "configure"
21281 #include "confdefs.h"
21282 /* System header to define __stub macros and hopefully few prototypes,
21283     which can conflict with char crypt(); below.  */
21284 #include <assert.h>
21285 /* Override any gcc2 internal prototype to avoid an error.  */
21286 /* We use char because int might match the return type of a gcc2
21287     builtin and then its argument prototype would still apply.  */
21288 char crypt();
21289 char (*f)();
21290
21291 int main() {
21292
21293 /* The GNU C library defines this for functions which it implements
21294     to always fail with ENOSYS.  Some functions are actually named
21295     something starting with __ and the normal name is an alias.  */
21296 #if defined (__stub_crypt) || defined (__stub___crypt)
21297 choke me
21298 #else
21299 f = crypt;
21300 #endif
21301
21302 ; return 0; }
21303 EOF
21304 if { (eval echo configure:21305: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21305   rm -rf conftest*
21306   eval "ac_cv_func_crypt=yes"
21307 else
21308   echo "configure: failed program was:" >&5
21309   cat conftest.$ac_ext >&5
21310   rm -rf conftest*
21311   eval "ac_cv_func_crypt=no"
21312 fi
21313 rm -f conftest*
21314 fi
21315
21316 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
21317   echo "$ac_t""yes" 1>&6
21318   have_crypt=yes
21319 else
21320   echo "$ac_t""no" 1>&6
21321
21322                 LIBS="$save_LIBS"
21323                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
21324 echo "configure:21325: checking for crypt in -lcrypt" >&5
21325 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
21326 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21327   echo $ac_n "(cached) $ac_c" 1>&6
21328 else
21329   ac_save_LIBS="$LIBS"
21330 LIBS="-lcrypt  $LIBS"
21331 cat > conftest.$ac_ext <<EOF
21332 #line 21333 "configure"
21333 #include "confdefs.h"
21334 /* Override any gcc2 internal prototype to avoid an error.  */
21335 /* We use char because int might match the return type of a gcc2
21336     builtin and then its argument prototype would still apply.  */
21337 char crypt();
21338
21339 int main() {
21340 crypt()
21341 ; return 0; }
21342 EOF
21343 if { (eval echo configure:21344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21344   rm -rf conftest*
21345   eval "ac_cv_lib_$ac_lib_var=yes"
21346 else
21347   echo "configure: failed program was:" >&5
21348   cat conftest.$ac_ext >&5
21349   rm -rf conftest*
21350   eval "ac_cv_lib_$ac_lib_var=no"
21351 fi
21352 rm -f conftest*
21353 LIBS="$ac_save_LIBS"
21354
21355 fi
21356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21357   echo "$ac_t""yes" 1>&6
21358   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
21359                         have_crypt=yes
21360 else
21361   echo "$ac_t""no" 1>&6
21362 have_crypt=no
21363 fi
21364
21365 fi
21366
21367
21368         LIBS="$save_LIBS"
21369
21370         if test $have_crypt = yes ; then
21371                 cat >> confdefs.h <<\EOF
21372 #define HAVE_CRYPT 1
21373 EOF
21374
21375         else
21376                 echo "configure: warning: could not find crypt" 1>&2
21377                 if test $ol_enable_crypt = yes ; then
21378                         { echo "configure: error: could not find crypt, select appropriate options or disable" 1>&2; exit 1; }
21379                 fi
21380
21381                 echo "configure: warning: disabling crypt support" 1>&2
21382                 ol_enable_crypt=no
21383         fi
21384 fi
21385
21386 if test $ol_enable_proctitle != no ; then
21387         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
21388 echo "configure:21389: checking for setproctitle" >&5
21389 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
21390   echo $ac_n "(cached) $ac_c" 1>&6
21391 else
21392   cat > conftest.$ac_ext <<EOF
21393 #line 21394 "configure"
21394 #include "confdefs.h"
21395 /* System header to define __stub macros and hopefully few prototypes,
21396     which can conflict with char setproctitle(); below.  */
21397 #include <assert.h>
21398 /* Override any gcc2 internal prototype to avoid an error.  */
21399 /* We use char because int might match the return type of a gcc2
21400     builtin and then its argument prototype would still apply.  */
21401 char setproctitle();
21402 char (*f)();
21403
21404 int main() {
21405
21406 /* The GNU C library defines this for functions which it implements
21407     to always fail with ENOSYS.  Some functions are actually named
21408     something starting with __ and the normal name is an alias.  */
21409 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
21410 choke me
21411 #else
21412 f = setproctitle;
21413 #endif
21414
21415 ; return 0; }
21416 EOF
21417 if { (eval echo configure:21418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21418   rm -rf conftest*
21419   eval "ac_cv_func_setproctitle=yes"
21420 else
21421   echo "configure: failed program was:" >&5
21422   cat conftest.$ac_ext >&5
21423   rm -rf conftest*
21424   eval "ac_cv_func_setproctitle=no"
21425 fi
21426 rm -f conftest*
21427 fi
21428
21429 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
21430   echo "$ac_t""yes" 1>&6
21431   have_setproctitle=yes
21432 else
21433   echo "$ac_t""no" 1>&6
21434
21435                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
21436 echo "configure:21437: checking for setproctitle in -lutil" >&5
21437 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
21438 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21439   echo $ac_n "(cached) $ac_c" 1>&6
21440 else
21441   ac_save_LIBS="$LIBS"
21442 LIBS="-lutil  $LIBS"
21443 cat > conftest.$ac_ext <<EOF
21444 #line 21445 "configure"
21445 #include "confdefs.h"
21446 /* Override any gcc2 internal prototype to avoid an error.  */
21447 /* We use char because int might match the return type of a gcc2
21448     builtin and then its argument prototype would still apply.  */
21449 char setproctitle();
21450
21451 int main() {
21452 setproctitle()
21453 ; return 0; }
21454 EOF
21455 if { (eval echo configure:21456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21456   rm -rf conftest*
21457   eval "ac_cv_lib_$ac_lib_var=yes"
21458 else
21459   echo "configure: failed program was:" >&5
21460   cat conftest.$ac_ext >&5
21461   rm -rf conftest*
21462   eval "ac_cv_lib_$ac_lib_var=no"
21463 fi
21464 rm -f conftest*
21465 LIBS="$ac_save_LIBS"
21466
21467 fi
21468 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21469   echo "$ac_t""yes" 1>&6
21470   have_setproctitle=yes
21471                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
21472 else
21473   echo "$ac_t""no" 1>&6
21474 have_setproctitle=no
21475                         LIBOBJS="$LIBOBJS setproctitle.o"
21476                         LIBSRCS="$LIBSRCS setproctitle.c"
21477 fi
21478
21479 fi
21480
21481
21482         if test $have_setproctitle = yes ; then
21483                 cat >> confdefs.h <<\EOF
21484 #define HAVE_SETPROCTITLE 1
21485 EOF
21486
21487         fi
21488 fi
21489
21490 if test $ol_enable_slp != no ; then
21491         for ac_hdr in slp.h 
21492 do
21493 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
21494 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
21495 echo "configure:21496: checking for $ac_hdr" >&5
21496 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
21497   echo $ac_n "(cached) $ac_c" 1>&6
21498 else
21499   cat > conftest.$ac_ext <<EOF
21500 #line 21501 "configure"
21501 #include "confdefs.h"
21502 #include <$ac_hdr>
21503 EOF
21504 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21505 { (eval echo configure:21506: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21506 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21507 if test -z "$ac_err"; then
21508   rm -rf conftest*
21509   eval "ac_cv_header_$ac_safe=yes"
21510 else
21511   echo "$ac_err" >&5
21512   echo "configure: failed program was:" >&5
21513   cat conftest.$ac_ext >&5
21514   rm -rf conftest*
21515   eval "ac_cv_header_$ac_safe=no"
21516 fi
21517 rm -f conftest*
21518 fi
21519 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
21520   echo "$ac_t""yes" 1>&6
21521     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
21522   cat >> confdefs.h <<EOF
21523 #define $ac_tr_hdr 1
21524 EOF
21525  
21526 else
21527   echo "$ac_t""no" 1>&6
21528 fi
21529 done
21530
21531
21532         if test $ac_cv_header_slp_h = yes ; then
21533                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
21534 echo "configure:21535: checking for SLPOpen in -lslp" >&5
21535 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
21536 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21537   echo $ac_n "(cached) $ac_c" 1>&6
21538 else
21539   ac_save_LIBS="$LIBS"
21540 LIBS="-lslp  $LIBS"
21541 cat > conftest.$ac_ext <<EOF
21542 #line 21543 "configure"
21543 #include "confdefs.h"
21544 /* Override any gcc2 internal prototype to avoid an error.  */
21545 /* We use char because int might match the return type of a gcc2
21546     builtin and then its argument prototype would still apply.  */
21547 char SLPOpen();
21548
21549 int main() {
21550 SLPOpen()
21551 ; return 0; }
21552 EOF
21553 if { (eval echo configure:21554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21554   rm -rf conftest*
21555   eval "ac_cv_lib_$ac_lib_var=yes"
21556 else
21557   echo "configure: failed program was:" >&5
21558   cat conftest.$ac_ext >&5
21559   rm -rf conftest*
21560   eval "ac_cv_lib_$ac_lib_var=no"
21561 fi
21562 rm -f conftest*
21563 LIBS="$ac_save_LIBS"
21564
21565 fi
21566 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21567   echo "$ac_t""yes" 1>&6
21568   have_slp=yes
21569 else
21570   echo "$ac_t""no" 1>&6
21571 have_slp=no
21572 fi
21573
21574                 if test $have_slp = yes ; then
21575                         cat >> confdefs.h <<\EOF
21576 #define HAVE_SLP 1
21577 EOF
21578
21579                         SLAPD_SLP_LIBS=-lslp
21580                 fi
21581
21582         elif test $ol_enable_slp = yes ; then
21583                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
21584         fi
21585 fi
21586
21587
21588 echo $ac_n "checking long long""... $ac_c" 1>&6
21589 echo "configure:21590: checking long long" >&5
21590 if eval "test \"\${ol_cv_type_long_long+set}\" = set"; then
21591   echo $ac_n "(cached) $ac_c" 1>&6
21592 else
21593   
21594         cat > conftest.$ac_ext <<EOF
21595 #line 21596 "configure"
21596 #include "confdefs.h"
21597
21598 int main() {
21599 long long x;
21600 ; return 0; }
21601 EOF
21602 if { (eval echo configure:21603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21603   rm -rf conftest*
21604   ol_cv_type_long_long=yes
21605 else
21606   echo "configure: failed program was:" >&5
21607   cat conftest.$ac_ext >&5
21608   rm -rf conftest*
21609   ol_cv_type_long_long=no
21610 fi
21611 rm -f conftest*
21612 fi
21613
21614 echo "$ac_t""$ol_cv_type_long_long" 1>&6
21615 if test $ol_cv_type_long_long = yes; then
21616         cat >> confdefs.h <<\EOF
21617 #define HAVE_LONG_LONG 1
21618 EOF
21619
21620 fi
21621
21622 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
21623 echo "configure:21624: checking for ANSI C header files" >&5
21624 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
21625   echo $ac_n "(cached) $ac_c" 1>&6
21626 else
21627   cat > conftest.$ac_ext <<EOF
21628 #line 21629 "configure"
21629 #include "confdefs.h"
21630 #include <stdlib.h>
21631 #include <stdarg.h>
21632 #include <string.h>
21633 #include <float.h>
21634 EOF
21635 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
21636 { (eval echo configure:21637: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
21637 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
21638 if test -z "$ac_err"; then
21639   rm -rf conftest*
21640   ac_cv_header_stdc=yes
21641 else
21642   echo "$ac_err" >&5
21643   echo "configure: failed program was:" >&5
21644   cat conftest.$ac_ext >&5
21645   rm -rf conftest*
21646   ac_cv_header_stdc=no
21647 fi
21648 rm -f conftest*
21649
21650 if test $ac_cv_header_stdc = yes; then
21651   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21652 cat > conftest.$ac_ext <<EOF
21653 #line 21654 "configure"
21654 #include "confdefs.h"
21655 #include <string.h>
21656 EOF
21657 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21658   egrep "memchr" >/dev/null 2>&1; then
21659   :
21660 else
21661   rm -rf conftest*
21662   ac_cv_header_stdc=no
21663 fi
21664 rm -f conftest*
21665
21666 fi
21667
21668 if test $ac_cv_header_stdc = yes; then
21669   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21670 cat > conftest.$ac_ext <<EOF
21671 #line 21672 "configure"
21672 #include "confdefs.h"
21673 #include <stdlib.h>
21674 EOF
21675 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21676   egrep "free" >/dev/null 2>&1; then
21677   :
21678 else
21679   rm -rf conftest*
21680   ac_cv_header_stdc=no
21681 fi
21682 rm -f conftest*
21683
21684 fi
21685
21686 if test $ac_cv_header_stdc = yes; then
21687   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21688 if test "$cross_compiling" = yes; then
21689   :
21690 else
21691   cat > conftest.$ac_ext <<EOF
21692 #line 21693 "configure"
21693 #include "confdefs.h"
21694 #include <ctype.h>
21695 #if ((' ' & 0x0FF) == 0x020)
21696 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21697 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21698 #else
21699 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21700  || ('j' <= (c) && (c) <= 'r') \
21701  || ('s' <= (c) && (c) <= 'z'))
21702 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21703 #endif
21704 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21705 int main () { int i; for (i = 0; i < 256; i++)
21706 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
21707 exit (0); }
21708
21709 EOF
21710 if { (eval echo configure:21711: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21711 then
21712   :
21713 else
21714   echo "configure: failed program was:" >&5
21715   cat conftest.$ac_ext >&5
21716   rm -fr conftest*
21717   ac_cv_header_stdc=no
21718 fi
21719 rm -fr conftest*
21720 fi
21721
21722 fi
21723 fi
21724
21725 echo "$ac_t""$ac_cv_header_stdc" 1>&6
21726 if test $ac_cv_header_stdc = yes; then
21727   cat >> confdefs.h <<\EOF
21728 #define STDC_HEADERS 1
21729 EOF
21730
21731 fi
21732
21733 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
21734 echo "configure:21735: checking for mode_t" >&5
21735 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
21736   echo $ac_n "(cached) $ac_c" 1>&6
21737 else
21738   cat > conftest.$ac_ext <<EOF
21739 #line 21740 "configure"
21740 #include "confdefs.h"
21741 #include <sys/types.h>
21742 #if STDC_HEADERS
21743 #include <stdlib.h>
21744 #include <stddef.h>
21745 #endif
21746
21747 EOF
21748 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21749   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21750   rm -rf conftest*
21751   eval "ac_cv_type_mode_t=yes"
21752 else
21753   rm -rf conftest*
21754   eval "ac_cv_type_mode_t=no"
21755 fi
21756 rm -f conftest*
21757
21758 fi
21759 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
21760   echo "$ac_t""yes" 1>&6
21761 else
21762   echo "$ac_t""no" 1>&6
21763   cat >> confdefs.h <<EOF
21764 #define mode_t int
21765 EOF
21766
21767 fi
21768
21769 echo $ac_n "checking for off_t""... $ac_c" 1>&6
21770 echo "configure:21771: checking for off_t" >&5
21771 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
21772   echo $ac_n "(cached) $ac_c" 1>&6
21773 else
21774   cat > conftest.$ac_ext <<EOF
21775 #line 21776 "configure"
21776 #include "confdefs.h"
21777 #include <sys/types.h>
21778 #if STDC_HEADERS
21779 #include <stdlib.h>
21780 #include <stddef.h>
21781 #endif
21782
21783 EOF
21784 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21785   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21786   rm -rf conftest*
21787   eval "ac_cv_type_off_t=yes"
21788 else
21789   rm -rf conftest*
21790   eval "ac_cv_type_off_t=no"
21791 fi
21792 rm -f conftest*
21793
21794 fi
21795 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
21796   echo "$ac_t""yes" 1>&6
21797 else
21798   echo "$ac_t""no" 1>&6
21799   cat >> confdefs.h <<EOF
21800 #define off_t long
21801 EOF
21802
21803 fi
21804
21805 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
21806 echo "configure:21807: checking for pid_t" >&5
21807 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
21808   echo $ac_n "(cached) $ac_c" 1>&6
21809 else
21810   cat > conftest.$ac_ext <<EOF
21811 #line 21812 "configure"
21812 #include "confdefs.h"
21813 #include <sys/types.h>
21814 #if STDC_HEADERS
21815 #include <stdlib.h>
21816 #include <stddef.h>
21817 #endif
21818
21819 EOF
21820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21821   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21822   rm -rf conftest*
21823   eval "ac_cv_type_pid_t=yes"
21824 else
21825   rm -rf conftest*
21826   eval "ac_cv_type_pid_t=no"
21827 fi
21828 rm -f conftest*
21829
21830 fi
21831 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
21832   echo "$ac_t""yes" 1>&6
21833 else
21834   echo "$ac_t""no" 1>&6
21835   cat >> confdefs.h <<EOF
21836 #define pid_t int
21837 EOF
21838
21839 fi
21840
21841 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
21842 echo "configure:21843: checking for ptrdiff_t" >&5
21843 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
21844   echo $ac_n "(cached) $ac_c" 1>&6
21845 else
21846   cat > conftest.$ac_ext <<EOF
21847 #line 21848 "configure"
21848 #include "confdefs.h"
21849 #include <stddef.h>
21850 int main() {
21851 ptrdiff_t p
21852 ; return 0; }
21853 EOF
21854 if { (eval echo configure:21855: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21855   rm -rf conftest*
21856   am_cv_type_ptrdiff_t=yes
21857 else
21858   echo "configure: failed program was:" >&5
21859   cat conftest.$ac_ext >&5
21860   rm -rf conftest*
21861   am_cv_type_ptrdiff_t=no
21862 fi
21863 rm -f conftest*
21864 fi
21865
21866 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
21867    if test $am_cv_type_ptrdiff_t = yes; then
21868      cat >> confdefs.h <<\EOF
21869 #define HAVE_PTRDIFF_T 1
21870 EOF
21871
21872    fi
21873
21874 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
21875 echo "configure:21876: checking return type of signal handlers" >&5
21876 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
21877   echo $ac_n "(cached) $ac_c" 1>&6
21878 else
21879   cat > conftest.$ac_ext <<EOF
21880 #line 21881 "configure"
21881 #include "confdefs.h"
21882 #include <sys/types.h>
21883 #include <signal.h>
21884 #ifdef signal
21885 #undef signal
21886 #endif
21887 #ifdef __cplusplus
21888 extern "C" void (*signal (int, void (*)(int)))(int);
21889 #else
21890 void (*signal ()) ();
21891 #endif
21892
21893 int main() {
21894 int i;
21895 ; return 0; }
21896 EOF
21897 if { (eval echo configure:21898: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21898   rm -rf conftest*
21899   ac_cv_type_signal=void
21900 else
21901   echo "configure: failed program was:" >&5
21902   cat conftest.$ac_ext >&5
21903   rm -rf conftest*
21904   ac_cv_type_signal=int
21905 fi
21906 rm -f conftest*
21907 fi
21908
21909 echo "$ac_t""$ac_cv_type_signal" 1>&6
21910 cat >> confdefs.h <<EOF
21911 #define RETSIGTYPE $ac_cv_type_signal
21912 EOF
21913
21914
21915 echo $ac_n "checking for size_t""... $ac_c" 1>&6
21916 echo "configure:21917: checking for size_t" >&5
21917 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
21918   echo $ac_n "(cached) $ac_c" 1>&6
21919 else
21920   cat > conftest.$ac_ext <<EOF
21921 #line 21922 "configure"
21922 #include "confdefs.h"
21923 #include <sys/types.h>
21924 #if STDC_HEADERS
21925 #include <stdlib.h>
21926 #include <stddef.h>
21927 #endif
21928
21929 EOF
21930 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21931   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21932   rm -rf conftest*
21933   eval "ac_cv_type_size_t=yes"
21934 else
21935   rm -rf conftest*
21936   eval "ac_cv_type_size_t=no"
21937 fi
21938 rm -f conftest*
21939
21940 fi
21941 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
21942   echo "$ac_t""yes" 1>&6
21943 else
21944   echo "$ac_t""no" 1>&6
21945   cat >> confdefs.h <<EOF
21946 #define size_t unsigned
21947 EOF
21948
21949 fi
21950
21951
21952 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
21953 echo "configure:21954: checking for ssize_t" >&5
21954 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
21955   echo $ac_n "(cached) $ac_c" 1>&6
21956 else
21957   cat > conftest.$ac_ext <<EOF
21958 #line 21959 "configure"
21959 #include "confdefs.h"
21960 #include <sys/types.h>
21961 #if STDC_HEADERS
21962 #include <stdlib.h>
21963 #include <stddef.h>
21964 #endif
21965
21966 EOF
21967 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21968   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21969   rm -rf conftest*
21970   eval "ac_cv_type_ssize_t=yes"
21971 else
21972   rm -rf conftest*
21973   eval "ac_cv_type_ssize_t=no"
21974 fi
21975 rm -f conftest*
21976
21977 fi
21978 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
21979   echo "$ac_t""yes" 1>&6
21980 else
21981   echo "$ac_t""no" 1>&6
21982   cat >> confdefs.h <<EOF
21983 #define ssize_t signed int
21984 EOF
21985
21986 fi
21987
21988 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21989 echo "configure:21990: checking for caddr_t" >&5
21990 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21991   echo $ac_n "(cached) $ac_c" 1>&6
21992 else
21993   cat > conftest.$ac_ext <<EOF
21994 #line 21995 "configure"
21995 #include "confdefs.h"
21996 #include <sys/types.h>
21997 #if STDC_HEADERS
21998 #include <stdlib.h>
21999 #include <stddef.h>
22000 #endif
22001
22002 EOF
22003 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22004   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
22005   rm -rf conftest*
22006   eval "ac_cv_type_caddr_t=yes"
22007 else
22008   rm -rf conftest*
22009   eval "ac_cv_type_caddr_t=no"
22010 fi
22011 rm -f conftest*
22012
22013 fi
22014 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
22015   echo "$ac_t""yes" 1>&6
22016 else
22017   echo "$ac_t""no" 1>&6
22018   cat >> confdefs.h <<EOF
22019 #define caddr_t char *
22020 EOF
22021
22022 fi
22023
22024
22025 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
22026 echo "configure:22027: checking for socklen_t" >&5
22027 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
22028   echo $ac_n "(cached) $ac_c" 1>&6
22029 else
22030   cat > conftest.$ac_ext <<EOF
22031 #line 22032 "configure"
22032 #include "confdefs.h"
22033
22034 #ifdef HAVE_SYS_TYPES_H
22035 #include <sys/types.h>
22036 #endif
22037 #ifdef HAVE_SYS_SOCKET_H
22038 #include <sys/socket.h>
22039 #endif
22040
22041 int main() {
22042 socklen_t len;
22043 ; return 0; }
22044 EOF
22045 if { (eval echo configure:22046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22046   rm -rf conftest*
22047   ol_cv_type_socklen_t=yes
22048 else
22049   echo "configure: failed program was:" >&5
22050   cat conftest.$ac_ext >&5
22051   rm -rf conftest*
22052   ol_cv_type_socklen_t=no
22053 fi
22054 rm -f conftest*
22055 fi
22056
22057 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
22058   if test $ol_cv_type_socklen_t = no; then
22059     cat >> confdefs.h <<\EOF
22060 #define socklen_t int
22061 EOF
22062
22063   fi
22064  
22065 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
22066 echo "configure:22067: checking for member st_blksize in aggregate type struct stat" >&5
22067 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
22068   echo $ac_n "(cached) $ac_c" 1>&6
22069 else
22070   cat > conftest.$ac_ext <<EOF
22071 #line 22072 "configure"
22072 #include "confdefs.h"
22073 #include <sys/types.h>
22074 #include <sys/stat.h>
22075 int main() {
22076 struct stat foo; foo.st_blksize;
22077 ; return 0; }
22078 EOF
22079 if { (eval echo configure:22080: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22080   rm -rf conftest*
22081   ac_cv_c_struct_member_st_blksize=yes
22082 else
22083   echo "configure: failed program was:" >&5
22084   cat conftest.$ac_ext >&5
22085   rm -rf conftest*
22086   ac_cv_c_struct_member_st_blksize=no
22087 fi
22088 rm -f conftest*
22089 fi
22090
22091 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
22092 st_blksize="$ac_cv_c_struct_member_st_blksize"
22093 if test $ac_cv_c_struct_member_st_blksize = yes; then
22094   cat >> confdefs.h <<\EOF
22095 #define HAVE_ST_BLKSIZE 1
22096 EOF
22097
22098 fi
22099
22100 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
22101 echo "configure:22102: checking whether time.h and sys/time.h may both be included" >&5
22102 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
22103   echo $ac_n "(cached) $ac_c" 1>&6
22104 else
22105   cat > conftest.$ac_ext <<EOF
22106 #line 22107 "configure"
22107 #include "confdefs.h"
22108 #include <sys/types.h>
22109 #include <sys/time.h>
22110 #include <time.h>
22111 int main() {
22112 struct tm *tp;
22113 ; return 0; }
22114 EOF
22115 if { (eval echo configure:22116: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22116   rm -rf conftest*
22117   ac_cv_header_time=yes
22118 else
22119   echo "configure: failed program was:" >&5
22120   cat conftest.$ac_ext >&5
22121   rm -rf conftest*
22122   ac_cv_header_time=no
22123 fi
22124 rm -f conftest*
22125 fi
22126
22127 echo "$ac_t""$ac_cv_header_time" 1>&6
22128 if test $ac_cv_header_time = yes; then
22129   cat >> confdefs.h <<\EOF
22130 #define TIME_WITH_SYS_TIME 1
22131 EOF
22132
22133 fi
22134
22135 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
22136 echo "configure:22137: checking whether struct tm is in sys/time.h or time.h" >&5
22137 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
22138   echo $ac_n "(cached) $ac_c" 1>&6
22139 else
22140   cat > conftest.$ac_ext <<EOF
22141 #line 22142 "configure"
22142 #include "confdefs.h"
22143 #include <sys/types.h>
22144 #include <time.h>
22145 int main() {
22146 struct tm *tp; tp->tm_sec;
22147 ; return 0; }
22148 EOF
22149 if { (eval echo configure:22150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22150   rm -rf conftest*
22151   ac_cv_struct_tm=time.h
22152 else
22153   echo "configure: failed program was:" >&5
22154   cat conftest.$ac_ext >&5
22155   rm -rf conftest*
22156   ac_cv_struct_tm=sys/time.h
22157 fi
22158 rm -f conftest*
22159 fi
22160
22161 echo "$ac_t""$ac_cv_struct_tm" 1>&6
22162 if test $ac_cv_struct_tm = sys/time.h; then
22163   cat >> confdefs.h <<\EOF
22164 #define TM_IN_SYS_TIME 1
22165 EOF
22166
22167 fi
22168
22169 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
22170 echo "configure:22171: checking for uid_t in sys/types.h" >&5
22171 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
22172   echo $ac_n "(cached) $ac_c" 1>&6
22173 else
22174   cat > conftest.$ac_ext <<EOF
22175 #line 22176 "configure"
22176 #include "confdefs.h"
22177 #include <sys/types.h>
22178 EOF
22179 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22180   egrep "uid_t" >/dev/null 2>&1; then
22181   rm -rf conftest*
22182   ac_cv_type_uid_t=yes
22183 else
22184   rm -rf conftest*
22185   ac_cv_type_uid_t=no
22186 fi
22187 rm -f conftest*
22188
22189 fi
22190
22191 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
22192 if test $ac_cv_type_uid_t = no; then
22193   cat >> confdefs.h <<\EOF
22194 #define uid_t int
22195 EOF
22196
22197   cat >> confdefs.h <<\EOF
22198 #define gid_t int
22199 EOF
22200
22201 fi
22202
22203 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
22204 echo "configure:22205: checking for sig_atomic_t" >&5
22205 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
22206   echo $ac_n "(cached) $ac_c" 1>&6
22207 else
22208   cat > conftest.$ac_ext <<EOF
22209 #line 22210 "configure"
22210 #include "confdefs.h"
22211 #include <signal.h>
22212 int main() {
22213 sig_atomic_t atomic;
22214 ; return 0; }
22215 EOF
22216 if { (eval echo configure:22217: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22217   rm -rf conftest*
22218   ol_cv_type_sig_atomic_t=yes
22219 else
22220   echo "configure: failed program was:" >&5
22221   cat conftest.$ac_ext >&5
22222   rm -rf conftest*
22223   ol_cv_type_sig_atomic_t=no
22224 fi
22225 rm -f conftest*
22226 fi
22227
22228 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
22229   if test $ol_cv_type_sig_atomic_t = no; then
22230     cat >> confdefs.h <<\EOF
22231 #define sig_atomic_t int
22232 EOF
22233
22234   fi
22235  
22236
22237
22238 # test for pw_gecos in struct passwd
22239 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
22240 echo "configure:22241: checking struct passwd for pw_gecos" >&5
22241 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
22242   echo $ac_n "(cached) $ac_c" 1>&6
22243 else
22244   
22245         cat > conftest.$ac_ext <<EOF
22246 #line 22247 "configure"
22247 #include "confdefs.h"
22248 #include <pwd.h>
22249 int main() {
22250
22251         struct passwd pwd;
22252         pwd.pw_gecos = pwd.pw_name;
22253
22254 ; return 0; }
22255 EOF
22256 if { (eval echo configure:22257: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22257   rm -rf conftest*
22258   ol_cv_struct_passwd_pw_gecos=yes
22259 else
22260   echo "configure: failed program was:" >&5
22261   cat conftest.$ac_ext >&5
22262   rm -rf conftest*
22263   ol_cv_struct_passwd_pw_gecos=no
22264 fi
22265 rm -f conftest*
22266 fi
22267
22268 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
22269 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
22270         cat >> confdefs.h <<\EOF
22271 #define HAVE_PW_GECOS 1
22272 EOF
22273
22274 fi
22275
22276 # test for pw_passwd in struct passwd
22277 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
22278 echo "configure:22279: checking struct passwd for pw_passwd" >&5
22279 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
22280   echo $ac_n "(cached) $ac_c" 1>&6
22281 else
22282   
22283         cat > conftest.$ac_ext <<EOF
22284 #line 22285 "configure"
22285 #include "confdefs.h"
22286 #include <pwd.h>
22287 int main() {
22288
22289         struct passwd pwd;
22290         pwd.pw_passwd = pwd.pw_name;
22291
22292 ; return 0; }
22293 EOF
22294 if { (eval echo configure:22295: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22295   rm -rf conftest*
22296   ol_cv_struct_passwd_pw_passwd=yes
22297 else
22298   echo "configure: failed program was:" >&5
22299   cat conftest.$ac_ext >&5
22300   rm -rf conftest*
22301   ol_cv_struct_passwd_pw_passwd=no
22302 fi
22303 rm -f conftest*
22304 fi
22305
22306 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
22307 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
22308         cat >> confdefs.h <<\EOF
22309 #define HAVE_PW_PASSWD 1
22310 EOF
22311
22312 fi
22313
22314
22315 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
22316 echo "configure:22317: checking if toupper() requires islower()" >&5
22317 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
22318   echo $ac_n "(cached) $ac_c" 1>&6
22319 else
22320   
22321         if test "$cross_compiling" = yes; then
22322   ol_cv_c_upper_lower=safe
22323 else
22324   cat > conftest.$ac_ext <<EOF
22325 #line 22326 "configure"
22326 #include "confdefs.h"
22327
22328 #include <ctype.h>
22329 main()
22330 {
22331         if ('C' == toupper('C'))
22332                 exit(0);
22333         else
22334                 exit(1);
22335 }
22336 EOF
22337 if { (eval echo configure:22338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22338 then
22339   ol_cv_c_upper_lower=no
22340 else
22341   echo "configure: failed program was:" >&5
22342   cat conftest.$ac_ext >&5
22343   rm -fr conftest*
22344   ol_cv_c_upper_lower=yes
22345 fi
22346 rm -fr conftest*
22347 fi
22348
22349 fi
22350
22351 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
22352 if test $ol_cv_c_upper_lower != no ; then
22353         cat >> confdefs.h <<\EOF
22354 #define C_UPPER_LOWER 1
22355 EOF
22356
22357 fi
22358
22359 echo $ac_n "checking for working const""... $ac_c" 1>&6
22360 echo "configure:22361: checking for working const" >&5
22361 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
22362   echo $ac_n "(cached) $ac_c" 1>&6
22363 else
22364   cat > conftest.$ac_ext <<EOF
22365 #line 22366 "configure"
22366 #include "confdefs.h"
22367
22368 int main() {
22369
22370 /* Ultrix mips cc rejects this.  */
22371 typedef int charset[2]; const charset x;
22372 /* SunOS 4.1.1 cc rejects this.  */
22373 char const *const *ccp;
22374 char **p;
22375 /* NEC SVR4.0.2 mips cc rejects this.  */
22376 struct point {int x, y;};
22377 static struct point const zero = {0,0};
22378 /* AIX XL C 1.02.0.0 rejects this.
22379    It does not let you subtract one const X* pointer from another in an arm
22380    of an if-expression whose if-part is not a constant expression */
22381 const char *g = "string";
22382 ccp = &g + (g ? g-g : 0);
22383 /* HPUX 7.0 cc rejects these. */
22384 ++ccp;
22385 p = (char**) ccp;
22386 ccp = (char const *const *) p;
22387 { /* SCO 3.2v4 cc rejects this.  */
22388   char *t;
22389   char const *s = 0 ? (char *) 0 : (char const *) 0;
22390
22391   *t++ = 0;
22392 }
22393 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
22394   int x[] = {25, 17};
22395   const int *foo = &x[0];
22396   ++foo;
22397 }
22398 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
22399   typedef const int *iptr;
22400   iptr p = 0;
22401   ++p;
22402 }
22403 { /* AIX XL C 1.02.0.0 rejects this saying
22404      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
22405   struct s { int j; const int *ap[3]; };
22406   struct s *b; b->j = 5;
22407 }
22408 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
22409   const int foo = 10;
22410 }
22411
22412 ; return 0; }
22413 EOF
22414 if { (eval echo configure:22415: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22415   rm -rf conftest*
22416   ac_cv_c_const=yes
22417 else
22418   echo "configure: failed program was:" >&5
22419   cat conftest.$ac_ext >&5
22420   rm -rf conftest*
22421   ac_cv_c_const=no
22422 fi
22423 rm -f conftest*
22424 fi
22425
22426 echo "$ac_t""$ac_cv_c_const" 1>&6
22427 if test $ac_cv_c_const = no; then
22428   cat >> confdefs.h <<\EOF
22429 #define const 
22430 EOF
22431
22432 fi
22433
22434 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
22435 echo "configure:22436: checking if compiler understands volatile" >&5
22436 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
22437   echo $ac_n "(cached) $ac_c" 1>&6
22438 else
22439   cat > conftest.$ac_ext <<EOF
22440 #line 22441 "configure"
22441 #include "confdefs.h"
22442 int x, y, z;
22443 int main() {
22444 volatile int a; int * volatile b = x ? &y : &z;
22445       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
22446       *b = 0;
22447 ; return 0; }
22448 EOF
22449 if { (eval echo configure:22450: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22450   rm -rf conftest*
22451   ol_cv_c_volatile=yes
22452 else
22453   echo "configure: failed program was:" >&5
22454   cat conftest.$ac_ext >&5
22455   rm -rf conftest*
22456   ol_cv_c_volatile=no
22457 fi
22458 rm -f conftest*
22459 fi
22460
22461 echo "$ac_t""$ol_cv_c_volatile" 1>&6
22462   if test $ol_cv_c_volatile = yes; then
22463     : 
22464   else
22465     cat >> confdefs.h <<\EOF
22466 #define volatile 
22467 EOF
22468
22469   fi
22470  
22471
22472 if test $cross_compiling = yes ; then
22473         echo "configure: warning: Crossing compiling... all bets are off!" 1>&2
22474         cat >> confdefs.h <<\EOF
22475 #define CROSS_COMPILING 1
22476 EOF
22477
22478 else
22479         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
22480 echo "configure:22481: checking whether byte ordering is bigendian" >&5
22481 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
22482   echo $ac_n "(cached) $ac_c" 1>&6
22483 else
22484   ac_cv_c_bigendian=unknown
22485 # See if sys/param.h defines the BYTE_ORDER macro.
22486 cat > conftest.$ac_ext <<EOF
22487 #line 22488 "configure"
22488 #include "confdefs.h"
22489 #include <sys/types.h>
22490 #include <sys/param.h>
22491 int main() {
22492
22493 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
22494  bogus endian macros
22495 #endif
22496 ; return 0; }
22497 EOF
22498 if { (eval echo configure:22499: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22499   rm -rf conftest*
22500   # It does; now see whether it defined to BIG_ENDIAN or not.
22501 cat > conftest.$ac_ext <<EOF
22502 #line 22503 "configure"
22503 #include "confdefs.h"
22504 #include <sys/types.h>
22505 #include <sys/param.h>
22506 int main() {
22507
22508 #if BYTE_ORDER != BIG_ENDIAN
22509  not big endian
22510 #endif
22511 ; return 0; }
22512 EOF
22513 if { (eval echo configure:22514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22514   rm -rf conftest*
22515   ac_cv_c_bigendian=yes
22516 else
22517   echo "configure: failed program was:" >&5
22518   cat conftest.$ac_ext >&5
22519   rm -rf conftest*
22520   ac_cv_c_bigendian=no
22521 fi
22522 rm -f conftest*
22523 else
22524   echo "configure: failed program was:" >&5
22525   cat conftest.$ac_ext >&5
22526 fi
22527 rm -f conftest*
22528 if test $ac_cv_c_bigendian = unknown; then
22529 if test "$cross_compiling" = yes; then
22530     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
22531 else
22532   cat > conftest.$ac_ext <<EOF
22533 #line 22534 "configure"
22534 #include "confdefs.h"
22535 main () {
22536   /* Are we little or big endian?  From Harbison&Steele.  */
22537   union
22538   {
22539     long l;
22540     char c[sizeof (long)];
22541   } u;
22542   u.l = 1;
22543   exit (u.c[sizeof (long) - 1] == 1);
22544 }
22545 EOF
22546 if { (eval echo configure:22547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22547 then
22548   ac_cv_c_bigendian=no
22549 else
22550   echo "configure: failed program was:" >&5
22551   cat conftest.$ac_ext >&5
22552   rm -fr conftest*
22553   ac_cv_c_bigendian=yes
22554 fi
22555 rm -fr conftest*
22556 fi
22557
22558 fi
22559 fi
22560
22561 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
22562 if test $ac_cv_c_bigendian = yes; then
22563   cat >> confdefs.h <<\EOF
22564 #define WORDS_BIGENDIAN 1
22565 EOF
22566
22567 fi
22568
22569 fi
22570
22571 echo $ac_n "checking size of short""... $ac_c" 1>&6
22572 echo "configure:22573: checking size of short" >&5 
22573 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
22574   echo $ac_n "(cached) $ac_c" 1>&6
22575 else
22576   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22577   cat > conftest.$ac_ext <<EOF
22578 #line 22579 "configure"
22579 #include "confdefs.h"
22580 #include "confdefs.h" 
22581 #include <stdlib.h>
22582 #include <sys/types.h> 
22583  
22584
22585 int main() {
22586 switch (0) case 0: case (sizeof (short) == $ac_size):;
22587 ; return 0; }
22588 EOF
22589 if { (eval echo configure:22590: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22590   rm -rf conftest*
22591   ac_cv_sizeof_short=$ac_size
22592 else
22593   echo "configure: failed program was:" >&5
22594   cat conftest.$ac_ext >&5
22595 fi
22596 rm -f conftest* 
22597   if test x$ac_cv_sizeof_short != x ; then break; fi 
22598 done 
22599
22600 fi
22601  
22602 if test x$ac_cv_sizeof_short = x ; then 
22603   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
22604 fi 
22605 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
22606 cat >> confdefs.h <<EOF
22607 #define SIZEOF_SHORT $ac_cv_sizeof_short
22608 EOF
22609  
22610  
22611 echo $ac_n "checking size of int""... $ac_c" 1>&6
22612 echo "configure:22613: checking size of int" >&5 
22613 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
22614   echo $ac_n "(cached) $ac_c" 1>&6
22615 else
22616   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22617   cat > conftest.$ac_ext <<EOF
22618 #line 22619 "configure"
22619 #include "confdefs.h"
22620 #include "confdefs.h" 
22621 #include <stdlib.h>
22622 #include <sys/types.h> 
22623  
22624
22625 int main() {
22626 switch (0) case 0: case (sizeof (int) == $ac_size):;
22627 ; return 0; }
22628 EOF
22629 if { (eval echo configure:22630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22630   rm -rf conftest*
22631   ac_cv_sizeof_int=$ac_size
22632 else
22633   echo "configure: failed program was:" >&5
22634   cat conftest.$ac_ext >&5
22635 fi
22636 rm -f conftest* 
22637   if test x$ac_cv_sizeof_int != x ; then break; fi 
22638 done 
22639
22640 fi
22641  
22642 if test x$ac_cv_sizeof_int = x ; then 
22643   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
22644 fi 
22645 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
22646 cat >> confdefs.h <<EOF
22647 #define SIZEOF_INT $ac_cv_sizeof_int
22648 EOF
22649  
22650  
22651 echo $ac_n "checking size of long""... $ac_c" 1>&6
22652 echo "configure:22653: checking size of long" >&5 
22653 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
22654   echo $ac_n "(cached) $ac_c" 1>&6
22655 else
22656   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22657   cat > conftest.$ac_ext <<EOF
22658 #line 22659 "configure"
22659 #include "confdefs.h"
22660 #include "confdefs.h" 
22661 #include <stdlib.h>
22662 #include <sys/types.h> 
22663  
22664
22665 int main() {
22666 switch (0) case 0: case (sizeof (long) == $ac_size):;
22667 ; return 0; }
22668 EOF
22669 if { (eval echo configure:22670: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22670   rm -rf conftest*
22671   ac_cv_sizeof_long=$ac_size
22672 else
22673   echo "configure: failed program was:" >&5
22674   cat conftest.$ac_ext >&5
22675 fi
22676 rm -f conftest* 
22677   if test x$ac_cv_sizeof_long != x ; then break; fi 
22678 done 
22679
22680 fi
22681  
22682 if test x$ac_cv_sizeof_long = x ; then 
22683   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
22684 fi 
22685 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
22686 cat >> confdefs.h <<EOF
22687 #define SIZEOF_LONG $ac_cv_sizeof_long
22688 EOF
22689  
22690
22691 echo $ac_n "checking size of wchar_t""... $ac_c" 1>&6
22692 echo "configure:22693: checking size of wchar_t" >&5 
22693 if eval "test \"\${ac_cv_sizeof_wchar_t+set}\" = set"; then
22694   echo $ac_n "(cached) $ac_c" 1>&6
22695 else
22696   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
22697   cat > conftest.$ac_ext <<EOF
22698 #line 22699 "configure"
22699 #include "confdefs.h"
22700 #include "confdefs.h" 
22701 #include <stdlib.h>
22702 #include <sys/types.h> 
22703  
22704
22705 int main() {
22706 switch (0) case 0: case (sizeof (wchar_t) == $ac_size):;
22707 ; return 0; }
22708 EOF
22709 if { (eval echo configure:22710: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22710   rm -rf conftest*
22711   ac_cv_sizeof_wchar_t=$ac_size
22712 else
22713   echo "configure: failed program was:" >&5
22714   cat conftest.$ac_ext >&5
22715 fi
22716 rm -f conftest* 
22717   if test x$ac_cv_sizeof_wchar_t != x ; then break; fi 
22718 done 
22719
22720 fi
22721  
22722 if test x$ac_cv_sizeof_wchar_t = x ; then 
22723   { echo "configure: error: cannot determine a size for wchar_t" 1>&2; exit 1; } 
22724 fi 
22725 echo "$ac_t""$ac_cv_sizeof_wchar_t" 1>&6 
22726 cat >> confdefs.h <<EOF
22727 #define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t
22728 EOF
22729  
22730
22731
22732 if test "$ac_cv_sizeof_int" -lt 4 ; then
22733         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
22734
22735         cat >> confdefs.h <<\EOF
22736 #define LBER_INT_T long
22737 EOF
22738
22739 else
22740         cat >> confdefs.h <<\EOF
22741 #define LBER_INT_T int
22742 EOF
22743
22744 fi
22745
22746 cat >> confdefs.h <<\EOF
22747 #define LBER_LEN_T long
22748 EOF
22749
22750 cat >> confdefs.h <<\EOF
22751 #define LBER_SOCKET_T int
22752 EOF
22753
22754 cat >> confdefs.h <<\EOF
22755 #define LBER_TAG_T long
22756 EOF
22757
22758
22759 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
22760 echo "configure:22761: checking for 8-bit clean memcmp" >&5
22761 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
22762   echo $ac_n "(cached) $ac_c" 1>&6
22763 else
22764   if test "$cross_compiling" = yes; then
22765   ac_cv_func_memcmp_clean=no
22766 else
22767   cat > conftest.$ac_ext <<EOF
22768 #line 22769 "configure"
22769 #include "confdefs.h"
22770
22771 main()
22772 {
22773   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
22774   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
22775 }
22776
22777 EOF
22778 if { (eval echo configure:22779: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
22779 then
22780   ac_cv_func_memcmp_clean=yes
22781 else
22782   echo "configure: failed program was:" >&5
22783   cat conftest.$ac_ext >&5
22784   rm -fr conftest*
22785   ac_cv_func_memcmp_clean=no
22786 fi
22787 rm -fr conftest*
22788 fi
22789
22790 fi
22791
22792 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
22793 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
22794
22795 echo $ac_n "checking for strftime""... $ac_c" 1>&6
22796 echo "configure:22797: checking for strftime" >&5
22797 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
22798   echo $ac_n "(cached) $ac_c" 1>&6
22799 else
22800   cat > conftest.$ac_ext <<EOF
22801 #line 22802 "configure"
22802 #include "confdefs.h"
22803 /* System header to define __stub macros and hopefully few prototypes,
22804     which can conflict with char strftime(); below.  */
22805 #include <assert.h>
22806 /* Override any gcc2 internal prototype to avoid an error.  */
22807 /* We use char because int might match the return type of a gcc2
22808     builtin and then its argument prototype would still apply.  */
22809 char strftime();
22810 char (*f)();
22811
22812 int main() {
22813
22814 /* The GNU C library defines this for functions which it implements
22815     to always fail with ENOSYS.  Some functions are actually named
22816     something starting with __ and the normal name is an alias.  */
22817 #if defined (__stub_strftime) || defined (__stub___strftime)
22818 choke me
22819 #else
22820 f = strftime;
22821 #endif
22822
22823 ; return 0; }
22824 EOF
22825 if { (eval echo configure:22826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22826   rm -rf conftest*
22827   eval "ac_cv_func_strftime=yes"
22828 else
22829   echo "configure: failed program was:" >&5
22830   cat conftest.$ac_ext >&5
22831   rm -rf conftest*
22832   eval "ac_cv_func_strftime=no"
22833 fi
22834 rm -f conftest*
22835 fi
22836
22837 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
22838   echo "$ac_t""yes" 1>&6
22839   cat >> confdefs.h <<\EOF
22840 #define HAVE_STRFTIME 1
22841 EOF
22842
22843 else
22844   echo "$ac_t""no" 1>&6
22845 # strftime is in -lintl on SCO UNIX.
22846 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
22847 echo "configure:22848: checking for strftime in -lintl" >&5
22848 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
22849 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
22850   echo $ac_n "(cached) $ac_c" 1>&6
22851 else
22852   ac_save_LIBS="$LIBS"
22853 LIBS="-lintl  $LIBS"
22854 cat > conftest.$ac_ext <<EOF
22855 #line 22856 "configure"
22856 #include "confdefs.h"
22857 /* Override any gcc2 internal prototype to avoid an error.  */
22858 /* We use char because int might match the return type of a gcc2
22859     builtin and then its argument prototype would still apply.  */
22860 char strftime();
22861
22862 int main() {
22863 strftime()
22864 ; return 0; }
22865 EOF
22866 if { (eval echo configure:22867: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22867   rm -rf conftest*
22868   eval "ac_cv_lib_$ac_lib_var=yes"
22869 else
22870   echo "configure: failed program was:" >&5
22871   cat conftest.$ac_ext >&5
22872   rm -rf conftest*
22873   eval "ac_cv_lib_$ac_lib_var=no"
22874 fi
22875 rm -f conftest*
22876 LIBS="$ac_save_LIBS"
22877
22878 fi
22879 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
22880   echo "$ac_t""yes" 1>&6
22881   cat >> confdefs.h <<\EOF
22882 #define HAVE_STRFTIME 1
22883 EOF
22884
22885 LIBS="-lintl $LIBS"
22886 else
22887   echo "$ac_t""no" 1>&6
22888 fi
22889
22890 fi
22891
22892
22893 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
22894 echo "configure:22895: checking for inet_aton()" >&5
22895 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
22896   echo $ac_n "(cached) $ac_c" 1>&6
22897 else
22898   cat > conftest.$ac_ext <<EOF
22899 #line 22900 "configure"
22900 #include "confdefs.h"
22901
22902 #ifdef HAVE_SYS_TYPES_H
22903 #       include <sys/types.h>
22904 #endif
22905 #ifdef HAVE_SYS_SOCKET_H
22906 #       include <sys/socket.h>
22907 #       ifdef HAVE_SYS_SELECT_H
22908 #               include <sys/select.h>
22909 #       endif
22910 #       include <netinet/in.h>
22911 #       ifdef HAVE_ARPA_INET_H
22912 #               include <arpa/inet.h>
22913 #       endif
22914 #endif
22915
22916 int main() {
22917 struct in_addr in;
22918 int rc = inet_aton( "255.255.255.255", &in );
22919 ; return 0; }
22920 EOF
22921 if { (eval echo configure:22922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22922   rm -rf conftest*
22923   ol_cv_func_inet_aton=yes
22924 else
22925   echo "configure: failed program was:" >&5
22926   cat conftest.$ac_ext >&5
22927   rm -rf conftest*
22928   ol_cv_func_inet_aton=no
22929 fi
22930 rm -f conftest*
22931 fi
22932
22933 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
22934   if test $ol_cv_func_inet_aton != no; then
22935     cat >> confdefs.h <<\EOF
22936 #define HAVE_INET_ATON 1
22937 EOF
22938
22939   fi
22940  
22941
22942 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
22943 echo "configure:22944: checking for _spawnlp" >&5
22944 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
22945   echo $ac_n "(cached) $ac_c" 1>&6
22946 else
22947   cat > conftest.$ac_ext <<EOF
22948 #line 22949 "configure"
22949 #include "confdefs.h"
22950 /* System header to define __stub macros and hopefully few prototypes,
22951     which can conflict with char _spawnlp(); below.  */
22952 #include <assert.h>
22953 /* Override any gcc2 internal prototype to avoid an error.  */
22954 /* We use char because int might match the return type of a gcc2
22955     builtin and then its argument prototype would still apply.  */
22956 char _spawnlp();
22957 char (*f)();
22958
22959 int main() {
22960
22961 /* The GNU C library defines this for functions which it implements
22962     to always fail with ENOSYS.  Some functions are actually named
22963     something starting with __ and the normal name is an alias.  */
22964 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
22965 choke me
22966 #else
22967 f = _spawnlp;
22968 #endif
22969
22970 ; return 0; }
22971 EOF
22972 if { (eval echo configure:22973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22973   rm -rf conftest*
22974   eval "ac_cv_func__spawnlp=yes"
22975 else
22976   echo "configure: failed program was:" >&5
22977   cat conftest.$ac_ext >&5
22978   rm -rf conftest*
22979   eval "ac_cv_func__spawnlp=no"
22980 fi
22981 rm -f conftest*
22982 fi
22983
22984 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
22985   echo "$ac_t""yes" 1>&6
22986   cat >> confdefs.h <<\EOF
22987 #define HAVE_SPAWNLP 1
22988 EOF
22989
22990 else
22991   echo "$ac_t""no" 1>&6
22992 fi
22993
22994
22995 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
22996 echo "configure:22997: checking for _snprintf" >&5
22997 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
22998   echo $ac_n "(cached) $ac_c" 1>&6
22999 else
23000   cat > conftest.$ac_ext <<EOF
23001 #line 23002 "configure"
23002 #include "confdefs.h"
23003 /* System header to define __stub macros and hopefully few prototypes,
23004     which can conflict with char _snprintf(); below.  */
23005 #include <assert.h>
23006 /* Override any gcc2 internal prototype to avoid an error.  */
23007 /* We use char because int might match the return type of a gcc2
23008     builtin and then its argument prototype would still apply.  */
23009 char _snprintf();
23010 char (*f)();
23011
23012 int main() {
23013
23014 /* The GNU C library defines this for functions which it implements
23015     to always fail with ENOSYS.  Some functions are actually named
23016     something starting with __ and the normal name is an alias.  */
23017 #if defined (__stub__snprintf) || defined (__stub____snprintf)
23018 choke me
23019 #else
23020 f = _snprintf;
23021 #endif
23022
23023 ; return 0; }
23024 EOF
23025 if { (eval echo configure:23026: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23026   rm -rf conftest*
23027   eval "ac_cv_func__snprintf=yes"
23028 else
23029   echo "configure: failed program was:" >&5
23030   cat conftest.$ac_ext >&5
23031   rm -rf conftest*
23032   eval "ac_cv_func__snprintf=no"
23033 fi
23034 rm -f conftest*
23035 fi
23036
23037 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
23038   echo "$ac_t""yes" 1>&6
23039   ac_cv_func_snprintf=yes
23040         cat >> confdefs.h <<\EOF
23041 #define snprintf _snprintf
23042 EOF
23043
23044
23045 else
23046   echo "$ac_t""no" 1>&6
23047 fi
23048
23049
23050 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
23051 echo "configure:23052: checking for _vsnprintf" >&5
23052 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
23053   echo $ac_n "(cached) $ac_c" 1>&6
23054 else
23055   cat > conftest.$ac_ext <<EOF
23056 #line 23057 "configure"
23057 #include "confdefs.h"
23058 /* System header to define __stub macros and hopefully few prototypes,
23059     which can conflict with char _vsnprintf(); below.  */
23060 #include <assert.h>
23061 /* Override any gcc2 internal prototype to avoid an error.  */
23062 /* We use char because int might match the return type of a gcc2
23063     builtin and then its argument prototype would still apply.  */
23064 char _vsnprintf();
23065 char (*f)();
23066
23067 int main() {
23068
23069 /* The GNU C library defines this for functions which it implements
23070     to always fail with ENOSYS.  Some functions are actually named
23071     something starting with __ and the normal name is an alias.  */
23072 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
23073 choke me
23074 #else
23075 f = _vsnprintf;
23076 #endif
23077
23078 ; return 0; }
23079 EOF
23080 if { (eval echo configure:23081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23081   rm -rf conftest*
23082   eval "ac_cv_func__vsnprintf=yes"
23083 else
23084   echo "configure: failed program was:" >&5
23085   cat conftest.$ac_ext >&5
23086   rm -rf conftest*
23087   eval "ac_cv_func__vsnprintf=no"
23088 fi
23089 rm -f conftest*
23090 fi
23091
23092 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
23093   echo "$ac_t""yes" 1>&6
23094   ac_cv_func_vsnprintf=yes
23095         cat >> confdefs.h <<\EOF
23096 #define vsnprintf _vsnprintf
23097 EOF
23098
23099
23100 else
23101   echo "$ac_t""no" 1>&6
23102 fi
23103
23104
23105 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
23106 echo "configure:23107: checking for vprintf" >&5
23107 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
23108   echo $ac_n "(cached) $ac_c" 1>&6
23109 else
23110   cat > conftest.$ac_ext <<EOF
23111 #line 23112 "configure"
23112 #include "confdefs.h"
23113 /* System header to define __stub macros and hopefully few prototypes,
23114     which can conflict with char vprintf(); below.  */
23115 #include <assert.h>
23116 /* Override any gcc2 internal prototype to avoid an error.  */
23117 /* We use char because int might match the return type of a gcc2
23118     builtin and then its argument prototype would still apply.  */
23119 char vprintf();
23120 char (*f)();
23121
23122 int main() {
23123
23124 /* The GNU C library defines this for functions which it implements
23125     to always fail with ENOSYS.  Some functions are actually named
23126     something starting with __ and the normal name is an alias.  */
23127 #if defined (__stub_vprintf) || defined (__stub___vprintf)
23128 choke me
23129 #else
23130 f = vprintf;
23131 #endif
23132
23133 ; return 0; }
23134 EOF
23135 if { (eval echo configure:23136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23136   rm -rf conftest*
23137   eval "ac_cv_func_vprintf=yes"
23138 else
23139   echo "configure: failed program was:" >&5
23140   cat conftest.$ac_ext >&5
23141   rm -rf conftest*
23142   eval "ac_cv_func_vprintf=no"
23143 fi
23144 rm -f conftest*
23145 fi
23146
23147 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
23148   echo "$ac_t""yes" 1>&6
23149   cat >> confdefs.h <<\EOF
23150 #define HAVE_VPRINTF 1
23151 EOF
23152
23153 else
23154   echo "$ac_t""no" 1>&6
23155 fi
23156
23157 if test "$ac_cv_func_vprintf" != yes; then
23158 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
23159 echo "configure:23160: checking for _doprnt" >&5
23160 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
23161   echo $ac_n "(cached) $ac_c" 1>&6
23162 else
23163   cat > conftest.$ac_ext <<EOF
23164 #line 23165 "configure"
23165 #include "confdefs.h"
23166 /* System header to define __stub macros and hopefully few prototypes,
23167     which can conflict with char _doprnt(); below.  */
23168 #include <assert.h>
23169 /* Override any gcc2 internal prototype to avoid an error.  */
23170 /* We use char because int might match the return type of a gcc2
23171     builtin and then its argument prototype would still apply.  */
23172 char _doprnt();
23173 char (*f)();
23174
23175 int main() {
23176
23177 /* The GNU C library defines this for functions which it implements
23178     to always fail with ENOSYS.  Some functions are actually named
23179     something starting with __ and the normal name is an alias.  */
23180 #if defined (__stub__doprnt) || defined (__stub____doprnt)
23181 choke me
23182 #else
23183 f = _doprnt;
23184 #endif
23185
23186 ; return 0; }
23187 EOF
23188 if { (eval echo configure:23189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23189   rm -rf conftest*
23190   eval "ac_cv_func__doprnt=yes"
23191 else
23192   echo "configure: failed program was:" >&5
23193   cat conftest.$ac_ext >&5
23194   rm -rf conftest*
23195   eval "ac_cv_func__doprnt=no"
23196 fi
23197 rm -f conftest*
23198 fi
23199
23200 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
23201   echo "$ac_t""yes" 1>&6
23202   cat >> confdefs.h <<\EOF
23203 #define HAVE_DOPRNT 1
23204 EOF
23205
23206 else
23207   echo "$ac_t""no" 1>&6
23208 fi
23209
23210 fi
23211
23212
23213 if test $ac_cv_func_vprintf = yes ; then
23214                 for ac_func in snprintf vsnprintf
23215 do
23216 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23217 echo "configure:23218: checking for $ac_func" >&5
23218 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23219   echo $ac_n "(cached) $ac_c" 1>&6
23220 else
23221   cat > conftest.$ac_ext <<EOF
23222 #line 23223 "configure"
23223 #include "confdefs.h"
23224 /* System header to define __stub macros and hopefully few prototypes,
23225     which can conflict with char $ac_func(); below.  */
23226 #include <assert.h>
23227 /* Override any gcc2 internal prototype to avoid an error.  */
23228 /* We use char because int might match the return type of a gcc2
23229     builtin and then its argument prototype would still apply.  */
23230 char $ac_func();
23231 char (*f)();
23232
23233 int main() {
23234
23235 /* The GNU C library defines this for functions which it implements
23236     to always fail with ENOSYS.  Some functions are actually named
23237     something starting with __ and the normal name is an alias.  */
23238 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23239 choke me
23240 #else
23241 f = $ac_func;
23242 #endif
23243
23244 ; return 0; }
23245 EOF
23246 if { (eval echo configure:23247: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23247   rm -rf conftest*
23248   eval "ac_cv_func_$ac_func=yes"
23249 else
23250   echo "configure: failed program was:" >&5
23251   cat conftest.$ac_ext >&5
23252   rm -rf conftest*
23253   eval "ac_cv_func_$ac_func=no"
23254 fi
23255 rm -f conftest*
23256 fi
23257
23258 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23259   echo "$ac_t""yes" 1>&6
23260     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23261   cat >> confdefs.h <<EOF
23262 #define $ac_tr_func 1
23263 EOF
23264  
23265 else
23266   echo "$ac_t""no" 1>&6
23267 fi
23268 done
23269
23270 fi
23271
23272 for ac_func in \
23273         bcopy                   \
23274         closesocket             \
23275         chroot                  \
23276         endgrent                \
23277         endpwent                \
23278         fcntl                   \
23279         flock                   \
23280         fstat                   \
23281         getdtablesize   \
23282         getgrgid                \
23283         gethostname             \
23284         getpass                 \
23285         getpassphrase   \
23286         getpwuid                \
23287         getpwnam                \
23288         getspnam                \
23289         gettimeofday    \
23290         initgroups              \
23291         lockf                   \
23292         memcpy                  \
23293         memmove                 \
23294         mkstemp                 \
23295         mktemp                  \
23296         pipe                    \
23297         read                    \
23298         recv                    \
23299         recvfrom                \
23300         setpwfile               \
23301         setgid                  \
23302         setegid                 \
23303         setsid                  \
23304         setuid                  \
23305         seteuid                 \
23306         sigaction               \
23307         signal                  \
23308         sigset                  \
23309         strdup                  \
23310         strpbrk                 \
23311         strrchr                 \
23312         strsep                  \
23313         strstr                  \
23314         strtol                  \
23315         strtoul                 \
23316         strtoq                  \
23317         strtouq                 \
23318         strtoll                 \
23319         strspn                  \
23320         sysconf                 \
23321         usleep                  \
23322         waitpid                 \
23323         wait4                   \
23324         write                   \
23325         send                    \
23326         sendmsg                 \
23327         sendto                  \
23328
23329 do
23330 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23331 echo "configure:23332: checking for $ac_func" >&5
23332 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23333   echo $ac_n "(cached) $ac_c" 1>&6
23334 else
23335   cat > conftest.$ac_ext <<EOF
23336 #line 23337 "configure"
23337 #include "confdefs.h"
23338 /* System header to define __stub macros and hopefully few prototypes,
23339     which can conflict with char $ac_func(); below.  */
23340 #include <assert.h>
23341 /* Override any gcc2 internal prototype to avoid an error.  */
23342 /* We use char because int might match the return type of a gcc2
23343     builtin and then its argument prototype would still apply.  */
23344 char $ac_func();
23345 char (*f)();
23346
23347 int main() {
23348
23349 /* The GNU C library defines this for functions which it implements
23350     to always fail with ENOSYS.  Some functions are actually named
23351     something starting with __ and the normal name is an alias.  */
23352 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23353 choke me
23354 #else
23355 f = $ac_func;
23356 #endif
23357
23358 ; return 0; }
23359 EOF
23360 if { (eval echo configure:23361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23361   rm -rf conftest*
23362   eval "ac_cv_func_$ac_func=yes"
23363 else
23364   echo "configure: failed program was:" >&5
23365   cat conftest.$ac_ext >&5
23366   rm -rf conftest*
23367   eval "ac_cv_func_$ac_func=no"
23368 fi
23369 rm -f conftest*
23370 fi
23371
23372 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23373   echo "$ac_t""yes" 1>&6
23374     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23375   cat >> confdefs.h <<EOF
23376 #define $ac_tr_func 1
23377 EOF
23378  
23379 else
23380   echo "$ac_t""no" 1>&6
23381 fi
23382 done
23383
23384
23385 for ac_func in getopt getpeereid
23386 do
23387 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
23388 echo "configure:23389: checking for $ac_func" >&5
23389 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
23390   echo $ac_n "(cached) $ac_c" 1>&6
23391 else
23392   cat > conftest.$ac_ext <<EOF
23393 #line 23394 "configure"
23394 #include "confdefs.h"
23395 /* System header to define __stub macros and hopefully few prototypes,
23396     which can conflict with char $ac_func(); below.  */
23397 #include <assert.h>
23398 /* Override any gcc2 internal prototype to avoid an error.  */
23399 /* We use char because int might match the return type of a gcc2
23400     builtin and then its argument prototype would still apply.  */
23401 char $ac_func();
23402 char (*f)();
23403
23404 int main() {
23405
23406 /* The GNU C library defines this for functions which it implements
23407     to always fail with ENOSYS.  Some functions are actually named
23408     something starting with __ and the normal name is an alias.  */
23409 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23410 choke me
23411 #else
23412 f = $ac_func;
23413 #endif
23414
23415 ; return 0; }
23416 EOF
23417 if { (eval echo configure:23418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23418   rm -rf conftest*
23419   eval "ac_cv_func_$ac_func=yes"
23420 else
23421   echo "configure: failed program was:" >&5
23422   cat conftest.$ac_ext >&5
23423   rm -rf conftest*
23424   eval "ac_cv_func_$ac_func=no"
23425 fi
23426 rm -f conftest*
23427 fi
23428
23429 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
23430   echo "$ac_t""yes" 1>&6
23431     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
23432   cat >> confdefs.h <<EOF
23433 #define $ac_tr_func 1
23434 EOF
23435  
23436 else
23437   echo "$ac_t""no" 1>&6
23438 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
23439 fi
23440 done
23441
23442
23443
23444 if test "$ac_cv_func_getopt" != yes; then
23445         LIBSRCS="$LIBSRCS getopt.c"
23446 fi
23447 if test "$ac_cv_func_getpeereid" != yes; then
23448         echo $ac_n "checking for msg_accrights in msghdr""... $ac_c" 1>&6
23449 echo "configure:23450: checking for msg_accrights in msghdr" >&5
23450 if eval "test \"\${ol_cv_msghdr_msg_accrights+set}\" = set"; then
23451   echo $ac_n "(cached) $ac_c" 1>&6
23452 else
23453   cat > conftest.$ac_ext <<EOF
23454 #line 23455 "configure"
23455 #include "confdefs.h"
23456 #include <sys/socket.h>
23457 int main() {
23458 struct msghdr m; m.msg_accrightslen=0
23459 ; return 0; }
23460 EOF
23461 if { (eval echo configure:23462: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
23462   rm -rf conftest*
23463   ol_cv_msghdr_msg_accrights=yes
23464 else
23465   echo "configure: failed program was:" >&5
23466   cat conftest.$ac_ext >&5
23467   rm -rf conftest*
23468   ol_cv_msghdr_msg_accrights=no
23469 fi
23470 rm -f conftest*
23471         
23472 fi
23473
23474 echo "$ac_t""$ol_cv_msghdr_msg_accrights" 1>&6
23475   if test $ol_cv_msghdr_msg_accrights = "yes" ; then
23476         cat >> confdefs.h <<\EOF
23477 #define HAVE_MSGHDR_MSG_ACCRIGHTS 1
23478 EOF
23479
23480   fi
23481
23482         LIBSRCS="$LIBSRCS getpeereid.c"
23483 fi
23484 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
23485         if test "$ac_cv_func_snprintf" != yes; then
23486                 cat >> confdefs.h <<\EOF
23487 #define snprintf ber_pvt_snprintf
23488 EOF
23489
23490         fi
23491         if test "$ac_cv_func_vsnprintf" != yes; then
23492                 cat >> confdefs.h <<\EOF
23493 #define vsnprintf ber_pvt_vsnprintf
23494 EOF
23495
23496         fi
23497 fi
23498
23499
23500 if test "$ol_enable_slapi" != no ; then
23501                         for ac_hdr in ltdl.h
23502 do
23503 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
23504 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
23505 echo "configure:23506: checking for $ac_hdr" >&5
23506 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
23507   echo $ac_n "(cached) $ac_c" 1>&6
23508 else
23509   cat > conftest.$ac_ext <<EOF
23510 #line 23511 "configure"
23511 #include "confdefs.h"
23512 #include <$ac_hdr>
23513 EOF
23514 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
23515 { (eval echo configure:23516: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
23516 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
23517 if test -z "$ac_err"; then
23518   rm -rf conftest*
23519   eval "ac_cv_header_$ac_safe=yes"
23520 else
23521   echo "$ac_err" >&5
23522   echo "configure: failed program was:" >&5
23523   cat conftest.$ac_ext >&5
23524   rm -rf conftest*
23525   eval "ac_cv_header_$ac_safe=no"
23526 fi
23527 rm -f conftest*
23528 fi
23529 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
23530   echo "$ac_t""yes" 1>&6
23531     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
23532   cat >> confdefs.h <<EOF
23533 #define $ac_tr_hdr 1
23534 EOF
23535  
23536 else
23537   echo "$ac_t""no" 1>&6
23538 fi
23539 done
23540
23541
23542         if test $ac_cv_header_ltdl_h != yes ; then
23543                 { echo "configure: error: could not locate <ltdl.h>" 1>&2; exit 1; }
23544         fi
23545         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
23546 echo "configure:23547: checking for lt_dlinit in -lltdl" >&5
23547 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
23548 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
23549   echo $ac_n "(cached) $ac_c" 1>&6
23550 else
23551   ac_save_LIBS="$LIBS"
23552 LIBS="-lltdl  $LIBS"
23553 cat > conftest.$ac_ext <<EOF
23554 #line 23555 "configure"
23555 #include "confdefs.h"
23556 /* Override any gcc2 internal prototype to avoid an error.  */
23557 /* We use char because int might match the return type of a gcc2
23558     builtin and then its argument prototype would still apply.  */
23559 char lt_dlinit();
23560
23561 int main() {
23562 lt_dlinit()
23563 ; return 0; }
23564 EOF
23565 if { (eval echo configure:23566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
23566   rm -rf conftest*
23567   eval "ac_cv_lib_$ac_lib_var=yes"
23568 else
23569   echo "configure: failed program was:" >&5
23570   cat conftest.$ac_ext >&5
23571   rm -rf conftest*
23572   eval "ac_cv_lib_$ac_lib_var=no"
23573 fi
23574 rm -f conftest*
23575 LIBS="$ac_save_LIBS"
23576
23577 fi
23578 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
23579   echo "$ac_t""yes" 1>&6
23580   
23581                 SLAPI_LIBS=-lltdl
23582                 LIBSLAPI=libslapi.a
23583                 LIBSLAPITOOLS=../libslapi.a
23584                 cat >> confdefs.h <<\EOF
23585 #define HAVE_LIBLTDL 1
23586 EOF
23587
23588         
23589 else
23590   echo "$ac_t""no" 1>&6
23591 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
23592 fi
23593
23594
23595         cat >> confdefs.h <<\EOF
23596 #define LDAP_SLAPI 1
23597 EOF
23598
23599 fi
23600
23601 if test "$ol_enable_debug" != no ; then
23602         cat >> confdefs.h <<\EOF
23603 #define LDAP_DEBUG 1
23604 EOF
23605
23606 fi
23607 if test "$ol_enable_syslog" = yes ; then
23608         cat >> confdefs.h <<\EOF
23609 #define LDAP_SYSLOG 1
23610 EOF
23611
23612 fi
23613 if test "$ol_link_kbind" != no ; then
23614         cat >> confdefs.h <<\EOF
23615 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
23616 EOF
23617
23618 fi
23619 if test "$ol_enable_proctitle" != no ; then
23620         cat >> confdefs.h <<\EOF
23621 #define LDAP_PROCTITLE 1
23622 EOF
23623
23624 fi
23625 if test "$ol_enable_referrals" != no ; then
23626         cat >> confdefs.h <<\EOF
23627 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
23628 EOF
23629
23630 fi
23631 if test "$ol_enable_local" != no; then
23632         cat >> confdefs.h <<\EOF
23633 #define LDAP_PF_LOCAL 1
23634 EOF
23635
23636 fi
23637 if test "$ol_link_ipv6" != no; then
23638         cat >> confdefs.h <<\EOF
23639 #define LDAP_PF_INET6 1
23640 EOF
23641
23642 fi
23643 if test "$ol_enable_cleartext" != no ; then
23644         cat >> confdefs.h <<\EOF
23645 #define SLAPD_CLEARTEXT 1
23646 EOF
23647
23648 fi
23649 if test "$ol_enable_crypt" != no ; then
23650         cat >> confdefs.h <<\EOF
23651 #define SLAPD_CRYPT 1
23652 EOF
23653
23654 fi
23655 if test "$ol_link_spasswd" != no ; then
23656         cat >> confdefs.h <<\EOF
23657 #define SLAPD_SPASSWD 1
23658 EOF
23659
23660 fi
23661 if test "$ol_enable_multimaster" != no ; then
23662         cat >> confdefs.h <<\EOF
23663 #define SLAPD_MULTIMASTER 1
23664 EOF
23665
23666 fi
23667 if test "$ol_enable_rlookups" != no ; then
23668         cat >> confdefs.h <<\EOF
23669 #define SLAPD_RLOOKUPS 1
23670 EOF
23671
23672 fi
23673 if test "$ol_enable_aci" != no ; then
23674         cat >> confdefs.h <<\EOF
23675 #define SLAPD_ACI_ENABLED 1
23676 EOF
23677
23678 fi
23679
23680 if test "$ol_link_modules" != no ; then
23681         cat >> confdefs.h <<\EOF
23682 #define SLAPD_MODULES 1
23683 EOF
23684
23685         BUILD_SLAPD=yes
23686         SLAPD_MODULES_LDFLAGS="-dlopen self"
23687 fi
23688
23689 cat >> confdefs.h <<\EOF
23690 #define SLAPD_MOD_STATIC 1
23691 EOF
23692
23693 cat >> confdefs.h <<\EOF
23694 #define SLAPD_MOD_DYNAMIC 2
23695 EOF
23696
23697
23698 if test "$ol_enable_bdb" != no ; then
23699         BUILD_SLAPD=yes
23700         BUILD_BDB=$ol_enable_bdb
23701         if test "$ol_enable_bdb" = mod ; then
23702                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
23703                 MFLAG=SLAPD_MOD_DYNAMIC
23704         else
23705                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
23706                 MFLAG=SLAPD_MOD_STATIC
23707         fi
23708         cat >> confdefs.h <<EOF
23709 #define SLAPD_BDB $MFLAG
23710 EOF
23711
23712 fi
23713
23714 if test "$ol_enable_dnssrv" != no ; then
23715         BUILD_SLAPD=yes
23716         BUILD_DNSSRV=$ol_enable_dnssrv
23717         if test "$ol_enable_dnssrv" = mod ; then
23718                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
23719                 MFLAG=SLAPD_MOD_DYNAMIC
23720         else
23721                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
23722                 MFLAG=SLAPD_MOD_STATIC
23723         fi
23724         cat >> confdefs.h <<EOF
23725 #define SLAPD_DNSSRV $MFLAG
23726 EOF
23727
23728 fi
23729
23730 if test "$ol_enable_hdb" != no ; then
23731         BUILD_SLAPD=yes
23732         BUILD_HDB=$ol_enable_hdb
23733         if test "$ol_enable_hdb" = mod ; then
23734                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-hdb"
23735                 MFLAG=SLAPD_MOD_DYNAMIC
23736         else
23737                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-hdb"
23738                 MFLAG=SLAPD_MOD_STATIC
23739         fi
23740         cat >> confdefs.h <<EOF
23741 #define SLAPD_HDB $MFLAG
23742 EOF
23743
23744 fi
23745
23746 if test "$ol_enable_ldap" != no ; then
23747         BUILD_SLAPD=yes
23748         BUILD_LDAP=$ol_enable_ldap
23749         if test "$ol_enable_ldap" = mod ; then
23750                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
23751                 MFLAG=SLAPD_MOD_DYNAMIC
23752         else
23753                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
23754                 MFLAG=SLAPD_MOD_STATIC
23755         fi
23756         cat >> confdefs.h <<EOF
23757 #define SLAPD_LDAP $MFLAG
23758 EOF
23759
23760 fi
23761
23762 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
23763         BUILD_SLAPD=yes
23764         BUILD_LDBM=$ol_enable_ldbm
23765         if test "$ol_enable_ldbm" = mod ; then
23766                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
23767                 MFLAG=SLAPD_MOD_DYNAMIC
23768         else
23769                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
23770                 MFLAG=SLAPD_MOD_STATIC
23771         fi
23772         cat >> confdefs.h <<EOF
23773 #define SLAPD_LDBM $MFLAG
23774 EOF
23775
23776 fi
23777
23778 if test "$ol_enable_meta" != no ; then
23779         BUILD_SLAPD=yes
23780         BUILD_META=$ol_enable_meta
23781         BUILD_REWRITE=yes
23782         if test "$ol_enable_meta" = mod ; then
23783                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
23784                 MFLAG=SLAPD_MOD_DYNAMIC
23785         else
23786                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
23787                 MFLAG=SLAPD_MOD_STATIC
23788         fi
23789         cat >> confdefs.h <<EOF
23790 #define SLAPD_META $MFLAG
23791 EOF
23792
23793 fi
23794
23795 if test "$ol_enable_monitor" != no ; then
23796         BUILD_SLAPD=yes
23797         BUILD_MONITOR=$ol_enable_monitor
23798         if test "$ol_enable_monitor" = mod ; then
23799                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
23800                 MFLAG=SLAPD_MOD_DYNAMIC
23801         else
23802                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
23803                 MFLAG=SLAPD_MOD_STATIC
23804         fi
23805         cat >> confdefs.h <<EOF
23806 #define SLAPD_MONITOR $MFLAG
23807 EOF
23808
23809 fi
23810
23811 if test "$ol_enable_null" != no ; then
23812         BUILD_SLAPD=yes
23813         BUILD_NULL=$ol_enable_null
23814         if test "$ol_enable_null" = mod ; then
23815                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
23816                 MFLAG=SLAPD_MOD_DYNAMIC
23817         else
23818                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
23819                 MFLAG=SLAPD_MOD_STATIC
23820         fi
23821         cat >> confdefs.h <<EOF
23822 #define SLAPD_NULL $MFLAG
23823 EOF
23824
23825 fi
23826
23827 if test "$ol_enable_passwd" != no ; then
23828         BUILD_SLAPD=yes
23829         BUILD_PASSWD=$ol_enable_passwd
23830         if test "$ol_enable_passwd" = mod ; then
23831                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
23832                 MFLAG=SLAPD_MOD_DYNAMIC
23833         else
23834                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
23835                 MFLAG=SLAPD_MOD_STATIC
23836         fi
23837         cat >> confdefs.h <<EOF
23838 #define SLAPD_PASSWD $MFLAG
23839 EOF
23840
23841 fi
23842
23843 if test "$ol_link_perl" != no ; then
23844         BUILD_SLAPD=yes
23845         BUILD_PERL=$ol_enable_perl
23846         if test "$ol_enable_perl" = mod ; then
23847                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
23848                 MFLAG=SLAPD_MOD_DYNAMIC
23849         else
23850                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
23851                 MFLAG=SLAPD_MOD_STATIC
23852         fi
23853         cat >> confdefs.h <<EOF
23854 #define SLAPD_PERL $MFLAG
23855 EOF
23856
23857 fi
23858
23859 if test "$ol_enable_relay" != no ; then
23860         BUILD_SLAPD=yes
23861         BUILD_RELAY=$ol_enable_relay
23862         if test "$ol_enable_relay" = mod ; then
23863                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-relay"
23864                 MFLAG=SLAPD_MOD_DYNAMIC
23865         else
23866                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-relay"
23867                 MFLAG=SLAPD_MOD_STATIC
23868         fi
23869         cat >> confdefs.h <<EOF
23870 #define SLAPD_RELAY $MFLAG
23871 EOF
23872
23873 fi
23874
23875 if test "$ol_enable_shell" != no ; then
23876         if test "$ol_link_thread" != no ; then
23877                 echo "configure: warning: Use of --without-threads is recommended with back-shell" 1>&2
23878         fi
23879         BUILD_SLAPD=yes
23880         BUILD_SHELL=$ol_enable_shell
23881         if test "$ol_enable_shell" = mod ; then
23882                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
23883                 MFLAG=SLAPD_MOD_DYNAMIC
23884         else
23885                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
23886                 MFLAG=SLAPD_MOD_STATIC
23887         fi
23888         cat >> confdefs.h <<EOF
23889 #define SLAPD_SHELL $MFLAG
23890 EOF
23891
23892 fi
23893
23894 if test "$ol_link_sql" != no ; then
23895         BUILD_SLAPD=yes
23896         BUILD_SQL=$ol_enable_sql
23897         if test "$ol_enable_sql" = mod; then
23898                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
23899                 MFLAG=SLAPD_MOD_DYNAMIC
23900         else
23901                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
23902                 MFLAG=SLAPD_MOD_STATIC
23903         fi
23904         cat >> confdefs.h <<EOF
23905 #define SLAPD_SQL $MFLAG
23906 EOF
23907
23908 fi
23909
23910 if test "$ol_enable_chain" != no ; then
23911         BUILD_CHAIN=$ol_enable_chain
23912         if test "$ol_enable_chain" = mod ; then
23913                 MFLAG=SLAPD_MOD_DYNAMIC
23914                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS chain.la"
23915         else
23916                 MFLAG=SLAPD_MOD_STATIC
23917         fi
23918         cat >> confdefs.h <<EOF
23919 #define SLAPD_OVER_CHAIN $MFLAG
23920 EOF
23921
23922 fi
23923
23924 if test "$ol_enable_denyop" != no ; then
23925         BUILD_DENYOP=$ol_enable_denyop
23926         if test "$ol_enable_denyop" = mod ; then
23927                 MFLAG=SLAPD_MOD_DYNAMIC
23928                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS denyop.la"
23929         else
23930                 MFLAG=SLAPD_MOD_STATIC
23931         fi
23932         cat >> confdefs.h <<EOF
23933 #define SLAPD_OVER_DENYOP $MFLAG
23934 EOF
23935
23936 fi
23937
23938 if test "$ol_enable_dyngroup" != no ; then
23939         BUILD_DYNGROUP=$ol_enable_dyngroup
23940         if test "$ol_enable_dyngroup" = mod ; then
23941                 MFLAG=SLAPD_MOD_DYNAMIC
23942                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS dyngroup.la"
23943         else
23944                 MFLAG=SLAPD_MOD_STATIC
23945         fi
23946         cat >> confdefs.h <<EOF
23947 #define SLAPD_OVER_DYNGROUP $MFLAG
23948 EOF
23949
23950 fi
23951
23952 if test "$ol_enable_lastmod" != no ; then
23953         BUILD_LASTMOD=$ol_enable_lastmod
23954         if test "$ol_enable_lastmod" = mod ; then
23955                 MFLAG=SLAPD_MOD_DYNAMIC
23956                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS lastmod.la"
23957         else
23958                 MFLAG=SLAPD_MOD_STATIC
23959         fi
23960         cat >> confdefs.h <<EOF
23961 #define SLAPD_OVER_LASTMOD $MFLAG
23962 EOF
23963
23964 fi
23965
23966 if test "$ol_enable_ppolicy" != no ; then
23967         BUILD_PPOLICY=$ol_enable_ppolicy
23968         if test "$ol_enable_ppolicy" = mod ; then
23969                 MFLAG=SLAPD_MOD_DYNAMIC
23970                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS ppolicy.la"
23971         else
23972                 MFLAG=SLAPD_MOD_STATIC
23973         fi
23974         cat >> confdefs.h <<EOF
23975 #define SLAPD_OVER_PPOLICY $MFLAG
23976 EOF
23977
23978 fi
23979
23980 if test "$ol_enable_proxycache" != no ; then
23981         BUILD_PROXYCACHE=$ol_enable_proxycache
23982         if test "$ol_enable_proxycache" = mod ; then
23983                 MFLAG=SLAPD_MOD_DYNAMIC
23984                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS pcache.la"
23985         else
23986                 MFLAG=SLAPD_MOD_STATIC
23987         fi
23988         cat >> confdefs.h <<EOF
23989 #define SLAPD_OVER_PROXYCACHE $MFLAG
23990 EOF
23991
23992 fi
23993
23994 if test "$ol_enable_refint" != no ; then
23995         BUILD_REFINT=$ol_enable_refint
23996         if test "$ol_enable_refint" = mod ; then
23997                 MFLAG=SLAPD_MOD_DYNAMIC
23998                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS refint.la"
23999         else
24000                 MFLAG=SLAPD_MOD_STATIC
24001         fi
24002         cat >> confdefs.h <<EOF
24003 #define SLAPD_OVER_REFINT $MFLAG
24004 EOF
24005
24006 fi
24007
24008 if test "$ol_enable_rwm" != no ; then
24009         BUILD_REWRITE=yes
24010         BUILD_RWM=$ol_enable_rwm
24011         if test "$ol_enable_rwm" = mod ; then
24012                 MFLAG=SLAPD_MOD_DYNAMIC
24013                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS rwm.la"
24014         else
24015                 MFLAG=SLAPD_MOD_STATIC
24016         fi
24017         cat >> confdefs.h <<EOF
24018 #define SLAPD_OVER_RWM $MFLAG
24019 EOF
24020
24021 fi
24022
24023 if test "$ol_enable_unique" != no ; then
24024         BUILD_UNIQUE=$ol_enable_unique
24025         if test "$ol_enable_unique" = mod ; then
24026                 MFLAG=SLAPD_MOD_DYNAMIC
24027                 SLAPD_DYNAMIC_OVERLAYS="$SLAPD_DYNAMIC_OVERLAYS unique.la"
24028         else
24029                 MFLAG=SLAPD_MOD_STATIC
24030         fi
24031         cat >> confdefs.h <<EOF
24032 #define SLAPD_OVER_UNIQUE $MFLAG
24033 EOF
24034
24035 fi
24036
24037 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
24038         $BUILD_SLAPD = yes ; then
24039         BUILD_SLURPD=yes
24040 fi
24041
24042 if test "$ol_enable_rewrite" != no ; then
24043         cat >> confdefs.h <<\EOF
24044 #define ENABLE_REWRITE 1
24045 EOF
24046
24047         BUILD_REWRITE=yes
24048 fi
24049
24050 if test "$ol_enable_slapi" != no ; then
24051         cat >> confdefs.h <<\EOF
24052 #define ENABLE_SLAPI 1
24053 EOF
24054
24055         BUILD_SLAPI=yes
24056         SLAPD_SLAPI_DEPEND=libslapi.a
24057 fi
24058
24059
24060
24061 if test "$ac_cv_mingw32" = yes ; then
24062         PLAT=NT
24063         SLAPD_MODULES_LDFLAGS=
24064 else
24065         PLAT=UNIX
24066 fi
24067
24068 if test -z "$SLAPD_STATIC_BACKENDS"; then
24069         SLAPD_NO_STATIC='#'
24070 else
24071         SLAPD_NO_STATIC=
24072 fi
24073
24074
24075
24076
24077
24078
24079
24080
24081   
24082   
24083   
24084   
24085   
24086   
24087   
24088   
24089   
24090   
24091   
24092   
24093   
24094   
24095   
24096   
24097   
24098   
24099   
24100   
24101   
24102   
24103   
24104   
24105
24106
24107
24108
24109
24110
24111
24112
24113
24114
24115
24116
24117
24118
24119
24120
24121
24122
24123
24124
24125
24126
24127
24128
24129
24130
24131
24132
24133
24134
24135
24136
24137
24138
24139
24140
24141
24142
24143 # Check whether --with-xxinstall or --without-xxinstall was given.
24144 if test "${with_xxinstall+set}" = set; then
24145   withval="$with_xxinstall"
24146   :
24147 fi
24148
24149
24150
24151 trap '' 1 2 15
24152
24153 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
24154
24155 test "x$prefix" = xNONE && prefix=$ac_default_prefix
24156 # Let make expand exec_prefix.
24157 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24158
24159 # Any assignment to VPATH causes Sun make to only execute
24160 # the first set of double-colon rules, so remove it if not needed.
24161 # If there is a colon in the path, we need to keep it.
24162 if test "x$srcdir" = x.; then
24163   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
24164 fi
24165
24166 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
24167
24168 DEFS=-DHAVE_CONFIG_H
24169
24170 # Without the "./", some shells look in PATH for config.status.
24171 : ${CONFIG_STATUS=./config.status}
24172
24173 echo creating $CONFIG_STATUS
24174 rm -f $CONFIG_STATUS
24175 cat > $CONFIG_STATUS <<EOF
24176 #! /bin/sh
24177 # Generated automatically by configure.
24178 # Run this file to recreate the current configuration.
24179 # This directory was configured as follows,
24180 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
24181 #
24182 # $0 $ac_configure_args
24183 #
24184 # Compiler output produced by configure, useful for debugging
24185 # configure, is in ./config.log if it exists.
24186
24187 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
24188 for ac_option
24189 do
24190   case "\$ac_option" in
24191   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24192     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
24193     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
24194   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
24195     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
24196     exit 0 ;;
24197   -help | --help | --hel | --he | --h)
24198     echo "\$ac_cs_usage"; exit 0 ;;
24199   *) echo "\$ac_cs_usage"; exit 1 ;;
24200   esac
24201 done
24202
24203 ac_given_srcdir=$srcdir
24204 ac_given_INSTALL="$INSTALL"
24205
24206 trap 'rm -fr `echo "\
24207 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24208 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24209 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24210 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24211 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24212 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24213 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24214 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24215 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24216 include/Makefile:build/top.mk:include/Makefile.in \
24217 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24218 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24219 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24220 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24221 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24222 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24223 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24224 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24225 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24226 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24227 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24228 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24229 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24230 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24231 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24232 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24233 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24234 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24235 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24236 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24237 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24238 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24239 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24240 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24241 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24242 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24243 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24244 tests/run \
24245 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24246  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
24247 EOF
24248 cat >> $CONFIG_STATUS <<EOF
24249
24250 # Protect against being on the right side of a sed subst in config.status.
24251 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
24252  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
24253 $ac_vpsub
24254 $extrasub
24255 s%@SHELL@%$SHELL%g
24256 s%@CFLAGS@%$CFLAGS%g
24257 s%@CPPFLAGS@%$CPPFLAGS%g
24258 s%@CXXFLAGS@%$CXXFLAGS%g
24259 s%@FFLAGS@%$FFLAGS%g
24260 s%@DEFS@%$DEFS%g
24261 s%@LDFLAGS@%$LDFLAGS%g
24262 s%@LIBS@%$LIBS%g
24263 s%@exec_prefix@%$exec_prefix%g
24264 s%@prefix@%$prefix%g
24265 s%@program_transform_name@%$program_transform_name%g
24266 s%@bindir@%$bindir%g
24267 s%@sbindir@%$sbindir%g
24268 s%@libexecdir@%$libexecdir%g
24269 s%@datadir@%$datadir%g
24270 s%@sysconfdir@%$sysconfdir%g
24271 s%@sharedstatedir@%$sharedstatedir%g
24272 s%@localstatedir@%$localstatedir%g
24273 s%@libdir@%$libdir%g
24274 s%@includedir@%$includedir%g
24275 s%@oldincludedir@%$oldincludedir%g
24276 s%@infodir@%$infodir%g
24277 s%@mandir@%$mandir%g
24278 s%@host@%$host%g
24279 s%@host_alias@%$host_alias%g
24280 s%@host_cpu@%$host_cpu%g
24281 s%@host_vendor@%$host_vendor%g
24282 s%@host_os@%$host_os%g
24283 s%@target@%$target%g
24284 s%@target_alias@%$target_alias%g
24285 s%@target_cpu@%$target_cpu%g
24286 s%@target_vendor@%$target_vendor%g
24287 s%@target_os@%$target_os%g
24288 s%@build@%$build%g
24289 s%@build_alias@%$build_alias%g
24290 s%@build_cpu@%$build_cpu%g
24291 s%@build_vendor@%$build_vendor%g
24292 s%@build_os@%$build_os%g
24293 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
24294 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
24295 s%@INSTALL_DATA@%$INSTALL_DATA%g
24296 s%@PACKAGE@%$PACKAGE%g
24297 s%@VERSION@%$VERSION%g
24298 s%@ACLOCAL@%$ACLOCAL%g
24299 s%@AUTOCONF@%$AUTOCONF%g
24300 s%@AUTOMAKE@%$AUTOMAKE%g
24301 s%@AUTOHEADER@%$AUTOHEADER%g
24302 s%@MAKEINFO@%$MAKEINFO%g
24303 s%@install_sh@%$install_sh%g
24304 s%@AMTAR@%$AMTAR%g
24305 s%@AWK@%$AWK%g
24306 s%@AMTARFLAGS@%$AMTARFLAGS%g
24307 s%@SET_MAKE@%$SET_MAKE%g
24308 s%@OPENLDAP_LIBRELEASE@%$OPENLDAP_LIBRELEASE%g
24309 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
24310 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
24311 s%@top_builddir@%$top_builddir%g
24312 s%@ldap_subdir@%$ldap_subdir%g
24313 s%@CC@%$CC%g
24314 s%@AR@%$AR%g
24315 s%@LN_S@%$LN_S%g
24316 s%@OBJEXT@%$OBJEXT%g
24317 s%@EXEEXT@%$EXEEXT%g
24318 s%@ECHO@%$ECHO%g
24319 s%@RANLIB@%$RANLIB%g
24320 s%@STRIP@%$STRIP%g
24321 s%@DLLTOOL@%$DLLTOOL%g
24322 s%@AS@%$AS%g
24323 s%@OBJDUMP@%$OBJDUMP%g
24324 s%@CPP@%$CPP%g
24325 s%@LIBTOOL@%$LIBTOOL%g
24326 s%@PERLBIN@%$PERLBIN%g
24327 s%@OL_MKDEP@%$OL_MKDEP%g
24328 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
24329 s%@LTSTATIC@%$LTSTATIC%g
24330 s%@LIBOBJS@%$LIBOBJS%g
24331 s%@LIBSRCS@%$LIBSRCS%g
24332 s%@PLAT@%$PLAT%g
24333 s%@WITH_SASL@%$WITH_SASL%g
24334 s%@WITH_TLS@%$WITH_TLS%g
24335 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
24336 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
24337 s%@BUILD_SLAPI@%$BUILD_SLAPI%g
24338 s%@SLAPD_SLAPI_DEPEND@%$SLAPD_SLAPI_DEPEND%g
24339 s%@BUILD_BDB@%$BUILD_BDB%g
24340 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
24341 s%@BUILD_HDB@%$BUILD_HDB%g
24342 s%@BUILD_LDAP@%$BUILD_LDAP%g
24343 s%@BUILD_LDBM@%$BUILD_LDBM%g
24344 s%@BUILD_META@%$BUILD_META%g
24345 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
24346 s%@BUILD_NULL@%$BUILD_NULL%g
24347 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
24348 s%@BUILD_RELAY@%$BUILD_RELAY%g
24349 s%@BUILD_PERL@%$BUILD_PERL%g
24350 s%@BUILD_SHELL@%$BUILD_SHELL%g
24351 s%@BUILD_SQL@%$BUILD_SQL%g
24352 s%@BUILD_CHAIN@%$BUILD_CHAIN%g
24353 s%@BUILD_DENYOP@%$BUILD_DENYOP%g
24354 s%@BUILD_DYNGROUP@%$BUILD_DYNGROUP%g
24355 s%@BUILD_LASTMOD@%$BUILD_LASTMOD%g
24356 s%@BUILD_PPOLICY@%$BUILD_PPOLICY%g
24357 s%@BUILD_PROXYCACHE@%$BUILD_PROXYCACHE%g
24358 s%@BUILD_REFINT@%$BUILD_REFINT%g
24359 s%@BUILD_RWM@%$BUILD_RWM%g
24360 s%@BUILD_UNIQUE@%$BUILD_UNIQUE%g
24361 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
24362 s%@LDAP_LIBS@%$LDAP_LIBS%g
24363 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
24364 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
24365 s%@LDBM_LIBS@%$LDBM_LIBS%g
24366 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
24367 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
24368 s%@WRAP_LIBS@%$WRAP_LIBS%g
24369 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
24370 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
24371 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
24372 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
24373 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
24374 s%@SLAPD_DYNAMIC_OVERLAYS@%$SLAPD_DYNAMIC_OVERLAYS%g
24375 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
24376 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
24377 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
24378 s%@KRB4_LIBS@%$KRB4_LIBS%g
24379 s%@KRB5_LIBS@%$KRB5_LIBS%g
24380 s%@SASL_LIBS@%$SASL_LIBS%g
24381 s%@TLS_LIBS@%$TLS_LIBS%g
24382 s%@MODULES_LIBS@%$MODULES_LIBS%g
24383 s%@SLAPI_LIBS@%$SLAPI_LIBS%g
24384 s%@LIBSLAPI@%$LIBSLAPI%g
24385 s%@LIBSLAPITOOLS@%$LIBSLAPITOOLS%g
24386 s%@AUTH_LIBS@%$AUTH_LIBS%g
24387 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
24388 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
24389 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
24390 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
24391
24392 CEOF
24393 EOF
24394
24395 cat >> $CONFIG_STATUS <<\EOF
24396
24397 # Split the substitutions into bite-sized pieces for seds with
24398 # small command number limits, like on Digital OSF/1 and HP-UX.
24399 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
24400 ac_file=1 # Number of current file.
24401 ac_beg=1 # First line for current file.
24402 ac_end=$ac_max_sed_cmds # Line after last line for current file.
24403 ac_more_lines=:
24404 ac_sed_cmds=""
24405 while $ac_more_lines; do
24406   if test $ac_beg -gt 1; then
24407     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
24408   else
24409     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
24410   fi
24411   if test ! -s conftest.s$ac_file; then
24412     ac_more_lines=false
24413     rm -f conftest.s$ac_file
24414   else
24415     if test -z "$ac_sed_cmds"; then
24416       ac_sed_cmds="sed -f conftest.s$ac_file"
24417     else
24418       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
24419     fi
24420     ac_file=`expr $ac_file + 1`
24421     ac_beg=$ac_end
24422     ac_end=`expr $ac_end + $ac_max_sed_cmds`
24423   fi
24424 done
24425 if test -z "$ac_sed_cmds"; then
24426   ac_sed_cmds=cat
24427 fi
24428 EOF
24429
24430 cat >> $CONFIG_STATUS <<EOF
24431
24432 CONFIG_FILES=\${CONFIG_FILES-"\
24433 Makefile:build/top.mk:Makefile.in:build/dir.mk \
24434 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
24435 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
24436 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
24437 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
24438 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
24439 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
24440 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
24441 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
24442 include/Makefile:build/top.mk:include/Makefile.in \
24443 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
24444 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24445 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24446 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
24447 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
24448 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
24449 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
24450 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
24451 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
24452 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
24453 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
24454 servers/slapd/back-hdb/Makefile:build/top.mk:servers/slapd/back-hdb/Makefile.in:build/mod.mk \
24455 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
24456 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
24457 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
24458 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
24459 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
24460 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
24461 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
24462 servers/slapd/back-relay/Makefile:build/top.mk:servers/slapd/back-relay/Makefile.in:build/mod.mk \
24463 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
24464 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
24465 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
24466 servers/slapd/slapi/Makefile:build/top.mk:servers/slapd/slapi/Makefile.in:build/lib.mk:build/lib-shared.mk  \
24467 servers/slapd/overlays/Makefile:build/top.mk:servers/slapd/overlays/Makefile.in:build/lib.mk \
24468 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
24469 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
24470 tests/run \
24471 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
24472 "}
24473 EOF
24474 cat >> $CONFIG_STATUS <<\EOF
24475 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
24476   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24477   case "$ac_file" in
24478   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24479        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24480   *) ac_file_in="${ac_file}.in" ;;
24481   esac
24482
24483   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
24484
24485   # Remove last slash and all that follows it.  Not all systems have dirname.
24486   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24487   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24488     # The file is in a subdirectory.
24489     test ! -d "$ac_dir" && mkdir "$ac_dir"
24490     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
24491     # A "../" for each directory in $ac_dir_suffix.
24492     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
24493   else
24494     ac_dir_suffix= ac_dots=
24495   fi
24496
24497   case "$ac_given_srcdir" in
24498   .)  srcdir=.
24499       if test -z "$ac_dots"; then top_srcdir=.
24500       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
24501   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
24502   *) # Relative path.
24503     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
24504     top_srcdir="$ac_dots$ac_given_srcdir" ;;
24505   esac
24506
24507   case "$ac_given_INSTALL" in
24508   [/$]*) INSTALL="$ac_given_INSTALL" ;;
24509   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
24510   esac
24511
24512   echo creating "$ac_file"
24513   rm -f "$ac_file"
24514   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
24515   case "$ac_file" in
24516   *[Mm]akefile*) ac_comsub="1i\\
24517 # $configure_input" ;;
24518   *) ac_comsub= ;;
24519   esac
24520
24521   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24522   sed -e "$ac_comsub
24523 s%@configure_input@%$configure_input%g
24524 s%@srcdir@%$srcdir%g
24525 s%@top_srcdir@%$top_srcdir%g
24526 s%@INSTALL@%$INSTALL%g
24527 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
24528 fi; done
24529 rm -f conftest.s*
24530
24531 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
24532 # NAME is the cpp macro being defined and VALUE is the value it is being given.
24533 #
24534 # ac_d sets the value in "#define NAME VALUE" lines.
24535 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
24536 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
24537 ac_dC='\3'
24538 ac_dD='%g'
24539 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
24540 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24541 ac_uB='\([      ]\)%\1#\2define\3'
24542 ac_uC=' '
24543 ac_uD='\4%g'
24544 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
24545 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
24546 ac_eB='$%\1#\2define\3'
24547 ac_eC=' '
24548 ac_eD='%g'
24549
24550 if test "${CONFIG_HEADERS+set}" != set; then
24551 EOF
24552 cat >> $CONFIG_STATUS <<EOF
24553   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
24554 EOF
24555 cat >> $CONFIG_STATUS <<\EOF
24556 fi
24557 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
24558   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
24559   case "$ac_file" in
24560   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
24561        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
24562   *) ac_file_in="${ac_file}.in" ;;
24563   esac
24564
24565   echo creating $ac_file
24566
24567   rm -f conftest.frag conftest.in conftest.out
24568   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
24569   cat $ac_file_inputs > conftest.in
24570
24571 EOF
24572
24573 # Transform confdefs.h into a sed script conftest.vals that substitutes
24574 # the proper values into config.h.in to produce config.h.  And first:
24575 # Protect against being on the right side of a sed subst in config.status.
24576 # Protect against being in an unquoted here document in config.status.
24577 rm -f conftest.vals
24578 cat > conftest.hdr <<\EOF
24579 s/[\\&%]/\\&/g
24580 s%[\\$`]%\\&%g
24581 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
24582 s%ac_d%ac_u%gp
24583 s%ac_u%ac_e%gp
24584 EOF
24585 sed -n -f conftest.hdr confdefs.h > conftest.vals
24586 rm -f conftest.hdr
24587
24588 # This sed command replaces #undef with comments.  This is necessary, for
24589 # example, in the case of _POSIX_SOURCE, which is predefined and required
24590 # on some systems where configure will not decide to define it.
24591 cat >> conftest.vals <<\EOF
24592 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
24593 EOF
24594
24595 # Break up conftest.vals because some shells have a limit on
24596 # the size of here documents, and old seds have small limits too.
24597
24598 rm -f conftest.tail
24599 while :
24600 do
24601   ac_lines=`grep -c . conftest.vals`
24602   # grep -c gives empty output for an empty file on some AIX systems.
24603   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
24604   # Write a limited-size here document to conftest.frag.
24605   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
24606   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
24607   echo 'CEOF
24608   sed -f conftest.frag conftest.in > conftest.out
24609   rm -f conftest.in
24610   mv conftest.out conftest.in
24611 ' >> $CONFIG_STATUS
24612   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
24613   rm -f conftest.vals
24614   mv conftest.tail conftest.vals
24615 done
24616 rm -f conftest.vals
24617
24618 cat >> $CONFIG_STATUS <<\EOF
24619   rm -f conftest.frag conftest.h
24620   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
24621   cat conftest.in >> conftest.h
24622   rm -f conftest.in
24623   if cmp -s $ac_file conftest.h 2>/dev/null; then
24624     echo "$ac_file is unchanged"
24625     rm -f conftest.h
24626   else
24627     # Remove last slash and all that follows it.  Not all systems have dirname.
24628       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
24629       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
24630       # The file is in a subdirectory.
24631       test ! -d "$ac_dir" && mkdir "$ac_dir"
24632     fi
24633     rm -f $ac_file
24634     mv conftest.h $ac_file
24635   fi
24636 fi; done
24637
24638 EOF
24639 cat >> $CONFIG_STATUS <<EOF
24640
24641 EOF
24642 cat >> $CONFIG_STATUS <<\EOF
24643
24644 chmod +x tests/run
24645 date > stamp-h
24646 echo Please run \"make depend\" to build dependencies
24647
24648 exit 0
24649 EOF
24650 chmod +x $CONFIG_STATUS
24651 rm -fr confdefs* $ac_clean_files
24652 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
24653