]> git.sur5r.net Git - openldap/blob - configure
new pthreads detection
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.408.2.12 2002/09/06 01:46:19 kurt Exp  
4
5 # Copyright 1998-2002 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2002 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-proctitle      enable proctitle support [yes]"
36 ac_help="$ac_help
37   --enable-cache          enable caching (experimental) [no]"
38 ac_help="$ac_help
39   --enable-referrals      enable LDAPv2+ Referrals (experimental) [no]"
40 ac_help="$ac_help
41   --enable-ipv6           enable IPv6 support [auto]"
42 ac_help="$ac_help
43   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
44 ac_help="$ac_help
45   --enable-x-compile      enable cross compiling [no]"
46 ac_help="$ac_help
47   --with-cyrus-sasl       with Cyrus SASL support [auto]"
48 ac_help="$ac_help
49   --with-fetch            with freeBSD fetch URL support [auto]"
50 ac_help="$ac_help
51   --with-kerberos         with Kerberos support [auto]"
52 ac_help="$ac_help
53   --with-readline         with readline support [auto]"
54 ac_help="$ac_help
55   --with-threads          with threads [auto]"
56 ac_help="$ac_help
57   --with-tls              with TLS/SSL support [auto]"
58 ac_help="$ac_help
59   --with-yielding-select  with implicitly yielding select [auto]"
60 ac_help="$ac_help
61
62 SLAPD (Standalone LDAP Daemon) Options:"
63 ac_help="$ac_help
64   --enable-slapd          enable building slapd [yes]"
65 ac_help="$ac_help
66     --enable-aci          enable per-object ACIs (experimental) [no]"
67 ac_help="$ac_help
68     --enable-cleartext    enable cleartext passwords [yes]"
69 ac_help="$ac_help
70     --enable-crypt        enable crypt(3) passwords [no]"
71 ac_help="$ac_help
72     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
73 ac_help="$ac_help
74     --enable-kpasswd      enable Kerberos password verification [no]"
75 ac_help="$ac_help
76     --enable-lmpasswd     enable LAN Manager passwords [no]"
77 ac_help="$ac_help
78     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
79 ac_help="$ac_help
80     --enable-modules      enable dynamic module support [no]"
81 ac_help="$ac_help
82     --enable-phonetic     enable phonetic/soundex [no]"
83 ac_help="$ac_help
84     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
85 ac_help="$ac_help
86     --enable-rlookups     enable reverse lookups of client hostnames [no]"
87 ac_help="$ac_help
88     --enable-slp          enable SLPv2 support [no]"
89 ac_help="$ac_help
90     --enable-wrappers     enable tcp wrapper support [no]"
91 ac_help="$ac_help
92     --enable-bdb          enable Berkeley DB backend [yes]"
93 ac_help="$ac_help
94     --with-bdb-module     module type static|dynamic [static]"
95 ac_help="$ac_help
96     --enable-dnssrv       enable dnssrv backend [no]"
97 ac_help="$ac_help
98     --with-dnssrv-module  module type static|dynamic [static]"
99 ac_help="$ac_help
100     --enable-ldap         enable ldap backend [no]"
101 ac_help="$ac_help
102     --with-ldap-module    module type static|dynamic [static]"
103 ac_help="$ac_help
104     --enable-ldbm         enable ldbm backend [no]"
105 ac_help="$ac_help
106     --with-ldbm-api       with LDBM API auto|berkeley|bcompat|mdbm|gdbm [auto]"
107 ac_help="$ac_help
108     --with-ldbm-module    module type static|dynamic [static]"
109 ac_help="$ac_help
110     --with-ldbm-type      use LDBM type auto|btree|hash [auto]"
111 ac_help="$ac_help
112     --enable-meta         enable metadirectory backend [no]"
113 ac_help="$ac_help
114     --with-meta-module    module type static|dynamic [static]"
115 ac_help="$ac_help
116     --enable-monitor      enable monitor backend [no]"
117 ac_help="$ac_help
118     --with-monitor-module module type static|dynamic [static]"
119 ac_help="$ac_help
120     --enable-null         enable null backend [no]"
121 ac_help="$ac_help
122     --with-null-module    module type static|dynamic [static]"
123 ac_help="$ac_help
124     --enable-passwd       enable passwd backend [no]"
125 ac_help="$ac_help
126     --with-passwd-module  module type static|dynamic [static]"
127 ac_help="$ac_help
128     --enable-perl         enable perl backend [no]"
129 ac_help="$ac_help
130     --with-perl-module    module type static|dynamic [static]"
131 ac_help="$ac_help
132     --enable-shell        enable shell backend [no]"
133 ac_help="$ac_help
134     --with-shell-module   module type static|dynamic [static]"
135 ac_help="$ac_help
136     --enable-sql          enable sql backend [no]"
137 ac_help="$ac_help
138     --with-sql-module     module type static|dynamic [static]"
139 ac_help="$ac_help
140
141 SLURPD (Replication Daemon) Options:"
142 ac_help="$ac_help
143   --enable-slurpd         enable building slurpd [auto]"
144 ac_help="$ac_help
145
146 Library Generation & Linking Options"
147 ac_help="$ac_help
148   --enable-static[=PKGS]  build static libraries [default=yes]"
149 ac_help="$ac_help
150   --enable-shared[=PKGS]  build shared libraries [default=yes]"
151 ac_help="$ac_help
152   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
153 ac_help="$ac_help
154   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
155
156 # Find the correct PATH separator.  Usually this is `:', but
157 # DJGPP uses `;' like DOS.
158 if test "X${PATH_SEPARATOR+set}" != Xset; then
159   UNAME=${UNAME-`uname 2>/dev/null`}
160   case X$UNAME in
161     *-DOS) lt_cv_sys_path_separator=';' ;;
162     *)     lt_cv_sys_path_separator=':' ;;
163   esac
164   PATH_SEPARATOR=$lt_cv_sys_path_separator
165 fi
166
167
168 # Check that we are running under the correct shell.
169 SHELL=${CONFIG_SHELL-/bin/sh}
170
171 case X$ECHO in
172 X*--fallback-echo)
173   # Remove one level of quotation (which was required for Make).
174   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
175   ;;
176 esac
177
178 echo=${ECHO-echo}
179 if test "X$1" = X--no-reexec; then
180   # Discard the --no-reexec flag, and continue.
181   shift
182 elif test "X$1" = X--fallback-echo; then
183   # Avoid inline document here, it may be left over
184   :
185 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
186   # Yippee, $echo works!
187   :
188 else
189   # Restart under the correct shell.
190   exec $SHELL "$0" --no-reexec ${1+"$@"}
191 fi
192
193 if test "X$1" = X--fallback-echo; then
194   # used as fallback echo
195   shift
196   cat <<EOF
197
198 EOF
199   exit 0
200 fi
201
202 # The HP-UX ksh and POSIX shell print the target directory to stdout
203 # if CDPATH is set.
204 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
205
206 if test -z "$ECHO"; then
207 if test "X${echo_test_string+set}" != Xset; then
208 # find a string as large as possible, as long as the shell can cope with it
209   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
210     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
211     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
212        echo_test_string="`eval $cmd`" &&
213        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
214     then
215       break
216     fi
217   done
218 fi
219
220 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
221    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
222    test "X$echo_testing_string" = "X$echo_test_string"; then
223   :
224 else
225   # The Solaris, AIX, and Digital Unix default echo programs unquote
226   # backslashes.  This makes it impossible to quote backslashes using
227   #   echo "$something" | sed 's/\\/\\\\/g'
228   #
229   # So, first we look for a working echo in the user's PATH.
230
231   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
232   for dir in $PATH /usr/ucb; do
233     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
234        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
235        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
236        test "X$echo_testing_string" = "X$echo_test_string"; then
237       echo="$dir/echo"
238       break
239     fi
240   done
241   IFS="$save_ifs"
242
243   if test "X$echo" = Xecho; then
244     # We didn't find a better echo, so look for alternatives.
245     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
246        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
247        test "X$echo_testing_string" = "X$echo_test_string"; then
248       # This shell has a builtin print -r that does the trick.
249       echo='print -r'
250     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
251          test "X$CONFIG_SHELL" != X/bin/ksh; then
252       # If we have ksh, try running configure again with it.
253       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
254       export ORIGINAL_CONFIG_SHELL
255       CONFIG_SHELL=/bin/ksh
256       export CONFIG_SHELL
257       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
258     else
259       # Try using printf.
260       echo='printf %s\n'
261       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
262          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
263          test "X$echo_testing_string" = "X$echo_test_string"; then
264         # Cool, printf works
265         :
266       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
267            test "X$echo_testing_string" = 'X\t' &&
268            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
269            test "X$echo_testing_string" = "X$echo_test_string"; then
270         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
271         export CONFIG_SHELL
272         SHELL="$CONFIG_SHELL"
273         export SHELL
274         echo="$CONFIG_SHELL $0 --fallback-echo"
275       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
276            test "X$echo_testing_string" = 'X\t' &&
277            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
278            test "X$echo_testing_string" = "X$echo_test_string"; then
279         echo="$CONFIG_SHELL $0 --fallback-echo"
280       else
281         # maybe with a smaller string...
282         prev=:
283
284         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
285           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
286           then
287             break
288           fi
289           prev="$cmd"
290         done
291
292         if test "$prev" != 'sed 50q "$0"'; then
293           echo_test_string=`eval $prev`
294           export echo_test_string
295           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
296         else
297           # Oops.  We lost completely, so just stick with echo.
298           echo=echo
299         fi
300       fi
301     fi
302   fi
303 fi
304 fi
305
306 # Copy echo and quote the copy suitably for passing to libtool from
307 # the Makefile, instead of quoting the original, which is used later.
308 ECHO=$echo
309 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
310    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
311 fi
312
313
314 ac_help="$ac_help
315   --disable-libtool-lock  avoid locking (might break parallel builds)"
316 ac_help="$ac_help
317   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
318 ac_help="$ac_help
319
320 See INSTALL file for further details."
321
322 # Initialize some variables set by options.
323 # The variables have the same names as the options, with
324 # dashes changed to underlines.
325 build=NONE
326 cache_file=./config.cache
327 exec_prefix=NONE
328 host=NONE
329 no_create=
330 nonopt=NONE
331 no_recursion=
332 prefix=NONE
333 program_prefix=NONE
334 program_suffix=NONE
335 program_transform_name=s,x,x,
336 silent=
337 site=
338 srcdir=
339 target=NONE
340 verbose=
341 x_includes=NONE
342 x_libraries=NONE
343 bindir='${exec_prefix}/bin'
344 sbindir='${exec_prefix}/sbin'
345 libexecdir='${exec_prefix}/libexec'
346 datadir='${prefix}/share'
347 sysconfdir='${prefix}/etc'
348 sharedstatedir='${prefix}/com'
349 localstatedir='${prefix}/var'
350 libdir='${exec_prefix}/lib'
351 includedir='${prefix}/include'
352 oldincludedir='/usr/include'
353 infodir='${prefix}/info'
354 mandir='${prefix}/man'
355
356 # Initialize some other variables.
357 subdirs=
358 MFLAGS= MAKEFLAGS=
359 SHELL=${CONFIG_SHELL-/bin/sh}
360 # Maximum number of lines to put in a shell here document.
361 ac_max_here_lines=12
362
363 ac_prev=
364 for ac_option
365 do
366
367   # If the previous option needs an argument, assign it.
368   if test -n "$ac_prev"; then
369     eval "$ac_prev=\$ac_option"
370     ac_prev=
371     continue
372   fi
373
374   case "$ac_option" in
375   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
376   *) ac_optarg= ;;
377   esac
378
379   # Accept the important Cygnus configure options, so we can diagnose typos.
380
381   case "$ac_option" in
382
383   -bindir | --bindir | --bindi | --bind | --bin | --bi)
384     ac_prev=bindir ;;
385   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
386     bindir="$ac_optarg" ;;
387
388   -build | --build | --buil | --bui | --bu)
389     ac_prev=build ;;
390   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
391     build="$ac_optarg" ;;
392
393   -cache-file | --cache-file | --cache-fil | --cache-fi \
394   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
395     ac_prev=cache_file ;;
396   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
397   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
398     cache_file="$ac_optarg" ;;
399
400   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
401     ac_prev=datadir ;;
402   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
403   | --da=*)
404     datadir="$ac_optarg" ;;
405
406   -disable-* | --disable-*)
407     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
408     # Reject names that are not valid shell variable names.
409     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
410       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
411     fi
412     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
413     eval "enable_${ac_feature}=no" ;;
414
415   -enable-* | --enable-*)
416     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
417     # Reject names that are not valid shell variable names.
418     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
419       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
420     fi
421     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
422     case "$ac_option" in
423       *=*) ;;
424       *) ac_optarg=yes ;;
425     esac
426     eval "enable_${ac_feature}='$ac_optarg'" ;;
427
428   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
429   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
430   | --exec | --exe | --ex)
431     ac_prev=exec_prefix ;;
432   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
433   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
434   | --exec=* | --exe=* | --ex=*)
435     exec_prefix="$ac_optarg" ;;
436
437   -gas | --gas | --ga | --g)
438     # Obsolete; use --with-gas.
439     with_gas=yes ;;
440
441   -help | --help | --hel | --he)
442     # Omit some internal or obsolete options to make the list less imposing.
443     # This message is too long to be a string in the A/UX 3.1 sh.
444     cat << EOF
445 Usage: configure [options] [host]
446 Options: [defaults in brackets after descriptions]
447 Configuration:
448   --cache-file=FILE       cache test results in FILE
449   --help                  print this message
450   --no-create             do not create output files
451   --quiet, --silent       do not print \`checking...' messages
452   --version               print the version of autoconf that created configure
453 Directory and file names:
454   --prefix=PREFIX         install architecture-independent files in PREFIX
455                           [$ac_default_prefix]
456   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
457                           [same as prefix]
458   --bindir=DIR            user executables in DIR [EPREFIX/bin]
459   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
460   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
461   --datadir=DIR           read-only architecture-independent data in DIR
462                           [PREFIX/share]
463   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
464   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
465                           [PREFIX/com]
466   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
467   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
468   --includedir=DIR        C header files in DIR [PREFIX/include]
469   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
470   --infodir=DIR           info documentation in DIR [PREFIX/info]
471   --mandir=DIR            man documentation in DIR [PREFIX/man]
472   --srcdir=DIR            find the sources in DIR [configure dir or ..]
473   --program-prefix=PREFIX prepend PREFIX to installed program names
474   --program-suffix=SUFFIX append SUFFIX to installed program names
475   --program-transform-name=PROGRAM
476                           run sed PROGRAM on installed program names
477 EOF
478     cat << EOF
479 Host type:
480   --build=BUILD           configure for building on BUILD [BUILD=HOST]
481   --host=HOST             configure for HOST [guessed]
482   --target=TARGET         configure for TARGET [TARGET=HOST]
483 Features and packages:
484   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
485   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
486   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
487   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
488   --x-includes=DIR        X include files are in DIR
489   --x-libraries=DIR       X library files are in DIR
490 EOF
491     if test -n "$ac_help"; then
492       echo "--enable and --with options recognized:$ac_help"
493     fi
494     exit 0 ;;
495
496   -host | --host | --hos | --ho)
497     ac_prev=host ;;
498   -host=* | --host=* | --hos=* | --ho=*)
499     host="$ac_optarg" ;;
500
501   -includedir | --includedir | --includedi | --included | --include \
502   | --includ | --inclu | --incl | --inc)
503     ac_prev=includedir ;;
504   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
505   | --includ=* | --inclu=* | --incl=* | --inc=*)
506     includedir="$ac_optarg" ;;
507
508   -infodir | --infodir | --infodi | --infod | --info | --inf)
509     ac_prev=infodir ;;
510   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
511     infodir="$ac_optarg" ;;
512
513   -libdir | --libdir | --libdi | --libd)
514     ac_prev=libdir ;;
515   -libdir=* | --libdir=* | --libdi=* | --libd=*)
516     libdir="$ac_optarg" ;;
517
518   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
519   | --libexe | --libex | --libe)
520     ac_prev=libexecdir ;;
521   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
522   | --libexe=* | --libex=* | --libe=*)
523     libexecdir="$ac_optarg" ;;
524
525   -localstatedir | --localstatedir | --localstatedi | --localstated \
526   | --localstate | --localstat | --localsta | --localst \
527   | --locals | --local | --loca | --loc | --lo)
528     ac_prev=localstatedir ;;
529   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
530   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
531   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
532     localstatedir="$ac_optarg" ;;
533
534   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
535     ac_prev=mandir ;;
536   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
537     mandir="$ac_optarg" ;;
538
539   -nfp | --nfp | --nf)
540     # Obsolete; use --without-fp.
541     with_fp=no ;;
542
543   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
544   | --no-cr | --no-c)
545     no_create=yes ;;
546
547   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
548   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
549     no_recursion=yes ;;
550
551   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
552   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
553   | --oldin | --oldi | --old | --ol | --o)
554     ac_prev=oldincludedir ;;
555   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
556   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
557   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
558     oldincludedir="$ac_optarg" ;;
559
560   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
561     ac_prev=prefix ;;
562   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
563     prefix="$ac_optarg" ;;
564
565   -program-prefix | --program-prefix | --program-prefi | --program-pref \
566   | --program-pre | --program-pr | --program-p)
567     ac_prev=program_prefix ;;
568   -program-prefix=* | --program-prefix=* | --program-prefi=* \
569   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
570     program_prefix="$ac_optarg" ;;
571
572   -program-suffix | --program-suffix | --program-suffi | --program-suff \
573   | --program-suf | --program-su | --program-s)
574     ac_prev=program_suffix ;;
575   -program-suffix=* | --program-suffix=* | --program-suffi=* \
576   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
577     program_suffix="$ac_optarg" ;;
578
579   -program-transform-name | --program-transform-name \
580   | --program-transform-nam | --program-transform-na \
581   | --program-transform-n | --program-transform- \
582   | --program-transform | --program-transfor \
583   | --program-transfo | --program-transf \
584   | --program-trans | --program-tran \
585   | --progr-tra | --program-tr | --program-t)
586     ac_prev=program_transform_name ;;
587   -program-transform-name=* | --program-transform-name=* \
588   | --program-transform-nam=* | --program-transform-na=* \
589   | --program-transform-n=* | --program-transform-=* \
590   | --program-transform=* | --program-transfor=* \
591   | --program-transfo=* | --program-transf=* \
592   | --program-trans=* | --program-tran=* \
593   | --progr-tra=* | --program-tr=* | --program-t=*)
594     program_transform_name="$ac_optarg" ;;
595
596   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
597   | -silent | --silent | --silen | --sile | --sil)
598     silent=yes ;;
599
600   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
601     ac_prev=sbindir ;;
602   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
603   | --sbi=* | --sb=*)
604     sbindir="$ac_optarg" ;;
605
606   -sharedstatedir | --sharedstatedir | --sharedstatedi \
607   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
608   | --sharedst | --shareds | --shared | --share | --shar \
609   | --sha | --sh)
610     ac_prev=sharedstatedir ;;
611   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
612   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
613   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
614   | --sha=* | --sh=*)
615     sharedstatedir="$ac_optarg" ;;
616
617   -site | --site | --sit)
618     ac_prev=site ;;
619   -site=* | --site=* | --sit=*)
620     site="$ac_optarg" ;;
621
622   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
623     ac_prev=srcdir ;;
624   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
625     srcdir="$ac_optarg" ;;
626
627   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
628   | --syscon | --sysco | --sysc | --sys | --sy)
629     ac_prev=sysconfdir ;;
630   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
631   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
632     sysconfdir="$ac_optarg" ;;
633
634   -target | --target | --targe | --targ | --tar | --ta | --t)
635     ac_prev=target ;;
636   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
637     target="$ac_optarg" ;;
638
639   -v | -verbose | --verbose | --verbos | --verbo | --verb)
640     verbose=yes ;;
641
642   -version | --version | --versio | --versi | --vers)
643     echo "configure generated by autoconf version 2.13.1"
644     exit 0 ;;
645
646   -with-* | --with-*)
647     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
648     # Reject names that are not valid shell variable names.
649     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
650       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
651     fi
652     ac_package=`echo $ac_package| sed 's/-/_/g'`
653     case "$ac_option" in
654       *=*) ;;
655       *) ac_optarg=yes ;;
656     esac
657     eval "with_${ac_package}='$ac_optarg'" ;;
658
659   -without-* | --without-*)
660     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
661     # Reject names that are not valid shell variable names.
662     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
663       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
664     fi
665     ac_package=`echo $ac_package| sed 's/-/_/g'`
666     eval "with_${ac_package}=no" ;;
667
668   --x)
669     # Obsolete; use --with-x.
670     with_x=yes ;;
671
672   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
673   | --x-incl | --x-inc | --x-in | --x-i)
674     ac_prev=x_includes ;;
675   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
676   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
677     x_includes="$ac_optarg" ;;
678
679   -x-libraries | --x-libraries | --x-librarie | --x-librari \
680   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
681     ac_prev=x_libraries ;;
682   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
683   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
684     x_libraries="$ac_optarg" ;;
685
686   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
687     ;;
688
689   *)
690     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
691       echo "configure: warning: $ac_option: invalid host type" 1>&2
692     fi
693     if test "x$nonopt" != xNONE; then
694       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
695     fi
696     nonopt="$ac_option"
697     ;;
698
699   esac
700 done
701
702 if test -n "$ac_prev"; then
703   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
704 fi
705
706 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
707
708 # File descriptor usage:
709 # 0 standard input
710 # 1 file creation
711 # 2 errors and warnings
712 # 3 some systems may open it to /dev/tty
713 # 4 used on the Kubota Titan
714 # 6 checking for... messages and results
715 # 5 compiler messages saved in config.log
716 if test "$silent" = yes; then
717   exec 6>/dev/null
718 else
719   exec 6>&1
720 fi
721 exec 5>./config.log
722
723 echo "\
724 This file contains any messages produced by compilers while
725 running configure, to aid debugging if configure makes a mistake.
726 " 1>&5
727
728 # Strip out --no-create and --no-recursion so they do not pile up.
729 # Also quote any args containing shell metacharacters.
730 ac_configure_args=
731 for ac_arg
732 do
733   case "$ac_arg" in
734   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
735   | --no-cr | --no-c) ;;
736   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
737   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
738   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
739   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
740   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
741   esac
742 done
743
744 # NLS nuisances.
745 # Only set these to C if already set.  These must not be set unconditionally
746 # because not all systems understand e.g. LANG=C (notably SCO).
747 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
748 # Non-C LC_CTYPE values break the ctype check.
749 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
750 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
751 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
752 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
753
754 # confdefs.h avoids OS command line length limits that DEFS can exceed.
755 rm -rf conftest* confdefs.h
756 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
757 echo > confdefs.h
758
759 # A filename unique to this package, relative to the directory that
760 # configure is in, which we can look for to find out if srcdir is correct.
761 ac_unique_file=build/version.sh
762
763 # Find the source files, if location was not specified.
764 if test -z "$srcdir"; then
765   ac_srcdir_defaulted=yes
766   # Try the directory containing this script, then its parent.
767   ac_prog=$0
768   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
769   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
770   srcdir=$ac_confdir
771   if test ! -r $srcdir/$ac_unique_file; then
772     srcdir=..
773   fi
774 else
775   ac_srcdir_defaulted=no
776 fi
777 if test ! -r $srcdir/$ac_unique_file; then
778   if test "$ac_srcdir_defaulted" = yes; then
779     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
780   else
781     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
782   fi
783 fi
784 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
785
786 # Prefer explicitly selected file to automatically selected ones.
787 if test -z "$CONFIG_SITE"; then
788   if test "x$prefix" != xNONE; then
789     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
790   else
791     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
792   fi
793 fi
794 for ac_site_file in $CONFIG_SITE; do
795   if test -r "$ac_site_file"; then
796     echo "loading site script $ac_site_file"
797     . "$ac_site_file"
798   fi
799 done
800
801
802 ac_ext=c
803 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
804 ac_cpp='$CPP $CPPFLAGS'
805 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
806 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
807 cross_compiling=$ac_cv_prog_cc_cross
808
809 ac_exeext=
810 ac_objext=o
811 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
812   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
813   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
814     ac_n= ac_c='
815 ' ac_t='        '
816   else
817     ac_n=-n ac_c= ac_t=
818   fi
819 else
820   ac_n= ac_c='\c' ac_t=
821 fi
822
823
824 # set unset (borrowed from autoconf 2.49c)
825 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
826   ol_unset=unset
827 else
828   ol_unset=false
829 fi
830 # unset CDPATH
831 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
832
833 ac_aux_dir=
834 for ac_dir in build $srcdir/build; do
835   if test -f $ac_dir/install-sh; then
836     ac_aux_dir=$ac_dir
837     ac_install_sh="$ac_aux_dir/install-sh -c"
838     break
839   elif test -f $ac_dir/install.sh; then
840     ac_aux_dir=$ac_dir
841     ac_install_sh="$ac_aux_dir/install.sh -c"
842     break
843   elif test -f $ac_dir/shtool; then
844     ac_aux_dir=$ac_dir
845     ac_install_sh="$ac_aux_dir/shtool install -c"
846     break
847   fi
848 done
849 if test -z "$ac_aux_dir"; then
850   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
851 fi
852 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
853 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
854 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
855
856 eval `$ac_aux_dir/version.sh`
857 if test -z "$OL_STRING"; then
858         { echo "configure: error: could not determine version" 1>&2; exit 1; }
859 fi
860
861 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
862         ac_cv_shtool="$ac_aux_dir/shtool"
863 else
864         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
865 fi
866
867 SHTOOL="$ac_cv_shtool"
868
869 TB=`$SHTOOL echo -e %B`
870 TN=`$SHTOOL echo -e %b`
871
872 echo "Configuring $TB$OL_STRING$TN ..."
873
874
875 echo $ac_n "checking host system type""... $ac_c" 1>&6
876 echo "configure:877: checking host system type" >&5
877 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
878
879 # Make sure we can run config.sub.
880   if $ac_config_sub sun4 >/dev/null 2>&1; then :
881     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
882   fi
883
884   ac_cv_host_alias=$host
885   case "$ac_cv_host_alias" in
886   NONE)
887     case $nonopt in
888     NONE)
889       if ac_cv_host_alias=`$ac_config_guess`; then :
890       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
891       fi ;;
892     *) ac_cv_host_alias=$nonopt ;;
893     esac ;;
894   esac
895
896   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
897   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
898   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
899   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
900 else
901   echo $ac_n "(cached) $ac_c" 1>&6
902 fi
903
904 echo "$ac_t""$ac_cv_host" 1>&6
905
906 host=$ac_cv_host
907 host_alias=$ac_cv_host_alias
908 host_cpu=$ac_cv_host_cpu
909 host_vendor=$ac_cv_host_vendor
910 host_os=$ac_cv_host_os
911
912
913
914
915
916 echo $ac_n "checking target system type""... $ac_c" 1>&6
917 echo "configure:918: checking target system type" >&5
918 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
919
920 # Make sure we can run config.sub.
921   if $ac_config_sub sun4 >/dev/null 2>&1; then :
922     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
923   fi
924
925   ac_cv_target_alias=$target
926   case "$ac_cv_target_alias" in
927   NONE)
928     case $nonopt in
929     NONE)
930       ac_cv_target_alias=$host_alias ;;
931
932     *) ac_cv_target_alias=$nonopt ;;
933     esac ;;
934   esac
935
936   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
937   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
938   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
939   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
940 else
941   echo $ac_n "(cached) $ac_c" 1>&6
942 fi
943
944 echo "$ac_t""$ac_cv_target" 1>&6
945
946 target=$ac_cv_target
947 target_alias=$ac_cv_target_alias
948 target_cpu=$ac_cv_target_cpu
949 target_vendor=$ac_cv_target_vendor
950 target_os=$ac_cv_target_os
951
952
953
954
955
956 echo $ac_n "checking build system type""... $ac_c" 1>&6
957 echo "configure:958: checking build system type" >&5
958 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
959
960 # Make sure we can run config.sub.
961   if $ac_config_sub sun4 >/dev/null 2>&1; then :
962     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
963   fi
964
965   ac_cv_build_alias=$build
966   case "$ac_cv_build_alias" in
967   NONE)
968     case $nonopt in
969     NONE)
970       ac_cv_build_alias=$host_alias ;;
971
972     *) ac_cv_build_alias=$nonopt ;;
973     esac ;;
974   esac
975
976   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
977   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
978   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
979   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
980 else
981   echo $ac_n "(cached) $ac_c" 1>&6
982 fi
983
984 echo "$ac_t""$ac_cv_build" 1>&6
985
986 build=$ac_cv_build
987 build_alias=$ac_cv_build_alias
988 build_cpu=$ac_cv_build_cpu
989 build_vendor=$ac_cv_build_vendor
990 build_os=$ac_cv_build_os
991
992
993
994
995
996 # Do some error checking and defaulting for the host and target type.
997 # The inputs are:
998 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
999 #
1000 # The rules are:
1001 # 1. You are not allowed to specify --host, --target, and nonopt at the
1002 #    same time.
1003 # 2. Host defaults to nonopt.
1004 # 3. If nonopt is not specified, then host defaults to the current host,
1005 #    as determined by config.guess.
1006 # 4. Target and build default to nonopt.
1007 # 5. If nonopt is not specified, then target and build default to host.
1008
1009 # The aliases save the names the user supplied, while $host etc.
1010 # will get canonicalized.
1011 case $host---$target---$nonopt in
1012 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1013 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1014 esac
1015
1016 test "$host_alias" != "$target_alias" &&
1017   test "$program_prefix$program_suffix$program_transform_name" = \
1018     NONENONEs,x,x, &&
1019   program_prefix=${target_alias}-
1020
1021
1022 # Find a good install program.  We prefer a C program (faster),
1023 # so one script is as good as another.  But avoid the broken or
1024 # incompatible versions:
1025 # SysV /etc/install, /usr/sbin/install
1026 # SunOS /usr/etc/install
1027 # IRIX /sbin/install
1028 # AIX /bin/install
1029 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1030 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1031 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1032 # ./install, which can be erroneously created by make from ./install.sh.
1033 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1034 echo "configure:1035: checking for a BSD compatible install" >&5
1035 if test -z "$INSTALL"; then
1036 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1037   echo $ac_n "(cached) $ac_c" 1>&6
1038 else
1039     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1040   for ac_dir in $PATH; do
1041     # Account for people who put trailing slashes in PATH elements.
1042     case "$ac_dir/" in
1043     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1044     *)
1045       # OSF1 and SCO ODT 3.0 have their own names for install.
1046       # Don't use installbsd from OSF since it installs stuff as root
1047       # by default.
1048       for ac_prog in ginstall scoinst install; do
1049         if test -f $ac_dir/$ac_prog; then
1050           if test $ac_prog = install &&
1051             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1052             # AIX install.  It has an incompatible calling convention.
1053             :
1054           elif test $ac_prog = install &&
1055             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1056             # program-specific install script used by HP pwplus--don't use.
1057             :
1058           else
1059             ac_cv_path_install="$ac_dir/$ac_prog -c"
1060             break 2
1061           fi
1062         fi
1063       done
1064       ;;
1065     esac
1066   done
1067   IFS="$ac_save_IFS"
1068
1069 fi
1070   if test "${ac_cv_path_install+set}" = set; then
1071     INSTALL="$ac_cv_path_install"
1072   else
1073     # As a last resort, use the slow shell script.  We don't cache a
1074     # path for INSTALL within a source directory, because that will
1075     # break other packages using the cache if that directory is
1076     # removed, or if the path is relative.
1077     INSTALL="$ac_install_sh"
1078   fi
1079 fi
1080 echo "$ac_t""$INSTALL" 1>&6
1081
1082 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1083 # It thinks the first close brace ends the variable substitution.
1084 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1085
1086 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1087
1088 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1089
1090 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1091 echo "configure:1092: checking whether build environment is sane" >&5
1092 # Just in case
1093 sleep 1
1094 echo timestamp > conftestfile
1095 # Do `set' in a subshell so we don't clobber the current shell's
1096 # arguments.  Must try -L first in case configure is actually a
1097 # symlink; some systems play weird games with the mod time of symlinks
1098 # (eg FreeBSD returns the mod time of the symlink's containing
1099 # directory).
1100 if (
1101    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1102    if test "$*" = "X"; then
1103       # -L didn't work.
1104       set X `ls -t $srcdir/configure conftestfile`
1105    fi
1106    if test "$*" != "X $srcdir/configure conftestfile" \
1107       && test "$*" != "X conftestfile $srcdir/configure"; then
1108
1109       # If neither matched, then we have a broken ls.  This can happen
1110       # if, for instance, CONFIG_SHELL is bash and it inherits a
1111       # broken ls alias from the environment.  This has actually
1112       # happened.  Such a system could not be considered "sane".
1113       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1114 alias in your environment" 1>&2; exit 1; }
1115    fi
1116
1117    test "$2" = conftestfile
1118    )
1119 then
1120    # Ok.
1121    :
1122 else
1123    { echo "configure: error: newly created file is older than distributed files!
1124 Check your system clock" 1>&2; exit 1; }
1125 fi
1126 rm -f conftest*
1127 echo "$ac_t""yes" 1>&6
1128 if test "$program_transform_name" = s,x,x,; then
1129   program_transform_name=
1130 else
1131   # Double any \ or $.  echo might interpret backslashes.
1132   cat <<\EOF_SED > conftestsed
1133 s,\\,\\\\,g; s,\$,$$,g
1134 EOF_SED
1135   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1136   rm -f conftestsed
1137 fi
1138 test "$program_prefix" != NONE &&
1139   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1140 # Use a double $ so make ignores it.
1141 test "$program_suffix" != NONE &&
1142   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1143
1144 # sed with no file args requires a program.
1145 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1146
1147 for ac_prog in mawk gawk nawk awk
1148 do
1149 # Extract the first word of "$ac_prog", so it can be a program name with args.
1150 set dummy $ac_prog; ac_word=$2
1151 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1152 echo "configure:1153: checking for $ac_word" >&5
1153 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1154   echo $ac_n "(cached) $ac_c" 1>&6
1155 else
1156   if test -n "$AWK"; then
1157   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1158 else
1159   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1160   ac_dummy="$PATH"
1161   for ac_dir in $ac_dummy; do
1162     test -z "$ac_dir" && ac_dir=.
1163     if test -f $ac_dir/$ac_word; then
1164       ac_cv_prog_AWK="$ac_prog"
1165       break
1166     fi
1167   done
1168   IFS="$ac_save_ifs"
1169 fi
1170 fi
1171 AWK="$ac_cv_prog_AWK"
1172 if test -n "$AWK"; then
1173   echo "$ac_t""$AWK" 1>&6
1174 else
1175   echo "$ac_t""no" 1>&6
1176 fi
1177
1178 test -n "$AWK" && break
1179 done
1180
1181 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1182 echo "configure:1183: checking whether ${MAKE-make} sets \${MAKE}" >&5
1183 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1184 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1185   echo $ac_n "(cached) $ac_c" 1>&6
1186 else
1187   cat > conftestmake <<\EOF
1188 all:
1189         @echo 'ac_maketemp="${MAKE}"'
1190 EOF
1191 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1192 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1193 if test -n "$ac_maketemp"; then
1194   eval ac_cv_prog_make_${ac_make}_set=yes
1195 else
1196   eval ac_cv_prog_make_${ac_make}_set=no
1197 fi
1198 rm -f conftestmake
1199 fi
1200 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1201   echo "$ac_t""yes" 1>&6
1202   SET_MAKE=
1203 else
1204   echo "$ac_t""no" 1>&6
1205   SET_MAKE="MAKE=${MAKE-make}"
1206 fi
1207
1208
1209
1210 PACKAGE=$OL_PACKAGE
1211
1212 VERSION=$OL_VERSION
1213
1214 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1215   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1216 fi
1217
1218
1219
1220 missing_dir=`cd $ac_aux_dir && pwd`
1221 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1222 echo "configure:1223: checking for working aclocal" >&5
1223 # Run test in a subshell; some versions of sh will print an error if
1224 # an executable is not found, even if stderr is redirected.
1225 # Redirect stdin to placate older versions of autoconf.  Sigh.
1226 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1227    ACLOCAL=aclocal
1228    echo "$ac_t""found" 1>&6
1229 else
1230    ACLOCAL="$missing_dir/missing aclocal"
1231    echo "$ac_t""missing" 1>&6
1232 fi
1233
1234 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1235 echo "configure:1236: checking for working autoconf" >&5
1236 # Run test in a subshell; some versions of sh will print an error if
1237 # an executable is not found, even if stderr is redirected.
1238 # Redirect stdin to placate older versions of autoconf.  Sigh.
1239 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1240    AUTOCONF=autoconf
1241    echo "$ac_t""found" 1>&6
1242 else
1243    AUTOCONF="$missing_dir/missing autoconf"
1244    echo "$ac_t""missing" 1>&6
1245 fi
1246
1247 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1248 echo "configure:1249: checking for working automake" >&5
1249 # Run test in a subshell; some versions of sh will print an error if
1250 # an executable is not found, even if stderr is redirected.
1251 # Redirect stdin to placate older versions of autoconf.  Sigh.
1252 if (automake --version) < /dev/null > /dev/null 2>&1; then
1253    AUTOMAKE=automake
1254    echo "$ac_t""found" 1>&6
1255 else
1256    AUTOMAKE="$missing_dir/missing automake"
1257    echo "$ac_t""missing" 1>&6
1258 fi
1259
1260 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1261 echo "configure:1262: checking for working autoheader" >&5
1262 # Run test in a subshell; some versions of sh will print an error if
1263 # an executable is not found, even if stderr is redirected.
1264 # Redirect stdin to placate older versions of autoconf.  Sigh.
1265 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1266    AUTOHEADER=autoheader
1267    echo "$ac_t""found" 1>&6
1268 else
1269    AUTOHEADER="$missing_dir/missing autoheader"
1270    echo "$ac_t""missing" 1>&6
1271 fi
1272
1273 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1274 echo "configure:1275: checking for working makeinfo" >&5
1275 # Run test in a subshell; some versions of sh will print an error if
1276 # an executable is not found, even if stderr is redirected.
1277 # Redirect stdin to placate older versions of autoconf.  Sigh.
1278 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1279    MAKEINFO=makeinfo
1280    echo "$ac_t""found" 1>&6
1281 else
1282    MAKEINFO="$missing_dir/missing makeinfo"
1283    echo "$ac_t""missing" 1>&6
1284 fi
1285
1286 install_sh="$missing_dir/install-sh"
1287 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1288
1289 for ac_prog in gnutar gtar tar
1290 do
1291 # Extract the first word of "$ac_prog", so it can be a program name with args.
1292 set dummy $ac_prog; ac_word=$2
1293 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1294 echo "configure:1295: checking for $ac_word" >&5
1295 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1296   echo $ac_n "(cached) $ac_c" 1>&6
1297 else
1298   if test -n "$AMTAR"; then
1299   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1300 else
1301   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1302   ac_dummy="$PATH"
1303   for ac_dir in $ac_dummy; do
1304     test -z "$ac_dir" && ac_dir=.
1305     if test -f $ac_dir/$ac_word; then
1306       ac_cv_prog_AMTAR="$ac_prog"
1307       break
1308     fi
1309   done
1310   IFS="$ac_save_ifs"
1311 fi
1312 fi
1313 AMTAR="$ac_cv_prog_AMTAR"
1314 if test -n "$AMTAR"; then
1315   echo "$ac_t""$AMTAR" 1>&6
1316 else
1317   echo "$ac_t""no" 1>&6
1318 fi
1319
1320 test -n "$AMTAR" && break
1321 done
1322
1323
1324 AMTARFLAGS=
1325 if test -n "$AMTAR"; then
1326   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1327         AMTARFLAGS=o
1328   fi
1329 fi
1330
1331 cat >> confdefs.h <<EOF
1332 #define OPENLDAP_PACKAGE "$PACKAGE"
1333 EOF
1334
1335 cat >> confdefs.h <<EOF
1336 #define OPENLDAP_VERSION "$VERSION"
1337 EOF
1338
1339
1340 cat >> confdefs.h <<EOF
1341 #define LDAP_VENDOR_VERSION $OL_API_INC
1342 EOF
1343
1344 cat >> confdefs.h <<EOF
1345 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1346 EOF
1347
1348 cat >> confdefs.h <<EOF
1349 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1350 EOF
1351
1352 cat >> confdefs.h <<EOF
1353 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1354 EOF
1355
1356
1357 OPENLDAP_LIBVERSION=$OL_API_LIB
1358
1359 OPENLDAP_RELEASE_DATE="$OL_RELEASE_DATE"
1360
1361
1362
1363 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1364 echo "configure:1365: checking configure arguments" >&5
1365
1366
1367 top_builddir=`pwd`
1368
1369 ldap_subdir="/openldap"
1370
1371 # Check whether --with-subdir or --without-subdir was given.
1372 if test "${with_subdir+set}" = set; then
1373   withval="$with_subdir"
1374   case "$withval" in
1375         no) ldap_subdir=""
1376                 ;;
1377         yes)
1378                 ;;
1379         /*|\\*)
1380                 ldap_subdir="$withval"
1381                 ;;
1382         *)
1383                 ldap_subdir="/$withval"
1384                 ;;
1385 esac
1386
1387 fi
1388
1389
1390 # OpenLDAP --enable-debug
1391         # Check whether --enable-debug or --disable-debug was given.
1392 if test "${enable_debug+set}" = set; then
1393   enableval="$enable_debug"
1394   
1395         ol_arg=invalid
1396         for ol_val in auto yes no ; do
1397                 if test "$enableval" = "$ol_val" ; then
1398                         ol_arg="$ol_val"
1399                 fi
1400         done
1401         if test "$ol_arg" = "invalid" ; then
1402                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1403         fi
1404         ol_enable_debug="$ol_arg"
1405
1406 else
1407         ol_enable_debug="yes"
1408 fi
1409 # end --enable-debug
1410 # OpenLDAP --enable-syslog
1411         # Check whether --enable-syslog or --disable-syslog was given.
1412 if test "${enable_syslog+set}" = set; then
1413   enableval="$enable_syslog"
1414   
1415         ol_arg=invalid
1416         for ol_val in auto yes no ; do
1417                 if test "$enableval" = "$ol_val" ; then
1418                         ol_arg="$ol_val"
1419                 fi
1420         done
1421         if test "$ol_arg" = "invalid" ; then
1422                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1423         fi
1424         ol_enable_syslog="$ol_arg"
1425
1426 else
1427         ol_enable_syslog="auto"
1428 fi
1429 # end --enable-syslog
1430 # OpenLDAP --enable-proctitle
1431         # Check whether --enable-proctitle or --disable-proctitle was given.
1432 if test "${enable_proctitle+set}" = set; then
1433   enableval="$enable_proctitle"
1434   
1435         ol_arg=invalid
1436         for ol_val in auto yes no ; do
1437                 if test "$enableval" = "$ol_val" ; then
1438                         ol_arg="$ol_val"
1439                 fi
1440         done
1441         if test "$ol_arg" = "invalid" ; then
1442                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1443         fi
1444         ol_enable_proctitle="$ol_arg"
1445
1446 else
1447         ol_enable_proctitle="yes"
1448 fi
1449 # end --enable-proctitle
1450 # OpenLDAP --enable-cache
1451         # Check whether --enable-cache or --disable-cache was given.
1452 if test "${enable_cache+set}" = set; then
1453   enableval="$enable_cache"
1454   
1455         ol_arg=invalid
1456         for ol_val in auto yes no ; do
1457                 if test "$enableval" = "$ol_val" ; then
1458                         ol_arg="$ol_val"
1459                 fi
1460         done
1461         if test "$ol_arg" = "invalid" ; then
1462                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1463         fi
1464         ol_enable_cache="$ol_arg"
1465
1466 else
1467         ol_enable_cache="no"
1468 fi
1469 # end --enable-cache
1470 # OpenLDAP --enable-referrals
1471         # Check whether --enable-referrals or --disable-referrals was given.
1472 if test "${enable_referrals+set}" = set; then
1473   enableval="$enable_referrals"
1474   
1475         ol_arg=invalid
1476         for ol_val in auto yes no ; do
1477                 if test "$enableval" = "$ol_val" ; then
1478                         ol_arg="$ol_val"
1479                 fi
1480         done
1481         if test "$ol_arg" = "invalid" ; then
1482                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1483         fi
1484         ol_enable_referrals="$ol_arg"
1485
1486 else
1487         ol_enable_referrals="no"
1488 fi
1489 # end --enable-referrals
1490 ol_enable_kbind=${ol_enable_kbind-no}
1491 # OpenLDAP --enable-ipv6
1492         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1493 if test "${enable_ipv6+set}" = set; then
1494   enableval="$enable_ipv6"
1495   
1496         ol_arg=invalid
1497         for ol_val in auto yes no ; do
1498                 if test "$enableval" = "$ol_val" ; then
1499                         ol_arg="$ol_val"
1500                 fi
1501         done
1502         if test "$ol_arg" = "invalid" ; then
1503                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1504         fi
1505         ol_enable_ipv6="$ol_arg"
1506
1507 else
1508         ol_enable_ipv6="auto"
1509 fi
1510 # end --enable-ipv6
1511 # OpenLDAP --enable-local
1512         # Check whether --enable-local or --disable-local was given.
1513 if test "${enable_local+set}" = set; then
1514   enableval="$enable_local"
1515   
1516         ol_arg=invalid
1517         for ol_val in auto yes no ; do
1518                 if test "$enableval" = "$ol_val" ; then
1519                         ol_arg="$ol_val"
1520                 fi
1521         done
1522         if test "$ol_arg" = "invalid" ; then
1523                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1524         fi
1525         ol_enable_local="$ol_arg"
1526
1527 else
1528         ol_enable_local="auto"
1529 fi
1530 # end --enable-local
1531 # OpenLDAP --enable-x_compile
1532         # Check whether --enable-x_compile or --disable-x_compile was given.
1533 if test "${enable_x_compile+set}" = set; then
1534   enableval="$enable_x_compile"
1535   
1536         ol_arg=invalid
1537         for ol_val in yes no ; do
1538                 if test "$enableval" = "$ol_val" ; then
1539                         ol_arg="$ol_val"
1540                 fi
1541         done
1542         if test "$ol_arg" = "invalid" ; then
1543                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1544         fi
1545         ol_enable_x_compile="$ol_arg"
1546
1547 else
1548         ol_enable_x_compile="no"
1549 fi
1550 # end --enable-x_compile
1551
1552
1553 # OpenLDAP --with-cyrus_sasl
1554         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1555 if test "${with_cyrus_sasl+set}" = set; then
1556   withval="$with_cyrus_sasl"
1557   
1558         ol_arg=invalid
1559         for ol_val in auto yes no  ; do
1560                 if test "$withval" = "$ol_val" ; then
1561                         ol_arg="$ol_val"
1562                 fi
1563         done
1564         if test "$ol_arg" = "invalid" ; then
1565                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1566         fi
1567         ol_with_cyrus_sasl="$ol_arg"
1568
1569 else
1570         ol_with_cyrus_sasl="auto"
1571 fi
1572 # end --with-cyrus_sasl
1573
1574 # OpenLDAP --with-fetch
1575         # Check whether --with-fetch or --without-fetch was given.
1576 if test "${with_fetch+set}" = set; then
1577   withval="$with_fetch"
1578   
1579         ol_arg=invalid
1580         for ol_val in auto yes no  ; do
1581                 if test "$withval" = "$ol_val" ; then
1582                         ol_arg="$ol_val"
1583                 fi
1584         done
1585         if test "$ol_arg" = "invalid" ; then
1586                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1587         fi
1588         ol_with_fetch="$ol_arg"
1589
1590 else
1591         ol_with_fetch="auto"
1592 fi
1593 # end --with-fetch
1594
1595 # OpenLDAP --with-kerberos
1596         # Check whether --with-kerberos or --without-kerberos was given.
1597 if test "${with_kerberos+set}" = set; then
1598   withval="$with_kerberos"
1599   
1600         ol_arg=invalid
1601         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1602                 if test "$withval" = "$ol_val" ; then
1603                         ol_arg="$ol_val"
1604                 fi
1605         done
1606         if test "$ol_arg" = "invalid" ; then
1607                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1608         fi
1609         ol_with_kerberos="$ol_arg"
1610
1611 else
1612         ol_with_kerberos="auto"
1613 fi
1614 # end --with-kerberos
1615
1616 # OpenLDAP --with-readline
1617         # Check whether --with-readline or --without-readline was given.
1618 if test "${with_readline+set}" = set; then
1619   withval="$with_readline"
1620   
1621         ol_arg=invalid
1622         for ol_val in auto yes no  ; do
1623                 if test "$withval" = "$ol_val" ; then
1624                         ol_arg="$ol_val"
1625                 fi
1626         done
1627         if test "$ol_arg" = "invalid" ; then
1628                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1629         fi
1630         ol_with_readline="$ol_arg"
1631
1632 else
1633         ol_with_readline="auto"
1634 fi
1635 # end --with-readline
1636
1637 # OpenLDAP --with-threads
1638         # Check whether --with-threads or --without-threads was given.
1639 if test "${with_threads+set}" = set; then
1640   withval="$with_threads"
1641   
1642         ol_arg=invalid
1643         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1644                 if test "$withval" = "$ol_val" ; then
1645                         ol_arg="$ol_val"
1646                 fi
1647         done
1648         if test "$ol_arg" = "invalid" ; then
1649                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1650         fi
1651         ol_with_threads="$ol_arg"
1652
1653 else
1654         ol_with_threads="auto"
1655 fi
1656 # end --with-threads
1657
1658 # OpenLDAP --with-tls
1659         # Check whether --with-tls or --without-tls was given.
1660 if test "${with_tls+set}" = set; then
1661   withval="$with_tls"
1662   
1663         ol_arg=invalid
1664         for ol_val in auto ssleay openssl yes no  ; do
1665                 if test "$withval" = "$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 $withval for --with-tls" 1>&2; exit 1; }
1671         fi
1672         ol_with_tls="$ol_arg"
1673
1674 else
1675         ol_with_tls="auto"
1676 fi
1677 # end --with-tls
1678
1679 # OpenLDAP --with-yielding_select
1680         # Check whether --with-yielding_select or --without-yielding_select was given.
1681 if test "${with_yielding_select+set}" = set; then
1682   withval="$with_yielding_select"
1683   
1684         ol_arg=invalid
1685         for ol_val in auto yes no manual  ; do
1686                 if test "$withval" = "$ol_val" ; then
1687                         ol_arg="$ol_val"
1688                 fi
1689         done
1690         if test "$ol_arg" = "invalid" ; then
1691                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1692         fi
1693         ol_with_yielding_select="$ol_arg"
1694
1695 else
1696         ol_with_yielding_select="auto"
1697 fi
1698 # end --with-yielding_select
1699
1700
1701
1702 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1703 if test "${with_xxslapdoptions+set}" = set; then
1704   withval="$with_xxslapdoptions"
1705   :
1706 fi
1707
1708 # OpenLDAP --enable-slapd
1709         # Check whether --enable-slapd or --disable-slapd was given.
1710 if test "${enable_slapd+set}" = set; then
1711   enableval="$enable_slapd"
1712   
1713         ol_arg=invalid
1714         for ol_val in auto yes no ; do
1715                 if test "$enableval" = "$ol_val" ; then
1716                         ol_arg="$ol_val"
1717                 fi
1718         done
1719         if test "$ol_arg" = "invalid" ; then
1720                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1721         fi
1722         ol_enable_slapd="$ol_arg"
1723
1724 else
1725         ol_enable_slapd="yes"
1726 fi
1727 # end --enable-slapd
1728 # OpenLDAP --enable-aci
1729         # Check whether --enable-aci or --disable-aci was given.
1730 if test "${enable_aci+set}" = set; then
1731   enableval="$enable_aci"
1732   
1733         ol_arg=invalid
1734         for ol_val in auto yes no ; do
1735                 if test "$enableval" = "$ol_val" ; then
1736                         ol_arg="$ol_val"
1737                 fi
1738         done
1739         if test "$ol_arg" = "invalid" ; then
1740                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1741         fi
1742         ol_enable_aci="$ol_arg"
1743
1744 else
1745         ol_enable_aci="no"
1746 fi
1747 # end --enable-aci
1748 # OpenLDAP --enable-cleartext
1749         # Check whether --enable-cleartext or --disable-cleartext was given.
1750 if test "${enable_cleartext+set}" = set; then
1751   enableval="$enable_cleartext"
1752   
1753         ol_arg=invalid
1754         for ol_val in auto yes no ; do
1755                 if test "$enableval" = "$ol_val" ; then
1756                         ol_arg="$ol_val"
1757                 fi
1758         done
1759         if test "$ol_arg" = "invalid" ; then
1760                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1761         fi
1762         ol_enable_cleartext="$ol_arg"
1763
1764 else
1765         ol_enable_cleartext="yes"
1766 fi
1767 # end --enable-cleartext
1768 # OpenLDAP --enable-crypt
1769         # Check whether --enable-crypt or --disable-crypt was given.
1770 if test "${enable_crypt+set}" = set; then
1771   enableval="$enable_crypt"
1772   
1773         ol_arg=invalid
1774         for ol_val in auto yes no ; do
1775                 if test "$enableval" = "$ol_val" ; then
1776                         ol_arg="$ol_val"
1777                 fi
1778         done
1779         if test "$ol_arg" = "invalid" ; then
1780                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1781         fi
1782         ol_enable_crypt="$ol_arg"
1783
1784 else
1785         ol_enable_crypt="no"
1786 fi
1787 # end --enable-crypt
1788 # OpenLDAP --enable-dynamic
1789         # Check whether --enable-dynamic or --disable-dynamic was given.
1790 if test "${enable_dynamic+set}" = set; then
1791   enableval="$enable_dynamic"
1792   
1793         ol_arg=invalid
1794         for ol_val in auto yes no ; do
1795                 if test "$enableval" = "$ol_val" ; then
1796                         ol_arg="$ol_val"
1797                 fi
1798         done
1799         if test "$ol_arg" = "invalid" ; then
1800                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1801         fi
1802         ol_enable_dynamic="$ol_arg"
1803
1804 else
1805         ol_enable_dynamic="no"
1806 fi
1807 # end --enable-dynamic
1808 # OpenLDAP --enable-kpasswd
1809         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1810 if test "${enable_kpasswd+set}" = set; then
1811   enableval="$enable_kpasswd"
1812   
1813         ol_arg=invalid
1814         for ol_val in auto yes no ; do
1815                 if test "$enableval" = "$ol_val" ; then
1816                         ol_arg="$ol_val"
1817                 fi
1818         done
1819         if test "$ol_arg" = "invalid" ; then
1820                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1821         fi
1822         ol_enable_kpasswd="$ol_arg"
1823
1824 else
1825         ol_enable_kpasswd="no"
1826 fi
1827 # end --enable-kpasswd
1828 # OpenLDAP --enable-lmpasswd
1829         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1830 if test "${enable_lmpasswd+set}" = set; then
1831   enableval="$enable_lmpasswd"
1832   
1833         ol_arg=invalid
1834         for ol_val in auto yes no ; do
1835                 if test "$enableval" = "$ol_val" ; then
1836                         ol_arg="$ol_val"
1837                 fi
1838         done
1839         if test "$ol_arg" = "invalid" ; then
1840                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1841         fi
1842         ol_enable_lmpasswd="$ol_arg"
1843
1844 else
1845         ol_enable_lmpasswd="no"
1846 fi
1847 # end --enable-lmpasswd
1848 # OpenLDAP --enable-spasswd
1849         # Check whether --enable-spasswd or --disable-spasswd was given.
1850 if test "${enable_spasswd+set}" = set; then
1851   enableval="$enable_spasswd"
1852   
1853         ol_arg=invalid
1854         for ol_val in auto yes no ; do
1855                 if test "$enableval" = "$ol_val" ; then
1856                         ol_arg="$ol_val"
1857                 fi
1858         done
1859         if test "$ol_arg" = "invalid" ; then
1860                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1861         fi
1862         ol_enable_spasswd="$ol_arg"
1863
1864 else
1865         ol_enable_spasswd="no"
1866 fi
1867 # end --enable-spasswd
1868 # OpenLDAP --enable-modules
1869         # Check whether --enable-modules or --disable-modules was given.
1870 if test "${enable_modules+set}" = set; then
1871   enableval="$enable_modules"
1872   
1873         ol_arg=invalid
1874         for ol_val in auto yes no ; do
1875                 if test "$enableval" = "$ol_val" ; then
1876                         ol_arg="$ol_val"
1877                 fi
1878         done
1879         if test "$ol_arg" = "invalid" ; then
1880                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1881         fi
1882         ol_enable_modules="$ol_arg"
1883
1884 else
1885         ol_enable_modules="no"
1886 fi
1887 # end --enable-modules
1888 ol_enable_multimaster=${ol_enable_multimaster-no}
1889 # OpenLDAP --enable-phonetic
1890         # Check whether --enable-phonetic or --disable-phonetic was given.
1891 if test "${enable_phonetic+set}" = set; then
1892   enableval="$enable_phonetic"
1893   
1894         ol_arg=invalid
1895         for ol_val in auto yes no ; do
1896                 if test "$enableval" = "$ol_val" ; then
1897                         ol_arg="$ol_val"
1898                 fi
1899         done
1900         if test "$ol_arg" = "invalid" ; then
1901                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1902         fi
1903         ol_enable_phonetic="$ol_arg"
1904
1905 else
1906         ol_enable_phonetic="no"
1907 fi
1908 # end --enable-phonetic
1909 # OpenLDAP --enable-rewrite
1910         # Check whether --enable-rewrite or --disable-rewrite was given.
1911 if test "${enable_rewrite+set}" = set; then
1912   enableval="$enable_rewrite"
1913   
1914         ol_arg=invalid
1915         for ol_val in auto yes no ; do
1916                 if test "$enableval" = "$ol_val" ; then
1917                         ol_arg="$ol_val"
1918                 fi
1919         done
1920         if test "$ol_arg" = "invalid" ; then
1921                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1922         fi
1923         ol_enable_rewrite="$ol_arg"
1924
1925 else
1926         ol_enable_rewrite="no"
1927 fi
1928 # end --enable-rewrite
1929 # OpenLDAP --enable-rlookups
1930         # Check whether --enable-rlookups or --disable-rlookups was given.
1931 if test "${enable_rlookups+set}" = set; then
1932   enableval="$enable_rlookups"
1933   
1934         ol_arg=invalid
1935         for ol_val in auto yes no ; do
1936                 if test "$enableval" = "$ol_val" ; then
1937                         ol_arg="$ol_val"
1938                 fi
1939         done
1940         if test "$ol_arg" = "invalid" ; then
1941                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1942         fi
1943         ol_enable_rlookups="$ol_arg"
1944
1945 else
1946         ol_enable_rlookups="no"
1947 fi
1948 # end --enable-rlookups
1949 # OpenLDAP --enable-slp
1950         # Check whether --enable-slp or --disable-slp was given.
1951 if test "${enable_slp+set}" = set; then
1952   enableval="$enable_slp"
1953   
1954         ol_arg=invalid
1955         for ol_val in auto yes no ; do
1956                 if test "$enableval" = "$ol_val" ; then
1957                         ol_arg="$ol_val"
1958                 fi
1959         done
1960         if test "$ol_arg" = "invalid" ; then
1961                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1962         fi
1963         ol_enable_slp="$ol_arg"
1964
1965 else
1966         ol_enable_slp="no"
1967 fi
1968 # end --enable-slp
1969 # OpenLDAP --enable-wrappers
1970         # Check whether --enable-wrappers or --disable-wrappers was given.
1971 if test "${enable_wrappers+set}" = set; then
1972   enableval="$enable_wrappers"
1973   
1974         ol_arg=invalid
1975         for ol_val in auto yes no ; do
1976                 if test "$enableval" = "$ol_val" ; then
1977                         ol_arg="$ol_val"
1978                 fi
1979         done
1980         if test "$ol_arg" = "invalid" ; then
1981                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
1982         fi
1983         ol_enable_wrappers="$ol_arg"
1984
1985 else
1986         ol_enable_wrappers="no"
1987 fi
1988 # end --enable-wrappers
1989
1990 # OpenLDAP --enable-bdb
1991         # Check whether --enable-bdb or --disable-bdb was given.
1992 if test "${enable_bdb+set}" = set; then
1993   enableval="$enable_bdb"
1994   
1995         ol_arg=invalid
1996         for ol_val in auto yes no ; 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-bdb" 1>&2; exit 1; }
2003         fi
2004         ol_enable_bdb="$ol_arg"
2005
2006 else
2007         ol_enable_bdb="yes"
2008 fi
2009 # end --enable-bdb
2010 # OpenLDAP --with-bdb_module
2011         # Check whether --with-bdb_module or --without-bdb_module was given.
2012 if test "${with_bdb_module+set}" = set; then
2013   withval="$with_bdb_module"
2014   
2015         ol_arg=invalid
2016         for ol_val in static dynamic ; 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-bdb_module" 1>&2; exit 1; }
2023         fi
2024         ol_with_bdb_module="$ol_arg"
2025
2026 else
2027         ol_with_bdb_module="static"
2028 fi
2029 # end --with-bdb_module
2030
2031 # OpenLDAP --enable-dnssrv
2032         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2033 if test "${enable_dnssrv+set}" = set; then
2034   enableval="$enable_dnssrv"
2035   
2036         ol_arg=invalid
2037         for ol_val in auto yes no ; do
2038                 if test "$enableval" = "$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 $enableval for --enable-dnssrv" 1>&2; exit 1; }
2044         fi
2045         ol_enable_dnssrv="$ol_arg"
2046
2047 else
2048         ol_enable_dnssrv="no"
2049 fi
2050 # end --enable-dnssrv
2051 # OpenLDAP --with-dnssrv_module
2052         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2053 if test "${with_dnssrv_module+set}" = set; then
2054   withval="$with_dnssrv_module"
2055   
2056         ol_arg=invalid
2057         for ol_val in static dynamic ; do
2058                 if test "$withval" = "$ol_val" ; then
2059                         ol_arg="$ol_val"
2060                 fi
2061         done
2062         if test "$ol_arg" = "invalid" ; then
2063                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2064         fi
2065         ol_with_dnssrv_module="$ol_arg"
2066
2067 else
2068         ol_with_dnssrv_module="static"
2069 fi
2070 # end --with-dnssrv_module
2071
2072 # OpenLDAP --enable-ldap
2073         # Check whether --enable-ldap or --disable-ldap was given.
2074 if test "${enable_ldap+set}" = set; then
2075   enableval="$enable_ldap"
2076   
2077         ol_arg=invalid
2078         for ol_val in auto yes no ; 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-ldap" 1>&2; exit 1; }
2085         fi
2086         ol_enable_ldap="$ol_arg"
2087
2088 else
2089         ol_enable_ldap="no"
2090 fi
2091 # end --enable-ldap
2092 # OpenLDAP --with-ldap_module
2093         # Check whether --with-ldap_module or --without-ldap_module was given.
2094 if test "${with_ldap_module+set}" = set; then
2095   withval="$with_ldap_module"
2096   
2097         ol_arg=invalid
2098         for ol_val in static dynamic ; do
2099                 if test "$withval" = "$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 $withval for --with-ldap_module" 1>&2; exit 1; }
2105         fi
2106         ol_with_ldap_module="$ol_arg"
2107
2108 else
2109         ol_with_ldap_module="static"
2110 fi
2111 # end --with-ldap_module
2112
2113 # OpenLDAP --enable-ldbm
2114         # Check whether --enable-ldbm or --disable-ldbm was given.
2115 if test "${enable_ldbm+set}" = set; then
2116   enableval="$enable_ldbm"
2117   
2118         ol_arg=invalid
2119         for ol_val in auto yes no ; do
2120                 if test "$enableval" = "$ol_val" ; then
2121                         ol_arg="$ol_val"
2122                 fi
2123         done
2124         if test "$ol_arg" = "invalid" ; then
2125                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2126         fi
2127         ol_enable_ldbm="$ol_arg"
2128
2129 else
2130         ol_enable_ldbm="no"
2131 fi
2132 # end --enable-ldbm
2133 # OpenLDAP --with-ldbm_api
2134         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2135 if test "${with_ldbm_api+set}" = set; then
2136   withval="$with_ldbm_api"
2137   
2138         ol_arg=invalid
2139         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2140                 if test "$withval" = "$ol_val" ; then
2141                         ol_arg="$ol_val"
2142                 fi
2143         done
2144         if test "$ol_arg" = "invalid" ; then
2145                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2146         fi
2147         ol_with_ldbm_api="$ol_arg"
2148
2149 else
2150         ol_with_ldbm_api="auto"
2151 fi
2152 # end --with-ldbm_api
2153
2154 # OpenLDAP --with-ldbm_module
2155         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2156 if test "${with_ldbm_module+set}" = set; then
2157   withval="$with_ldbm_module"
2158   
2159         ol_arg=invalid
2160         for ol_val in static dynamic ; do
2161                 if test "$withval" = "$ol_val" ; then
2162                         ol_arg="$ol_val"
2163                 fi
2164         done
2165         if test "$ol_arg" = "invalid" ; then
2166                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2167         fi
2168         ol_with_ldbm_module="$ol_arg"
2169
2170 else
2171         ol_with_ldbm_module="static"
2172 fi
2173 # end --with-ldbm_module
2174
2175 # OpenLDAP --with-ldbm_type
2176         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2177 if test "${with_ldbm_type+set}" = set; then
2178   withval="$with_ldbm_type"
2179   
2180         ol_arg=invalid
2181         for ol_val in auto btree hash ; do
2182                 if test "$withval" = "$ol_val" ; then
2183                         ol_arg="$ol_val"
2184                 fi
2185         done
2186         if test "$ol_arg" = "invalid" ; then
2187                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2188         fi
2189         ol_with_ldbm_type="$ol_arg"
2190
2191 else
2192         ol_with_ldbm_type="auto"
2193 fi
2194 # end --with-ldbm_type
2195
2196 # OpenLDAP --enable-meta
2197         # Check whether --enable-meta or --disable-meta was given.
2198 if test "${enable_meta+set}" = set; then
2199   enableval="$enable_meta"
2200   
2201         ol_arg=invalid
2202         for ol_val in auto yes no ; do
2203                 if test "$enableval" = "$ol_val" ; then
2204                         ol_arg="$ol_val"
2205                 fi
2206         done
2207         if test "$ol_arg" = "invalid" ; then
2208                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2209         fi
2210         ol_enable_meta="$ol_arg"
2211
2212 else
2213         ol_enable_meta="no"
2214 fi
2215 # end --enable-meta
2216 # OpenLDAP --with-meta_module
2217         # Check whether --with-meta_module or --without-meta_module was given.
2218 if test "${with_meta_module+set}" = set; then
2219   withval="$with_meta_module"
2220   
2221         ol_arg=invalid
2222         for ol_val in static dynamic ; do
2223                 if test "$withval" = "$ol_val" ; then
2224                         ol_arg="$ol_val"
2225                 fi
2226         done
2227         if test "$ol_arg" = "invalid" ; then
2228                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2229         fi
2230         ol_with_meta_module="$ol_arg"
2231
2232 else
2233         ol_with_meta_module="static"
2234 fi
2235 # end --with-meta_module
2236
2237 # OpenLDAP --enable-monitor
2238         # Check whether --enable-monitor or --disable-monitor was given.
2239 if test "${enable_monitor+set}" = set; then
2240   enableval="$enable_monitor"
2241   
2242         ol_arg=invalid
2243         for ol_val in auto yes no ; do
2244                 if test "$enableval" = "$ol_val" ; then
2245                         ol_arg="$ol_val"
2246                 fi
2247         done
2248         if test "$ol_arg" = "invalid" ; then
2249                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2250         fi
2251         ol_enable_monitor="$ol_arg"
2252
2253 else
2254         ol_enable_monitor="no"
2255 fi
2256 # end --enable-monitor
2257 # OpenLDAP --with-monitor_module
2258         # Check whether --with-monitor_module or --without-monitor_module was given.
2259 if test "${with_monitor_module+set}" = set; then
2260   withval="$with_monitor_module"
2261   
2262         ol_arg=invalid
2263         for ol_val in static dynamic ; do
2264                 if test "$withval" = "$ol_val" ; then
2265                         ol_arg="$ol_val"
2266                 fi
2267         done
2268         if test "$ol_arg" = "invalid" ; then
2269                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2270         fi
2271         ol_with_monitor_module="$ol_arg"
2272
2273 else
2274         ol_with_monitor_module="static"
2275 fi
2276 # end --with-monitor_module
2277
2278 # OpenLDAP --enable-null
2279         # Check whether --enable-null or --disable-null was given.
2280 if test "${enable_null+set}" = set; then
2281   enableval="$enable_null"
2282   
2283         ol_arg=invalid
2284         for ol_val in auto yes no ; do
2285                 if test "$enableval" = "$ol_val" ; then
2286                         ol_arg="$ol_val"
2287                 fi
2288         done
2289         if test "$ol_arg" = "invalid" ; then
2290                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2291         fi
2292         ol_enable_null="$ol_arg"
2293
2294 else
2295         ol_enable_null="no"
2296 fi
2297 # end --enable-null
2298 # OpenLDAP --with-null_module
2299         # Check whether --with-null_module or --without-null_module was given.
2300 if test "${with_null_module+set}" = set; then
2301   withval="$with_null_module"
2302   
2303         ol_arg=invalid
2304         for ol_val in static dynamic ; do
2305                 if test "$withval" = "$ol_val" ; then
2306                         ol_arg="$ol_val"
2307                 fi
2308         done
2309         if test "$ol_arg" = "invalid" ; then
2310                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2311         fi
2312         ol_with_null_module="$ol_arg"
2313
2314 else
2315         ol_with_null_module="static"
2316 fi
2317 # end --with-null_module
2318
2319 # OpenLDAP --enable-passwd
2320         # Check whether --enable-passwd or --disable-passwd was given.
2321 if test "${enable_passwd+set}" = set; then
2322   enableval="$enable_passwd"
2323   
2324         ol_arg=invalid
2325         for ol_val in auto yes no ; do
2326                 if test "$enableval" = "$ol_val" ; then
2327                         ol_arg="$ol_val"
2328                 fi
2329         done
2330         if test "$ol_arg" = "invalid" ; then
2331                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2332         fi
2333         ol_enable_passwd="$ol_arg"
2334
2335 else
2336         ol_enable_passwd="no"
2337 fi
2338 # end --enable-passwd
2339 # OpenLDAP --with-passwd_module
2340         # Check whether --with-passwd_module or --without-passwd_module was given.
2341 if test "${with_passwd_module+set}" = set; then
2342   withval="$with_passwd_module"
2343   
2344         ol_arg=invalid
2345         for ol_val in static dynamic ; do
2346                 if test "$withval" = "$ol_val" ; then
2347                         ol_arg="$ol_val"
2348                 fi
2349         done
2350         if test "$ol_arg" = "invalid" ; then
2351                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2352         fi
2353         ol_with_passwd_module="$ol_arg"
2354
2355 else
2356         ol_with_passwd_module="static"
2357 fi
2358 # end --with-passwd_module
2359
2360 # OpenLDAP --enable-perl
2361         # Check whether --enable-perl or --disable-perl was given.
2362 if test "${enable_perl+set}" = set; then
2363   enableval="$enable_perl"
2364   
2365         ol_arg=invalid
2366         for ol_val in auto yes no ; do
2367                 if test "$enableval" = "$ol_val" ; then
2368                         ol_arg="$ol_val"
2369                 fi
2370         done
2371         if test "$ol_arg" = "invalid" ; then
2372                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2373         fi
2374         ol_enable_perl="$ol_arg"
2375
2376 else
2377         ol_enable_perl="no"
2378 fi
2379 # end --enable-perl
2380 # OpenLDAP --with-perl_module
2381         # Check whether --with-perl_module or --without-perl_module was given.
2382 if test "${with_perl_module+set}" = set; then
2383   withval="$with_perl_module"
2384   
2385         ol_arg=invalid
2386         for ol_val in static dynamic ; do
2387                 if test "$withval" = "$ol_val" ; then
2388                         ol_arg="$ol_val"
2389                 fi
2390         done
2391         if test "$ol_arg" = "invalid" ; then
2392                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2393         fi
2394         ol_with_perl_module="$ol_arg"
2395
2396 else
2397         ol_with_perl_module="static"
2398 fi
2399 # end --with-perl_module
2400
2401 # OpenLDAP --enable-shell
2402         # Check whether --enable-shell or --disable-shell was given.
2403 if test "${enable_shell+set}" = set; then
2404   enableval="$enable_shell"
2405   
2406         ol_arg=invalid
2407         for ol_val in auto yes no ; do
2408                 if test "$enableval" = "$ol_val" ; then
2409                         ol_arg="$ol_val"
2410                 fi
2411         done
2412         if test "$ol_arg" = "invalid" ; then
2413                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2414         fi
2415         ol_enable_shell="$ol_arg"
2416
2417 else
2418         ol_enable_shell="no"
2419 fi
2420 # end --enable-shell
2421 # OpenLDAP --with-shell_module
2422         # Check whether --with-shell_module or --without-shell_module was given.
2423 if test "${with_shell_module+set}" = set; then
2424   withval="$with_shell_module"
2425   
2426         ol_arg=invalid
2427         for ol_val in static dynamic ; do
2428                 if test "$withval" = "$ol_val" ; then
2429                         ol_arg="$ol_val"
2430                 fi
2431         done
2432         if test "$ol_arg" = "invalid" ; then
2433                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2434         fi
2435         ol_with_shell_module="$ol_arg"
2436
2437 else
2438         ol_with_shell_module="static"
2439 fi
2440 # end --with-shell_module
2441
2442 # OpenLDAP --enable-sql
2443         # Check whether --enable-sql or --disable-sql was given.
2444 if test "${enable_sql+set}" = set; then
2445   enableval="$enable_sql"
2446   
2447         ol_arg=invalid
2448         for ol_val in auto yes no ; do
2449                 if test "$enableval" = "$ol_val" ; then
2450                         ol_arg="$ol_val"
2451                 fi
2452         done
2453         if test "$ol_arg" = "invalid" ; then
2454                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2455         fi
2456         ol_enable_sql="$ol_arg"
2457
2458 else
2459         ol_enable_sql="no"
2460 fi
2461 # end --enable-sql
2462 # OpenLDAP --with-sql_module
2463         # Check whether --with-sql_module or --without-sql_module was given.
2464 if test "${with_sql_module+set}" = set; then
2465   withval="$with_sql_module"
2466   
2467         ol_arg=invalid
2468         for ol_val in static dynamic ; do
2469                 if test "$withval" = "$ol_val" ; then
2470                         ol_arg="$ol_val"
2471                 fi
2472         done
2473         if test "$ol_arg" = "invalid" ; then
2474                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2475         fi
2476         ol_with_sql_module="$ol_arg"
2477
2478 else
2479         ol_with_sql_module="static"
2480 fi
2481 # end --with-sql_module
2482
2483
2484 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2485 if test "${with_xxslurpdoptions+set}" = set; then
2486   withval="$with_xxslurpdoptions"
2487   :
2488 fi
2489
2490 # OpenLDAP --enable-slurpd
2491         # Check whether --enable-slurpd or --disable-slurpd was given.
2492 if test "${enable_slurpd+set}" = set; then
2493   enableval="$enable_slurpd"
2494   
2495         ol_arg=invalid
2496         for ol_val in auto yes no ; do
2497                 if test "$enableval" = "$ol_val" ; then
2498                         ol_arg="$ol_val"
2499                 fi
2500         done
2501         if test "$ol_arg" = "invalid" ; then
2502                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2503         fi
2504         ol_enable_slurpd="$ol_arg"
2505
2506 else
2507         ol_enable_slurpd="auto"
2508 fi
2509 # end --enable-slurpd
2510
2511 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2512 if test "${with_xxliboptions+set}" = set; then
2513   withval="$with_xxliboptions"
2514   :
2515 fi
2516
2517 # Check whether --enable-static or --disable-static was given.
2518 if test "${enable_static+set}" = set; then
2519   enableval="$enable_static"
2520   p=${PACKAGE-default}
2521 case $enableval in
2522 yes) enable_static=yes ;;
2523 no) enable_static=no ;;
2524 *)
2525   enable_static=no
2526   # Look at the argument we got.  We use all the common list separators.
2527   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2528   for pkg in $enableval; do
2529     if test "X$pkg" = "X$p"; then
2530       enable_static=yes
2531     fi
2532   done
2533   IFS="$ac_save_ifs"
2534   ;;
2535 esac
2536 else
2537   enable_static=yes
2538 fi
2539
2540 # Check whether --enable-shared or --disable-shared was given.
2541 if test "${enable_shared+set}" = set; then
2542   enableval="$enable_shared"
2543   p=${PACKAGE-default}
2544 case $enableval in
2545 yes) enable_shared=yes ;;
2546 no) enable_shared=no ;;
2547 *)
2548   enable_shared=no
2549   # Look at the argument we got.  We use all the common list separators.
2550   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2551   for pkg in $enableval; do
2552     if test "X$pkg" = "X$p"; then
2553       enable_shared=yes
2554     fi
2555   done
2556   IFS="$ac_save_ifs"
2557   ;;
2558 esac
2559 else
2560   enable_shared=yes
2561 fi
2562
2563
2564
2565 # validate options
2566 if test $ol_enable_slapd = no ; then
2567                 if test $ol_enable_bdb = yes ; then
2568                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2569         fi
2570         if test $ol_enable_dnssrv = yes ; then
2571                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2572         fi
2573         if test $ol_enable_ldap = yes ; then
2574                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2575         fi
2576         if test $ol_enable_ldbm = yes ; then
2577                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2578         fi
2579         if test $ol_enable_meta = yes ; then
2580                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2581         fi
2582         if test $ol_enable_monitor = yes ; then
2583                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2584         fi
2585         if test $ol_enable_null = yes ; then
2586                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2587         fi
2588         if test $ol_enable_passwd = yes ; then
2589                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2590         fi
2591         if test $ol_enable_perl = yes ; then
2592                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2593         fi
2594         if test $ol_enable_shell = yes ; then
2595                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2596         fi
2597         if test $ol_enable_sql = yes ; then
2598                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2599         fi
2600         if test $ol_enable_modules = yes ; then
2601                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2602         fi
2603         if test $ol_enable_multimaster = yes ; then
2604                 echo "configure: warning: slapd disabled, ignoring --enable-multimaster argument" 1>&2
2605         fi
2606         if test $ol_enable_wrappers = yes ; then
2607                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2608         fi
2609         if test $ol_enable_phonetic = yes ; then
2610                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2611         fi
2612         if test $ol_enable_rlookups = yes ; then
2613                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2614         fi
2615         if test $ol_enable_aci = yes ; then
2616                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2617         fi
2618         if test $ol_with_ldbm_api != auto ; then
2619                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2620         fi
2621         if test $ol_with_ldbm_type != auto ; then
2622                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2623         fi
2624         if test $ol_with_bdb_module != static ; then
2625                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2626         fi
2627         if test $ol_with_dnssrv_module != static ; then
2628                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2629         fi
2630         if test $ol_with_ldap_module != static ; then
2631                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2632         fi
2633         if test $ol_with_ldbm_module != static ; then
2634                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2635         fi
2636         if test $ol_with_meta_module != static ; then
2637                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2638         fi
2639         if test $ol_with_monitor_module != static ; then
2640                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2641         fi
2642         if test $ol_with_null_module != static ; then
2643                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2644         fi
2645         if test $ol_with_passwd_module != static ; then
2646                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2647         fi
2648         if test $ol_with_perl_module != static ; then
2649                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2650         fi
2651         if test $ol_with_shell_module != static ; then
2652                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2653         fi
2654         if test $ol_with_sql_module != static ; then
2655                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2656         fi
2657         if test $ol_enable_slurpd = yes ; then
2658                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2659         fi
2660         if test $ol_enable_rewrite = yes ; then
2661                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2662         fi
2663
2664         # force settings to no
2665         ol_enable_bdb=no
2666         ol_enable_dnssrv=no
2667         ol_enable_ldap=no
2668         ol_enable_ldbm=no
2669         ol_enable_meta=no
2670         ol_enable_monitor=no
2671         ol_enable_null=no
2672         ol_enable_passwd=no
2673         ol_enable_perl=no
2674         ol_enable_shell=no
2675         ol_enable_sql=no
2676
2677         ol_enable_modules=no
2678         ol_enable_multimaster=no
2679         ol_enable_phonetic=no
2680         ol_enable_rlookups=no
2681         ol_enable_aci=no
2682         ol_enable_wrappers=no
2683         ol_enable_dynamic=no
2684
2685         ol_with_ldbm_api=no
2686         ol_with_ldbm_type=no
2687
2688         ol_with_bdb_module=static
2689         ol_with_dnssrv_module=static
2690         ol_with_ldap_module=static
2691         ol_with_ldbm_module=static
2692         ol_with_meta_module=static
2693         ol_with_monitor_module=static
2694         ol_with_null_module=static
2695         ol_with_passwd_module=static
2696         ol_with_perl_module=static
2697         ol_with_shell_module=static
2698         ol_with_sql_module=static
2699
2700         ol_enable_slurpd=no
2701
2702         ol_enable_rewrite=no
2703
2704 elif test $ol_enable_ldbm = no ; then
2705         
2706         if test $ol_with_ldbm_api != auto ; then
2707                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2708         fi
2709
2710         if test $ol_with_ldbm_type != auto ; then
2711                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2712         fi
2713
2714         if test $ol_with_ldbm_module != static ; then
2715                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2716         fi
2717
2718         if test $ol_enable_modules != yes -a \
2719                 $ol_enable_bdb = no -a \
2720                 $ol_enable_dnssrv = no -a \
2721                 $ol_enable_ldap = no -a \
2722                 $ol_enable_meta = no -a \
2723                 $ol_enable_monitor = no -a \
2724                 $ol_enable_null = no -a \
2725                 $ol_enable_passwd = no -a \
2726                 $ol_enable_perl = no -a \
2727                 $ol_enable_shell = no -a \
2728                 $ol_enable_sql = no ; then
2729
2730                 if test $ol_enable_slapd = yes ; then
2731                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2732                 else
2733                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2734                         ol_enable_slapd=no
2735                 fi
2736         fi
2737
2738         ol_with_ldbm_api=no
2739         ol_with_ldbm_type=no
2740         ol_with_ldbm_module=static
2741
2742         if test $ol_enable_bdb != no ; then
2743                 ol_with_ldbm_api=berkeley
2744         fi
2745
2746 else
2747                 if test $ol_with_ldbm_api = gdbm -a \
2748                 $ol_with_ldbm_type = btree ; then
2749                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2750         fi
2751         if test $ol_with_ldbm_api = mdbm -a \
2752                 $ol_with_ldbm_type = btree ; then
2753                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2754         fi
2755         if test $ol_with_ldbm_api = ndbm -a \
2756                 $ol_with_ldbm_type = btree ; then
2757                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2758         fi
2759
2760         if test $ol_enable_bdb = yes ; then
2761                 if test $ol_with_ldbm_api = auto ; then
2762                         ol_with_ldbm_api=berkeley
2763                 elif test $ol_with_ldbm_api != berkeley ; then
2764                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2765                 fi
2766
2767         elif test $ol_enable_bdb = auto ; then
2768                 if test $ol_with_ldbm_api != berkeley \
2769                         -o $ol_with_ldbm_api != auto ; then
2770                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2771                         ol_enable_bdb=no
2772                 fi
2773         fi
2774 fi
2775
2776 if test $ol_enable_slurpd = yes ; then
2777                 if test $ol_with_threads = no ; then
2778                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2779         fi
2780 fi
2781
2782 if test $ol_enable_lmpasswd = yes ; then
2783         if test $ol_with_tls = no ; then
2784                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2785         fi
2786 fi
2787
2788 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2789         if test $ol_with_kerberos = no ; then
2790                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2791         elif test $ol_with_kerberos = auto ; then
2792                 ol_with_kerberos=yes
2793         fi
2794
2795 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2796         if test $ol_with_kerberos = auto ; then
2797                 ol_with_kerberos=no
2798         elif test $ol_with_kerberos != no ; then
2799                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2800                 ol_with_kerberos=no
2801         fi
2802 fi
2803
2804 if test $ol_enable_spasswd = yes ; then
2805         if test $ol_with_cyrus_sasl = no ; then
2806                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2807         fi
2808         ol_with_cyrus_sasl=yes
2809 fi
2810
2811 echo "$ac_t""done" 1>&6
2812
2813 LDAP_LIBS=
2814 LDIF_LIBS=
2815 LDBM_LIBS=
2816 LTHREAD_LIBS=
2817 LUTIL_LIBS=
2818
2819 SLAPD_LIBS=
2820 SLURPD_LIBS=
2821
2822 BUILD_SLAPD=no
2823 BUILD_SLURPD=no
2824
2825 BUILD_THREAD=no
2826
2827 BUILD_BDB=no
2828 BUILD_DNSSRV=no
2829 BUILD_LDAP=no
2830 BUILD_LDBM=no
2831 BUILD_META=no
2832 BUILD_MONITOR=no
2833 BUILD_NULL=no
2834 BUILD_PASSWD=no
2835 BUILD_PERL=no
2836 BUILD_SHELL=no
2837 BUILD_SQL=no
2838
2839 BUILD_BDB_DYNAMIC=static
2840 BUILD_DNSSRV_DYNAMIC=static
2841 BUILD_LDAP_DYNAMIC=static
2842 BUILD_LDBM_DYNAMIC=static
2843 BUILD_META_DYNAMIC=static
2844 BUILD_MONITOR_DYNAMIC=static
2845 BUILD_NULL_DYNAMIC=static
2846 BUILD_PASSWD_DYNAMIC=static
2847 BUILD_PERL_DYNAMIC=static
2848 BUILD_SHELL_DYNAMIC=static
2849 BUILD_SQL_DYNAMIC=static
2850
2851 SLAPD_MODULES_LDFLAGS=
2852 SLAPD_MODULES_CPPFLAGS=
2853
2854 SLAPD_STATIC_BACKENDS=
2855 SLAPD_DYNAMIC_BACKENDS=
2856
2857 SLAPD_PERL_LDFLAGS=
2858 MOD_PERL_LDFLAGS=
2859 PERL_CPPFLAGS=
2860
2861 SLAPD_SQL_LDFLAGS=
2862 SLAPD_SQL_LIBS=
2863 SLAPD_SQL_INCLUDES=
2864
2865 KRB4_LIBS=
2866 KRB5_LIBS=
2867 READLINE_LIBS=
2868 SASL_LIBS=
2869 TERMCAP_LIBS=
2870 TLS_LIBS=
2871 MODULES_LIBS=
2872 AUTH_LIBS=
2873
2874 SLAPD_SLP_LIBS=
2875
2876
2877 # Find a good install program.  We prefer a C program (faster),
2878 # so one script is as good as another.  But avoid the broken or
2879 # incompatible versions:
2880 # SysV /etc/install, /usr/sbin/install
2881 # SunOS /usr/etc/install
2882 # IRIX /sbin/install
2883 # AIX /bin/install
2884 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2885 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2886 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2887 # ./install, which can be erroneously created by make from ./install.sh.
2888 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2889 echo "configure:2890: checking for a BSD compatible install" >&5
2890 if test -z "$INSTALL"; then
2891 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2892   echo $ac_n "(cached) $ac_c" 1>&6
2893 else
2894     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2895   for ac_dir in $PATH; do
2896     # Account for people who put trailing slashes in PATH elements.
2897     case "$ac_dir/" in
2898     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2899     *)
2900       # OSF1 and SCO ODT 3.0 have their own names for install.
2901       # Don't use installbsd from OSF since it installs stuff as root
2902       # by default.
2903       for ac_prog in ginstall scoinst install; do
2904         if test -f $ac_dir/$ac_prog; then
2905           if test $ac_prog = install &&
2906             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2907             # AIX install.  It has an incompatible calling convention.
2908             :
2909           elif test $ac_prog = install &&
2910             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2911             # program-specific install script used by HP pwplus--don't use.
2912             :
2913           else
2914             ac_cv_path_install="$ac_dir/$ac_prog -c"
2915             break 2
2916           fi
2917         fi
2918       done
2919       ;;
2920     esac
2921   done
2922   IFS="$ac_save_IFS"
2923
2924 fi
2925   if test "${ac_cv_path_install+set}" = set; then
2926     INSTALL="$ac_cv_path_install"
2927   else
2928     # As a last resort, use the slow shell script.  We don't cache a
2929     # path for INSTALL within a source directory, because that will
2930     # break other packages using the cache if that directory is
2931     # removed, or if the path is relative.
2932     INSTALL="$ac_install_sh"
2933   fi
2934 fi
2935 echo "$ac_t""$INSTALL" 1>&6
2936
2937 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2938 # It thinks the first close brace ends the variable substitution.
2939 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2940
2941 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2942
2943 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2944
2945
2946 cat >> confdefs.h <<\EOF
2947 #define HAVE_MKVERSION 1
2948 EOF
2949
2950
2951
2952
2953 ol_aix_threads=no
2954 case "$target" in
2955 *-*-aix*)       if test -z "$CC" ; then
2956                 case "$ol_with_threads" in
2957                 auto | yes |  posix) ol_aix_threads=yes ;;
2958                 esac
2959         fi
2960 ;;
2961 esac
2962
2963 if test $ol_aix_threads = yes ; then
2964         if test -z "${CC}" ; then
2965                 for ac_prog in cc_r xlc_r cc
2966 do
2967 # Extract the first word of "$ac_prog", so it can be a program name with args.
2968 set dummy $ac_prog; ac_word=$2
2969 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2970 echo "configure:2971: checking for $ac_word" >&5
2971 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2972   echo $ac_n "(cached) $ac_c" 1>&6
2973 else
2974   if test -n "$CC"; then
2975   ac_cv_prog_CC="$CC" # Let the user override the test.
2976 else
2977   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2978   ac_dummy="$PATH"
2979   for ac_dir in $ac_dummy; do
2980     test -z "$ac_dir" && ac_dir=.
2981     if test -f $ac_dir/$ac_word; then
2982       ac_cv_prog_CC="$ac_prog"
2983       break
2984     fi
2985   done
2986   IFS="$ac_save_ifs"
2987 fi
2988 fi
2989 CC="$ac_cv_prog_CC"
2990 if test -n "$CC"; then
2991   echo "$ac_t""$CC" 1>&6
2992 else
2993   echo "$ac_t""no" 1>&6
2994 fi
2995
2996 test -n "$CC" && break
2997 done
2998
2999
3000                 if test "$CC" = cc ; then
3001                                                 if test $ol_with_threads != auto ; then
3002                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3003                         else
3004                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3005                         fi
3006                         ol_with_threads=no
3007                 fi
3008         fi
3009
3010         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3011                 ol_with_threads=posix
3012                 ol_cv_pthread_create=yes
3013         fi
3014 fi
3015
3016 if test -z "${CC}"; then
3017         for ac_prog in cc gcc
3018 do
3019 # Extract the first word of "$ac_prog", so it can be a program name with args.
3020 set dummy $ac_prog; ac_word=$2
3021 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3022 echo "configure:3023: checking for $ac_word" >&5
3023 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3024   echo $ac_n "(cached) $ac_c" 1>&6
3025 else
3026   if test -n "$CC"; then
3027   ac_cv_prog_CC="$CC" # Let the user override the test.
3028 else
3029   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3030   ac_dummy="$PATH"
3031   for ac_dir in $ac_dummy; do
3032     test -z "$ac_dir" && ac_dir=.
3033     if test -f $ac_dir/$ac_word; then
3034       ac_cv_prog_CC="$ac_prog"
3035       break
3036     fi
3037   done
3038   IFS="$ac_save_ifs"
3039 fi
3040 fi
3041 CC="$ac_cv_prog_CC"
3042 if test -n "$CC"; then
3043   echo "$ac_t""$CC" 1>&6
3044 else
3045   echo "$ac_t""no" 1>&6
3046 fi
3047
3048 test -n "$CC" && break
3049 done
3050 test -n "$CC" || CC="missing"
3051
3052
3053         if test "${CC}" = "missing" ; then
3054                 { echo "configure: error: Unable to locate cc(1) or suitable replacement.  Check PATH or set CC." 1>&2; exit 1; }
3055         fi
3056 fi
3057
3058 if test -z "${AR}"; then
3059         for ac_prog in ar gar
3060 do
3061 # Extract the first word of "$ac_prog", so it can be a program name with args.
3062 set dummy $ac_prog; ac_word=$2
3063 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3064 echo "configure:3065: checking for $ac_word" >&5
3065 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3066   echo $ac_n "(cached) $ac_c" 1>&6
3067 else
3068   if test -n "$AR"; then
3069   ac_cv_prog_AR="$AR" # Let the user override the test.
3070 else
3071   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3072   ac_dummy="$PATH"
3073   for ac_dir in $ac_dummy; do
3074     test -z "$ac_dir" && ac_dir=.
3075     if test -f $ac_dir/$ac_word; then
3076       ac_cv_prog_AR="$ac_prog"
3077       break
3078     fi
3079   done
3080   IFS="$ac_save_ifs"
3081 fi
3082 fi
3083 AR="$ac_cv_prog_AR"
3084 if test -n "$AR"; then
3085   echo "$ac_t""$AR" 1>&6
3086 else
3087   echo "$ac_t""no" 1>&6
3088 fi
3089
3090 test -n "$AR" && break
3091 done
3092 test -n "$AR" || AR="missing"
3093
3094
3095         if test "${AR}" = "missing" ; then
3096                 { echo "configure: error: Unable to locate ar(1) or suitable replacement.  Check PATH or set AR." 1>&2; exit 1; }
3097         fi
3098 fi
3099
3100
3101
3102 # Find the correct PATH separator.  Usually this is `:', but
3103 # DJGPP uses `;' like DOS.
3104 if test "X${PATH_SEPARATOR+set}" != Xset; then
3105   UNAME=${UNAME-`uname 2>/dev/null`}
3106   case X$UNAME in
3107     *-DOS) lt_cv_sys_path_separator=';' ;;
3108     *)     lt_cv_sys_path_separator=':' ;;
3109   esac
3110   PATH_SEPARATOR=$lt_cv_sys_path_separator
3111 fi
3112
3113 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3114 echo "configure:3115: checking for Cygwin environment" >&5
3115 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3116   echo $ac_n "(cached) $ac_c" 1>&6
3117 else
3118   cat > conftest.$ac_ext <<EOF
3119 #line 3120 "configure"
3120 #include "confdefs.h"
3121
3122 int main() {
3123
3124 #ifndef __CYGWIN__
3125 #define __CYGWIN__ __CYGWIN32__
3126 #endif
3127 return __CYGWIN__;
3128 ; return 0; }
3129 EOF
3130 if { (eval echo configure:3131: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3131   rm -rf conftest*
3132   ac_cv_cygwin=yes
3133 else
3134   echo "configure: failed program was:" >&5
3135   cat conftest.$ac_ext >&5
3136   rm -rf conftest*
3137   ac_cv_cygwin=no
3138 fi
3139 rm -f conftest*
3140 fi
3141
3142 echo "$ac_t""$ac_cv_cygwin" 1>&6
3143 CYGWIN=
3144 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3145 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3146 echo "configure:3147: checking for mingw32 environment" >&5
3147 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3148   echo $ac_n "(cached) $ac_c" 1>&6
3149 else
3150   cat > conftest.$ac_ext <<EOF
3151 #line 3152 "configure"
3152 #include "confdefs.h"
3153
3154 int main() {
3155 return __MINGW32__;
3156 ; return 0; }
3157 EOF
3158 if { (eval echo configure:3159: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3159   rm -rf conftest*
3160   ac_cv_mingw32=yes
3161 else
3162   echo "configure: failed program was:" >&5
3163   cat conftest.$ac_ext >&5
3164   rm -rf conftest*
3165   ac_cv_mingw32=no
3166 fi
3167 rm -f conftest*
3168 fi
3169
3170 echo "$ac_t""$ac_cv_mingw32" 1>&6
3171 MINGW32=
3172 test "$ac_cv_mingw32" = yes && MINGW32=yes
3173 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3174 echo "configure:3175: checking for EMX OS/2 environment" >&5
3175 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3176   echo $ac_n "(cached) $ac_c" 1>&6
3177 else
3178   cat > conftest.$ac_ext <<EOF
3179 #line 3180 "configure"
3180 #include "confdefs.h"
3181
3182 int main() {
3183 return __EMX__;
3184 ; return 0; }
3185 EOF
3186 if { (eval echo configure:3187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3187   rm -rf conftest*
3188   ac_cv_emxos2=yes
3189 else
3190   echo "configure: failed program was:" >&5
3191   cat conftest.$ac_ext >&5
3192   rm -rf conftest*
3193   ac_cv_emxos2=no
3194 fi
3195 rm -f conftest*
3196 fi
3197
3198 echo "$ac_t""$ac_cv_emxos2" 1>&6
3199 EMXOS2=
3200 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3201 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3202 echo "configure:3203: checking how to run the C preprocessor" >&5
3203 # On Suns, sometimes $CPP names a directory.
3204 if test -n "$CPP" && test -d "$CPP"; then
3205   CPP=
3206 fi
3207 if test -z "$CPP"; then
3208 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3209   echo $ac_n "(cached) $ac_c" 1>&6
3210 else
3211     # This must be in double quotes, not single quotes, because CPP may get
3212   # substituted into the Makefile and "${CC-cc}" will confuse make.
3213   CPP="${CC-cc} -E"
3214   # On the NeXT, cc -E runs the code through the compiler's parser,
3215   # not just through cpp.
3216   cat > conftest.$ac_ext <<EOF
3217 #line 3218 "configure"
3218 #include "confdefs.h"
3219 #include <assert.h>
3220 Syntax Error
3221 EOF
3222 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3223 { (eval echo configure:3224: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3224 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3225 if test -z "$ac_err"; then
3226   :
3227 else
3228   echo "$ac_err" >&5
3229   echo "configure: failed program was:" >&5
3230   cat conftest.$ac_ext >&5
3231   rm -rf conftest*
3232   CPP="${CC-cc} -E -traditional-cpp"
3233   cat > conftest.$ac_ext <<EOF
3234 #line 3235 "configure"
3235 #include "confdefs.h"
3236 #include <assert.h>
3237 Syntax Error
3238 EOF
3239 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3240 { (eval echo configure:3241: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3241 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3242 if test -z "$ac_err"; then
3243   :
3244 else
3245   echo "$ac_err" >&5
3246   echo "configure: failed program was:" >&5
3247   cat conftest.$ac_ext >&5
3248   rm -rf conftest*
3249   CPP="${CC-cc} -nologo -E"
3250   cat > conftest.$ac_ext <<EOF
3251 #line 3252 "configure"
3252 #include "confdefs.h"
3253 #include <assert.h>
3254 Syntax Error
3255 EOF
3256 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3257 { (eval echo configure:3258: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3258 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3259 if test -z "$ac_err"; then
3260   :
3261 else
3262   echo "$ac_err" >&5
3263   echo "configure: failed program was:" >&5
3264   cat conftest.$ac_ext >&5
3265   rm -rf conftest*
3266   CPP=/lib/cpp
3267 fi
3268 rm -f conftest*
3269 fi
3270 rm -f conftest*
3271 fi
3272 rm -f conftest*
3273   ac_cv_prog_CPP="$CPP"
3274 fi
3275   CPP="$ac_cv_prog_CPP"
3276 else
3277   ac_cv_prog_CPP="$CPP"
3278 fi
3279 echo "$ac_t""$CPP" 1>&6
3280
3281 # Check whether --enable-fast-install or --disable-fast-install was given.
3282 if test "${enable_fast_install+set}" = set; then
3283   enableval="$enable_fast_install"
3284   p=${PACKAGE-default}
3285 case $enableval in
3286 yes) enable_fast_install=yes ;;
3287 no) enable_fast_install=no ;;
3288 *)
3289   enable_fast_install=no
3290   # Look at the argument we got.  We use all the common list separators.
3291   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3292   for pkg in $enableval; do
3293     if test "X$pkg" = "X$p"; then
3294       enable_fast_install=yes
3295     fi
3296   done
3297   IFS="$ac_save_ifs"
3298   ;;
3299 esac
3300 else
3301   enable_fast_install=yes
3302 fi
3303
3304 # Extract the first word of "gcc", so it can be a program name with args.
3305 set dummy gcc; ac_word=$2
3306 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3307 echo "configure:3308: checking for $ac_word" >&5
3308 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3309   echo $ac_n "(cached) $ac_c" 1>&6
3310 else
3311   if test -n "$CC"; then
3312   ac_cv_prog_CC="$CC" # Let the user override the test.
3313 else
3314   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3315   ac_dummy="$PATH"
3316   for ac_dir in $ac_dummy; do
3317     test -z "$ac_dir" && ac_dir=.
3318     if test -f $ac_dir/$ac_word; then
3319       ac_cv_prog_CC="gcc"
3320       break
3321     fi
3322   done
3323   IFS="$ac_save_ifs"
3324 fi
3325 fi
3326 CC="$ac_cv_prog_CC"
3327 if test -n "$CC"; then
3328   echo "$ac_t""$CC" 1>&6
3329 else
3330   echo "$ac_t""no" 1>&6
3331 fi
3332
3333 if test -z "$CC"; then
3334   # Extract the first word of "cc", so it can be a program name with args.
3335 set dummy cc; ac_word=$2
3336 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3337 echo "configure:3338: checking for $ac_word" >&5
3338 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3339   echo $ac_n "(cached) $ac_c" 1>&6
3340 else
3341   if test -n "$CC"; then
3342   ac_cv_prog_CC="$CC" # Let the user override the test.
3343 else
3344   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3345   ac_prog_rejected=no
3346   ac_dummy="$PATH"
3347   for ac_dir in $ac_dummy; do
3348     test -z "$ac_dir" && ac_dir=.
3349     if test -f $ac_dir/$ac_word; then
3350       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3351         ac_prog_rejected=yes
3352         continue
3353       fi
3354       ac_cv_prog_CC="cc"
3355       break
3356     fi
3357   done
3358   IFS="$ac_save_ifs"
3359 if test $ac_prog_rejected = yes; then
3360   # We found a bogon in the path, so make sure we never use it.
3361   set dummy $ac_cv_prog_CC
3362   shift
3363   if test $# -gt 0; then
3364     # We chose a different compiler from the bogus one.
3365     # However, it has the same basename, so the bogon will be chosen
3366     # first if we set CC to just the basename; use the full file name.
3367     shift
3368     set dummy "$ac_dir/$ac_word" "$@"
3369     shift
3370     ac_cv_prog_CC="$@"
3371   fi
3372 fi
3373 fi
3374 fi
3375 CC="$ac_cv_prog_CC"
3376 if test -n "$CC"; then
3377   echo "$ac_t""$CC" 1>&6
3378 else
3379   echo "$ac_t""no" 1>&6
3380 fi
3381
3382   if test -z "$CC"; then
3383     case "`uname -s`" in
3384     *win32* | *WIN32* | *CYGWIN*)
3385       # Extract the first word of "cl", so it can be a program name with args.
3386 set dummy cl; ac_word=$2
3387 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3388 echo "configure:3389: checking for $ac_word" >&5
3389 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3390   echo $ac_n "(cached) $ac_c" 1>&6
3391 else
3392   if test -n "$CC"; then
3393   ac_cv_prog_CC="$CC" # Let the user override the test.
3394 else
3395   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3396   ac_dummy="$PATH"
3397   for ac_dir in $ac_dummy; do
3398     test -z "$ac_dir" && ac_dir=.
3399     if test -f $ac_dir/$ac_word; then
3400       ac_cv_prog_CC="cl"
3401       break
3402     fi
3403   done
3404   IFS="$ac_save_ifs"
3405 fi
3406 fi
3407 CC="$ac_cv_prog_CC"
3408 if test -n "$CC"; then
3409   echo "$ac_t""$CC" 1>&6
3410 else
3411   echo "$ac_t""no" 1>&6
3412 fi
3413  ;;
3414     esac
3415   fi
3416   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3417 fi
3418
3419 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3420 echo "configure:3421: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3421
3422 ac_ext=c
3423 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3424 ac_cpp='$CPP $CPPFLAGS'
3425 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3426 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3427 cross_compiling=$ac_cv_prog_cc_cross
3428
3429 cat > conftest.$ac_ext << EOF
3430
3431 #line 3432 "configure"
3432 #include "confdefs.h"
3433
3434 main(){return(0);}
3435 EOF
3436 if { (eval echo configure:3437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3437   ac_cv_prog_cc_works=yes
3438   # If we can't run a trivial program, we are probably using a cross compiler.
3439   if (./conftest; exit) 2>/dev/null; then
3440     ac_cv_prog_cc_cross=no
3441   else
3442     ac_cv_prog_cc_cross=yes
3443   fi
3444 else
3445   echo "configure: failed program was:" >&5
3446   cat conftest.$ac_ext >&5
3447   ac_cv_prog_cc_works=no
3448 fi
3449 rm -fr conftest*
3450 ac_ext=c
3451 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3452 ac_cpp='$CPP $CPPFLAGS'
3453 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3454 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3455 cross_compiling=$ac_cv_prog_cc_cross
3456
3457 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3458 if test $ac_cv_prog_cc_works = no; then
3459   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3460 fi
3461 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3462 echo "configure:3463: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3463 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3464 cross_compiling=$ac_cv_prog_cc_cross
3465
3466 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3467 echo "configure:3468: checking whether we are using GNU C" >&5
3468 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3469   echo $ac_n "(cached) $ac_c" 1>&6
3470 else
3471   cat > conftest.c <<EOF
3472 #ifdef __GNUC__
3473   yes;
3474 #endif
3475 EOF
3476 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3477: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3477   ac_cv_prog_gcc=yes
3478 else
3479   ac_cv_prog_gcc=no
3480 fi
3481 fi
3482
3483 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3484
3485 if test $ac_cv_prog_gcc = yes; then
3486   GCC=yes
3487 else
3488   GCC=
3489 fi
3490
3491 ac_test_CFLAGS="${CFLAGS+set}"
3492 ac_save_CFLAGS="$CFLAGS"
3493 CFLAGS=
3494 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3495 echo "configure:3496: checking whether ${CC-cc} accepts -g" >&5
3496 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3497   echo $ac_n "(cached) $ac_c" 1>&6
3498 else
3499   echo 'void f(){}' > conftest.c
3500 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3501   ac_cv_prog_cc_g=yes
3502 else
3503   ac_cv_prog_cc_g=no
3504 fi
3505 rm -f conftest*
3506
3507 fi
3508
3509 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3510 if test "$ac_test_CFLAGS" = set; then
3511   CFLAGS="$ac_save_CFLAGS"
3512 elif test $ac_cv_prog_cc_g = yes; then
3513   if test "$GCC" = yes; then
3514     CFLAGS="-g -O2"
3515   else
3516     CFLAGS="-g"
3517   fi
3518 else
3519   if test "$GCC" = yes; then
3520     CFLAGS="-O2"
3521   else
3522     CFLAGS=
3523   fi
3524 fi
3525
3526 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3527 if test "${with_gnu_ld+set}" = set; then
3528   withval="$with_gnu_ld"
3529   test "$withval" = no || with_gnu_ld=yes
3530 else
3531   with_gnu_ld=no
3532 fi
3533
3534 ac_prog=ld
3535 if test "$GCC" = yes; then
3536   # Check if gcc -print-prog-name=ld gives a path.
3537   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3538 echo "configure:3539: checking for ld used by GCC" >&5
3539   case $host in
3540   *-*-mingw*)
3541     # gcc leaves a trailing carriage return which upsets mingw
3542     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3543   *)
3544     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3545   esac
3546   case $ac_prog in
3547     # Accept absolute paths.
3548     [\\/]* | [A-Za-z]:[\\/]*)
3549       re_direlt='/[^/][^/]*/\.\./'
3550       # Canonicalize the path of ld
3551       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3552       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3553         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3554       done
3555       test -z "$LD" && LD="$ac_prog"
3556       ;;
3557   "")
3558     # If it fails, then pretend we aren't using GCC.
3559     ac_prog=ld
3560     ;;
3561   *)
3562     # If it is relative, then search for the first ld in PATH.
3563     with_gnu_ld=unknown
3564     ;;
3565   esac
3566 elif test "$with_gnu_ld" = yes; then
3567   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3568 echo "configure:3569: checking for GNU ld" >&5
3569 else
3570   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3571 echo "configure:3572: checking for non-GNU ld" >&5
3572 fi
3573 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3574   echo $ac_n "(cached) $ac_c" 1>&6
3575 else
3576   if test -z "$LD"; then
3577   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3578   for ac_dir in $PATH; do
3579     test -z "$ac_dir" && ac_dir=.
3580     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3581       lt_cv_path_LD="$ac_dir/$ac_prog"
3582       # Check to see if the program is GNU ld.  I'd rather use --version,
3583       # but apparently some GNU ld's only accept -v.
3584       # Break only if it was the GNU/non-GNU ld that we prefer.
3585       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3586         test "$with_gnu_ld" != no && break
3587       else
3588         test "$with_gnu_ld" != yes && break
3589       fi
3590     fi
3591   done
3592   IFS="$ac_save_ifs"
3593 else
3594   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3595 fi
3596 fi
3597
3598 LD="$lt_cv_path_LD"
3599 if test -n "$LD"; then
3600   echo "$ac_t""$LD" 1>&6
3601 else
3602   echo "$ac_t""no" 1>&6
3603 fi
3604 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3605 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3606 echo "configure:3607: checking if the linker ($LD) is GNU ld" >&5
3607 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3608   echo $ac_n "(cached) $ac_c" 1>&6
3609 else
3610   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3611 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3612   lt_cv_prog_gnu_ld=yes
3613 else
3614   lt_cv_prog_gnu_ld=no
3615 fi
3616 fi
3617
3618 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3619 with_gnu_ld=$lt_cv_prog_gnu_ld
3620
3621
3622 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3623 echo "configure:3624: checking for $LD option to reload object files" >&5
3624 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3625   echo $ac_n "(cached) $ac_c" 1>&6
3626 else
3627   lt_cv_ld_reload_flag='-r'
3628 fi
3629
3630 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3631 reload_flag=$lt_cv_ld_reload_flag
3632 test -n "$reload_flag" && reload_flag=" $reload_flag"
3633
3634 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3635 echo "configure:3636: checking for BSD-compatible nm" >&5
3636 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3637   echo $ac_n "(cached) $ac_c" 1>&6
3638 else
3639   if test -n "$NM"; then
3640   # Let the user override the test.
3641   lt_cv_path_NM="$NM"
3642 else
3643   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3644   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3645     test -z "$ac_dir" && ac_dir=.
3646     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3647     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3648       # Check to see if the nm accepts a BSD-compat flag.
3649       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3650       #   nm: unknown option "B" ignored
3651       # Tru64's nm complains that /dev/null is an invalid object file
3652       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3653         lt_cv_path_NM="$tmp_nm -B"
3654         break
3655       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3656         lt_cv_path_NM="$tmp_nm -p"
3657         break
3658       else
3659         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3660         continue # so that we can try to find one that supports BSD flags
3661       fi
3662     fi
3663   done
3664   IFS="$ac_save_ifs"
3665   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3666 fi
3667 fi
3668
3669 NM="$lt_cv_path_NM"
3670 echo "$ac_t""$NM" 1>&6
3671
3672 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3673 echo "configure:3674: checking whether ln -s works" >&5
3674 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3675   echo $ac_n "(cached) $ac_c" 1>&6
3676 else
3677   rm -f conftestdata
3678 if ln -s X conftestdata 2>/dev/null
3679 then
3680   rm -f conftestdata
3681   ac_cv_prog_LN_S="ln -s"
3682 else
3683   ac_cv_prog_LN_S=ln
3684 fi
3685 fi
3686 LN_S="$ac_cv_prog_LN_S"
3687 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3688   echo "$ac_t""yes" 1>&6
3689 else
3690   echo "$ac_t""no" 1>&6
3691 fi
3692
3693 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3694 echo "configure:3695: checking how to recognise dependant libraries" >&5
3695 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3696   echo $ac_n "(cached) $ac_c" 1>&6
3697 else
3698   lt_cv_file_magic_cmd='$MAGIC_CMD'
3699 lt_cv_file_magic_test_file=
3700 lt_cv_deplibs_check_method='unknown'
3701 # Need to set the preceding variable on all platforms that support
3702 # interlibrary dependencies.
3703 # 'none' -- dependencies not supported.
3704 # `unknown' -- same as none, but documents that we really don't know.
3705 # 'pass_all' -- all dependencies passed with no checks.
3706 # 'test_compile' -- check by making test program.
3707 # 'file_magic [[regex]]' -- check by looking for files in library path
3708 # which responds to the $file_magic_cmd with a given egrep regex.
3709 # If you have `file' or equivalent on your system and you're not sure
3710 # whether `pass_all' will *always* work, you probably want this one.
3711
3712 case $host_os in
3713 aix4* | aix5*)
3714   lt_cv_deplibs_check_method=pass_all
3715   ;;
3716
3717 beos*)
3718   lt_cv_deplibs_check_method=pass_all
3719   ;;
3720
3721 bsdi4*)
3722   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3723   lt_cv_file_magic_cmd='/usr/bin/file -L'
3724   lt_cv_file_magic_test_file=/shlib/libc.so
3725   ;;
3726
3727 cygwin* | mingw* | pw32*)
3728   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3729   lt_cv_file_magic_cmd='$OBJDUMP -f'
3730   ;;
3731
3732 darwin* | rhapsody*)
3733   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3734   lt_cv_file_magic_cmd='/usr/bin/file -L'
3735   case "$host_os" in
3736   rhapsody* | darwin1.[012])
3737     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3738     ;;
3739   *) # Darwin 1.3 on
3740     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3741     ;;
3742   esac
3743   ;;
3744
3745 freebsd*)
3746   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3747     case $host_cpu in
3748     i*86 )
3749       # Not sure whether the presence of OpenBSD here was a mistake.
3750       # Let's accept both of them until this is cleared up.
3751       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3752       lt_cv_file_magic_cmd=/usr/bin/file
3753       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3754       ;;
3755     esac
3756   else
3757     lt_cv_deplibs_check_method=pass_all
3758   fi
3759   ;;
3760
3761 gnu*)
3762   lt_cv_deplibs_check_method=pass_all
3763   ;;
3764
3765 hpux10.20*|hpux11*)
3766   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3767   lt_cv_file_magic_cmd=/usr/bin/file
3768   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3769   ;;
3770
3771 irix5* | irix6*)
3772   case $host_os in
3773   irix5*)
3774     # this will be overridden with pass_all, but let us keep it just in case
3775     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3776     ;;
3777   *)
3778     case $LD in
3779     *-32|*"-32 ") libmagic=32-bit;;
3780     *-n32|*"-n32 ") libmagic=N32;;
3781     *-64|*"-64 ") libmagic=64-bit;;
3782     *) libmagic=never-match;;
3783     esac
3784     # this will be overridden with pass_all, but let us keep it just in case
3785     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3786     ;;
3787   esac
3788   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3789   lt_cv_deplibs_check_method=pass_all
3790   ;;
3791
3792 # This must be Linux ELF.
3793 linux-gnu*)
3794   case $host_cpu in
3795   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3796     lt_cv_deplibs_check_method=pass_all ;;
3797   *)
3798     # glibc up to 2.1.1 does not perform some relocations on ARM
3799     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3800   esac
3801   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3802   ;;
3803
3804 netbsd*)
3805   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3806     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3807   else
3808     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3809   fi
3810   ;;
3811
3812 newos6*)
3813   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3814   lt_cv_file_magic_cmd=/usr/bin/file
3815   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3816   ;;
3817
3818 openbsd*)
3819   lt_cv_file_magic_cmd=/usr/bin/file
3820   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3821   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3822     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3823   else
3824     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3825   fi
3826   ;;
3827
3828 osf3* | osf4* | osf5*)
3829   # this will be overridden with pass_all, but let us keep it just in case
3830   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3831   lt_cv_file_magic_test_file=/shlib/libc.so
3832   lt_cv_deplibs_check_method=pass_all
3833   ;;
3834
3835 sco3.2v5*)
3836   lt_cv_deplibs_check_method=pass_all
3837   ;;
3838
3839 solaris*)
3840   lt_cv_deplibs_check_method=pass_all
3841   lt_cv_file_magic_test_file=/lib/libc.so
3842   ;;
3843
3844 sysv5uw[78]* | sysv4*uw2*)
3845   lt_cv_deplibs_check_method=pass_all
3846   ;;
3847
3848 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3849   case $host_vendor in
3850   motorola)
3851     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]'
3852     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3853     ;;
3854   ncr)
3855     lt_cv_deplibs_check_method=pass_all
3856     ;;
3857   sequent)
3858     lt_cv_file_magic_cmd='/bin/file'
3859     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3860     ;;
3861   sni)
3862     lt_cv_file_magic_cmd='/bin/file'
3863     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3864     lt_cv_file_magic_test_file=/lib/libc.so
3865     ;;
3866   esac
3867   ;;
3868 esac
3869
3870 fi
3871
3872 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3873 file_magic_cmd=$lt_cv_file_magic_cmd
3874 deplibs_check_method=$lt_cv_deplibs_check_method
3875
3876 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3877 echo "configure:3878: checking for object suffix" >&5
3878 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3879   echo $ac_n "(cached) $ac_c" 1>&6
3880 else
3881   rm -f conftest*
3882 echo 'int i = 1;' > conftest.$ac_ext
3883 if { (eval echo configure:3884: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3884   for ac_file in conftest.*; do
3885     case $ac_file in
3886     *.c) ;;
3887     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3888     esac
3889   done
3890 else
3891   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3892 fi
3893 rm -f conftest*
3894 fi
3895
3896 echo "$ac_t""$ac_cv_objext" 1>&6
3897 OBJEXT=$ac_cv_objext
3898 ac_objext=$ac_cv_objext
3899
3900
3901
3902
3903 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3904 echo "configure:3905: checking for executable suffix" >&5
3905 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3906   echo $ac_n "(cached) $ac_c" 1>&6
3907 else
3908   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3909   ac_cv_exeext=.exe
3910 else
3911   rm -f conftest*
3912   echo 'int main () { return 0; }' > conftest.$ac_ext
3913   ac_cv_exeext=
3914   if { (eval echo configure:3915: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3915     for file in conftest.*; do
3916       case $file in
3917       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3918       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3919       esac
3920     done
3921   else
3922     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3923   fi
3924   rm -f conftest*
3925   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3926 fi
3927 fi
3928
3929 EXEEXT=""
3930 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3931 echo "$ac_t""${ac_cv_exeext}" 1>&6
3932 ac_exeext=$EXEEXT
3933
3934 if test $host != $build; then
3935   ac_tool_prefix=${host_alias}-
3936 else
3937   ac_tool_prefix=
3938 fi
3939
3940
3941
3942
3943 # Check for command to grab the raw symbol name followed by C symbol from nm.
3944 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3945 echo "configure:3946: checking command to parse $NM output" >&5
3946 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3947   echo $ac_n "(cached) $ac_c" 1>&6
3948 else
3949   
3950 # These are sane defaults that work on at least a few old systems.
3951 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3952
3953 # Character class describing NM global symbol codes.
3954 symcode='[BCDEGRST]'
3955
3956 # Regexp to match symbols that can be accessed directly from C.
3957 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3958
3959 # Transform the above into a raw symbol and a C symbol.
3960 symxfrm='\1 \2\3 \3'
3961
3962 # Transform an extracted symbol line into a proper C declaration
3963 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3964
3965 # Transform an extracted symbol line into symbol name and symbol address
3966 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'"
3967
3968 # Define system-specific variables.
3969 case $host_os in
3970 aix*)
3971   symcode='[BCDT]'
3972   ;;
3973 cygwin* | mingw* | pw32*)
3974   symcode='[ABCDGISTW]'
3975   ;;
3976 hpux*) # Its linker distinguishes data from code symbols
3977   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3978   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'"
3979   ;;
3980 irix*)
3981   symcode='[BCDEGRST]'
3982   ;;
3983 solaris* | sysv5*)
3984   symcode='[BDT]'
3985   ;;
3986 sysv4)
3987   symcode='[DFNSTU]'
3988   ;;
3989 esac
3990
3991 # Handle CRLF in mingw tool chain
3992 opt_cr=
3993 case $host_os in
3994 mingw*)
3995   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3996   ;;
3997 esac
3998
3999 # If we're using GNU nm, then use its standard symbol codes.
4000 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4001   symcode='[ABCDGISTW]'
4002 fi
4003
4004 # Try without a prefix undercore, then with it.
4005 for ac_symprfx in "" "_"; do
4006
4007   # Write the raw and C identifiers.
4008 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4009
4010   # Check to see that the pipe works correctly.
4011   pipe_works=no
4012   rm -f conftest*
4013   cat > conftest.$ac_ext <<EOF
4014 #ifdef __cplusplus
4015 extern "C" {
4016 #endif
4017 char nm_test_var;
4018 void nm_test_func(){}
4019 #ifdef __cplusplus
4020 }
4021 #endif
4022 int main(){nm_test_var='a';nm_test_func();return(0);}
4023 EOF
4024
4025   if { (eval echo configure:4026: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4026     # Now try to grab the symbols.
4027     nlist=conftest.nm
4028     if { (eval echo configure:4029: \"$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
4029       # Try sorting and uniquifying the output.
4030       if sort "$nlist" | uniq > "$nlist"T; then
4031         mv -f "$nlist"T "$nlist"
4032       else
4033         rm -f "$nlist"T
4034       fi
4035
4036       # Make sure that we snagged all the symbols we need.
4037       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4038         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4039           cat <<EOF > conftest.$ac_ext
4040 #ifdef __cplusplus
4041 extern "C" {
4042 #endif
4043
4044 EOF
4045           # Now generate the symbol file.
4046           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4047
4048           cat <<EOF >> conftest.$ac_ext
4049 #if defined (__STDC__) && __STDC__
4050 # define lt_ptr void *
4051 #else
4052 # define lt_ptr char *
4053 # define const
4054 #endif
4055
4056 /* The mapping between symbol names and symbols. */
4057 const struct {
4058   const char *name;
4059   lt_ptr address;
4060 }
4061 lt_preloaded_symbols[] =
4062 {
4063 EOF
4064           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4065           cat <<\EOF >> conftest.$ac_ext
4066   {0, (lt_ptr) 0}
4067 };
4068
4069 #ifdef __cplusplus
4070 }
4071 #endif
4072 EOF
4073           # Now try linking the two files.
4074           mv conftest.$ac_objext conftstm.$ac_objext
4075           save_LIBS="$LIBS"
4076           save_CFLAGS="$CFLAGS"
4077           LIBS="conftstm.$ac_objext"
4078           CFLAGS="$CFLAGS$no_builtin_flag"
4079           if { (eval echo configure:4080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4080             pipe_works=yes
4081           fi
4082           LIBS="$save_LIBS"
4083           CFLAGS="$save_CFLAGS"
4084         else
4085           echo "cannot find nm_test_func in $nlist" >&5
4086         fi
4087       else
4088         echo "cannot find nm_test_var in $nlist" >&5
4089       fi
4090     else
4091       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4092     fi
4093   else
4094     echo "$progname: failed program was:" >&5
4095     cat conftest.$ac_ext >&5
4096   fi
4097   rm -f conftest* conftst*
4098
4099   # Do not use the global_symbol_pipe unless it works.
4100   if test "$pipe_works" = yes; then
4101     break
4102   else
4103     lt_cv_sys_global_symbol_pipe=
4104   fi
4105 done
4106
4107 fi
4108
4109 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4110 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4111   global_symbol_to_cdecl=
4112   global_symbol_to_c_name_address=
4113 else
4114   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4115   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4116 fi
4117 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4118 then
4119   echo "$ac_t""failed" 1>&6
4120 else
4121   echo "$ac_t""ok" 1>&6
4122 fi
4123
4124 for ac_hdr in dlfcn.h
4125 do
4126 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4127 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4128 echo "configure:4129: checking for $ac_hdr" >&5
4129 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4130   echo $ac_n "(cached) $ac_c" 1>&6
4131 else
4132   cat > conftest.$ac_ext <<EOF
4133 #line 4134 "configure"
4134 #include "confdefs.h"
4135 #include <$ac_hdr>
4136 EOF
4137 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4138 { (eval echo configure:4139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4139 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4140 if test -z "$ac_err"; then
4141   rm -rf conftest*
4142   eval "ac_cv_header_$ac_safe=yes"
4143 else
4144   echo "$ac_err" >&5
4145   echo "configure: failed program was:" >&5
4146   cat conftest.$ac_ext >&5
4147   rm -rf conftest*
4148   eval "ac_cv_header_$ac_safe=no"
4149 fi
4150 rm -f conftest*
4151 fi
4152 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4153   echo "$ac_t""yes" 1>&6
4154     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4155   cat >> confdefs.h <<EOF
4156 #define $ac_tr_hdr 1
4157 EOF
4158  
4159 else
4160   echo "$ac_t""no" 1>&6
4161 fi
4162 done
4163
4164
4165
4166
4167
4168 # Only perform the check for file, if the check method requires it
4169 case $deplibs_check_method in
4170 file_magic*)
4171   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4172     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4173 echo "configure:4174: checking for ${ac_tool_prefix}file" >&5
4174 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4175   echo $ac_n "(cached) $ac_c" 1>&6
4176 else
4177   case $MAGIC_CMD in
4178   /*)
4179   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4180   ;;
4181   ?:/*)
4182   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4183   ;;
4184   *)
4185   ac_save_MAGIC_CMD="$MAGIC_CMD"
4186   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4187   ac_dummy="/usr/bin:$PATH"
4188   for ac_dir in $ac_dummy; do
4189     test -z "$ac_dir" && ac_dir=.
4190     if test -f $ac_dir/${ac_tool_prefix}file; then
4191       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4192       if test -n "$file_magic_test_file"; then
4193         case $deplibs_check_method in
4194         "file_magic "*)
4195           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4196           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4197           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4198             egrep "$file_magic_regex" > /dev/null; then
4199             :
4200           else
4201             cat <<EOF 1>&2
4202
4203 *** Warning: the command libtool uses to detect shared libraries,
4204 *** $file_magic_cmd, produces output that libtool cannot recognize.
4205 *** The result is that libtool may fail to recognize shared libraries
4206 *** as such.  This will affect the creation of libtool libraries that
4207 *** depend on shared libraries, but programs linked with such libtool
4208 *** libraries will work regardless of this problem.  Nevertheless, you
4209 *** may want to report the problem to your system manager and/or to
4210 *** bug-libtool@gnu.org
4211
4212 EOF
4213           fi ;;
4214         esac
4215       fi
4216       break
4217     fi
4218   done
4219   IFS="$ac_save_ifs"
4220   MAGIC_CMD="$ac_save_MAGIC_CMD"
4221   ;;
4222 esac
4223 fi
4224
4225 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4226 if test -n "$MAGIC_CMD"; then
4227   echo "$ac_t""$MAGIC_CMD" 1>&6
4228 else
4229   echo "$ac_t""no" 1>&6
4230 fi
4231
4232 if test -z "$lt_cv_path_MAGIC_CMD"; then
4233   if test -n "$ac_tool_prefix"; then
4234     echo $ac_n "checking for file""... $ac_c" 1>&6
4235 echo "configure:4236: checking for file" >&5
4236 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4237   echo $ac_n "(cached) $ac_c" 1>&6
4238 else
4239   case $MAGIC_CMD in
4240   /*)
4241   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4242   ;;
4243   ?:/*)
4244   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4245   ;;
4246   *)
4247   ac_save_MAGIC_CMD="$MAGIC_CMD"
4248   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4249   ac_dummy="/usr/bin:$PATH"
4250   for ac_dir in $ac_dummy; do
4251     test -z "$ac_dir" && ac_dir=.
4252     if test -f $ac_dir/file; then
4253       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4254       if test -n "$file_magic_test_file"; then
4255         case $deplibs_check_method in
4256         "file_magic "*)
4257           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4258           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4259           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4260             egrep "$file_magic_regex" > /dev/null; then
4261             :
4262           else
4263             cat <<EOF 1>&2
4264
4265 *** Warning: the command libtool uses to detect shared libraries,
4266 *** $file_magic_cmd, produces output that libtool cannot recognize.
4267 *** The result is that libtool may fail to recognize shared libraries
4268 *** as such.  This will affect the creation of libtool libraries that
4269 *** depend on shared libraries, but programs linked with such libtool
4270 *** libraries will work regardless of this problem.  Nevertheless, you
4271 *** may want to report the problem to your system manager and/or to
4272 *** bug-libtool@gnu.org
4273
4274 EOF
4275           fi ;;
4276         esac
4277       fi
4278       break
4279     fi
4280   done
4281   IFS="$ac_save_ifs"
4282   MAGIC_CMD="$ac_save_MAGIC_CMD"
4283   ;;
4284 esac
4285 fi
4286
4287 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4288 if test -n "$MAGIC_CMD"; then
4289   echo "$ac_t""$MAGIC_CMD" 1>&6
4290 else
4291   echo "$ac_t""no" 1>&6
4292 fi
4293
4294   else
4295     MAGIC_CMD=:
4296   fi
4297 fi
4298
4299   fi
4300   ;;
4301 esac
4302
4303 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4304 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4305 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4306 echo "configure:4307: checking for $ac_word" >&5
4307 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4308   echo $ac_n "(cached) $ac_c" 1>&6
4309 else
4310   if test -n "$RANLIB"; then
4311   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4312 else
4313   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4314   ac_dummy="$PATH"
4315   for ac_dir in $ac_dummy; do
4316     test -z "$ac_dir" && ac_dir=.
4317     if test -f $ac_dir/$ac_word; then
4318       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4319       break
4320     fi
4321   done
4322   IFS="$ac_save_ifs"
4323 fi
4324 fi
4325 RANLIB="$ac_cv_prog_RANLIB"
4326 if test -n "$RANLIB"; then
4327   echo "$ac_t""$RANLIB" 1>&6
4328 else
4329   echo "$ac_t""no" 1>&6
4330 fi
4331
4332
4333 if test -z "$ac_cv_prog_RANLIB"; then
4334 if test -n "$ac_tool_prefix"; then
4335   # Extract the first word of "ranlib", so it can be a program name with args.
4336 set dummy ranlib; ac_word=$2
4337 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4338 echo "configure:4339: checking for $ac_word" >&5
4339 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4340   echo $ac_n "(cached) $ac_c" 1>&6
4341 else
4342   if test -n "$RANLIB"; then
4343   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4344 else
4345   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4346   ac_dummy="$PATH"
4347   for ac_dir in $ac_dummy; do
4348     test -z "$ac_dir" && ac_dir=.
4349     if test -f $ac_dir/$ac_word; then
4350       ac_cv_prog_RANLIB="ranlib"
4351       break
4352     fi
4353   done
4354   IFS="$ac_save_ifs"
4355   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4356 fi
4357 fi
4358 RANLIB="$ac_cv_prog_RANLIB"
4359 if test -n "$RANLIB"; then
4360   echo "$ac_t""$RANLIB" 1>&6
4361 else
4362   echo "$ac_t""no" 1>&6
4363 fi
4364
4365 else
4366   RANLIB=":"
4367 fi
4368 fi
4369
4370 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4371 set dummy ${ac_tool_prefix}strip; ac_word=$2
4372 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4373 echo "configure:4374: checking for $ac_word" >&5
4374 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4375   echo $ac_n "(cached) $ac_c" 1>&6
4376 else
4377   if test -n "$STRIP"; then
4378   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4379 else
4380   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4381   ac_dummy="$PATH"
4382   for ac_dir in $ac_dummy; do
4383     test -z "$ac_dir" && ac_dir=.
4384     if test -f $ac_dir/$ac_word; then
4385       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4386       break
4387     fi
4388   done
4389   IFS="$ac_save_ifs"
4390 fi
4391 fi
4392 STRIP="$ac_cv_prog_STRIP"
4393 if test -n "$STRIP"; then
4394   echo "$ac_t""$STRIP" 1>&6
4395 else
4396   echo "$ac_t""no" 1>&6
4397 fi
4398
4399
4400 if test -z "$ac_cv_prog_STRIP"; then
4401 if test -n "$ac_tool_prefix"; then
4402   # Extract the first word of "strip", so it can be a program name with args.
4403 set dummy strip; ac_word=$2
4404 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4405 echo "configure:4406: checking for $ac_word" >&5
4406 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4407   echo $ac_n "(cached) $ac_c" 1>&6
4408 else
4409   if test -n "$STRIP"; then
4410   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4411 else
4412   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4413   ac_dummy="$PATH"
4414   for ac_dir in $ac_dummy; do
4415     test -z "$ac_dir" && ac_dir=.
4416     if test -f $ac_dir/$ac_word; then
4417       ac_cv_prog_STRIP="strip"
4418       break
4419     fi
4420   done
4421   IFS="$ac_save_ifs"
4422   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4423 fi
4424 fi
4425 STRIP="$ac_cv_prog_STRIP"
4426 if test -n "$STRIP"; then
4427   echo "$ac_t""$STRIP" 1>&6
4428 else
4429   echo "$ac_t""no" 1>&6
4430 fi
4431
4432 else
4433   STRIP=":"
4434 fi
4435 fi
4436
4437
4438 enable_dlopen=yes
4439 enable_win32_dll=yes
4440
4441 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4442 if test "${enable_libtool_lock+set}" = set; then
4443   enableval="$enable_libtool_lock"
4444   :
4445 fi
4446
4447 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4448
4449 # Some flags need to be propagated to the compiler or linker for good
4450 # libtool support.
4451 case $host in
4452 *-*-irix6*)
4453   # Find out which ABI we are using.
4454   echo '#line 4455 "configure"' > conftest.$ac_ext
4455   if { (eval echo configure:4456: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4456     case `/usr/bin/file conftest.$ac_objext` in
4457     *32-bit*)
4458       LD="${LD-ld} -32"
4459       ;;
4460     *N32*)
4461       LD="${LD-ld} -n32"
4462       ;;
4463     *64-bit*)
4464       LD="${LD-ld} -64"
4465       ;;
4466     esac
4467   fi
4468   rm -rf conftest*
4469   ;;
4470
4471 *-*-sco3.2v5*)
4472   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4473   SAVE_CFLAGS="$CFLAGS"
4474   CFLAGS="$CFLAGS -belf"
4475   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4476 echo "configure:4477: checking whether the C compiler needs -belf" >&5
4477 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4478   echo $ac_n "(cached) $ac_c" 1>&6
4479 else
4480   
4481      ac_ext=c
4482 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4483 ac_cpp='$CPP $CPPFLAGS'
4484 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4485 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4486 cross_compiling=$ac_cv_prog_cc_cross
4487
4488      cat > conftest.$ac_ext <<EOF
4489 #line 4490 "configure"
4490 #include "confdefs.h"
4491
4492 int main() {
4493
4494 ; return 0; }
4495 EOF
4496 if { (eval echo configure:4497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4497   rm -rf conftest*
4498   lt_cv_cc_needs_belf=yes
4499 else
4500   echo "configure: failed program was:" >&5
4501   cat conftest.$ac_ext >&5
4502   rm -rf conftest*
4503   lt_cv_cc_needs_belf=no
4504 fi
4505 rm -f conftest*
4506      ac_ext=c
4507 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4508 ac_cpp='$CPP $CPPFLAGS'
4509 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4510 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4511 cross_compiling=$ac_cv_prog_cc_cross
4512
4513 fi
4514
4515 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4516   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4517     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4518     CFLAGS="$SAVE_CFLAGS"
4519   fi
4520   ;;
4521
4522 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4523   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4524 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4525 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4526 echo "configure:4527: checking for $ac_word" >&5
4527 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4528   echo $ac_n "(cached) $ac_c" 1>&6
4529 else
4530   if test -n "$DLLTOOL"; then
4531   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4532 else
4533   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4534   ac_dummy="$PATH"
4535   for ac_dir in $ac_dummy; do
4536     test -z "$ac_dir" && ac_dir=.
4537     if test -f $ac_dir/$ac_word; then
4538       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4539       break
4540     fi
4541   done
4542   IFS="$ac_save_ifs"
4543 fi
4544 fi
4545 DLLTOOL="$ac_cv_prog_DLLTOOL"
4546 if test -n "$DLLTOOL"; then
4547   echo "$ac_t""$DLLTOOL" 1>&6
4548 else
4549   echo "$ac_t""no" 1>&6
4550 fi
4551
4552
4553 if test -z "$ac_cv_prog_DLLTOOL"; then
4554 if test -n "$ac_tool_prefix"; then
4555   # Extract the first word of "dlltool", so it can be a program name with args.
4556 set dummy dlltool; ac_word=$2
4557 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4558 echo "configure:4559: checking for $ac_word" >&5
4559 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4560   echo $ac_n "(cached) $ac_c" 1>&6
4561 else
4562   if test -n "$DLLTOOL"; then
4563   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4564 else
4565   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4566   ac_dummy="$PATH"
4567   for ac_dir in $ac_dummy; do
4568     test -z "$ac_dir" && ac_dir=.
4569     if test -f $ac_dir/$ac_word; then
4570       ac_cv_prog_DLLTOOL="dlltool"
4571       break
4572     fi
4573   done
4574   IFS="$ac_save_ifs"
4575   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4576 fi
4577 fi
4578 DLLTOOL="$ac_cv_prog_DLLTOOL"
4579 if test -n "$DLLTOOL"; then
4580   echo "$ac_t""$DLLTOOL" 1>&6
4581 else
4582   echo "$ac_t""no" 1>&6
4583 fi
4584
4585 else
4586   DLLTOOL="false"
4587 fi
4588 fi
4589
4590   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4591 set dummy ${ac_tool_prefix}as; ac_word=$2
4592 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4593 echo "configure:4594: checking for $ac_word" >&5
4594 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4595   echo $ac_n "(cached) $ac_c" 1>&6
4596 else
4597   if test -n "$AS"; then
4598   ac_cv_prog_AS="$AS" # Let the user override the test.
4599 else
4600   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4601   ac_dummy="$PATH"
4602   for ac_dir in $ac_dummy; do
4603     test -z "$ac_dir" && ac_dir=.
4604     if test -f $ac_dir/$ac_word; then
4605       ac_cv_prog_AS="${ac_tool_prefix}as"
4606       break
4607     fi
4608   done
4609   IFS="$ac_save_ifs"
4610 fi
4611 fi
4612 AS="$ac_cv_prog_AS"
4613 if test -n "$AS"; then
4614   echo "$ac_t""$AS" 1>&6
4615 else
4616   echo "$ac_t""no" 1>&6
4617 fi
4618
4619
4620 if test -z "$ac_cv_prog_AS"; then
4621 if test -n "$ac_tool_prefix"; then
4622   # Extract the first word of "as", so it can be a program name with args.
4623 set dummy as; ac_word=$2
4624 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4625 echo "configure:4626: checking for $ac_word" >&5
4626 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4627   echo $ac_n "(cached) $ac_c" 1>&6
4628 else
4629   if test -n "$AS"; then
4630   ac_cv_prog_AS="$AS" # Let the user override the test.
4631 else
4632   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4633   ac_dummy="$PATH"
4634   for ac_dir in $ac_dummy; do
4635     test -z "$ac_dir" && ac_dir=.
4636     if test -f $ac_dir/$ac_word; then
4637       ac_cv_prog_AS="as"
4638       break
4639     fi
4640   done
4641   IFS="$ac_save_ifs"
4642   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4643 fi
4644 fi
4645 AS="$ac_cv_prog_AS"
4646 if test -n "$AS"; then
4647   echo "$ac_t""$AS" 1>&6
4648 else
4649   echo "$ac_t""no" 1>&6
4650 fi
4651
4652 else
4653   AS="false"
4654 fi
4655 fi
4656
4657   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4658 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4659 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4660 echo "configure:4661: checking for $ac_word" >&5
4661 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4662   echo $ac_n "(cached) $ac_c" 1>&6
4663 else
4664   if test -n "$OBJDUMP"; then
4665   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4666 else
4667   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4668   ac_dummy="$PATH"
4669   for ac_dir in $ac_dummy; do
4670     test -z "$ac_dir" && ac_dir=.
4671     if test -f $ac_dir/$ac_word; then
4672       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4673       break
4674     fi
4675   done
4676   IFS="$ac_save_ifs"
4677 fi
4678 fi
4679 OBJDUMP="$ac_cv_prog_OBJDUMP"
4680 if test -n "$OBJDUMP"; then
4681   echo "$ac_t""$OBJDUMP" 1>&6
4682 else
4683   echo "$ac_t""no" 1>&6
4684 fi
4685
4686
4687 if test -z "$ac_cv_prog_OBJDUMP"; then
4688 if test -n "$ac_tool_prefix"; then
4689   # Extract the first word of "objdump", so it can be a program name with args.
4690 set dummy objdump; ac_word=$2
4691 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4692 echo "configure:4693: checking for $ac_word" >&5
4693 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4694   echo $ac_n "(cached) $ac_c" 1>&6
4695 else
4696   if test -n "$OBJDUMP"; then
4697   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4698 else
4699   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4700   ac_dummy="$PATH"
4701   for ac_dir in $ac_dummy; do
4702     test -z "$ac_dir" && ac_dir=.
4703     if test -f $ac_dir/$ac_word; then
4704       ac_cv_prog_OBJDUMP="objdump"
4705       break
4706     fi
4707   done
4708   IFS="$ac_save_ifs"
4709   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4710 fi
4711 fi
4712 OBJDUMP="$ac_cv_prog_OBJDUMP"
4713 if test -n "$OBJDUMP"; then
4714   echo "$ac_t""$OBJDUMP" 1>&6
4715 else
4716   echo "$ac_t""no" 1>&6
4717 fi
4718
4719 else
4720   OBJDUMP="false"
4721 fi
4722 fi
4723
4724
4725   # recent cygwin and mingw systems supply a stub DllMain which the user
4726   # can override, but on older systems we have to supply one
4727   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4728 echo "configure:4729: checking if libtool should supply DllMain function" >&5
4729 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4730   echo $ac_n "(cached) $ac_c" 1>&6
4731 else
4732   cat > conftest.$ac_ext <<EOF
4733 #line 4734 "configure"
4734 #include "confdefs.h"
4735
4736 int main() {
4737 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4738       DllMain (0, 0, 0);
4739 ; return 0; }
4740 EOF
4741 if { (eval echo configure:4742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4742   rm -rf conftest*
4743   lt_cv_need_dllmain=no
4744 else
4745   echo "configure: failed program was:" >&5
4746   cat conftest.$ac_ext >&5
4747   rm -rf conftest*
4748   lt_cv_need_dllmain=yes
4749 fi
4750 rm -f conftest*
4751 fi
4752
4753 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4754
4755   case $host/$CC in
4756   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4757     # old mingw systems require "-dll" to link a DLL, while more recent ones
4758     # require "-mdll"
4759     SAVE_CFLAGS="$CFLAGS"
4760     CFLAGS="$CFLAGS -mdll"
4761     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4762 echo "configure:4763: checking how to link DLLs" >&5
4763 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4764   echo $ac_n "(cached) $ac_c" 1>&6
4765 else
4766   cat > conftest.$ac_ext <<EOF
4767 #line 4768 "configure"
4768 #include "confdefs.h"
4769
4770 int main() {
4771
4772 ; return 0; }
4773 EOF
4774 if { (eval echo configure:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4775   rm -rf conftest*
4776   lt_cv_cc_dll_switch=-mdll
4777 else
4778   echo "configure: failed program was:" >&5
4779   cat conftest.$ac_ext >&5
4780   rm -rf conftest*
4781   lt_cv_cc_dll_switch=-dll
4782 fi
4783 rm -f conftest*
4784 fi
4785
4786 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4787     CFLAGS="$SAVE_CFLAGS" ;;
4788   *-*-cygwin* | *-*-pw32*)
4789     # cygwin systems need to pass --dll to the linker, and not link
4790     # crt.o which will require a WinMain@16 definition.
4791     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4792   esac
4793   ;;
4794   
4795 esac
4796
4797 # Sed substitution that helps us do robust quoting.  It backslashifies
4798 # metacharacters that are still active within double-quoted strings.
4799 Xsed='sed -e s/^X//'
4800 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4801
4802 # Same as above, but do not quote variable references.
4803 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4804
4805 # Sed substitution to delay expansion of an escaped shell variable in a
4806 # double_quote_subst'ed string.
4807 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4808
4809 # Constants:
4810 rm="rm -f"
4811
4812 # Global variables:
4813 default_ofile=libtool
4814 can_build_shared=yes
4815
4816 # All known linkers require a `.a' archive for static linking (except M$VC,
4817 # which needs '.lib').
4818 libext=a
4819 ltmain="$ac_aux_dir/ltmain.sh"
4820 ofile="$default_ofile"
4821 with_gnu_ld="$lt_cv_prog_gnu_ld"
4822 need_locks="$enable_libtool_lock"
4823
4824 old_CC="$CC"
4825 old_CFLAGS="$CFLAGS"
4826
4827 # Set sane defaults for various variables
4828 test -z "$AR" && AR=ar
4829 test -z "$AR_FLAGS" && AR_FLAGS=cru
4830 test -z "$AS" && AS=as
4831 test -z "$CC" && CC=cc
4832 test -z "$DLLTOOL" && DLLTOOL=dlltool
4833 test -z "$LD" && LD=ld
4834 test -z "$LN_S" && LN_S="ln -s"
4835 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4836 test -z "$NM" && NM=nm
4837 test -z "$OBJDUMP" && OBJDUMP=objdump
4838 test -z "$RANLIB" && RANLIB=:
4839 test -z "$STRIP" && STRIP=:
4840 test -z "$ac_objext" && ac_objext=o
4841
4842 if test x"$host" != x"$build"; then
4843   ac_tool_prefix=${host_alias}-
4844 else
4845   ac_tool_prefix=
4846 fi
4847
4848 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4849 case $host_os in
4850 linux-gnu*) ;;
4851 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4852 esac
4853
4854 case $host_os in
4855 aix3*)
4856   # AIX sometimes has problems with the GCC collect2 program.  For some
4857   # reason, if we set the COLLECT_NAMES environment variable, the problems
4858   # vanish in a puff of smoke.
4859   if test "X${COLLECT_NAMES+set}" != Xset; then
4860     COLLECT_NAMES=
4861     export COLLECT_NAMES
4862   fi
4863   ;;
4864 esac
4865
4866 # Determine commands to create old-style static archives.
4867 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4868 old_postinstall_cmds='chmod 644 $oldlib'
4869 old_postuninstall_cmds=
4870
4871 if test -n "$RANLIB"; then
4872   case $host_os in
4873   openbsd*)
4874     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4875     ;;
4876   *)
4877     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4878     ;;
4879   esac
4880   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4881 fi
4882
4883 # Allow CC to be a program name with arguments.
4884 set dummy $CC
4885 compiler="$2"
4886
4887 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4888 echo "configure:4889: checking for objdir" >&5
4889 rm -f .libs 2>/dev/null
4890 mkdir .libs 2>/dev/null
4891 if test -d .libs; then
4892   objdir=.libs
4893 else
4894   # MS-DOS does not allow filenames that begin with a dot.
4895   objdir=_libs
4896 fi
4897 rmdir .libs 2>/dev/null
4898 echo "$ac_t""$objdir" 1>&6
4899
4900
4901 # Check whether --with-pic or --without-pic was given.
4902 if test "${with_pic+set}" = set; then
4903   withval="$with_pic"
4904   pic_mode="$withval"
4905 else
4906   pic_mode=default
4907 fi
4908
4909 test -z "$pic_mode" && pic_mode=default
4910
4911 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4912 # in isolation, and that seeing it set (from the cache) indicates that
4913 # the associated values are set (in the cache) correctly too.
4914 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4915 echo "configure:4916: checking for $compiler option to produce PIC" >&5
4916 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4917   echo $ac_n "(cached) $ac_c" 1>&6
4918 else
4919    lt_cv_prog_cc_pic=
4920   lt_cv_prog_cc_shlib=
4921   lt_cv_prog_cc_wl=
4922   lt_cv_prog_cc_static=
4923   lt_cv_prog_cc_no_builtin=
4924   lt_cv_prog_cc_can_build_shared=$can_build_shared
4925
4926   if test "$GCC" = yes; then
4927     lt_cv_prog_cc_wl='-Wl,'
4928     lt_cv_prog_cc_static='-static'
4929
4930     case $host_os in
4931     aix*)
4932       # Below there is a dirty hack to force normal static linking with -ldl
4933       # The problem is because libdl dynamically linked with both libc and
4934       # libC (AIX C++ library), which obviously doesn't included in libraries
4935       # list by gcc. This cause undefined symbols with -static flags.
4936       # This hack allows C programs to be linked with "-static -ldl", but
4937       # not sure about C++ programs.
4938       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4939       ;;
4940     amigaos*)
4941       # FIXME: we need at least 68020 code to build shared libraries, but
4942       # adding the `-m68020' flag to GCC prevents building anything better,
4943       # like `-m68040'.
4944       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4945       ;;
4946     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
4947       # PIC is the default for these OSes.
4948       ;;
4949     darwin* | rhapsody*)
4950       # PIC is the default on this platform
4951       # Common symbols not allowed in MH_DYLIB files
4952       lt_cv_prog_cc_pic='-fno-common'
4953       ;;
4954     cygwin* | mingw* | pw32* | os2*)
4955       # This hack is so that the source file can tell whether it is being
4956       # built for inclusion in a dll (and should export symbols for example).
4957       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4958       ;;
4959     sysv4*MP*)
4960       if test -d /usr/nec; then
4961          lt_cv_prog_cc_pic=-Kconform_pic
4962       fi
4963       ;;
4964     *)
4965       lt_cv_prog_cc_pic='-fPIC'
4966       ;;
4967     esac
4968   else
4969     # PORTME Check for PIC flags for the system compiler.
4970     case $host_os in
4971     aix3* | aix4* | aix5*)
4972       lt_cv_prog_cc_wl='-Wl,'
4973       # All AIX code is PIC.
4974       if test "$host_cpu" = ia64; then
4975         # AIX 5 now supports IA64 processor
4976         lt_cv_prog_cc_static='-Bstatic'
4977       else
4978         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4979       fi
4980       ;;
4981
4982     hpux9* | hpux10* | hpux11*)
4983       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4984       lt_cv_prog_cc_wl='-Wl,'
4985       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4986       lt_cv_prog_cc_pic='+Z'
4987       ;;
4988
4989     irix5* | irix6*)
4990       lt_cv_prog_cc_wl='-Wl,'
4991       lt_cv_prog_cc_static='-non_shared'
4992       # PIC (with -KPIC) is the default.
4993       ;;
4994
4995     cygwin* | mingw* | pw32* | os2*)
4996       # This hack is so that the source file can tell whether it is being
4997       # built for inclusion in a dll (and should export symbols for example).
4998       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4999       ;;
5000
5001     newsos6)
5002       lt_cv_prog_cc_pic='-KPIC'
5003       lt_cv_prog_cc_static='-Bstatic'
5004       ;;
5005
5006     osf3* | osf4* | osf5*)
5007       # All OSF/1 code is PIC.
5008       lt_cv_prog_cc_wl='-Wl,'
5009       lt_cv_prog_cc_static='-non_shared'
5010       ;;
5011
5012     sco3.2v5*)
5013       lt_cv_prog_cc_pic='-Kpic'
5014       lt_cv_prog_cc_static='-dn'
5015       lt_cv_prog_cc_shlib='-belf'
5016       ;;
5017
5018     solaris*)
5019       lt_cv_prog_cc_pic='-KPIC'
5020       lt_cv_prog_cc_static='-Bstatic'
5021       lt_cv_prog_cc_wl='-Wl,'
5022       ;;
5023
5024     sunos4*)
5025       lt_cv_prog_cc_pic='-PIC'
5026       lt_cv_prog_cc_static='-Bstatic'
5027       lt_cv_prog_cc_wl='-Qoption ld '
5028       ;;
5029
5030     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5031       lt_cv_prog_cc_pic='-KPIC'
5032       lt_cv_prog_cc_static='-Bstatic'
5033       if test "x$host_vendor" = xsni; then
5034         lt_cv_prog_cc_wl='-LD'
5035       else
5036         lt_cv_prog_cc_wl='-Wl,'
5037       fi
5038       ;;
5039
5040     uts4*)
5041       lt_cv_prog_cc_pic='-pic'
5042       lt_cv_prog_cc_static='-Bstatic'
5043       ;;
5044
5045     sysv4*MP*)
5046       if test -d /usr/nec ;then
5047         lt_cv_prog_cc_pic='-Kconform_pic'
5048         lt_cv_prog_cc_static='-Bstatic'
5049       fi
5050       ;;
5051
5052     *)
5053       lt_cv_prog_cc_can_build_shared=no
5054       ;;
5055     esac
5056   fi
5057
5058 fi
5059
5060 if test -z "$lt_cv_prog_cc_pic"; then
5061   echo "$ac_t""none" 1>&6
5062 else
5063   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5064
5065   # Check to make sure the pic_flag actually works.
5066   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5067 echo "configure:5068: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5068   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5069   echo $ac_n "(cached) $ac_c" 1>&6
5070 else
5071       save_CFLAGS="$CFLAGS"
5072     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5073     cat > conftest.$ac_ext <<EOF
5074 #line 5075 "configure"
5075 #include "confdefs.h"
5076
5077 int main() {
5078
5079 ; return 0; }
5080 EOF
5081 if { (eval echo configure:5082: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5082   rm -rf conftest*
5083         case $host_os in
5084       hpux9* | hpux10* | hpux11*)
5085         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5086         # they create non-PIC objects.  So, if there were any warnings, we
5087         # assume that PIC is not supported.
5088         if test -s conftest.err; then
5089           lt_cv_prog_cc_pic_works=no
5090         else
5091           lt_cv_prog_cc_pic_works=yes
5092         fi
5093         ;;
5094       *)
5095         lt_cv_prog_cc_pic_works=yes
5096         ;;
5097       esac
5098     
5099 else
5100   echo "configure: failed program was:" >&5
5101   cat conftest.$ac_ext >&5
5102   rm -rf conftest*
5103         lt_cv_prog_cc_pic_works=no
5104     
5105 fi
5106 rm -f conftest*
5107     CFLAGS="$save_CFLAGS"
5108   
5109 fi
5110
5111
5112   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5113     lt_cv_prog_cc_pic=
5114     lt_cv_prog_cc_can_build_shared=no
5115   else
5116     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5117   fi
5118
5119   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5120 fi
5121
5122 # Check for any special shared library compilation flags.
5123 if test -n "$lt_cv_prog_cc_shlib"; then
5124   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5125   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5126   else
5127    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5128     lt_cv_prog_cc_can_build_shared=no
5129   fi
5130 fi
5131
5132 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5133 echo "configure:5134: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5134 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5135   echo $ac_n "(cached) $ac_c" 1>&6
5136 else
5137     lt_cv_prog_cc_static_works=no
5138   save_LDFLAGS="$LDFLAGS"
5139   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5140   cat > conftest.$ac_ext <<EOF
5141 #line 5142 "configure"
5142 #include "confdefs.h"
5143
5144 int main() {
5145
5146 ; return 0; }
5147 EOF
5148 if { (eval echo configure:5149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5149   rm -rf conftest*
5150   lt_cv_prog_cc_static_works=yes
5151 else
5152   echo "configure: failed program was:" >&5
5153   cat conftest.$ac_ext >&5
5154 fi
5155 rm -f conftest*
5156   LDFLAGS="$save_LDFLAGS"
5157
5158 fi
5159
5160
5161 # Belt *and* braces to stop my trousers falling down:
5162 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5163 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5164
5165 pic_flag="$lt_cv_prog_cc_pic"
5166 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5167 wl="$lt_cv_prog_cc_wl"
5168 link_static_flag="$lt_cv_prog_cc_static"
5169 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5170 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5171
5172
5173 # Check to see if options -o and -c are simultaneously supported by compiler
5174 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5175 echo "configure:5176: checking if $compiler supports -c -o file.$ac_objext" >&5
5176 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5177   echo $ac_n "(cached) $ac_c" 1>&6
5178 else
5179   
5180 $rm -r conftest 2>/dev/null
5181 mkdir conftest
5182 cd conftest
5183 echo "int some_variable = 0;" > conftest.$ac_ext
5184 mkdir out
5185 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5186 # that will create temporary files in the current directory regardless of
5187 # the output directory.  Thus, making CWD read-only will cause this test
5188 # to fail, enabling locking or at least warning the user not to do parallel
5189 # builds.
5190 chmod -w .
5191 save_CFLAGS="$CFLAGS"
5192 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5193 compiler_c_o=no
5194 if { (eval echo configure:5195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5195   # The compiler can only warn and ignore the option if not recognized
5196   # So say no if there are warnings
5197   if test -s out/conftest.err; then
5198     lt_cv_compiler_c_o=no
5199   else
5200     lt_cv_compiler_c_o=yes
5201   fi
5202 else
5203   # Append any errors to the config.log.
5204   cat out/conftest.err 1>&5
5205   lt_cv_compiler_c_o=no
5206 fi
5207 CFLAGS="$save_CFLAGS"
5208 chmod u+w .
5209 $rm conftest* out/*
5210 rmdir out
5211 cd ..
5212 rmdir conftest
5213 $rm -r conftest 2>/dev/null
5214
5215 fi
5216
5217 compiler_c_o=$lt_cv_compiler_c_o
5218 echo "$ac_t""$compiler_c_o" 1>&6
5219
5220 if test x"$compiler_c_o" = x"yes"; then
5221   # Check to see if we can write to a .lo
5222   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5223 echo "configure:5224: checking if $compiler supports -c -o file.lo" >&5
5224   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5225   echo $ac_n "(cached) $ac_c" 1>&6
5226 else
5227   
5228   lt_cv_compiler_o_lo=no
5229   save_CFLAGS="$CFLAGS"
5230   CFLAGS="$CFLAGS -c -o conftest.lo"
5231   save_objext="$ac_objext"
5232   ac_objext=lo
5233   cat > conftest.$ac_ext <<EOF
5234 #line 5235 "configure"
5235 #include "confdefs.h"
5236
5237 int main() {
5238 int some_variable = 0;
5239 ; return 0; }
5240 EOF
5241 if { (eval echo configure:5242: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5242   rm -rf conftest*
5243       # The compiler can only warn and ignore the option if not recognized
5244     # So say no if there are warnings
5245     if test -s conftest.err; then
5246       lt_cv_compiler_o_lo=no
5247     else
5248       lt_cv_compiler_o_lo=yes
5249     fi
5250   
5251 else
5252   echo "configure: failed program was:" >&5
5253   cat conftest.$ac_ext >&5
5254 fi
5255 rm -f conftest*
5256   ac_objext="$save_objext"
5257   CFLAGS="$save_CFLAGS"
5258   
5259 fi
5260
5261   compiler_o_lo=$lt_cv_compiler_o_lo
5262   echo "$ac_t""$compiler_o_lo" 1>&6
5263 else
5264   compiler_o_lo=no
5265 fi
5266
5267 # Check to see if we can do hard links to lock some files if needed
5268 hard_links="nottested"
5269 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5270   # do not overwrite the value of need_locks provided by the user
5271   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5272 echo "configure:5273: checking if we can lock with hard links" >&5
5273   hard_links=yes
5274   $rm conftest*
5275   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5276   touch conftest.a
5277   ln conftest.a conftest.b 2>&5 || hard_links=no
5278   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5279   echo "$ac_t""$hard_links" 1>&6
5280   if test "$hard_links" = no; then
5281     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5282     need_locks=warn
5283   fi
5284 else
5285   need_locks=no
5286 fi
5287
5288 if test "$GCC" = yes; then
5289   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5290   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5291 echo "configure:5292: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5292   echo "int some_variable = 0;" > conftest.$ac_ext
5293   save_CFLAGS="$CFLAGS"
5294   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5295   compiler_rtti_exceptions=no
5296   cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299
5300 int main() {
5301 int some_variable = 0;
5302 ; return 0; }
5303 EOF
5304 if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5305   rm -rf conftest*
5306       # The compiler can only warn and ignore the option if not recognized
5307     # So say no if there are warnings
5308     if test -s conftest.err; then
5309       compiler_rtti_exceptions=no
5310     else
5311       compiler_rtti_exceptions=yes
5312     fi
5313   
5314 else
5315   echo "configure: failed program was:" >&5
5316   cat conftest.$ac_ext >&5
5317 fi
5318 rm -f conftest*
5319   CFLAGS="$save_CFLAGS"
5320   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5321
5322   if test "$compiler_rtti_exceptions" = "yes"; then
5323     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5324   else
5325     no_builtin_flag=' -fno-builtin'
5326   fi
5327 fi
5328
5329 # See if the linker supports building shared libraries.
5330 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5331 echo "configure:5332: checking whether the linker ($LD) supports shared libraries" >&5
5332
5333 allow_undefined_flag=
5334 no_undefined_flag=
5335 need_lib_prefix=unknown
5336 need_version=unknown
5337 # when you set need_version to no, make sure it does not cause -set_version
5338 # flags to be left without arguments
5339 archive_cmds=
5340 archive_expsym_cmds=
5341 old_archive_from_new_cmds=
5342 old_archive_from_expsyms_cmds=
5343 export_dynamic_flag_spec=
5344 whole_archive_flag_spec=
5345 thread_safe_flag_spec=
5346 hardcode_into_libs=no
5347 hardcode_libdir_flag_spec=
5348 hardcode_libdir_separator=
5349 hardcode_direct=no
5350 hardcode_minus_L=no
5351 hardcode_shlibpath_var=unsupported
5352 runpath_var=
5353 link_all_deplibs=unknown
5354 always_export_symbols=no
5355 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5356 # include_expsyms should be a list of space-separated symbols to be *always*
5357 # included in the symbol list
5358 include_expsyms=
5359 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5360 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5361 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5362 # as well as any symbol that contains `d'.
5363 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5364 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5365 # platforms (ab)use it in PIC code, but their linkers get confused if
5366 # the symbol is explicitly referenced.  Since portable code cannot
5367 # rely on this symbol name, it's probably fine to never include it in
5368 # preloaded symbol tables.
5369 extract_expsyms_cmds=
5370
5371 case $host_os in
5372 cygwin* | mingw* | pw32*)
5373   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5374   # When not using gcc, we currently assume that we are using
5375   # Microsoft Visual C++.
5376   if test "$GCC" != yes; then
5377     with_gnu_ld=no
5378   fi
5379   ;;
5380 openbsd*)
5381   with_gnu_ld=no
5382   ;;
5383 esac
5384
5385 ld_shlibs=yes
5386 if test "$with_gnu_ld" = yes; then
5387   # If archive_cmds runs LD, not CC, wlarc should be empty
5388   wlarc='${wl}'
5389
5390   # See if GNU ld supports shared libraries.
5391   case $host_os in
5392   aix3* | aix4* | aix5*)
5393     # On AIX, the GNU linker is very broken
5394     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5395     ld_shlibs=no
5396     cat <<EOF 1>&2
5397
5398 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5399 *** to be unable to reliably create shared libraries on AIX.
5400 *** Therefore, libtool is disabling shared libraries support.  If you
5401 *** really care for shared libraries, you may want to modify your PATH
5402 *** so that a non-GNU linker is found, and then restart.
5403
5404 EOF
5405     ;;
5406
5407   amigaos*)
5408     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)'
5409     hardcode_libdir_flag_spec='-L$libdir'
5410     hardcode_minus_L=yes
5411
5412     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5413     # that the semantics of dynamic libraries on AmigaOS, at least up
5414     # to version 4, is to share data among multiple programs linked
5415     # with the same dynamic library.  Since this doesn't match the
5416     # behavior of shared libraries on other platforms, we can use
5417     # them.
5418     ld_shlibs=no
5419     ;;
5420
5421   beos*)
5422     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5423       allow_undefined_flag=unsupported
5424       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5425       # support --undefined.  This deserves some investigation.  FIXME
5426       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5427     else
5428       ld_shlibs=no
5429     fi
5430     ;;
5431
5432   cygwin* | mingw* | pw32*)
5433     # hardcode_libdir_flag_spec is actually meaningless, as there is
5434     # no search path for DLLs.
5435     hardcode_libdir_flag_spec='-L$libdir'
5436     allow_undefined_flag=unsupported
5437     always_export_symbols=yes
5438
5439     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5440       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5441       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5442       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5443       else $CC -o impgen impgen.c ; fi)~
5444       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5445
5446     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5447
5448     # cygwin and mingw dlls have different entry points and sets of symbols
5449     # to exclude.
5450     # FIXME: what about values for MSVC?
5451     dll_entry=__cygwin_dll_entry@12
5452     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5453     case $host_os in
5454     mingw*)
5455       # mingw values
5456       dll_entry=_DllMainCRTStartup@12
5457       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5458       ;;
5459     esac
5460
5461     # mingw and cygwin differ, and it's simplest to just exclude the union
5462     # of the two symbol sets.
5463     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5464
5465     # recent cygwin and mingw systems supply a stub DllMain which the user
5466     # can override, but on older systems we have to supply one (in ltdll.c)
5467     if test "x$lt_cv_need_dllmain" = "xyes"; then
5468       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5469       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~
5470         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5471     else
5472       ltdll_obj=
5473       ltdll_cmds=
5474     fi
5475
5476     # Extract the symbol export list from an `--export-all' def file,
5477     # then regenerate the def file from the symbol export list, so that
5478     # the compiled dll only exports the symbol export list.
5479     # Be careful not to strip the DATA tag left be newer dlltools.
5480     export_symbols_cmds="$ltdll_cmds"'
5481       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5482       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5483
5484     # If the export-symbols file already is a .def file (1st line
5485     # is EXPORTS), use it as is.
5486     # If DATA tags from a recent dlltool are present, honour them!
5487     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5488         cp $export_symbols $output_objdir/$soname-def;
5489       else
5490         echo EXPORTS > $output_objdir/$soname-def;
5491         _lt_hint=1;
5492         cat $export_symbols | while read symbol; do
5493          set dummy \$symbol;
5494          case \$# in
5495            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5496            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5497          esac;
5498          _lt_hint=`expr 1 + \$_lt_hint`;
5499         done;
5500       fi~
5501       '"$ltdll_cmds"'
5502       $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~
5503       $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~
5504       $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~
5505       $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~
5506       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5507     ;;
5508
5509   netbsd*)
5510     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5511       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5512       wlarc=
5513     else
5514       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5515       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5516     fi
5517     ;;
5518
5519   solaris* | sysv5*)
5520     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5521       ld_shlibs=no
5522       cat <<EOF 1>&2
5523
5524 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5525 *** create shared libraries on Solaris systems.  Therefore, libtool
5526 *** is disabling shared libraries support.  We urge you to upgrade GNU
5527 *** binutils to release 2.9.1 or newer.  Another option is to modify
5528 *** your PATH or compiler configuration so that the native linker is
5529 *** used, and then restart.
5530
5531 EOF
5532     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5533       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5534       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5535     else
5536       ld_shlibs=no
5537     fi
5538     ;;
5539
5540   sunos4*)
5541     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5542     wlarc=
5543     hardcode_direct=yes
5544     hardcode_shlibpath_var=no
5545     ;;
5546
5547   *)
5548     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5549       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5550       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5551     else
5552       ld_shlibs=no
5553     fi
5554     ;;
5555   esac
5556
5557   if test "$ld_shlibs" = yes; then
5558     runpath_var=LD_RUN_PATH
5559     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5560     export_dynamic_flag_spec='${wl}--export-dynamic'
5561     case $host_os in
5562     cygwin* | mingw* | pw32*)
5563       # dlltool doesn't understand --whole-archive et. al.
5564       whole_archive_flag_spec=
5565       ;;
5566     *)
5567       # ancient GNU ld didn't support --whole-archive et. al.
5568       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5569         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5570       else
5571         whole_archive_flag_spec=
5572       fi
5573       ;;
5574     esac
5575   fi
5576 else
5577   # PORTME fill in a description of your system's linker (not GNU ld)
5578   case $host_os in
5579   aix3*)
5580     allow_undefined_flag=unsupported
5581     always_export_symbols=yes
5582     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'
5583     # Note: this linker hardcodes the directories in LIBPATH if there
5584     # are no directories specified by -L.
5585     hardcode_minus_L=yes
5586     if test "$GCC" = yes && test -z "$link_static_flag"; then
5587       # Neither direct hardcoding nor static linking is supported with a
5588       # broken collect2.
5589       hardcode_direct=unsupported
5590     fi
5591     ;;
5592
5593   aix4* | aix5*)
5594     if test "$host_cpu" = ia64; then
5595       # On IA64, the linker does run time linking by default, so we don't
5596       # have to do anything special.
5597       aix_use_runtimelinking=no
5598       exp_sym_flag='-Bexport'
5599       no_entry_flag=""
5600     else
5601       aix_use_runtimelinking=no
5602
5603       # Test if we are trying to use run time linking or normal
5604       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5605       # need to do runtime linking.
5606       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5607         for ld_flag in $LDFLAGS; do
5608           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5609             aix_use_runtimelinking=yes
5610             break
5611           fi
5612         done
5613       esac
5614
5615       exp_sym_flag='-bexport'
5616       no_entry_flag='-bnoentry'
5617     fi
5618
5619     # When large executables or shared objects are built, AIX ld can
5620     # have problems creating the table of contents.  If linking a library
5621     # or program results in "error TOC overflow" add -mminimal-toc to
5622     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5623     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5624
5625     hardcode_direct=yes
5626     archive_cmds=''
5627     hardcode_libdir_separator=':'
5628     if test "$GCC" = yes; then
5629       case $host_os in aix4.[012]|aix4.[012].*)
5630         collect2name=`${CC} -print-prog-name=collect2`
5631         if test -f "$collect2name" && \
5632           strings "$collect2name" | grep resolve_lib_name >/dev/null
5633         then
5634           # We have reworked collect2
5635           hardcode_direct=yes
5636         else
5637           # We have old collect2
5638           hardcode_direct=unsupported
5639           # It fails to find uninstalled libraries when the uninstalled
5640           # path is not listed in the libpath.  Setting hardcode_minus_L
5641           # to unsupported forces relinking
5642           hardcode_minus_L=yes
5643           hardcode_libdir_flag_spec='-L$libdir'
5644           hardcode_libdir_separator=
5645         fi
5646       esac
5647
5648       shared_flag='-shared'
5649     else
5650       # not using gcc
5651       if test "$host_cpu" = ia64; then
5652         shared_flag='${wl}-G'
5653       else
5654         if test "$aix_use_runtimelinking" = yes; then
5655           shared_flag='${wl}-G'
5656         else
5657           shared_flag='${wl}-bM:SRE'
5658         fi
5659       fi
5660     fi
5661
5662     # It seems that -bexpall can do strange things, so it is better to
5663     # generate a list of symbols to export.
5664     always_export_symbols=yes
5665     if test "$aix_use_runtimelinking" = yes; then
5666       # Warning - without using the other runtime loading flags (-brtl),
5667       # -berok will link without error, but may produce a broken library.
5668       allow_undefined_flag='-berok'
5669       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5670       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"
5671     else
5672       if test "$host_cpu" = ia64; then
5673         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5674         allow_undefined_flag="-z nodefs"
5675         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"
5676       else
5677         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5678         # Warning - without using the other run time loading flags,
5679         # -berok will link without error, but may produce a broken library.
5680         allow_undefined_flag='${wl}-berok'
5681         # This is a bit strange, but is similar to how AIX traditionally builds
5682         # it's shared libraries.
5683         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'
5684       fi
5685     fi
5686     ;;
5687
5688   amigaos*)
5689     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)'
5690     hardcode_libdir_flag_spec='-L$libdir'
5691     hardcode_minus_L=yes
5692     # see comment about different semantics on the GNU ld section
5693     ld_shlibs=no
5694     ;;
5695
5696   cygwin* | mingw* | pw32*)
5697     # When not using gcc, we currently assume that we are using
5698     # Microsoft Visual C++.
5699     # hardcode_libdir_flag_spec is actually meaningless, as there is
5700     # no search path for DLLs.
5701     hardcode_libdir_flag_spec=' '
5702     allow_undefined_flag=unsupported
5703     # Tell ltmain to make .lib files, not .a files.
5704     libext=lib
5705     # FIXME: Setting linknames here is a bad hack.
5706     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5707     # The linker will automatically build a .lib file if we build a DLL.
5708     old_archive_from_new_cmds='true'
5709     # FIXME: Should let the user specify the lib program.
5710     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5711     fix_srcfile_path='`cygpath -w "$srcfile"`'
5712     ;;
5713
5714   darwin* | rhapsody*)
5715     case "$host_os" in
5716     rhapsody* | darwin1.[012])
5717       allow_undefined_flag='-undefined suppress'
5718       ;;
5719     *) # Darwin 1.3 on
5720       allow_undefined_flag='-flat_namespace -undefined suppress'
5721       ;;
5722     esac
5723     # FIXME: Relying on posixy $() will cause problems for
5724     #        cross-compilation, but unfortunately the echo tests do not
5725     #        yet detect zsh echo's removal of \ escapes.
5726     archive_cmds='$nonopt $(test "x$module" = xyes && echo -bundle || echo -dynamiclib) $allow_undefined_flag -o $lib $libobjs $deplibs$linker_flags -install_name $rpath/$soname $verstring'
5727     # We need to add '_' to the symbols in $export_symbols first
5728     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5729     hardcode_direct=yes
5730     hardcode_shlibpath_var=no
5731     whole_archive_flag_spec='-all_load $convenience'
5732     ;;
5733
5734   freebsd1*)
5735     ld_shlibs=no
5736     ;;
5737
5738   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5739   # support.  Future versions do this automatically, but an explicit c++rt0.o
5740   # does not break anything, and helps significantly (at the cost of a little
5741   # extra space).
5742   freebsd2.2*)
5743     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5744     hardcode_libdir_flag_spec='-R$libdir'
5745     hardcode_direct=yes
5746     hardcode_shlibpath_var=no
5747     ;;
5748
5749   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5750   freebsd2*)
5751     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5752     hardcode_direct=yes
5753     hardcode_minus_L=yes
5754     hardcode_shlibpath_var=no
5755     ;;
5756
5757   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5758   freebsd*)
5759     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5760     hardcode_libdir_flag_spec='-R$libdir'
5761     hardcode_direct=yes
5762     hardcode_shlibpath_var=no
5763     ;;
5764
5765   hpux9* | hpux10* | hpux11*)
5766     case $host_os in
5767     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' ;;
5768     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5769     esac
5770     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5771     hardcode_libdir_separator=:
5772     hardcode_direct=yes
5773     hardcode_minus_L=yes # Not in the search PATH, but as the default
5774                          # location of the library.
5775     export_dynamic_flag_spec='${wl}-E'
5776     ;;
5777
5778   irix5* | irix6*)
5779     if test "$GCC" = yes; then
5780       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'
5781     else
5782       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'
5783     fi
5784     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5785     hardcode_libdir_separator=:
5786     link_all_deplibs=yes
5787     ;;
5788
5789   netbsd*)
5790     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5791       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5792     else
5793       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5794     fi
5795     hardcode_libdir_flag_spec='-R$libdir'
5796     hardcode_direct=yes
5797     hardcode_shlibpath_var=no
5798     ;;
5799
5800   newsos6)
5801     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5802     hardcode_direct=yes
5803     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5804     hardcode_libdir_separator=:
5805     hardcode_shlibpath_var=no
5806     ;;
5807
5808   openbsd*)
5809     hardcode_direct=yes
5810     hardcode_shlibpath_var=no
5811     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5812       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5813       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5814       export_dynamic_flag_spec='${wl}-E'
5815     else
5816       case "$host_os" in
5817       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5818         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5819         hardcode_libdir_flag_spec='-R$libdir'
5820         ;;
5821       *)
5822         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5823         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5824         ;;
5825       esac
5826     fi
5827     ;;
5828
5829   os2*)
5830     hardcode_libdir_flag_spec='-L$libdir'
5831     hardcode_minus_L=yes
5832     allow_undefined_flag=unsupported
5833     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'
5834     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5835     ;;
5836
5837   osf3*)
5838     if test "$GCC" = yes; then
5839       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5840       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'
5841     else
5842       allow_undefined_flag=' -expect_unresolved \*'
5843       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'
5844     fi
5845     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5846     hardcode_libdir_separator=:
5847     ;;
5848
5849   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5850     if test "$GCC" = yes; then
5851       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5852       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'
5853       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5854     else
5855       allow_undefined_flag=' -expect_unresolved \*'
5856       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'
5857       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5858       $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'
5859
5860       #Both c and cxx compiler support -rpath directly
5861       hardcode_libdir_flag_spec='-rpath $libdir'
5862     fi
5863     hardcode_libdir_separator=:
5864     ;;
5865
5866   sco3.2v5*)
5867     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5868     hardcode_shlibpath_var=no
5869     runpath_var=LD_RUN_PATH
5870     hardcode_runpath_var=yes
5871     export_dynamic_flag_spec='${wl}-Bexport'
5872     ;;
5873
5874   solaris*)
5875     # gcc --version < 3.0 without binutils cannot create self contained
5876     # shared libraries reliably, requiring libgcc.a to resolve some of
5877     # the object symbols generated in some cases.  Libraries that use
5878     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5879     # a copy of libgcc.a into every shared library to guarantee resolving
5880     # such symbols causes other problems:  According to Tim Van Holder
5881     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5882     # (to the application) exception stack for one thing.
5883     no_undefined_flag=' -z defs'
5884     if test "$GCC" = yes; then
5885       case `$CC --version 2>/dev/null` in
5886       [12].*)
5887         cat <<EOF 1>&2
5888
5889 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5890 *** create self contained shared libraries on Solaris systems, without
5891 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5892 *** -no-undefined support, which will at least allow you to build shared
5893 *** libraries.  However, you may find that when you link such libraries
5894 *** into an application without using GCC, you have to manually add
5895 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5896 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5897 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5898
5899 EOF
5900         no_undefined_flag=
5901         ;;
5902       esac
5903     fi
5904     # $CC -shared without GNU ld will not create a library from C++
5905     # object files and a static libstdc++, better avoid it by now
5906     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5907     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5908                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5909     hardcode_libdir_flag_spec='-R$libdir'
5910     hardcode_shlibpath_var=no
5911     case $host_os in
5912     solaris2.[0-5] | solaris2.[0-5].*) ;;
5913     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5914       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5915     esac
5916     link_all_deplibs=yes
5917     ;;
5918
5919   sunos4*)
5920     if test "x$host_vendor" = xsequent; then
5921       # Use $CC to link under sequent, because it throws in some extra .o
5922       # files that make .init and .fini sections work.
5923       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5924     else
5925       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5926     fi
5927     hardcode_libdir_flag_spec='-L$libdir'
5928     hardcode_direct=yes
5929     hardcode_minus_L=yes
5930     hardcode_shlibpath_var=no
5931     ;;
5932
5933   sysv4)
5934     if test "x$host_vendor" = xsno; then
5935       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5936       hardcode_direct=yes # is this really true???
5937     else
5938       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5939       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5940     fi
5941     runpath_var='LD_RUN_PATH'
5942     hardcode_shlibpath_var=no
5943     ;;
5944
5945   sysv4.3*)
5946     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5947     hardcode_shlibpath_var=no
5948     export_dynamic_flag_spec='-Bexport'
5949     ;;
5950
5951   sysv5*)
5952     no_undefined_flag=' -z text'
5953     # $CC -shared without GNU ld will not create a library from C++
5954     # object files and a static libstdc++, better avoid it by now
5955     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5956     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5957                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5958     hardcode_libdir_flag_spec=
5959     hardcode_shlibpath_var=no
5960     runpath_var='LD_RUN_PATH'
5961     ;;
5962
5963   uts4*)
5964     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5965     hardcode_libdir_flag_spec='-L$libdir'
5966     hardcode_shlibpath_var=no
5967     ;;
5968
5969   dgux*)
5970     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5971     hardcode_libdir_flag_spec='-L$libdir'
5972     hardcode_shlibpath_var=no
5973     ;;
5974
5975   sysv4*MP*)
5976     if test -d /usr/nec; then
5977       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5978       hardcode_shlibpath_var=no
5979       runpath_var=LD_RUN_PATH
5980       hardcode_runpath_var=yes
5981       ld_shlibs=yes
5982     fi
5983     ;;
5984
5985   sysv4.2uw2*)
5986     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5987     hardcode_direct=yes
5988     hardcode_minus_L=no
5989     hardcode_shlibpath_var=no
5990     hardcode_runpath_var=yes
5991     runpath_var=LD_RUN_PATH
5992     ;;
5993
5994   sysv5uw7* | unixware7*)
5995     no_undefined_flag='${wl}-z ${wl}text'
5996     if test "$GCC" = yes; then
5997       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5998     else
5999       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6000     fi
6001     runpath_var='LD_RUN_PATH'
6002     hardcode_shlibpath_var=no
6003     ;;
6004
6005   *)
6006     ld_shlibs=no
6007     ;;
6008   esac
6009 fi
6010 echo "$ac_t""$ld_shlibs" 1>&6
6011 test "$ld_shlibs" = no && can_build_shared=no
6012
6013 # Check hardcoding attributes.
6014 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6015 echo "configure:6016: checking how to hardcode library paths into programs" >&5
6016 hardcode_action=
6017 if test -n "$hardcode_libdir_flag_spec" || \
6018    test -n "$runpath_var"; then
6019
6020   # We can hardcode non-existant directories.
6021   if test "$hardcode_direct" != no &&
6022      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6023      # have to relink, otherwise we might link with an installed library
6024      # when we should be linking with a yet-to-be-installed one
6025      ## test "$hardcode_shlibpath_var" != no &&
6026      test "$hardcode_minus_L" != no; then
6027     # Linking always hardcodes the temporary library directory.
6028     hardcode_action=relink
6029   else
6030     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6031     hardcode_action=immediate
6032   fi
6033 else
6034   # We cannot hardcode anything, or else we can only hardcode existing
6035   # directories.
6036   hardcode_action=unsupported
6037 fi
6038 echo "$ac_t""$hardcode_action" 1>&6
6039
6040 striplib=
6041 old_striplib=
6042 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6043 echo "configure:6044: checking whether stripping libraries is possible" >&5
6044 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6045   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6046   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6047   echo "$ac_t""yes" 1>&6
6048 else
6049   echo "$ac_t""no" 1>&6
6050 fi
6051
6052 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6053 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6054
6055 # PORTME Fill in your ld.so characteristics
6056 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6057 echo "configure:6058: checking dynamic linker characteristics" >&5
6058 library_names_spec=
6059 libname_spec='lib$name'
6060 soname_spec=
6061 postinstall_cmds=
6062 postuninstall_cmds=
6063 finish_cmds=
6064 finish_eval=
6065 shlibpath_var=
6066 shlibpath_overrides_runpath=unknown
6067 version_type=none
6068 dynamic_linker="$host_os ld.so"
6069 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6070 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6071
6072 case $host_os in
6073 aix3*)
6074   version_type=linux
6075   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6076   shlibpath_var=LIBPATH
6077
6078   # AIX has no versioning support, so we append a major version to the name.
6079   soname_spec='${libname}${release}.so$major'
6080   ;;
6081
6082 aix4* | aix5*)
6083   version_type=linux
6084   if test "$host_cpu" = ia64; then
6085     # AIX 5 supports IA64
6086     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6087     shlibpath_var=LD_LIBRARY_PATH
6088   else
6089     # With GCC up to 2.95.x, collect2 would create an import file
6090     # for dependence libraries.  The import file would start with
6091     # the line `#! .'.  This would cause the generated library to
6092     # depend on `.', always an invalid library.  This was fixed in
6093     # development snapshots of GCC prior to 3.0.
6094     case $host_os in
6095       aix4 | aix4.[01] | aix4.[01].*)
6096         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6097              echo ' yes '
6098              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6099           :
6100         else
6101           can_build_shared=no
6102         fi
6103         ;;
6104     esac
6105     # AIX (on Power*) has no versioning support, so currently we can
6106     # not hardcode correct soname into executable. Probably we can
6107     # add versioning support to collect2, so additional links can
6108     # be useful in future.
6109     if test "$aix_use_runtimelinking" = yes; then
6110       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6111       # instead of lib<name>.a to let people know that these are not
6112       # typical AIX shared libraries.
6113       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6114     else
6115       # We preserve .a as extension for shared libraries through AIX4.2
6116       # and later when we are not doing run time linking.
6117       library_names_spec='${libname}${release}.a $libname.a'
6118       soname_spec='${libname}${release}.so$major'
6119     fi
6120     shlibpath_var=LIBPATH
6121   fi
6122   ;;
6123
6124 amigaos*)
6125   library_names_spec='$libname.ixlibrary $libname.a'
6126   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6127   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'
6128   ;;
6129
6130 beos*)
6131   library_names_spec='${libname}.so'
6132   dynamic_linker="$host_os ld.so"
6133   shlibpath_var=LIBRARY_PATH
6134   ;;
6135
6136 bsdi4*)
6137   version_type=linux
6138   need_version=no
6139   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6140   soname_spec='${libname}${release}.so$major'
6141   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6142   shlibpath_var=LD_LIBRARY_PATH
6143   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6144   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6145   export_dynamic_flag_spec=-rdynamic
6146   # the default ld.so.conf also contains /usr/contrib/lib and
6147   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6148   # libtool to hard-code these into programs
6149   ;;
6150
6151 cygwin* | mingw* | pw32*)
6152   version_type=windows
6153   need_version=no
6154   need_lib_prefix=no
6155   case $GCC,$host_os in
6156   yes,cygwin*)
6157     library_names_spec='$libname.dll.a'
6158     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6159     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6160       dldir=$destdir/`dirname \$dlpath`~
6161       test -d \$dldir || mkdir -p \$dldir~
6162       $install_prog .libs/$dlname \$dldir/$dlname'
6163     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6164       dlpath=$dir/\$dldll~
6165        $rm \$dlpath'
6166     ;;
6167   yes,mingw*)
6168     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6169     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6170     ;;
6171   yes,pw32*)
6172     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6173     ;;
6174   *)
6175     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6176     ;;
6177   esac
6178   dynamic_linker='Win32 ld.exe'
6179   # FIXME: first we should search . and the directory the executable is in
6180   shlibpath_var=PATH
6181   ;;
6182
6183 darwin* | rhapsody*)
6184   dynamic_linker="$host_os dyld"
6185   version_type=darwin
6186   need_lib_prefix=no
6187   need_version=no
6188   # FIXME: Relying on posixy $() will cause problems for
6189   #        cross-compilation, but unfortunately the echo tests do not
6190   #        yet detect zsh echo's removal of \ escapes.
6191   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)'
6192   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6193   shlibpath_overrides_runpath=yes
6194   shlibpath_var=DYLD_LIBRARY_PATH
6195   ;;
6196
6197 freebsd1*)
6198   dynamic_linker=no
6199   ;;
6200
6201 freebsd*)
6202   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6203   version_type=freebsd-$objformat
6204   case $version_type in
6205     freebsd-elf*)
6206       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6207       need_version=no
6208       need_lib_prefix=no
6209       ;;
6210     freebsd-*)
6211       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6212       need_version=yes
6213       ;;
6214   esac
6215   shlibpath_var=LD_LIBRARY_PATH
6216   case $host_os in
6217   freebsd2*)
6218     shlibpath_overrides_runpath=yes
6219     ;;
6220   *)
6221     shlibpath_overrides_runpath=no
6222     hardcode_into_libs=yes
6223     ;;
6224   esac
6225   ;;
6226
6227 gnu*)
6228   version_type=linux
6229   need_lib_prefix=no
6230   need_version=no
6231   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6232   soname_spec='${libname}${release}.so$major'
6233   shlibpath_var=LD_LIBRARY_PATH
6234   hardcode_into_libs=yes
6235   ;;
6236
6237 hpux9* | hpux10* | hpux11*)
6238   # Give a soname corresponding to the major version so that dld.sl refuses to
6239   # link against other versions.
6240   dynamic_linker="$host_os dld.sl"
6241   version_type=sunos
6242   need_lib_prefix=no
6243   need_version=no
6244   shlibpath_var=SHLIB_PATH
6245   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6246   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6247   soname_spec='${libname}${release}.sl$major'
6248   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6249   postinstall_cmds='chmod 555 $lib'
6250   ;;
6251
6252 irix5* | irix6*)
6253   version_type=irix
6254   need_lib_prefix=no
6255   need_version=no
6256   soname_spec='${libname}${release}.so$major'
6257   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6258   case $host_os in
6259   irix5*)
6260     libsuff= shlibsuff=
6261     ;;
6262   *)
6263     case $LD in # libtool.m4 will add one of these switches to LD
6264     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6265     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6266     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6267     *) libsuff= shlibsuff= libmagic=never-match;;
6268     esac
6269     ;;
6270   esac
6271   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6272   shlibpath_overrides_runpath=no
6273   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6274   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6275   ;;
6276
6277 # No shared lib support for Linux oldld, aout, or coff.
6278 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6279   dynamic_linker=no
6280   ;;
6281
6282 # This must be Linux ELF.
6283 linux-gnu*)
6284   version_type=linux
6285   need_lib_prefix=no
6286   need_version=no
6287   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6288   soname_spec='${libname}${release}.so$major'
6289   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6290   shlibpath_var=LD_LIBRARY_PATH
6291   shlibpath_overrides_runpath=no
6292   # This implies no fast_install, which is unacceptable.
6293   # Some rework will be needed to allow for fast_install
6294   # before this can be enabled.
6295   hardcode_into_libs=yes
6296
6297   # We used to test for /lib/ld.so.1 and disable shared libraries on
6298   # powerpc, because MkLinux only supported shared libraries with the
6299   # GNU dynamic linker.  Since this was broken with cross compilers,
6300   # most powerpc-linux boxes support dynamic linking these days and
6301   # people can always --disable-shared, the test was removed, and we
6302   # assume the GNU/Linux dynamic linker is in use.
6303   dynamic_linker='GNU/Linux ld.so'
6304   ;;
6305
6306 netbsd*)
6307   version_type=sunos
6308   need_lib_prefix=no
6309   need_version=no
6310   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6311     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6312     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6313     dynamic_linker='NetBSD (a.out) ld.so'
6314   else
6315     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6316     soname_spec='${libname}${release}.so$major'
6317     dynamic_linker='NetBSD ld.elf_so'
6318   fi
6319   shlibpath_var=LD_LIBRARY_PATH
6320   shlibpath_overrides_runpath=yes
6321   hardcode_into_libs=yes
6322   ;;
6323
6324 newsos6)
6325   version_type=linux
6326   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6327   shlibpath_var=LD_LIBRARY_PATH
6328   shlibpath_overrides_runpath=yes
6329   ;;
6330
6331 openbsd*)
6332   version_type=sunos
6333   need_lib_prefix=no
6334   need_version=no
6335   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6336     case "$host_os" in
6337     openbsd2.[89] | openbsd2.[89].*)
6338       shlibpath_overrides_runpath=no
6339       ;;
6340     *)
6341       shlibpath_overrides_runpath=yes
6342       ;;
6343     esac
6344   else
6345     shlibpath_overrides_runpath=yes
6346   fi
6347   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6348   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6349   shlibpath_var=LD_LIBRARY_PATH
6350   ;;
6351
6352 os2*)
6353   libname_spec='$name'
6354   need_lib_prefix=no
6355   library_names_spec='$libname.dll $libname.a'
6356   dynamic_linker='OS/2 ld.exe'
6357   shlibpath_var=LIBPATH
6358   ;;
6359
6360 osf3* | osf4* | osf5*)
6361   version_type=osf
6362   need_version=no
6363   soname_spec='${libname}${release}.so'
6364   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6365   shlibpath_var=LD_LIBRARY_PATH
6366   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6367   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6368   ;;
6369
6370 sco3.2v5*)
6371   version_type=osf
6372   soname_spec='${libname}${release}.so$major'
6373   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6374   shlibpath_var=LD_LIBRARY_PATH
6375   ;;
6376
6377 solaris*)
6378   version_type=linux
6379   need_lib_prefix=no
6380   need_version=no
6381   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6382   soname_spec='${libname}${release}.so$major'
6383   shlibpath_var=LD_LIBRARY_PATH
6384   shlibpath_overrides_runpath=yes
6385   hardcode_into_libs=yes
6386   # ldd complains unless libraries are executable
6387   postinstall_cmds='chmod +x $lib'
6388   ;;
6389
6390 sunos4*)
6391   version_type=sunos
6392   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6393   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6394   shlibpath_var=LD_LIBRARY_PATH
6395   shlibpath_overrides_runpath=yes
6396   if test "$with_gnu_ld" = yes; then
6397     need_lib_prefix=no
6398   fi
6399   need_version=yes
6400   ;;
6401
6402 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6403   version_type=linux
6404   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6405   soname_spec='${libname}${release}.so$major'
6406   shlibpath_var=LD_LIBRARY_PATH
6407   case $host_vendor in
6408     sni)
6409       shlibpath_overrides_runpath=no
6410       ;;
6411     motorola)
6412       need_lib_prefix=no
6413       need_version=no
6414       shlibpath_overrides_runpath=no
6415       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6416       ;;
6417   esac
6418   ;;
6419
6420 uts4*)
6421   version_type=linux
6422   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6423   soname_spec='${libname}${release}.so$major'
6424   shlibpath_var=LD_LIBRARY_PATH
6425   ;;
6426
6427 dgux*)
6428   version_type=linux
6429   need_lib_prefix=no
6430   need_version=no
6431   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6432   soname_spec='${libname}${release}.so$major'
6433   shlibpath_var=LD_LIBRARY_PATH
6434   ;;
6435
6436 sysv4*MP*)
6437   if test -d /usr/nec ;then
6438     version_type=linux
6439     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6440     soname_spec='$libname.so.$major'
6441     shlibpath_var=LD_LIBRARY_PATH
6442   fi
6443   ;;
6444
6445 *)
6446   dynamic_linker=no
6447   ;;
6448 esac
6449 echo "$ac_t""$dynamic_linker" 1>&6
6450 test "$dynamic_linker" = no && can_build_shared=no
6451
6452 # Report the final consequences.
6453 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6454 echo "configure:6455: checking if libtool supports shared libraries" >&5
6455 echo "$ac_t""$can_build_shared" 1>&6
6456
6457 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6458 echo "configure:6459: checking whether to build shared libraries" >&5
6459 test "$can_build_shared" = "no" && enable_shared=no
6460
6461 # On AIX, shared libraries and static libraries use the same namespace, and
6462 # are all built from PIC.
6463 case "$host_os" in
6464 aix3*)
6465   test "$enable_shared" = yes && enable_static=no
6466   if test -n "$RANLIB"; then
6467     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6468     postinstall_cmds='$RANLIB $lib'
6469   fi
6470   ;;
6471
6472 aix4*)
6473   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6474     test "$enable_shared" = yes && enable_static=no
6475   fi
6476   ;;
6477 esac
6478 echo "$ac_t""$enable_shared" 1>&6
6479
6480 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6481 echo "configure:6482: checking whether to build static libraries" >&5
6482 # Make sure either enable_shared or enable_static is yes.
6483 test "$enable_shared" = yes || enable_static=yes
6484 echo "$ac_t""$enable_static" 1>&6
6485
6486 if test "$hardcode_action" = relink; then
6487   # Fast installation is not supported
6488   enable_fast_install=no
6489 elif test "$shlibpath_overrides_runpath" = yes ||
6490      test "$enable_shared" = no; then
6491   # Fast installation is not necessary
6492   enable_fast_install=needless
6493 fi
6494
6495 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6496 if test "$GCC" = yes; then
6497   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6498 fi
6499
6500 if test "x$enable_dlopen" != xyes; then
6501   enable_dlopen=unknown
6502   enable_dlopen_self=unknown
6503   enable_dlopen_self_static=unknown
6504 else
6505   lt_cv_dlopen=no
6506   lt_cv_dlopen_libs=
6507
6508   case $host_os in
6509   beos*)
6510     lt_cv_dlopen="load_add_on"
6511     lt_cv_dlopen_libs=
6512     lt_cv_dlopen_self=yes
6513     ;;
6514
6515   cygwin* | mingw* | pw32*)
6516     lt_cv_dlopen="LoadLibrary"
6517     lt_cv_dlopen_libs=
6518    ;;
6519
6520   *)
6521     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6522 echo "configure:6523: checking for shl_load" >&5
6523 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6524   echo $ac_n "(cached) $ac_c" 1>&6
6525 else
6526   cat > conftest.$ac_ext <<EOF
6527 #line 6528 "configure"
6528 #include "confdefs.h"
6529 /* System header to define __stub macros and hopefully few prototypes,
6530     which can conflict with char shl_load(); below.  */
6531 #include <assert.h>
6532 /* Override any gcc2 internal prototype to avoid an error.  */
6533 /* We use char because int might match the return type of a gcc2
6534     builtin and then its argument prototype would still apply.  */
6535 char shl_load();
6536 char (*f)();
6537
6538 int main() {
6539
6540 /* The GNU C library defines this for functions which it implements
6541     to always fail with ENOSYS.  Some functions are actually named
6542     something starting with __ and the normal name is an alias.  */
6543 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6544 choke me
6545 #else
6546 f = shl_load;
6547 #endif
6548
6549 ; return 0; }
6550 EOF
6551 if { (eval echo configure:6552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6552   rm -rf conftest*
6553   eval "ac_cv_func_shl_load=yes"
6554 else
6555   echo "configure: failed program was:" >&5
6556   cat conftest.$ac_ext >&5
6557   rm -rf conftest*
6558   eval "ac_cv_func_shl_load=no"
6559 fi
6560 rm -f conftest*
6561 fi
6562
6563 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6564   echo "$ac_t""yes" 1>&6
6565   lt_cv_dlopen="shl_load"
6566 else
6567   echo "$ac_t""no" 1>&6
6568 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6569 echo "configure:6570: checking for shl_load in -ldld" >&5
6570 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6571 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6572   echo $ac_n "(cached) $ac_c" 1>&6
6573 else
6574   ac_save_LIBS="$LIBS"
6575 LIBS="-ldld  $LIBS"
6576 cat > conftest.$ac_ext <<EOF
6577 #line 6578 "configure"
6578 #include "confdefs.h"
6579 /* Override any gcc2 internal prototype to avoid an error.  */
6580 /* We use char because int might match the return type of a gcc2
6581     builtin and then its argument prototype would still apply.  */
6582 char shl_load();
6583
6584 int main() {
6585 shl_load()
6586 ; return 0; }
6587 EOF
6588 if { (eval echo configure:6589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6589   rm -rf conftest*
6590   eval "ac_cv_lib_$ac_lib_var=yes"
6591 else
6592   echo "configure: failed program was:" >&5
6593   cat conftest.$ac_ext >&5
6594   rm -rf conftest*
6595   eval "ac_cv_lib_$ac_lib_var=no"
6596 fi
6597 rm -f conftest*
6598 LIBS="$ac_save_LIBS"
6599
6600 fi
6601 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6602   echo "$ac_t""yes" 1>&6
6603   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6604 else
6605   echo "$ac_t""no" 1>&6
6606 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6607 echo "configure:6608: checking for dlopen" >&5
6608 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6609   echo $ac_n "(cached) $ac_c" 1>&6
6610 else
6611   cat > conftest.$ac_ext <<EOF
6612 #line 6613 "configure"
6613 #include "confdefs.h"
6614 /* System header to define __stub macros and hopefully few prototypes,
6615     which can conflict with char dlopen(); below.  */
6616 #include <assert.h>
6617 /* Override any gcc2 internal prototype to avoid an error.  */
6618 /* We use char because int might match the return type of a gcc2
6619     builtin and then its argument prototype would still apply.  */
6620 char dlopen();
6621 char (*f)();
6622
6623 int main() {
6624
6625 /* The GNU C library defines this for functions which it implements
6626     to always fail with ENOSYS.  Some functions are actually named
6627     something starting with __ and the normal name is an alias.  */
6628 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6629 choke me
6630 #else
6631 f = dlopen;
6632 #endif
6633
6634 ; return 0; }
6635 EOF
6636 if { (eval echo configure:6637: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6637   rm -rf conftest*
6638   eval "ac_cv_func_dlopen=yes"
6639 else
6640   echo "configure: failed program was:" >&5
6641   cat conftest.$ac_ext >&5
6642   rm -rf conftest*
6643   eval "ac_cv_func_dlopen=no"
6644 fi
6645 rm -f conftest*
6646 fi
6647
6648 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6649   echo "$ac_t""yes" 1>&6
6650   lt_cv_dlopen="dlopen"
6651 else
6652   echo "$ac_t""no" 1>&6
6653 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6654 echo "configure:6655: checking for dlopen in -ldl" >&5
6655 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6656 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6657   echo $ac_n "(cached) $ac_c" 1>&6
6658 else
6659   ac_save_LIBS="$LIBS"
6660 LIBS="-ldl  $LIBS"
6661 cat > conftest.$ac_ext <<EOF
6662 #line 6663 "configure"
6663 #include "confdefs.h"
6664 /* Override any gcc2 internal prototype to avoid an error.  */
6665 /* We use char because int might match the return type of a gcc2
6666     builtin and then its argument prototype would still apply.  */
6667 char dlopen();
6668
6669 int main() {
6670 dlopen()
6671 ; return 0; }
6672 EOF
6673 if { (eval echo configure:6674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6674   rm -rf conftest*
6675   eval "ac_cv_lib_$ac_lib_var=yes"
6676 else
6677   echo "configure: failed program was:" >&5
6678   cat conftest.$ac_ext >&5
6679   rm -rf conftest*
6680   eval "ac_cv_lib_$ac_lib_var=no"
6681 fi
6682 rm -f conftest*
6683 LIBS="$ac_save_LIBS"
6684
6685 fi
6686 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6687   echo "$ac_t""yes" 1>&6
6688   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6689 else
6690   echo "$ac_t""no" 1>&6
6691 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6692 echo "configure:6693: checking for dlopen in -lsvld" >&5
6693 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6694 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6695   echo $ac_n "(cached) $ac_c" 1>&6
6696 else
6697   ac_save_LIBS="$LIBS"
6698 LIBS="-lsvld  $LIBS"
6699 cat > conftest.$ac_ext <<EOF
6700 #line 6701 "configure"
6701 #include "confdefs.h"
6702 /* Override any gcc2 internal prototype to avoid an error.  */
6703 /* We use char because int might match the return type of a gcc2
6704     builtin and then its argument prototype would still apply.  */
6705 char dlopen();
6706
6707 int main() {
6708 dlopen()
6709 ; return 0; }
6710 EOF
6711 if { (eval echo configure:6712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6712   rm -rf conftest*
6713   eval "ac_cv_lib_$ac_lib_var=yes"
6714 else
6715   echo "configure: failed program was:" >&5
6716   cat conftest.$ac_ext >&5
6717   rm -rf conftest*
6718   eval "ac_cv_lib_$ac_lib_var=no"
6719 fi
6720 rm -f conftest*
6721 LIBS="$ac_save_LIBS"
6722
6723 fi
6724 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6725   echo "$ac_t""yes" 1>&6
6726   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6727 else
6728   echo "$ac_t""no" 1>&6
6729 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6730 echo "configure:6731: checking for dld_link in -ldld" >&5
6731 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6732 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6733   echo $ac_n "(cached) $ac_c" 1>&6
6734 else
6735   ac_save_LIBS="$LIBS"
6736 LIBS="-ldld  $LIBS"
6737 cat > conftest.$ac_ext <<EOF
6738 #line 6739 "configure"
6739 #include "confdefs.h"
6740 /* Override any gcc2 internal prototype to avoid an error.  */
6741 /* We use char because int might match the return type of a gcc2
6742     builtin and then its argument prototype would still apply.  */
6743 char dld_link();
6744
6745 int main() {
6746 dld_link()
6747 ; return 0; }
6748 EOF
6749 if { (eval echo configure:6750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6750   rm -rf conftest*
6751   eval "ac_cv_lib_$ac_lib_var=yes"
6752 else
6753   echo "configure: failed program was:" >&5
6754   cat conftest.$ac_ext >&5
6755   rm -rf conftest*
6756   eval "ac_cv_lib_$ac_lib_var=no"
6757 fi
6758 rm -f conftest*
6759 LIBS="$ac_save_LIBS"
6760
6761 fi
6762 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6763   echo "$ac_t""yes" 1>&6
6764   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6765 else
6766   echo "$ac_t""no" 1>&6
6767 fi
6768
6769               
6770 fi
6771
6772             
6773 fi
6774
6775           
6776 fi
6777
6778         
6779 fi
6780
6781       
6782 fi
6783
6784     ;;
6785   esac
6786
6787   if test "x$lt_cv_dlopen" != xno; then
6788     enable_dlopen=yes
6789   else
6790     enable_dlopen=no
6791   fi
6792
6793   case $lt_cv_dlopen in
6794   dlopen)
6795     save_CPPFLAGS="$CPPFLAGS"
6796         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6797
6798     save_LDFLAGS="$LDFLAGS"
6799     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6800
6801     save_LIBS="$LIBS"
6802     LIBS="$lt_cv_dlopen_libs $LIBS"
6803
6804     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6805 echo "configure:6806: checking whether a program can dlopen itself" >&5
6806 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6807   echo $ac_n "(cached) $ac_c" 1>&6
6808 else
6809           if test "$cross_compiling" = yes; then :
6810   lt_cv_dlopen_self=cross
6811 else
6812     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6813   lt_status=$lt_dlunknown
6814   cat > conftest.$ac_ext <<EOF
6815 #line 6816 "configure"
6816 #include "confdefs.h"
6817
6818 #if HAVE_DLFCN_H
6819 #include <dlfcn.h>
6820 #endif
6821
6822 #include <stdio.h>
6823
6824 #ifdef RTLD_GLOBAL
6825 #  define LT_DLGLOBAL           RTLD_GLOBAL
6826 #else
6827 #  ifdef DL_GLOBAL
6828 #    define LT_DLGLOBAL         DL_GLOBAL
6829 #  else
6830 #    define LT_DLGLOBAL         0
6831 #  endif
6832 #endif
6833
6834 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6835    find out it does not work in some platform. */
6836 #ifndef LT_DLLAZY_OR_NOW
6837 #  ifdef RTLD_LAZY
6838 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6839 #  else
6840 #    ifdef DL_LAZY
6841 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6842 #    else
6843 #      ifdef RTLD_NOW
6844 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6845 #      else
6846 #        ifdef DL_NOW
6847 #          define LT_DLLAZY_OR_NOW      DL_NOW
6848 #        else
6849 #          define LT_DLLAZY_OR_NOW      0
6850 #        endif
6851 #      endif
6852 #    endif
6853 #  endif
6854 #endif
6855
6856 #ifdef __cplusplus
6857 extern "C" void exit (int);
6858 #endif
6859
6860 void fnord() { int i=42;}
6861 int main ()
6862 {
6863   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6864   int status = $lt_dlunknown;
6865
6866   if (self)
6867     {
6868       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6869       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6870       /* dlclose (self); */
6871     }
6872
6873     exit (status);
6874 }
6875 EOF
6876   if { (eval echo configure:6877: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6877     (./conftest; exit; ) 2>/dev/null
6878     lt_status=$?
6879     case x$lt_status in
6880       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6881       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6882       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6883     esac
6884   else :
6885     # compilation failed
6886     lt_cv_dlopen_self=no
6887   fi
6888 fi
6889 rm -fr conftest*
6890
6891     
6892 fi
6893
6894 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6895
6896     if test "x$lt_cv_dlopen_self" = xyes; then
6897       LDFLAGS="$LDFLAGS $link_static_flag"
6898       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6899 echo "configure:6900: checking whether a statically linked program can dlopen itself" >&5
6900 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6901   echo $ac_n "(cached) $ac_c" 1>&6
6902 else
6903           if test "$cross_compiling" = yes; then :
6904   lt_cv_dlopen_self_static=cross
6905 else
6906     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6907   lt_status=$lt_dlunknown
6908   cat > conftest.$ac_ext <<EOF
6909 #line 6910 "configure"
6910 #include "confdefs.h"
6911
6912 #if HAVE_DLFCN_H
6913 #include <dlfcn.h>
6914 #endif
6915
6916 #include <stdio.h>
6917
6918 #ifdef RTLD_GLOBAL
6919 #  define LT_DLGLOBAL           RTLD_GLOBAL
6920 #else
6921 #  ifdef DL_GLOBAL
6922 #    define LT_DLGLOBAL         DL_GLOBAL
6923 #  else
6924 #    define LT_DLGLOBAL         0
6925 #  endif
6926 #endif
6927
6928 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6929    find out it does not work in some platform. */
6930 #ifndef LT_DLLAZY_OR_NOW
6931 #  ifdef RTLD_LAZY
6932 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6933 #  else
6934 #    ifdef DL_LAZY
6935 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6936 #    else
6937 #      ifdef RTLD_NOW
6938 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6939 #      else
6940 #        ifdef DL_NOW
6941 #          define LT_DLLAZY_OR_NOW      DL_NOW
6942 #        else
6943 #          define LT_DLLAZY_OR_NOW      0
6944 #        endif
6945 #      endif
6946 #    endif
6947 #  endif
6948 #endif
6949
6950 #ifdef __cplusplus
6951 extern "C" void exit (int);
6952 #endif
6953
6954 void fnord() { int i=42;}
6955 int main ()
6956 {
6957   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6958   int status = $lt_dlunknown;
6959
6960   if (self)
6961     {
6962       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6963       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6964       /* dlclose (self); */
6965     }
6966
6967     exit (status);
6968 }
6969 EOF
6970   if { (eval echo configure:6971: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6971     (./conftest; exit; ) 2>/dev/null
6972     lt_status=$?
6973     case x$lt_status in
6974       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6975       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6976       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6977     esac
6978   else :
6979     # compilation failed
6980     lt_cv_dlopen_self_static=no
6981   fi
6982 fi
6983 rm -fr conftest*
6984
6985       
6986 fi
6987
6988 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
6989     fi
6990
6991     CPPFLAGS="$save_CPPFLAGS"
6992     LDFLAGS="$save_LDFLAGS"
6993     LIBS="$save_LIBS"
6994     ;;
6995   esac
6996
6997   case $lt_cv_dlopen_self in
6998   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6999   *) enable_dlopen_self=unknown ;;
7000   esac
7001
7002   case $lt_cv_dlopen_self_static in
7003   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7004   *) enable_dlopen_self_static=unknown ;;
7005   esac
7006 fi
7007
7008
7009 if test "$enable_shared" = yes && test "$GCC" = yes; then
7010   case $archive_cmds in
7011   *'~'*)
7012     # FIXME: we may have to deal with multi-command sequences.
7013     ;;
7014   '$CC '*)
7015     # Test whether the compiler implicitly links with -lc since on some
7016     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7017     # to ld, don't add -lc before -lgcc.
7018     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7019 echo "configure:7020: checking whether -lc should be explicitly linked in" >&5
7020     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7021   echo $ac_n "(cached) $ac_c" 1>&6
7022 else
7023   $rm conftest*
7024     echo 'static int dummy;' > conftest.$ac_ext
7025
7026     if { (eval echo configure:7027: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7027       soname=conftest
7028       lib=conftest
7029       libobjs=conftest.$ac_objext
7030       deplibs=
7031       wl=$lt_cv_prog_cc_wl
7032       compiler_flags=-v
7033       linker_flags=-v
7034       verstring=
7035       output_objdir=.
7036       libname=conftest
7037       save_allow_undefined_flag=$allow_undefined_flag
7038       allow_undefined_flag=
7039       if { (eval echo configure:7040: \"$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; }
7040       then
7041         lt_cv_archive_cmds_need_lc=no
7042       else
7043         lt_cv_archive_cmds_need_lc=yes
7044       fi
7045       allow_undefined_flag=$save_allow_undefined_flag
7046     else
7047       cat conftest.err 1>&5
7048     fi
7049 fi
7050
7051     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7052     ;;
7053   esac
7054 fi
7055 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7056
7057 # The second clause should only fire when bootstrapping the
7058 # libtool distribution, otherwise you forgot to ship ltmain.sh
7059 # with your package, and you will get complaints that there are
7060 # no rules to generate ltmain.sh.
7061 if test -f "$ltmain"; then
7062   :
7063 else
7064   # If there is no Makefile yet, we rely on a make rule to execute
7065   # `config.status --recheck' to rerun these tests and create the
7066   # libtool script then.
7067   test -f Makefile && make "$ltmain"
7068 fi
7069
7070 if test -f "$ltmain"; then
7071   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7072   $rm -f "${ofile}T"
7073
7074   echo creating $ofile
7075
7076   # Now quote all the things that may contain metacharacters while being
7077   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7078   # variables and quote the copies for generation of the libtool script.
7079   for var in echo old_CC old_CFLAGS \
7080     AR AR_FLAGS CC LD LN_S NM SHELL \
7081     reload_flag reload_cmds wl \
7082     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7083     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7084     library_names_spec soname_spec \
7085     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7086     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7087     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7088     old_striplib striplib file_magic_cmd export_symbols_cmds \
7089     deplibs_check_method allow_undefined_flag no_undefined_flag \
7090     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7091     global_symbol_to_c_name_address \
7092     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7093     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7094     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7095
7096     case $var in
7097     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7098     old_postinstall_cmds | old_postuninstall_cmds | \
7099     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7100     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7101     postinstall_cmds | postuninstall_cmds | \
7102     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7103       # Double-quote double-evaled strings.
7104       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7105       ;;
7106     *)
7107       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7108       ;;
7109     esac
7110   done
7111
7112   cat <<__EOF__ > "${ofile}T"
7113 #! $SHELL
7114
7115 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7116 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7117 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7118 #
7119 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7120 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7121 #
7122 # This program is free software; you can redistribute it and/or modify
7123 # it under the terms of the GNU General Public License as published by
7124 # the Free Software Foundation; either version 2 of the License, or
7125 # (at your option) any later version.
7126 #
7127 # This program is distributed in the hope that it will be useful, but
7128 # WITHOUT ANY WARRANTY; without even the implied warranty of
7129 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7130 # General Public License for more details.
7131 #
7132 # You should have received a copy of the GNU General Public License
7133 # along with this program; if not, write to the Free Software
7134 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7135 #
7136 # As a special exception to the GNU General Public License, if you
7137 # distribute this file as part of a program that contains a
7138 # configuration script generated by Autoconf, you may include it under
7139 # the same distribution terms that you use for the rest of that program.
7140
7141 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7142 Xsed="sed -e s/^X//"
7143
7144 # The HP-UX ksh and POSIX shell print the target directory to stdout
7145 # if CDPATH is set.
7146 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7147
7148 # ### BEGIN LIBTOOL CONFIG
7149
7150 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7151
7152 # Shell to use when invoking shell scripts.
7153 SHELL=$lt_SHELL
7154
7155 # Whether or not to build shared libraries.
7156 build_libtool_libs=$enable_shared
7157
7158 # Whether or not to build static libraries.
7159 build_old_libs=$enable_static
7160
7161 # Whether or not to add -lc for building shared libraries.
7162 build_libtool_need_lc=$need_lc
7163
7164 # Whether or not to optimize for fast installation.
7165 fast_install=$enable_fast_install
7166
7167 # The host system.
7168 host_alias=$host_alias
7169 host=$host
7170
7171 # An echo program that does not interpret backslashes.
7172 echo=$lt_echo
7173
7174 # The archiver.
7175 AR=$lt_AR
7176 AR_FLAGS=$lt_AR_FLAGS
7177
7178 # The default C compiler.
7179 CC=$lt_CC
7180
7181 # Is the compiler the GNU C compiler?
7182 with_gcc=$GCC
7183
7184 # The linker used to build libraries.
7185 LD=$lt_LD
7186
7187 # Whether we need hard or soft links.
7188 LN_S=$lt_LN_S
7189
7190 # A BSD-compatible nm program.
7191 NM=$lt_NM
7192
7193 # A symbol stripping program
7194 STRIP=$STRIP
7195
7196 # Used to examine libraries when file_magic_cmd begins "file"
7197 MAGIC_CMD=$MAGIC_CMD
7198
7199 # Used on cygwin: DLL creation program.
7200 DLLTOOL="$DLLTOOL"
7201
7202 # Used on cygwin: object dumper.
7203 OBJDUMP="$OBJDUMP"
7204
7205 # Used on cygwin: assembler.
7206 AS="$AS"
7207
7208 # The name of the directory that contains temporary libtool files.
7209 objdir=$objdir
7210
7211 # How to create reloadable object files.
7212 reload_flag=$lt_reload_flag
7213 reload_cmds=$lt_reload_cmds
7214
7215 # How to pass a linker flag through the compiler.
7216 wl=$lt_wl
7217
7218 # Object file suffix (normally "o").
7219 objext="$ac_objext"
7220
7221 # Old archive suffix (normally "a").
7222 libext="$libext"
7223
7224 # Executable file suffix (normally "").
7225 exeext="$exeext"
7226
7227 # Additional compiler flags for building library objects.
7228 pic_flag=$lt_pic_flag
7229 pic_mode=$pic_mode
7230
7231 # Does compiler simultaneously support -c and -o options?
7232 compiler_c_o=$lt_compiler_c_o
7233
7234 # Can we write directly to a .lo ?
7235 compiler_o_lo=$lt_compiler_o_lo
7236
7237 # Must we lock files when doing compilation ?
7238 need_locks=$lt_need_locks
7239
7240 # Do we need the lib prefix for modules?
7241 need_lib_prefix=$need_lib_prefix
7242
7243 # Do we need a version for libraries?
7244 need_version=$need_version
7245
7246 # Whether dlopen is supported.
7247 dlopen_support=$enable_dlopen
7248
7249 # Whether dlopen of programs is supported.
7250 dlopen_self=$enable_dlopen_self
7251
7252 # Whether dlopen of statically linked programs is supported.
7253 dlopen_self_static=$enable_dlopen_self_static
7254
7255 # Compiler flag to prevent dynamic linking.
7256 link_static_flag=$lt_link_static_flag
7257
7258 # Compiler flag to turn off builtin functions.
7259 no_builtin_flag=$lt_no_builtin_flag
7260
7261 # Compiler flag to allow reflexive dlopens.
7262 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7263
7264 # Compiler flag to generate shared objects directly from archives.
7265 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7266
7267 # Compiler flag to generate thread-safe objects.
7268 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7269
7270 # Library versioning type.
7271 version_type=$version_type
7272
7273 # Format of library name prefix.
7274 libname_spec=$lt_libname_spec
7275
7276 # List of archive names.  First name is the real one, the rest are links.
7277 # The last name is the one that the linker finds with -lNAME.
7278 library_names_spec=$lt_library_names_spec
7279
7280 # The coded name of the library, if different from the real name.
7281 soname_spec=$lt_soname_spec
7282
7283 # Commands used to build and install an old-style archive.
7284 RANLIB=$lt_RANLIB
7285 old_archive_cmds=$lt_old_archive_cmds
7286 old_postinstall_cmds=$lt_old_postinstall_cmds
7287 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7288
7289 # Create an old-style archive from a shared archive.
7290 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7291
7292 # Create a temporary old-style archive to link instead of a shared archive.
7293 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7294
7295 # Commands used to build and install a shared archive.
7296 archive_cmds=$lt_archive_cmds
7297 archive_expsym_cmds=$lt_archive_expsym_cmds
7298 postinstall_cmds=$lt_postinstall_cmds
7299 postuninstall_cmds=$lt_postuninstall_cmds
7300
7301 # Commands to strip libraries.
7302 old_striplib=$lt_old_striplib
7303 striplib=$lt_striplib
7304
7305 # Method to check whether dependent libraries are shared objects.
7306 deplibs_check_method=$lt_deplibs_check_method
7307
7308 # Command to use when deplibs_check_method == file_magic.
7309 file_magic_cmd=$lt_file_magic_cmd
7310
7311 # Flag that allows shared libraries with undefined symbols to be built.
7312 allow_undefined_flag=$lt_allow_undefined_flag
7313
7314 # Flag that forces no undefined symbols.
7315 no_undefined_flag=$lt_no_undefined_flag
7316
7317 # Commands used to finish a libtool library installation in a directory.
7318 finish_cmds=$lt_finish_cmds
7319
7320 # Same as above, but a single script fragment to be evaled but not shown.
7321 finish_eval=$lt_finish_eval
7322
7323 # Take the output of nm and produce a listing of raw symbols and C names.
7324 global_symbol_pipe=$lt_global_symbol_pipe
7325
7326 # Transform the output of nm in a proper C declaration
7327 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7328
7329 # Transform the output of nm in a C name address pair
7330 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7331
7332 # This is the shared library runtime path variable.
7333 runpath_var=$runpath_var
7334
7335 # This is the shared library path variable.
7336 shlibpath_var=$shlibpath_var
7337
7338 # Is shlibpath searched before the hard-coded library search path?
7339 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7340
7341 # How to hardcode a shared library path into an executable.
7342 hardcode_action=$hardcode_action
7343
7344 # Whether we should hardcode library paths into libraries.
7345 hardcode_into_libs=$hardcode_into_libs
7346
7347 # Flag to hardcode \$libdir into a binary during linking.
7348 # This must work even if \$libdir does not exist.
7349 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7350
7351 # Whether we need a single -rpath flag with a separated argument.
7352 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7353
7354 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7355 # resulting binary.
7356 hardcode_direct=$hardcode_direct
7357
7358 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7359 # resulting binary.
7360 hardcode_minus_L=$hardcode_minus_L
7361
7362 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7363 # the resulting binary.
7364 hardcode_shlibpath_var=$hardcode_shlibpath_var
7365
7366 # Variables whose values should be saved in libtool wrapper scripts and
7367 # restored at relink time.
7368 variables_saved_for_relink="$variables_saved_for_relink"
7369
7370 # Whether libtool must link a program against all its dependency libraries.
7371 link_all_deplibs=$link_all_deplibs
7372
7373 # Compile-time system search path for libraries
7374 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7375
7376 # Run-time system search path for libraries
7377 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7378
7379 # Fix the shell variable \$srcfile for the compiler.
7380 fix_srcfile_path="$fix_srcfile_path"
7381
7382 # Set to yes if exported symbols are required.
7383 always_export_symbols=$always_export_symbols
7384
7385 # The commands to list exported symbols.
7386 export_symbols_cmds=$lt_export_symbols_cmds
7387
7388 # The commands to extract the exported symbol list from a shared archive.
7389 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7390
7391 # Symbols that should not be listed in the preloaded symbols.
7392 exclude_expsyms=$lt_exclude_expsyms
7393
7394 # Symbols that must always be exported.
7395 include_expsyms=$lt_include_expsyms
7396
7397 # ### END LIBTOOL CONFIG
7398
7399 __EOF__
7400
7401   case $host_os in
7402   aix3*)
7403     cat <<\EOF >> "${ofile}T"
7404
7405 # AIX sometimes has problems with the GCC collect2 program.  For some
7406 # reason, if we set the COLLECT_NAMES environment variable, the problems
7407 # vanish in a puff of smoke.
7408 if test "X${COLLECT_NAMES+set}" != Xset; then
7409   COLLECT_NAMES=
7410   export COLLECT_NAMES
7411 fi
7412 EOF
7413     ;;
7414   esac
7415
7416   case $host_os in
7417   cygwin* | mingw* | pw32* | os2*)
7418     cat <<'EOF' >> "${ofile}T"
7419       # This is a source program that is used to create dlls on Windows
7420       # Don't remove nor modify the starting and closing comments
7421 # /* ltdll.c starts here */
7422 # #define WIN32_LEAN_AND_MEAN
7423 # #include <windows.h>
7424 # #undef WIN32_LEAN_AND_MEAN
7425 # #include <stdio.h>
7426 #
7427 # #ifndef __CYGWIN__
7428 # #  ifdef __CYGWIN32__
7429 # #    define __CYGWIN__ __CYGWIN32__
7430 # #  endif
7431 # #endif
7432 #
7433 # #ifdef __cplusplus
7434 # extern "C" {
7435 # #endif
7436 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7437 # #ifdef __cplusplus
7438 # }
7439 # #endif
7440 #
7441 # #ifdef __CYGWIN__
7442 # #include <cygwin/cygwin_dll.h>
7443 # DECLARE_CYGWIN_DLL( DllMain );
7444 # #endif
7445 # HINSTANCE __hDllInstance_base;
7446 #
7447 # BOOL APIENTRY
7448 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7449 # {
7450 #   __hDllInstance_base = hInst;
7451 #   return TRUE;
7452 # }
7453 # /* ltdll.c ends here */
7454         # This is a source program that is used to create import libraries
7455         # on Windows for dlls which lack them. Don't remove nor modify the
7456         # starting and closing comments
7457 # /* impgen.c starts here */
7458 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7459 #
7460 #  This file is part of GNU libtool.
7461 #
7462 #  This program is free software; you can redistribute it and/or modify
7463 #  it under the terms of the GNU General Public License as published by
7464 #  the Free Software Foundation; either version 2 of the License, or
7465 #  (at your option) any later version.
7466 #
7467 #  This program is distributed in the hope that it will be useful,
7468 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7469 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7470 #  GNU General Public License for more details.
7471 #
7472 #  You should have received a copy of the GNU General Public License
7473 #  along with this program; if not, write to the Free Software
7474 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7475 #  */
7476 #
7477 # #include <stdio.h>            /* for printf() */
7478 # #include <unistd.h>           /* for open(), lseek(), read() */
7479 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7480 # #include <string.h>           /* for strdup() */
7481 #
7482 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7483 # #ifndef O_BINARY
7484 # #define O_BINARY 0
7485 # #endif
7486 #
7487 # static unsigned int
7488 # pe_get16 (fd, offset)
7489 #      int fd;
7490 #      int offset;
7491 # {
7492 #   unsigned char b[2];
7493 #   lseek (fd, offset, SEEK_SET);
7494 #   read (fd, b, 2);
7495 #   return b[0] + (b[1]<<8);
7496 # }
7497 #
7498 # static unsigned int
7499 # pe_get32 (fd, offset)
7500 #     int fd;
7501 #     int offset;
7502 # {
7503 #   unsigned char b[4];
7504 #   lseek (fd, offset, SEEK_SET);
7505 #   read (fd, b, 4);
7506 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7507 # }
7508 #
7509 # static unsigned int
7510 # pe_as32 (ptr)
7511 #      void *ptr;
7512 # {
7513 #   unsigned char *b = ptr;
7514 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7515 # }
7516 #
7517 # int
7518 # main (argc, argv)
7519 #     int argc;
7520 #     char *argv[];
7521 # {
7522 #     int dll;
7523 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7524 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7525 #     unsigned long name_rvas, nexp;
7526 #     unsigned char *expdata, *erva;
7527 #     char *filename, *dll_name;
7528 #
7529 #     filename = argv[1];
7530 #
7531 #     dll = open(filename, O_RDONLY|O_BINARY);
7532 #     if (dll < 1)
7533 #       return 1;
7534 #
7535 #     dll_name = filename;
7536 #
7537 #     for (i=0; filename[i]; i++)
7538 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7539 #           dll_name = filename + i +1;
7540 #
7541 #     pe_header_offset = pe_get32 (dll, 0x3c);
7542 #     opthdr_ofs = pe_header_offset + 4 + 20;
7543 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7544 #
7545 #     if (num_entries < 1) /* no exports */
7546 #       return 1;
7547 #
7548 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7549 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7550 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7551 #     secptr = (pe_header_offset + 4 + 20 +
7552 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7553 #
7554 #     expptr = 0;
7555 #     for (i = 0; i < nsections; i++)
7556 #     {
7557 #       char sname[8];
7558 #       unsigned long secptr1 = secptr + 40 * i;
7559 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7560 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7561 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7562 #       lseek(dll, secptr1, SEEK_SET);
7563 #       read(dll, sname, 8);
7564 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7565 #       {
7566 #           expptr = fptr + (export_rva - vaddr);
7567 #           if (export_rva + export_size > vaddr + vsize)
7568 #               export_size = vsize - (export_rva - vaddr);
7569 #           break;
7570 #       }
7571 #     }
7572 #
7573 #     expdata = (unsigned char*)malloc(export_size);
7574 #     lseek (dll, expptr, SEEK_SET);
7575 #     read (dll, expdata, export_size);
7576 #     erva = expdata - export_rva;
7577 #
7578 #     nexp = pe_as32 (expdata+24);
7579 #     name_rvas = pe_as32 (expdata+32);
7580 #
7581 #     printf ("EXPORTS\n");
7582 #     for (i = 0; i<nexp; i++)
7583 #     {
7584 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7585 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7586 #     }
7587 #
7588 #     return 0;
7589 # }
7590 # /* impgen.c ends here */
7591
7592 EOF
7593     ;;
7594   esac
7595
7596   # We use sed instead of cat because bash on DJGPP gets confused if
7597   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7598   # text mode, it properly converts lines to CR/LF.  This bash problem
7599   # is reportedly fixed, but why not run on old versions too?
7600   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7601
7602   mv -f "${ofile}T" "$ofile" || \
7603     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7604   chmod +x "$ofile"
7605 fi
7606
7607
7608
7609
7610
7611 # This can be used to rebuild libtool when needed
7612 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7613
7614 # Always use our own libtool.
7615 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7616
7617 # Prevent multiple expansion
7618
7619
7620
7621 for ac_prog in mawk gawk nawk awk
7622 do
7623 # Extract the first word of "$ac_prog", so it can be a program name with args.
7624 set dummy $ac_prog; ac_word=$2
7625 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7626 echo "configure:7627: checking for $ac_word" >&5
7627 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7628   echo $ac_n "(cached) $ac_c" 1>&6
7629 else
7630   if test -n "$AWK"; then
7631   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7632 else
7633   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7634   ac_dummy="$PATH"
7635   for ac_dir in $ac_dummy; do
7636     test -z "$ac_dir" && ac_dir=.
7637     if test -f $ac_dir/$ac_word; then
7638       ac_cv_prog_AWK="$ac_prog"
7639       break
7640     fi
7641   done
7642   IFS="$ac_save_ifs"
7643 fi
7644 fi
7645 AWK="$ac_cv_prog_AWK"
7646 if test -n "$AWK"; then
7647   echo "$ac_t""$AWK" 1>&6
7648 else
7649   echo "$ac_t""no" 1>&6
7650 fi
7651
7652 test -n "$AWK" && break
7653 done
7654
7655 # test for ln hardlink support
7656 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7657 echo "configure:7658: checking whether ln works" >&5
7658 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7659   echo $ac_n "(cached) $ac_c" 1>&6
7660 else
7661   rm -f conftest.src conftest.dst
7662 echo "conftest" > conftest.src
7663 if ln conftest.src conftest.dst 2>/dev/null
7664 then
7665   ol_cv_prog_LN_H="ln"
7666 else
7667   ol_cv_prog_LN_H="cp"
7668 fi
7669 rm -f conftest.src conftest.dst
7670
7671 fi
7672 LN_H="$ol_cv_prog_LN_H"
7673 if test "$ol_cv_prog_LN_H" = "ln"; then
7674         echo "$ac_t""yes" 1>&6
7675 else
7676         echo "$ac_t""no" 1>&6
7677 fi
7678
7679 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7680 echo "configure:7681: checking whether ln -s works" >&5
7681 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7682   echo $ac_n "(cached) $ac_c" 1>&6
7683 else
7684   rm -f conftestdata
7685 if ln -s X conftestdata 2>/dev/null
7686 then
7687   rm -f conftestdata
7688   ac_cv_prog_LN_S="ln -s"
7689 else
7690   ac_cv_prog_LN_S=ln
7691 fi
7692 fi
7693 LN_S="$ac_cv_prog_LN_S"
7694 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7695   echo "$ac_t""yes" 1>&6
7696 else
7697   echo "$ac_t""no" 1>&6
7698 fi
7699
7700
7701 # Extract the first word of "sendmail", so it can be a program name with args.
7702 set dummy sendmail; ac_word=$2
7703 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7704 echo "configure:7705: checking for $ac_word" >&5
7705 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7706   echo $ac_n "(cached) $ac_c" 1>&6
7707 else
7708   case "$SENDMAIL" in
7709   /*)
7710   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7711   ;;
7712   ?:/*)
7713   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7714   ;;
7715   *)
7716   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7717   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7718   for ac_dir in $ac_dummy; do 
7719     test -z "$ac_dir" && ac_dir=.
7720     if test -f $ac_dir/$ac_word; then
7721       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7722       break
7723     fi
7724   done
7725   IFS="$ac_save_ifs"
7726   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7727   ;;
7728 esac
7729 fi
7730 SENDMAIL="$ac_cv_path_SENDMAIL"
7731 if test -n "$SENDMAIL"; then
7732   echo "$ac_t""$SENDMAIL" 1>&6
7733 else
7734   echo "$ac_t""no" 1>&6
7735 fi
7736
7737 # Extract the first word of "vi", so it can be a program name with args.
7738 set dummy vi; ac_word=$2
7739 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7740 echo "configure:7741: checking for $ac_word" >&5
7741 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7742   echo $ac_n "(cached) $ac_c" 1>&6
7743 else
7744   case "$EDITOR" in
7745   /*)
7746   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7747   ;;
7748   ?:/*)
7749   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7750   ;;
7751   *)
7752   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7753   ac_dummy="$PATH:/usr/ucb"
7754   for ac_dir in $ac_dummy; do 
7755     test -z "$ac_dir" && ac_dir=.
7756     if test -f $ac_dir/$ac_word; then
7757       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7758       break
7759     fi
7760   done
7761   IFS="$ac_save_ifs"
7762   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7763   ;;
7764 esac
7765 fi
7766 EDITOR="$ac_cv_path_EDITOR"
7767 if test -n "$EDITOR"; then
7768   echo "$ac_t""$EDITOR" 1>&6
7769 else
7770   echo "$ac_t""no" 1>&6
7771 fi
7772
7773
7774 ol_link_perl=no
7775 if test $ol_enable_perl != no ; then
7776         # Extract the first word of "perl", so it can be a program name with args.
7777 set dummy perl; ac_word=$2
7778 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7779 echo "configure:7780: checking for $ac_word" >&5
7780 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7781   echo $ac_n "(cached) $ac_c" 1>&6
7782 else
7783   case "$PERLBIN" in
7784   /*)
7785   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7786   ;;
7787   ?:/*)
7788   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7789   ;;
7790   *)
7791   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7792   ac_dummy="$PATH"
7793   for ac_dir in $ac_dummy; do 
7794     test -z "$ac_dir" && ac_dir=.
7795     if test -f $ac_dir/$ac_word; then
7796       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7797       break
7798     fi
7799   done
7800   IFS="$ac_save_ifs"
7801   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7802   ;;
7803 esac
7804 fi
7805 PERLBIN="$ac_cv_path_PERLBIN"
7806 if test -n "$PERLBIN"; then
7807   echo "$ac_t""$PERLBIN" 1>&6
7808 else
7809   echo "$ac_t""no" 1>&6
7810 fi
7811
7812
7813         if test "no$PERLBIN" = "no" ; then
7814                 if test $ol_enable_perl = yes ; then
7815                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7816                 fi
7817
7818         else
7819                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7820                 if test x"$ol_with_perl_module" = "xstatic" ; then
7821                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7822                 else
7823                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7824                 fi
7825                                 ol_link_perl=yes
7826         fi
7827 fi
7828
7829 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7830 echo "configure:7831: checking how to run the C preprocessor" >&5
7831 # On Suns, sometimes $CPP names a directory.
7832 if test -n "$CPP" && test -d "$CPP"; then
7833   CPP=
7834 fi
7835 if test -z "$CPP"; then
7836 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7837   echo $ac_n "(cached) $ac_c" 1>&6
7838 else
7839     # This must be in double quotes, not single quotes, because CPP may get
7840   # substituted into the Makefile and "${CC-cc}" will confuse make.
7841   CPP="${CC-cc} -E"
7842   # On the NeXT, cc -E runs the code through the compiler's parser,
7843   # not just through cpp.
7844   cat > conftest.$ac_ext <<EOF
7845 #line 7846 "configure"
7846 #include "confdefs.h"
7847 #include <assert.h>
7848 Syntax Error
7849 EOF
7850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7851 { (eval echo configure:7852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7853 if test -z "$ac_err"; then
7854   :
7855 else
7856   echo "$ac_err" >&5
7857   echo "configure: failed program was:" >&5
7858   cat conftest.$ac_ext >&5
7859   rm -rf conftest*
7860   CPP="${CC-cc} -E -traditional-cpp"
7861   cat > conftest.$ac_ext <<EOF
7862 #line 7863 "configure"
7863 #include "confdefs.h"
7864 #include <assert.h>
7865 Syntax Error
7866 EOF
7867 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7868 { (eval echo configure:7869: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7869 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7870 if test -z "$ac_err"; then
7871   :
7872 else
7873   echo "$ac_err" >&5
7874   echo "configure: failed program was:" >&5
7875   cat conftest.$ac_ext >&5
7876   rm -rf conftest*
7877   CPP="${CC-cc} -nologo -E"
7878   cat > conftest.$ac_ext <<EOF
7879 #line 7880 "configure"
7880 #include "confdefs.h"
7881 #include <assert.h>
7882 Syntax Error
7883 EOF
7884 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7885 { (eval echo configure:7886: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7886 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7887 if test -z "$ac_err"; then
7888   :
7889 else
7890   echo "$ac_err" >&5
7891   echo "configure: failed program was:" >&5
7892   cat conftest.$ac_ext >&5
7893   rm -rf conftest*
7894   CPP=/lib/cpp
7895 fi
7896 rm -f conftest*
7897 fi
7898 rm -f conftest*
7899 fi
7900 rm -f conftest*
7901   ac_cv_prog_CPP="$CPP"
7902 fi
7903   CPP="$ac_cv_prog_CPP"
7904 else
7905   ac_cv_prog_CPP="$CPP"
7906 fi
7907 echo "$ac_t""$CPP" 1>&6
7908
7909
7910 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7911         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7912
7913 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7914         echo "configure: warning: programs compiled here do run here..." 1>&2
7915         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7916
7917 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7918         echo "configure: warning: programs compiled here do not run here..." 1>&2
7919         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7920 fi
7921
7922
7923 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7924 echo "configure:7925: checking for Cygwin environment" >&5
7925 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7926   echo $ac_n "(cached) $ac_c" 1>&6
7927 else
7928   cat > conftest.$ac_ext <<EOF
7929 #line 7930 "configure"
7930 #include "confdefs.h"
7931
7932 int main() {
7933
7934 #ifndef __CYGWIN__
7935 #define __CYGWIN__ __CYGWIN32__
7936 #endif
7937 return __CYGWIN__;
7938 ; return 0; }
7939 EOF
7940 if { (eval echo configure:7941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7941   rm -rf conftest*
7942   ac_cv_cygwin=yes
7943 else
7944   echo "configure: failed program was:" >&5
7945   cat conftest.$ac_ext >&5
7946   rm -rf conftest*
7947   ac_cv_cygwin=no
7948 fi
7949 rm -f conftest*
7950 fi
7951
7952 echo "$ac_t""$ac_cv_cygwin" 1>&6
7953 CYGWIN=
7954 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7955 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7956 echo "configure:7957: checking for mingw32 environment" >&5
7957 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7958   echo $ac_n "(cached) $ac_c" 1>&6
7959 else
7960   cat > conftest.$ac_ext <<EOF
7961 #line 7962 "configure"
7962 #include "confdefs.h"
7963
7964 int main() {
7965 return __MINGW32__;
7966 ; return 0; }
7967 EOF
7968 if { (eval echo configure:7969: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7969   rm -rf conftest*
7970   ac_cv_mingw32=yes
7971 else
7972   echo "configure: failed program was:" >&5
7973   cat conftest.$ac_ext >&5
7974   rm -rf conftest*
7975   ac_cv_mingw32=no
7976 fi
7977 rm -f conftest*
7978 fi
7979
7980 echo "$ac_t""$ac_cv_mingw32" 1>&6
7981 MINGW32=
7982 test "$ac_cv_mingw32" = yes && MINGW32=yes
7983
7984
7985
7986 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7987 echo "configure:7988: checking for executable suffix" >&5
7988 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7989   echo $ac_n "(cached) $ac_c" 1>&6
7990 else
7991   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7992   ac_cv_exeext=.exe
7993 else
7994   rm -f conftest*
7995   echo 'int main () { return 0; }' > conftest.$ac_ext
7996   ac_cv_exeext=
7997   if { (eval echo configure:7998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7998     for file in conftest.*; do
7999       case $file in
8000       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8001       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8002       esac
8003     done
8004   else
8005     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8006   fi
8007   rm -f conftest*
8008   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8009 fi
8010 fi
8011
8012 EXEEXT=""
8013 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8014 echo "$ac_t""${ac_cv_exeext}" 1>&6
8015 ac_exeext=$EXEEXT
8016
8017 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8018 echo "configure:8019: checking for object suffix" >&5
8019 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8020   echo $ac_n "(cached) $ac_c" 1>&6
8021 else
8022   rm -f conftest*
8023 echo 'int i = 1;' > conftest.$ac_ext
8024 if { (eval echo configure:8025: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8025   for ac_file in conftest.*; do
8026     case $ac_file in
8027     *.c) ;;
8028     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8029     esac
8030   done
8031 else
8032   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8033 fi
8034 rm -f conftest*
8035 fi
8036
8037 echo "$ac_t""$ac_cv_objext" 1>&6
8038 OBJEXT=$ac_cv_objext
8039 ac_objext=$ac_cv_objext
8040
8041
8042 cat >> confdefs.h <<EOF
8043 #define EXEEXT "${EXEEXT}"
8044 EOF
8045
8046
8047 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8048 echo "configure:8049: checking for be_app in -lbe" >&5
8049 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8050 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8051   echo $ac_n "(cached) $ac_c" 1>&6
8052 else
8053   ac_save_LIBS="$LIBS"
8054 LIBS="-lbe -lroot -lnet $LIBS"
8055 cat > conftest.$ac_ext <<EOF
8056 #line 8057 "configure"
8057 #include "confdefs.h"
8058 /* Override any gcc2 internal prototype to avoid an error.  */
8059 /* We use char because int might match the return type of a gcc2
8060     builtin and then its argument prototype would still apply.  */
8061 char be_app();
8062
8063 int main() {
8064 be_app()
8065 ; return 0; }
8066 EOF
8067 if { (eval echo configure:8068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8068   rm -rf conftest*
8069   eval "ac_cv_lib_$ac_lib_var=yes"
8070 else
8071   echo "configure: failed program was:" >&5
8072   cat conftest.$ac_ext >&5
8073   rm -rf conftest*
8074   eval "ac_cv_lib_$ac_lib_var=no"
8075 fi
8076 rm -f conftest*
8077 LIBS="$ac_save_LIBS"
8078
8079 fi
8080 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8081   echo "$ac_t""yes" 1>&6
8082   LIBS="$LIBS -lbe -lroot -lnet"
8083 else
8084   echo "$ac_t""no" 1>&6
8085 :
8086 fi
8087
8088
8089
8090
8091
8092 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8093 echo "configure:8094: checking for ${CC-cc} option to accept ANSI C" >&5
8094 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8095   echo $ac_n "(cached) $ac_c" 1>&6
8096 else
8097   am_cv_prog_cc_stdc=no
8098 ac_save_CC="$CC"
8099 # Don't try gcc -ansi; that turns off useful extensions and
8100 # breaks some systems' header files.
8101 # AIX                   -qlanglvl=ansi
8102 # Ultrix and OSF/1      -std1
8103 # HP-UX 10.20 and later -Ae
8104 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8105 # SVR4                  -Xc -D__EXTENSIONS__
8106 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8107 do
8108   CC="$ac_save_CC $ac_arg"
8109   cat > conftest.$ac_ext <<EOF
8110 #line 8111 "configure"
8111 #include "confdefs.h"
8112 #include <stdarg.h>
8113 #include <stdio.h>
8114 #include <sys/types.h>
8115 #include <sys/stat.h>
8116 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8117 struct buf { int x; };
8118 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8119 static char *e (p, i)
8120      char **p;
8121      int i;
8122 {
8123   return p[i];
8124 }
8125 static char *f (char * (*g) (char **, int), char **p, ...)
8126 {
8127   char *s;
8128   va_list v;
8129   va_start (v,p);
8130   s = g (p, va_arg (v,int));
8131   va_end (v);
8132   return s;
8133 }
8134 int test (int i, double x);
8135 struct s1 {int (*f) (int a);};
8136 struct s2 {int (*f) (double a);};
8137 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8138 int argc;
8139 char **argv;
8140
8141 int main() {
8142
8143 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8144
8145 ; return 0; }
8146 EOF
8147 if { (eval echo configure:8148: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8148   rm -rf conftest*
8149   am_cv_prog_cc_stdc="$ac_arg"; break
8150 else
8151   echo "configure: failed program was:" >&5
8152   cat conftest.$ac_ext >&5
8153 fi
8154 rm -f conftest*
8155 done
8156 CC="$ac_save_CC"
8157
8158 fi
8159
8160 if test -z "$am_cv_prog_cc_stdc"; then
8161   echo "$ac_t""none needed" 1>&6
8162 else
8163   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8164 fi
8165 case "x$am_cv_prog_cc_stdc" in
8166   x|xno) ;;
8167   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8168 esac
8169
8170 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8171         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8172 fi
8173
8174 # test for make depend flag
8175 OL_MKDEP=
8176 OL_MKDEP_FLAGS=
8177 if test -z "${MKDEP}"; then
8178         OL_MKDEP="${CC-cc}"
8179         if test -z "${MKDEP_FLAGS}"; then
8180                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8181 echo "configure:8182: checking for ${OL_MKDEP} depend flag" >&5
8182 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8183   echo $ac_n "(cached) $ac_c" 1>&6
8184 else
8185   
8186                         ol_cv_mkdep=no
8187                         for flag in "-M" "-xM"; do
8188                                 cat > conftest.c <<EOF
8189  noCode;
8190 EOF
8191                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8192: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8192                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8193                                 then
8194                                         if test ! -f conftest."${ac_object}" ; then
8195                                                 ol_cv_mkdep=$flag
8196                                                 OL_MKDEP_FLAGS="$flag"
8197                                                 break
8198                                         fi
8199                                 fi
8200                         done
8201                         rm -f conftest*
8202                 
8203 fi
8204
8205 echo "$ac_t""$ol_cv_mkdep" 1>&6
8206         else
8207                 cc_cv_mkdep=yes
8208                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8209         fi
8210 else
8211         cc_cv_mkdep=yes
8212         OL_MKDEP="${MKDEP}"
8213         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8214 fi
8215
8216
8217
8218 if test "${ol_cv_mkdep}" = no ; then
8219         # this will soon become an error
8220         echo "configure: warning: do not know how to generate dependencies" 1>&2
8221 fi
8222
8223 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8224 echo "configure:8225: checking for afopen in -ls" >&5
8225 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8226 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8227   echo $ac_n "(cached) $ac_c" 1>&6
8228 else
8229   ac_save_LIBS="$LIBS"
8230 LIBS="-ls  $LIBS"
8231 cat > conftest.$ac_ext <<EOF
8232 #line 8233 "configure"
8233 #include "confdefs.h"
8234 /* Override any gcc2 internal prototype to avoid an error.  */
8235 /* We use char because int might match the return type of a gcc2
8236     builtin and then its argument prototype would still apply.  */
8237 char afopen();
8238
8239 int main() {
8240 afopen()
8241 ; return 0; }
8242 EOF
8243 if { (eval echo configure:8244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8244   rm -rf conftest*
8245   eval "ac_cv_lib_$ac_lib_var=yes"
8246 else
8247   echo "configure: failed program was:" >&5
8248   cat conftest.$ac_ext >&5
8249   rm -rf conftest*
8250   eval "ac_cv_lib_$ac_lib_var=no"
8251 fi
8252 rm -f conftest*
8253 LIBS="$ac_save_LIBS"
8254
8255 fi
8256 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8257   echo "$ac_t""yes" 1>&6
8258   
8259         AUTH_LIBS=-ls
8260         cat >> confdefs.h <<\EOF
8261 #define HAVE_AIX_SECURITY 1
8262 EOF
8263
8264
8265 else
8266   echo "$ac_t""no" 1>&6
8267 fi
8268
8269
8270 case "$target" in
8271 *-ibm-openedition)
8272         ac_cv_func_getopt=no
8273         cat >> confdefs.h <<\EOF
8274 #define BOTH_STRINGS_H 1
8275 EOF
8276
8277         ;;
8278 esac
8279
8280 ol_link_modules=no
8281 if test $ol_enable_modules != no ; then
8282         for ac_hdr in ltdl.h
8283 do
8284 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8285 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8286 echo "configure:8287: checking for $ac_hdr" >&5
8287 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8288   echo $ac_n "(cached) $ac_c" 1>&6
8289 else
8290   cat > conftest.$ac_ext <<EOF
8291 #line 8292 "configure"
8292 #include "confdefs.h"
8293 #include <$ac_hdr>
8294 EOF
8295 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8296 { (eval echo configure:8297: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8297 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8298 if test -z "$ac_err"; then
8299   rm -rf conftest*
8300   eval "ac_cv_header_$ac_safe=yes"
8301 else
8302   echo "$ac_err" >&5
8303   echo "configure: failed program was:" >&5
8304   cat conftest.$ac_ext >&5
8305   rm -rf conftest*
8306   eval "ac_cv_header_$ac_safe=no"
8307 fi
8308 rm -f conftest*
8309 fi
8310 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8311   echo "$ac_t""yes" 1>&6
8312     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8313   cat >> confdefs.h <<EOF
8314 #define $ac_tr_hdr 1
8315 EOF
8316  
8317 else
8318   echo "$ac_t""no" 1>&6
8319 fi
8320 done
8321
8322
8323         if test $ac_cv_header_ltdl_h = no ; then
8324                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8325         fi
8326
8327         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8328 echo "configure:8329: checking for lt_dlinit in -lltdl" >&5
8329 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8330 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8331   echo $ac_n "(cached) $ac_c" 1>&6
8332 else
8333   ac_save_LIBS="$LIBS"
8334 LIBS="-lltdl  $LIBS"
8335 cat > conftest.$ac_ext <<EOF
8336 #line 8337 "configure"
8337 #include "confdefs.h"
8338 /* Override any gcc2 internal prototype to avoid an error.  */
8339 /* We use char because int might match the return type of a gcc2
8340     builtin and then its argument prototype would still apply.  */
8341 char lt_dlinit();
8342
8343 int main() {
8344 lt_dlinit()
8345 ; return 0; }
8346 EOF
8347 if { (eval echo configure:8348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8348   rm -rf conftest*
8349   eval "ac_cv_lib_$ac_lib_var=yes"
8350 else
8351   echo "configure: failed program was:" >&5
8352   cat conftest.$ac_ext >&5
8353   rm -rf conftest*
8354   eval "ac_cv_lib_$ac_lib_var=no"
8355 fi
8356 rm -f conftest*
8357 LIBS="$ac_save_LIBS"
8358
8359 fi
8360 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8361   echo "$ac_t""yes" 1>&6
8362   
8363                 MODULES_LIBS=-lltdl
8364                 cat >> confdefs.h <<\EOF
8365 #define HAVE_LIBLTDL 1
8366 EOF
8367
8368         
8369 else
8370   echo "$ac_t""no" 1>&6
8371 fi
8372
8373
8374         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8375                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8376         fi
8377         ol_link_modules=yes
8378 else
8379         ol_with_bdb_module=static
8380         ol_with_dnssrv_module=static
8381         ol_with_ldap_module=static
8382         ol_with_ldbm_module=static
8383         ol_with_meta_module=static
8384         ol_with_monitor_module=static
8385         ol_with_null_module=static
8386         ol_with_passwd_module=static
8387         ol_with_perl_module=static
8388         ol_with_shell_module=static
8389         ol_with_sql_module=static
8390 fi
8391
8392 # test for EBCDIC
8393 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8394 echo "configure:8395: checking for EBCDIC" >&5
8395 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8396   echo $ac_n "(cached) $ac_c" 1>&6
8397 else
8398   
8399         cat > conftest.$ac_ext <<EOF
8400 #line 8401 "configure"
8401 #include "confdefs.h"
8402
8403 #if !('M' == 0xd4)
8404 #include <__ASCII__/generate_error.h>
8405 #endif
8406
8407 EOF
8408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8409 { (eval echo configure:8410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8411 if test -z "$ac_err"; then
8412   rm -rf conftest*
8413   ol_cv_cpp_ebcdic=yes
8414 else
8415   echo "$ac_err" >&5
8416   echo "configure: failed program was:" >&5
8417   cat conftest.$ac_ext >&5
8418   rm -rf conftest*
8419   ol_cv_cpp_ebcdic=no
8420 fi
8421 rm -f conftest*
8422 fi
8423
8424 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8425 if test $ol_cv_cpp_ebcdic = yes ; then
8426         cat >> confdefs.h <<\EOF
8427 #define HAVE_EBCDIC 1
8428 EOF
8429
8430 fi
8431
8432 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8433 echo "configure:8434: checking for ANSI C header files" >&5
8434 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8435   echo $ac_n "(cached) $ac_c" 1>&6
8436 else
8437   cat > conftest.$ac_ext <<EOF
8438 #line 8439 "configure"
8439 #include "confdefs.h"
8440 #include <stdlib.h>
8441 #include <stdarg.h>
8442 #include <string.h>
8443 #include <float.h>
8444 EOF
8445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8446 { (eval echo configure:8447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8448 if test -z "$ac_err"; then
8449   rm -rf conftest*
8450   ol_cv_header_stdc=yes
8451 else
8452   echo "$ac_err" >&5
8453   echo "configure: failed program was:" >&5
8454   cat conftest.$ac_ext >&5
8455   rm -rf conftest*
8456   ol_cv_header_stdc=no
8457 fi
8458 rm -f conftest*
8459
8460 if test $ol_cv_header_stdc = yes; then
8461   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8462 cat > conftest.$ac_ext <<EOF
8463 #line 8464 "configure"
8464 #include "confdefs.h"
8465 #include <string.h>
8466 EOF
8467 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8468   egrep "memchr" >/dev/null 2>&1; then
8469   :
8470 else
8471   rm -rf conftest*
8472   ol_cv_header_stdc=no
8473 fi
8474 rm -f conftest*
8475
8476 fi
8477
8478 if test $ol_cv_header_stdc = yes; then
8479   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8480 cat > conftest.$ac_ext <<EOF
8481 #line 8482 "configure"
8482 #include "confdefs.h"
8483 #include <stdlib.h>
8484 EOF
8485 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8486   egrep "free" >/dev/null 2>&1; then
8487   :
8488 else
8489   rm -rf conftest*
8490   ol_cv_header_stdc=no
8491 fi
8492 rm -f conftest*
8493
8494 fi
8495
8496 if test $ol_cv_header_stdc = yes; then
8497   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8498 if test "$cross_compiling" = yes; then
8499   :
8500 else
8501   cat > conftest.$ac_ext <<EOF
8502 #line 8503 "configure"
8503 #include "confdefs.h"
8504 #include <ctype.h>
8505 #ifndef HAVE_EBCDIC
8506 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8507 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8508 #else
8509 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8510                 || ('j' <= (c) && (c) <= 'r') \
8511                 || ('s' <= (c) && (c) <= 'z'))
8512 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8513 #endif
8514 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8515 int main () { int i; for (i = 0; i < 256; i++)
8516 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8517 exit (0); }
8518
8519 EOF
8520 if { (eval echo configure:8521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8521 then
8522   :
8523 else
8524   echo "configure: failed program was:" >&5
8525   cat conftest.$ac_ext >&5
8526   rm -fr conftest*
8527   ol_cv_header_stdc=no
8528 fi
8529 rm -fr conftest*
8530 fi
8531
8532 fi
8533 fi
8534
8535 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8536 if test $ol_cv_header_stdc = yes; then
8537   cat >> confdefs.h <<\EOF
8538 #define STDC_HEADERS 1
8539 EOF
8540
8541 fi
8542 ac_cv_header_stdc=disable
8543
8544
8545 if test $ol_cv_header_stdc != yes; then
8546         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8547 fi
8548
8549 ac_header_dirent=no
8550 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8551 do
8552 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8553 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8554 echo "configure:8555: checking for $ac_hdr that defines DIR" >&5
8555 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8556   echo $ac_n "(cached) $ac_c" 1>&6
8557 else
8558   cat > conftest.$ac_ext <<EOF
8559 #line 8560 "configure"
8560 #include "confdefs.h"
8561 #include <sys/types.h>
8562 #include <$ac_hdr>
8563 int main() {
8564 DIR *dirp = 0;
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   eval "ac_cv_header_dirent_$ac_safe=yes"
8570 else
8571   echo "configure: failed program was:" >&5
8572   cat conftest.$ac_ext >&5
8573   rm -rf conftest*
8574   eval "ac_cv_header_dirent_$ac_safe=no"
8575 fi
8576 rm -f conftest*
8577 fi
8578 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8579   echo "$ac_t""yes" 1>&6
8580     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8581   cat >> confdefs.h <<EOF
8582 #define $ac_tr_hdr 1
8583 EOF
8584  ac_header_dirent=$ac_hdr; break
8585 else
8586   echo "$ac_t""no" 1>&6
8587 fi
8588 done
8589 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8590 if test $ac_header_dirent = dirent.h; then
8591 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8592 echo "configure:8593: checking for opendir in -ldir" >&5
8593 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8594 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8595   echo $ac_n "(cached) $ac_c" 1>&6
8596 else
8597   ac_save_LIBS="$LIBS"
8598 LIBS="-ldir  $LIBS"
8599 cat > conftest.$ac_ext <<EOF
8600 #line 8601 "configure"
8601 #include "confdefs.h"
8602 /* Override any gcc2 internal prototype to avoid an error.  */
8603 /* We use char because int might match the return type of a gcc2
8604     builtin and then its argument prototype would still apply.  */
8605 char opendir();
8606
8607 int main() {
8608 opendir()
8609 ; return 0; }
8610 EOF
8611 if { (eval echo configure:8612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8612   rm -rf conftest*
8613   eval "ac_cv_lib_$ac_lib_var=yes"
8614 else
8615   echo "configure: failed program was:" >&5
8616   cat conftest.$ac_ext >&5
8617   rm -rf conftest*
8618   eval "ac_cv_lib_$ac_lib_var=no"
8619 fi
8620 rm -f conftest*
8621 LIBS="$ac_save_LIBS"
8622
8623 fi
8624 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8625   echo "$ac_t""yes" 1>&6
8626   LIBS="$LIBS -ldir"
8627 else
8628   echo "$ac_t""no" 1>&6
8629 fi
8630
8631 else
8632 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8633 echo "configure:8634: checking for opendir in -lx" >&5
8634 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8635 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8636   echo $ac_n "(cached) $ac_c" 1>&6
8637 else
8638   ac_save_LIBS="$LIBS"
8639 LIBS="-lx  $LIBS"
8640 cat > conftest.$ac_ext <<EOF
8641 #line 8642 "configure"
8642 #include "confdefs.h"
8643 /* Override any gcc2 internal prototype to avoid an error.  */
8644 /* We use char because int might match the return type of a gcc2
8645     builtin and then its argument prototype would still apply.  */
8646 char opendir();
8647
8648 int main() {
8649 opendir()
8650 ; return 0; }
8651 EOF
8652 if { (eval echo configure:8653: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8653   rm -rf conftest*
8654   eval "ac_cv_lib_$ac_lib_var=yes"
8655 else
8656   echo "configure: failed program was:" >&5
8657   cat conftest.$ac_ext >&5
8658   rm -rf conftest*
8659   eval "ac_cv_lib_$ac_lib_var=no"
8660 fi
8661 rm -f conftest*
8662 LIBS="$ac_save_LIBS"
8663
8664 fi
8665 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8666   echo "$ac_t""yes" 1>&6
8667   LIBS="$LIBS -lx"
8668 else
8669   echo "$ac_t""no" 1>&6
8670 fi
8671
8672 fi
8673
8674 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8675 echo "configure:8676: checking for sys/wait.h that is POSIX.1 compatible" >&5
8676 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8677   echo $ac_n "(cached) $ac_c" 1>&6
8678 else
8679   cat > conftest.$ac_ext <<EOF
8680 #line 8681 "configure"
8681 #include "confdefs.h"
8682 #include <sys/types.h>
8683 #include <sys/wait.h>
8684 #ifndef WEXITSTATUS
8685 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8686 #endif
8687 #ifndef WIFEXITED
8688 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8689 #endif
8690 int main() {
8691 int s;
8692 wait (&s);
8693 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8694 ; return 0; }
8695 EOF
8696 if { (eval echo configure:8697: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8697   rm -rf conftest*
8698   ac_cv_header_sys_wait_h=yes
8699 else
8700   echo "configure: failed program was:" >&5
8701   cat conftest.$ac_ext >&5
8702   rm -rf conftest*
8703   ac_cv_header_sys_wait_h=no
8704 fi
8705 rm -f conftest*
8706 fi
8707
8708 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8709 if test $ac_cv_header_sys_wait_h = yes; then
8710   cat >> confdefs.h <<\EOF
8711 #define HAVE_SYS_WAIT_H 1
8712 EOF
8713
8714 fi
8715
8716 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8717 echo "configure:8718: checking POSIX termios" >&5
8718 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8719   echo $ac_n "(cached) $ac_c" 1>&6
8720 else
8721   cat > conftest.$ac_ext <<EOF
8722 #line 8723 "configure"
8723 #include "confdefs.h"
8724 #include <sys/types.h>
8725 #include <unistd.h>
8726 #include <termios.h>
8727 int main() {
8728 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8729    tcgetattr(0, 0);
8730 ; return 0; }
8731 EOF
8732 if { (eval echo configure:8733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8733   rm -rf conftest*
8734   am_cv_sys_posix_termios=yes
8735 else
8736   echo "configure: failed program was:" >&5
8737   cat conftest.$ac_ext >&5
8738   rm -rf conftest*
8739   am_cv_sys_posix_termios=no
8740 fi
8741 rm -f conftest*
8742 fi
8743
8744 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8745
8746
8747  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8748 echo "configure:8749: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8749 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8750   echo $ac_n "(cached) $ac_c" 1>&6
8751 else
8752   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8753
8754   gwinsz_in_termios_h=no
8755   if test $am_cv_sys_posix_termios = yes; then
8756     cat > conftest.$ac_ext <<EOF
8757 #line 8758 "configure"
8758 #include "confdefs.h"
8759 #include <sys/types.h>
8760 #     include <termios.h>
8761 #     ifdef TIOCGWINSZ
8762         yes
8763 #     endif
8764     
8765 EOF
8766 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8767   egrep "yes" >/dev/null 2>&1; then
8768   rm -rf conftest*
8769   gwinsz_in_termios_h=yes
8770 fi
8771 rm -f conftest*
8772
8773   fi
8774
8775   if test $gwinsz_in_termios_h = no; then
8776     cat > conftest.$ac_ext <<EOF
8777 #line 8778 "configure"
8778 #include "confdefs.h"
8779 #include <sys/types.h>
8780 #     include <sys/ioctl.h>
8781 #     ifdef TIOCGWINSZ
8782         yes
8783 #     endif
8784     
8785 EOF
8786 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8787   egrep "yes" >/dev/null 2>&1; then
8788   rm -rf conftest*
8789   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8790 fi
8791 rm -f conftest*
8792
8793   fi
8794   
8795 fi
8796
8797 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8798   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8799     cat >> confdefs.h <<\EOF
8800 #define GWINSZ_IN_SYS_IOCTL 1
8801 EOF
8802
8803   fi
8804
8805 if test $am_cv_sys_posix_termios = yes ; then
8806         cat >> confdefs.h <<\EOF
8807 #define HAVE_POSIX_TERMIOS 1
8808 EOF
8809
8810 fi
8811
8812 for ac_hdr in \
8813         arpa/inet.h             \
8814         arpa/nameser.h  \
8815         assert.h                \
8816         conio.h                 \
8817         crypt.h                 \
8818         direct.h                \
8819         errno.h                 \
8820         fcntl.h                 \
8821         filio.h                 \
8822         getopt.h                \
8823         grp.h                   \
8824         io.h                    \
8825         libutil.h               \
8826         limits.h                \
8827         locale.h                \
8828         netinet/tcp.h   \
8829         malloc.h                \
8830         memory.h                \
8831         psap.h                  \
8832         pwd.h                   \
8833         process.h               \
8834         resolv.h                \
8835         sgtty.h                 \
8836         shadow.h                \
8837         stddef.h                \
8838         string.h                \
8839         strings.h               \
8840         sysexits.h              \
8841         sys/file.h              \
8842         sys/filio.h             \
8843         sys/errno.h             \
8844         sys/ioctl.h             \
8845         sys/param.h             \
8846         sys/resource.h  \
8847         sys/select.h    \
8848         sys/socket.h    \
8849         sys/syslog.h    \
8850         sys/time.h              \
8851         sys/types.h             \
8852         syslog.h                \
8853         termios.h               \
8854         unistd.h                \
8855         winsock.h               \
8856         winsock2.h              \
8857
8858 do
8859 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8860 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8861 echo "configure:8862: checking for $ac_hdr" >&5
8862 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8863   echo $ac_n "(cached) $ac_c" 1>&6
8864 else
8865   cat > conftest.$ac_ext <<EOF
8866 #line 8867 "configure"
8867 #include "confdefs.h"
8868 #include <$ac_hdr>
8869 EOF
8870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8871 { (eval echo configure:8872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8872 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8873 if test -z "$ac_err"; then
8874   rm -rf conftest*
8875   eval "ac_cv_header_$ac_safe=yes"
8876 else
8877   echo "$ac_err" >&5
8878   echo "configure: failed program was:" >&5
8879   cat conftest.$ac_ext >&5
8880   rm -rf conftest*
8881   eval "ac_cv_header_$ac_safe=no"
8882 fi
8883 rm -f conftest*
8884 fi
8885 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8886   echo "$ac_t""yes" 1>&6
8887     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8888   cat >> confdefs.h <<EOF
8889 #define $ac_tr_hdr 1
8890 EOF
8891  
8892 else
8893   echo "$ac_t""no" 1>&6
8894 fi
8895 done
8896
8897
8898
8899
8900 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8901 echo "configure:8902: checking for dlopen" >&5
8902 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8903   echo $ac_n "(cached) $ac_c" 1>&6
8904 else
8905   cat > conftest.$ac_ext <<EOF
8906 #line 8907 "configure"
8907 #include "confdefs.h"
8908 /* System header to define __stub macros and hopefully few prototypes,
8909     which can conflict with char dlopen(); below.  */
8910 #include <assert.h>
8911 /* Override any gcc2 internal prototype to avoid an error.  */
8912 /* We use char because int might match the return type of a gcc2
8913     builtin and then its argument prototype would still apply.  */
8914 char dlopen();
8915 char (*f)();
8916
8917 int main() {
8918
8919 /* The GNU C library defines this for functions which it implements
8920     to always fail with ENOSYS.  Some functions are actually named
8921     something starting with __ and the normal name is an alias.  */
8922 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8923 choke me
8924 #else
8925 f = dlopen;
8926 #endif
8927
8928 ; return 0; }
8929 EOF
8930 if { (eval echo configure:8931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8931   rm -rf conftest*
8932   eval "ac_cv_func_dlopen=yes"
8933 else
8934   echo "configure: failed program was:" >&5
8935   cat conftest.$ac_ext >&5
8936   rm -rf conftest*
8937   eval "ac_cv_func_dlopen=no"
8938 fi
8939 rm -f conftest*
8940 fi
8941
8942 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8943   echo "$ac_t""yes" 1>&6
8944   :
8945 else
8946   echo "$ac_t""no" 1>&6
8947 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8948 echo "configure:8949: checking for dlopen in -ldl" >&5
8949 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8950 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8951   echo $ac_n "(cached) $ac_c" 1>&6
8952 else
8953   ac_save_LIBS="$LIBS"
8954 LIBS="-ldl  $LIBS"
8955 cat > conftest.$ac_ext <<EOF
8956 #line 8957 "configure"
8957 #include "confdefs.h"
8958 /* Override any gcc2 internal prototype to avoid an error.  */
8959 /* We use char because int might match the return type of a gcc2
8960     builtin and then its argument prototype would still apply.  */
8961 char dlopen();
8962
8963 int main() {
8964 dlopen()
8965 ; return 0; }
8966 EOF
8967 if { (eval echo configure:8968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8968   rm -rf conftest*
8969   eval "ac_cv_lib_$ac_lib_var=yes"
8970 else
8971   echo "configure: failed program was:" >&5
8972   cat conftest.$ac_ext >&5
8973   rm -rf conftest*
8974   eval "ac_cv_lib_$ac_lib_var=no"
8975 fi
8976 rm -f conftest*
8977 LIBS="$ac_save_LIBS"
8978
8979 fi
8980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8981   echo "$ac_t""yes" 1>&6
8982     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8983     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8984   cat >> confdefs.h <<EOF
8985 #define $ac_tr_lib 1
8986 EOF
8987
8988   LIBS="-ldl $LIBS"
8989
8990 else
8991   echo "$ac_t""no" 1>&6
8992 fi
8993
8994 fi
8995
8996
8997 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8998 echo "configure:8999: checking for sigset in -lV3" >&5
8999 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9000 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9001   echo $ac_n "(cached) $ac_c" 1>&6
9002 else
9003   ac_save_LIBS="$LIBS"
9004 LIBS="-lV3  $LIBS"
9005 cat > conftest.$ac_ext <<EOF
9006 #line 9007 "configure"
9007 #include "confdefs.h"
9008 /* Override any gcc2 internal prototype to avoid an error.  */
9009 /* We use char because int might match the return type of a gcc2
9010     builtin and then its argument prototype would still apply.  */
9011 char sigset();
9012
9013 int main() {
9014 sigset()
9015 ; return 0; }
9016 EOF
9017 if { (eval echo configure:9018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9018   rm -rf conftest*
9019   eval "ac_cv_lib_$ac_lib_var=yes"
9020 else
9021   echo "configure: failed program was:" >&5
9022   cat conftest.$ac_ext >&5
9023   rm -rf conftest*
9024   eval "ac_cv_lib_$ac_lib_var=no"
9025 fi
9026 rm -f conftest*
9027 LIBS="$ac_save_LIBS"
9028
9029 fi
9030 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9031   echo "$ac_t""yes" 1>&6
9032     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9033     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9034   cat >> confdefs.h <<EOF
9035 #define $ac_tr_lib 1
9036 EOF
9037
9038   LIBS="-lV3 $LIBS"
9039
9040 else
9041   echo "$ac_t""no" 1>&6
9042 fi
9043
9044
9045 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9046 echo "configure:9047: checking for winsock" >&5
9047 save_LIBS="$LIBS"
9048 for curlib in ws2_32 wsock32; do
9049         LIBS="$LIBS -l$curlib"
9050         cat > conftest.$ac_ext <<EOF
9051 #line 9052 "configure"
9052 #include "confdefs.h"
9053
9054                         char socket@12();
9055                         char select@20();
9056                         char closesocket@4();
9057                         char gethostname@8();
9058                         
9059 int main() {
9060
9061                         socket@12();
9062                         select@20();
9063                         closesocket@4();
9064                         gethostname@8();
9065                         
9066 ; return 0; }
9067 EOF
9068 if { (eval echo configure:9069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9069   rm -rf conftest*
9070   have_winsock=yes
9071 else
9072   echo "configure: failed program was:" >&5
9073   cat conftest.$ac_ext >&5
9074   rm -rf conftest*
9075   have_winsock=no
9076 fi
9077 rm -f conftest*
9078
9079         if test $have_winsock = yes; then
9080                 cat >> confdefs.h <<\EOF
9081 #define HAVE_WINSOCK 1
9082 EOF
9083
9084                 ac_cv_func_socket=yes
9085                 ac_cv_func_select=yes
9086                 ac_cv_func_closesocket=yes
9087                 ac_cv_func_gethostname=yes
9088                 if test $curlib = ws2_32; then
9089                         have_winsock=winsock2
9090                         cat >> confdefs.h <<\EOF
9091 #define HAVE_WINSOCK2 1
9092 EOF
9093
9094                 fi
9095                 break
9096         fi
9097         LIBS="$save_LIBS"
9098 done
9099 echo "$ac_t""$have_winsock" 1>&6
9100
9101
9102 echo $ac_n "checking for socket""... $ac_c" 1>&6
9103 echo "configure:9104: checking for socket" >&5
9104 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9105   echo $ac_n "(cached) $ac_c" 1>&6
9106 else
9107   cat > conftest.$ac_ext <<EOF
9108 #line 9109 "configure"
9109 #include "confdefs.h"
9110 /* System header to define __stub macros and hopefully few prototypes,
9111     which can conflict with char socket(); below.  */
9112 #include <assert.h>
9113 /* Override any gcc2 internal prototype to avoid an error.  */
9114 /* We use char because int might match the return type of a gcc2
9115     builtin and then its argument prototype would still apply.  */
9116 char socket();
9117 char (*f)();
9118
9119 int main() {
9120
9121 /* The GNU C library defines this for functions which it implements
9122     to always fail with ENOSYS.  Some functions are actually named
9123     something starting with __ and the normal name is an alias.  */
9124 #if defined (__stub_socket) || defined (__stub___socket)
9125 choke me
9126 #else
9127 f = socket;
9128 #endif
9129
9130 ; return 0; }
9131 EOF
9132 if { (eval echo configure:9133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9133   rm -rf conftest*
9134   eval "ac_cv_func_socket=yes"
9135 else
9136   echo "configure: failed program was:" >&5
9137   cat conftest.$ac_ext >&5
9138   rm -rf conftest*
9139   eval "ac_cv_func_socket=no"
9140 fi
9141 rm -f conftest*
9142 fi
9143
9144 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9145   echo "$ac_t""yes" 1>&6
9146   :
9147 else
9148   echo "$ac_t""no" 1>&6
9149         
9150         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9151 echo "configure:9152: checking for main in -lsocket" >&5
9152 ac_lib_var=`echo socket'_'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="-lsocket  $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 socket | 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="-lsocket $LIBS"
9188
9189 else
9190   echo "$ac_t""no" 1>&6
9191 fi
9192
9193         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9194 echo "configure:9195: checking for main in -lnet" >&5
9195 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9196 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9197   echo $ac_n "(cached) $ac_c" 1>&6
9198 else
9199   ac_save_LIBS="$LIBS"
9200 LIBS="-lnet  $LIBS"
9201 cat > conftest.$ac_ext <<EOF
9202 #line 9203 "configure"
9203 #include "confdefs.h"
9204
9205 int main() {
9206 main()
9207 ; return 0; }
9208 EOF
9209 if { (eval echo configure:9210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9210   rm -rf conftest*
9211   eval "ac_cv_lib_$ac_lib_var=yes"
9212 else
9213   echo "configure: failed program was:" >&5
9214   cat conftest.$ac_ext >&5
9215   rm -rf conftest*
9216   eval "ac_cv_lib_$ac_lib_var=no"
9217 fi
9218 rm -f conftest*
9219 LIBS="$ac_save_LIBS"
9220
9221 fi
9222 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9223   echo "$ac_t""yes" 1>&6
9224     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9225     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9226   cat >> confdefs.h <<EOF
9227 #define $ac_tr_lib 1
9228 EOF
9229
9230   LIBS="-lnet $LIBS"
9231
9232 else
9233   echo "$ac_t""no" 1>&6
9234 fi
9235
9236         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9237 echo "configure:9238: checking for main in -lnsl_s" >&5
9238 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9239 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9240   echo $ac_n "(cached) $ac_c" 1>&6
9241 else
9242   ac_save_LIBS="$LIBS"
9243 LIBS="-lnsl_s  $LIBS"
9244 cat > conftest.$ac_ext <<EOF
9245 #line 9246 "configure"
9246 #include "confdefs.h"
9247
9248 int main() {
9249 main()
9250 ; return 0; }
9251 EOF
9252 if { (eval echo configure:9253: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9253   rm -rf conftest*
9254   eval "ac_cv_lib_$ac_lib_var=yes"
9255 else
9256   echo "configure: failed program was:" >&5
9257   cat conftest.$ac_ext >&5
9258   rm -rf conftest*
9259   eval "ac_cv_lib_$ac_lib_var=no"
9260 fi
9261 rm -f conftest*
9262 LIBS="$ac_save_LIBS"
9263
9264 fi
9265 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9266   echo "$ac_t""yes" 1>&6
9267     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9268     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9269   cat >> confdefs.h <<EOF
9270 #define $ac_tr_lib 1
9271 EOF
9272
9273   LIBS="-lnsl_s $LIBS"
9274
9275 else
9276   echo "$ac_t""no" 1>&6
9277 fi
9278
9279         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9280 echo "configure:9281: checking for main in -lnsl" >&5
9281 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9282 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9283   echo $ac_n "(cached) $ac_c" 1>&6
9284 else
9285   ac_save_LIBS="$LIBS"
9286 LIBS="-lnsl  $LIBS"
9287 cat > conftest.$ac_ext <<EOF
9288 #line 9289 "configure"
9289 #include "confdefs.h"
9290
9291 int main() {
9292 main()
9293 ; return 0; }
9294 EOF
9295 if { (eval echo configure:9296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9296   rm -rf conftest*
9297   eval "ac_cv_lib_$ac_lib_var=yes"
9298 else
9299   echo "configure: failed program was:" >&5
9300   cat conftest.$ac_ext >&5
9301   rm -rf conftest*
9302   eval "ac_cv_lib_$ac_lib_var=no"
9303 fi
9304 rm -f conftest*
9305 LIBS="$ac_save_LIBS"
9306
9307 fi
9308 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9309   echo "$ac_t""yes" 1>&6
9310     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9311     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9312   cat >> confdefs.h <<EOF
9313 #define $ac_tr_lib 1
9314 EOF
9315
9316   LIBS="-lnsl $LIBS"
9317
9318 else
9319   echo "$ac_t""no" 1>&6
9320 fi
9321
9322         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9323 echo "configure:9324: checking for socket in -linet" >&5
9324 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9325 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9326   echo $ac_n "(cached) $ac_c" 1>&6
9327 else
9328   ac_save_LIBS="$LIBS"
9329 LIBS="-linet  $LIBS"
9330 cat > conftest.$ac_ext <<EOF
9331 #line 9332 "configure"
9332 #include "confdefs.h"
9333 /* Override any gcc2 internal prototype to avoid an error.  */
9334 /* We use char because int might match the return type of a gcc2
9335     builtin and then its argument prototype would still apply.  */
9336 char socket();
9337
9338 int main() {
9339 socket()
9340 ; return 0; }
9341 EOF
9342 if { (eval echo configure:9343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9343   rm -rf conftest*
9344   eval "ac_cv_lib_$ac_lib_var=yes"
9345 else
9346   echo "configure: failed program was:" >&5
9347   cat conftest.$ac_ext >&5
9348   rm -rf conftest*
9349   eval "ac_cv_lib_$ac_lib_var=no"
9350 fi
9351 rm -f conftest*
9352 LIBS="$ac_save_LIBS"
9353
9354 fi
9355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9356   echo "$ac_t""yes" 1>&6
9357     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9358     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9359   cat >> confdefs.h <<EOF
9360 #define $ac_tr_lib 1
9361 EOF
9362
9363   LIBS="-linet $LIBS"
9364
9365 else
9366   echo "$ac_t""no" 1>&6
9367 fi
9368
9369         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9370 echo "configure:9371: checking for main in -lgen" >&5
9371 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9372 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9373   echo $ac_n "(cached) $ac_c" 1>&6
9374 else
9375   ac_save_LIBS="$LIBS"
9376 LIBS="-lgen  $LIBS"
9377 cat > conftest.$ac_ext <<EOF
9378 #line 9379 "configure"
9379 #include "confdefs.h"
9380
9381 int main() {
9382 main()
9383 ; return 0; }
9384 EOF
9385 if { (eval echo configure:9386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9386   rm -rf conftest*
9387   eval "ac_cv_lib_$ac_lib_var=yes"
9388 else
9389   echo "configure: failed program was:" >&5
9390   cat conftest.$ac_ext >&5
9391   rm -rf conftest*
9392   eval "ac_cv_lib_$ac_lib_var=no"
9393 fi
9394 rm -f conftest*
9395 LIBS="$ac_save_LIBS"
9396
9397 fi
9398 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9399   echo "$ac_t""yes" 1>&6
9400     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9401     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9402   cat >> confdefs.h <<EOF
9403 #define $ac_tr_lib 1
9404 EOF
9405
9406   LIBS="-lgen $LIBS"
9407
9408 else
9409   echo "$ac_t""no" 1>&6
9410 fi
9411
9412
9413 fi
9414
9415
9416 echo $ac_n "checking for select""... $ac_c" 1>&6
9417 echo "configure:9418: checking for select" >&5
9418 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9419   echo $ac_n "(cached) $ac_c" 1>&6
9420 else
9421   cat > conftest.$ac_ext <<EOF
9422 #line 9423 "configure"
9423 #include "confdefs.h"
9424 /* System header to define __stub macros and hopefully few prototypes,
9425     which can conflict with char select(); below.  */
9426 #include <assert.h>
9427 /* Override any gcc2 internal prototype to avoid an error.  */
9428 /* We use char because int might match the return type of a gcc2
9429     builtin and then its argument prototype would still apply.  */
9430 char select();
9431 char (*f)();
9432
9433 int main() {
9434
9435 /* The GNU C library defines this for functions which it implements
9436     to always fail with ENOSYS.  Some functions are actually named
9437     something starting with __ and the normal name is an alias.  */
9438 #if defined (__stub_select) || defined (__stub___select)
9439 choke me
9440 #else
9441 f = select;
9442 #endif
9443
9444 ; return 0; }
9445 EOF
9446 if { (eval echo configure:9447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9447   rm -rf conftest*
9448   eval "ac_cv_func_select=yes"
9449 else
9450   echo "configure: failed program was:" >&5
9451   cat conftest.$ac_ext >&5
9452   rm -rf conftest*
9453   eval "ac_cv_func_select=no"
9454 fi
9455 rm -f conftest*
9456 fi
9457
9458 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9459   echo "$ac_t""yes" 1>&6
9460   :
9461 else
9462   echo "$ac_t""no" 1>&6
9463 { echo "configure: error: select() required." 1>&2; exit 1; }
9464 fi
9465
9466
9467 if test "${ac_cv_header_winsock_h}" != yes; then
9468                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9469 echo "configure:9470: checking types of arguments for select()" >&5
9470  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9471   echo $ac_n "(cached) $ac_c" 1>&6
9472 else
9473    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9474   echo $ac_n "(cached) $ac_c" 1>&6
9475 else
9476     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9477   echo $ac_n "(cached) $ac_c" 1>&6
9478 else
9479      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9480      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9481       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9482        cat > conftest.$ac_ext <<EOF
9483 #line 9484 "configure"
9484 #include "confdefs.h"
9485 #ifdef HAVE_SYS_TYPES_H
9486 #include <sys/types.h>
9487 #endif
9488 #ifdef HAVE_SYS_TIME_H
9489 #include <sys/time.h>
9490 #endif
9491 #ifdef HAVE_SYS_SELECT_H
9492 #include <sys/select.h>
9493 #endif
9494 #ifdef HAVE_SYS_SOCKET_H
9495 #include <sys/socket.h>
9496 #endif
9497 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);
9498 int main() {
9499
9500 ; return 0; }
9501 EOF
9502 if { (eval echo configure:9503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9503   rm -rf conftest*
9504           ac_not_found=no ; break 3
9505 else
9506   echo "configure: failed program was:" >&5
9507   cat conftest.$ac_ext >&5
9508   rm -rf conftest*
9509   ac_not_found=yes
9510 fi
9511 rm -f conftest*
9512       done
9513      done
9514     done
9515    
9516 fi
9517   
9518 fi
9519  
9520 fi
9521  if test "$ac_not_found" = yes; then
9522   ac_cv_func_select_arg1=int 
9523   ac_cv_func_select_arg234='int *' 
9524   ac_cv_func_select_arg5='struct timeval *'
9525  fi
9526  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9527  cat >> confdefs.h <<EOF
9528 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9529 EOF
9530
9531  cat >> confdefs.h <<EOF
9532 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9533 EOF
9534
9535  cat >> confdefs.h <<EOF
9536 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9537 EOF
9538
9539
9540 fi
9541
9542
9543 for ac_hdr in regex.h 
9544 do
9545 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9546 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9547 echo "configure:9548: checking for $ac_hdr" >&5
9548 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9549   echo $ac_n "(cached) $ac_c" 1>&6
9550 else
9551   cat > conftest.$ac_ext <<EOF
9552 #line 9553 "configure"
9553 #include "confdefs.h"
9554 #include <$ac_hdr>
9555 EOF
9556 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9557 { (eval echo configure:9558: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9558 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9559 if test -z "$ac_err"; then
9560   rm -rf conftest*
9561   eval "ac_cv_header_$ac_safe=yes"
9562 else
9563   echo "$ac_err" >&5
9564   echo "configure: failed program was:" >&5
9565   cat conftest.$ac_ext >&5
9566   rm -rf conftest*
9567   eval "ac_cv_header_$ac_safe=no"
9568 fi
9569 rm -f conftest*
9570 fi
9571 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9572   echo "$ac_t""yes" 1>&6
9573     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9574   cat >> confdefs.h <<EOF
9575 #define $ac_tr_hdr 1
9576 EOF
9577  
9578 else
9579   echo "$ac_t""no" 1>&6
9580 fi
9581 done
9582
9583 if test "$ac_cv_header_regex_h" != yes ; then
9584         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9585 fi
9586
9587 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9588 echo "configure:9589: checking for library containing regfree" >&5
9589 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9590   echo $ac_n "(cached) $ac_c" 1>&6
9591 else
9592   ac_func_search_save_LIBS="$LIBS"
9593 ac_cv_search_regfree="no"
9594 cat > conftest.$ac_ext <<EOF
9595 #line 9596 "configure"
9596 #include "confdefs.h"
9597 /* Override any gcc2 internal prototype to avoid an error.  */
9598 /* We use char because int might match the return type of a gcc2
9599     builtin and then its argument prototype would still apply.  */
9600 char regfree();
9601
9602 int main() {
9603 regfree()
9604 ; return 0; }
9605 EOF
9606 if { (eval echo configure:9607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9607   rm -rf conftest*
9608   ac_cv_search_regfree="none required"
9609 else
9610   echo "configure: failed program was:" >&5
9611   cat conftest.$ac_ext >&5
9612 fi
9613 rm -f conftest*
9614 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9615 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9616 cat > conftest.$ac_ext <<EOF
9617 #line 9618 "configure"
9618 #include "confdefs.h"
9619 /* Override any gcc2 internal prototype to avoid an error.  */
9620 /* We use char because int might match the return type of a gcc2
9621     builtin and then its argument prototype would still apply.  */
9622 char regfree();
9623
9624 int main() {
9625 regfree()
9626 ; return 0; }
9627 EOF
9628 if { (eval echo configure:9629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9629   rm -rf conftest*
9630   ac_cv_search_regfree="-l$ac_lib"
9631 break
9632 else
9633   echo "configure: failed program was:" >&5
9634   cat conftest.$ac_ext >&5
9635 fi
9636 rm -f conftest*
9637 done
9638 LIBS="$ac_func_search_save_LIBS"
9639 fi
9640
9641 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9642 if test "$ac_cv_search_regfree" != "no"; then
9643   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9644   :
9645 else :
9646   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9647 fi
9648
9649
9650 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9651 echo "configure:9652: checking for compatible POSIX regex" >&5
9652 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9653   echo $ac_n "(cached) $ac_c" 1>&6
9654 else
9655   
9656         if test "$cross_compiling" = yes; then
9657   ol_cv_c_posix_regex=cross
9658 else
9659   cat > conftest.$ac_ext <<EOF
9660 #line 9661 "configure"
9661 #include "confdefs.h"
9662
9663 #include <sys/types.h>
9664 #include <regex.h>
9665 static char *pattern, *string;
9666 main()
9667 {
9668         int rc;
9669         regex_t re;
9670
9671         pattern = "^A";
9672
9673         if(regcomp(&re, pattern, 0)) {
9674                 return -1;
9675         }
9676         
9677         string = "ALL MATCH";
9678         
9679         rc = regexec(&re, string, 0, (void*)0, 0);
9680
9681         regfree(&re);
9682
9683         return rc;
9684 }
9685 EOF
9686 if { (eval echo configure:9687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9687 then
9688   ol_cv_c_posix_regex=yes
9689 else
9690   echo "configure: failed program was:" >&5
9691   cat conftest.$ac_ext >&5
9692   rm -fr conftest*
9693   ol_cv_c_posix_regex=no
9694 fi
9695 rm -fr conftest*
9696 fi
9697
9698 fi
9699
9700 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9701
9702 if test "$ol_cv_c_posix_regex" = no ; then
9703         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9704 fi
9705
9706
9707 have_uuid=no
9708 for ac_hdr in sys/uuid.h
9709 do
9710 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9711 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9712 echo "configure:9713: checking for $ac_hdr" >&5
9713 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9714   echo $ac_n "(cached) $ac_c" 1>&6
9715 else
9716   cat > conftest.$ac_ext <<EOF
9717 #line 9718 "configure"
9718 #include "confdefs.h"
9719 #include <$ac_hdr>
9720 EOF
9721 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9722 { (eval echo configure:9723: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9723 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9724 if test -z "$ac_err"; then
9725   rm -rf conftest*
9726   eval "ac_cv_header_$ac_safe=yes"
9727 else
9728   echo "$ac_err" >&5
9729   echo "configure: failed program was:" >&5
9730   cat conftest.$ac_ext >&5
9731   rm -rf conftest*
9732   eval "ac_cv_header_$ac_safe=no"
9733 fi
9734 rm -f conftest*
9735 fi
9736 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9737   echo "$ac_t""yes" 1>&6
9738     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9739   cat >> confdefs.h <<EOF
9740 #define $ac_tr_hdr 1
9741 EOF
9742  
9743 else
9744   echo "$ac_t""no" 1>&6
9745 fi
9746 done
9747
9748 if test $ac_cv_header_sys_uuid_h = yes ; then
9749         save_LIBS="$LIBS"
9750         
9751 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9752 echo "configure:9753: checking for library containing uuid_to_str" >&5
9753 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9754   echo $ac_n "(cached) $ac_c" 1>&6
9755 else
9756   ac_func_search_save_LIBS="$LIBS"
9757 ac_cv_search_uuid_to_str="no"
9758 cat > conftest.$ac_ext <<EOF
9759 #line 9760 "configure"
9760 #include "confdefs.h"
9761 /* Override any gcc2 internal prototype to avoid an error.  */
9762 /* We use char because int might match the return type of a gcc2
9763     builtin and then its argument prototype would still apply.  */
9764 char uuid_to_str();
9765
9766 int main() {
9767 uuid_to_str()
9768 ; return 0; }
9769 EOF
9770 if { (eval echo configure:9771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9771   rm -rf conftest*
9772   ac_cv_search_uuid_to_str="none required"
9773 else
9774   echo "configure: failed program was:" >&5
9775   cat conftest.$ac_ext >&5
9776 fi
9777 rm -f conftest*
9778 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9779 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9780 cat > conftest.$ac_ext <<EOF
9781 #line 9782 "configure"
9782 #include "confdefs.h"
9783 /* Override any gcc2 internal prototype to avoid an error.  */
9784 /* We use char because int might match the return type of a gcc2
9785     builtin and then its argument prototype would still apply.  */
9786 char uuid_to_str();
9787
9788 int main() {
9789 uuid_to_str()
9790 ; return 0; }
9791 EOF
9792 if { (eval echo configure:9793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9793   rm -rf conftest*
9794   ac_cv_search_uuid_to_str="-l$ac_lib"
9795 break
9796 else
9797   echo "configure: failed program was:" >&5
9798   cat conftest.$ac_ext >&5
9799 fi
9800 rm -f conftest*
9801 done
9802 LIBS="$ac_func_search_save_LIBS"
9803 fi
9804
9805 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9806 if test "$ac_cv_search_uuid_to_str" != "no"; then
9807   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9808   have_uuid=yes
9809 else :
9810   :
9811 fi
9812         LIBS="$save_LIBS"
9813
9814         if test have_uuid = yes ; then
9815                 cat >> confdefs.h <<\EOF
9816 #define HAVE_UUID_TO_STR 1
9817 EOF
9818
9819
9820                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9821                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9822         fi
9823 fi
9824
9825 if test $have_uuid = no ; then
9826         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9827 echo "configure:9828: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9828         save_LIBS="$LIBS"
9829         LIBS="$LIBS -lrpcrt4"
9830         cat > conftest.$ac_ext <<EOF
9831 #line 9832 "configure"
9832 #include "confdefs.h"
9833
9834                 char UuidCreate@4();
9835                 char UuidToStringA@8();
9836                 
9837 int main() {
9838
9839                 UuidCreate@4();
9840                 UuidToStringA@8();
9841                 
9842 ; return 0; }
9843 EOF
9844 if { (eval echo configure:9845: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9845   rm -rf conftest*
9846   need_rpcrt=yes
9847 else
9848   echo "configure: failed program was:" >&5
9849   cat conftest.$ac_ext >&5
9850   rm -rf conftest*
9851   need_rpcrt=no
9852 fi
9853 rm -f conftest*
9854         if test $need_rpcrt = yes; then
9855                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9856         fi
9857         LIBS="$save_LIBS"
9858         echo "$ac_t""$need_rpcrt" 1>&6
9859 fi
9860
9861 ol_link_dnssrv=no
9862 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9863 echo "configure:9864: checking for res_query" >&5
9864 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9865   echo $ac_n "(cached) $ac_c" 1>&6
9866 else
9867   cat > conftest.$ac_ext <<EOF
9868 #line 9869 "configure"
9869 #include "confdefs.h"
9870 /* System header to define __stub macros and hopefully few prototypes,
9871     which can conflict with char res_query(); below.  */
9872 #include <assert.h>
9873 /* Override any gcc2 internal prototype to avoid an error.  */
9874 /* We use char because int might match the return type of a gcc2
9875     builtin and then its argument prototype would still apply.  */
9876 char res_query();
9877 char (*f)();
9878
9879 int main() {
9880
9881 /* The GNU C library defines this for functions which it implements
9882     to always fail with ENOSYS.  Some functions are actually named
9883     something starting with __ and the normal name is an alias.  */
9884 #if defined (__stub_res_query) || defined (__stub___res_query)
9885 choke me
9886 #else
9887 f = res_query;
9888 #endif
9889
9890 ; return 0; }
9891 EOF
9892 if { (eval echo configure:9893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9893   rm -rf conftest*
9894   eval "ac_cv_func_res_query=yes"
9895 else
9896   echo "configure: failed program was:" >&5
9897   cat conftest.$ac_ext >&5
9898   rm -rf conftest*
9899   eval "ac_cv_func_res_query=no"
9900 fi
9901 rm -f conftest*
9902 fi
9903
9904 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9905   echo "$ac_t""yes" 1>&6
9906   :
9907 else
9908   echo "$ac_t""no" 1>&6
9909 fi
9910
9911 if test $ac_cv_func_res_query = no ; then 
9912         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9913 echo "configure:9914: checking for __res_query" >&5
9914 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9915   echo $ac_n "(cached) $ac_c" 1>&6
9916 else
9917   cat > conftest.$ac_ext <<EOF
9918 #line 9919 "configure"
9919 #include "confdefs.h"
9920 /* System header to define __stub macros and hopefully few prototypes,
9921     which can conflict with char __res_query(); below.  */
9922 #include <assert.h>
9923 /* Override any gcc2 internal prototype to avoid an error.  */
9924 /* We use char because int might match the return type of a gcc2
9925     builtin and then its argument prototype would still apply.  */
9926 char __res_query();
9927 char (*f)();
9928
9929 int main() {
9930
9931 /* The GNU C library defines this for functions which it implements
9932     to always fail with ENOSYS.  Some functions are actually named
9933     something starting with __ and the normal name is an alias.  */
9934 #if defined (__stub___res_query) || defined (__stub_____res_query)
9935 choke me
9936 #else
9937 f = __res_query;
9938 #endif
9939
9940 ; return 0; }
9941 EOF
9942 if { (eval echo configure:9943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9943   rm -rf conftest*
9944   eval "ac_cv_func___res_query=yes"
9945 else
9946   echo "configure: failed program was:" >&5
9947   cat conftest.$ac_ext >&5
9948   rm -rf conftest*
9949   eval "ac_cv_func___res_query=no"
9950 fi
9951 rm -f conftest*
9952 fi
9953
9954 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9955   echo "$ac_t""yes" 1>&6
9956   :
9957 else
9958   echo "$ac_t""no" 1>&6
9959 fi
9960
9961         ac_cv_func_res_query=$ac_cv_func___res_query
9962 fi
9963
9964 if test $ac_cv_func_res_query = no ; then 
9965         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9966 echo "configure:9967: checking for res_query in -lbind" >&5
9967 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9968 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9969   echo $ac_n "(cached) $ac_c" 1>&6
9970 else
9971   ac_save_LIBS="$LIBS"
9972 LIBS="-lbind  $LIBS"
9973 cat > conftest.$ac_ext <<EOF
9974 #line 9975 "configure"
9975 #include "confdefs.h"
9976 /* Override any gcc2 internal prototype to avoid an error.  */
9977 /* We use char because int might match the return type of a gcc2
9978     builtin and then its argument prototype would still apply.  */
9979 char res_query();
9980
9981 int main() {
9982 res_query()
9983 ; return 0; }
9984 EOF
9985 if { (eval echo configure:9986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9986   rm -rf conftest*
9987   eval "ac_cv_lib_$ac_lib_var=yes"
9988 else
9989   echo "configure: failed program was:" >&5
9990   cat conftest.$ac_ext >&5
9991   rm -rf conftest*
9992   eval "ac_cv_lib_$ac_lib_var=no"
9993 fi
9994 rm -f conftest*
9995 LIBS="$ac_save_LIBS"
9996
9997 fi
9998 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9999   echo "$ac_t""yes" 1>&6
10000     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10001     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10002   cat >> confdefs.h <<EOF
10003 #define $ac_tr_lib 1
10004 EOF
10005
10006   LIBS="-lbind $LIBS"
10007
10008 else
10009   echo "$ac_t""no" 1>&6
10010 fi
10011
10012         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10013 fi
10014
10015 if test $ac_cv_func_res_query = no ; then 
10016         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10017 echo "configure:10018: checking for __res_query in -lbind" >&5
10018 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10019 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10020   echo $ac_n "(cached) $ac_c" 1>&6
10021 else
10022   ac_save_LIBS="$LIBS"
10023 LIBS="-lbind  $LIBS"
10024 cat > conftest.$ac_ext <<EOF
10025 #line 10026 "configure"
10026 #include "confdefs.h"
10027 /* Override any gcc2 internal prototype to avoid an error.  */
10028 /* We use char because int might match the return type of a gcc2
10029     builtin and then its argument prototype would still apply.  */
10030 char __res_query();
10031
10032 int main() {
10033 __res_query()
10034 ; return 0; }
10035 EOF
10036 if { (eval echo configure:10037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10037   rm -rf conftest*
10038   eval "ac_cv_lib_$ac_lib_var=yes"
10039 else
10040   echo "configure: failed program was:" >&5
10041   cat conftest.$ac_ext >&5
10042   rm -rf conftest*
10043   eval "ac_cv_lib_$ac_lib_var=no"
10044 fi
10045 rm -f conftest*
10046 LIBS="$ac_save_LIBS"
10047
10048 fi
10049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10050   echo "$ac_t""yes" 1>&6
10051     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10052     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10053   cat >> confdefs.h <<EOF
10054 #define $ac_tr_lib 1
10055 EOF
10056
10057   LIBS="-lbind $LIBS"
10058
10059 else
10060   echo "$ac_t""no" 1>&6
10061 fi
10062
10063         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10064 fi
10065
10066 if test $ac_cv_func_res_query = no ; then 
10067         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10068 echo "configure:10069: checking for res_query in -lresolv" >&5
10069 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10070 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10071   echo $ac_n "(cached) $ac_c" 1>&6
10072 else
10073   ac_save_LIBS="$LIBS"
10074 LIBS="-lresolv  $LIBS"
10075 cat > conftest.$ac_ext <<EOF
10076 #line 10077 "configure"
10077 #include "confdefs.h"
10078 /* Override any gcc2 internal prototype to avoid an error.  */
10079 /* We use char because int might match the return type of a gcc2
10080     builtin and then its argument prototype would still apply.  */
10081 char res_query();
10082
10083 int main() {
10084 res_query()
10085 ; return 0; }
10086 EOF
10087 if { (eval echo configure:10088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10088   rm -rf conftest*
10089   eval "ac_cv_lib_$ac_lib_var=yes"
10090 else
10091   echo "configure: failed program was:" >&5
10092   cat conftest.$ac_ext >&5
10093   rm -rf conftest*
10094   eval "ac_cv_lib_$ac_lib_var=no"
10095 fi
10096 rm -f conftest*
10097 LIBS="$ac_save_LIBS"
10098
10099 fi
10100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10101   echo "$ac_t""yes" 1>&6
10102     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10103     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10104   cat >> confdefs.h <<EOF
10105 #define $ac_tr_lib 1
10106 EOF
10107
10108   LIBS="-lresolv $LIBS"
10109
10110 else
10111   echo "$ac_t""no" 1>&6
10112 fi
10113
10114         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10115 fi
10116
10117 if test $ac_cv_func_res_query = no ; then 
10118         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10119 echo "configure:10120: checking for __res_query in -lresolv" >&5
10120 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10121 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10122   echo $ac_n "(cached) $ac_c" 1>&6
10123 else
10124   ac_save_LIBS="$LIBS"
10125 LIBS="-lresolv  $LIBS"
10126 cat > conftest.$ac_ext <<EOF
10127 #line 10128 "configure"
10128 #include "confdefs.h"
10129 /* Override any gcc2 internal prototype to avoid an error.  */
10130 /* We use char because int might match the return type of a gcc2
10131     builtin and then its argument prototype would still apply.  */
10132 char __res_query();
10133
10134 int main() {
10135 __res_query()
10136 ; return 0; }
10137 EOF
10138 if { (eval echo configure:10139: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10139   rm -rf conftest*
10140   eval "ac_cv_lib_$ac_lib_var=yes"
10141 else
10142   echo "configure: failed program was:" >&5
10143   cat conftest.$ac_ext >&5
10144   rm -rf conftest*
10145   eval "ac_cv_lib_$ac_lib_var=no"
10146 fi
10147 rm -f conftest*
10148 LIBS="$ac_save_LIBS"
10149
10150 fi
10151 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10152   echo "$ac_t""yes" 1>&6
10153     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10154     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10155   cat >> confdefs.h <<EOF
10156 #define $ac_tr_lib 1
10157 EOF
10158
10159   LIBS="-lresolv $LIBS"
10160
10161 else
10162   echo "$ac_t""no" 1>&6
10163 fi
10164
10165         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10166 fi
10167
10168 if test "$ac_cv_func_res_query" = yes ; then
10169         cat >> confdefs.h <<\EOF
10170 #define HAVE_RES_QUERY 1
10171 EOF
10172
10173
10174         if test $ol_enable_dnssrv != no ; then
10175                 ol_link_dnssrv=yes
10176         fi
10177 fi
10178
10179 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10180         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10181 fi
10182
10183 for ac_func in getaddrinfo gai_strerror inet_ntop 
10184 do
10185 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10186 echo "configure:10187: checking for $ac_func" >&5
10187 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10188   echo $ac_n "(cached) $ac_c" 1>&6
10189 else
10190   cat > conftest.$ac_ext <<EOF
10191 #line 10192 "configure"
10192 #include "confdefs.h"
10193 /* System header to define __stub macros and hopefully few prototypes,
10194     which can conflict with char $ac_func(); below.  */
10195 #include <assert.h>
10196 /* Override any gcc2 internal prototype to avoid an error.  */
10197 /* We use char because int might match the return type of a gcc2
10198     builtin and then its argument prototype would still apply.  */
10199 char $ac_func();
10200 char (*f)();
10201
10202 int main() {
10203
10204 /* The GNU C library defines this for functions which it implements
10205     to always fail with ENOSYS.  Some functions are actually named
10206     something starting with __ and the normal name is an alias.  */
10207 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10208 choke me
10209 #else
10210 f = $ac_func;
10211 #endif
10212
10213 ; return 0; }
10214 EOF
10215 if { (eval echo configure:10216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10216   rm -rf conftest*
10217   eval "ac_cv_func_$ac_func=yes"
10218 else
10219   echo "configure: failed program was:" >&5
10220   cat conftest.$ac_ext >&5
10221   rm -rf conftest*
10222   eval "ac_cv_func_$ac_func=no"
10223 fi
10224 rm -f conftest*
10225 fi
10226
10227 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10228   echo "$ac_t""yes" 1>&6
10229     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10230   cat >> confdefs.h <<EOF
10231 #define $ac_tr_func 1
10232 EOF
10233  
10234 else
10235   echo "$ac_t""no" 1>&6
10236 fi
10237 done
10238
10239
10240 ol_link_ipv6=no
10241 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10242         if test $ol_enable_ipv6 = yes ; then
10243                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10244         fi
10245 elif test $ol_enable_ipv6 != no ; then
10246         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10247 echo "configure:10248: checking INET6_ADDRSTRLEN" >&5
10248 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10249   echo $ac_n "(cached) $ac_c" 1>&6
10250 else
10251   
10252                 cat > conftest.$ac_ext <<EOF
10253 #line 10254 "configure"
10254 #include "confdefs.h"
10255
10256 #                       include <netinet/in.h>
10257 #                       ifdef INET6_ADDRSTRLEN
10258                                 __has_inet6_addrstrlen__;
10259 #                       endif
10260                 
10261 EOF
10262 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10263   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10264   rm -rf conftest*
10265   ol_cv_inet6_addrstrlen=yes
10266 else
10267   rm -rf conftest*
10268   ol_cv_inet6_addrstrlen=no
10269 fi
10270 rm -f conftest*
10271
10272 fi
10273
10274 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10275
10276
10277         echo $ac_n "checking struct sockaddr_storage""... $ac_c" 1>&6
10278 echo "configure:10279: checking struct sockaddr_storage" >&5
10279 if eval "test \"\${ol_cv_struct_sockaddr_storage+set}\" = set"; then
10280   echo $ac_n "(cached) $ac_c" 1>&6
10281 else
10282   
10283                 cat > conftest.$ac_ext <<EOF
10284 #line 10285 "configure"
10285 #include "confdefs.h"
10286
10287 #include <sys/types.h>
10288 #include <sys/socket.h>
10289
10290 int main() {
10291
10292                         struct sockaddr_storage ss;
10293
10294 ; return 0; }
10295 EOF
10296 if { (eval echo configure:10297: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
10297   rm -rf conftest*
10298   ol_cv_struct_sockaddr_storage=yes
10299 else
10300   echo "configure: failed program was:" >&5
10301   cat conftest.$ac_ext >&5
10302   rm -rf conftest*
10303   ol_cv_struct_sockaddr_storage=no
10304 fi
10305 rm -f conftest*
10306 fi
10307
10308 echo "$ac_t""$ol_cv_struct_sockaddr_storage" 1>&6
10309
10310         if test $ol_cv_inet6_addrstrlen = yes \
10311                 -a $ol_cv_struct_sockaddr_storage = yes ; then
10312                 ol_link_ipv6=yes
10313         elif test $ol_enable_ipv6 = yes \
10314                         -a $ol_cv_inet6_addrstrlen = no ; then
10315                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10316         elif test $ol_enable_ipv6 = yes \
10317                         -a $ol_cv_struct_sockaddr_storage = no ; then
10318                 { echo "configure: error: IPv6 support requires struct sockaddr_storage" 1>&2; exit 1; }
10319         fi
10320 fi
10321
10322 if test $ol_enable_local != no ; then
10323         for ac_hdr in sys/un.h 
10324 do
10325 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10326 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10327 echo "configure:10328: checking for $ac_hdr" >&5
10328 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10329   echo $ac_n "(cached) $ac_c" 1>&6
10330 else
10331   cat > conftest.$ac_ext <<EOF
10332 #line 10333 "configure"
10333 #include "confdefs.h"
10334 #include <$ac_hdr>
10335 EOF
10336 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10337 { (eval echo configure:10338: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10338 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10339 if test -z "$ac_err"; then
10340   rm -rf conftest*
10341   eval "ac_cv_header_$ac_safe=yes"
10342 else
10343   echo "$ac_err" >&5
10344   echo "configure: failed program was:" >&5
10345   cat conftest.$ac_ext >&5
10346   rm -rf conftest*
10347   eval "ac_cv_header_$ac_safe=no"
10348 fi
10349 rm -f conftest*
10350 fi
10351 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10352   echo "$ac_t""yes" 1>&6
10353     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10354   cat >> confdefs.h <<EOF
10355 #define $ac_tr_hdr 1
10356 EOF
10357  
10358 else
10359   echo "$ac_t""no" 1>&6
10360 fi
10361 done
10362
10363
10364         if test $ol_enable_local = auto ; then
10365                 ol_enable_local=$ac_cv_header_sys_un_h
10366         elif test $ac_cv_header_sys_un_h = no ; then
10367                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10368         fi
10369 fi
10370
10371 ol_link_kbind=no
10372 ol_link_kpasswd=no
10373 ol_link_krb5=no
10374 ol_link_krb4=no
10375
10376 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10377         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10378         -o $ol_with_kerberos = k425 ; then
10379
10380         for ac_hdr in krb5.h
10381 do
10382 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10383 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10384 echo "configure:10385: checking for $ac_hdr" >&5
10385 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10386   echo $ac_n "(cached) $ac_c" 1>&6
10387 else
10388   cat > conftest.$ac_ext <<EOF
10389 #line 10390 "configure"
10390 #include "confdefs.h"
10391 #include <$ac_hdr>
10392 EOF
10393 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10394 { (eval echo configure:10395: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10395 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10396 if test -z "$ac_err"; then
10397   rm -rf conftest*
10398   eval "ac_cv_header_$ac_safe=yes"
10399 else
10400   echo "$ac_err" >&5
10401   echo "configure: failed program was:" >&5
10402   cat conftest.$ac_ext >&5
10403   rm -rf conftest*
10404   eval "ac_cv_header_$ac_safe=no"
10405 fi
10406 rm -f conftest*
10407 fi
10408 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10409   echo "$ac_t""yes" 1>&6
10410     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10411   cat >> confdefs.h <<EOF
10412 #define $ac_tr_hdr 1
10413 EOF
10414  
10415 else
10416   echo "$ac_t""no" 1>&6
10417 fi
10418 done
10419
10420
10421         if test $ac_cv_header_krb5_h = yes ; then
10422                                 for ac_hdr in heim_err.h
10423 do
10424 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10425 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10426 echo "configure:10427: checking for $ac_hdr" >&5
10427 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10428   echo $ac_n "(cached) $ac_c" 1>&6
10429 else
10430   cat > conftest.$ac_ext <<EOF
10431 #line 10432 "configure"
10432 #include "confdefs.h"
10433 #include <$ac_hdr>
10434 EOF
10435 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10436 { (eval echo configure:10437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10437 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10438 if test -z "$ac_err"; then
10439   rm -rf conftest*
10440   eval "ac_cv_header_$ac_safe=yes"
10441 else
10442   echo "$ac_err" >&5
10443   echo "configure: failed program was:" >&5
10444   cat conftest.$ac_ext >&5
10445   rm -rf conftest*
10446   eval "ac_cv_header_$ac_safe=no"
10447 fi
10448 rm -f conftest*
10449 fi
10450 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10451   echo "$ac_t""yes" 1>&6
10452     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10453   cat >> confdefs.h <<EOF
10454 #define $ac_tr_hdr 1
10455 EOF
10456  
10457 else
10458   echo "$ac_t""no" 1>&6
10459 fi
10460 done
10461
10462                 if test $ac_cv_header_heim_err_h = yes ; then
10463                         krb5_impl=heimdal
10464                 else
10465                         krb5_impl=mit
10466                 fi
10467
10468                 if test $krb5_impl = mit; then
10469                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10470 echo "configure:10471: checking for main in -lk5crypto" >&5
10471 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10472 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10473   echo $ac_n "(cached) $ac_c" 1>&6
10474 else
10475   ac_save_LIBS="$LIBS"
10476 LIBS="-lk5crypto  $LIBS"
10477 cat > conftest.$ac_ext <<EOF
10478 #line 10479 "configure"
10479 #include "confdefs.h"
10480
10481 int main() {
10482 main()
10483 ; return 0; }
10484 EOF
10485 if { (eval echo configure:10486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10486   rm -rf conftest*
10487   eval "ac_cv_lib_$ac_lib_var=yes"
10488 else
10489   echo "configure: failed program was:" >&5
10490   cat conftest.$ac_ext >&5
10491   rm -rf conftest*
10492   eval "ac_cv_lib_$ac_lib_var=no"
10493 fi
10494 rm -f conftest*
10495 LIBS="$ac_save_LIBS"
10496
10497 fi
10498 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10499   echo "$ac_t""yes" 1>&6
10500   krb5crypto=k5crypto
10501 else
10502   echo "$ac_t""no" 1>&6
10503 krb5crypto=crypto
10504 fi
10505
10506
10507                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10508 echo "configure:10509: checking for main in -lkrb5" >&5
10509 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10510 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10511   echo $ac_n "(cached) $ac_c" 1>&6
10512 else
10513   ac_save_LIBS="$LIBS"
10514 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10515 cat > conftest.$ac_ext <<EOF
10516 #line 10517 "configure"
10517 #include "confdefs.h"
10518
10519 int main() {
10520 main()
10521 ; return 0; }
10522 EOF
10523 if { (eval echo configure:10524: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10524   rm -rf conftest*
10525   eval "ac_cv_lib_$ac_lib_var=yes"
10526 else
10527   echo "configure: failed program was:" >&5
10528   cat conftest.$ac_ext >&5
10529   rm -rf conftest*
10530   eval "ac_cv_lib_$ac_lib_var=no"
10531 fi
10532 rm -f conftest*
10533 LIBS="$ac_save_LIBS"
10534
10535 fi
10536 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10537   echo "$ac_t""yes" 1>&6
10538   have_krb5=yes
10539                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10540 else
10541   echo "$ac_t""no" 1>&6
10542 have_krb5=no
10543 fi
10544
10545
10546                 elif test $krb5_impl = heimdal; then
10547                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10548 echo "configure:10549: checking for main in -ldes" >&5
10549 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10550 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10551   echo $ac_n "(cached) $ac_c" 1>&6
10552 else
10553   ac_save_LIBS="$LIBS"
10554 LIBS="-ldes  $LIBS"
10555 cat > conftest.$ac_ext <<EOF
10556 #line 10557 "configure"
10557 #include "confdefs.h"
10558
10559 int main() {
10560 main()
10561 ; return 0; }
10562 EOF
10563 if { (eval echo configure:10564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10564   rm -rf conftest*
10565   eval "ac_cv_lib_$ac_lib_var=yes"
10566 else
10567   echo "configure: failed program was:" >&5
10568   cat conftest.$ac_ext >&5
10569   rm -rf conftest*
10570   eval "ac_cv_lib_$ac_lib_var=no"
10571 fi
10572 rm -f conftest*
10573 LIBS="$ac_save_LIBS"
10574
10575 fi
10576 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10577   echo "$ac_t""yes" 1>&6
10578   krb5crypto=des
10579 else
10580   echo "$ac_t""no" 1>&6
10581 krb5crypto=crypto
10582 fi
10583
10584
10585                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10586 echo "configure:10587: checking for main in -lkrb5" >&5
10587 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10588 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10589   echo $ac_n "(cached) $ac_c" 1>&6
10590 else
10591   ac_save_LIBS="$LIBS"
10592 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10593 cat > conftest.$ac_ext <<EOF
10594 #line 10595 "configure"
10595 #include "confdefs.h"
10596
10597 int main() {
10598 main()
10599 ; return 0; }
10600 EOF
10601 if { (eval echo configure:10602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10602   rm -rf conftest*
10603   eval "ac_cv_lib_$ac_lib_var=yes"
10604 else
10605   echo "configure: failed program was:" >&5
10606   cat conftest.$ac_ext >&5
10607   rm -rf conftest*
10608   eval "ac_cv_lib_$ac_lib_var=no"
10609 fi
10610 rm -f conftest*
10611 LIBS="$ac_save_LIBS"
10612
10613 fi
10614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10615   echo "$ac_t""yes" 1>&6
10616   have_krb5=yes
10617                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10618 else
10619   echo "$ac_t""no" 1>&6
10620 have_krb5=no
10621 fi
10622
10623
10624                         cat >> confdefs.h <<\EOF
10625 #define HAVE_HEIMDAL_KERBEROS 1
10626 EOF
10627
10628
10629                 else
10630                         have_krb5=no
10631                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10632                 fi
10633
10634                 if test $have_krb5 = yes ; then
10635                         ol_link_krb5=yes
10636
10637                         cat >> confdefs.h <<\EOF
10638 #define HAVE_KRB5 1
10639 EOF
10640
10641
10642                         if test $ol_enable_kpasswd != no ; then
10643                                 ol_link_kpasswd=yes;
10644                         fi
10645
10646                         if test $ol_with_kerberos = k5only ; then
10647                                 ol_with_kerberos=found
10648                         fi
10649
10650                 elif test $ol_with_kerberos != auto ; then
10651                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10652                 fi
10653
10654         fi
10655 fi
10656
10657 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10658         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10659
10660         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10661 do
10662 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10663 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10664 echo "configure:10665: checking for $ac_hdr" >&5
10665 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10666   echo $ac_n "(cached) $ac_c" 1>&6
10667 else
10668   cat > conftest.$ac_ext <<EOF
10669 #line 10670 "configure"
10670 #include "confdefs.h"
10671 #include <$ac_hdr>
10672 EOF
10673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10674 { (eval echo configure:10675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10675 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10676 if test -z "$ac_err"; then
10677   rm -rf conftest*
10678   eval "ac_cv_header_$ac_safe=yes"
10679 else
10680   echo "$ac_err" >&5
10681   echo "configure: failed program was:" >&5
10682   cat conftest.$ac_ext >&5
10683   rm -rf conftest*
10684   eval "ac_cv_header_$ac_safe=no"
10685 fi
10686 rm -f conftest*
10687 fi
10688 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10689   echo "$ac_t""yes" 1>&6
10690     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10691   cat >> confdefs.h <<EOF
10692 #define $ac_tr_hdr 1
10693 EOF
10694  
10695 else
10696   echo "$ac_t""no" 1>&6
10697 fi
10698 done
10699
10700
10701         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10702                 if test $krb5_impl = mit; then
10703                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10704 echo "configure:10705: checking for main in -lkrb4" >&5
10705 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10706 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10707   echo $ac_n "(cached) $ac_c" 1>&6
10708 else
10709   ac_save_LIBS="$LIBS"
10710 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10711 cat > conftest.$ac_ext <<EOF
10712 #line 10713 "configure"
10713 #include "confdefs.h"
10714
10715 int main() {
10716 main()
10717 ; return 0; }
10718 EOF
10719 if { (eval echo configure:10720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10720   rm -rf conftest*
10721   eval "ac_cv_lib_$ac_lib_var=yes"
10722 else
10723   echo "configure: failed program was:" >&5
10724   cat conftest.$ac_ext >&5
10725   rm -rf conftest*
10726   eval "ac_cv_lib_$ac_lib_var=no"
10727 fi
10728 rm -f conftest*
10729 LIBS="$ac_save_LIBS"
10730
10731 fi
10732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10733   echo "$ac_t""yes" 1>&6
10734   have_k425=yes
10735                                 KRB4_LIBS="-lkrb4 -ldes425"
10736 else
10737   echo "$ac_t""no" 1>&6
10738 have_k425=no
10739 fi
10740
10741
10742                 elif test $krb5_impl = heimdal; then
10743                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10744 echo "configure:10745: checking for main in -lkrb4" >&5
10745 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10746 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10747   echo $ac_n "(cached) $ac_c" 1>&6
10748 else
10749   ac_save_LIBS="$LIBS"
10750 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10751 cat > conftest.$ac_ext <<EOF
10752 #line 10753 "configure"
10753 #include "confdefs.h"
10754
10755 int main() {
10756 main()
10757 ; return 0; }
10758 EOF
10759 if { (eval echo configure:10760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10760   rm -rf conftest*
10761   eval "ac_cv_lib_$ac_lib_var=yes"
10762 else
10763   echo "configure: failed program was:" >&5
10764   cat conftest.$ac_ext >&5
10765   rm -rf conftest*
10766   eval "ac_cv_lib_$ac_lib_var=no"
10767 fi
10768 rm -f conftest*
10769 LIBS="$ac_save_LIBS"
10770
10771 fi
10772 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10773   echo "$ac_t""yes" 1>&6
10774   have_k425=yes
10775                                 KRB4_LIBS="-lkrb4"
10776 else
10777   echo "$ac_t""no" 1>&6
10778 have_k425=no
10779 fi
10780
10781
10782                 else
10783                         have_425=no
10784                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10785                 fi
10786
10787                 if test $have_k425 = yes ; then
10788                         ol_with_kerberos=found
10789                         ol_link_krb4=yes
10790
10791                         cat >> confdefs.h <<\EOF
10792 #define HAVE_KRB425 1
10793 EOF
10794
10795                         cat >> confdefs.h <<\EOF
10796 #define HAVE_KRB4 1
10797 EOF
10798
10799
10800                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10801 echo "configure:10802: checking for des_debug in Kerberos libraries" >&5
10802 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10803   echo $ac_n "(cached) $ac_c" 1>&6
10804 else
10805   
10806                                                                 save_LIBS="$LIBS"
10807                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10808                                 cat > conftest.$ac_ext <<EOF
10809 #line 10810 "configure"
10810 #include "confdefs.h"
10811
10812 #include <kerberosIV/krb.h>
10813 #include <kerberosIV/des.h>
10814 extern int des_debug;
10815
10816 int main() {
10817
10818 des_debug = 1;
10819
10820 ; return 0; }
10821 EOF
10822 if { (eval echo configure:10823: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10823   rm -rf conftest*
10824   ol_cv_var_des_debug=yes
10825 else
10826   echo "configure: failed program was:" >&5
10827   cat conftest.$ac_ext >&5
10828   rm -rf conftest*
10829   ol_cv_var_des_debug=no
10830 fi
10831 rm -f conftest*
10832                                                                 LIBS="$save_LIBS"
10833                         
10834 fi
10835
10836 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10837
10838                         if test $ol_cv_var_des_debug = yes ; then
10839                                 cat >> confdefs.h <<\EOF
10840 #define HAVE_DES_DEBUG 1
10841 EOF
10842
10843                         fi
10844
10845                         LIBS="$save_LIBS"
10846                 fi
10847         fi
10848 fi
10849
10850 if test $ol_link_krb5 = yes ; then
10851         ol_with_kerberos=found
10852 fi
10853
10854 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10855         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10856
10857         for ac_hdr in krb.h des.h krb-archaeology.h 
10858 do
10859 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10860 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10861 echo "configure:10862: checking for $ac_hdr" >&5
10862 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10863   echo $ac_n "(cached) $ac_c" 1>&6
10864 else
10865   cat > conftest.$ac_ext <<EOF
10866 #line 10867 "configure"
10867 #include "confdefs.h"
10868 #include <$ac_hdr>
10869 EOF
10870 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10871 { (eval echo configure:10872: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10872 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10873 if test -z "$ac_err"; then
10874   rm -rf conftest*
10875   eval "ac_cv_header_$ac_safe=yes"
10876 else
10877   echo "$ac_err" >&5
10878   echo "configure: failed program was:" >&5
10879   cat conftest.$ac_ext >&5
10880   rm -rf conftest*
10881   eval "ac_cv_header_$ac_safe=no"
10882 fi
10883 rm -f conftest*
10884 fi
10885 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10886   echo "$ac_t""yes" 1>&6
10887     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10888   cat >> confdefs.h <<EOF
10889 #define $ac_tr_hdr 1
10890 EOF
10891  
10892 else
10893   echo "$ac_t""no" 1>&6
10894 fi
10895 done
10896
10897
10898         if test $ac_cv_header_krb_h = yes ; then
10899                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10900 echo "configure:10901: checking for main in -lkrb" >&5
10901 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10902 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10903   echo $ac_n "(cached) $ac_c" 1>&6
10904 else
10905   ac_save_LIBS="$LIBS"
10906 LIBS="-lkrb -ldes $LIBS"
10907 cat > conftest.$ac_ext <<EOF
10908 #line 10909 "configure"
10909 #include "confdefs.h"
10910
10911 int main() {
10912 main()
10913 ; return 0; }
10914 EOF
10915 if { (eval echo configure:10916: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10916   rm -rf conftest*
10917   eval "ac_cv_lib_$ac_lib_var=yes"
10918 else
10919   echo "configure: failed program was:" >&5
10920   cat conftest.$ac_ext >&5
10921   rm -rf conftest*
10922   eval "ac_cv_lib_$ac_lib_var=no"
10923 fi
10924 rm -f conftest*
10925 LIBS="$ac_save_LIBS"
10926
10927 fi
10928 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10929   echo "$ac_t""yes" 1>&6
10930   have_k4=yes
10931 else
10932   echo "$ac_t""no" 1>&6
10933 have_k4=no
10934 fi
10935
10936
10937                 if test $have_k4 = yes ; then
10938                         ol_with_kerberos=found
10939                         ol_link_krb4=yes
10940
10941                         cat >> confdefs.h <<\EOF
10942 #define HAVE_KRB4 1
10943 EOF
10944
10945
10946                         KRB4_LIBS="-lkrb -ldes"
10947
10948                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10949                                 cat >> confdefs.h <<\EOF
10950 #define HAVE_KTH_KERBEROS 1
10951 EOF
10952
10953                         fi
10954                 fi
10955         fi
10956 fi
10957
10958 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10959         ol_link_kpasswd=yes
10960 fi
10961
10962 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10963         ol_link_kbind=yes
10964
10965 elif test $ol_enable_kbind = yes ; then
10966         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10967 fi
10968
10969 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10970         cat >> confdefs.h <<\EOF
10971 #define HAVE_KERBEROS 1
10972 EOF
10973
10974
10975 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10976         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10977 fi
10978
10979 ol_link_tls=no
10980 if test $ol_with_tls != no ; then
10981         for ac_hdr in openssl/ssl.h ssl.h
10982 do
10983 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10984 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10985 echo "configure:10986: checking for $ac_hdr" >&5
10986 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10987   echo $ac_n "(cached) $ac_c" 1>&6
10988 else
10989   cat > conftest.$ac_ext <<EOF
10990 #line 10991 "configure"
10991 #include "confdefs.h"
10992 #include <$ac_hdr>
10993 EOF
10994 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10995 { (eval echo configure:10996: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10996 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10997 if test -z "$ac_err"; then
10998   rm -rf conftest*
10999   eval "ac_cv_header_$ac_safe=yes"
11000 else
11001   echo "$ac_err" >&5
11002   echo "configure: failed program was:" >&5
11003   cat conftest.$ac_ext >&5
11004   rm -rf conftest*
11005   eval "ac_cv_header_$ac_safe=no"
11006 fi
11007 rm -f conftest*
11008 fi
11009 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11010   echo "$ac_t""yes" 1>&6
11011     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11012   cat >> confdefs.h <<EOF
11013 #define $ac_tr_hdr 1
11014 EOF
11015  
11016 else
11017   echo "$ac_t""no" 1>&6
11018 fi
11019 done
11020
11021         
11022         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
11023                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11024 echo "configure:11025: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11025 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11026 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11027   echo $ac_n "(cached) $ac_c" 1>&6
11028 else
11029   ac_save_LIBS="$LIBS"
11030 LIBS="-lssl -lcrypto $LIBS"
11031 cat > conftest.$ac_ext <<EOF
11032 #line 11033 "configure"
11033 #include "confdefs.h"
11034 /* Override any gcc2 internal prototype to avoid an error.  */
11035 /* We use char because int might match the return type of a gcc2
11036     builtin and then its argument prototype would still apply.  */
11037 char SSLeay_add_ssl_algorithms();
11038
11039 int main() {
11040 SSLeay_add_ssl_algorithms()
11041 ; return 0; }
11042 EOF
11043 if { (eval echo configure:11044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11044   rm -rf conftest*
11045   eval "ac_cv_lib_$ac_lib_var=yes"
11046 else
11047   echo "configure: failed program was:" >&5
11048   cat conftest.$ac_ext >&5
11049   rm -rf conftest*
11050   eval "ac_cv_lib_$ac_lib_var=no"
11051 fi
11052 rm -f conftest*
11053 LIBS="$ac_save_LIBS"
11054
11055 fi
11056 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11057   echo "$ac_t""yes" 1>&6
11058   have_ssleay=yes
11059                         need_rsaref=no
11060 else
11061   echo "$ac_t""no" 1>&6
11062 have_ssleay=no
11063 fi
11064
11065                         
11066                 if test $have_ssleay = no ; then
11067                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11068 echo "configure:11069: checking for SSL_library_init in -lssl" >&5
11069 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11070 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11071   echo $ac_n "(cached) $ac_c" 1>&6
11072 else
11073   ac_save_LIBS="$LIBS"
11074 LIBS="-lssl -lcrypto $LIBS"
11075 cat > conftest.$ac_ext <<EOF
11076 #line 11077 "configure"
11077 #include "confdefs.h"
11078 /* Override any gcc2 internal prototype to avoid an error.  */
11079 /* We use char because int might match the return type of a gcc2
11080     builtin and then its argument prototype would still apply.  */
11081 char SSL_library_init();
11082
11083 int main() {
11084 SSL_library_init()
11085 ; return 0; }
11086 EOF
11087 if { (eval echo configure:11088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11088   rm -rf conftest*
11089   eval "ac_cv_lib_$ac_lib_var=yes"
11090 else
11091   echo "configure: failed program was:" >&5
11092   cat conftest.$ac_ext >&5
11093   rm -rf conftest*
11094   eval "ac_cv_lib_$ac_lib_var=no"
11095 fi
11096 rm -f conftest*
11097 LIBS="$ac_save_LIBS"
11098
11099 fi
11100 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11101   echo "$ac_t""yes" 1>&6
11102   have_ssleay=yes
11103                                 need_rsaref=no
11104 else
11105   echo "$ac_t""no" 1>&6
11106 have_ssleay=no
11107 fi
11108
11109                 fi
11110
11111                 if test $have_ssleay = no ; then
11112                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11113 echo "configure:11114: checking for ssl3_accept in -lssl" >&5
11114 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11115 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11116   echo $ac_n "(cached) $ac_c" 1>&6
11117 else
11118   ac_save_LIBS="$LIBS"
11119 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11120 cat > conftest.$ac_ext <<EOF
11121 #line 11122 "configure"
11122 #include "confdefs.h"
11123 /* Override any gcc2 internal prototype to avoid an error.  */
11124 /* We use char because int might match the return type of a gcc2
11125     builtin and then its argument prototype would still apply.  */
11126 char ssl3_accept();
11127
11128 int main() {
11129 ssl3_accept()
11130 ; return 0; }
11131 EOF
11132 if { (eval echo configure:11133: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11133   rm -rf conftest*
11134   eval "ac_cv_lib_$ac_lib_var=yes"
11135 else
11136   echo "configure: failed program was:" >&5
11137   cat conftest.$ac_ext >&5
11138   rm -rf conftest*
11139   eval "ac_cv_lib_$ac_lib_var=no"
11140 fi
11141 rm -f conftest*
11142 LIBS="$ac_save_LIBS"
11143
11144 fi
11145 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11146   echo "$ac_t""yes" 1>&6
11147   have_ssleay=yes
11148                                 need_rsaref=yes
11149 else
11150   echo "$ac_t""no" 1>&6
11151 have_ssleay=no
11152 fi
11153
11154                 fi
11155
11156                 if test $have_ssleay = yes ; then
11157                         ol_with_tls=found
11158                         ol_link_tls=yes
11159
11160                         cat >> confdefs.h <<\EOF
11161 #define HAVE_SSLEAY 1
11162 EOF
11163
11164
11165                         if test $need_rsaref = yes; then
11166                                 cat >> confdefs.h <<\EOF
11167 #define HAVE_RSAREF 1
11168 EOF
11169
11170
11171                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11172                         else
11173                                 TLS_LIBS="-lssl -lcrypto"
11174                         fi
11175                 fi
11176         fi
11177
11178 else
11179         echo "configure: warning: TLS data protection not supported!" 1>&2
11180 fi
11181
11182 if test $ol_link_tls = yes ; then
11183         cat >> confdefs.h <<\EOF
11184 #define HAVE_TLS 1
11185 EOF
11186
11187
11188 elif test $ol_with_tls = auto ; then
11189         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11190         echo "configure: warning: TLS data protection not supported!" 1>&2
11191
11192 elif test $ol_with_tls != no ; then
11193         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11194 fi
11195
11196 if test $ol_enable_lmpasswd != no; then
11197         if test $ol_link_tls != yes ; then
11198                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11199         fi
11200
11201         cat >> confdefs.h <<\EOF
11202 #define SLAPD_LMHASH 1
11203 EOF
11204
11205 fi
11206
11207 for ac_func in \
11208         ctime_r                 \
11209         gethostbyname_r gethostbyaddr_r \
11210
11211 do
11212 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11213 echo "configure:11214: checking for $ac_func" >&5
11214 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11215   echo $ac_n "(cached) $ac_c" 1>&6
11216 else
11217   cat > conftest.$ac_ext <<EOF
11218 #line 11219 "configure"
11219 #include "confdefs.h"
11220 /* System header to define __stub macros and hopefully few prototypes,
11221     which can conflict with char $ac_func(); below.  */
11222 #include <assert.h>
11223 /* Override any gcc2 internal prototype to avoid an error.  */
11224 /* We use char because int might match the return type of a gcc2
11225     builtin and then its argument prototype would still apply.  */
11226 char $ac_func();
11227 char (*f)();
11228
11229 int main() {
11230
11231 /* The GNU C library defines this for functions which it implements
11232     to always fail with ENOSYS.  Some functions are actually named
11233     something starting with __ and the normal name is an alias.  */
11234 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11235 choke me
11236 #else
11237 f = $ac_func;
11238 #endif
11239
11240 ; return 0; }
11241 EOF
11242 if { (eval echo configure:11243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11243   rm -rf conftest*
11244   eval "ac_cv_func_$ac_func=yes"
11245 else
11246   echo "configure: failed program was:" >&5
11247   cat conftest.$ac_ext >&5
11248   rm -rf conftest*
11249   eval "ac_cv_func_$ac_func=no"
11250 fi
11251 rm -f conftest*
11252 fi
11253
11254 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11255   echo "$ac_t""yes" 1>&6
11256     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11257   cat >> confdefs.h <<EOF
11258 #define $ac_tr_func 1
11259 EOF
11260  
11261 else
11262   echo "$ac_t""no" 1>&6
11263 fi
11264 done
11265
11266
11267 if test "$ac_cv_func_ctime_r" = no ; then
11268         ol_cv_func_ctime_r_nargs=0
11269 else
11270         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11271 echo "configure:11272: checking number of arguments of ctime_r" >&5
11272 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11273   echo $ac_n "(cached) $ac_c" 1>&6
11274 else
11275   cat > conftest.$ac_ext <<EOF
11276 #line 11277 "configure"
11277 #include "confdefs.h"
11278 #include <time.h>
11279 int main() {
11280 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11281 ; return 0; }
11282 EOF
11283 if { (eval echo configure:11284: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11284   rm -rf conftest*
11285   ol_cv_func_ctime_r_nargs3=yes
11286 else
11287   echo "configure: failed program was:" >&5
11288   cat conftest.$ac_ext >&5
11289   rm -rf conftest*
11290   ol_cv_func_ctime_r_nargs3=no
11291 fi
11292 rm -f conftest*
11293
11294         cat > conftest.$ac_ext <<EOF
11295 #line 11296 "configure"
11296 #include "confdefs.h"
11297 #include <time.h>
11298 int main() {
11299 time_t ti; char *buffer; ctime_r(&ti,buffer);
11300 ; return 0; }
11301 EOF
11302 if { (eval echo configure:11303: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11303   rm -rf conftest*
11304   ol_cv_func_ctime_r_nargs2=yes
11305 else
11306   echo "configure: failed program was:" >&5
11307   cat conftest.$ac_ext >&5
11308   rm -rf conftest*
11309   ol_cv_func_ctime_r_nargs2=no
11310 fi
11311 rm -f conftest*
11312
11313         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11314                 $ol_cv_func_ctime_r_nargs2 = no ; then
11315
11316                 ol_cv_func_ctime_r_nargs=3
11317
11318         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11319                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11320
11321                 ol_cv_func_ctime_r_nargs=2
11322
11323         else
11324                 ol_cv_func_ctime_r_nargs=0
11325         fi
11326   
11327 fi
11328
11329 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11330
11331   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11332         cat >> confdefs.h <<EOF
11333 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11334 EOF
11335
11336   fi
11337
11338 fi
11339
11340 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11341         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11342 echo "configure:11343: checking number of arguments of gethostbyname_r" >&5
11343 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11344   echo $ac_n "(cached) $ac_c" 1>&6
11345 else
11346   cat > conftest.$ac_ext <<EOF
11347 #line 11348 "configure"
11348 #include "confdefs.h"
11349 #include <sys/types.h>
11350 #include <sys/socket.h>
11351 #include <netinet/in.h>
11352 #include <netdb.h>
11353 #define BUFSIZE (sizeof(struct hostent)+10)
11354 int main() {
11355 struct hostent hent; char buffer[BUFSIZE];
11356                 int bufsize=BUFSIZE;int h_errno;
11357                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11358                         buffer, bufsize, &h_errno);
11359 ; return 0; }
11360 EOF
11361 if { (eval echo configure:11362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11362   rm -rf conftest*
11363   ol_cv_func_gethostbyname_r_nargs5=yes
11364 else
11365   echo "configure: failed program was:" >&5
11366   cat conftest.$ac_ext >&5
11367   rm -rf conftest*
11368   ol_cv_func_gethostbyname_r_nargs5=no
11369 fi
11370 rm -f conftest*
11371
11372         cat > conftest.$ac_ext <<EOF
11373 #line 11374 "configure"
11374 #include "confdefs.h"
11375 #include <sys/types.h>
11376 #include <sys/socket.h>
11377 #include <netinet/in.h>
11378 #include <netdb.h>
11379 #define BUFSIZE (sizeof(struct hostent)+10)
11380 int main() {
11381 struct hostent hent;struct hostent *rhent;
11382                 char buffer[BUFSIZE];
11383                 int bufsize=BUFSIZE;int h_errno;
11384                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11385                         &rhent, &h_errno);
11386 ; return 0; }
11387 EOF
11388 if { (eval echo configure:11389: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11389   rm -rf conftest*
11390   ol_cv_func_gethostbyname_r_nargs6=yes
11391 else
11392   echo "configure: failed program was:" >&5
11393   cat conftest.$ac_ext >&5
11394   rm -rf conftest*
11395   ol_cv_func_gethostbyname_r_nargs6=no
11396 fi
11397 rm -f conftest*
11398
11399         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11400                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11401
11402                 ol_cv_func_gethostbyname_r_nargs=5
11403
11404         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11405                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11406
11407                 ol_cv_func_gethostbyname_r_nargs=6
11408
11409         else
11410                 ol_cv_func_gethostbyname_r_nargs=0
11411         fi
11412   
11413 fi
11414
11415 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11416   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11417         cat >> confdefs.h <<EOF
11418 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11419 EOF
11420
11421   fi
11422
11423 else
11424         ol_cv_func_gethostbyname_r_nargs=0
11425 fi
11426  
11427 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11428         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11429 echo "configure:11430: checking number of arguments of gethostbyaddr_r" >&5
11430 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11431   echo $ac_n "(cached) $ac_c" 1>&6
11432 else
11433   cat > conftest.$ac_ext <<EOF
11434 #line 11435 "configure"
11435 #include "confdefs.h"
11436 #include <sys/types.h>
11437 #include <sys/socket.h>
11438 #include <netinet/in.h>
11439 #include <netdb.h>
11440 #define BUFSIZE (sizeof(struct hostent)+10)
11441 int main() {
11442 struct hostent hent; char buffer[BUFSIZE]; 
11443             struct in_addr add;
11444             size_t alen=sizeof(struct in_addr);
11445             int bufsize=BUFSIZE;int h_errno;
11446                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11447                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11448 ; return 0; }
11449 EOF
11450 if { (eval echo configure:11451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11451   rm -rf conftest*
11452   ol_cv_func_gethostbyaddr_r_nargs7=yes
11453 else
11454   echo "configure: failed program was:" >&5
11455   cat conftest.$ac_ext >&5
11456   rm -rf conftest*
11457   ol_cv_func_gethostbyaddr_r_nargs7=no
11458 fi
11459 rm -f conftest*
11460
11461         cat > conftest.$ac_ext <<EOF
11462 #line 11463 "configure"
11463 #include "confdefs.h"
11464 #include <sys/types.h>
11465 #include <sys/socket.h>
11466 #include <netinet/in.h>
11467 #include <netdb.h>
11468 #define BUFSIZE (sizeof(struct hostent)+10)
11469 int main() {
11470 struct hostent hent;
11471                 struct hostent *rhent; char buffer[BUFSIZE]; 
11472                 struct in_addr add;
11473                 size_t alen=sizeof(struct in_addr);
11474                 int bufsize=BUFSIZE;int h_errno;
11475                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11476                         alen, AF_INET, &hent, buffer, bufsize, 
11477                         &rhent, &h_errno);
11478 ; return 0; }
11479 EOF
11480 if { (eval echo configure:11481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11481   rm -rf conftest*
11482   ol_cv_func_gethostbyaddr_r_nargs8=yes
11483 else
11484   echo "configure: failed program was:" >&5
11485   cat conftest.$ac_ext >&5
11486   rm -rf conftest*
11487   ol_cv_func_gethostbyaddr_r_nargs8=no
11488 fi
11489 rm -f conftest*
11490
11491         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11492                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11493
11494                 ol_cv_func_gethostbyaddr_r_nargs=7
11495
11496         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11497                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11498
11499                 ol_cv_func_gethostbyaddr_r_nargs=8
11500
11501         else
11502                 ol_cv_func_gethostbyaddr_r_nargs=0
11503         fi
11504   
11505 fi
11506
11507 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11508   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11509     cat >> confdefs.h <<EOF
11510 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11511 EOF
11512
11513   fi
11514
11515 else
11516         ol_cv_func_gethostbyaddr_r_nargs=0
11517 fi
11518
11519 if test "$ac_cv_func_ctime_r" = yes \
11520         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11521         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11522         -a "$ac_cv_func_gethostbyname_r" = yes \
11523         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11524         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11525         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11526         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11527         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11528         ; then
11529  
11530         cat >> confdefs.h <<\EOF
11531 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11532 EOF
11533
11534 fi
11535
11536 ol_link_threads=no
11537
11538 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11539         -o $ol_with_threads = nt ; then
11540
11541         
11542         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11543 echo "configure:11544: checking for _beginthread" >&5
11544 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11545   echo $ac_n "(cached) $ac_c" 1>&6
11546 else
11547   cat > conftest.$ac_ext <<EOF
11548 #line 11549 "configure"
11549 #include "confdefs.h"
11550 /* System header to define __stub macros and hopefully few prototypes,
11551     which can conflict with char _beginthread(); below.  */
11552 #include <assert.h>
11553 /* Override any gcc2 internal prototype to avoid an error.  */
11554 /* We use char because int might match the return type of a gcc2
11555     builtin and then its argument prototype would still apply.  */
11556 char _beginthread();
11557 char (*f)();
11558
11559 int main() {
11560
11561 /* The GNU C library defines this for functions which it implements
11562     to always fail with ENOSYS.  Some functions are actually named
11563     something starting with __ and the normal name is an alias.  */
11564 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11565 choke me
11566 #else
11567 f = _beginthread;
11568 #endif
11569
11570 ; return 0; }
11571 EOF
11572 if { (eval echo configure:11573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11573   rm -rf conftest*
11574   eval "ac_cv_func__beginthread=yes"
11575 else
11576   echo "configure: failed program was:" >&5
11577   cat conftest.$ac_ext >&5
11578   rm -rf conftest*
11579   eval "ac_cv_func__beginthread=no"
11580 fi
11581 rm -f conftest*
11582 fi
11583
11584 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11585   echo "$ac_t""yes" 1>&6
11586   :
11587 else
11588   echo "$ac_t""no" 1>&6
11589 fi
11590
11591
11592         if test $ac_cv_func__beginthread = yes ; then
11593                 cat >> confdefs.h <<\EOF
11594 #define HAVE_NT_THREADS 1
11595 EOF
11596
11597                 ol_cv_nt_threads=yes
11598         fi
11599
11600
11601         if test "$ol_cv_nt_threads" = yes ; then
11602                 ol_link_threads=nt
11603                 ol_with_threads=found
11604                 ol_with_yielding_select=yes
11605
11606                 cat >> confdefs.h <<\EOF
11607 #define HAVE_NT_SERVICE_MANAGER 1
11608 EOF
11609
11610                 cat >> confdefs.h <<\EOF
11611 #define HAVE_NT_EVENT_LOG 1
11612 EOF
11613
11614         fi
11615
11616         if test $ol_with_threads = nt ; then
11617                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11618         fi
11619 fi
11620
11621 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11622         -o $ol_with_threads = posix ; then
11623
11624         for ac_hdr in pthread.h
11625 do
11626 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11627 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11628 echo "configure:11629: checking for $ac_hdr" >&5
11629 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11630   echo $ac_n "(cached) $ac_c" 1>&6
11631 else
11632   cat > conftest.$ac_ext <<EOF
11633 #line 11634 "configure"
11634 #include "confdefs.h"
11635 #include <$ac_hdr>
11636 EOF
11637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11638 { (eval echo configure:11639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11640 if test -z "$ac_err"; then
11641   rm -rf conftest*
11642   eval "ac_cv_header_$ac_safe=yes"
11643 else
11644   echo "$ac_err" >&5
11645   echo "configure: failed program was:" >&5
11646   cat conftest.$ac_ext >&5
11647   rm -rf conftest*
11648   eval "ac_cv_header_$ac_safe=no"
11649 fi
11650 rm -f conftest*
11651 fi
11652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11653   echo "$ac_t""yes" 1>&6
11654     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11655   cat >> confdefs.h <<EOF
11656 #define $ac_tr_hdr 1
11657 EOF
11658  
11659 else
11660   echo "$ac_t""no" 1>&6
11661 fi
11662 done
11663
11664
11665         if test $ac_cv_header_pthread_h = yes ; then
11666                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11667 echo "configure:11668: checking POSIX thread version" >&5
11668 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11669   echo $ac_n "(cached) $ac_c" 1>&6
11670 else
11671   
11672         cat > conftest.$ac_ext <<EOF
11673 #line 11674 "configure"
11674 #include "confdefs.h"
11675 #include <pthread.h>
11676 EOF
11677 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11678   egrep "pthread_yield" >/dev/null 2>&1; then
11679   rm -rf conftest*
11680   
11681         cat > conftest.$ac_ext <<EOF
11682 #line 11683 "configure"
11683 #include "confdefs.h"
11684 #include <pthread.h>
11685 EOF
11686 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11687   egrep "pthread_detach" >/dev/null 2>&1; then
11688   rm -rf conftest*
11689   
11690         cat > conftest.$ac_ext <<EOF
11691 #line 11692 "configure"
11692 #include "confdefs.h"
11693
11694 #               include <pthread.h>
11695 #               ifdef PTHREAD_CREATE_UNDETACHED
11696                 draft7
11697 #               endif
11698         
11699 EOF
11700 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11701   egrep "draft7" >/dev/null 2>&1; then
11702   rm -rf conftest*
11703   ol_cv_pthread_version=7
11704 else
11705   rm -rf conftest*
11706   
11707         cat > conftest.$ac_ext <<EOF
11708 #line 11709 "configure"
11709 #include "confdefs.h"
11710 #include <pthread.h>
11711 EOF
11712 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11713   egrep "pthread_attr_default" >/dev/null 2>&1; then
11714   rm -rf conftest*
11715   
11716         cat > conftest.$ac_ext <<EOF
11717 #line 11718 "configure"
11718 #include "confdefs.h"
11719
11720 #               include <pthread.h>
11721 #ifdef          PTHREAD_MUTEX_INITIALIZER
11722                 draft5
11723 #endif
11724         
11725 EOF
11726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11727   egrep "draft5" >/dev/null 2>&1; then
11728   rm -rf conftest*
11729   ol_cv_pthread_version=5
11730 else
11731   rm -rf conftest*
11732   ol_cv_pthread_version=4
11733 fi
11734 rm -f conftest*
11735  
11736 else
11737   rm -rf conftest*
11738   ol_cv_pthread_version=6
11739 fi
11740 rm -f conftest*
11741  
11742 fi
11743 rm -f conftest*
11744  
11745 else
11746   rm -rf conftest*
11747   ol_cv_pthread_version=8
11748 fi
11749 rm -f conftest*
11750  
11751 else
11752   rm -rf conftest*
11753   ol_cv_pthread_version=10
11754 fi
11755 rm -f conftest*
11756
11757
11758 fi
11759
11760 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11761
11762
11763                 if test $ol_cv_pthread_version != 0 ; then
11764                         cat >> confdefs.h <<EOF
11765 #define HAVE_PTHREADS $ol_cv_pthread_version
11766 EOF
11767
11768                 else
11769                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11770                 fi
11771
11772                 # consider threads found
11773                 ol_with_threads=found
11774
11775                 
11776         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11777 echo "configure:11778: checking for LinuxThreads pthread.h" >&5
11778 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11779   echo $ac_n "(cached) $ac_c" 1>&6
11780 else
11781   cat > conftest.$ac_ext <<EOF
11782 #line 11783 "configure"
11783 #include "confdefs.h"
11784 #include <pthread.h>
11785 EOF
11786 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11787   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11788   rm -rf conftest*
11789   ol_cv_header_linux_threads=yes
11790 else
11791   rm -rf conftest*
11792   ol_cv_header_linux_threads=no
11793 fi
11794 rm -f conftest*
11795
11796                 
11797 fi
11798
11799 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11800         if test $ol_cv_header_linux_threads = yes; then
11801                 cat >> confdefs.h <<\EOF
11802 #define HAVE_LINUX_THREADS 1
11803 EOF
11804
11805         fi
11806
11807                 
11808         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11809 echo "configure:11810: checking for GNU Pth pthread.h" >&5
11810 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11811   echo $ac_n "(cached) $ac_c" 1>&6
11812 else
11813   cat > conftest.$ac_ext <<EOF
11814 #line 11815 "configure"
11815 #include "confdefs.h"
11816 #include <pthread.h>
11817 #ifdef _POSIX_THREAD_IS_GNU_PTH
11818         __gnu_pth__;
11819 #endif
11820
11821 EOF
11822 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11823   egrep "__gnu_pth__" >/dev/null 2>&1; then
11824   rm -rf conftest*
11825   ol_cv_header_gnu_pth_pthread_h=yes
11826 else
11827   rm -rf conftest*
11828   ol_cv_header_gnu_pth_pthread_h=no
11829 fi
11830 rm -f conftest*
11831
11832                 
11833 fi
11834
11835 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11836
11837
11838                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11839                         for ac_hdr in sched.h
11840 do
11841 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11842 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11843 echo "configure:11844: checking for $ac_hdr" >&5
11844 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11845   echo $ac_n "(cached) $ac_c" 1>&6
11846 else
11847   cat > conftest.$ac_ext <<EOF
11848 #line 11849 "configure"
11849 #include "confdefs.h"
11850 #include <$ac_hdr>
11851 EOF
11852 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11853 { (eval echo configure:11854: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11854 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11855 if test -z "$ac_err"; then
11856   rm -rf conftest*
11857   eval "ac_cv_header_$ac_safe=yes"
11858 else
11859   echo "$ac_err" >&5
11860   echo "configure: failed program was:" >&5
11861   cat conftest.$ac_ext >&5
11862   rm -rf conftest*
11863   eval "ac_cv_header_$ac_safe=no"
11864 fi
11865 rm -f conftest*
11866 fi
11867 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11868   echo "$ac_t""yes" 1>&6
11869     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11870   cat >> confdefs.h <<EOF
11871 #define $ac_tr_hdr 1
11872 EOF
11873  
11874 else
11875   echo "$ac_t""no" 1>&6
11876 fi
11877 done
11878
11879                 fi
11880
11881                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11882                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11883 echo "configure:11884: checking for pthread_create in default libraries" >&5
11884 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11885   echo $ac_n "(cached) $ac_c" 1>&6
11886 else
11887   
11888                 if test "$cross_compiling" = yes; then
11889   cat > conftest.$ac_ext <<EOF
11890 #line 11891 "configure"
11891 #include "confdefs.h"
11892 /* pthread test headers */
11893 #include <pthread.h>
11894 #if HAVE_PTHREADS < 7
11895 #include <errno.h>
11896 #endif
11897 #ifndef NULL
11898 #define NULL (void*)0
11899 #endif
11900
11901 static void *task(p)
11902         void *p;
11903 {
11904         return (void *) (p == NULL);
11905 }
11906
11907 int main() {
11908
11909         /* pthread test function */
11910 #ifndef PTHREAD_CREATE_DETACHED
11911 #define PTHREAD_CREATE_DETACHED 1
11912 #endif
11913         pthread_t t;
11914         int status;
11915         int detach = PTHREAD_CREATE_DETACHED;
11916
11917 #if HAVE_PTHREADS > 4
11918         /* Final pthreads */
11919         pthread_attr_t attr;
11920
11921         status = pthread_attr_init(&attr);
11922         if( status ) return status;
11923
11924 #if HAVE_PTHREADS < 7
11925         status = pthread_attr_setdetachstate(&attr, &detach);
11926         if( status < 0 ) status = errno;
11927 #else
11928         status = pthread_attr_setdetachstate(&attr, detach);
11929 #endif
11930         if( status ) return status;
11931         status = pthread_create( &t, &attr, task, NULL );
11932 #if HAVE_PTHREADS < 7
11933         if( status < 0 ) status = errno;
11934 #endif
11935         if( status ) return status;
11936 #else
11937         /* Draft 4 pthreads */
11938         status = pthread_create( &t, pthread_attr_default, task, NULL );
11939         if( status ) return errno;
11940
11941         /* give thread a chance to complete */
11942         /* it should remain joinable and hence detachable */
11943         sleep( 1 );
11944
11945         status = pthread_detach( &t );
11946         if( status ) return errno;
11947 #endif
11948
11949 #ifdef HAVE_LINUX_THREADS
11950         pthread_kill_other_threads_np();
11951 #endif
11952
11953         return 0;
11954
11955 ; return 0; }
11956 EOF
11957 if { (eval echo configure:11958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11958   rm -rf conftest*
11959   ol_cv_pthread_create=yes
11960 else
11961   echo "configure: failed program was:" >&5
11962   cat conftest.$ac_ext >&5
11963   rm -rf conftest*
11964   ol_cv_pthread_create=no
11965 fi
11966 rm -f conftest*
11967 else
11968   cat > conftest.$ac_ext <<EOF
11969 #line 11970 "configure"
11970 #include "confdefs.h"
11971 /* pthread test headers */
11972 #include <pthread.h>
11973 #if HAVE_PTHREADS < 7
11974 #include <errno.h>
11975 #endif
11976 #ifndef NULL
11977 #define NULL (void*)0
11978 #endif
11979
11980 static void *task(p)
11981         void *p;
11982 {
11983         return (void *) (p == NULL);
11984 }
11985
11986
11987 int main(argc, argv)
11988         int argc;
11989         char **argv;
11990 {
11991
11992         /* pthread test function */
11993 #ifndef PTHREAD_CREATE_DETACHED
11994 #define PTHREAD_CREATE_DETACHED 1
11995 #endif
11996         pthread_t t;
11997         int status;
11998         int detach = PTHREAD_CREATE_DETACHED;
11999
12000 #if HAVE_PTHREADS > 4
12001         /* Final pthreads */
12002         pthread_attr_t attr;
12003
12004         status = pthread_attr_init(&attr);
12005         if( status ) return status;
12006
12007 #if HAVE_PTHREADS < 7
12008         status = pthread_attr_setdetachstate(&attr, &detach);
12009         if( status < 0 ) status = errno;
12010 #else
12011         status = pthread_attr_setdetachstate(&attr, detach);
12012 #endif
12013         if( status ) return status;
12014         status = pthread_create( &t, &attr, task, NULL );
12015 #if HAVE_PTHREADS < 7
12016         if( status < 0 ) status = errno;
12017 #endif
12018         if( status ) return status;
12019 #else
12020         /* Draft 4 pthreads */
12021         status = pthread_create( &t, pthread_attr_default, task, NULL );
12022         if( status ) return errno;
12023
12024         /* give thread a chance to complete */
12025         /* it should remain joinable and hence detachable */
12026         sleep( 1 );
12027
12028         status = pthread_detach( &t );
12029         if( status ) return errno;
12030 #endif
12031
12032 #ifdef HAVE_LINUX_THREADS
12033         pthread_kill_other_threads_np();
12034 #endif
12035
12036         return 0;
12037
12038 }
12039
12040 EOF
12041 if { (eval echo configure:12042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12042 then
12043   ol_cv_pthread_create=yes
12044 else
12045   echo "configure: failed program was:" >&5
12046   cat conftest.$ac_ext >&5
12047   rm -fr conftest*
12048   ol_cv_pthread_create=no
12049 fi
12050 rm -fr conftest*
12051 fi
12052
12053 fi
12054
12055 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12056
12057                 if test $ol_cv_pthread_create != no ; then
12058                         ol_link_threads=posix
12059                         ol_link_pthreads=""
12060                 fi
12061                 
12062                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12063 if test "$ol_link_threads" = no ; then
12064         # try -kthread
12065         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12066 echo "configure:12067: checking for pthread link with -kthread" >&5
12067 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12068   echo $ac_n "(cached) $ac_c" 1>&6
12069 else
12070   
12071                 # save the flags
12072                 ol_LIBS="$LIBS"
12073                 LIBS="-kthread $LIBS"
12074
12075                 if test "$cross_compiling" = yes; then
12076   cat > conftest.$ac_ext <<EOF
12077 #line 12078 "configure"
12078 #include "confdefs.h"
12079 /* pthread test headers */
12080 #include <pthread.h>
12081 #if HAVE_PTHREADS < 7
12082 #include <errno.h>
12083 #endif
12084 #ifndef NULL
12085 #define NULL (void*)0
12086 #endif
12087
12088 static void *task(p)
12089         void *p;
12090 {
12091         return (void *) (p == NULL);
12092 }
12093
12094 int main() {
12095
12096         /* pthread test function */
12097 #ifndef PTHREAD_CREATE_DETACHED
12098 #define PTHREAD_CREATE_DETACHED 1
12099 #endif
12100         pthread_t t;
12101         int status;
12102         int detach = PTHREAD_CREATE_DETACHED;
12103
12104 #if HAVE_PTHREADS > 4
12105         /* Final pthreads */
12106         pthread_attr_t attr;
12107
12108         status = pthread_attr_init(&attr);
12109         if( status ) return status;
12110
12111 #if HAVE_PTHREADS < 7
12112         status = pthread_attr_setdetachstate(&attr, &detach);
12113         if( status < 0 ) status = errno;
12114 #else
12115         status = pthread_attr_setdetachstate(&attr, detach);
12116 #endif
12117         if( status ) return status;
12118         status = pthread_create( &t, &attr, task, NULL );
12119 #if HAVE_PTHREADS < 7
12120         if( status < 0 ) status = errno;
12121 #endif
12122         if( status ) return status;
12123 #else
12124         /* Draft 4 pthreads */
12125         status = pthread_create( &t, pthread_attr_default, task, NULL );
12126         if( status ) return errno;
12127
12128         /* give thread a chance to complete */
12129         /* it should remain joinable and hence detachable */
12130         sleep( 1 );
12131
12132         status = pthread_detach( &t );
12133         if( status ) return errno;
12134 #endif
12135
12136 #ifdef HAVE_LINUX_THREADS
12137         pthread_kill_other_threads_np();
12138 #endif
12139
12140         return 0;
12141
12142 ; return 0; }
12143 EOF
12144 if { (eval echo configure:12145: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12145   rm -rf conftest*
12146   ol_cv_pthread_kthread=yes
12147 else
12148   echo "configure: failed program was:" >&5
12149   cat conftest.$ac_ext >&5
12150   rm -rf conftest*
12151   ol_cv_pthread_kthread=no
12152 fi
12153 rm -f conftest*
12154 else
12155   cat > conftest.$ac_ext <<EOF
12156 #line 12157 "configure"
12157 #include "confdefs.h"
12158 /* pthread test headers */
12159 #include <pthread.h>
12160 #if HAVE_PTHREADS < 7
12161 #include <errno.h>
12162 #endif
12163 #ifndef NULL
12164 #define NULL (void*)0
12165 #endif
12166
12167 static void *task(p)
12168         void *p;
12169 {
12170         return (void *) (p == NULL);
12171 }
12172
12173
12174 int main(argc, argv)
12175         int argc;
12176         char **argv;
12177 {
12178
12179         /* pthread test function */
12180 #ifndef PTHREAD_CREATE_DETACHED
12181 #define PTHREAD_CREATE_DETACHED 1
12182 #endif
12183         pthread_t t;
12184         int status;
12185         int detach = PTHREAD_CREATE_DETACHED;
12186
12187 #if HAVE_PTHREADS > 4
12188         /* Final pthreads */
12189         pthread_attr_t attr;
12190
12191         status = pthread_attr_init(&attr);
12192         if( status ) return status;
12193
12194 #if HAVE_PTHREADS < 7
12195         status = pthread_attr_setdetachstate(&attr, &detach);
12196         if( status < 0 ) status = errno;
12197 #else
12198         status = pthread_attr_setdetachstate(&attr, detach);
12199 #endif
12200         if( status ) return status;
12201         status = pthread_create( &t, &attr, task, NULL );
12202 #if HAVE_PTHREADS < 7
12203         if( status < 0 ) status = errno;
12204 #endif
12205         if( status ) return status;
12206 #else
12207         /* Draft 4 pthreads */
12208         status = pthread_create( &t, pthread_attr_default, task, NULL );
12209         if( status ) return errno;
12210
12211         /* give thread a chance to complete */
12212         /* it should remain joinable and hence detachable */
12213         sleep( 1 );
12214
12215         status = pthread_detach( &t );
12216         if( status ) return errno;
12217 #endif
12218
12219 #ifdef HAVE_LINUX_THREADS
12220         pthread_kill_other_threads_np();
12221 #endif
12222
12223         return 0;
12224
12225 }
12226
12227 EOF
12228 if { (eval echo configure:12229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12229 then
12230   ol_cv_pthread_kthread=yes
12231 else
12232   echo "configure: failed program was:" >&5
12233   cat conftest.$ac_ext >&5
12234   rm -fr conftest*
12235   ol_cv_pthread_kthread=no
12236 fi
12237 rm -fr conftest*
12238 fi
12239
12240
12241                 # restore the LIBS
12242                 LIBS="$ol_LIBS"
12243         
12244 fi
12245
12246 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12247
12248         if test $ol_cv_pthread_kthread = yes ; then
12249                 ol_link_pthreads="-kthread"
12250                 ol_link_threads=posix
12251         fi
12252 fi
12253
12254                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12255 if test "$ol_link_threads" = no ; then
12256         # try -pthread
12257         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12258 echo "configure:12259: checking for pthread link with -pthread" >&5
12259 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12260   echo $ac_n "(cached) $ac_c" 1>&6
12261 else
12262   
12263                 # save the flags
12264                 ol_LIBS="$LIBS"
12265                 LIBS="-pthread $LIBS"
12266
12267                 if test "$cross_compiling" = yes; then
12268   cat > conftest.$ac_ext <<EOF
12269 #line 12270 "configure"
12270 #include "confdefs.h"
12271 /* pthread test headers */
12272 #include <pthread.h>
12273 #if HAVE_PTHREADS < 7
12274 #include <errno.h>
12275 #endif
12276 #ifndef NULL
12277 #define NULL (void*)0
12278 #endif
12279
12280 static void *task(p)
12281         void *p;
12282 {
12283         return (void *) (p == NULL);
12284 }
12285
12286 int main() {
12287
12288         /* pthread test function */
12289 #ifndef PTHREAD_CREATE_DETACHED
12290 #define PTHREAD_CREATE_DETACHED 1
12291 #endif
12292         pthread_t t;
12293         int status;
12294         int detach = PTHREAD_CREATE_DETACHED;
12295
12296 #if HAVE_PTHREADS > 4
12297         /* Final pthreads */
12298         pthread_attr_t attr;
12299
12300         status = pthread_attr_init(&attr);
12301         if( status ) return status;
12302
12303 #if HAVE_PTHREADS < 7
12304         status = pthread_attr_setdetachstate(&attr, &detach);
12305         if( status < 0 ) status = errno;
12306 #else
12307         status = pthread_attr_setdetachstate(&attr, detach);
12308 #endif
12309         if( status ) return status;
12310         status = pthread_create( &t, &attr, task, NULL );
12311 #if HAVE_PTHREADS < 7
12312         if( status < 0 ) status = errno;
12313 #endif
12314         if( status ) return status;
12315 #else
12316         /* Draft 4 pthreads */
12317         status = pthread_create( &t, pthread_attr_default, task, NULL );
12318         if( status ) return errno;
12319
12320         /* give thread a chance to complete */
12321         /* it should remain joinable and hence detachable */
12322         sleep( 1 );
12323
12324         status = pthread_detach( &t );
12325         if( status ) return errno;
12326 #endif
12327
12328 #ifdef HAVE_LINUX_THREADS
12329         pthread_kill_other_threads_np();
12330 #endif
12331
12332         return 0;
12333
12334 ; return 0; }
12335 EOF
12336 if { (eval echo configure:12337: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12337   rm -rf conftest*
12338   ol_cv_pthread_pthread=yes
12339 else
12340   echo "configure: failed program was:" >&5
12341   cat conftest.$ac_ext >&5
12342   rm -rf conftest*
12343   ol_cv_pthread_pthread=no
12344 fi
12345 rm -f conftest*
12346 else
12347   cat > conftest.$ac_ext <<EOF
12348 #line 12349 "configure"
12349 #include "confdefs.h"
12350 /* pthread test headers */
12351 #include <pthread.h>
12352 #if HAVE_PTHREADS < 7
12353 #include <errno.h>
12354 #endif
12355 #ifndef NULL
12356 #define NULL (void*)0
12357 #endif
12358
12359 static void *task(p)
12360         void *p;
12361 {
12362         return (void *) (p == NULL);
12363 }
12364
12365
12366 int main(argc, argv)
12367         int argc;
12368         char **argv;
12369 {
12370
12371         /* pthread test function */
12372 #ifndef PTHREAD_CREATE_DETACHED
12373 #define PTHREAD_CREATE_DETACHED 1
12374 #endif
12375         pthread_t t;
12376         int status;
12377         int detach = PTHREAD_CREATE_DETACHED;
12378
12379 #if HAVE_PTHREADS > 4
12380         /* Final pthreads */
12381         pthread_attr_t attr;
12382
12383         status = pthread_attr_init(&attr);
12384         if( status ) return status;
12385
12386 #if HAVE_PTHREADS < 7
12387         status = pthread_attr_setdetachstate(&attr, &detach);
12388         if( status < 0 ) status = errno;
12389 #else
12390         status = pthread_attr_setdetachstate(&attr, detach);
12391 #endif
12392         if( status ) return status;
12393         status = pthread_create( &t, &attr, task, NULL );
12394 #if HAVE_PTHREADS < 7
12395         if( status < 0 ) status = errno;
12396 #endif
12397         if( status ) return status;
12398 #else
12399         /* Draft 4 pthreads */
12400         status = pthread_create( &t, pthread_attr_default, task, NULL );
12401         if( status ) return errno;
12402
12403         /* give thread a chance to complete */
12404         /* it should remain joinable and hence detachable */
12405         sleep( 1 );
12406
12407         status = pthread_detach( &t );
12408         if( status ) return errno;
12409 #endif
12410
12411 #ifdef HAVE_LINUX_THREADS
12412         pthread_kill_other_threads_np();
12413 #endif
12414
12415         return 0;
12416
12417 }
12418
12419 EOF
12420 if { (eval echo configure:12421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12421 then
12422   ol_cv_pthread_pthread=yes
12423 else
12424   echo "configure: failed program was:" >&5
12425   cat conftest.$ac_ext >&5
12426   rm -fr conftest*
12427   ol_cv_pthread_pthread=no
12428 fi
12429 rm -fr conftest*
12430 fi
12431
12432
12433                 # restore the LIBS
12434                 LIBS="$ol_LIBS"
12435         
12436 fi
12437
12438 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12439
12440         if test $ol_cv_pthread_pthread = yes ; then
12441                 ol_link_pthreads="-pthread"
12442                 ol_link_threads=posix
12443         fi
12444 fi
12445
12446                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12447 if test "$ol_link_threads" = no ; then
12448         # try -pthreads
12449         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12450 echo "configure:12451: checking for pthread link with -pthreads" >&5
12451 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12452   echo $ac_n "(cached) $ac_c" 1>&6
12453 else
12454   
12455                 # save the flags
12456                 ol_LIBS="$LIBS"
12457                 LIBS="-pthreads $LIBS"
12458
12459                 if test "$cross_compiling" = yes; then
12460   cat > conftest.$ac_ext <<EOF
12461 #line 12462 "configure"
12462 #include "confdefs.h"
12463 /* pthread test headers */
12464 #include <pthread.h>
12465 #if HAVE_PTHREADS < 7
12466 #include <errno.h>
12467 #endif
12468 #ifndef NULL
12469 #define NULL (void*)0
12470 #endif
12471
12472 static void *task(p)
12473         void *p;
12474 {
12475         return (void *) (p == NULL);
12476 }
12477
12478 int main() {
12479
12480         /* pthread test function */
12481 #ifndef PTHREAD_CREATE_DETACHED
12482 #define PTHREAD_CREATE_DETACHED 1
12483 #endif
12484         pthread_t t;
12485         int status;
12486         int detach = PTHREAD_CREATE_DETACHED;
12487
12488 #if HAVE_PTHREADS > 4
12489         /* Final pthreads */
12490         pthread_attr_t attr;
12491
12492         status = pthread_attr_init(&attr);
12493         if( status ) return status;
12494
12495 #if HAVE_PTHREADS < 7
12496         status = pthread_attr_setdetachstate(&attr, &detach);
12497         if( status < 0 ) status = errno;
12498 #else
12499         status = pthread_attr_setdetachstate(&attr, detach);
12500 #endif
12501         if( status ) return status;
12502         status = pthread_create( &t, &attr, task, NULL );
12503 #if HAVE_PTHREADS < 7
12504         if( status < 0 ) status = errno;
12505 #endif
12506         if( status ) return status;
12507 #else
12508         /* Draft 4 pthreads */
12509         status = pthread_create( &t, pthread_attr_default, task, NULL );
12510         if( status ) return errno;
12511
12512         /* give thread a chance to complete */
12513         /* it should remain joinable and hence detachable */
12514         sleep( 1 );
12515
12516         status = pthread_detach( &t );
12517         if( status ) return errno;
12518 #endif
12519
12520 #ifdef HAVE_LINUX_THREADS
12521         pthread_kill_other_threads_np();
12522 #endif
12523
12524         return 0;
12525
12526 ; return 0; }
12527 EOF
12528 if { (eval echo configure:12529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12529   rm -rf conftest*
12530   ol_cv_pthread_pthreads=yes
12531 else
12532   echo "configure: failed program was:" >&5
12533   cat conftest.$ac_ext >&5
12534   rm -rf conftest*
12535   ol_cv_pthread_pthreads=no
12536 fi
12537 rm -f conftest*
12538 else
12539   cat > conftest.$ac_ext <<EOF
12540 #line 12541 "configure"
12541 #include "confdefs.h"
12542 /* pthread test headers */
12543 #include <pthread.h>
12544 #if HAVE_PTHREADS < 7
12545 #include <errno.h>
12546 #endif
12547 #ifndef NULL
12548 #define NULL (void*)0
12549 #endif
12550
12551 static void *task(p)
12552         void *p;
12553 {
12554         return (void *) (p == NULL);
12555 }
12556
12557
12558 int main(argc, argv)
12559         int argc;
12560         char **argv;
12561 {
12562
12563         /* pthread test function */
12564 #ifndef PTHREAD_CREATE_DETACHED
12565 #define PTHREAD_CREATE_DETACHED 1
12566 #endif
12567         pthread_t t;
12568         int status;
12569         int detach = PTHREAD_CREATE_DETACHED;
12570
12571 #if HAVE_PTHREADS > 4
12572         /* Final pthreads */
12573         pthread_attr_t attr;
12574
12575         status = pthread_attr_init(&attr);
12576         if( status ) return status;
12577
12578 #if HAVE_PTHREADS < 7
12579         status = pthread_attr_setdetachstate(&attr, &detach);
12580         if( status < 0 ) status = errno;
12581 #else
12582         status = pthread_attr_setdetachstate(&attr, detach);
12583 #endif
12584         if( status ) return status;
12585         status = pthread_create( &t, &attr, task, NULL );
12586 #if HAVE_PTHREADS < 7
12587         if( status < 0 ) status = errno;
12588 #endif
12589         if( status ) return status;
12590 #else
12591         /* Draft 4 pthreads */
12592         status = pthread_create( &t, pthread_attr_default, task, NULL );
12593         if( status ) return errno;
12594
12595         /* give thread a chance to complete */
12596         /* it should remain joinable and hence detachable */
12597         sleep( 1 );
12598
12599         status = pthread_detach( &t );
12600         if( status ) return errno;
12601 #endif
12602
12603 #ifdef HAVE_LINUX_THREADS
12604         pthread_kill_other_threads_np();
12605 #endif
12606
12607         return 0;
12608
12609 }
12610
12611 EOF
12612 if { (eval echo configure:12613: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12613 then
12614   ol_cv_pthread_pthreads=yes
12615 else
12616   echo "configure: failed program was:" >&5
12617   cat conftest.$ac_ext >&5
12618   rm -fr conftest*
12619   ol_cv_pthread_pthreads=no
12620 fi
12621 rm -fr conftest*
12622 fi
12623
12624
12625                 # restore the LIBS
12626                 LIBS="$ol_LIBS"
12627         
12628 fi
12629
12630 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12631
12632         if test $ol_cv_pthread_pthreads = yes ; then
12633                 ol_link_pthreads="-pthreads"
12634                 ol_link_threads=posix
12635         fi
12636 fi
12637
12638                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12639 if test "$ol_link_threads" = no ; then
12640         # try -mthreads
12641         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12642 echo "configure:12643: checking for pthread link with -mthreads" >&5
12643 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12644   echo $ac_n "(cached) $ac_c" 1>&6
12645 else
12646   
12647                 # save the flags
12648                 ol_LIBS="$LIBS"
12649                 LIBS="-mthreads $LIBS"
12650
12651                 if test "$cross_compiling" = yes; then
12652   cat > conftest.$ac_ext <<EOF
12653 #line 12654 "configure"
12654 #include "confdefs.h"
12655 /* pthread test headers */
12656 #include <pthread.h>
12657 #if HAVE_PTHREADS < 7
12658 #include <errno.h>
12659 #endif
12660 #ifndef NULL
12661 #define NULL (void*)0
12662 #endif
12663
12664 static void *task(p)
12665         void *p;
12666 {
12667         return (void *) (p == NULL);
12668 }
12669
12670 int main() {
12671
12672         /* pthread test function */
12673 #ifndef PTHREAD_CREATE_DETACHED
12674 #define PTHREAD_CREATE_DETACHED 1
12675 #endif
12676         pthread_t t;
12677         int status;
12678         int detach = PTHREAD_CREATE_DETACHED;
12679
12680 #if HAVE_PTHREADS > 4
12681         /* Final pthreads */
12682         pthread_attr_t attr;
12683
12684         status = pthread_attr_init(&attr);
12685         if( status ) return status;
12686
12687 #if HAVE_PTHREADS < 7
12688         status = pthread_attr_setdetachstate(&attr, &detach);
12689         if( status < 0 ) status = errno;
12690 #else
12691         status = pthread_attr_setdetachstate(&attr, detach);
12692 #endif
12693         if( status ) return status;
12694         status = pthread_create( &t, &attr, task, NULL );
12695 #if HAVE_PTHREADS < 7
12696         if( status < 0 ) status = errno;
12697 #endif
12698         if( status ) return status;
12699 #else
12700         /* Draft 4 pthreads */
12701         status = pthread_create( &t, pthread_attr_default, task, NULL );
12702         if( status ) return errno;
12703
12704         /* give thread a chance to complete */
12705         /* it should remain joinable and hence detachable */
12706         sleep( 1 );
12707
12708         status = pthread_detach( &t );
12709         if( status ) return errno;
12710 #endif
12711
12712 #ifdef HAVE_LINUX_THREADS
12713         pthread_kill_other_threads_np();
12714 #endif
12715
12716         return 0;
12717
12718 ; return 0; }
12719 EOF
12720 if { (eval echo configure:12721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12721   rm -rf conftest*
12722   ol_cv_pthread_mthreads=yes
12723 else
12724   echo "configure: failed program was:" >&5
12725   cat conftest.$ac_ext >&5
12726   rm -rf conftest*
12727   ol_cv_pthread_mthreads=no
12728 fi
12729 rm -f conftest*
12730 else
12731   cat > conftest.$ac_ext <<EOF
12732 #line 12733 "configure"
12733 #include "confdefs.h"
12734 /* pthread test headers */
12735 #include <pthread.h>
12736 #if HAVE_PTHREADS < 7
12737 #include <errno.h>
12738 #endif
12739 #ifndef NULL
12740 #define NULL (void*)0
12741 #endif
12742
12743 static void *task(p)
12744         void *p;
12745 {
12746         return (void *) (p == NULL);
12747 }
12748
12749
12750 int main(argc, argv)
12751         int argc;
12752         char **argv;
12753 {
12754
12755         /* pthread test function */
12756 #ifndef PTHREAD_CREATE_DETACHED
12757 #define PTHREAD_CREATE_DETACHED 1
12758 #endif
12759         pthread_t t;
12760         int status;
12761         int detach = PTHREAD_CREATE_DETACHED;
12762
12763 #if HAVE_PTHREADS > 4
12764         /* Final pthreads */
12765         pthread_attr_t attr;
12766
12767         status = pthread_attr_init(&attr);
12768         if( status ) return status;
12769
12770 #if HAVE_PTHREADS < 7
12771         status = pthread_attr_setdetachstate(&attr, &detach);
12772         if( status < 0 ) status = errno;
12773 #else
12774         status = pthread_attr_setdetachstate(&attr, detach);
12775 #endif
12776         if( status ) return status;
12777         status = pthread_create( &t, &attr, task, NULL );
12778 #if HAVE_PTHREADS < 7
12779         if( status < 0 ) status = errno;
12780 #endif
12781         if( status ) return status;
12782 #else
12783         /* Draft 4 pthreads */
12784         status = pthread_create( &t, pthread_attr_default, task, NULL );
12785         if( status ) return errno;
12786
12787         /* give thread a chance to complete */
12788         /* it should remain joinable and hence detachable */
12789         sleep( 1 );
12790
12791         status = pthread_detach( &t );
12792         if( status ) return errno;
12793 #endif
12794
12795 #ifdef HAVE_LINUX_THREADS
12796         pthread_kill_other_threads_np();
12797 #endif
12798
12799         return 0;
12800
12801 }
12802
12803 EOF
12804 if { (eval echo configure:12805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12805 then
12806   ol_cv_pthread_mthreads=yes
12807 else
12808   echo "configure: failed program was:" >&5
12809   cat conftest.$ac_ext >&5
12810   rm -fr conftest*
12811   ol_cv_pthread_mthreads=no
12812 fi
12813 rm -fr conftest*
12814 fi
12815
12816
12817                 # restore the LIBS
12818                 LIBS="$ol_LIBS"
12819         
12820 fi
12821
12822 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12823
12824         if test $ol_cv_pthread_mthreads = yes ; then
12825                 ol_link_pthreads="-mthreads"
12826                 ol_link_threads=posix
12827         fi
12828 fi
12829
12830                 # Pthread try link: -thread (ol_cv_pthread_thread)
12831 if test "$ol_link_threads" = no ; then
12832         # try -thread
12833         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12834 echo "configure:12835: checking for pthread link with -thread" >&5
12835 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12836   echo $ac_n "(cached) $ac_c" 1>&6
12837 else
12838   
12839                 # save the flags
12840                 ol_LIBS="$LIBS"
12841                 LIBS="-thread $LIBS"
12842
12843                 if test "$cross_compiling" = yes; then
12844   cat > conftest.$ac_ext <<EOF
12845 #line 12846 "configure"
12846 #include "confdefs.h"
12847 /* pthread test headers */
12848 #include <pthread.h>
12849 #if HAVE_PTHREADS < 7
12850 #include <errno.h>
12851 #endif
12852 #ifndef NULL
12853 #define NULL (void*)0
12854 #endif
12855
12856 static void *task(p)
12857         void *p;
12858 {
12859         return (void *) (p == NULL);
12860 }
12861
12862 int main() {
12863
12864         /* pthread test function */
12865 #ifndef PTHREAD_CREATE_DETACHED
12866 #define PTHREAD_CREATE_DETACHED 1
12867 #endif
12868         pthread_t t;
12869         int status;
12870         int detach = PTHREAD_CREATE_DETACHED;
12871
12872 #if HAVE_PTHREADS > 4
12873         /* Final pthreads */
12874         pthread_attr_t attr;
12875
12876         status = pthread_attr_init(&attr);
12877         if( status ) return status;
12878
12879 #if HAVE_PTHREADS < 7
12880         status = pthread_attr_setdetachstate(&attr, &detach);
12881         if( status < 0 ) status = errno;
12882 #else
12883         status = pthread_attr_setdetachstate(&attr, detach);
12884 #endif
12885         if( status ) return status;
12886         status = pthread_create( &t, &attr, task, NULL );
12887 #if HAVE_PTHREADS < 7
12888         if( status < 0 ) status = errno;
12889 #endif
12890         if( status ) return status;
12891 #else
12892         /* Draft 4 pthreads */
12893         status = pthread_create( &t, pthread_attr_default, task, NULL );
12894         if( status ) return errno;
12895
12896         /* give thread a chance to complete */
12897         /* it should remain joinable and hence detachable */
12898         sleep( 1 );
12899
12900         status = pthread_detach( &t );
12901         if( status ) return errno;
12902 #endif
12903
12904 #ifdef HAVE_LINUX_THREADS
12905         pthread_kill_other_threads_np();
12906 #endif
12907
12908         return 0;
12909
12910 ; return 0; }
12911 EOF
12912 if { (eval echo configure:12913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12913   rm -rf conftest*
12914   ol_cv_pthread_thread=yes
12915 else
12916   echo "configure: failed program was:" >&5
12917   cat conftest.$ac_ext >&5
12918   rm -rf conftest*
12919   ol_cv_pthread_thread=no
12920 fi
12921 rm -f conftest*
12922 else
12923   cat > conftest.$ac_ext <<EOF
12924 #line 12925 "configure"
12925 #include "confdefs.h"
12926 /* pthread test headers */
12927 #include <pthread.h>
12928 #if HAVE_PTHREADS < 7
12929 #include <errno.h>
12930 #endif
12931 #ifndef NULL
12932 #define NULL (void*)0
12933 #endif
12934
12935 static void *task(p)
12936         void *p;
12937 {
12938         return (void *) (p == NULL);
12939 }
12940
12941
12942 int main(argc, argv)
12943         int argc;
12944         char **argv;
12945 {
12946
12947         /* pthread test function */
12948 #ifndef PTHREAD_CREATE_DETACHED
12949 #define PTHREAD_CREATE_DETACHED 1
12950 #endif
12951         pthread_t t;
12952         int status;
12953         int detach = PTHREAD_CREATE_DETACHED;
12954
12955 #if HAVE_PTHREADS > 4
12956         /* Final pthreads */
12957         pthread_attr_t attr;
12958
12959         status = pthread_attr_init(&attr);
12960         if( status ) return status;
12961
12962 #if HAVE_PTHREADS < 7
12963         status = pthread_attr_setdetachstate(&attr, &detach);
12964         if( status < 0 ) status = errno;
12965 #else
12966         status = pthread_attr_setdetachstate(&attr, detach);
12967 #endif
12968         if( status ) return status;
12969         status = pthread_create( &t, &attr, task, NULL );
12970 #if HAVE_PTHREADS < 7
12971         if( status < 0 ) status = errno;
12972 #endif
12973         if( status ) return status;
12974 #else
12975         /* Draft 4 pthreads */
12976         status = pthread_create( &t, pthread_attr_default, task, NULL );
12977         if( status ) return errno;
12978
12979         /* give thread a chance to complete */
12980         /* it should remain joinable and hence detachable */
12981         sleep( 1 );
12982
12983         status = pthread_detach( &t );
12984         if( status ) return errno;
12985 #endif
12986
12987 #ifdef HAVE_LINUX_THREADS
12988         pthread_kill_other_threads_np();
12989 #endif
12990
12991         return 0;
12992
12993 }
12994
12995 EOF
12996 if { (eval echo configure:12997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12997 then
12998   ol_cv_pthread_thread=yes
12999 else
13000   echo "configure: failed program was:" >&5
13001   cat conftest.$ac_ext >&5
13002   rm -fr conftest*
13003   ol_cv_pthread_thread=no
13004 fi
13005 rm -fr conftest*
13006 fi
13007
13008
13009                 # restore the LIBS
13010                 LIBS="$ol_LIBS"
13011         
13012 fi
13013
13014 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13015
13016         if test $ol_cv_pthread_thread = yes ; then
13017                 ol_link_pthreads="-thread"
13018                 ol_link_threads=posix
13019         fi
13020 fi
13021
13022
13023                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13024 if test "$ol_link_threads" = no ; then
13025         # try -lpthread -lmach -lexc -lc_r
13026         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13027 echo "configure:13028: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13028 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13029   echo $ac_n "(cached) $ac_c" 1>&6
13030 else
13031   
13032                 # save the flags
13033                 ol_LIBS="$LIBS"
13034                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13035
13036                 if test "$cross_compiling" = yes; then
13037   cat > conftest.$ac_ext <<EOF
13038 #line 13039 "configure"
13039 #include "confdefs.h"
13040 /* pthread test headers */
13041 #include <pthread.h>
13042 #if HAVE_PTHREADS < 7
13043 #include <errno.h>
13044 #endif
13045 #ifndef NULL
13046 #define NULL (void*)0
13047 #endif
13048
13049 static void *task(p)
13050         void *p;
13051 {
13052         return (void *) (p == NULL);
13053 }
13054
13055 int main() {
13056
13057         /* pthread test function */
13058 #ifndef PTHREAD_CREATE_DETACHED
13059 #define PTHREAD_CREATE_DETACHED 1
13060 #endif
13061         pthread_t t;
13062         int status;
13063         int detach = PTHREAD_CREATE_DETACHED;
13064
13065 #if HAVE_PTHREADS > 4
13066         /* Final pthreads */
13067         pthread_attr_t attr;
13068
13069         status = pthread_attr_init(&attr);
13070         if( status ) return status;
13071
13072 #if HAVE_PTHREADS < 7
13073         status = pthread_attr_setdetachstate(&attr, &detach);
13074         if( status < 0 ) status = errno;
13075 #else
13076         status = pthread_attr_setdetachstate(&attr, detach);
13077 #endif
13078         if( status ) return status;
13079         status = pthread_create( &t, &attr, task, NULL );
13080 #if HAVE_PTHREADS < 7
13081         if( status < 0 ) status = errno;
13082 #endif
13083         if( status ) return status;
13084 #else
13085         /* Draft 4 pthreads */
13086         status = pthread_create( &t, pthread_attr_default, task, NULL );
13087         if( status ) return errno;
13088
13089         /* give thread a chance to complete */
13090         /* it should remain joinable and hence detachable */
13091         sleep( 1 );
13092
13093         status = pthread_detach( &t );
13094         if( status ) return errno;
13095 #endif
13096
13097 #ifdef HAVE_LINUX_THREADS
13098         pthread_kill_other_threads_np();
13099 #endif
13100
13101         return 0;
13102
13103 ; return 0; }
13104 EOF
13105 if { (eval echo configure:13106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13106   rm -rf conftest*
13107   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13108 else
13109   echo "configure: failed program was:" >&5
13110   cat conftest.$ac_ext >&5
13111   rm -rf conftest*
13112   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13113 fi
13114 rm -f conftest*
13115 else
13116   cat > conftest.$ac_ext <<EOF
13117 #line 13118 "configure"
13118 #include "confdefs.h"
13119 /* pthread test headers */
13120 #include <pthread.h>
13121 #if HAVE_PTHREADS < 7
13122 #include <errno.h>
13123 #endif
13124 #ifndef NULL
13125 #define NULL (void*)0
13126 #endif
13127
13128 static void *task(p)
13129         void *p;
13130 {
13131         return (void *) (p == NULL);
13132 }
13133
13134
13135 int main(argc, argv)
13136         int argc;
13137         char **argv;
13138 {
13139
13140         /* pthread test function */
13141 #ifndef PTHREAD_CREATE_DETACHED
13142 #define PTHREAD_CREATE_DETACHED 1
13143 #endif
13144         pthread_t t;
13145         int status;
13146         int detach = PTHREAD_CREATE_DETACHED;
13147
13148 #if HAVE_PTHREADS > 4
13149         /* Final pthreads */
13150         pthread_attr_t attr;
13151
13152         status = pthread_attr_init(&attr);
13153         if( status ) return status;
13154
13155 #if HAVE_PTHREADS < 7
13156         status = pthread_attr_setdetachstate(&attr, &detach);
13157         if( status < 0 ) status = errno;
13158 #else
13159         status = pthread_attr_setdetachstate(&attr, detach);
13160 #endif
13161         if( status ) return status;
13162         status = pthread_create( &t, &attr, task, NULL );
13163 #if HAVE_PTHREADS < 7
13164         if( status < 0 ) status = errno;
13165 #endif
13166         if( status ) return status;
13167 #else
13168         /* Draft 4 pthreads */
13169         status = pthread_create( &t, pthread_attr_default, task, NULL );
13170         if( status ) return errno;
13171
13172         /* give thread a chance to complete */
13173         /* it should remain joinable and hence detachable */
13174         sleep( 1 );
13175
13176         status = pthread_detach( &t );
13177         if( status ) return errno;
13178 #endif
13179
13180 #ifdef HAVE_LINUX_THREADS
13181         pthread_kill_other_threads_np();
13182 #endif
13183
13184         return 0;
13185
13186 }
13187
13188 EOF
13189 if { (eval echo configure:13190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13190 then
13191   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13192 else
13193   echo "configure: failed program was:" >&5
13194   cat conftest.$ac_ext >&5
13195   rm -fr conftest*
13196   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13197 fi
13198 rm -fr conftest*
13199 fi
13200
13201
13202                 # restore the LIBS
13203                 LIBS="$ol_LIBS"
13204         
13205 fi
13206
13207 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13208
13209         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13210                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13211                 ol_link_threads=posix
13212         fi
13213 fi
13214
13215                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13216 if test "$ol_link_threads" = no ; then
13217         # try -lpthread -lmach -lexc
13218         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13219 echo "configure:13220: checking for pthread link with -lpthread -lmach -lexc" >&5
13220 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13221   echo $ac_n "(cached) $ac_c" 1>&6
13222 else
13223   
13224                 # save the flags
13225                 ol_LIBS="$LIBS"
13226                 LIBS="-lpthread -lmach -lexc $LIBS"
13227
13228                 if test "$cross_compiling" = yes; then
13229   cat > conftest.$ac_ext <<EOF
13230 #line 13231 "configure"
13231 #include "confdefs.h"
13232 /* pthread test headers */
13233 #include <pthread.h>
13234 #if HAVE_PTHREADS < 7
13235 #include <errno.h>
13236 #endif
13237 #ifndef NULL
13238 #define NULL (void*)0
13239 #endif
13240
13241 static void *task(p)
13242         void *p;
13243 {
13244         return (void *) (p == NULL);
13245 }
13246
13247 int main() {
13248
13249         /* pthread test function */
13250 #ifndef PTHREAD_CREATE_DETACHED
13251 #define PTHREAD_CREATE_DETACHED 1
13252 #endif
13253         pthread_t t;
13254         int status;
13255         int detach = PTHREAD_CREATE_DETACHED;
13256
13257 #if HAVE_PTHREADS > 4
13258         /* Final pthreads */
13259         pthread_attr_t attr;
13260
13261         status = pthread_attr_init(&attr);
13262         if( status ) return status;
13263
13264 #if HAVE_PTHREADS < 7
13265         status = pthread_attr_setdetachstate(&attr, &detach);
13266         if( status < 0 ) status = errno;
13267 #else
13268         status = pthread_attr_setdetachstate(&attr, detach);
13269 #endif
13270         if( status ) return status;
13271         status = pthread_create( &t, &attr, task, NULL );
13272 #if HAVE_PTHREADS < 7
13273         if( status < 0 ) status = errno;
13274 #endif
13275         if( status ) return status;
13276 #else
13277         /* Draft 4 pthreads */
13278         status = pthread_create( &t, pthread_attr_default, task, NULL );
13279         if( status ) return errno;
13280
13281         /* give thread a chance to complete */
13282         /* it should remain joinable and hence detachable */
13283         sleep( 1 );
13284
13285         status = pthread_detach( &t );
13286         if( status ) return errno;
13287 #endif
13288
13289 #ifdef HAVE_LINUX_THREADS
13290         pthread_kill_other_threads_np();
13291 #endif
13292
13293         return 0;
13294
13295 ; return 0; }
13296 EOF
13297 if { (eval echo configure:13298: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13298   rm -rf conftest*
13299   ol_cv_pthread_lpthread_lmach_lexc=yes
13300 else
13301   echo "configure: failed program was:" >&5
13302   cat conftest.$ac_ext >&5
13303   rm -rf conftest*
13304   ol_cv_pthread_lpthread_lmach_lexc=no
13305 fi
13306 rm -f conftest*
13307 else
13308   cat > conftest.$ac_ext <<EOF
13309 #line 13310 "configure"
13310 #include "confdefs.h"
13311 /* pthread test headers */
13312 #include <pthread.h>
13313 #if HAVE_PTHREADS < 7
13314 #include <errno.h>
13315 #endif
13316 #ifndef NULL
13317 #define NULL (void*)0
13318 #endif
13319
13320 static void *task(p)
13321         void *p;
13322 {
13323         return (void *) (p == NULL);
13324 }
13325
13326
13327 int main(argc, argv)
13328         int argc;
13329         char **argv;
13330 {
13331
13332         /* pthread test function */
13333 #ifndef PTHREAD_CREATE_DETACHED
13334 #define PTHREAD_CREATE_DETACHED 1
13335 #endif
13336         pthread_t t;
13337         int status;
13338         int detach = PTHREAD_CREATE_DETACHED;
13339
13340 #if HAVE_PTHREADS > 4
13341         /* Final pthreads */
13342         pthread_attr_t attr;
13343
13344         status = pthread_attr_init(&attr);
13345         if( status ) return status;
13346
13347 #if HAVE_PTHREADS < 7
13348         status = pthread_attr_setdetachstate(&attr, &detach);
13349         if( status < 0 ) status = errno;
13350 #else
13351         status = pthread_attr_setdetachstate(&attr, detach);
13352 #endif
13353         if( status ) return status;
13354         status = pthread_create( &t, &attr, task, NULL );
13355 #if HAVE_PTHREADS < 7
13356         if( status < 0 ) status = errno;
13357 #endif
13358         if( status ) return status;
13359 #else
13360         /* Draft 4 pthreads */
13361         status = pthread_create( &t, pthread_attr_default, task, NULL );
13362         if( status ) return errno;
13363
13364         /* give thread a chance to complete */
13365         /* it should remain joinable and hence detachable */
13366         sleep( 1 );
13367
13368         status = pthread_detach( &t );
13369         if( status ) return errno;
13370 #endif
13371
13372 #ifdef HAVE_LINUX_THREADS
13373         pthread_kill_other_threads_np();
13374 #endif
13375
13376         return 0;
13377
13378 }
13379
13380 EOF
13381 if { (eval echo configure:13382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13382 then
13383   ol_cv_pthread_lpthread_lmach_lexc=yes
13384 else
13385   echo "configure: failed program was:" >&5
13386   cat conftest.$ac_ext >&5
13387   rm -fr conftest*
13388   ol_cv_pthread_lpthread_lmach_lexc=no
13389 fi
13390 rm -fr conftest*
13391 fi
13392
13393
13394                 # restore the LIBS
13395                 LIBS="$ol_LIBS"
13396         
13397 fi
13398
13399 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13400
13401         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13402                 ol_link_pthreads="-lpthread -lmach -lexc"
13403                 ol_link_threads=posix
13404         fi
13405 fi
13406
13407
13408                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13409 if test "$ol_link_threads" = no ; then
13410         # try -lpthread -Wl,-woff,85
13411         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13412 echo "configure:13413: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13413 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13414   echo $ac_n "(cached) $ac_c" 1>&6
13415 else
13416   
13417                 # save the flags
13418                 ol_LIBS="$LIBS"
13419                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13420
13421                 if test "$cross_compiling" = yes; then
13422   cat > conftest.$ac_ext <<EOF
13423 #line 13424 "configure"
13424 #include "confdefs.h"
13425 /* pthread test headers */
13426 #include <pthread.h>
13427 #if HAVE_PTHREADS < 7
13428 #include <errno.h>
13429 #endif
13430 #ifndef NULL
13431 #define NULL (void*)0
13432 #endif
13433
13434 static void *task(p)
13435         void *p;
13436 {
13437         return (void *) (p == NULL);
13438 }
13439
13440 int main() {
13441
13442         /* pthread test function */
13443 #ifndef PTHREAD_CREATE_DETACHED
13444 #define PTHREAD_CREATE_DETACHED 1
13445 #endif
13446         pthread_t t;
13447         int status;
13448         int detach = PTHREAD_CREATE_DETACHED;
13449
13450 #if HAVE_PTHREADS > 4
13451         /* Final pthreads */
13452         pthread_attr_t attr;
13453
13454         status = pthread_attr_init(&attr);
13455         if( status ) return status;
13456
13457 #if HAVE_PTHREADS < 7
13458         status = pthread_attr_setdetachstate(&attr, &detach);
13459         if( status < 0 ) status = errno;
13460 #else
13461         status = pthread_attr_setdetachstate(&attr, detach);
13462 #endif
13463         if( status ) return status;
13464         status = pthread_create( &t, &attr, task, NULL );
13465 #if HAVE_PTHREADS < 7
13466         if( status < 0 ) status = errno;
13467 #endif
13468         if( status ) return status;
13469 #else
13470         /* Draft 4 pthreads */
13471         status = pthread_create( &t, pthread_attr_default, task, NULL );
13472         if( status ) return errno;
13473
13474         /* give thread a chance to complete */
13475         /* it should remain joinable and hence detachable */
13476         sleep( 1 );
13477
13478         status = pthread_detach( &t );
13479         if( status ) return errno;
13480 #endif
13481
13482 #ifdef HAVE_LINUX_THREADS
13483         pthread_kill_other_threads_np();
13484 #endif
13485
13486         return 0;
13487
13488 ; return 0; }
13489 EOF
13490 if { (eval echo configure:13491: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13491   rm -rf conftest*
13492   ol_cv_pthread_lib_lpthread_woff=yes
13493 else
13494   echo "configure: failed program was:" >&5
13495   cat conftest.$ac_ext >&5
13496   rm -rf conftest*
13497   ol_cv_pthread_lib_lpthread_woff=no
13498 fi
13499 rm -f conftest*
13500 else
13501   cat > conftest.$ac_ext <<EOF
13502 #line 13503 "configure"
13503 #include "confdefs.h"
13504 /* pthread test headers */
13505 #include <pthread.h>
13506 #if HAVE_PTHREADS < 7
13507 #include <errno.h>
13508 #endif
13509 #ifndef NULL
13510 #define NULL (void*)0
13511 #endif
13512
13513 static void *task(p)
13514         void *p;
13515 {
13516         return (void *) (p == NULL);
13517 }
13518
13519
13520 int main(argc, argv)
13521         int argc;
13522         char **argv;
13523 {
13524
13525         /* pthread test function */
13526 #ifndef PTHREAD_CREATE_DETACHED
13527 #define PTHREAD_CREATE_DETACHED 1
13528 #endif
13529         pthread_t t;
13530         int status;
13531         int detach = PTHREAD_CREATE_DETACHED;
13532
13533 #if HAVE_PTHREADS > 4
13534         /* Final pthreads */
13535         pthread_attr_t attr;
13536
13537         status = pthread_attr_init(&attr);
13538         if( status ) return status;
13539
13540 #if HAVE_PTHREADS < 7
13541         status = pthread_attr_setdetachstate(&attr, &detach);
13542         if( status < 0 ) status = errno;
13543 #else
13544         status = pthread_attr_setdetachstate(&attr, detach);
13545 #endif
13546         if( status ) return status;
13547         status = pthread_create( &t, &attr, task, NULL );
13548 #if HAVE_PTHREADS < 7
13549         if( status < 0 ) status = errno;
13550 #endif
13551         if( status ) return status;
13552 #else
13553         /* Draft 4 pthreads */
13554         status = pthread_create( &t, pthread_attr_default, task, NULL );
13555         if( status ) return errno;
13556
13557         /* give thread a chance to complete */
13558         /* it should remain joinable and hence detachable */
13559         sleep( 1 );
13560
13561         status = pthread_detach( &t );
13562         if( status ) return errno;
13563 #endif
13564
13565 #ifdef HAVE_LINUX_THREADS
13566         pthread_kill_other_threads_np();
13567 #endif
13568
13569         return 0;
13570
13571 }
13572
13573 EOF
13574 if { (eval echo configure:13575: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13575 then
13576   ol_cv_pthread_lib_lpthread_woff=yes
13577 else
13578   echo "configure: failed program was:" >&5
13579   cat conftest.$ac_ext >&5
13580   rm -fr conftest*
13581   ol_cv_pthread_lib_lpthread_woff=no
13582 fi
13583 rm -fr conftest*
13584 fi
13585
13586
13587                 # restore the LIBS
13588                 LIBS="$ol_LIBS"
13589         
13590 fi
13591
13592 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13593
13594         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13595                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13596                 ol_link_threads=posix
13597         fi
13598 fi
13599
13600
13601                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13602 if test "$ol_link_threads" = no ; then
13603         # try -lpthread
13604         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13605 echo "configure:13606: checking for pthread link with -lpthread" >&5
13606 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13607   echo $ac_n "(cached) $ac_c" 1>&6
13608 else
13609   
13610                 # save the flags
13611                 ol_LIBS="$LIBS"
13612                 LIBS="-lpthread $LIBS"
13613
13614                 if test "$cross_compiling" = yes; then
13615   cat > conftest.$ac_ext <<EOF
13616 #line 13617 "configure"
13617 #include "confdefs.h"
13618 /* pthread test headers */
13619 #include <pthread.h>
13620 #if HAVE_PTHREADS < 7
13621 #include <errno.h>
13622 #endif
13623 #ifndef NULL
13624 #define NULL (void*)0
13625 #endif
13626
13627 static void *task(p)
13628         void *p;
13629 {
13630         return (void *) (p == NULL);
13631 }
13632
13633 int main() {
13634
13635         /* pthread test function */
13636 #ifndef PTHREAD_CREATE_DETACHED
13637 #define PTHREAD_CREATE_DETACHED 1
13638 #endif
13639         pthread_t t;
13640         int status;
13641         int detach = PTHREAD_CREATE_DETACHED;
13642
13643 #if HAVE_PTHREADS > 4
13644         /* Final pthreads */
13645         pthread_attr_t attr;
13646
13647         status = pthread_attr_init(&attr);
13648         if( status ) return status;
13649
13650 #if HAVE_PTHREADS < 7
13651         status = pthread_attr_setdetachstate(&attr, &detach);
13652         if( status < 0 ) status = errno;
13653 #else
13654         status = pthread_attr_setdetachstate(&attr, detach);
13655 #endif
13656         if( status ) return status;
13657         status = pthread_create( &t, &attr, task, NULL );
13658 #if HAVE_PTHREADS < 7
13659         if( status < 0 ) status = errno;
13660 #endif
13661         if( status ) return status;
13662 #else
13663         /* Draft 4 pthreads */
13664         status = pthread_create( &t, pthread_attr_default, task, NULL );
13665         if( status ) return errno;
13666
13667         /* give thread a chance to complete */
13668         /* it should remain joinable and hence detachable */
13669         sleep( 1 );
13670
13671         status = pthread_detach( &t );
13672         if( status ) return errno;
13673 #endif
13674
13675 #ifdef HAVE_LINUX_THREADS
13676         pthread_kill_other_threads_np();
13677 #endif
13678
13679         return 0;
13680
13681 ; return 0; }
13682 EOF
13683 if { (eval echo configure:13684: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13684   rm -rf conftest*
13685   ol_cv_pthread_lpthread=yes
13686 else
13687   echo "configure: failed program was:" >&5
13688   cat conftest.$ac_ext >&5
13689   rm -rf conftest*
13690   ol_cv_pthread_lpthread=no
13691 fi
13692 rm -f conftest*
13693 else
13694   cat > conftest.$ac_ext <<EOF
13695 #line 13696 "configure"
13696 #include "confdefs.h"
13697 /* pthread test headers */
13698 #include <pthread.h>
13699 #if HAVE_PTHREADS < 7
13700 #include <errno.h>
13701 #endif
13702 #ifndef NULL
13703 #define NULL (void*)0
13704 #endif
13705
13706 static void *task(p)
13707         void *p;
13708 {
13709         return (void *) (p == NULL);
13710 }
13711
13712
13713 int main(argc, argv)
13714         int argc;
13715         char **argv;
13716 {
13717
13718         /* pthread test function */
13719 #ifndef PTHREAD_CREATE_DETACHED
13720 #define PTHREAD_CREATE_DETACHED 1
13721 #endif
13722         pthread_t t;
13723         int status;
13724         int detach = PTHREAD_CREATE_DETACHED;
13725
13726 #if HAVE_PTHREADS > 4
13727         /* Final pthreads */
13728         pthread_attr_t attr;
13729
13730         status = pthread_attr_init(&attr);
13731         if( status ) return status;
13732
13733 #if HAVE_PTHREADS < 7
13734         status = pthread_attr_setdetachstate(&attr, &detach);
13735         if( status < 0 ) status = errno;
13736 #else
13737         status = pthread_attr_setdetachstate(&attr, detach);
13738 #endif
13739         if( status ) return status;
13740         status = pthread_create( &t, &attr, task, NULL );
13741 #if HAVE_PTHREADS < 7
13742         if( status < 0 ) status = errno;
13743 #endif
13744         if( status ) return status;
13745 #else
13746         /* Draft 4 pthreads */
13747         status = pthread_create( &t, pthread_attr_default, task, NULL );
13748         if( status ) return errno;
13749
13750         /* give thread a chance to complete */
13751         /* it should remain joinable and hence detachable */
13752         sleep( 1 );
13753
13754         status = pthread_detach( &t );
13755         if( status ) return errno;
13756 #endif
13757
13758 #ifdef HAVE_LINUX_THREADS
13759         pthread_kill_other_threads_np();
13760 #endif
13761
13762         return 0;
13763
13764 }
13765
13766 EOF
13767 if { (eval echo configure:13768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13768 then
13769   ol_cv_pthread_lpthread=yes
13770 else
13771   echo "configure: failed program was:" >&5
13772   cat conftest.$ac_ext >&5
13773   rm -fr conftest*
13774   ol_cv_pthread_lpthread=no
13775 fi
13776 rm -fr conftest*
13777 fi
13778
13779
13780                 # restore the LIBS
13781                 LIBS="$ol_LIBS"
13782         
13783 fi
13784
13785 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13786
13787         if test $ol_cv_pthread_lpthread = yes ; then
13788                 ol_link_pthreads="-lpthread"
13789                 ol_link_threads=posix
13790         fi
13791 fi
13792
13793                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13794 if test "$ol_link_threads" = no ; then
13795         # try -lc_r
13796         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13797 echo "configure:13798: checking for pthread link with -lc_r" >&5
13798 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13799   echo $ac_n "(cached) $ac_c" 1>&6
13800 else
13801   
13802                 # save the flags
13803                 ol_LIBS="$LIBS"
13804                 LIBS="-lc_r $LIBS"
13805
13806                 if test "$cross_compiling" = yes; then
13807   cat > conftest.$ac_ext <<EOF
13808 #line 13809 "configure"
13809 #include "confdefs.h"
13810 /* pthread test headers */
13811 #include <pthread.h>
13812 #if HAVE_PTHREADS < 7
13813 #include <errno.h>
13814 #endif
13815 #ifndef NULL
13816 #define NULL (void*)0
13817 #endif
13818
13819 static void *task(p)
13820         void *p;
13821 {
13822         return (void *) (p == NULL);
13823 }
13824
13825 int main() {
13826
13827         /* pthread test function */
13828 #ifndef PTHREAD_CREATE_DETACHED
13829 #define PTHREAD_CREATE_DETACHED 1
13830 #endif
13831         pthread_t t;
13832         int status;
13833         int detach = PTHREAD_CREATE_DETACHED;
13834
13835 #if HAVE_PTHREADS > 4
13836         /* Final pthreads */
13837         pthread_attr_t attr;
13838
13839         status = pthread_attr_init(&attr);
13840         if( status ) return status;
13841
13842 #if HAVE_PTHREADS < 7
13843         status = pthread_attr_setdetachstate(&attr, &detach);
13844         if( status < 0 ) status = errno;
13845 #else
13846         status = pthread_attr_setdetachstate(&attr, detach);
13847 #endif
13848         if( status ) return status;
13849         status = pthread_create( &t, &attr, task, NULL );
13850 #if HAVE_PTHREADS < 7
13851         if( status < 0 ) status = errno;
13852 #endif
13853         if( status ) return status;
13854 #else
13855         /* Draft 4 pthreads */
13856         status = pthread_create( &t, pthread_attr_default, task, NULL );
13857         if( status ) return errno;
13858
13859         /* give thread a chance to complete */
13860         /* it should remain joinable and hence detachable */
13861         sleep( 1 );
13862
13863         status = pthread_detach( &t );
13864         if( status ) return errno;
13865 #endif
13866
13867 #ifdef HAVE_LINUX_THREADS
13868         pthread_kill_other_threads_np();
13869 #endif
13870
13871         return 0;
13872
13873 ; return 0; }
13874 EOF
13875 if { (eval echo configure:13876: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13876   rm -rf conftest*
13877   ol_cv_pthread_lc_r=yes
13878 else
13879   echo "configure: failed program was:" >&5
13880   cat conftest.$ac_ext >&5
13881   rm -rf conftest*
13882   ol_cv_pthread_lc_r=no
13883 fi
13884 rm -f conftest*
13885 else
13886   cat > conftest.$ac_ext <<EOF
13887 #line 13888 "configure"
13888 #include "confdefs.h"
13889 /* pthread test headers */
13890 #include <pthread.h>
13891 #if HAVE_PTHREADS < 7
13892 #include <errno.h>
13893 #endif
13894 #ifndef NULL
13895 #define NULL (void*)0
13896 #endif
13897
13898 static void *task(p)
13899         void *p;
13900 {
13901         return (void *) (p == NULL);
13902 }
13903
13904
13905 int main(argc, argv)
13906         int argc;
13907         char **argv;
13908 {
13909
13910         /* pthread test function */
13911 #ifndef PTHREAD_CREATE_DETACHED
13912 #define PTHREAD_CREATE_DETACHED 1
13913 #endif
13914         pthread_t t;
13915         int status;
13916         int detach = PTHREAD_CREATE_DETACHED;
13917
13918 #if HAVE_PTHREADS > 4
13919         /* Final pthreads */
13920         pthread_attr_t attr;
13921
13922         status = pthread_attr_init(&attr);
13923         if( status ) return status;
13924
13925 #if HAVE_PTHREADS < 7
13926         status = pthread_attr_setdetachstate(&attr, &detach);
13927         if( status < 0 ) status = errno;
13928 #else
13929         status = pthread_attr_setdetachstate(&attr, detach);
13930 #endif
13931         if( status ) return status;
13932         status = pthread_create( &t, &attr, task, NULL );
13933 #if HAVE_PTHREADS < 7
13934         if( status < 0 ) status = errno;
13935 #endif
13936         if( status ) return status;
13937 #else
13938         /* Draft 4 pthreads */
13939         status = pthread_create( &t, pthread_attr_default, task, NULL );
13940         if( status ) return errno;
13941
13942         /* give thread a chance to complete */
13943         /* it should remain joinable and hence detachable */
13944         sleep( 1 );
13945
13946         status = pthread_detach( &t );
13947         if( status ) return errno;
13948 #endif
13949
13950 #ifdef HAVE_LINUX_THREADS
13951         pthread_kill_other_threads_np();
13952 #endif
13953
13954         return 0;
13955
13956 }
13957
13958 EOF
13959 if { (eval echo configure:13960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13960 then
13961   ol_cv_pthread_lc_r=yes
13962 else
13963   echo "configure: failed program was:" >&5
13964   cat conftest.$ac_ext >&5
13965   rm -fr conftest*
13966   ol_cv_pthread_lc_r=no
13967 fi
13968 rm -fr conftest*
13969 fi
13970
13971
13972                 # restore the LIBS
13973                 LIBS="$ol_LIBS"
13974         
13975 fi
13976
13977 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
13978
13979         if test $ol_cv_pthread_lc_r = yes ; then
13980                 ol_link_pthreads="-lc_r"
13981                 ol_link_threads=posix
13982         fi
13983 fi
13984
13985
13986                 # Pthread try link: -threads (ol_cv_pthread_threads)
13987 if test "$ol_link_threads" = no ; then
13988         # try -threads
13989         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
13990 echo "configure:13991: checking for pthread link with -threads" >&5
13991 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
13992   echo $ac_n "(cached) $ac_c" 1>&6
13993 else
13994   
13995                 # save the flags
13996                 ol_LIBS="$LIBS"
13997                 LIBS="-threads $LIBS"
13998
13999                 if test "$cross_compiling" = yes; then
14000   cat > conftest.$ac_ext <<EOF
14001 #line 14002 "configure"
14002 #include "confdefs.h"
14003 /* pthread test headers */
14004 #include <pthread.h>
14005 #if HAVE_PTHREADS < 7
14006 #include <errno.h>
14007 #endif
14008 #ifndef NULL
14009 #define NULL (void*)0
14010 #endif
14011
14012 static void *task(p)
14013         void *p;
14014 {
14015         return (void *) (p == NULL);
14016 }
14017
14018 int main() {
14019
14020         /* pthread test function */
14021 #ifndef PTHREAD_CREATE_DETACHED
14022 #define PTHREAD_CREATE_DETACHED 1
14023 #endif
14024         pthread_t t;
14025         int status;
14026         int detach = PTHREAD_CREATE_DETACHED;
14027
14028 #if HAVE_PTHREADS > 4
14029         /* Final pthreads */
14030         pthread_attr_t attr;
14031
14032         status = pthread_attr_init(&attr);
14033         if( status ) return status;
14034
14035 #if HAVE_PTHREADS < 7
14036         status = pthread_attr_setdetachstate(&attr, &detach);
14037         if( status < 0 ) status = errno;
14038 #else
14039         status = pthread_attr_setdetachstate(&attr, detach);
14040 #endif
14041         if( status ) return status;
14042         status = pthread_create( &t, &attr, task, NULL );
14043 #if HAVE_PTHREADS < 7
14044         if( status < 0 ) status = errno;
14045 #endif
14046         if( status ) return status;
14047 #else
14048         /* Draft 4 pthreads */
14049         status = pthread_create( &t, pthread_attr_default, task, NULL );
14050         if( status ) return errno;
14051
14052         /* give thread a chance to complete */
14053         /* it should remain joinable and hence detachable */
14054         sleep( 1 );
14055
14056         status = pthread_detach( &t );
14057         if( status ) return errno;
14058 #endif
14059
14060 #ifdef HAVE_LINUX_THREADS
14061         pthread_kill_other_threads_np();
14062 #endif
14063
14064         return 0;
14065
14066 ; return 0; }
14067 EOF
14068 if { (eval echo configure:14069: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14069   rm -rf conftest*
14070   ol_cv_pthread_threads=yes
14071 else
14072   echo "configure: failed program was:" >&5
14073   cat conftest.$ac_ext >&5
14074   rm -rf conftest*
14075   ol_cv_pthread_threads=no
14076 fi
14077 rm -f conftest*
14078 else
14079   cat > conftest.$ac_ext <<EOF
14080 #line 14081 "configure"
14081 #include "confdefs.h"
14082 /* pthread test headers */
14083 #include <pthread.h>
14084 #if HAVE_PTHREADS < 7
14085 #include <errno.h>
14086 #endif
14087 #ifndef NULL
14088 #define NULL (void*)0
14089 #endif
14090
14091 static void *task(p)
14092         void *p;
14093 {
14094         return (void *) (p == NULL);
14095 }
14096
14097
14098 int main(argc, argv)
14099         int argc;
14100         char **argv;
14101 {
14102
14103         /* pthread test function */
14104 #ifndef PTHREAD_CREATE_DETACHED
14105 #define PTHREAD_CREATE_DETACHED 1
14106 #endif
14107         pthread_t t;
14108         int status;
14109         int detach = PTHREAD_CREATE_DETACHED;
14110
14111 #if HAVE_PTHREADS > 4
14112         /* Final pthreads */
14113         pthread_attr_t attr;
14114
14115         status = pthread_attr_init(&attr);
14116         if( status ) return status;
14117
14118 #if HAVE_PTHREADS < 7
14119         status = pthread_attr_setdetachstate(&attr, &detach);
14120         if( status < 0 ) status = errno;
14121 #else
14122         status = pthread_attr_setdetachstate(&attr, detach);
14123 #endif
14124         if( status ) return status;
14125         status = pthread_create( &t, &attr, task, NULL );
14126 #if HAVE_PTHREADS < 7
14127         if( status < 0 ) status = errno;
14128 #endif
14129         if( status ) return status;
14130 #else
14131         /* Draft 4 pthreads */
14132         status = pthread_create( &t, pthread_attr_default, task, NULL );
14133         if( status ) return errno;
14134
14135         /* give thread a chance to complete */
14136         /* it should remain joinable and hence detachable */
14137         sleep( 1 );
14138
14139         status = pthread_detach( &t );
14140         if( status ) return errno;
14141 #endif
14142
14143 #ifdef HAVE_LINUX_THREADS
14144         pthread_kill_other_threads_np();
14145 #endif
14146
14147         return 0;
14148
14149 }
14150
14151 EOF
14152 if { (eval echo configure:14153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14153 then
14154   ol_cv_pthread_threads=yes
14155 else
14156   echo "configure: failed program was:" >&5
14157   cat conftest.$ac_ext >&5
14158   rm -fr conftest*
14159   ol_cv_pthread_threads=no
14160 fi
14161 rm -fr conftest*
14162 fi
14163
14164
14165                 # restore the LIBS
14166                 LIBS="$ol_LIBS"
14167         
14168 fi
14169
14170 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14171
14172         if test $ol_cv_pthread_threads = yes ; then
14173                 ol_link_pthreads="-threads"
14174                 ol_link_threads=posix
14175         fi
14176 fi
14177
14178
14179                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14180 if test "$ol_link_threads" = no ; then
14181         # try -lpthreads -lmach -lexc -lc_r
14182         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14183 echo "configure:14184: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14184 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14185   echo $ac_n "(cached) $ac_c" 1>&6
14186 else
14187   
14188                 # save the flags
14189                 ol_LIBS="$LIBS"
14190                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14191
14192                 if test "$cross_compiling" = yes; then
14193   cat > conftest.$ac_ext <<EOF
14194 #line 14195 "configure"
14195 #include "confdefs.h"
14196 /* pthread test headers */
14197 #include <pthread.h>
14198 #if HAVE_PTHREADS < 7
14199 #include <errno.h>
14200 #endif
14201 #ifndef NULL
14202 #define NULL (void*)0
14203 #endif
14204
14205 static void *task(p)
14206         void *p;
14207 {
14208         return (void *) (p == NULL);
14209 }
14210
14211 int main() {
14212
14213         /* pthread test function */
14214 #ifndef PTHREAD_CREATE_DETACHED
14215 #define PTHREAD_CREATE_DETACHED 1
14216 #endif
14217         pthread_t t;
14218         int status;
14219         int detach = PTHREAD_CREATE_DETACHED;
14220
14221 #if HAVE_PTHREADS > 4
14222         /* Final pthreads */
14223         pthread_attr_t attr;
14224
14225         status = pthread_attr_init(&attr);
14226         if( status ) return status;
14227
14228 #if HAVE_PTHREADS < 7
14229         status = pthread_attr_setdetachstate(&attr, &detach);
14230         if( status < 0 ) status = errno;
14231 #else
14232         status = pthread_attr_setdetachstate(&attr, detach);
14233 #endif
14234         if( status ) return status;
14235         status = pthread_create( &t, &attr, task, NULL );
14236 #if HAVE_PTHREADS < 7
14237         if( status < 0 ) status = errno;
14238 #endif
14239         if( status ) return status;
14240 #else
14241         /* Draft 4 pthreads */
14242         status = pthread_create( &t, pthread_attr_default, task, NULL );
14243         if( status ) return errno;
14244
14245         /* give thread a chance to complete */
14246         /* it should remain joinable and hence detachable */
14247         sleep( 1 );
14248
14249         status = pthread_detach( &t );
14250         if( status ) return errno;
14251 #endif
14252
14253 #ifdef HAVE_LINUX_THREADS
14254         pthread_kill_other_threads_np();
14255 #endif
14256
14257         return 0;
14258
14259 ; return 0; }
14260 EOF
14261 if { (eval echo configure:14262: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14262   rm -rf conftest*
14263   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14264 else
14265   echo "configure: failed program was:" >&5
14266   cat conftest.$ac_ext >&5
14267   rm -rf conftest*
14268   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14269 fi
14270 rm -f conftest*
14271 else
14272   cat > conftest.$ac_ext <<EOF
14273 #line 14274 "configure"
14274 #include "confdefs.h"
14275 /* pthread test headers */
14276 #include <pthread.h>
14277 #if HAVE_PTHREADS < 7
14278 #include <errno.h>
14279 #endif
14280 #ifndef NULL
14281 #define NULL (void*)0
14282 #endif
14283
14284 static void *task(p)
14285         void *p;
14286 {
14287         return (void *) (p == NULL);
14288 }
14289
14290
14291 int main(argc, argv)
14292         int argc;
14293         char **argv;
14294 {
14295
14296         /* pthread test function */
14297 #ifndef PTHREAD_CREATE_DETACHED
14298 #define PTHREAD_CREATE_DETACHED 1
14299 #endif
14300         pthread_t t;
14301         int status;
14302         int detach = PTHREAD_CREATE_DETACHED;
14303
14304 #if HAVE_PTHREADS > 4
14305         /* Final pthreads */
14306         pthread_attr_t attr;
14307
14308         status = pthread_attr_init(&attr);
14309         if( status ) return status;
14310
14311 #if HAVE_PTHREADS < 7
14312         status = pthread_attr_setdetachstate(&attr, &detach);
14313         if( status < 0 ) status = errno;
14314 #else
14315         status = pthread_attr_setdetachstate(&attr, detach);
14316 #endif
14317         if( status ) return status;
14318         status = pthread_create( &t, &attr, task, NULL );
14319 #if HAVE_PTHREADS < 7
14320         if( status < 0 ) status = errno;
14321 #endif
14322         if( status ) return status;
14323 #else
14324         /* Draft 4 pthreads */
14325         status = pthread_create( &t, pthread_attr_default, task, NULL );
14326         if( status ) return errno;
14327
14328         /* give thread a chance to complete */
14329         /* it should remain joinable and hence detachable */
14330         sleep( 1 );
14331
14332         status = pthread_detach( &t );
14333         if( status ) return errno;
14334 #endif
14335
14336 #ifdef HAVE_LINUX_THREADS
14337         pthread_kill_other_threads_np();
14338 #endif
14339
14340         return 0;
14341
14342 }
14343
14344 EOF
14345 if { (eval echo configure:14346: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14346 then
14347   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14348 else
14349   echo "configure: failed program was:" >&5
14350   cat conftest.$ac_ext >&5
14351   rm -fr conftest*
14352   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14353 fi
14354 rm -fr conftest*
14355 fi
14356
14357
14358                 # restore the LIBS
14359                 LIBS="$ol_LIBS"
14360         
14361 fi
14362
14363 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14364
14365         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14366                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14367                 ol_link_threads=posix
14368         fi
14369 fi
14370
14371                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14372 if test "$ol_link_threads" = no ; then
14373         # try -lpthreads -lmach -lexc
14374         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14375 echo "configure:14376: checking for pthread link with -lpthreads -lmach -lexc" >&5
14376 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14377   echo $ac_n "(cached) $ac_c" 1>&6
14378 else
14379   
14380                 # save the flags
14381                 ol_LIBS="$LIBS"
14382                 LIBS="-lpthreads -lmach -lexc $LIBS"
14383
14384                 if test "$cross_compiling" = yes; then
14385   cat > conftest.$ac_ext <<EOF
14386 #line 14387 "configure"
14387 #include "confdefs.h"
14388 /* pthread test headers */
14389 #include <pthread.h>
14390 #if HAVE_PTHREADS < 7
14391 #include <errno.h>
14392 #endif
14393 #ifndef NULL
14394 #define NULL (void*)0
14395 #endif
14396
14397 static void *task(p)
14398         void *p;
14399 {
14400         return (void *) (p == NULL);
14401 }
14402
14403 int main() {
14404
14405         /* pthread test function */
14406 #ifndef PTHREAD_CREATE_DETACHED
14407 #define PTHREAD_CREATE_DETACHED 1
14408 #endif
14409         pthread_t t;
14410         int status;
14411         int detach = PTHREAD_CREATE_DETACHED;
14412
14413 #if HAVE_PTHREADS > 4
14414         /* Final pthreads */
14415         pthread_attr_t attr;
14416
14417         status = pthread_attr_init(&attr);
14418         if( status ) return status;
14419
14420 #if HAVE_PTHREADS < 7
14421         status = pthread_attr_setdetachstate(&attr, &detach);
14422         if( status < 0 ) status = errno;
14423 #else
14424         status = pthread_attr_setdetachstate(&attr, detach);
14425 #endif
14426         if( status ) return status;
14427         status = pthread_create( &t, &attr, task, NULL );
14428 #if HAVE_PTHREADS < 7
14429         if( status < 0 ) status = errno;
14430 #endif
14431         if( status ) return status;
14432 #else
14433         /* Draft 4 pthreads */
14434         status = pthread_create( &t, pthread_attr_default, task, NULL );
14435         if( status ) return errno;
14436
14437         /* give thread a chance to complete */
14438         /* it should remain joinable and hence detachable */
14439         sleep( 1 );
14440
14441         status = pthread_detach( &t );
14442         if( status ) return errno;
14443 #endif
14444
14445 #ifdef HAVE_LINUX_THREADS
14446         pthread_kill_other_threads_np();
14447 #endif
14448
14449         return 0;
14450
14451 ; return 0; }
14452 EOF
14453 if { (eval echo configure:14454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14454   rm -rf conftest*
14455   ol_cv_pthread_lpthreads_lmach_lexc=yes
14456 else
14457   echo "configure: failed program was:" >&5
14458   cat conftest.$ac_ext >&5
14459   rm -rf conftest*
14460   ol_cv_pthread_lpthreads_lmach_lexc=no
14461 fi
14462 rm -f conftest*
14463 else
14464   cat > conftest.$ac_ext <<EOF
14465 #line 14466 "configure"
14466 #include "confdefs.h"
14467 /* pthread test headers */
14468 #include <pthread.h>
14469 #if HAVE_PTHREADS < 7
14470 #include <errno.h>
14471 #endif
14472 #ifndef NULL
14473 #define NULL (void*)0
14474 #endif
14475
14476 static void *task(p)
14477         void *p;
14478 {
14479         return (void *) (p == NULL);
14480 }
14481
14482
14483 int main(argc, argv)
14484         int argc;
14485         char **argv;
14486 {
14487
14488         /* pthread test function */
14489 #ifndef PTHREAD_CREATE_DETACHED
14490 #define PTHREAD_CREATE_DETACHED 1
14491 #endif
14492         pthread_t t;
14493         int status;
14494         int detach = PTHREAD_CREATE_DETACHED;
14495
14496 #if HAVE_PTHREADS > 4
14497         /* Final pthreads */
14498         pthread_attr_t attr;
14499
14500         status = pthread_attr_init(&attr);
14501         if( status ) return status;
14502
14503 #if HAVE_PTHREADS < 7
14504         status = pthread_attr_setdetachstate(&attr, &detach);
14505         if( status < 0 ) status = errno;
14506 #else
14507         status = pthread_attr_setdetachstate(&attr, detach);
14508 #endif
14509         if( status ) return status;
14510         status = pthread_create( &t, &attr, task, NULL );
14511 #if HAVE_PTHREADS < 7
14512         if( status < 0 ) status = errno;
14513 #endif
14514         if( status ) return status;
14515 #else
14516         /* Draft 4 pthreads */
14517         status = pthread_create( &t, pthread_attr_default, task, NULL );
14518         if( status ) return errno;
14519
14520         /* give thread a chance to complete */
14521         /* it should remain joinable and hence detachable */
14522         sleep( 1 );
14523
14524         status = pthread_detach( &t );
14525         if( status ) return errno;
14526 #endif
14527
14528 #ifdef HAVE_LINUX_THREADS
14529         pthread_kill_other_threads_np();
14530 #endif
14531
14532         return 0;
14533
14534 }
14535
14536 EOF
14537 if { (eval echo configure:14538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14538 then
14539   ol_cv_pthread_lpthreads_lmach_lexc=yes
14540 else
14541   echo "configure: failed program was:" >&5
14542   cat conftest.$ac_ext >&5
14543   rm -fr conftest*
14544   ol_cv_pthread_lpthreads_lmach_lexc=no
14545 fi
14546 rm -fr conftest*
14547 fi
14548
14549
14550                 # restore the LIBS
14551                 LIBS="$ol_LIBS"
14552         
14553 fi
14554
14555 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14556
14557         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14558                 ol_link_pthreads="-lpthreads -lmach -lexc"
14559                 ol_link_threads=posix
14560         fi
14561 fi
14562
14563                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14564 if test "$ol_link_threads" = no ; then
14565         # try -lpthreads -lexc
14566         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14567 echo "configure:14568: checking for pthread link with -lpthreads -lexc" >&5
14568 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14569   echo $ac_n "(cached) $ac_c" 1>&6
14570 else
14571   
14572                 # save the flags
14573                 ol_LIBS="$LIBS"
14574                 LIBS="-lpthreads -lexc $LIBS"
14575
14576                 if test "$cross_compiling" = yes; then
14577   cat > conftest.$ac_ext <<EOF
14578 #line 14579 "configure"
14579 #include "confdefs.h"
14580 /* pthread test headers */
14581 #include <pthread.h>
14582 #if HAVE_PTHREADS < 7
14583 #include <errno.h>
14584 #endif
14585 #ifndef NULL
14586 #define NULL (void*)0
14587 #endif
14588
14589 static void *task(p)
14590         void *p;
14591 {
14592         return (void *) (p == NULL);
14593 }
14594
14595 int main() {
14596
14597         /* pthread test function */
14598 #ifndef PTHREAD_CREATE_DETACHED
14599 #define PTHREAD_CREATE_DETACHED 1
14600 #endif
14601         pthread_t t;
14602         int status;
14603         int detach = PTHREAD_CREATE_DETACHED;
14604
14605 #if HAVE_PTHREADS > 4
14606         /* Final pthreads */
14607         pthread_attr_t attr;
14608
14609         status = pthread_attr_init(&attr);
14610         if( status ) return status;
14611
14612 #if HAVE_PTHREADS < 7
14613         status = pthread_attr_setdetachstate(&attr, &detach);
14614         if( status < 0 ) status = errno;
14615 #else
14616         status = pthread_attr_setdetachstate(&attr, detach);
14617 #endif
14618         if( status ) return status;
14619         status = pthread_create( &t, &attr, task, NULL );
14620 #if HAVE_PTHREADS < 7
14621         if( status < 0 ) status = errno;
14622 #endif
14623         if( status ) return status;
14624 #else
14625         /* Draft 4 pthreads */
14626         status = pthread_create( &t, pthread_attr_default, task, NULL );
14627         if( status ) return errno;
14628
14629         /* give thread a chance to complete */
14630         /* it should remain joinable and hence detachable */
14631         sleep( 1 );
14632
14633         status = pthread_detach( &t );
14634         if( status ) return errno;
14635 #endif
14636
14637 #ifdef HAVE_LINUX_THREADS
14638         pthread_kill_other_threads_np();
14639 #endif
14640
14641         return 0;
14642
14643 ; return 0; }
14644 EOF
14645 if { (eval echo configure:14646: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14646   rm -rf conftest*
14647   ol_cv_pthread_lpthreads_lexc=yes
14648 else
14649   echo "configure: failed program was:" >&5
14650   cat conftest.$ac_ext >&5
14651   rm -rf conftest*
14652   ol_cv_pthread_lpthreads_lexc=no
14653 fi
14654 rm -f conftest*
14655 else
14656   cat > conftest.$ac_ext <<EOF
14657 #line 14658 "configure"
14658 #include "confdefs.h"
14659 /* pthread test headers */
14660 #include <pthread.h>
14661 #if HAVE_PTHREADS < 7
14662 #include <errno.h>
14663 #endif
14664 #ifndef NULL
14665 #define NULL (void*)0
14666 #endif
14667
14668 static void *task(p)
14669         void *p;
14670 {
14671         return (void *) (p == NULL);
14672 }
14673
14674
14675 int main(argc, argv)
14676         int argc;
14677         char **argv;
14678 {
14679
14680         /* pthread test function */
14681 #ifndef PTHREAD_CREATE_DETACHED
14682 #define PTHREAD_CREATE_DETACHED 1
14683 #endif
14684         pthread_t t;
14685         int status;
14686         int detach = PTHREAD_CREATE_DETACHED;
14687
14688 #if HAVE_PTHREADS > 4
14689         /* Final pthreads */
14690         pthread_attr_t attr;
14691
14692         status = pthread_attr_init(&attr);
14693         if( status ) return status;
14694
14695 #if HAVE_PTHREADS < 7
14696         status = pthread_attr_setdetachstate(&attr, &detach);
14697         if( status < 0 ) status = errno;
14698 #else
14699         status = pthread_attr_setdetachstate(&attr, detach);
14700 #endif
14701         if( status ) return status;
14702         status = pthread_create( &t, &attr, task, NULL );
14703 #if HAVE_PTHREADS < 7
14704         if( status < 0 ) status = errno;
14705 #endif
14706         if( status ) return status;
14707 #else
14708         /* Draft 4 pthreads */
14709         status = pthread_create( &t, pthread_attr_default, task, NULL );
14710         if( status ) return errno;
14711
14712         /* give thread a chance to complete */
14713         /* it should remain joinable and hence detachable */
14714         sleep( 1 );
14715
14716         status = pthread_detach( &t );
14717         if( status ) return errno;
14718 #endif
14719
14720 #ifdef HAVE_LINUX_THREADS
14721         pthread_kill_other_threads_np();
14722 #endif
14723
14724         return 0;
14725
14726 }
14727
14728 EOF
14729 if { (eval echo configure:14730: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14730 then
14731   ol_cv_pthread_lpthreads_lexc=yes
14732 else
14733   echo "configure: failed program was:" >&5
14734   cat conftest.$ac_ext >&5
14735   rm -fr conftest*
14736   ol_cv_pthread_lpthreads_lexc=no
14737 fi
14738 rm -fr conftest*
14739 fi
14740
14741
14742                 # restore the LIBS
14743                 LIBS="$ol_LIBS"
14744         
14745 fi
14746
14747 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14748
14749         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14750                 ol_link_pthreads="-lpthreads -lexc"
14751                 ol_link_threads=posix
14752         fi
14753 fi
14754
14755
14756                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14757 if test "$ol_link_threads" = no ; then
14758         # try -lpthreads
14759         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14760 echo "configure:14761: checking for pthread link with -lpthreads" >&5
14761 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14762   echo $ac_n "(cached) $ac_c" 1>&6
14763 else
14764   
14765                 # save the flags
14766                 ol_LIBS="$LIBS"
14767                 LIBS="-lpthreads $LIBS"
14768
14769                 if test "$cross_compiling" = yes; then
14770   cat > conftest.$ac_ext <<EOF
14771 #line 14772 "configure"
14772 #include "confdefs.h"
14773 /* pthread test headers */
14774 #include <pthread.h>
14775 #if HAVE_PTHREADS < 7
14776 #include <errno.h>
14777 #endif
14778 #ifndef NULL
14779 #define NULL (void*)0
14780 #endif
14781
14782 static void *task(p)
14783         void *p;
14784 {
14785         return (void *) (p == NULL);
14786 }
14787
14788 int main() {
14789
14790         /* pthread test function */
14791 #ifndef PTHREAD_CREATE_DETACHED
14792 #define PTHREAD_CREATE_DETACHED 1
14793 #endif
14794         pthread_t t;
14795         int status;
14796         int detach = PTHREAD_CREATE_DETACHED;
14797
14798 #if HAVE_PTHREADS > 4
14799         /* Final pthreads */
14800         pthread_attr_t attr;
14801
14802         status = pthread_attr_init(&attr);
14803         if( status ) return status;
14804
14805 #if HAVE_PTHREADS < 7
14806         status = pthread_attr_setdetachstate(&attr, &detach);
14807         if( status < 0 ) status = errno;
14808 #else
14809         status = pthread_attr_setdetachstate(&attr, detach);
14810 #endif
14811         if( status ) return status;
14812         status = pthread_create( &t, &attr, task, NULL );
14813 #if HAVE_PTHREADS < 7
14814         if( status < 0 ) status = errno;
14815 #endif
14816         if( status ) return status;
14817 #else
14818         /* Draft 4 pthreads */
14819         status = pthread_create( &t, pthread_attr_default, task, NULL );
14820         if( status ) return errno;
14821
14822         /* give thread a chance to complete */
14823         /* it should remain joinable and hence detachable */
14824         sleep( 1 );
14825
14826         status = pthread_detach( &t );
14827         if( status ) return errno;
14828 #endif
14829
14830 #ifdef HAVE_LINUX_THREADS
14831         pthread_kill_other_threads_np();
14832 #endif
14833
14834         return 0;
14835
14836 ; return 0; }
14837 EOF
14838 if { (eval echo configure:14839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14839   rm -rf conftest*
14840   ol_cv_pthread_lib_lpthreads=yes
14841 else
14842   echo "configure: failed program was:" >&5
14843   cat conftest.$ac_ext >&5
14844   rm -rf conftest*
14845   ol_cv_pthread_lib_lpthreads=no
14846 fi
14847 rm -f conftest*
14848 else
14849   cat > conftest.$ac_ext <<EOF
14850 #line 14851 "configure"
14851 #include "confdefs.h"
14852 /* pthread test headers */
14853 #include <pthread.h>
14854 #if HAVE_PTHREADS < 7
14855 #include <errno.h>
14856 #endif
14857 #ifndef NULL
14858 #define NULL (void*)0
14859 #endif
14860
14861 static void *task(p)
14862         void *p;
14863 {
14864         return (void *) (p == NULL);
14865 }
14866
14867
14868 int main(argc, argv)
14869         int argc;
14870         char **argv;
14871 {
14872
14873         /* pthread test function */
14874 #ifndef PTHREAD_CREATE_DETACHED
14875 #define PTHREAD_CREATE_DETACHED 1
14876 #endif
14877         pthread_t t;
14878         int status;
14879         int detach = PTHREAD_CREATE_DETACHED;
14880
14881 #if HAVE_PTHREADS > 4
14882         /* Final pthreads */
14883         pthread_attr_t attr;
14884
14885         status = pthread_attr_init(&attr);
14886         if( status ) return status;
14887
14888 #if HAVE_PTHREADS < 7
14889         status = pthread_attr_setdetachstate(&attr, &detach);
14890         if( status < 0 ) status = errno;
14891 #else
14892         status = pthread_attr_setdetachstate(&attr, detach);
14893 #endif
14894         if( status ) return status;
14895         status = pthread_create( &t, &attr, task, NULL );
14896 #if HAVE_PTHREADS < 7
14897         if( status < 0 ) status = errno;
14898 #endif
14899         if( status ) return status;
14900 #else
14901         /* Draft 4 pthreads */
14902         status = pthread_create( &t, pthread_attr_default, task, NULL );
14903         if( status ) return errno;
14904
14905         /* give thread a chance to complete */
14906         /* it should remain joinable and hence detachable */
14907         sleep( 1 );
14908
14909         status = pthread_detach( &t );
14910         if( status ) return errno;
14911 #endif
14912
14913 #ifdef HAVE_LINUX_THREADS
14914         pthread_kill_other_threads_np();
14915 #endif
14916
14917         return 0;
14918
14919 }
14920
14921 EOF
14922 if { (eval echo configure:14923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14923 then
14924   ol_cv_pthread_lib_lpthreads=yes
14925 else
14926   echo "configure: failed program was:" >&5
14927   cat conftest.$ac_ext >&5
14928   rm -fr conftest*
14929   ol_cv_pthread_lib_lpthreads=no
14930 fi
14931 rm -fr conftest*
14932 fi
14933
14934
14935                 # restore the LIBS
14936                 LIBS="$ol_LIBS"
14937         
14938 fi
14939
14940 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
14941
14942         if test $ol_cv_pthread_lib_lpthreads = yes ; then
14943                 ol_link_pthreads="-lpthreads"
14944                 ol_link_threads=posix
14945         fi
14946 fi
14947
14948
14949                 if test $ol_link_threads != no ; then
14950                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
14951
14952                                                 save_CPPFLAGS="$CPPFLAGS"
14953                         save_LIBS="$LIBS"
14954                         LIBS="$LTHREAD_LIBS $LIBS"
14955
14956                                                                                                 for ac_func in sched_yield pthread_yield
14957 do
14958 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
14959 echo "configure:14960: checking for $ac_func" >&5
14960 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
14961   echo $ac_n "(cached) $ac_c" 1>&6
14962 else
14963   cat > conftest.$ac_ext <<EOF
14964 #line 14965 "configure"
14965 #include "confdefs.h"
14966 /* System header to define __stub macros and hopefully few prototypes,
14967     which can conflict with char $ac_func(); below.  */
14968 #include <assert.h>
14969 /* Override any gcc2 internal prototype to avoid an error.  */
14970 /* We use char because int might match the return type of a gcc2
14971     builtin and then its argument prototype would still apply.  */
14972 char $ac_func();
14973 char (*f)();
14974
14975 int main() {
14976
14977 /* The GNU C library defines this for functions which it implements
14978     to always fail with ENOSYS.  Some functions are actually named
14979     something starting with __ and the normal name is an alias.  */
14980 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14981 choke me
14982 #else
14983 f = $ac_func;
14984 #endif
14985
14986 ; return 0; }
14987 EOF
14988 if { (eval echo configure:14989: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14989   rm -rf conftest*
14990   eval "ac_cv_func_$ac_func=yes"
14991 else
14992   echo "configure: failed program was:" >&5
14993   cat conftest.$ac_ext >&5
14994   rm -rf conftest*
14995   eval "ac_cv_func_$ac_func=no"
14996 fi
14997 rm -f conftest*
14998 fi
14999
15000 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15001   echo "$ac_t""yes" 1>&6
15002     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15003   cat >> confdefs.h <<EOF
15004 #define $ac_tr_func 1
15005 EOF
15006  
15007 else
15008   echo "$ac_t""no" 1>&6
15009 fi
15010 done
15011
15012
15013                         if test $ac_cv_func_sched_yield = no -a \
15014                                 $ac_cv_func_pthread_yield = no ; then
15015                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15016 echo "configure:15017: checking for sched_yield in -lrt" >&5
15017 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15018 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15019   echo $ac_n "(cached) $ac_c" 1>&6
15020 else
15021   ac_save_LIBS="$LIBS"
15022 LIBS="-lrt  $LIBS"
15023 cat > conftest.$ac_ext <<EOF
15024 #line 15025 "configure"
15025 #include "confdefs.h"
15026 /* Override any gcc2 internal prototype to avoid an error.  */
15027 /* We use char because int might match the return type of a gcc2
15028     builtin and then its argument prototype would still apply.  */
15029 char sched_yield();
15030
15031 int main() {
15032 sched_yield()
15033 ; return 0; }
15034 EOF
15035 if { (eval echo configure:15036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15036   rm -rf conftest*
15037   eval "ac_cv_lib_$ac_lib_var=yes"
15038 else
15039   echo "configure: failed program was:" >&5
15040   cat conftest.$ac_ext >&5
15041   rm -rf conftest*
15042   eval "ac_cv_lib_$ac_lib_var=no"
15043 fi
15044 rm -f conftest*
15045 LIBS="$ac_save_LIBS"
15046
15047 fi
15048 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15049   echo "$ac_t""yes" 1>&6
15050   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15051                                         cat >> confdefs.h <<\EOF
15052 #define HAVE_SCHED_YIELD 1
15053 EOF
15054
15055                                         ac_cv_func_sched_yield=yes
15056 else
15057   echo "$ac_t""no" 1>&6
15058 ac_cv_func_sched_yield=no
15059 fi
15060
15061                         fi
15062                         if test $ac_cv_func_sched_yield = no -a \
15063                                 $ac_cv_func_pthread_yield = no ; then
15064                                                                                                 for ac_func in thr_yield
15065 do
15066 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15067 echo "configure:15068: checking for $ac_func" >&5
15068 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15069   echo $ac_n "(cached) $ac_c" 1>&6
15070 else
15071   cat > conftest.$ac_ext <<EOF
15072 #line 15073 "configure"
15073 #include "confdefs.h"
15074 /* System header to define __stub macros and hopefully few prototypes,
15075     which can conflict with char $ac_func(); below.  */
15076 #include <assert.h>
15077 /* Override any gcc2 internal prototype to avoid an error.  */
15078 /* We use char because int might match the return type of a gcc2
15079     builtin and then its argument prototype would still apply.  */
15080 char $ac_func();
15081 char (*f)();
15082
15083 int main() {
15084
15085 /* The GNU C library defines this for functions which it implements
15086     to always fail with ENOSYS.  Some functions are actually named
15087     something starting with __ and the normal name is an alias.  */
15088 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15089 choke me
15090 #else
15091 f = $ac_func;
15092 #endif
15093
15094 ; return 0; }
15095 EOF
15096 if { (eval echo configure:15097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15097   rm -rf conftest*
15098   eval "ac_cv_func_$ac_func=yes"
15099 else
15100   echo "configure: failed program was:" >&5
15101   cat conftest.$ac_ext >&5
15102   rm -rf conftest*
15103   eval "ac_cv_func_$ac_func=no"
15104 fi
15105 rm -f conftest*
15106 fi
15107
15108 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15109   echo "$ac_t""yes" 1>&6
15110     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15111   cat >> confdefs.h <<EOF
15112 #define $ac_tr_func 1
15113 EOF
15114  
15115 else
15116   echo "$ac_t""no" 1>&6
15117 fi
15118 done
15119
15120                         fi
15121                         if test $ac_cv_func_sched_yield = no -a \
15122                                 $ac_cv_func_pthread_yield = no -a \
15123                                 "$ac_cv_func_thr_yield" = no ; then
15124                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15125                         fi
15126
15127                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15128 do
15129 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15130 echo "configure:15131: checking for $ac_func" >&5
15131 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15132   echo $ac_n "(cached) $ac_c" 1>&6
15133 else
15134   cat > conftest.$ac_ext <<EOF
15135 #line 15136 "configure"
15136 #include "confdefs.h"
15137 /* System header to define __stub macros and hopefully few prototypes,
15138     which can conflict with char $ac_func(); below.  */
15139 #include <assert.h>
15140 /* Override any gcc2 internal prototype to avoid an error.  */
15141 /* We use char because int might match the return type of a gcc2
15142     builtin and then its argument prototype would still apply.  */
15143 char $ac_func();
15144 char (*f)();
15145
15146 int main() {
15147
15148 /* The GNU C library defines this for functions which it implements
15149     to always fail with ENOSYS.  Some functions are actually named
15150     something starting with __ and the normal name is an alias.  */
15151 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15152 choke me
15153 #else
15154 f = $ac_func;
15155 #endif
15156
15157 ; return 0; }
15158 EOF
15159 if { (eval echo configure:15160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15160   rm -rf conftest*
15161   eval "ac_cv_func_$ac_func=yes"
15162 else
15163   echo "configure: failed program was:" >&5
15164   cat conftest.$ac_ext >&5
15165   rm -rf conftest*
15166   eval "ac_cv_func_$ac_func=no"
15167 fi
15168 rm -f conftest*
15169 fi
15170
15171 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15172   echo "$ac_t""yes" 1>&6
15173     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15174   cat >> confdefs.h <<EOF
15175 #define $ac_tr_func 1
15176 EOF
15177  
15178 else
15179   echo "$ac_t""no" 1>&6
15180 fi
15181 done
15182
15183
15184                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15185 echo "configure:15186: checking for pthread_detach with <pthread.h>" >&5
15186 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15187   echo $ac_n "(cached) $ac_c" 1>&6
15188 else
15189   
15190                                                                 cat > conftest.$ac_ext <<EOF
15191 #line 15192 "configure"
15192 #include "confdefs.h"
15193
15194 #include <pthread.h>
15195 #ifndef NULL
15196 #define NULL (void*)0
15197 #endif
15198
15199 int main() {
15200 pthread_detach(NULL);
15201 ; return 0; }
15202 EOF
15203 if { (eval echo configure:15204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15204   rm -rf conftest*
15205   ol_cv_func_pthread_detach=yes
15206 else
15207   echo "configure: failed program was:" >&5
15208   cat conftest.$ac_ext >&5
15209   rm -rf conftest*
15210   ol_cv_func_pthread_detach=no
15211 fi
15212 rm -f conftest*
15213                         
15214 fi
15215
15216 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15217
15218                         if test $ol_cv_func_pthread_detach = no ; then
15219                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15220                         fi
15221
15222                         cat >> confdefs.h <<\EOF
15223 #define HAVE_PTHREAD_DETACH 1
15224 EOF
15225
15226
15227                                                 for ac_func in \
15228                                 pthread_setconcurrency \
15229                                 pthread_getconcurrency \
15230                                 thr_setconcurrency \
15231                                 thr_getconcurrency \
15232                         
15233 do
15234 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15235 echo "configure:15236: checking for $ac_func" >&5
15236 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15237   echo $ac_n "(cached) $ac_c" 1>&6
15238 else
15239   cat > conftest.$ac_ext <<EOF
15240 #line 15241 "configure"
15241 #include "confdefs.h"
15242 /* System header to define __stub macros and hopefully few prototypes,
15243     which can conflict with char $ac_func(); below.  */
15244 #include <assert.h>
15245 /* Override any gcc2 internal prototype to avoid an error.  */
15246 /* We use char because int might match the return type of a gcc2
15247     builtin and then its argument prototype would still apply.  */
15248 char $ac_func();
15249 char (*f)();
15250
15251 int main() {
15252
15253 /* The GNU C library defines this for functions which it implements
15254     to always fail with ENOSYS.  Some functions are actually named
15255     something starting with __ and the normal name is an alias.  */
15256 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15257 choke me
15258 #else
15259 f = $ac_func;
15260 #endif
15261
15262 ; return 0; }
15263 EOF
15264 if { (eval echo configure:15265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15265   rm -rf conftest*
15266   eval "ac_cv_func_$ac_func=yes"
15267 else
15268   echo "configure: failed program was:" >&5
15269   cat conftest.$ac_ext >&5
15270   rm -rf conftest*
15271   eval "ac_cv_func_$ac_func=no"
15272 fi
15273 rm -f conftest*
15274 fi
15275
15276 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15277   echo "$ac_t""yes" 1>&6
15278     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15279   cat >> confdefs.h <<EOF
15280 #define $ac_tr_func 1
15281 EOF
15282  
15283 else
15284   echo "$ac_t""no" 1>&6
15285 fi
15286 done
15287
15288
15289                         
15290         for ac_func in pthread_kill_other_threads_np
15291 do
15292 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15293 echo "configure:15294: checking for $ac_func" >&5
15294 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15295   echo $ac_n "(cached) $ac_c" 1>&6
15296 else
15297   cat > conftest.$ac_ext <<EOF
15298 #line 15299 "configure"
15299 #include "confdefs.h"
15300 /* System header to define __stub macros and hopefully few prototypes,
15301     which can conflict with char $ac_func(); below.  */
15302 #include <assert.h>
15303 /* Override any gcc2 internal prototype to avoid an error.  */
15304 /* We use char because int might match the return type of a gcc2
15305     builtin and then its argument prototype would still apply.  */
15306 char $ac_func();
15307 char (*f)();
15308
15309 int main() {
15310
15311 /* The GNU C library defines this for functions which it implements
15312     to always fail with ENOSYS.  Some functions are actually named
15313     something starting with __ and the normal name is an alias.  */
15314 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15315 choke me
15316 #else
15317 f = $ac_func;
15318 #endif
15319
15320 ; return 0; }
15321 EOF
15322 if { (eval echo configure:15323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15323   rm -rf conftest*
15324   eval "ac_cv_func_$ac_func=yes"
15325 else
15326   echo "configure: failed program was:" >&5
15327   cat conftest.$ac_ext >&5
15328   rm -rf conftest*
15329   eval "ac_cv_func_$ac_func=no"
15330 fi
15331 rm -f conftest*
15332 fi
15333
15334 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15335   echo "$ac_t""yes" 1>&6
15336     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15337   cat >> confdefs.h <<EOF
15338 #define $ac_tr_func 1
15339 EOF
15340  
15341 else
15342   echo "$ac_t""no" 1>&6
15343 fi
15344 done
15345
15346         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15347 echo "configure:15348: checking for LinuxThreads implementation" >&5
15348 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15349   echo $ac_n "(cached) $ac_c" 1>&6
15350 else
15351   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15352 fi
15353
15354 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15355
15356                         
15357         
15358         
15359         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15360 echo "configure:15361: checking for LinuxThreads consistency" >&5
15361 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15362   echo $ac_n "(cached) $ac_c" 1>&6
15363 else
15364   
15365                 if test $ol_cv_header_linux_threads = yes -a \
15366                         $ol_cv_sys_linux_threads = yes; then
15367                         ol_cv_linux_threads=yes
15368                 elif test $ol_cv_header_linux_threads = no -a \
15369                         $ol_cv_sys_linux_threads = no; then
15370                         ol_cv_linux_threads=no
15371                 else
15372                         ol_cv_linux_threads=error
15373                 fi
15374         
15375 fi
15376
15377 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15378
15379
15380                         if test $ol_cv_linux_threads = error; then
15381                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15382                         fi
15383
15384                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15385 echo "configure:15386: checking if pthread_create() works" >&5
15386 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15387   echo $ac_n "(cached) $ac_c" 1>&6
15388 else
15389   
15390                         if test "$cross_compiling" = yes; then
15391                                 ol_cv_pthread_create_works=yes
15392 else
15393   cat > conftest.$ac_ext <<EOF
15394 #line 15395 "configure"
15395 #include "confdefs.h"
15396 /* pthread test headers */
15397 #include <pthread.h>
15398 #if HAVE_PTHREADS < 7
15399 #include <errno.h>
15400 #endif
15401 #ifndef NULL
15402 #define NULL (void*)0
15403 #endif
15404
15405 static void *task(p)
15406         void *p;
15407 {
15408         return (void *) (p == NULL);
15409 }
15410
15411
15412 int main(argc, argv)
15413         int argc;
15414         char **argv;
15415 {
15416
15417         /* pthread test function */
15418 #ifndef PTHREAD_CREATE_DETACHED
15419 #define PTHREAD_CREATE_DETACHED 1
15420 #endif
15421         pthread_t t;
15422         int status;
15423         int detach = PTHREAD_CREATE_DETACHED;
15424
15425 #if HAVE_PTHREADS > 4
15426         /* Final pthreads */
15427         pthread_attr_t attr;
15428
15429         status = pthread_attr_init(&attr);
15430         if( status ) return status;
15431
15432 #if HAVE_PTHREADS < 7
15433         status = pthread_attr_setdetachstate(&attr, &detach);
15434         if( status < 0 ) status = errno;
15435 #else
15436         status = pthread_attr_setdetachstate(&attr, detach);
15437 #endif
15438         if( status ) return status;
15439         status = pthread_create( &t, &attr, task, NULL );
15440 #if HAVE_PTHREADS < 7
15441         if( status < 0 ) status = errno;
15442 #endif
15443         if( status ) return status;
15444 #else
15445         /* Draft 4 pthreads */
15446         status = pthread_create( &t, pthread_attr_default, task, NULL );
15447         if( status ) return errno;
15448
15449         /* give thread a chance to complete */
15450         /* it should remain joinable and hence detachable */
15451         sleep( 1 );
15452
15453         status = pthread_detach( &t );
15454         if( status ) return errno;
15455 #endif
15456
15457 #ifdef HAVE_LINUX_THREADS
15458         pthread_kill_other_threads_np();
15459 #endif
15460
15461         return 0;
15462
15463 }
15464
15465 EOF
15466 if { (eval echo configure:15467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15467 then
15468   ol_cv_pthread_create_works=yes
15469 else
15470   echo "configure: failed program was:" >&5
15471   cat conftest.$ac_ext >&5
15472   rm -fr conftest*
15473   ol_cv_pthread_create_works=no
15474 fi
15475 rm -fr conftest*
15476 fi
15477
15478 fi
15479
15480 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15481
15482                         if test $ol_cv_pthread_create_works = no ; then
15483                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15484                         fi
15485
15486                                                 if test $ol_with_yielding_select = auto ; then
15487                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15488 echo "configure:15489: checking if select yields when using pthreads" >&5
15489 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15490   echo $ac_n "(cached) $ac_c" 1>&6
15491 else
15492   
15493                                 if test "$cross_compiling" = yes; then
15494   ol_cv_pthread_select_yields=cross
15495 else
15496   cat > conftest.$ac_ext <<EOF
15497 #line 15498 "configure"
15498 #include "confdefs.h"
15499
15500 #include <sys/types.h>
15501 #include <sys/time.h>
15502 #include <unistd.h>
15503 #include <pthread.h>
15504 #ifndef NULL
15505 #define NULL (void*) 0
15506 #endif
15507
15508 static int fildes[2];
15509
15510 static void *task(p)
15511         void *p;
15512 {
15513         int i;
15514         struct timeval tv;
15515
15516         fd_set rfds;
15517
15518         tv.tv_sec=10;
15519         tv.tv_usec=0;
15520
15521         FD_ZERO(&rfds);
15522         FD_SET(fildes[0], &rfds);
15523
15524         /* we're not interested in any fds */
15525         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15526
15527         if(i < 0) {
15528                 perror("select");
15529                 exit(10);
15530         }
15531
15532         exit(0); /* if we exit here, the select blocked the whole process */
15533 }
15534
15535 int main(argc, argv)
15536         int argc;
15537         char **argv;
15538 {
15539         pthread_t t;
15540
15541         /* create a pipe to select */
15542         if(pipe(&fildes[0])) {
15543                 perror("select");
15544                 exit(1);
15545         }
15546
15547 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15548         (void) pthread_setconcurrency(2);
15549 #else
15550 #ifdef HAVE_THR_SETCONCURRENCY
15551         /* Set Solaris LWP concurrency to 2 */
15552         thr_setconcurrency(2);
15553 #endif
15554 #endif
15555
15556 #if HAVE_PTHREADS < 6
15557         pthread_create(&t, pthread_attr_default, task, NULL);
15558 #else
15559         pthread_create(&t, NULL, task, NULL);
15560 #endif
15561
15562 #if HAVE_SCHED_YIELD
15563         sched_yield();  /* make sure task runs first */
15564 #else
15565 #ifdef HAVE_PTHREAD_YIELD
15566         pthread_yield();        /* make sure task runs first */
15567 #endif
15568 #endif
15569
15570         exit(2);
15571 }
15572 EOF
15573 if { (eval echo configure:15574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15574 then
15575   ol_cv_pthread_select_yields=no
15576 else
15577   echo "configure: failed program was:" >&5
15578   cat conftest.$ac_ext >&5
15579   rm -fr conftest*
15580   ol_cv_pthread_select_yields=yes
15581 fi
15582 rm -fr conftest*
15583 fi
15584
15585 fi
15586
15587 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15588
15589                                 if test $ol_cv_pthread_select_yields = cross ; then
15590                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15591                                 fi
15592
15593                                 if test $ol_cv_pthread_select_yields = yes ; then
15594                                         ol_with_yielding_select=yes
15595                                 fi
15596                         fi
15597
15598                                                 CPPFLAGS="$save_CPPFLAGS"
15599                         LIBS="$save_LIBS"
15600                 else
15601                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15602                 fi
15603         fi
15604
15605         if test $ol_with_threads = posix ; then
15606                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15607         fi
15608 fi
15609
15610 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15611         -o $ol_with_threads = mach ; then
15612
15613                 for ac_hdr in mach/cthreads.h cthreads.h
15614 do
15615 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15616 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15617 echo "configure:15618: checking for $ac_hdr" >&5
15618 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15619   echo $ac_n "(cached) $ac_c" 1>&6
15620 else
15621   cat > conftest.$ac_ext <<EOF
15622 #line 15623 "configure"
15623 #include "confdefs.h"
15624 #include <$ac_hdr>
15625 EOF
15626 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15627 { (eval echo configure:15628: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15628 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15629 if test -z "$ac_err"; then
15630   rm -rf conftest*
15631   eval "ac_cv_header_$ac_safe=yes"
15632 else
15633   echo "$ac_err" >&5
15634   echo "configure: failed program was:" >&5
15635   cat conftest.$ac_ext >&5
15636   rm -rf conftest*
15637   eval "ac_cv_header_$ac_safe=no"
15638 fi
15639 rm -f conftest*
15640 fi
15641 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15642   echo "$ac_t""yes" 1>&6
15643     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15644   cat >> confdefs.h <<EOF
15645 #define $ac_tr_hdr 1
15646 EOF
15647  
15648 else
15649   echo "$ac_t""no" 1>&6
15650 fi
15651 done
15652
15653         if test $ac_cv_header_mach_cthreads_h = yes ; then
15654                 ol_with_threads=found
15655
15656                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15657 echo "configure:15658: checking for cthread_fork" >&5
15658 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15659   echo $ac_n "(cached) $ac_c" 1>&6
15660 else
15661   cat > conftest.$ac_ext <<EOF
15662 #line 15663 "configure"
15663 #include "confdefs.h"
15664 /* System header to define __stub macros and hopefully few prototypes,
15665     which can conflict with char cthread_fork(); below.  */
15666 #include <assert.h>
15667 /* Override any gcc2 internal prototype to avoid an error.  */
15668 /* We use char because int might match the return type of a gcc2
15669     builtin and then its argument prototype would still apply.  */
15670 char cthread_fork();
15671 char (*f)();
15672
15673 int main() {
15674
15675 /* The GNU C library defines this for functions which it implements
15676     to always fail with ENOSYS.  Some functions are actually named
15677     something starting with __ and the normal name is an alias.  */
15678 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15679 choke me
15680 #else
15681 f = cthread_fork;
15682 #endif
15683
15684 ; return 0; }
15685 EOF
15686 if { (eval echo configure:15687: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15687   rm -rf conftest*
15688   eval "ac_cv_func_cthread_fork=yes"
15689 else
15690   echo "configure: failed program was:" >&5
15691   cat conftest.$ac_ext >&5
15692   rm -rf conftest*
15693   eval "ac_cv_func_cthread_fork=no"
15694 fi
15695 rm -f conftest*
15696 fi
15697
15698 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15699   echo "$ac_t""yes" 1>&6
15700   ol_link_threads=yes
15701 else
15702   echo "$ac_t""no" 1>&6
15703 fi
15704
15705
15706                 if test $ol_link_threads = no ; then
15707                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15708 echo "configure:15709: checking for cthread_fork with -all_load" >&5
15709 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15710   echo $ac_n "(cached) $ac_c" 1>&6
15711 else
15712   
15713                                                                 save_LIBS="$LIBS"
15714                                 LIBS="-all_load $LIBS"
15715                                 cat > conftest.$ac_ext <<EOF
15716 #line 15717 "configure"
15717 #include "confdefs.h"
15718 #include <mach/cthreads.h>
15719 int main() {
15720
15721                                         cthread_fork((void *)0, (void *)0);
15722                                         
15723 ; return 0; }
15724 EOF
15725 if { (eval echo configure:15726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15726   rm -rf conftest*
15727   ol_cv_cthread_all_load=yes
15728 else
15729   echo "configure: failed program was:" >&5
15730   cat conftest.$ac_ext >&5
15731   rm -rf conftest*
15732   ol_cv_cthread_all_load=no
15733 fi
15734 rm -f conftest*
15735                                                                 LIBS="$save_LIBS"
15736                         
15737 fi
15738
15739 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15740
15741                         if test $ol_cv_cthread_all_load = yes ; then
15742                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15743                                 ol_link_threads=mach
15744                                 ol_with_threads=found
15745                         fi
15746                 fi
15747
15748         elif test $ac_cv_header_cthreads_h = yes ; then
15749                                 
15750                 ol_with_threads=found
15751  
15752                                 save_LIBS="$LIBS"
15753                 LIBS="$LIBS -lthreads"
15754                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15755 echo "configure:15756: checking for cthread_fork" >&5
15756 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15757   echo $ac_n "(cached) $ac_c" 1>&6
15758 else
15759   cat > conftest.$ac_ext <<EOF
15760 #line 15761 "configure"
15761 #include "confdefs.h"
15762 /* System header to define __stub macros and hopefully few prototypes,
15763     which can conflict with char cthread_fork(); below.  */
15764 #include <assert.h>
15765 /* Override any gcc2 internal prototype to avoid an error.  */
15766 /* We use char because int might match the return type of a gcc2
15767     builtin and then its argument prototype would still apply.  */
15768 char cthread_fork();
15769 char (*f)();
15770
15771 int main() {
15772
15773 /* The GNU C library defines this for functions which it implements
15774     to always fail with ENOSYS.  Some functions are actually named
15775     something starting with __ and the normal name is an alias.  */
15776 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15777 choke me
15778 #else
15779 f = cthread_fork;
15780 #endif
15781
15782 ; return 0; }
15783 EOF
15784 if { (eval echo configure:15785: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15785   rm -rf conftest*
15786   eval "ac_cv_func_cthread_fork=yes"
15787 else
15788   echo "configure: failed program was:" >&5
15789   cat conftest.$ac_ext >&5
15790   rm -rf conftest*
15791   eval "ac_cv_func_cthread_fork=no"
15792 fi
15793 rm -f conftest*
15794 fi
15795
15796 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15797   echo "$ac_t""yes" 1>&6
15798   ol_link_threads=yes
15799 else
15800   echo "$ac_t""no" 1>&6
15801 fi
15802
15803                 LIBS="$save_LIBS"
15804
15805                 if test $ol_link_threads = yes ; then
15806                         LTHREAD_LIBS="-lthreads"
15807                         ol_link_threads=mach
15808                         ol_with_threads=found
15809                 else
15810                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15811                 fi
15812
15813         elif test $ol_with_threads = mach ; then
15814                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
15815         fi
15816
15817         if test $ol_link_threads = mach ; then
15818                 cat >> confdefs.h <<\EOF
15819 #define HAVE_MACH_CTHREADS 1
15820 EOF
15821
15822         elif test $ol_with_threads = found ; then
15823                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
15824         fi
15825 fi
15826
15827 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15828         -o $ol_with_threads = pth ; then
15829
15830         for ac_hdr in pth.h
15831 do
15832 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15833 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15834 echo "configure:15835: checking for $ac_hdr" >&5
15835 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15836   echo $ac_n "(cached) $ac_c" 1>&6
15837 else
15838   cat > conftest.$ac_ext <<EOF
15839 #line 15840 "configure"
15840 #include "confdefs.h"
15841 #include <$ac_hdr>
15842 EOF
15843 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15844 { (eval echo configure:15845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15845 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15846 if test -z "$ac_err"; then
15847   rm -rf conftest*
15848   eval "ac_cv_header_$ac_safe=yes"
15849 else
15850   echo "$ac_err" >&5
15851   echo "configure: failed program was:" >&5
15852   cat conftest.$ac_ext >&5
15853   rm -rf conftest*
15854   eval "ac_cv_header_$ac_safe=no"
15855 fi
15856 rm -f conftest*
15857 fi
15858 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15859   echo "$ac_t""yes" 1>&6
15860     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15861   cat >> confdefs.h <<EOF
15862 #define $ac_tr_hdr 1
15863 EOF
15864  
15865 else
15866   echo "$ac_t""no" 1>&6
15867 fi
15868 done
15869
15870
15871         if test $ac_cv_header_pth_h = yes ; then
15872                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
15873 echo "configure:15874: checking for pth_version in -lpth" >&5
15874 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
15875 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15876   echo $ac_n "(cached) $ac_c" 1>&6
15877 else
15878   ac_save_LIBS="$LIBS"
15879 LIBS="-lpth  $LIBS"
15880 cat > conftest.$ac_ext <<EOF
15881 #line 15882 "configure"
15882 #include "confdefs.h"
15883 /* Override any gcc2 internal prototype to avoid an error.  */
15884 /* We use char because int might match the return type of a gcc2
15885     builtin and then its argument prototype would still apply.  */
15886 char pth_version();
15887
15888 int main() {
15889 pth_version()
15890 ; return 0; }
15891 EOF
15892 if { (eval echo configure:15893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15893   rm -rf conftest*
15894   eval "ac_cv_lib_$ac_lib_var=yes"
15895 else
15896   echo "configure: failed program was:" >&5
15897   cat conftest.$ac_ext >&5
15898   rm -rf conftest*
15899   eval "ac_cv_lib_$ac_lib_var=no"
15900 fi
15901 rm -f conftest*
15902 LIBS="$ac_save_LIBS"
15903
15904 fi
15905 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15906   echo "$ac_t""yes" 1>&6
15907   have_pth=yes
15908 else
15909   echo "$ac_t""no" 1>&6
15910 have_pth=no
15911 fi
15912
15913
15914                 if test $have_pth = yes ; then
15915                         cat >> confdefs.h <<\EOF
15916 #define HAVE_GNU_PTH 1
15917 EOF
15918
15919                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
15920                         ol_link_threads=pth
15921                         ol_with_threads=found
15922
15923                         if test $ol_with_yielding_select = auto ; then
15924                                 ol_with_yielding_select=yes
15925                         fi
15926                 fi
15927         fi
15928 fi
15929
15930 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15931         -o $ol_with_threads = lwp ; then
15932
15933                 for ac_hdr in thread.h synch.h
15934 do
15935 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15936 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15937 echo "configure:15938: checking for $ac_hdr" >&5
15938 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15939   echo $ac_n "(cached) $ac_c" 1>&6
15940 else
15941   cat > conftest.$ac_ext <<EOF
15942 #line 15943 "configure"
15943 #include "confdefs.h"
15944 #include <$ac_hdr>
15945 EOF
15946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15947 { (eval echo configure:15948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15948 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15949 if test -z "$ac_err"; then
15950   rm -rf conftest*
15951   eval "ac_cv_header_$ac_safe=yes"
15952 else
15953   echo "$ac_err" >&5
15954   echo "configure: failed program was:" >&5
15955   cat conftest.$ac_ext >&5
15956   rm -rf conftest*
15957   eval "ac_cv_header_$ac_safe=no"
15958 fi
15959 rm -f conftest*
15960 fi
15961 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15962   echo "$ac_t""yes" 1>&6
15963     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15964   cat >> confdefs.h <<EOF
15965 #define $ac_tr_hdr 1
15966 EOF
15967  
15968 else
15969   echo "$ac_t""no" 1>&6
15970 fi
15971 done
15972
15973         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
15974                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
15975 echo "configure:15976: checking for thr_create in -lthread" >&5
15976 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
15977 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15978   echo $ac_n "(cached) $ac_c" 1>&6
15979 else
15980   ac_save_LIBS="$LIBS"
15981 LIBS="-lthread  $LIBS"
15982 cat > conftest.$ac_ext <<EOF
15983 #line 15984 "configure"
15984 #include "confdefs.h"
15985 /* Override any gcc2 internal prototype to avoid an error.  */
15986 /* We use char because int might match the return type of a gcc2
15987     builtin and then its argument prototype would still apply.  */
15988 char thr_create();
15989
15990 int main() {
15991 thr_create()
15992 ; return 0; }
15993 EOF
15994 if { (eval echo configure:15995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15995   rm -rf conftest*
15996   eval "ac_cv_lib_$ac_lib_var=yes"
15997 else
15998   echo "configure: failed program was:" >&5
15999   cat conftest.$ac_ext >&5
16000   rm -rf conftest*
16001   eval "ac_cv_lib_$ac_lib_var=no"
16002 fi
16003 rm -f conftest*
16004 LIBS="$ac_save_LIBS"
16005
16006 fi
16007 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16008   echo "$ac_t""yes" 1>&6
16009   have_thr=yes
16010 else
16011   echo "$ac_t""no" 1>&6
16012 have_thr=no
16013 fi
16014
16015
16016                 if test $have_thr = yes ; then
16017                         cat >> confdefs.h <<\EOF
16018 #define HAVE_THR 1
16019 EOF
16020
16021                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16022                         ol_link_threads=thr
16023
16024                         if test $ol_with_yielding_select = auto ; then
16025                                 ol_with_yielding_select=yes
16026                         fi
16027
16028                                                 for ac_func in \
16029                                 thr_setconcurrency \
16030                                 thr_getconcurrency \
16031                         
16032 do
16033 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16034 echo "configure:16035: checking for $ac_func" >&5
16035 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16036   echo $ac_n "(cached) $ac_c" 1>&6
16037 else
16038   cat > conftest.$ac_ext <<EOF
16039 #line 16040 "configure"
16040 #include "confdefs.h"
16041 /* System header to define __stub macros and hopefully few prototypes,
16042     which can conflict with char $ac_func(); below.  */
16043 #include <assert.h>
16044 /* Override any gcc2 internal prototype to avoid an error.  */
16045 /* We use char because int might match the return type of a gcc2
16046     builtin and then its argument prototype would still apply.  */
16047 char $ac_func();
16048 char (*f)();
16049
16050 int main() {
16051
16052 /* The GNU C library defines this for functions which it implements
16053     to always fail with ENOSYS.  Some functions are actually named
16054     something starting with __ and the normal name is an alias.  */
16055 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16056 choke me
16057 #else
16058 f = $ac_func;
16059 #endif
16060
16061 ; return 0; }
16062 EOF
16063 if { (eval echo configure:16064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16064   rm -rf conftest*
16065   eval "ac_cv_func_$ac_func=yes"
16066 else
16067   echo "configure: failed program was:" >&5
16068   cat conftest.$ac_ext >&5
16069   rm -rf conftest*
16070   eval "ac_cv_func_$ac_func=no"
16071 fi
16072 rm -f conftest*
16073 fi
16074
16075 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16076   echo "$ac_t""yes" 1>&6
16077     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16078   cat >> confdefs.h <<EOF
16079 #define $ac_tr_func 1
16080 EOF
16081  
16082 else
16083   echo "$ac_t""no" 1>&6
16084 fi
16085 done
16086
16087                 fi
16088         fi
16089
16090                 for ac_hdr in lwp/lwp.h
16091 do
16092 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16093 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16094 echo "configure:16095: checking for $ac_hdr" >&5
16095 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16096   echo $ac_n "(cached) $ac_c" 1>&6
16097 else
16098   cat > conftest.$ac_ext <<EOF
16099 #line 16100 "configure"
16100 #include "confdefs.h"
16101 #include <$ac_hdr>
16102 EOF
16103 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16104 { (eval echo configure:16105: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16105 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16106 if test -z "$ac_err"; then
16107   rm -rf conftest*
16108   eval "ac_cv_header_$ac_safe=yes"
16109 else
16110   echo "$ac_err" >&5
16111   echo "configure: failed program was:" >&5
16112   cat conftest.$ac_ext >&5
16113   rm -rf conftest*
16114   eval "ac_cv_header_$ac_safe=no"
16115 fi
16116 rm -f conftest*
16117 fi
16118 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16119   echo "$ac_t""yes" 1>&6
16120     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16121   cat >> confdefs.h <<EOF
16122 #define $ac_tr_hdr 1
16123 EOF
16124  
16125 else
16126   echo "$ac_t""no" 1>&6
16127 fi
16128 done
16129
16130         if test $ac_cv_header_lwp_lwp_h = yes ; then
16131                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16132 echo "configure:16133: checking for lwp_create in -llwp" >&5
16133 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16134 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16135   echo $ac_n "(cached) $ac_c" 1>&6
16136 else
16137   ac_save_LIBS="$LIBS"
16138 LIBS="-llwp  $LIBS"
16139 cat > conftest.$ac_ext <<EOF
16140 #line 16141 "configure"
16141 #include "confdefs.h"
16142 /* Override any gcc2 internal prototype to avoid an error.  */
16143 /* We use char because int might match the return type of a gcc2
16144     builtin and then its argument prototype would still apply.  */
16145 char lwp_create();
16146
16147 int main() {
16148 lwp_create()
16149 ; return 0; }
16150 EOF
16151 if { (eval echo configure:16152: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16152   rm -rf conftest*
16153   eval "ac_cv_lib_$ac_lib_var=yes"
16154 else
16155   echo "configure: failed program was:" >&5
16156   cat conftest.$ac_ext >&5
16157   rm -rf conftest*
16158   eval "ac_cv_lib_$ac_lib_var=no"
16159 fi
16160 rm -f conftest*
16161 LIBS="$ac_save_LIBS"
16162
16163 fi
16164 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16165   echo "$ac_t""yes" 1>&6
16166   have_lwp=yes
16167 else
16168   echo "$ac_t""no" 1>&6
16169 have_lwp=no
16170 fi
16171
16172
16173                 if test $have_lwp = yes ; then
16174                         cat >> confdefs.h <<\EOF
16175 #define HAVE_LWP 1
16176 EOF
16177
16178                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16179                         ol_link_threads=lwp
16180
16181                         if test $ol_with_yielding_select = auto ; then
16182                                 ol_with_yielding_select=no
16183                         fi
16184                 fi
16185         fi
16186 fi
16187
16188 if test $ol_with_yielding_select = yes ; then
16189         cat >> confdefs.h <<\EOF
16190 #define HAVE_YIELDING_SELECT 1
16191 EOF
16192
16193 fi
16194
16195 if test $ol_with_threads = manual ; then
16196                 ol_link_threads=yes
16197
16198         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16199
16200         for ac_hdr in pthread.h sched.h
16201 do
16202 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16203 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16204 echo "configure:16205: checking for $ac_hdr" >&5
16205 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16206   echo $ac_n "(cached) $ac_c" 1>&6
16207 else
16208   cat > conftest.$ac_ext <<EOF
16209 #line 16210 "configure"
16210 #include "confdefs.h"
16211 #include <$ac_hdr>
16212 EOF
16213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16214 { (eval echo configure:16215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16216 if test -z "$ac_err"; then
16217   rm -rf conftest*
16218   eval "ac_cv_header_$ac_safe=yes"
16219 else
16220   echo "$ac_err" >&5
16221   echo "configure: failed program was:" >&5
16222   cat conftest.$ac_ext >&5
16223   rm -rf conftest*
16224   eval "ac_cv_header_$ac_safe=no"
16225 fi
16226 rm -f conftest*
16227 fi
16228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16229   echo "$ac_t""yes" 1>&6
16230     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16231   cat >> confdefs.h <<EOF
16232 #define $ac_tr_hdr 1
16233 EOF
16234  
16235 else
16236   echo "$ac_t""no" 1>&6
16237 fi
16238 done
16239
16240         for ac_func in sched_yield pthread_yield
16241 do
16242 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16243 echo "configure:16244: checking for $ac_func" >&5
16244 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16245   echo $ac_n "(cached) $ac_c" 1>&6
16246 else
16247   cat > conftest.$ac_ext <<EOF
16248 #line 16249 "configure"
16249 #include "confdefs.h"
16250 /* System header to define __stub macros and hopefully few prototypes,
16251     which can conflict with char $ac_func(); below.  */
16252 #include <assert.h>
16253 /* Override any gcc2 internal prototype to avoid an error.  */
16254 /* We use char because int might match the return type of a gcc2
16255     builtin and then its argument prototype would still apply.  */
16256 char $ac_func();
16257 char (*f)();
16258
16259 int main() {
16260
16261 /* The GNU C library defines this for functions which it implements
16262     to always fail with ENOSYS.  Some functions are actually named
16263     something starting with __ and the normal name is an alias.  */
16264 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16265 choke me
16266 #else
16267 f = $ac_func;
16268 #endif
16269
16270 ; return 0; }
16271 EOF
16272 if { (eval echo configure:16273: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16273   rm -rf conftest*
16274   eval "ac_cv_func_$ac_func=yes"
16275 else
16276   echo "configure: failed program was:" >&5
16277   cat conftest.$ac_ext >&5
16278   rm -rf conftest*
16279   eval "ac_cv_func_$ac_func=no"
16280 fi
16281 rm -f conftest*
16282 fi
16283
16284 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16285   echo "$ac_t""yes" 1>&6
16286     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16287   cat >> confdefs.h <<EOF
16288 #define $ac_tr_func 1
16289 EOF
16290  
16291 else
16292   echo "$ac_t""no" 1>&6
16293 fi
16294 done
16295
16296         
16297         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16298 echo "configure:16299: checking for LinuxThreads pthread.h" >&5
16299 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16300   echo $ac_n "(cached) $ac_c" 1>&6
16301 else
16302   cat > conftest.$ac_ext <<EOF
16303 #line 16304 "configure"
16304 #include "confdefs.h"
16305 #include <pthread.h>
16306 EOF
16307 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16308   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16309   rm -rf conftest*
16310   ol_cv_header_linux_threads=yes
16311 else
16312   rm -rf conftest*
16313   ol_cv_header_linux_threads=no
16314 fi
16315 rm -f conftest*
16316
16317                 
16318 fi
16319
16320 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16321         if test $ol_cv_header_linux_threads = yes; then
16322                 cat >> confdefs.h <<\EOF
16323 #define HAVE_LINUX_THREADS 1
16324 EOF
16325
16326         fi
16327
16328
16329         for ac_hdr in mach/cthreads.h
16330 do
16331 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16332 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16333 echo "configure:16334: checking for $ac_hdr" >&5
16334 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16335   echo $ac_n "(cached) $ac_c" 1>&6
16336 else
16337   cat > conftest.$ac_ext <<EOF
16338 #line 16339 "configure"
16339 #include "confdefs.h"
16340 #include <$ac_hdr>
16341 EOF
16342 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16343 { (eval echo configure:16344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16344 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16345 if test -z "$ac_err"; then
16346   rm -rf conftest*
16347   eval "ac_cv_header_$ac_safe=yes"
16348 else
16349   echo "$ac_err" >&5
16350   echo "configure: failed program was:" >&5
16351   cat conftest.$ac_ext >&5
16352   rm -rf conftest*
16353   eval "ac_cv_header_$ac_safe=no"
16354 fi
16355 rm -f conftest*
16356 fi
16357 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16358   echo "$ac_t""yes" 1>&6
16359     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16360   cat >> confdefs.h <<EOF
16361 #define $ac_tr_hdr 1
16362 EOF
16363  
16364 else
16365   echo "$ac_t""no" 1>&6
16366 fi
16367 done
16368
16369         for ac_hdr in lwp/lwp.h
16370 do
16371 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16372 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16373 echo "configure:16374: checking for $ac_hdr" >&5
16374 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16375   echo $ac_n "(cached) $ac_c" 1>&6
16376 else
16377   cat > conftest.$ac_ext <<EOF
16378 #line 16379 "configure"
16379 #include "confdefs.h"
16380 #include <$ac_hdr>
16381 EOF
16382 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16383 { (eval echo configure:16384: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16384 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16385 if test -z "$ac_err"; then
16386   rm -rf conftest*
16387   eval "ac_cv_header_$ac_safe=yes"
16388 else
16389   echo "$ac_err" >&5
16390   echo "configure: failed program was:" >&5
16391   cat conftest.$ac_ext >&5
16392   rm -rf conftest*
16393   eval "ac_cv_header_$ac_safe=no"
16394 fi
16395 rm -f conftest*
16396 fi
16397 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16398   echo "$ac_t""yes" 1>&6
16399     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16400   cat >> confdefs.h <<EOF
16401 #define $ac_tr_hdr 1
16402 EOF
16403  
16404 else
16405   echo "$ac_t""no" 1>&6
16406 fi
16407 done
16408
16409         for ac_hdr in thread.h synch.h
16410 do
16411 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16412 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16413 echo "configure:16414: checking for $ac_hdr" >&5
16414 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16415   echo $ac_n "(cached) $ac_c" 1>&6
16416 else
16417   cat > conftest.$ac_ext <<EOF
16418 #line 16419 "configure"
16419 #include "confdefs.h"
16420 #include <$ac_hdr>
16421 EOF
16422 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16423 { (eval echo configure:16424: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16424 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16425 if test -z "$ac_err"; then
16426   rm -rf conftest*
16427   eval "ac_cv_header_$ac_safe=yes"
16428 else
16429   echo "$ac_err" >&5
16430   echo "configure: failed program was:" >&5
16431   cat conftest.$ac_ext >&5
16432   rm -rf conftest*
16433   eval "ac_cv_header_$ac_safe=no"
16434 fi
16435 rm -f conftest*
16436 fi
16437 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16438   echo "$ac_t""yes" 1>&6
16439     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16440   cat >> confdefs.h <<EOF
16441 #define $ac_tr_hdr 1
16442 EOF
16443  
16444 else
16445   echo "$ac_t""no" 1>&6
16446 fi
16447 done
16448
16449 fi
16450
16451 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16452                         cat >> confdefs.h <<\EOF
16453 #define REENTRANT 1
16454 EOF
16455
16456         cat >> confdefs.h <<\EOF
16457 #define _REENTRANT 1
16458 EOF
16459
16460         cat >> confdefs.h <<\EOF
16461 #define THREAD_SAFE 1
16462 EOF
16463
16464         cat >> confdefs.h <<\EOF
16465 #define _THREAD_SAFE 1
16466 EOF
16467
16468         cat >> confdefs.h <<\EOF
16469 #define THREADSAFE 1
16470 EOF
16471
16472         cat >> confdefs.h <<\EOF
16473 #define _THREADSAFE 1
16474 EOF
16475
16476         cat >> confdefs.h <<\EOF
16477 #define _SGI_MP_SOURCE 1
16478 EOF
16479
16480
16481                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16482 echo "configure:16483: checking for thread specific errno" >&5
16483 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16484   echo $ac_n "(cached) $ac_c" 1>&6
16485 else
16486   
16487                 cat > conftest.$ac_ext <<EOF
16488 #line 16489 "configure"
16489 #include "confdefs.h"
16490 #include <errno.h>
16491 int main() {
16492 errno = 0;
16493 ; return 0; }
16494 EOF
16495 if { (eval echo configure:16496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16496   rm -rf conftest*
16497   ol_cv_errno_thread_specific=yes
16498 else
16499   echo "configure: failed program was:" >&5
16500   cat conftest.$ac_ext >&5
16501   rm -rf conftest*
16502   ol_cv_errno_thread_specific=no
16503 fi
16504 rm -f conftest*
16505         
16506 fi
16507
16508 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16509
16510                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16511 echo "configure:16512: checking for thread specific h_errno" >&5
16512 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16513   echo $ac_n "(cached) $ac_c" 1>&6
16514 else
16515   
16516                 cat > conftest.$ac_ext <<EOF
16517 #line 16518 "configure"
16518 #include "confdefs.h"
16519 #include <netdb.h>
16520 int main() {
16521 h_errno = 0;
16522 ; return 0; }
16523 EOF
16524 if { (eval echo configure:16525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16525   rm -rf conftest*
16526   ol_cv_h_errno_thread_specific=yes
16527 else
16528   echo "configure: failed program was:" >&5
16529   cat conftest.$ac_ext >&5
16530   rm -rf conftest*
16531   ol_cv_h_errno_thread_specific=no
16532 fi
16533 rm -f conftest*
16534         
16535 fi
16536
16537 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16538
16539         if test $ol_cv_errno_thread_specific != yes \
16540                 -o $ol_cv_h_errno_thread_specific != yes ; then
16541                 LIBS="$LTHREAD_LIBS $LIBS"
16542                 LTHREAD_LIBS=""
16543         fi
16544
16545 fi  
16546
16547 if test $ol_link_threads = no ; then
16548         if test $ol_with_threads = yes ; then
16549                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16550         fi
16551
16552         if test $ol_with_threads = auto ; then
16553                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16554                 ol_with_threads=no
16555         fi
16556
16557         cat >> confdefs.h <<\EOF
16558 #define NO_THREADS 1
16559 EOF
16560
16561         LTHREAD_LIBS=""
16562 fi
16563
16564 if test $ol_link_threads != no ; then
16565         cat >> confdefs.h <<\EOF
16566 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16567 EOF
16568
16569 fi
16570
16571 ol_link_ldbm=no 
16572
16573 if test $ol_with_ldbm_api = auto \
16574         -o $ol_with_ldbm_api = berkeley \
16575         -o $ol_with_ldbm_api = bcompat ; then
16576
16577         if test $ol_with_ldbm_api = bcompat; then \
16578                 for ac_hdr in db_185.h db.h
16579 do
16580 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16581 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16582 echo "configure:16583: checking for $ac_hdr" >&5
16583 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16584   echo $ac_n "(cached) $ac_c" 1>&6
16585 else
16586   cat > conftest.$ac_ext <<EOF
16587 #line 16588 "configure"
16588 #include "confdefs.h"
16589 #include <$ac_hdr>
16590 EOF
16591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16592 { (eval echo configure:16593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16594 if test -z "$ac_err"; then
16595   rm -rf conftest*
16596   eval "ac_cv_header_$ac_safe=yes"
16597 else
16598   echo "$ac_err" >&5
16599   echo "configure: failed program was:" >&5
16600   cat conftest.$ac_ext >&5
16601   rm -rf conftest*
16602   eval "ac_cv_header_$ac_safe=no"
16603 fi
16604 rm -f conftest*
16605 fi
16606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16607   echo "$ac_t""yes" 1>&6
16608     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16609   cat >> confdefs.h <<EOF
16610 #define $ac_tr_hdr 1
16611 EOF
16612  
16613 else
16614   echo "$ac_t""no" 1>&6
16615 fi
16616 done
16617
16618 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16619         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16620 echo "configure:16621: checking if Berkeley DB header compatibility" >&5
16621 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16622   echo $ac_n "(cached) $ac_c" 1>&6
16623 else
16624   
16625                 cat > conftest.$ac_ext <<EOF
16626 #line 16627 "configure"
16627 #include "confdefs.h"
16628
16629 #if HAVE_DB_185_H
16630 #       include <db_185.h>
16631 #else
16632 #       include <db.h>
16633 #endif
16634
16635  /* this check could be improved */
16636 #ifndef DB_VERSION_MAJOR
16637 #       define DB_VERSION_MAJOR 1
16638 #endif
16639
16640 #if DB_VERSION_MAJOR == 1 
16641         __db_version_1
16642 #endif
16643
16644 EOF
16645 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16646   egrep "__db_version_1" >/dev/null 2>&1; then
16647   rm -rf conftest*
16648   ol_cv_header_db1=yes
16649 else
16650   rm -rf conftest*
16651   ol_cv_header_db1=no
16652 fi
16653 rm -f conftest*
16654
16655 fi
16656
16657 echo "$ac_t""$ol_cv_header_db1" 1>&6
16658
16659         if test $ol_cv_header_db1 = yes ; then
16660                 ol_cv_lib_db=no
16661 if test $ol_cv_lib_db = no ; then
16662         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16663 echo "configure:16664: checking for Berkeley DB link (default)" >&5
16664 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16665   echo $ac_n "(cached) $ac_c" 1>&6
16666 else
16667   
16668         ol_DB_LIB=
16669         ol_LIBS=$LIBS
16670         LIBS="$ol_DB_LIB $LIBS"
16671
16672         cat > conftest.$ac_ext <<EOF
16673 #line 16674 "configure"
16674 #include "confdefs.h"
16675
16676 #ifdef HAVE_DB_185_H
16677 # include <db_185.h>
16678 #else
16679 # include <db.h>
16680 #endif
16681
16682 #ifndef DB_VERSION_MAJOR
16683 # define DB_VERSION_MAJOR 1
16684 #endif
16685
16686 #ifndef NULL
16687 #define NULL ((void*)0)
16688 #endif
16689
16690 int main() {
16691
16692 #if DB_VERSION_MAJOR > 1
16693         {
16694                 char *version;
16695                 int major, minor, patch;
16696
16697                 version = db_version( &major, &minor, &patch );
16698
16699                 if( major != DB_VERSION_MAJOR ||
16700                         minor < DB_VERSION_MINOR )
16701                 {
16702                         printf("Berkeley DB version mismatch\n"
16703                                 "\texpected: %s\n\tgot: %s\n",
16704                                 DB_VERSION_STRING, version);
16705                         return 1;
16706                 }
16707         }
16708 #endif
16709
16710 #if DB_VERSION_MAJOR > 2
16711         db_env_create( NULL, 0 );
16712 #elif DB_VERSION_MAJOR > 1
16713         db_appexit( NULL );
16714 #else
16715         (void) dbopen( NULL, 0, 0, 0, NULL);
16716 #endif
16717
16718 ; return 0; }
16719 EOF
16720 if { (eval echo configure:16721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16721   rm -rf conftest*
16722   ol_cv_db_none=yes
16723 else
16724   echo "configure: failed program was:" >&5
16725   cat conftest.$ac_ext >&5
16726   rm -rf conftest*
16727   ol_cv_db_none=no
16728 fi
16729 rm -f conftest*
16730
16731         LIBS="$ol_LIBS"
16732
16733 fi
16734
16735 echo "$ac_t""$ol_cv_db_none" 1>&6
16736
16737         if test $ol_cv_db_none = yes ; then
16738                 ol_cv_lib_db=yes
16739         fi
16740 fi
16741
16742 if test $ol_cv_lib_db = no ; then
16743         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
16744 echo "configure:16745: checking for Berkeley DB link (-ldb4)" >&5
16745 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
16746   echo $ac_n "(cached) $ac_c" 1>&6
16747 else
16748   
16749         ol_DB_LIB=-ldb4
16750         ol_LIBS=$LIBS
16751         LIBS="$ol_DB_LIB $LIBS"
16752
16753         cat > conftest.$ac_ext <<EOF
16754 #line 16755 "configure"
16755 #include "confdefs.h"
16756
16757 #ifdef HAVE_DB_185_H
16758 # include <db_185.h>
16759 #else
16760 # include <db.h>
16761 #endif
16762
16763 #ifndef DB_VERSION_MAJOR
16764 # define DB_VERSION_MAJOR 1
16765 #endif
16766
16767 #ifndef NULL
16768 #define NULL ((void*)0)
16769 #endif
16770
16771 int main() {
16772
16773 #if DB_VERSION_MAJOR > 1
16774         {
16775                 char *version;
16776                 int major, minor, patch;
16777
16778                 version = db_version( &major, &minor, &patch );
16779
16780                 if( major != DB_VERSION_MAJOR ||
16781                         minor < DB_VERSION_MINOR )
16782                 {
16783                         printf("Berkeley DB version mismatch\n"
16784                                 "\texpected: %s\n\tgot: %s\n",
16785                                 DB_VERSION_STRING, version);
16786                         return 1;
16787                 }
16788         }
16789 #endif
16790
16791 #if DB_VERSION_MAJOR > 2
16792         db_env_create( NULL, 0 );
16793 #elif DB_VERSION_MAJOR > 1
16794         db_appexit( NULL );
16795 #else
16796         (void) dbopen( NULL, 0, 0, 0, NULL);
16797 #endif
16798
16799 ; return 0; }
16800 EOF
16801 if { (eval echo configure:16802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16802   rm -rf conftest*
16803   ol_cv_db_db4=yes
16804 else
16805   echo "configure: failed program was:" >&5
16806   cat conftest.$ac_ext >&5
16807   rm -rf conftest*
16808   ol_cv_db_db4=no
16809 fi
16810 rm -f conftest*
16811
16812         LIBS="$ol_LIBS"
16813
16814 fi
16815
16816 echo "$ac_t""$ol_cv_db_db4" 1>&6
16817
16818         if test $ol_cv_db_db4 = yes ; then
16819                 ol_cv_lib_db=-ldb4
16820         fi
16821 fi
16822
16823 if test $ol_cv_lib_db = no ; then
16824         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
16825 echo "configure:16826: checking for Berkeley DB link (-ldb-4)" >&5
16826 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
16827   echo $ac_n "(cached) $ac_c" 1>&6
16828 else
16829   
16830         ol_DB_LIB=-ldb-4
16831         ol_LIBS=$LIBS
16832         LIBS="$ol_DB_LIB $LIBS"
16833
16834         cat > conftest.$ac_ext <<EOF
16835 #line 16836 "configure"
16836 #include "confdefs.h"
16837
16838 #ifdef HAVE_DB_185_H
16839 # include <db_185.h>
16840 #else
16841 # include <db.h>
16842 #endif
16843
16844 #ifndef DB_VERSION_MAJOR
16845 # define DB_VERSION_MAJOR 1
16846 #endif
16847
16848 #ifndef NULL
16849 #define NULL ((void*)0)
16850 #endif
16851
16852 int main() {
16853
16854 #if DB_VERSION_MAJOR > 1
16855         {
16856                 char *version;
16857                 int major, minor, patch;
16858
16859                 version = db_version( &major, &minor, &patch );
16860
16861                 if( major != DB_VERSION_MAJOR ||
16862                         minor < DB_VERSION_MINOR )
16863                 {
16864                         printf("Berkeley DB version mismatch\n"
16865                                 "\texpected: %s\n\tgot: %s\n",
16866                                 DB_VERSION_STRING, version);
16867                         return 1;
16868                 }
16869         }
16870 #endif
16871
16872 #if DB_VERSION_MAJOR > 2
16873         db_env_create( NULL, 0 );
16874 #elif DB_VERSION_MAJOR > 1
16875         db_appexit( NULL );
16876 #else
16877         (void) dbopen( NULL, 0, 0, 0, NULL);
16878 #endif
16879
16880 ; return 0; }
16881 EOF
16882 if { (eval echo configure:16883: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16883   rm -rf conftest*
16884   ol_cv_db_db_4=yes
16885 else
16886   echo "configure: failed program was:" >&5
16887   cat conftest.$ac_ext >&5
16888   rm -rf conftest*
16889   ol_cv_db_db_4=no
16890 fi
16891 rm -f conftest*
16892
16893         LIBS="$ol_LIBS"
16894
16895 fi
16896
16897 echo "$ac_t""$ol_cv_db_db_4" 1>&6
16898
16899         if test $ol_cv_db_db_4 = yes ; then
16900                 ol_cv_lib_db=-ldb-4
16901         fi
16902 fi
16903
16904 if test $ol_cv_lib_db = no ; then
16905         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
16906 echo "configure:16907: checking for Berkeley DB link (-ldb)" >&5
16907 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
16908   echo $ac_n "(cached) $ac_c" 1>&6
16909 else
16910   
16911         ol_DB_LIB=-ldb
16912         ol_LIBS=$LIBS
16913         LIBS="$ol_DB_LIB $LIBS"
16914
16915         cat > conftest.$ac_ext <<EOF
16916 #line 16917 "configure"
16917 #include "confdefs.h"
16918
16919 #ifdef HAVE_DB_185_H
16920 # include <db_185.h>
16921 #else
16922 # include <db.h>
16923 #endif
16924
16925 #ifndef DB_VERSION_MAJOR
16926 # define DB_VERSION_MAJOR 1
16927 #endif
16928
16929 #ifndef NULL
16930 #define NULL ((void*)0)
16931 #endif
16932
16933 int main() {
16934
16935 #if DB_VERSION_MAJOR > 1
16936         {
16937                 char *version;
16938                 int major, minor, patch;
16939
16940                 version = db_version( &major, &minor, &patch );
16941
16942                 if( major != DB_VERSION_MAJOR ||
16943                         minor < DB_VERSION_MINOR )
16944                 {
16945                         printf("Berkeley DB version mismatch\n"
16946                                 "\texpected: %s\n\tgot: %s\n",
16947                                 DB_VERSION_STRING, version);
16948                         return 1;
16949                 }
16950         }
16951 #endif
16952
16953 #if DB_VERSION_MAJOR > 2
16954         db_env_create( NULL, 0 );
16955 #elif DB_VERSION_MAJOR > 1
16956         db_appexit( NULL );
16957 #else
16958         (void) dbopen( NULL, 0, 0, 0, NULL);
16959 #endif
16960
16961 ; return 0; }
16962 EOF
16963 if { (eval echo configure:16964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16964   rm -rf conftest*
16965   ol_cv_db_db=yes
16966 else
16967   echo "configure: failed program was:" >&5
16968   cat conftest.$ac_ext >&5
16969   rm -rf conftest*
16970   ol_cv_db_db=no
16971 fi
16972 rm -f conftest*
16973
16974         LIBS="$ol_LIBS"
16975
16976 fi
16977
16978 echo "$ac_t""$ol_cv_db_db" 1>&6
16979
16980         if test $ol_cv_db_db = yes ; then
16981                 ol_cv_lib_db=-ldb
16982         fi
16983 fi
16984
16985 if test $ol_cv_lib_db = no ; then
16986         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
16987 echo "configure:16988: checking for Berkeley DB link (-ldb3)" >&5
16988 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
16989   echo $ac_n "(cached) $ac_c" 1>&6
16990 else
16991   
16992         ol_DB_LIB=-ldb3
16993         ol_LIBS=$LIBS
16994         LIBS="$ol_DB_LIB $LIBS"
16995
16996         cat > conftest.$ac_ext <<EOF
16997 #line 16998 "configure"
16998 #include "confdefs.h"
16999
17000 #ifdef HAVE_DB_185_H
17001 # include <db_185.h>
17002 #else
17003 # include <db.h>
17004 #endif
17005
17006 #ifndef DB_VERSION_MAJOR
17007 # define DB_VERSION_MAJOR 1
17008 #endif
17009
17010 #ifndef NULL
17011 #define NULL ((void*)0)
17012 #endif
17013
17014 int main() {
17015
17016 #if DB_VERSION_MAJOR > 1
17017         {
17018                 char *version;
17019                 int major, minor, patch;
17020
17021                 version = db_version( &major, &minor, &patch );
17022
17023                 if( major != DB_VERSION_MAJOR ||
17024                         minor < DB_VERSION_MINOR )
17025                 {
17026                         printf("Berkeley DB version mismatch\n"
17027                                 "\texpected: %s\n\tgot: %s\n",
17028                                 DB_VERSION_STRING, version);
17029                         return 1;
17030                 }
17031         }
17032 #endif
17033
17034 #if DB_VERSION_MAJOR > 2
17035         db_env_create( NULL, 0 );
17036 #elif DB_VERSION_MAJOR > 1
17037         db_appexit( NULL );
17038 #else
17039         (void) dbopen( NULL, 0, 0, 0, NULL);
17040 #endif
17041
17042 ; return 0; }
17043 EOF
17044 if { (eval echo configure:17045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17045   rm -rf conftest*
17046   ol_cv_db_db3=yes
17047 else
17048   echo "configure: failed program was:" >&5
17049   cat conftest.$ac_ext >&5
17050   rm -rf conftest*
17051   ol_cv_db_db3=no
17052 fi
17053 rm -f conftest*
17054
17055         LIBS="$ol_LIBS"
17056
17057 fi
17058
17059 echo "$ac_t""$ol_cv_db_db3" 1>&6
17060
17061         if test $ol_cv_db_db3 = yes ; then
17062                 ol_cv_lib_db=-ldb3
17063         fi
17064 fi
17065
17066 if test $ol_cv_lib_db = no ; then
17067         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17068 echo "configure:17069: checking for Berkeley DB link (-ldb-3)" >&5
17069 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17070   echo $ac_n "(cached) $ac_c" 1>&6
17071 else
17072   
17073         ol_DB_LIB=-ldb-3
17074         ol_LIBS=$LIBS
17075         LIBS="$ol_DB_LIB $LIBS"
17076
17077         cat > conftest.$ac_ext <<EOF
17078 #line 17079 "configure"
17079 #include "confdefs.h"
17080
17081 #ifdef HAVE_DB_185_H
17082 # include <db_185.h>
17083 #else
17084 # include <db.h>
17085 #endif
17086
17087 #ifndef DB_VERSION_MAJOR
17088 # define DB_VERSION_MAJOR 1
17089 #endif
17090
17091 #ifndef NULL
17092 #define NULL ((void*)0)
17093 #endif
17094
17095 int main() {
17096
17097 #if DB_VERSION_MAJOR > 1
17098         {
17099                 char *version;
17100                 int major, minor, patch;
17101
17102                 version = db_version( &major, &minor, &patch );
17103
17104                 if( major != DB_VERSION_MAJOR ||
17105                         minor < DB_VERSION_MINOR )
17106                 {
17107                         printf("Berkeley DB version mismatch\n"
17108                                 "\texpected: %s\n\tgot: %s\n",
17109                                 DB_VERSION_STRING, version);
17110                         return 1;
17111                 }
17112         }
17113 #endif
17114
17115 #if DB_VERSION_MAJOR > 2
17116         db_env_create( NULL, 0 );
17117 #elif DB_VERSION_MAJOR > 1
17118         db_appexit( NULL );
17119 #else
17120         (void) dbopen( NULL, 0, 0, 0, NULL);
17121 #endif
17122
17123 ; return 0; }
17124 EOF
17125 if { (eval echo configure:17126: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17126   rm -rf conftest*
17127   ol_cv_db_db_3=yes
17128 else
17129   echo "configure: failed program was:" >&5
17130   cat conftest.$ac_ext >&5
17131   rm -rf conftest*
17132   ol_cv_db_db_3=no
17133 fi
17134 rm -f conftest*
17135
17136         LIBS="$ol_LIBS"
17137
17138 fi
17139
17140 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17141
17142         if test $ol_cv_db_db_3 = yes ; then
17143                 ol_cv_lib_db=-ldb-3
17144         fi
17145 fi
17146
17147 if test $ol_cv_lib_db = no ; then
17148         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17149 echo "configure:17150: checking for Berkeley DB link (-ldb2)" >&5
17150 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17151   echo $ac_n "(cached) $ac_c" 1>&6
17152 else
17153   
17154         ol_DB_LIB=-ldb2
17155         ol_LIBS=$LIBS
17156         LIBS="$ol_DB_LIB $LIBS"
17157
17158         cat > conftest.$ac_ext <<EOF
17159 #line 17160 "configure"
17160 #include "confdefs.h"
17161
17162 #ifdef HAVE_DB_185_H
17163 # include <db_185.h>
17164 #else
17165 # include <db.h>
17166 #endif
17167
17168 #ifndef DB_VERSION_MAJOR
17169 # define DB_VERSION_MAJOR 1
17170 #endif
17171
17172 #ifndef NULL
17173 #define NULL ((void*)0)
17174 #endif
17175
17176 int main() {
17177
17178 #if DB_VERSION_MAJOR > 1
17179         {
17180                 char *version;
17181                 int major, minor, patch;
17182
17183                 version = db_version( &major, &minor, &patch );
17184
17185                 if( major != DB_VERSION_MAJOR ||
17186                         minor < DB_VERSION_MINOR )
17187                 {
17188                         printf("Berkeley DB version mismatch\n"
17189                                 "\texpected: %s\n\tgot: %s\n",
17190                                 DB_VERSION_STRING, version);
17191                         return 1;
17192                 }
17193         }
17194 #endif
17195
17196 #if DB_VERSION_MAJOR > 2
17197         db_env_create( NULL, 0 );
17198 #elif DB_VERSION_MAJOR > 1
17199         db_appexit( NULL );
17200 #else
17201         (void) dbopen( NULL, 0, 0, 0, NULL);
17202 #endif
17203
17204 ; return 0; }
17205 EOF
17206 if { (eval echo configure:17207: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17207   rm -rf conftest*
17208   ol_cv_db_db2=yes
17209 else
17210   echo "configure: failed program was:" >&5
17211   cat conftest.$ac_ext >&5
17212   rm -rf conftest*
17213   ol_cv_db_db2=no
17214 fi
17215 rm -f conftest*
17216
17217         LIBS="$ol_LIBS"
17218
17219 fi
17220
17221 echo "$ac_t""$ol_cv_db_db2" 1>&6
17222
17223         if test $ol_cv_db_db2 = yes ; then
17224                 ol_cv_lib_db=-ldb2
17225         fi
17226 fi
17227
17228 if test $ol_cv_lib_db = no ; then
17229         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17230 echo "configure:17231: checking for Berkeley DB link (-ldb-2)" >&5
17231 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17232   echo $ac_n "(cached) $ac_c" 1>&6
17233 else
17234   
17235         ol_DB_LIB=-ldb-2
17236         ol_LIBS=$LIBS
17237         LIBS="$ol_DB_LIB $LIBS"
17238
17239         cat > conftest.$ac_ext <<EOF
17240 #line 17241 "configure"
17241 #include "confdefs.h"
17242
17243 #ifdef HAVE_DB_185_H
17244 # include <db_185.h>
17245 #else
17246 # include <db.h>
17247 #endif
17248
17249 #ifndef DB_VERSION_MAJOR
17250 # define DB_VERSION_MAJOR 1
17251 #endif
17252
17253 #ifndef NULL
17254 #define NULL ((void*)0)
17255 #endif
17256
17257 int main() {
17258
17259 #if DB_VERSION_MAJOR > 1
17260         {
17261                 char *version;
17262                 int major, minor, patch;
17263
17264                 version = db_version( &major, &minor, &patch );
17265
17266                 if( major != DB_VERSION_MAJOR ||
17267                         minor < DB_VERSION_MINOR )
17268                 {
17269                         printf("Berkeley DB version mismatch\n"
17270                                 "\texpected: %s\n\tgot: %s\n",
17271                                 DB_VERSION_STRING, version);
17272                         return 1;
17273                 }
17274         }
17275 #endif
17276
17277 #if DB_VERSION_MAJOR > 2
17278         db_env_create( NULL, 0 );
17279 #elif DB_VERSION_MAJOR > 1
17280         db_appexit( NULL );
17281 #else
17282         (void) dbopen( NULL, 0, 0, 0, NULL);
17283 #endif
17284
17285 ; return 0; }
17286 EOF
17287 if { (eval echo configure:17288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17288   rm -rf conftest*
17289   ol_cv_db_db_2=yes
17290 else
17291   echo "configure: failed program was:" >&5
17292   cat conftest.$ac_ext >&5
17293   rm -rf conftest*
17294   ol_cv_db_db_2=no
17295 fi
17296 rm -f conftest*
17297
17298         LIBS="$ol_LIBS"
17299
17300 fi
17301
17302 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17303
17304         if test $ol_cv_db_db_2 = yes ; then
17305                 ol_cv_lib_db=-ldb-2
17306         fi
17307 fi
17308
17309 if test $ol_cv_lib_db = no ; then
17310         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17311 echo "configure:17312: checking for Berkeley DB link (-ldb1)" >&5
17312 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17313   echo $ac_n "(cached) $ac_c" 1>&6
17314 else
17315   
17316         ol_DB_LIB=-ldb1
17317         ol_LIBS=$LIBS
17318         LIBS="$ol_DB_LIB $LIBS"
17319
17320         cat > conftest.$ac_ext <<EOF
17321 #line 17322 "configure"
17322 #include "confdefs.h"
17323
17324 #ifdef HAVE_DB_185_H
17325 # include <db_185.h>
17326 #else
17327 # include <db.h>
17328 #endif
17329
17330 #ifndef DB_VERSION_MAJOR
17331 # define DB_VERSION_MAJOR 1
17332 #endif
17333
17334 #ifndef NULL
17335 #define NULL ((void*)0)
17336 #endif
17337
17338 int main() {
17339
17340 #if DB_VERSION_MAJOR > 1
17341         {
17342                 char *version;
17343                 int major, minor, patch;
17344
17345                 version = db_version( &major, &minor, &patch );
17346
17347                 if( major != DB_VERSION_MAJOR ||
17348                         minor < DB_VERSION_MINOR )
17349                 {
17350                         printf("Berkeley DB version mismatch\n"
17351                                 "\texpected: %s\n\tgot: %s\n",
17352                                 DB_VERSION_STRING, version);
17353                         return 1;
17354                 }
17355         }
17356 #endif
17357
17358 #if DB_VERSION_MAJOR > 2
17359         db_env_create( NULL, 0 );
17360 #elif DB_VERSION_MAJOR > 1
17361         db_appexit( NULL );
17362 #else
17363         (void) dbopen( NULL, 0, 0, 0, NULL);
17364 #endif
17365
17366 ; return 0; }
17367 EOF
17368 if { (eval echo configure:17369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17369   rm -rf conftest*
17370   ol_cv_db_db1=yes
17371 else
17372   echo "configure: failed program was:" >&5
17373   cat conftest.$ac_ext >&5
17374   rm -rf conftest*
17375   ol_cv_db_db1=no
17376 fi
17377 rm -f conftest*
17378
17379         LIBS="$ol_LIBS"
17380
17381 fi
17382
17383 echo "$ac_t""$ol_cv_db_db1" 1>&6
17384
17385         if test $ol_cv_db_db1 = yes ; then
17386                 ol_cv_lib_db=-ldb1
17387         fi
17388 fi
17389
17390 if test $ol_cv_lib_db = no ; then
17391         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17392 echo "configure:17393: checking for Berkeley DB link (-ldb-1)" >&5
17393 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17394   echo $ac_n "(cached) $ac_c" 1>&6
17395 else
17396   
17397         ol_DB_LIB=-ldb-1
17398         ol_LIBS=$LIBS
17399         LIBS="$ol_DB_LIB $LIBS"
17400
17401         cat > conftest.$ac_ext <<EOF
17402 #line 17403 "configure"
17403 #include "confdefs.h"
17404
17405 #ifdef HAVE_DB_185_H
17406 # include <db_185.h>
17407 #else
17408 # include <db.h>
17409 #endif
17410
17411 #ifndef DB_VERSION_MAJOR
17412 # define DB_VERSION_MAJOR 1
17413 #endif
17414
17415 #ifndef NULL
17416 #define NULL ((void*)0)
17417 #endif
17418
17419 int main() {
17420
17421 #if DB_VERSION_MAJOR > 1
17422         {
17423                 char *version;
17424                 int major, minor, patch;
17425
17426                 version = db_version( &major, &minor, &patch );
17427
17428                 if( major != DB_VERSION_MAJOR ||
17429                         minor < DB_VERSION_MINOR )
17430                 {
17431                         printf("Berkeley DB version mismatch\n"
17432                                 "\texpected: %s\n\tgot: %s\n",
17433                                 DB_VERSION_STRING, version);
17434                         return 1;
17435                 }
17436         }
17437 #endif
17438
17439 #if DB_VERSION_MAJOR > 2
17440         db_env_create( NULL, 0 );
17441 #elif DB_VERSION_MAJOR > 1
17442         db_appexit( NULL );
17443 #else
17444         (void) dbopen( NULL, 0, 0, 0, NULL);
17445 #endif
17446
17447 ; return 0; }
17448 EOF
17449 if { (eval echo configure:17450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17450   rm -rf conftest*
17451   ol_cv_db_db_1=yes
17452 else
17453   echo "configure: failed program was:" >&5
17454   cat conftest.$ac_ext >&5
17455   rm -rf conftest*
17456   ol_cv_db_db_1=no
17457 fi
17458 rm -f conftest*
17459
17460         LIBS="$ol_LIBS"
17461
17462 fi
17463
17464 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17465
17466         if test $ol_cv_db_db_1 = yes ; then
17467                 ol_cv_lib_db=-ldb-1
17468         fi
17469 fi
17470
17471
17472                 if test "$ol_cv_lib_db" != no ; then
17473                         ol_cv_berkeley_db=yes
17474                 fi
17475         fi
17476 fi
17477
17478         else
17479                 ol_cv_berkeley_db=no
17480 for ac_hdr in db.h
17481 do
17482 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17483 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17484 echo "configure:17485: checking for $ac_hdr" >&5
17485 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17486   echo $ac_n "(cached) $ac_c" 1>&6
17487 else
17488   cat > conftest.$ac_ext <<EOF
17489 #line 17490 "configure"
17490 #include "confdefs.h"
17491 #include <$ac_hdr>
17492 EOF
17493 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17494 { (eval echo configure:17495: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17495 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17496 if test -z "$ac_err"; then
17497   rm -rf conftest*
17498   eval "ac_cv_header_$ac_safe=yes"
17499 else
17500   echo "$ac_err" >&5
17501   echo "configure: failed program was:" >&5
17502   cat conftest.$ac_ext >&5
17503   rm -rf conftest*
17504   eval "ac_cv_header_$ac_safe=no"
17505 fi
17506 rm -f conftest*
17507 fi
17508 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17509   echo "$ac_t""yes" 1>&6
17510     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17511   cat >> confdefs.h <<EOF
17512 #define $ac_tr_hdr 1
17513 EOF
17514  
17515 else
17516   echo "$ac_t""no" 1>&6
17517 fi
17518 done
17519
17520 if test $ac_cv_header_db_h = yes; then
17521         ol_cv_lib_db=no
17522 if test $ol_cv_lib_db = no ; then
17523         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17524 echo "configure:17525: checking for Berkeley DB link (default)" >&5
17525 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17526   echo $ac_n "(cached) $ac_c" 1>&6
17527 else
17528   
17529         ol_DB_LIB=
17530         ol_LIBS=$LIBS
17531         LIBS="$ol_DB_LIB $LIBS"
17532
17533         cat > conftest.$ac_ext <<EOF
17534 #line 17535 "configure"
17535 #include "confdefs.h"
17536
17537 #ifdef HAVE_DB_185_H
17538 # include <db_185.h>
17539 #else
17540 # include <db.h>
17541 #endif
17542
17543 #ifndef DB_VERSION_MAJOR
17544 # define DB_VERSION_MAJOR 1
17545 #endif
17546
17547 #ifndef NULL
17548 #define NULL ((void*)0)
17549 #endif
17550
17551 int main() {
17552
17553 #if DB_VERSION_MAJOR > 1
17554         {
17555                 char *version;
17556                 int major, minor, patch;
17557
17558                 version = db_version( &major, &minor, &patch );
17559
17560                 if( major != DB_VERSION_MAJOR ||
17561                         minor < DB_VERSION_MINOR )
17562                 {
17563                         printf("Berkeley DB version mismatch\n"
17564                                 "\texpected: %s\n\tgot: %s\n",
17565                                 DB_VERSION_STRING, version);
17566                         return 1;
17567                 }
17568         }
17569 #endif
17570
17571 #if DB_VERSION_MAJOR > 2
17572         db_env_create( NULL, 0 );
17573 #elif DB_VERSION_MAJOR > 1
17574         db_appexit( NULL );
17575 #else
17576         (void) dbopen( NULL, 0, 0, 0, NULL);
17577 #endif
17578
17579 ; return 0; }
17580 EOF
17581 if { (eval echo configure:17582: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17582   rm -rf conftest*
17583   ol_cv_db_none=yes
17584 else
17585   echo "configure: failed program was:" >&5
17586   cat conftest.$ac_ext >&5
17587   rm -rf conftest*
17588   ol_cv_db_none=no
17589 fi
17590 rm -f conftest*
17591
17592         LIBS="$ol_LIBS"
17593
17594 fi
17595
17596 echo "$ac_t""$ol_cv_db_none" 1>&6
17597
17598         if test $ol_cv_db_none = yes ; then
17599                 ol_cv_lib_db=yes
17600         fi
17601 fi
17602
17603 if test $ol_cv_lib_db = no ; then
17604         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17605 echo "configure:17606: checking for Berkeley DB link (-ldb4)" >&5
17606 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17607   echo $ac_n "(cached) $ac_c" 1>&6
17608 else
17609   
17610         ol_DB_LIB=-ldb4
17611         ol_LIBS=$LIBS
17612         LIBS="$ol_DB_LIB $LIBS"
17613
17614         cat > conftest.$ac_ext <<EOF
17615 #line 17616 "configure"
17616 #include "confdefs.h"
17617
17618 #ifdef HAVE_DB_185_H
17619 # include <db_185.h>
17620 #else
17621 # include <db.h>
17622 #endif
17623
17624 #ifndef DB_VERSION_MAJOR
17625 # define DB_VERSION_MAJOR 1
17626 #endif
17627
17628 #ifndef NULL
17629 #define NULL ((void*)0)
17630 #endif
17631
17632 int main() {
17633
17634 #if DB_VERSION_MAJOR > 1
17635         {
17636                 char *version;
17637                 int major, minor, patch;
17638
17639                 version = db_version( &major, &minor, &patch );
17640
17641                 if( major != DB_VERSION_MAJOR ||
17642                         minor < DB_VERSION_MINOR )
17643                 {
17644                         printf("Berkeley DB version mismatch\n"
17645                                 "\texpected: %s\n\tgot: %s\n",
17646                                 DB_VERSION_STRING, version);
17647                         return 1;
17648                 }
17649         }
17650 #endif
17651
17652 #if DB_VERSION_MAJOR > 2
17653         db_env_create( NULL, 0 );
17654 #elif DB_VERSION_MAJOR > 1
17655         db_appexit( NULL );
17656 #else
17657         (void) dbopen( NULL, 0, 0, 0, NULL);
17658 #endif
17659
17660 ; return 0; }
17661 EOF
17662 if { (eval echo configure:17663: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17663   rm -rf conftest*
17664   ol_cv_db_db4=yes
17665 else
17666   echo "configure: failed program was:" >&5
17667   cat conftest.$ac_ext >&5
17668   rm -rf conftest*
17669   ol_cv_db_db4=no
17670 fi
17671 rm -f conftest*
17672
17673         LIBS="$ol_LIBS"
17674
17675 fi
17676
17677 echo "$ac_t""$ol_cv_db_db4" 1>&6
17678
17679         if test $ol_cv_db_db4 = yes ; then
17680                 ol_cv_lib_db=-ldb4
17681         fi
17682 fi
17683
17684 if test $ol_cv_lib_db = no ; then
17685         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17686 echo "configure:17687: checking for Berkeley DB link (-ldb-4)" >&5
17687 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17688   echo $ac_n "(cached) $ac_c" 1>&6
17689 else
17690   
17691         ol_DB_LIB=-ldb-4
17692         ol_LIBS=$LIBS
17693         LIBS="$ol_DB_LIB $LIBS"
17694
17695         cat > conftest.$ac_ext <<EOF
17696 #line 17697 "configure"
17697 #include "confdefs.h"
17698
17699 #ifdef HAVE_DB_185_H
17700 # include <db_185.h>
17701 #else
17702 # include <db.h>
17703 #endif
17704
17705 #ifndef DB_VERSION_MAJOR
17706 # define DB_VERSION_MAJOR 1
17707 #endif
17708
17709 #ifndef NULL
17710 #define NULL ((void*)0)
17711 #endif
17712
17713 int main() {
17714
17715 #if DB_VERSION_MAJOR > 1
17716         {
17717                 char *version;
17718                 int major, minor, patch;
17719
17720                 version = db_version( &major, &minor, &patch );
17721
17722                 if( major != DB_VERSION_MAJOR ||
17723                         minor < DB_VERSION_MINOR )
17724                 {
17725                         printf("Berkeley DB version mismatch\n"
17726                                 "\texpected: %s\n\tgot: %s\n",
17727                                 DB_VERSION_STRING, version);
17728                         return 1;
17729                 }
17730         }
17731 #endif
17732
17733 #if DB_VERSION_MAJOR > 2
17734         db_env_create( NULL, 0 );
17735 #elif DB_VERSION_MAJOR > 1
17736         db_appexit( NULL );
17737 #else
17738         (void) dbopen( NULL, 0, 0, 0, NULL);
17739 #endif
17740
17741 ; return 0; }
17742 EOF
17743 if { (eval echo configure:17744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17744   rm -rf conftest*
17745   ol_cv_db_db_4=yes
17746 else
17747   echo "configure: failed program was:" >&5
17748   cat conftest.$ac_ext >&5
17749   rm -rf conftest*
17750   ol_cv_db_db_4=no
17751 fi
17752 rm -f conftest*
17753
17754         LIBS="$ol_LIBS"
17755
17756 fi
17757
17758 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17759
17760         if test $ol_cv_db_db_4 = yes ; then
17761                 ol_cv_lib_db=-ldb-4
17762         fi
17763 fi
17764
17765 if test $ol_cv_lib_db = no ; then
17766         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17767 echo "configure:17768: checking for Berkeley DB link (-ldb)" >&5
17768 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17769   echo $ac_n "(cached) $ac_c" 1>&6
17770 else
17771   
17772         ol_DB_LIB=-ldb
17773         ol_LIBS=$LIBS
17774         LIBS="$ol_DB_LIB $LIBS"
17775
17776         cat > conftest.$ac_ext <<EOF
17777 #line 17778 "configure"
17778 #include "confdefs.h"
17779
17780 #ifdef HAVE_DB_185_H
17781 # include <db_185.h>
17782 #else
17783 # include <db.h>
17784 #endif
17785
17786 #ifndef DB_VERSION_MAJOR
17787 # define DB_VERSION_MAJOR 1
17788 #endif
17789
17790 #ifndef NULL
17791 #define NULL ((void*)0)
17792 #endif
17793
17794 int main() {
17795
17796 #if DB_VERSION_MAJOR > 1
17797         {
17798                 char *version;
17799                 int major, minor, patch;
17800
17801                 version = db_version( &major, &minor, &patch );
17802
17803                 if( major != DB_VERSION_MAJOR ||
17804                         minor < DB_VERSION_MINOR )
17805                 {
17806                         printf("Berkeley DB version mismatch\n"
17807                                 "\texpected: %s\n\tgot: %s\n",
17808                                 DB_VERSION_STRING, version);
17809                         return 1;
17810                 }
17811         }
17812 #endif
17813
17814 #if DB_VERSION_MAJOR > 2
17815         db_env_create( NULL, 0 );
17816 #elif DB_VERSION_MAJOR > 1
17817         db_appexit( NULL );
17818 #else
17819         (void) dbopen( NULL, 0, 0, 0, NULL);
17820 #endif
17821
17822 ; return 0; }
17823 EOF
17824 if { (eval echo configure:17825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17825   rm -rf conftest*
17826   ol_cv_db_db=yes
17827 else
17828   echo "configure: failed program was:" >&5
17829   cat conftest.$ac_ext >&5
17830   rm -rf conftest*
17831   ol_cv_db_db=no
17832 fi
17833 rm -f conftest*
17834
17835         LIBS="$ol_LIBS"
17836
17837 fi
17838
17839 echo "$ac_t""$ol_cv_db_db" 1>&6
17840
17841         if test $ol_cv_db_db = yes ; then
17842                 ol_cv_lib_db=-ldb
17843         fi
17844 fi
17845
17846 if test $ol_cv_lib_db = no ; then
17847         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17848 echo "configure:17849: checking for Berkeley DB link (-ldb3)" >&5
17849 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17850   echo $ac_n "(cached) $ac_c" 1>&6
17851 else
17852   
17853         ol_DB_LIB=-ldb3
17854         ol_LIBS=$LIBS
17855         LIBS="$ol_DB_LIB $LIBS"
17856
17857         cat > conftest.$ac_ext <<EOF
17858 #line 17859 "configure"
17859 #include "confdefs.h"
17860
17861 #ifdef HAVE_DB_185_H
17862 # include <db_185.h>
17863 #else
17864 # include <db.h>
17865 #endif
17866
17867 #ifndef DB_VERSION_MAJOR
17868 # define DB_VERSION_MAJOR 1
17869 #endif
17870
17871 #ifndef NULL
17872 #define NULL ((void*)0)
17873 #endif
17874
17875 int main() {
17876
17877 #if DB_VERSION_MAJOR > 1
17878         {
17879                 char *version;
17880                 int major, minor, patch;
17881
17882                 version = db_version( &major, &minor, &patch );
17883
17884                 if( major != DB_VERSION_MAJOR ||
17885                         minor < DB_VERSION_MINOR )
17886                 {
17887                         printf("Berkeley DB version mismatch\n"
17888                                 "\texpected: %s\n\tgot: %s\n",
17889                                 DB_VERSION_STRING, version);
17890                         return 1;
17891                 }
17892         }
17893 #endif
17894
17895 #if DB_VERSION_MAJOR > 2
17896         db_env_create( NULL, 0 );
17897 #elif DB_VERSION_MAJOR > 1
17898         db_appexit( NULL );
17899 #else
17900         (void) dbopen( NULL, 0, 0, 0, NULL);
17901 #endif
17902
17903 ; return 0; }
17904 EOF
17905 if { (eval echo configure:17906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17906   rm -rf conftest*
17907   ol_cv_db_db3=yes
17908 else
17909   echo "configure: failed program was:" >&5
17910   cat conftest.$ac_ext >&5
17911   rm -rf conftest*
17912   ol_cv_db_db3=no
17913 fi
17914 rm -f conftest*
17915
17916         LIBS="$ol_LIBS"
17917
17918 fi
17919
17920 echo "$ac_t""$ol_cv_db_db3" 1>&6
17921
17922         if test $ol_cv_db_db3 = yes ; then
17923                 ol_cv_lib_db=-ldb3
17924         fi
17925 fi
17926
17927 if test $ol_cv_lib_db = no ; then
17928         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17929 echo "configure:17930: checking for Berkeley DB link (-ldb-3)" >&5
17930 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17931   echo $ac_n "(cached) $ac_c" 1>&6
17932 else
17933   
17934         ol_DB_LIB=-ldb-3
17935         ol_LIBS=$LIBS
17936         LIBS="$ol_DB_LIB $LIBS"
17937
17938         cat > conftest.$ac_ext <<EOF
17939 #line 17940 "configure"
17940 #include "confdefs.h"
17941
17942 #ifdef HAVE_DB_185_H
17943 # include <db_185.h>
17944 #else
17945 # include <db.h>
17946 #endif
17947
17948 #ifndef DB_VERSION_MAJOR
17949 # define DB_VERSION_MAJOR 1
17950 #endif
17951
17952 #ifndef NULL
17953 #define NULL ((void*)0)
17954 #endif
17955
17956 int main() {
17957
17958 #if DB_VERSION_MAJOR > 1
17959         {
17960                 char *version;
17961                 int major, minor, patch;
17962
17963                 version = db_version( &major, &minor, &patch );
17964
17965                 if( major != DB_VERSION_MAJOR ||
17966                         minor < DB_VERSION_MINOR )
17967                 {
17968                         printf("Berkeley DB version mismatch\n"
17969                                 "\texpected: %s\n\tgot: %s\n",
17970                                 DB_VERSION_STRING, version);
17971                         return 1;
17972                 }
17973         }
17974 #endif
17975
17976 #if DB_VERSION_MAJOR > 2
17977         db_env_create( NULL, 0 );
17978 #elif DB_VERSION_MAJOR > 1
17979         db_appexit( NULL );
17980 #else
17981         (void) dbopen( NULL, 0, 0, 0, NULL);
17982 #endif
17983
17984 ; return 0; }
17985 EOF
17986 if { (eval echo configure:17987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17987   rm -rf conftest*
17988   ol_cv_db_db_3=yes
17989 else
17990   echo "configure: failed program was:" >&5
17991   cat conftest.$ac_ext >&5
17992   rm -rf conftest*
17993   ol_cv_db_db_3=no
17994 fi
17995 rm -f conftest*
17996
17997         LIBS="$ol_LIBS"
17998
17999 fi
18000
18001 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18002
18003         if test $ol_cv_db_db_3 = yes ; then
18004                 ol_cv_lib_db=-ldb-3
18005         fi
18006 fi
18007
18008 if test $ol_cv_lib_db = no ; then
18009         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18010 echo "configure:18011: checking for Berkeley DB link (-ldb2)" >&5
18011 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18012   echo $ac_n "(cached) $ac_c" 1>&6
18013 else
18014   
18015         ol_DB_LIB=-ldb2
18016         ol_LIBS=$LIBS
18017         LIBS="$ol_DB_LIB $LIBS"
18018
18019         cat > conftest.$ac_ext <<EOF
18020 #line 18021 "configure"
18021 #include "confdefs.h"
18022
18023 #ifdef HAVE_DB_185_H
18024 # include <db_185.h>
18025 #else
18026 # include <db.h>
18027 #endif
18028
18029 #ifndef DB_VERSION_MAJOR
18030 # define DB_VERSION_MAJOR 1
18031 #endif
18032
18033 #ifndef NULL
18034 #define NULL ((void*)0)
18035 #endif
18036
18037 int main() {
18038
18039 #if DB_VERSION_MAJOR > 1
18040         {
18041                 char *version;
18042                 int major, minor, patch;
18043
18044                 version = db_version( &major, &minor, &patch );
18045
18046                 if( major != DB_VERSION_MAJOR ||
18047                         minor < DB_VERSION_MINOR )
18048                 {
18049                         printf("Berkeley DB version mismatch\n"
18050                                 "\texpected: %s\n\tgot: %s\n",
18051                                 DB_VERSION_STRING, version);
18052                         return 1;
18053                 }
18054         }
18055 #endif
18056
18057 #if DB_VERSION_MAJOR > 2
18058         db_env_create( NULL, 0 );
18059 #elif DB_VERSION_MAJOR > 1
18060         db_appexit( NULL );
18061 #else
18062         (void) dbopen( NULL, 0, 0, 0, NULL);
18063 #endif
18064
18065 ; return 0; }
18066 EOF
18067 if { (eval echo configure:18068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18068   rm -rf conftest*
18069   ol_cv_db_db2=yes
18070 else
18071   echo "configure: failed program was:" >&5
18072   cat conftest.$ac_ext >&5
18073   rm -rf conftest*
18074   ol_cv_db_db2=no
18075 fi
18076 rm -f conftest*
18077
18078         LIBS="$ol_LIBS"
18079
18080 fi
18081
18082 echo "$ac_t""$ol_cv_db_db2" 1>&6
18083
18084         if test $ol_cv_db_db2 = yes ; then
18085                 ol_cv_lib_db=-ldb2
18086         fi
18087 fi
18088
18089 if test $ol_cv_lib_db = no ; then
18090         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18091 echo "configure:18092: checking for Berkeley DB link (-ldb-2)" >&5
18092 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18093   echo $ac_n "(cached) $ac_c" 1>&6
18094 else
18095   
18096         ol_DB_LIB=-ldb-2
18097         ol_LIBS=$LIBS
18098         LIBS="$ol_DB_LIB $LIBS"
18099
18100         cat > conftest.$ac_ext <<EOF
18101 #line 18102 "configure"
18102 #include "confdefs.h"
18103
18104 #ifdef HAVE_DB_185_H
18105 # include <db_185.h>
18106 #else
18107 # include <db.h>
18108 #endif
18109
18110 #ifndef DB_VERSION_MAJOR
18111 # define DB_VERSION_MAJOR 1
18112 #endif
18113
18114 #ifndef NULL
18115 #define NULL ((void*)0)
18116 #endif
18117
18118 int main() {
18119
18120 #if DB_VERSION_MAJOR > 1
18121         {
18122                 char *version;
18123                 int major, minor, patch;
18124
18125                 version = db_version( &major, &minor, &patch );
18126
18127                 if( major != DB_VERSION_MAJOR ||
18128                         minor < DB_VERSION_MINOR )
18129                 {
18130                         printf("Berkeley DB version mismatch\n"
18131                                 "\texpected: %s\n\tgot: %s\n",
18132                                 DB_VERSION_STRING, version);
18133                         return 1;
18134                 }
18135         }
18136 #endif
18137
18138 #if DB_VERSION_MAJOR > 2
18139         db_env_create( NULL, 0 );
18140 #elif DB_VERSION_MAJOR > 1
18141         db_appexit( NULL );
18142 #else
18143         (void) dbopen( NULL, 0, 0, 0, NULL);
18144 #endif
18145
18146 ; return 0; }
18147 EOF
18148 if { (eval echo configure:18149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18149   rm -rf conftest*
18150   ol_cv_db_db_2=yes
18151 else
18152   echo "configure: failed program was:" >&5
18153   cat conftest.$ac_ext >&5
18154   rm -rf conftest*
18155   ol_cv_db_db_2=no
18156 fi
18157 rm -f conftest*
18158
18159         LIBS="$ol_LIBS"
18160
18161 fi
18162
18163 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18164
18165         if test $ol_cv_db_db_2 = yes ; then
18166                 ol_cv_lib_db=-ldb-2
18167         fi
18168 fi
18169
18170 if test $ol_cv_lib_db = no ; then
18171         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18172 echo "configure:18173: checking for Berkeley DB link (-ldb1)" >&5
18173 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18174   echo $ac_n "(cached) $ac_c" 1>&6
18175 else
18176   
18177         ol_DB_LIB=-ldb1
18178         ol_LIBS=$LIBS
18179         LIBS="$ol_DB_LIB $LIBS"
18180
18181         cat > conftest.$ac_ext <<EOF
18182 #line 18183 "configure"
18183 #include "confdefs.h"
18184
18185 #ifdef HAVE_DB_185_H
18186 # include <db_185.h>
18187 #else
18188 # include <db.h>
18189 #endif
18190
18191 #ifndef DB_VERSION_MAJOR
18192 # define DB_VERSION_MAJOR 1
18193 #endif
18194
18195 #ifndef NULL
18196 #define NULL ((void*)0)
18197 #endif
18198
18199 int main() {
18200
18201 #if DB_VERSION_MAJOR > 1
18202         {
18203                 char *version;
18204                 int major, minor, patch;
18205
18206                 version = db_version( &major, &minor, &patch );
18207
18208                 if( major != DB_VERSION_MAJOR ||
18209                         minor < DB_VERSION_MINOR )
18210                 {
18211                         printf("Berkeley DB version mismatch\n"
18212                                 "\texpected: %s\n\tgot: %s\n",
18213                                 DB_VERSION_STRING, version);
18214                         return 1;
18215                 }
18216         }
18217 #endif
18218
18219 #if DB_VERSION_MAJOR > 2
18220         db_env_create( NULL, 0 );
18221 #elif DB_VERSION_MAJOR > 1
18222         db_appexit( NULL );
18223 #else
18224         (void) dbopen( NULL, 0, 0, 0, NULL);
18225 #endif
18226
18227 ; return 0; }
18228 EOF
18229 if { (eval echo configure:18230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18230   rm -rf conftest*
18231   ol_cv_db_db1=yes
18232 else
18233   echo "configure: failed program was:" >&5
18234   cat conftest.$ac_ext >&5
18235   rm -rf conftest*
18236   ol_cv_db_db1=no
18237 fi
18238 rm -f conftest*
18239
18240         LIBS="$ol_LIBS"
18241
18242 fi
18243
18244 echo "$ac_t""$ol_cv_db_db1" 1>&6
18245
18246         if test $ol_cv_db_db1 = yes ; then
18247                 ol_cv_lib_db=-ldb1
18248         fi
18249 fi
18250
18251 if test $ol_cv_lib_db = no ; then
18252         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18253 echo "configure:18254: checking for Berkeley DB link (-ldb-1)" >&5
18254 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18255   echo $ac_n "(cached) $ac_c" 1>&6
18256 else
18257   
18258         ol_DB_LIB=-ldb-1
18259         ol_LIBS=$LIBS
18260         LIBS="$ol_DB_LIB $LIBS"
18261
18262         cat > conftest.$ac_ext <<EOF
18263 #line 18264 "configure"
18264 #include "confdefs.h"
18265
18266 #ifdef HAVE_DB_185_H
18267 # include <db_185.h>
18268 #else
18269 # include <db.h>
18270 #endif
18271
18272 #ifndef DB_VERSION_MAJOR
18273 # define DB_VERSION_MAJOR 1
18274 #endif
18275
18276 #ifndef NULL
18277 #define NULL ((void*)0)
18278 #endif
18279
18280 int main() {
18281
18282 #if DB_VERSION_MAJOR > 1
18283         {
18284                 char *version;
18285                 int major, minor, patch;
18286
18287                 version = db_version( &major, &minor, &patch );
18288
18289                 if( major != DB_VERSION_MAJOR ||
18290                         minor < DB_VERSION_MINOR )
18291                 {
18292                         printf("Berkeley DB version mismatch\n"
18293                                 "\texpected: %s\n\tgot: %s\n",
18294                                 DB_VERSION_STRING, version);
18295                         return 1;
18296                 }
18297         }
18298 #endif
18299
18300 #if DB_VERSION_MAJOR > 2
18301         db_env_create( NULL, 0 );
18302 #elif DB_VERSION_MAJOR > 1
18303         db_appexit( NULL );
18304 #else
18305         (void) dbopen( NULL, 0, 0, 0, NULL);
18306 #endif
18307
18308 ; return 0; }
18309 EOF
18310 if { (eval echo configure:18311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18311   rm -rf conftest*
18312   ol_cv_db_db_1=yes
18313 else
18314   echo "configure: failed program was:" >&5
18315   cat conftest.$ac_ext >&5
18316   rm -rf conftest*
18317   ol_cv_db_db_1=no
18318 fi
18319 rm -f conftest*
18320
18321         LIBS="$ol_LIBS"
18322
18323 fi
18324
18325 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18326
18327         if test $ol_cv_db_db_1 = yes ; then
18328                 ol_cv_lib_db=-ldb-1
18329         fi
18330 fi
18331
18332
18333         if test "$ol_cv_lib_db" != no ; then
18334                 ol_cv_berkeley_db=yes
18335                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18336 echo "configure:18337: checking for Berkeley DB thread support" >&5
18337 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18338   echo $ac_n "(cached) $ac_c" 1>&6
18339 else
18340   
18341         ol_LIBS="$LIBS"
18342         if test $ol_cv_lib_db != yes ; then
18343                 LIBS="$ol_cv_lib_db"
18344         fi
18345
18346         if test "$cross_compiling" = yes; then
18347   ol_cv_berkeley_db_thread=cross
18348 else
18349   cat > conftest.$ac_ext <<EOF
18350 #line 18351 "configure"
18351 #include "confdefs.h"
18352
18353 #ifdef HAVE_DB_185_H
18354         choke me;
18355 #else
18356 #include <db.h>
18357 #endif
18358 #ifndef NULL
18359 #define NULL ((void *)0)
18360 #endif
18361 main()
18362 {
18363         int rc;
18364         u_int32_t flags = DB_CREATE |
18365 #ifdef DB_PRIVATE
18366                 DB_PRIVATE |
18367 #endif
18368                 DB_THREAD;
18369
18370 #if DB_VERSION_MAJOR > 2
18371         DB_ENV *env = NULL;
18372
18373         rc = db_env_create( &env, 0 );
18374
18375         flags |= DB_INIT_MPOOL;
18376 #ifdef DB_MPOOL_PRIVATE
18377         flags |= DB_MPOOL_PRIVATE;
18378 #endif
18379
18380         if( rc ) {
18381                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18382                 return rc;
18383         }
18384
18385 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18386         rc = env->open( env, NULL, flags, 0 );
18387 #else
18388         rc = env->open( env, NULL, NULL, flags, 0 );
18389 #endif
18390
18391         if ( rc == 0 ) {
18392                 rc = env->close( env, 0 );
18393         }
18394
18395         if( rc ) {
18396                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18397                 return rc;
18398         }
18399
18400 #else
18401         DB_ENV env;
18402         memset( &env, '\0', sizeof(env) );
18403
18404         rc = db_appinit( NULL, NULL, &env, flags );
18405
18406         if( rc == 0 ) {
18407                 db_appexit( &env );
18408         }
18409
18410         unlink("__db_mpool.share");
18411         unlink("__db_lock.share");
18412 #endif
18413
18414         return rc;
18415 }
18416 EOF
18417 if { (eval echo configure:18418: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18418 then
18419   ol_cv_berkeley_db_thread=yes
18420 else
18421   echo "configure: failed program was:" >&5
18422   cat conftest.$ac_ext >&5
18423   rm -fr conftest*
18424   ol_cv_berkeley_db_thread=no
18425 fi
18426 rm -fr conftest*
18427 fi
18428
18429
18430         LIBS="$ol_LIBS"
18431
18432         if test $ol_cv_berkeley_db_thread != no ; then
18433                 cat >> confdefs.h <<\EOF
18434 #define HAVE_BERKELEY_DB_THREAD 1
18435 EOF
18436
18437         fi
18438
18439 fi
18440
18441 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18442         fi
18443 fi
18444
18445         fi
18446
18447         if test $ol_cv_berkeley_db != no ; then
18448                 cat >> confdefs.h <<\EOF
18449 #define HAVE_BERKELEY_DB 1
18450 EOF
18451
18452
18453                 ol_link_ldbm=berkeley
18454                 ol_with_ldbm_api=berkeley
18455
18456                 if test $ol_with_ldbm_type = hash ; then
18457                         cat >> confdefs.h <<\EOF
18458 #define LDBM_USE_DBHASH 1
18459 EOF
18460
18461                 else
18462                         cat >> confdefs.h <<\EOF
18463 #define LDBM_USE_DBBTREE 1
18464 EOF
18465
18466                 fi
18467
18468                                                 if test $ol_cv_lib_db != yes ; then
18469                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18470                 fi
18471         fi
18472 fi
18473
18474 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18475         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18476 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18477         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18478 echo "configure:18479: checking Berkeley DB version for BDB backend" >&5
18479 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18480   echo $ac_n "(cached) $ac_c" 1>&6
18481 else
18482   
18483         cat > conftest.$ac_ext <<EOF
18484 #line 18485 "configure"
18485 #include "confdefs.h"
18486
18487 #include <db.h>
18488
18489  /* this check could be improved */
18490 #ifndef DB_VERSION_MAJOR
18491 #       define DB_VERSION_MAJOR 1
18492 #endif
18493
18494 /* require 4.0 or later */
18495 #if DB_VERSION_MAJOR >= 4 
18496         __db_version_compat
18497 #endif
18498         
18499 EOF
18500 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18501   egrep "__db_version_compat" >/dev/null 2>&1; then
18502   rm -rf conftest*
18503   ol_cv_bdb_compat=yes
18504 else
18505   rm -rf conftest*
18506   ol_cv_bdb_compat=no
18507 fi
18508 rm -f conftest*
18509
18510 fi
18511
18512 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18513
18514
18515         if test $ol_cv_bdb_compat = yes ; then
18516                 ol_enable_bdb=yes
18517         elif test $ol_enable_bdb = yes ; then
18518                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18519         else
18520                 ol_enable_bdb=no
18521         fi
18522 fi
18523
18524 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18525         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18526         ol_with_ldbm_api=none
18527 fi
18528
18529 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18530         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18531 echo "configure:18532: checking for MDBM library" >&5
18532 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18533   echo $ac_n "(cached) $ac_c" 1>&6
18534 else
18535         ol_LIBS="$LIBS"
18536         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18537 echo "configure:18538: checking for mdbm_set_chain" >&5
18538 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18539   echo $ac_n "(cached) $ac_c" 1>&6
18540 else
18541   cat > conftest.$ac_ext <<EOF
18542 #line 18543 "configure"
18543 #include "confdefs.h"
18544 /* System header to define __stub macros and hopefully few prototypes,
18545     which can conflict with char mdbm_set_chain(); below.  */
18546 #include <assert.h>
18547 /* Override any gcc2 internal prototype to avoid an error.  */
18548 /* We use char because int might match the return type of a gcc2
18549     builtin and then its argument prototype would still apply.  */
18550 char mdbm_set_chain();
18551 char (*f)();
18552
18553 int main() {
18554
18555 /* The GNU C library defines this for functions which it implements
18556     to always fail with ENOSYS.  Some functions are actually named
18557     something starting with __ and the normal name is an alias.  */
18558 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18559 choke me
18560 #else
18561 f = mdbm_set_chain;
18562 #endif
18563
18564 ; return 0; }
18565 EOF
18566 if { (eval echo configure:18567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18567   rm -rf conftest*
18568   eval "ac_cv_func_mdbm_set_chain=yes"
18569 else
18570   echo "configure: failed program was:" >&5
18571   cat conftest.$ac_ext >&5
18572   rm -rf conftest*
18573   eval "ac_cv_func_mdbm_set_chain=no"
18574 fi
18575 rm -f conftest*
18576 fi
18577
18578 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18579   echo "$ac_t""yes" 1>&6
18580   ol_cv_lib_mdbm=yes
18581 else
18582   echo "$ac_t""no" 1>&6
18583
18584                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18585 echo "configure:18586: checking for mdbm_set_chain in -lmdbm" >&5
18586 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18587 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18588   echo $ac_n "(cached) $ac_c" 1>&6
18589 else
18590   ac_save_LIBS="$LIBS"
18591 LIBS="-lmdbm  $LIBS"
18592 cat > conftest.$ac_ext <<EOF
18593 #line 18594 "configure"
18594 #include "confdefs.h"
18595 /* Override any gcc2 internal prototype to avoid an error.  */
18596 /* We use char because int might match the return type of a gcc2
18597     builtin and then its argument prototype would still apply.  */
18598 char mdbm_set_chain();
18599
18600 int main() {
18601 mdbm_set_chain()
18602 ; return 0; }
18603 EOF
18604 if { (eval echo configure:18605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18605   rm -rf conftest*
18606   eval "ac_cv_lib_$ac_lib_var=yes"
18607 else
18608   echo "configure: failed program was:" >&5
18609   cat conftest.$ac_ext >&5
18610   rm -rf conftest*
18611   eval "ac_cv_lib_$ac_lib_var=no"
18612 fi
18613 rm -f conftest*
18614 LIBS="$ac_save_LIBS"
18615
18616 fi
18617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18618   echo "$ac_t""yes" 1>&6
18619   ol_cv_lib_mdbm=-lmdbm
18620 else
18621   echo "$ac_t""no" 1>&6
18622 ol_cv_lib_mdbm=no
18623 fi
18624
18625         
18626 fi
18627
18628         LIBS="$ol_LIBS"
18629
18630 fi
18631
18632 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18633
18634
18635  for ac_hdr in mdbm.h
18636 do
18637 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18638 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18639 echo "configure:18640: checking for $ac_hdr" >&5
18640 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18641   echo $ac_n "(cached) $ac_c" 1>&6
18642 else
18643   cat > conftest.$ac_ext <<EOF
18644 #line 18645 "configure"
18645 #include "confdefs.h"
18646 #include <$ac_hdr>
18647 EOF
18648 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18649 { (eval echo configure:18650: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18650 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18651 if test -z "$ac_err"; then
18652   rm -rf conftest*
18653   eval "ac_cv_header_$ac_safe=yes"
18654 else
18655   echo "$ac_err" >&5
18656   echo "configure: failed program was:" >&5
18657   cat conftest.$ac_ext >&5
18658   rm -rf conftest*
18659   eval "ac_cv_header_$ac_safe=no"
18660 fi
18661 rm -f conftest*
18662 fi
18663 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18664   echo "$ac_t""yes" 1>&6
18665     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18666   cat >> confdefs.h <<EOF
18667 #define $ac_tr_hdr 1
18668 EOF
18669  
18670 else
18671   echo "$ac_t""no" 1>&6
18672 fi
18673 done
18674
18675  echo $ac_n "checking for db""... $ac_c" 1>&6
18676 echo "configure:18677: checking for db" >&5
18677 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18678   echo $ac_n "(cached) $ac_c" 1>&6
18679 else
18680   
18681         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18682                 ol_cv_mdbm=no
18683         else
18684                 ol_cv_mdbm=yes
18685         fi
18686
18687 fi
18688
18689 echo "$ac_t""$ol_cv_mdbm" 1>&6
18690  if test $ol_cv_mdbm = yes ; then
18691         cat >> confdefs.h <<\EOF
18692 #define HAVE_MDBM 1
18693 EOF
18694
18695  fi
18696
18697
18698         if test $ol_cv_mdbm = yes ; then
18699                 ol_link_ldbm=mdbm
18700                 ol_with_ldbm_api=mdbm
18701                 if test $ol_cv_lib_mdbm != yes ; then
18702                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18703                 fi
18704         fi
18705 fi
18706
18707 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18708         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18709 echo "configure:18710: checking for GDBM library" >&5
18710 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18711   echo $ac_n "(cached) $ac_c" 1>&6
18712 else
18713         ol_LIBS="$LIBS"
18714         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18715 echo "configure:18716: checking for gdbm_open" >&5
18716 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18717   echo $ac_n "(cached) $ac_c" 1>&6
18718 else
18719   cat > conftest.$ac_ext <<EOF
18720 #line 18721 "configure"
18721 #include "confdefs.h"
18722 /* System header to define __stub macros and hopefully few prototypes,
18723     which can conflict with char gdbm_open(); below.  */
18724 #include <assert.h>
18725 /* Override any gcc2 internal prototype to avoid an error.  */
18726 /* We use char because int might match the return type of a gcc2
18727     builtin and then its argument prototype would still apply.  */
18728 char gdbm_open();
18729 char (*f)();
18730
18731 int main() {
18732
18733 /* The GNU C library defines this for functions which it implements
18734     to always fail with ENOSYS.  Some functions are actually named
18735     something starting with __ and the normal name is an alias.  */
18736 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18737 choke me
18738 #else
18739 f = gdbm_open;
18740 #endif
18741
18742 ; return 0; }
18743 EOF
18744 if { (eval echo configure:18745: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18745   rm -rf conftest*
18746   eval "ac_cv_func_gdbm_open=yes"
18747 else
18748   echo "configure: failed program was:" >&5
18749   cat conftest.$ac_ext >&5
18750   rm -rf conftest*
18751   eval "ac_cv_func_gdbm_open=no"
18752 fi
18753 rm -f conftest*
18754 fi
18755
18756 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18757   echo "$ac_t""yes" 1>&6
18758   ol_cv_lib_gdbm=yes
18759 else
18760   echo "$ac_t""no" 1>&6
18761
18762                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18763 echo "configure:18764: checking for gdbm_open in -lgdbm" >&5
18764 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18765 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18766   echo $ac_n "(cached) $ac_c" 1>&6
18767 else
18768   ac_save_LIBS="$LIBS"
18769 LIBS="-lgdbm  $LIBS"
18770 cat > conftest.$ac_ext <<EOF
18771 #line 18772 "configure"
18772 #include "confdefs.h"
18773 /* Override any gcc2 internal prototype to avoid an error.  */
18774 /* We use char because int might match the return type of a gcc2
18775     builtin and then its argument prototype would still apply.  */
18776 char gdbm_open();
18777
18778 int main() {
18779 gdbm_open()
18780 ; return 0; }
18781 EOF
18782 if { (eval echo configure:18783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18783   rm -rf conftest*
18784   eval "ac_cv_lib_$ac_lib_var=yes"
18785 else
18786   echo "configure: failed program was:" >&5
18787   cat conftest.$ac_ext >&5
18788   rm -rf conftest*
18789   eval "ac_cv_lib_$ac_lib_var=no"
18790 fi
18791 rm -f conftest*
18792 LIBS="$ac_save_LIBS"
18793
18794 fi
18795 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18796   echo "$ac_t""yes" 1>&6
18797   ol_cv_lib_gdbm=-lgdbm
18798 else
18799   echo "$ac_t""no" 1>&6
18800 ol_cv_lib_gdbm=no
18801 fi
18802
18803         
18804 fi
18805
18806         LIBS="$ol_LIBS"
18807
18808 fi
18809
18810 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18811
18812
18813  for ac_hdr in gdbm.h
18814 do
18815 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18816 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18817 echo "configure:18818: checking for $ac_hdr" >&5
18818 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18819   echo $ac_n "(cached) $ac_c" 1>&6
18820 else
18821   cat > conftest.$ac_ext <<EOF
18822 #line 18823 "configure"
18823 #include "confdefs.h"
18824 #include <$ac_hdr>
18825 EOF
18826 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18827 { (eval echo configure:18828: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18828 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18829 if test -z "$ac_err"; then
18830   rm -rf conftest*
18831   eval "ac_cv_header_$ac_safe=yes"
18832 else
18833   echo "$ac_err" >&5
18834   echo "configure: failed program was:" >&5
18835   cat conftest.$ac_ext >&5
18836   rm -rf conftest*
18837   eval "ac_cv_header_$ac_safe=no"
18838 fi
18839 rm -f conftest*
18840 fi
18841 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18842   echo "$ac_t""yes" 1>&6
18843     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18844   cat >> confdefs.h <<EOF
18845 #define $ac_tr_hdr 1
18846 EOF
18847  
18848 else
18849   echo "$ac_t""no" 1>&6
18850 fi
18851 done
18852
18853  echo $ac_n "checking for db""... $ac_c" 1>&6
18854 echo "configure:18855: checking for db" >&5
18855 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18856   echo $ac_n "(cached) $ac_c" 1>&6
18857 else
18858   
18859         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18860                 ol_cv_gdbm=no
18861         else
18862                 ol_cv_gdbm=yes
18863         fi
18864
18865 fi
18866
18867 echo "$ac_t""$ol_cv_gdbm" 1>&6
18868  if test $ol_cv_gdbm = yes ; then
18869         cat >> confdefs.h <<\EOF
18870 #define HAVE_GDBM 1
18871 EOF
18872
18873  fi
18874
18875
18876         if test $ol_cv_gdbm = yes ; then
18877                 ol_link_ldbm=gdbm
18878                 ol_with_ldbm_api=gdbm
18879
18880                 if test $ol_cv_lib_gdbm != yes ; then
18881                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18882                 fi
18883         fi
18884 fi
18885
18886 if test $ol_with_ldbm_api = ndbm ; then
18887         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18888 echo "configure:18889: checking for NDBM library" >&5
18889 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18890   echo $ac_n "(cached) $ac_c" 1>&6
18891 else
18892         ol_LIBS="$LIBS"
18893         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18894 echo "configure:18895: checking for dbm_open" >&5
18895 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18896   echo $ac_n "(cached) $ac_c" 1>&6
18897 else
18898   cat > conftest.$ac_ext <<EOF
18899 #line 18900 "configure"
18900 #include "confdefs.h"
18901 /* System header to define __stub macros and hopefully few prototypes,
18902     which can conflict with char dbm_open(); below.  */
18903 #include <assert.h>
18904 /* Override any gcc2 internal prototype to avoid an error.  */
18905 /* We use char because int might match the return type of a gcc2
18906     builtin and then its argument prototype would still apply.  */
18907 char dbm_open();
18908 char (*f)();
18909
18910 int main() {
18911
18912 /* The GNU C library defines this for functions which it implements
18913     to always fail with ENOSYS.  Some functions are actually named
18914     something starting with __ and the normal name is an alias.  */
18915 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18916 choke me
18917 #else
18918 f = dbm_open;
18919 #endif
18920
18921 ; return 0; }
18922 EOF
18923 if { (eval echo configure:18924: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18924   rm -rf conftest*
18925   eval "ac_cv_func_dbm_open=yes"
18926 else
18927   echo "configure: failed program was:" >&5
18928   cat conftest.$ac_ext >&5
18929   rm -rf conftest*
18930   eval "ac_cv_func_dbm_open=no"
18931 fi
18932 rm -f conftest*
18933 fi
18934
18935 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18936   echo "$ac_t""yes" 1>&6
18937   ol_cv_lib_ndbm=yes
18938 else
18939   echo "$ac_t""no" 1>&6
18940
18941                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18942 echo "configure:18943: checking for dbm_open in -lndbm" >&5
18943 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18944 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18945   echo $ac_n "(cached) $ac_c" 1>&6
18946 else
18947   ac_save_LIBS="$LIBS"
18948 LIBS="-lndbm  $LIBS"
18949 cat > conftest.$ac_ext <<EOF
18950 #line 18951 "configure"
18951 #include "confdefs.h"
18952 /* Override any gcc2 internal prototype to avoid an error.  */
18953 /* We use char because int might match the return type of a gcc2
18954     builtin and then its argument prototype would still apply.  */
18955 char dbm_open();
18956
18957 int main() {
18958 dbm_open()
18959 ; return 0; }
18960 EOF
18961 if { (eval echo configure:18962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18962   rm -rf conftest*
18963   eval "ac_cv_lib_$ac_lib_var=yes"
18964 else
18965   echo "configure: failed program was:" >&5
18966   cat conftest.$ac_ext >&5
18967   rm -rf conftest*
18968   eval "ac_cv_lib_$ac_lib_var=no"
18969 fi
18970 rm -f conftest*
18971 LIBS="$ac_save_LIBS"
18972
18973 fi
18974 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18975   echo "$ac_t""yes" 1>&6
18976   ol_cv_lib_ndbm=-lndbm
18977 else
18978   echo "$ac_t""no" 1>&6
18979
18980                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18981 echo "configure:18982: checking for dbm_open in -ldbm" >&5
18982 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18983 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18984   echo $ac_n "(cached) $ac_c" 1>&6
18985 else
18986   ac_save_LIBS="$LIBS"
18987 LIBS="-ldbm  $LIBS"
18988 cat > conftest.$ac_ext <<EOF
18989 #line 18990 "configure"
18990 #include "confdefs.h"
18991 /* Override any gcc2 internal prototype to avoid an error.  */
18992 /* We use char because int might match the return type of a gcc2
18993     builtin and then its argument prototype would still apply.  */
18994 char dbm_open();
18995
18996 int main() {
18997 dbm_open()
18998 ; return 0; }
18999 EOF
19000 if { (eval echo configure:19001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19001   rm -rf conftest*
19002   eval "ac_cv_lib_$ac_lib_var=yes"
19003 else
19004   echo "configure: failed program was:" >&5
19005   cat conftest.$ac_ext >&5
19006   rm -rf conftest*
19007   eval "ac_cv_lib_$ac_lib_var=no"
19008 fi
19009 rm -f conftest*
19010 LIBS="$ac_save_LIBS"
19011
19012 fi
19013 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19014   echo "$ac_t""yes" 1>&6
19015   ol_cv_lib_ndbm=-ldbm
19016 else
19017   echo "$ac_t""no" 1>&6
19018 ol_cv_lib_ndbm=no
19019 fi
19020                 
19021 fi
19022
19023         
19024 fi
19025
19026         LIBS="$ol_LIBS"
19027
19028 fi
19029
19030 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19031
19032
19033  for ac_hdr in ndbm.h
19034 do
19035 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19036 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19037 echo "configure:19038: checking for $ac_hdr" >&5
19038 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19039   echo $ac_n "(cached) $ac_c" 1>&6
19040 else
19041   cat > conftest.$ac_ext <<EOF
19042 #line 19043 "configure"
19043 #include "confdefs.h"
19044 #include <$ac_hdr>
19045 EOF
19046 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19047 { (eval echo configure:19048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19048 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19049 if test -z "$ac_err"; then
19050   rm -rf conftest*
19051   eval "ac_cv_header_$ac_safe=yes"
19052 else
19053   echo "$ac_err" >&5
19054   echo "configure: failed program was:" >&5
19055   cat conftest.$ac_ext >&5
19056   rm -rf conftest*
19057   eval "ac_cv_header_$ac_safe=no"
19058 fi
19059 rm -f conftest*
19060 fi
19061 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19062   echo "$ac_t""yes" 1>&6
19063     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19064   cat >> confdefs.h <<EOF
19065 #define $ac_tr_hdr 1
19066 EOF
19067  
19068 else
19069   echo "$ac_t""no" 1>&6
19070 fi
19071 done
19072
19073  echo $ac_n "checking for db""... $ac_c" 1>&6
19074 echo "configure:19075: checking for db" >&5
19075 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19076   echo $ac_n "(cached) $ac_c" 1>&6
19077 else
19078   
19079         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19080                 ol_cv_ndbm=no
19081         else
19082                 ol_cv_ndbm=yes
19083         fi
19084
19085 fi
19086
19087 echo "$ac_t""$ol_cv_ndbm" 1>&6
19088  if test $ol_cv_ndbm = yes ; then
19089         cat >> confdefs.h <<\EOF
19090 #define HAVE_NDBM 1
19091 EOF
19092
19093  fi
19094
19095
19096         if test $ol_cv_ndbm = yes ; then
19097                 ol_link_ldbm=ndbm
19098                 ol_with_ldbm_api=ndbm
19099
19100                 if test $ol_cv_lib_ndbm != yes ; then
19101                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19102                 fi
19103         fi
19104 fi
19105
19106 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19107         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19108         if test $ol_enable_ldbm = yes ; then
19109                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19110         fi
19111
19112         echo "configure: warning: disabling LDBM" 1>&2
19113         ol_enable_ldbm=no
19114 fi
19115
19116 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19117         BUILD_LIBS_DYNAMIC=shared
19118         cat >> confdefs.h <<\EOF
19119 #define LDAP_LIBS_DYNAMIC 1
19120 EOF
19121
19122 else
19123         BUILD_LIBS_DYNAMIC=static
19124 fi
19125
19126 if test $ol_enable_wrappers != no ; then
19127         for ac_hdr in tcpd.h
19128 do
19129 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19130 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19131 echo "configure:19132: checking for $ac_hdr" >&5
19132 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19133   echo $ac_n "(cached) $ac_c" 1>&6
19134 else
19135   cat > conftest.$ac_ext <<EOF
19136 #line 19137 "configure"
19137 #include "confdefs.h"
19138 #include <$ac_hdr>
19139 EOF
19140 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19141 { (eval echo configure:19142: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19142 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19143 if test -z "$ac_err"; then
19144   rm -rf conftest*
19145   eval "ac_cv_header_$ac_safe=yes"
19146 else
19147   echo "$ac_err" >&5
19148   echo "configure: failed program was:" >&5
19149   cat conftest.$ac_ext >&5
19150   rm -rf conftest*
19151   eval "ac_cv_header_$ac_safe=no"
19152 fi
19153 rm -f conftest*
19154 fi
19155 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19156   echo "$ac_t""yes" 1>&6
19157     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19158   cat >> confdefs.h <<EOF
19159 #define $ac_tr_hdr 1
19160 EOF
19161  
19162                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19163 echo "configure:19164: checking for TCP wrappers library" >&5
19164                 save_LIBS="$LIBS"
19165                 LIBS="$LIBS -lwrap"
19166                 cat > conftest.$ac_ext <<EOF
19167 #line 19168 "configure"
19168 #include "confdefs.h"
19169
19170 #include <tcpd.h>
19171 int allow_severity = 0;
19172 int deny_severity  = 0;
19173
19174 struct request_info *req;
19175                 
19176 int main() {
19177
19178 hosts_access(req)
19179                 
19180 ; return 0; }
19181 EOF
19182 if { (eval echo configure:19183: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19183   rm -rf conftest*
19184   echo "$ac_t""-lwrap" 1>&6
19185                 have_wrappers=yes
19186                 LIBS="$save_LIBS"
19187 else
19188   echo "configure: failed program was:" >&5
19189   cat conftest.$ac_ext >&5
19190   rm -rf conftest*
19191   
19192                                 LIBS="$LIBS -lnsl"
19193                 cat > conftest.$ac_ext <<EOF
19194 #line 19195 "configure"
19195 #include "confdefs.h"
19196
19197 #include <tcpd.h>
19198 int allow_severity = 0;
19199 int deny_severity  = 0;
19200
19201 struct request_info *req;
19202                 
19203 int main() {
19204
19205 hosts_access(req)
19206                 
19207 ; return 0; }
19208 EOF
19209 if { (eval echo configure:19210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19210   rm -rf conftest*
19211   echo "$ac_t""-lwrap -lnsl" 1>&6
19212                 have_wrappers=yes
19213                 LIBS="$save_LIBS -lnsl"
19214 else
19215   echo "configure: failed program was:" >&5
19216   cat conftest.$ac_ext >&5
19217   rm -rf conftest*
19218   
19219                 echo "$ac_t""no" 1>&6
19220                 have_wrappers=no
19221                 LIBS=$save_LIBS
19222 fi
19223 rm -f conftest*
19224 fi
19225 rm -f conftest*
19226 else
19227   echo "$ac_t""no" 1>&6
19228 have_wrappers=no
19229 fi
19230 done
19231
19232
19233         if test $have_wrappers = yes ; then
19234                 cat >> confdefs.h <<\EOF
19235 #define HAVE_TCPD 1
19236 EOF
19237
19238                 WRAP_LIBS="-lwrap"
19239         elif test $ol_enable_wrappers = yes ; then
19240                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19241         else
19242                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19243                 WRAP_LIBS=""
19244         fi
19245 fi
19246
19247 if test $ol_enable_syslog != no ; then
19248         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19249 echo "configure:19250: checking for openlog" >&5
19250 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19251   echo $ac_n "(cached) $ac_c" 1>&6
19252 else
19253   cat > conftest.$ac_ext <<EOF
19254 #line 19255 "configure"
19255 #include "confdefs.h"
19256 /* System header to define __stub macros and hopefully few prototypes,
19257     which can conflict with char openlog(); below.  */
19258 #include <assert.h>
19259 /* Override any gcc2 internal prototype to avoid an error.  */
19260 /* We use char because int might match the return type of a gcc2
19261     builtin and then its argument prototype would still apply.  */
19262 char openlog();
19263 char (*f)();
19264
19265 int main() {
19266
19267 /* The GNU C library defines this for functions which it implements
19268     to always fail with ENOSYS.  Some functions are actually named
19269     something starting with __ and the normal name is an alias.  */
19270 #if defined (__stub_openlog) || defined (__stub___openlog)
19271 choke me
19272 #else
19273 f = openlog;
19274 #endif
19275
19276 ; return 0; }
19277 EOF
19278 if { (eval echo configure:19279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19279   rm -rf conftest*
19280   eval "ac_cv_func_openlog=yes"
19281 else
19282   echo "configure: failed program was:" >&5
19283   cat conftest.$ac_ext >&5
19284   rm -rf conftest*
19285   eval "ac_cv_func_openlog=no"
19286 fi
19287 rm -f conftest*
19288 fi
19289
19290 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19291   echo "$ac_t""yes" 1>&6
19292   :
19293 else
19294   echo "$ac_t""no" 1>&6
19295 fi
19296
19297         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19298                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19299         fi
19300         ol_enable_syslog=$ac_cv_func_openlog
19301 fi
19302
19303
19304 ol_link_sql=no
19305 if test $ol_enable_sql != no ; then
19306         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19307 echo "configure:19308: checking for SQLDriverConnect in -liodbc" >&5
19308 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19309 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19310   echo $ac_n "(cached) $ac_c" 1>&6
19311 else
19312   ac_save_LIBS="$LIBS"
19313 LIBS="-liodbc  $LIBS"
19314 cat > conftest.$ac_ext <<EOF
19315 #line 19316 "configure"
19316 #include "confdefs.h"
19317 /* Override any gcc2 internal prototype to avoid an error.  */
19318 /* We use char because int might match the return type of a gcc2
19319     builtin and then its argument prototype would still apply.  */
19320 char SQLDriverConnect();
19321
19322 int main() {
19323 SQLDriverConnect()
19324 ; return 0; }
19325 EOF
19326 if { (eval echo configure:19327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19327   rm -rf conftest*
19328   eval "ac_cv_lib_$ac_lib_var=yes"
19329 else
19330   echo "configure: failed program was:" >&5
19331   cat conftest.$ac_ext >&5
19332   rm -rf conftest*
19333   eval "ac_cv_lib_$ac_lib_var=no"
19334 fi
19335 rm -f conftest*
19336 LIBS="$ac_save_LIBS"
19337
19338 fi
19339 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19340   echo "$ac_t""yes" 1>&6
19341   have_iodbc=yes
19342 else
19343   echo "$ac_t""no" 1>&6
19344 have_iodbc=no
19345 fi
19346
19347         if test $have_iodbc = yes ; then
19348                 ol_link_sql="-liodbc"
19349         else
19350                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19351 echo "configure:19352: checking for SQLDriverConnect in -lodbc" >&5
19352 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19353 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19354   echo $ac_n "(cached) $ac_c" 1>&6
19355 else
19356   ac_save_LIBS="$LIBS"
19357 LIBS="-lodbc  $LIBS"
19358 cat > conftest.$ac_ext <<EOF
19359 #line 19360 "configure"
19360 #include "confdefs.h"
19361 /* Override any gcc2 internal prototype to avoid an error.  */
19362 /* We use char because int might match the return type of a gcc2
19363     builtin and then its argument prototype would still apply.  */
19364 char SQLDriverConnect();
19365
19366 int main() {
19367 SQLDriverConnect()
19368 ; return 0; }
19369 EOF
19370 if { (eval echo configure:19371: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19371   rm -rf conftest*
19372   eval "ac_cv_lib_$ac_lib_var=yes"
19373 else
19374   echo "configure: failed program was:" >&5
19375   cat conftest.$ac_ext >&5
19376   rm -rf conftest*
19377   eval "ac_cv_lib_$ac_lib_var=no"
19378 fi
19379 rm -f conftest*
19380 LIBS="$ac_save_LIBS"
19381
19382 fi
19383 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19384   echo "$ac_t""yes" 1>&6
19385   have_odbc=yes
19386 else
19387   echo "$ac_t""no" 1>&6
19388 have_odbc=no
19389 fi
19390
19391                 if test $have_odbc = yes ; then
19392                         ol_link_sql="-lodbc"
19393                 fi
19394         fi
19395
19396         if test $ol_link_sql != no ; then
19397                 SLAPD_SQL_LIBS="$ol_link_sql"
19398
19399         elif test $ol_enable_sql != auto ; then
19400                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19401         fi
19402 fi
19403
19404 ol_link_termcap=no
19405 for ac_hdr in termcap.h ncurses.h
19406 do
19407 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19408 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19409 echo "configure:19410: checking for $ac_hdr" >&5
19410 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19411   echo $ac_n "(cached) $ac_c" 1>&6
19412 else
19413   cat > conftest.$ac_ext <<EOF
19414 #line 19415 "configure"
19415 #include "confdefs.h"
19416 #include <$ac_hdr>
19417 EOF
19418 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19419 { (eval echo configure:19420: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19420 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19421 if test -z "$ac_err"; then
19422   rm -rf conftest*
19423   eval "ac_cv_header_$ac_safe=yes"
19424 else
19425   echo "$ac_err" >&5
19426   echo "configure: failed program was:" >&5
19427   cat conftest.$ac_ext >&5
19428   rm -rf conftest*
19429   eval "ac_cv_header_$ac_safe=no"
19430 fi
19431 rm -f conftest*
19432 fi
19433 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19434   echo "$ac_t""yes" 1>&6
19435     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19436   cat >> confdefs.h <<EOF
19437 #define $ac_tr_hdr 1
19438 EOF
19439  
19440 else
19441   echo "$ac_t""no" 1>&6
19442 fi
19443 done
19444
19445
19446 if test $ol_link_termcap = no ; then
19447         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19448 echo "configure:19449: checking for tputs in -ltermcap" >&5
19449 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19450 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19451   echo $ac_n "(cached) $ac_c" 1>&6
19452 else
19453   ac_save_LIBS="$LIBS"
19454 LIBS="-ltermcap  $LIBS"
19455 cat > conftest.$ac_ext <<EOF
19456 #line 19457 "configure"
19457 #include "confdefs.h"
19458 /* Override any gcc2 internal prototype to avoid an error.  */
19459 /* We use char because int might match the return type of a gcc2
19460     builtin and then its argument prototype would still apply.  */
19461 char tputs();
19462
19463 int main() {
19464 tputs()
19465 ; return 0; }
19466 EOF
19467 if { (eval echo configure:19468: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19468   rm -rf conftest*
19469   eval "ac_cv_lib_$ac_lib_var=yes"
19470 else
19471   echo "configure: failed program was:" >&5
19472   cat conftest.$ac_ext >&5
19473   rm -rf conftest*
19474   eval "ac_cv_lib_$ac_lib_var=no"
19475 fi
19476 rm -f conftest*
19477 LIBS="$ac_save_LIBS"
19478
19479 fi
19480 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19481   echo "$ac_t""yes" 1>&6
19482   have_termcap=yes
19483 else
19484   echo "$ac_t""no" 1>&6
19485 have_termcap=no
19486 fi
19487
19488         if test $have_termcap = yes ; then
19489                 cat >> confdefs.h <<\EOF
19490 #define HAVE_TERMCAP 1
19491 EOF
19492
19493                 ol_link_termcap=yes
19494                 TERMCAP_LIBS=-ltermcap
19495         fi
19496 fi
19497
19498 if test $ol_link_termcap = no ; then
19499         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19500 echo "configure:19501: checking for initscr in -lncurses" >&5
19501 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19502 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19503   echo $ac_n "(cached) $ac_c" 1>&6
19504 else
19505   ac_save_LIBS="$LIBS"
19506 LIBS="-lncurses  $LIBS"
19507 cat > conftest.$ac_ext <<EOF
19508 #line 19509 "configure"
19509 #include "confdefs.h"
19510 /* Override any gcc2 internal prototype to avoid an error.  */
19511 /* We use char because int might match the return type of a gcc2
19512     builtin and then its argument prototype would still apply.  */
19513 char initscr();
19514
19515 int main() {
19516 initscr()
19517 ; return 0; }
19518 EOF
19519 if { (eval echo configure:19520: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19520   rm -rf conftest*
19521   eval "ac_cv_lib_$ac_lib_var=yes"
19522 else
19523   echo "configure: failed program was:" >&5
19524   cat conftest.$ac_ext >&5
19525   rm -rf conftest*
19526   eval "ac_cv_lib_$ac_lib_var=no"
19527 fi
19528 rm -f conftest*
19529 LIBS="$ac_save_LIBS"
19530
19531 fi
19532 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19533   echo "$ac_t""yes" 1>&6
19534   have_ncurses=yes
19535 else
19536   echo "$ac_t""no" 1>&6
19537 have_ncurses=no
19538 fi
19539
19540         if test $have_ncurses = yes ; then
19541                 cat >> confdefs.h <<\EOF
19542 #define HAVE_NCURSES 1
19543 EOF
19544
19545                 ol_link_termcap=yes
19546                 TERMCAP_LIBS=-lncurses
19547         fi
19548 fi
19549
19550 if test $ol_link_termcap = no ; then
19551         cat >> confdefs.h <<\EOF
19552 #define NO_TERMCAP 1
19553 EOF
19554
19555         TERMCAP_LIBS=
19556 fi
19557
19558 ol_link_sasl=no
19559 ol_link_spasswd=no
19560 if test $ol_with_cyrus_sasl != no ; then
19561         for ac_hdr in sasl/sasl.h sasl.h
19562 do
19563 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19564 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19565 echo "configure:19566: checking for $ac_hdr" >&5
19566 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19567   echo $ac_n "(cached) $ac_c" 1>&6
19568 else
19569   cat > conftest.$ac_ext <<EOF
19570 #line 19571 "configure"
19571 #include "confdefs.h"
19572 #include <$ac_hdr>
19573 EOF
19574 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19575 { (eval echo configure:19576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19576 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19577 if test -z "$ac_err"; then
19578   rm -rf conftest*
19579   eval "ac_cv_header_$ac_safe=yes"
19580 else
19581   echo "$ac_err" >&5
19582   echo "configure: failed program was:" >&5
19583   cat conftest.$ac_ext >&5
19584   rm -rf conftest*
19585   eval "ac_cv_header_$ac_safe=no"
19586 fi
19587 rm -f conftest*
19588 fi
19589 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19590   echo "$ac_t""yes" 1>&6
19591     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19592   cat >> confdefs.h <<EOF
19593 #define $ac_tr_hdr 1
19594 EOF
19595  
19596 else
19597   echo "$ac_t""no" 1>&6
19598 fi
19599 done
19600
19601
19602         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19603                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19604 echo "configure:19605: checking for sasl_client_init in -lsasl2" >&5
19605 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19606 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19607   echo $ac_n "(cached) $ac_c" 1>&6
19608 else
19609   ac_save_LIBS="$LIBS"
19610 LIBS="-lsasl2  $LIBS"
19611 cat > conftest.$ac_ext <<EOF
19612 #line 19613 "configure"
19613 #include "confdefs.h"
19614 /* Override any gcc2 internal prototype to avoid an error.  */
19615 /* We use char because int might match the return type of a gcc2
19616     builtin and then its argument prototype would still apply.  */
19617 char sasl_client_init();
19618
19619 int main() {
19620 sasl_client_init()
19621 ; return 0; }
19622 EOF
19623 if { (eval echo configure:19624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19624   rm -rf conftest*
19625   eval "ac_cv_lib_$ac_lib_var=yes"
19626 else
19627   echo "configure: failed program was:" >&5
19628   cat conftest.$ac_ext >&5
19629   rm -rf conftest*
19630   eval "ac_cv_lib_$ac_lib_var=no"
19631 fi
19632 rm -f conftest*
19633 LIBS="$ac_save_LIBS"
19634
19635 fi
19636 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19637   echo "$ac_t""yes" 1>&6
19638   ol_link_sasl="-lsasl2"
19639 else
19640   echo "$ac_t""no" 1>&6
19641 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19642 echo "configure:19643: checking for sasl_client_init in -lsasl" >&5
19643 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19644 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19645   echo $ac_n "(cached) $ac_c" 1>&6
19646 else
19647   ac_save_LIBS="$LIBS"
19648 LIBS="-lsasl  $LIBS"
19649 cat > conftest.$ac_ext <<EOF
19650 #line 19651 "configure"
19651 #include "confdefs.h"
19652 /* Override any gcc2 internal prototype to avoid an error.  */
19653 /* We use char because int might match the return type of a gcc2
19654     builtin and then its argument prototype would still apply.  */
19655 char sasl_client_init();
19656
19657 int main() {
19658 sasl_client_init()
19659 ; return 0; }
19660 EOF
19661 if { (eval echo configure:19662: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19662   rm -rf conftest*
19663   eval "ac_cv_lib_$ac_lib_var=yes"
19664 else
19665   echo "configure: failed program was:" >&5
19666   cat conftest.$ac_ext >&5
19667   rm -rf conftest*
19668   eval "ac_cv_lib_$ac_lib_var=no"
19669 fi
19670 rm -f conftest*
19671 LIBS="$ac_save_LIBS"
19672
19673 fi
19674 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19675   echo "$ac_t""yes" 1>&6
19676   ol_link_sasl="-lsasl"
19677 else
19678   echo "$ac_t""no" 1>&6
19679 fi
19680
19681 fi
19682
19683         fi
19684
19685         if test $ol_link_sasl = no ; then
19686                 if test $ol_with_cyrus_sasl != auto ; then
19687                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19688                 else
19689                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19690                         echo "configure: warning: SASL authentication not supported!" 1>&2
19691                         if test $ol_link_tls = no ; then
19692                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19693                         fi
19694                 fi
19695         else
19696                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
19697 echo "configure:19698: checking Cyrus SASL library version" >&5
19698 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
19699   echo $ac_n "(cached) $ac_c" 1>&6
19700 else
19701   
19702         cat > conftest.$ac_ext <<EOF
19703 #line 19704 "configure"
19704 #include "confdefs.h"
19705
19706 #ifdef HAVE_SASL_SASL_H
19707 #include <sasl/sasl.h>
19708 #else
19709 #include <sasl.h>
19710 #endif
19711
19712 /* require 2.1.3 or later */
19713 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
19714         char *__sasl_compat = "1.5.x okay";
19715 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
19716         __sasl_compat "2.2+ or better okay (we guess)";
19717 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
19718         && SASL_VERSION_STEP >=3
19719         __sasl_compat = "2.1.3+ or better okay";
19720 #endif
19721         
19722 EOF
19723 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19724   egrep "__sasl_compat" >/dev/null 2>&1; then
19725   rm -rf conftest*
19726   ol_cv_sasl_compat=yes
19727 else
19728   rm -rf conftest*
19729   ol_cv_sasl_compat=no
19730 fi
19731 rm -f conftest*
19732
19733 fi
19734
19735 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
19736
19737                 if test $ol_cv_sasl_compat = no ; then
19738                         ol_link_sasl=no
19739                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
19740                 fi
19741
19742                 cat >> confdefs.h <<\EOF
19743 #define HAVE_CYRUS_SASL 1
19744 EOF
19745
19746                 SASL_LIBS="$ol_link_sasl"
19747                 if test $ol_enable_spasswd != no ; then
19748                         ol_link_spasswd=yes
19749                 fi
19750
19751                 ac_save_LIBS="$LIBS"
19752                 LIBS="$LIBS $ol_link_sasl"
19753                 echo $ac_n "checking for sasl_version""... $ac_c" 1>&6
19754 echo "configure:19755: checking for sasl_version" >&5
19755 if eval "test \"\${ac_cv_func_sasl_version+set}\" = set"; then
19756   echo $ac_n "(cached) $ac_c" 1>&6
19757 else
19758   cat > conftest.$ac_ext <<EOF
19759 #line 19760 "configure"
19760 #include "confdefs.h"
19761 /* System header to define __stub macros and hopefully few prototypes,
19762     which can conflict with char sasl_version(); below.  */
19763 #include <assert.h>
19764 /* Override any gcc2 internal prototype to avoid an error.  */
19765 /* We use char because int might match the return type of a gcc2
19766     builtin and then its argument prototype would still apply.  */
19767 char sasl_version();
19768 char (*f)();
19769
19770 int main() {
19771
19772 /* The GNU C library defines this for functions which it implements
19773     to always fail with ENOSYS.  Some functions are actually named
19774     something starting with __ and the normal name is an alias.  */
19775 #if defined (__stub_sasl_version) || defined (__stub___sasl_version)
19776 choke me
19777 #else
19778 f = sasl_version;
19779 #endif
19780
19781 ; return 0; }
19782 EOF
19783 if { (eval echo configure:19784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19784   rm -rf conftest*
19785   eval "ac_cv_func_sasl_version=yes"
19786 else
19787   echo "configure: failed program was:" >&5
19788   cat conftest.$ac_ext >&5
19789   rm -rf conftest*
19790   eval "ac_cv_func_sasl_version=no"
19791 fi
19792 rm -f conftest*
19793 fi
19794
19795 if eval "test \"`echo '$ac_cv_func_'sasl_version`\" = yes"; then
19796   echo "$ac_t""yes" 1>&6
19797   cat >> confdefs.h <<\EOF
19798 #define HAVE_SASL_VERSION 1
19799 EOF
19800
19801 else
19802   echo "$ac_t""no" 1>&6
19803 fi
19804
19805                 LIBS="$ac_save_LIBS"
19806         fi
19807
19808 else
19809         echo "configure: warning: SASL authentication not supported!" 1>&2
19810         if test $ol_link_tls = no ; then
19811                 echo "configure: warning: Strong authentication not supported!" 1>&2
19812         fi
19813 fi
19814
19815 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19816         dev=no
19817         if test -r /dev/urandom ; then
19818                 dev="/dev/urandom";
19819         elif test -r /idev/urandom ; then
19820                 dev="/idev/urandom";
19821         elif test -r /dev/srandom ; then
19822                 dev="/dev/srandom";
19823         elif test -r /dev/random ; then
19824                 dev="/dev/random";
19825         elif test -r /idev/random ; then
19826                 dev="/idev/random";
19827         fi
19828
19829         if test $dev != no ; then
19830                 cat >> confdefs.h <<EOF
19831 #define URANDOM_DEVICE "$dev"
19832 EOF
19833
19834         fi
19835 fi
19836
19837 ol_link_fetch=no
19838 if test $ol_with_fetch != no ; then
19839         ol_LIBS=$LIBS
19840 LIBS="-lfetch -lcom_err $LIBS"
19841 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19842 echo "configure:19843: checking fetch(3) library" >&5
19843 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19844   echo $ac_n "(cached) $ac_c" 1>&6
19845 else
19846   
19847         cat > conftest.$ac_ext <<EOF
19848 #line 19849 "configure"
19849 #include "confdefs.h"
19850
19851 #include <sys/param.h>
19852 #include <stdio.h>
19853 #include <fetch.h>
19854 int main() {
19855 struct url *u = fetchParseURL("file:///"); 
19856 ; return 0; }
19857 EOF
19858 if { (eval echo configure:19859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19859   rm -rf conftest*
19860   ol_cv_lib_fetch=yes
19861 else
19862   echo "configure: failed program was:" >&5
19863   cat conftest.$ac_ext >&5
19864   rm -rf conftest*
19865   ol_cv_lib_fetch=no
19866 fi
19867 rm -f conftest*
19868 fi
19869
19870 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19871 LIBS=$ol_LIBS
19872 if test $ol_cv_lib_fetch != no ; then
19873         ol_link_fetch="-lfetch -lcom_err"
19874         cat >> confdefs.h <<\EOF
19875 #define HAVE_FETCH 1
19876 EOF
19877
19878 fi
19879
19880
19881         if test $ol_cv_lib_fetch != no ; then
19882                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19883                 ol_link_fetch=freebsd
19884
19885         elif test $ol_with_fetch != auto ; then
19886                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19887         fi 
19888 fi
19889
19890 ol_link_readline=no
19891 if test $ol_with_readline != no ; then
19892         for ac_hdr in readline/readline.h readline/history.h
19893 do
19894 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19895 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19896 echo "configure:19897: checking for $ac_hdr" >&5
19897 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19898   echo $ac_n "(cached) $ac_c" 1>&6
19899 else
19900   cat > conftest.$ac_ext <<EOF
19901 #line 19902 "configure"
19902 #include "confdefs.h"
19903 #include <$ac_hdr>
19904 EOF
19905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19906 { (eval echo configure:19907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19908 if test -z "$ac_err"; then
19909   rm -rf conftest*
19910   eval "ac_cv_header_$ac_safe=yes"
19911 else
19912   echo "$ac_err" >&5
19913   echo "configure: failed program was:" >&5
19914   cat conftest.$ac_ext >&5
19915   rm -rf conftest*
19916   eval "ac_cv_header_$ac_safe=no"
19917 fi
19918 rm -f conftest*
19919 fi
19920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19921   echo "$ac_t""yes" 1>&6
19922     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19923   cat >> confdefs.h <<EOF
19924 #define $ac_tr_hdr 1
19925 EOF
19926  
19927 else
19928   echo "$ac_t""no" 1>&6
19929 fi
19930 done
19931
19932
19933         if test $ac_cv_header_readline_readline_h = yes ; then
19934                 save_LIBS="$LIBS"
19935                 LIBS="$TERMCAP_LIBS $LIBS"
19936                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
19937 echo "configure:19938: checking for readline in -lreadline" >&5
19938 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
19939 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19940   echo $ac_n "(cached) $ac_c" 1>&6
19941 else
19942   ac_save_LIBS="$LIBS"
19943 LIBS="-lreadline  $LIBS"
19944 cat > conftest.$ac_ext <<EOF
19945 #line 19946 "configure"
19946 #include "confdefs.h"
19947 /* Override any gcc2 internal prototype to avoid an error.  */
19948 /* We use char because int might match the return type of a gcc2
19949     builtin and then its argument prototype would still apply.  */
19950 char readline();
19951
19952 int main() {
19953 readline()
19954 ; return 0; }
19955 EOF
19956 if { (eval echo configure:19957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19957   rm -rf conftest*
19958   eval "ac_cv_lib_$ac_lib_var=yes"
19959 else
19960   echo "configure: failed program was:" >&5
19961   cat conftest.$ac_ext >&5
19962   rm -rf conftest*
19963   eval "ac_cv_lib_$ac_lib_var=no"
19964 fi
19965 rm -f conftest*
19966 LIBS="$ac_save_LIBS"
19967
19968 fi
19969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19970   echo "$ac_t""yes" 1>&6
19971   have_readline=yes
19972 else
19973   echo "$ac_t""no" 1>&6
19974 have_readline=no
19975 fi
19976
19977                 LIBS="$save_LIBS"
19978                         
19979                 if test $have_readline = yes ; then
19980                         ol_with_readline=found
19981                         ol_link_readline=yes
19982
19983                         READLINE_LIBS="-lreadline"
19984                 fi
19985         fi
19986 fi
19987
19988 if test $ol_link_readline = yes ; then
19989         cat >> confdefs.h <<\EOF
19990 #define HAVE_READLINE 1
19991 EOF
19992
19993 fi
19994
19995
19996 if test $ol_enable_crypt != no ; then
19997         echo $ac_n "checking for crypt""... $ac_c" 1>&6
19998 echo "configure:19999: checking for crypt" >&5
19999 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20000   echo $ac_n "(cached) $ac_c" 1>&6
20001 else
20002   cat > conftest.$ac_ext <<EOF
20003 #line 20004 "configure"
20004 #include "confdefs.h"
20005 /* System header to define __stub macros and hopefully few prototypes,
20006     which can conflict with char crypt(); below.  */
20007 #include <assert.h>
20008 /* Override any gcc2 internal prototype to avoid an error.  */
20009 /* We use char because int might match the return type of a gcc2
20010     builtin and then its argument prototype would still apply.  */
20011 char crypt();
20012 char (*f)();
20013
20014 int main() {
20015
20016 /* The GNU C library defines this for functions which it implements
20017     to always fail with ENOSYS.  Some functions are actually named
20018     something starting with __ and the normal name is an alias.  */
20019 #if defined (__stub_crypt) || defined (__stub___crypt)
20020 choke me
20021 #else
20022 f = crypt;
20023 #endif
20024
20025 ; return 0; }
20026 EOF
20027 if { (eval echo configure:20028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20028   rm -rf conftest*
20029   eval "ac_cv_func_crypt=yes"
20030 else
20031   echo "configure: failed program was:" >&5
20032   cat conftest.$ac_ext >&5
20033   rm -rf conftest*
20034   eval "ac_cv_func_crypt=no"
20035 fi
20036 rm -f conftest*
20037 fi
20038
20039 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20040   echo "$ac_t""yes" 1>&6
20041   have_crypt=yes
20042 else
20043   echo "$ac_t""no" 1>&6
20044
20045                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20046 echo "configure:20047: checking for crypt in -lcrypt" >&5
20047 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20048 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20049   echo $ac_n "(cached) $ac_c" 1>&6
20050 else
20051   ac_save_LIBS="$LIBS"
20052 LIBS="-lcrypt  $LIBS"
20053 cat > conftest.$ac_ext <<EOF
20054 #line 20055 "configure"
20055 #include "confdefs.h"
20056 /* Override any gcc2 internal prototype to avoid an error.  */
20057 /* We use char because int might match the return type of a gcc2
20058     builtin and then its argument prototype would still apply.  */
20059 char crypt();
20060
20061 int main() {
20062 crypt()
20063 ; return 0; }
20064 EOF
20065 if { (eval echo configure:20066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20066   rm -rf conftest*
20067   eval "ac_cv_lib_$ac_lib_var=yes"
20068 else
20069   echo "configure: failed program was:" >&5
20070   cat conftest.$ac_ext >&5
20071   rm -rf conftest*
20072   eval "ac_cv_lib_$ac_lib_var=no"
20073 fi
20074 rm -f conftest*
20075 LIBS="$ac_save_LIBS"
20076
20077 fi
20078 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20079   echo "$ac_t""yes" 1>&6
20080   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20081                         have_crypt=yes
20082 else
20083   echo "$ac_t""no" 1>&6
20084 have_crypt=no
20085 fi
20086
20087 fi
20088
20089
20090         if test $have_crypt = yes ; then
20091                 cat >> confdefs.h <<\EOF
20092 #define HAVE_CRYPT 1
20093 EOF
20094
20095         else
20096                 echo "configure: warning: could not find crypt" 1>&2
20097                 if test $ol_enable_crypt = yes ; then
20098                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20099                 fi
20100
20101                 echo "configure: warning: disabling crypt support" 1>&2
20102                 ol_enable_crypt=no
20103         fi
20104 fi
20105
20106 if test $ol_enable_proctitle != no ; then
20107         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20108 echo "configure:20109: checking for setproctitle" >&5
20109 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20110   echo $ac_n "(cached) $ac_c" 1>&6
20111 else
20112   cat > conftest.$ac_ext <<EOF
20113 #line 20114 "configure"
20114 #include "confdefs.h"
20115 /* System header to define __stub macros and hopefully few prototypes,
20116     which can conflict with char setproctitle(); below.  */
20117 #include <assert.h>
20118 /* Override any gcc2 internal prototype to avoid an error.  */
20119 /* We use char because int might match the return type of a gcc2
20120     builtin and then its argument prototype would still apply.  */
20121 char setproctitle();
20122 char (*f)();
20123
20124 int main() {
20125
20126 /* The GNU C library defines this for functions which it implements
20127     to always fail with ENOSYS.  Some functions are actually named
20128     something starting with __ and the normal name is an alias.  */
20129 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20130 choke me
20131 #else
20132 f = setproctitle;
20133 #endif
20134
20135 ; return 0; }
20136 EOF
20137 if { (eval echo configure:20138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20138   rm -rf conftest*
20139   eval "ac_cv_func_setproctitle=yes"
20140 else
20141   echo "configure: failed program was:" >&5
20142   cat conftest.$ac_ext >&5
20143   rm -rf conftest*
20144   eval "ac_cv_func_setproctitle=no"
20145 fi
20146 rm -f conftest*
20147 fi
20148
20149 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20150   echo "$ac_t""yes" 1>&6
20151   have_setproctitle=yes
20152 else
20153   echo "$ac_t""no" 1>&6
20154
20155                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20156 echo "configure:20157: checking for setproctitle in -lutil" >&5
20157 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20158 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20159   echo $ac_n "(cached) $ac_c" 1>&6
20160 else
20161   ac_save_LIBS="$LIBS"
20162 LIBS="-lutil  $LIBS"
20163 cat > conftest.$ac_ext <<EOF
20164 #line 20165 "configure"
20165 #include "confdefs.h"
20166 /* Override any gcc2 internal prototype to avoid an error.  */
20167 /* We use char because int might match the return type of a gcc2
20168     builtin and then its argument prototype would still apply.  */
20169 char setproctitle();
20170
20171 int main() {
20172 setproctitle()
20173 ; return 0; }
20174 EOF
20175 if { (eval echo configure:20176: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20176   rm -rf conftest*
20177   eval "ac_cv_lib_$ac_lib_var=yes"
20178 else
20179   echo "configure: failed program was:" >&5
20180   cat conftest.$ac_ext >&5
20181   rm -rf conftest*
20182   eval "ac_cv_lib_$ac_lib_var=no"
20183 fi
20184 rm -f conftest*
20185 LIBS="$ac_save_LIBS"
20186
20187 fi
20188 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20189   echo "$ac_t""yes" 1>&6
20190   have_setproctitle=yes
20191                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20192 else
20193   echo "$ac_t""no" 1>&6
20194 have_setproctitle=no
20195                         LIBOBJS="$LIBOBJS setproctitle.o"
20196                         LIBSRCS="$LIBSRCS setproctitle.c"
20197 fi
20198
20199 fi
20200
20201
20202         if test $have_setproctitle = yes ; then
20203                 cat >> confdefs.h <<\EOF
20204 #define HAVE_SETPROCTITLE 1
20205 EOF
20206
20207         fi
20208 fi
20209
20210 if test $ol_enable_slp != no ; then
20211         for ac_hdr in slp.h 
20212 do
20213 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20214 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20215 echo "configure:20216: checking for $ac_hdr" >&5
20216 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20217   echo $ac_n "(cached) $ac_c" 1>&6
20218 else
20219   cat > conftest.$ac_ext <<EOF
20220 #line 20221 "configure"
20221 #include "confdefs.h"
20222 #include <$ac_hdr>
20223 EOF
20224 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20225 { (eval echo configure:20226: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20226 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20227 if test -z "$ac_err"; then
20228   rm -rf conftest*
20229   eval "ac_cv_header_$ac_safe=yes"
20230 else
20231   echo "$ac_err" >&5
20232   echo "configure: failed program was:" >&5
20233   cat conftest.$ac_ext >&5
20234   rm -rf conftest*
20235   eval "ac_cv_header_$ac_safe=no"
20236 fi
20237 rm -f conftest*
20238 fi
20239 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20240   echo "$ac_t""yes" 1>&6
20241     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20242   cat >> confdefs.h <<EOF
20243 #define $ac_tr_hdr 1
20244 EOF
20245  
20246 else
20247   echo "$ac_t""no" 1>&6
20248 fi
20249 done
20250
20251
20252         if test $ac_cv_header_slp_h = yes ; then
20253                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20254 echo "configure:20255: checking for SLPOpen in -lslp" >&5
20255 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20256 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20257   echo $ac_n "(cached) $ac_c" 1>&6
20258 else
20259   ac_save_LIBS="$LIBS"
20260 LIBS="-lslp  $LIBS"
20261 cat > conftest.$ac_ext <<EOF
20262 #line 20263 "configure"
20263 #include "confdefs.h"
20264 /* Override any gcc2 internal prototype to avoid an error.  */
20265 /* We use char because int might match the return type of a gcc2
20266     builtin and then its argument prototype would still apply.  */
20267 char SLPOpen();
20268
20269 int main() {
20270 SLPOpen()
20271 ; return 0; }
20272 EOF
20273 if { (eval echo configure:20274: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20274   rm -rf conftest*
20275   eval "ac_cv_lib_$ac_lib_var=yes"
20276 else
20277   echo "configure: failed program was:" >&5
20278   cat conftest.$ac_ext >&5
20279   rm -rf conftest*
20280   eval "ac_cv_lib_$ac_lib_var=no"
20281 fi
20282 rm -f conftest*
20283 LIBS="$ac_save_LIBS"
20284
20285 fi
20286 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20287   echo "$ac_t""yes" 1>&6
20288   have_slp=yes
20289 else
20290   echo "$ac_t""no" 1>&6
20291 have_slp=no
20292 fi
20293
20294                 if test $have_slp = yes ; then
20295                         cat >> confdefs.h <<\EOF
20296 #define HAVE_SLP 1
20297 EOF
20298
20299                         SLAPD_SLP_LIBS=-lslp
20300                 fi
20301
20302         elif test $ol_enable_slp = yes ; then
20303                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20304         fi
20305 fi
20306
20307 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20308 echo "configure:20309: checking for ANSI C header files" >&5
20309 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20310   echo $ac_n "(cached) $ac_c" 1>&6
20311 else
20312   cat > conftest.$ac_ext <<EOF
20313 #line 20314 "configure"
20314 #include "confdefs.h"
20315 #include <stdlib.h>
20316 #include <stdarg.h>
20317 #include <string.h>
20318 #include <float.h>
20319 EOF
20320 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20321 { (eval echo configure:20322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20322 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20323 if test -z "$ac_err"; then
20324   rm -rf conftest*
20325   ac_cv_header_stdc=yes
20326 else
20327   echo "$ac_err" >&5
20328   echo "configure: failed program was:" >&5
20329   cat conftest.$ac_ext >&5
20330   rm -rf conftest*
20331   ac_cv_header_stdc=no
20332 fi
20333 rm -f conftest*
20334
20335 if test $ac_cv_header_stdc = yes; then
20336   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20337 cat > conftest.$ac_ext <<EOF
20338 #line 20339 "configure"
20339 #include "confdefs.h"
20340 #include <string.h>
20341 EOF
20342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20343   egrep "memchr" >/dev/null 2>&1; then
20344   :
20345 else
20346   rm -rf conftest*
20347   ac_cv_header_stdc=no
20348 fi
20349 rm -f conftest*
20350
20351 fi
20352
20353 if test $ac_cv_header_stdc = yes; then
20354   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20355 cat > conftest.$ac_ext <<EOF
20356 #line 20357 "configure"
20357 #include "confdefs.h"
20358 #include <stdlib.h>
20359 EOF
20360 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20361   egrep "free" >/dev/null 2>&1; then
20362   :
20363 else
20364   rm -rf conftest*
20365   ac_cv_header_stdc=no
20366 fi
20367 rm -f conftest*
20368
20369 fi
20370
20371 if test $ac_cv_header_stdc = yes; then
20372   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20373 if test "$cross_compiling" = yes; then
20374   :
20375 else
20376   cat > conftest.$ac_ext <<EOF
20377 #line 20378 "configure"
20378 #include "confdefs.h"
20379 #include <ctype.h>
20380 #if ((' ' & 0x0FF) == 0x020)
20381 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20382 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20383 #else
20384 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20385  || ('j' <= (c) && (c) <= 'r') \
20386  || ('s' <= (c) && (c) <= 'z'))
20387 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20388 #endif
20389 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20390 int main () { int i; for (i = 0; i < 256; i++)
20391 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20392 exit (0); }
20393
20394 EOF
20395 if { (eval echo configure:20396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20396 then
20397   :
20398 else
20399   echo "configure: failed program was:" >&5
20400   cat conftest.$ac_ext >&5
20401   rm -fr conftest*
20402   ac_cv_header_stdc=no
20403 fi
20404 rm -fr conftest*
20405 fi
20406
20407 fi
20408 fi
20409
20410 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20411 if test $ac_cv_header_stdc = yes; then
20412   cat >> confdefs.h <<\EOF
20413 #define STDC_HEADERS 1
20414 EOF
20415
20416 fi
20417
20418 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20419 echo "configure:20420: checking for mode_t" >&5
20420 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20421   echo $ac_n "(cached) $ac_c" 1>&6
20422 else
20423   cat > conftest.$ac_ext <<EOF
20424 #line 20425 "configure"
20425 #include "confdefs.h"
20426 #include <sys/types.h>
20427 #if STDC_HEADERS
20428 #include <stdlib.h>
20429 #include <stddef.h>
20430 #endif
20431
20432 EOF
20433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20434   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20435   rm -rf conftest*
20436   eval "ac_cv_type_mode_t=yes"
20437 else
20438   rm -rf conftest*
20439   eval "ac_cv_type_mode_t=no"
20440 fi
20441 rm -f conftest*
20442
20443 fi
20444 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20445   echo "$ac_t""yes" 1>&6
20446 else
20447   echo "$ac_t""no" 1>&6
20448   cat >> confdefs.h <<EOF
20449 #define mode_t int
20450 EOF
20451
20452 fi
20453
20454 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20455 echo "configure:20456: checking for off_t" >&5
20456 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20457   echo $ac_n "(cached) $ac_c" 1>&6
20458 else
20459   cat > conftest.$ac_ext <<EOF
20460 #line 20461 "configure"
20461 #include "confdefs.h"
20462 #include <sys/types.h>
20463 #if STDC_HEADERS
20464 #include <stdlib.h>
20465 #include <stddef.h>
20466 #endif
20467
20468 EOF
20469 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20470   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20471   rm -rf conftest*
20472   eval "ac_cv_type_off_t=yes"
20473 else
20474   rm -rf conftest*
20475   eval "ac_cv_type_off_t=no"
20476 fi
20477 rm -f conftest*
20478
20479 fi
20480 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20481   echo "$ac_t""yes" 1>&6
20482 else
20483   echo "$ac_t""no" 1>&6
20484   cat >> confdefs.h <<EOF
20485 #define off_t long
20486 EOF
20487
20488 fi
20489
20490 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20491 echo "configure:20492: checking for pid_t" >&5
20492 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20493   echo $ac_n "(cached) $ac_c" 1>&6
20494 else
20495   cat > conftest.$ac_ext <<EOF
20496 #line 20497 "configure"
20497 #include "confdefs.h"
20498 #include <sys/types.h>
20499 #if STDC_HEADERS
20500 #include <stdlib.h>
20501 #include <stddef.h>
20502 #endif
20503
20504 EOF
20505 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20506   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20507   rm -rf conftest*
20508   eval "ac_cv_type_pid_t=yes"
20509 else
20510   rm -rf conftest*
20511   eval "ac_cv_type_pid_t=no"
20512 fi
20513 rm -f conftest*
20514
20515 fi
20516 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20517   echo "$ac_t""yes" 1>&6
20518 else
20519   echo "$ac_t""no" 1>&6
20520   cat >> confdefs.h <<EOF
20521 #define pid_t int
20522 EOF
20523
20524 fi
20525
20526 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20527 echo "configure:20528: checking for ptrdiff_t" >&5
20528 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20529   echo $ac_n "(cached) $ac_c" 1>&6
20530 else
20531   cat > conftest.$ac_ext <<EOF
20532 #line 20533 "configure"
20533 #include "confdefs.h"
20534 #include <stddef.h>
20535 int main() {
20536 ptrdiff_t p
20537 ; return 0; }
20538 EOF
20539 if { (eval echo configure:20540: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20540   rm -rf conftest*
20541   am_cv_type_ptrdiff_t=yes
20542 else
20543   echo "configure: failed program was:" >&5
20544   cat conftest.$ac_ext >&5
20545   rm -rf conftest*
20546   am_cv_type_ptrdiff_t=no
20547 fi
20548 rm -f conftest*
20549 fi
20550
20551 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20552    if test $am_cv_type_ptrdiff_t = yes; then
20553      cat >> confdefs.h <<\EOF
20554 #define HAVE_PTRDIFF_T 1
20555 EOF
20556
20557    fi
20558
20559 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20560 echo "configure:20561: checking return type of signal handlers" >&5
20561 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20562   echo $ac_n "(cached) $ac_c" 1>&6
20563 else
20564   cat > conftest.$ac_ext <<EOF
20565 #line 20566 "configure"
20566 #include "confdefs.h"
20567 #include <sys/types.h>
20568 #include <signal.h>
20569 #ifdef signal
20570 #undef signal
20571 #endif
20572 #ifdef __cplusplus
20573 extern "C" void (*signal (int, void (*)(int)))(int);
20574 #else
20575 void (*signal ()) ();
20576 #endif
20577
20578 int main() {
20579 int i;
20580 ; return 0; }
20581 EOF
20582 if { (eval echo configure:20583: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20583   rm -rf conftest*
20584   ac_cv_type_signal=void
20585 else
20586   echo "configure: failed program was:" >&5
20587   cat conftest.$ac_ext >&5
20588   rm -rf conftest*
20589   ac_cv_type_signal=int
20590 fi
20591 rm -f conftest*
20592 fi
20593
20594 echo "$ac_t""$ac_cv_type_signal" 1>&6
20595 cat >> confdefs.h <<EOF
20596 #define RETSIGTYPE $ac_cv_type_signal
20597 EOF
20598
20599
20600 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20601 echo "configure:20602: checking for size_t" >&5
20602 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20603   echo $ac_n "(cached) $ac_c" 1>&6
20604 else
20605   cat > conftest.$ac_ext <<EOF
20606 #line 20607 "configure"
20607 #include "confdefs.h"
20608 #include <sys/types.h>
20609 #if STDC_HEADERS
20610 #include <stdlib.h>
20611 #include <stddef.h>
20612 #endif
20613
20614 EOF
20615 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20616   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20617   rm -rf conftest*
20618   eval "ac_cv_type_size_t=yes"
20619 else
20620   rm -rf conftest*
20621   eval "ac_cv_type_size_t=no"
20622 fi
20623 rm -f conftest*
20624
20625 fi
20626 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20627   echo "$ac_t""yes" 1>&6
20628 else
20629   echo "$ac_t""no" 1>&6
20630   cat >> confdefs.h <<EOF
20631 #define size_t unsigned
20632 EOF
20633
20634 fi
20635
20636
20637 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20638 echo "configure:20639: checking for ssize_t" >&5
20639 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20640   echo $ac_n "(cached) $ac_c" 1>&6
20641 else
20642   cat > conftest.$ac_ext <<EOF
20643 #line 20644 "configure"
20644 #include "confdefs.h"
20645 #include <sys/types.h>
20646 #if STDC_HEADERS
20647 #include <stdlib.h>
20648 #include <stddef.h>
20649 #endif
20650
20651 EOF
20652 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20653   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20654   rm -rf conftest*
20655   eval "ac_cv_type_ssize_t=yes"
20656 else
20657   rm -rf conftest*
20658   eval "ac_cv_type_ssize_t=no"
20659 fi
20660 rm -f conftest*
20661
20662 fi
20663 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20664   echo "$ac_t""yes" 1>&6
20665 else
20666   echo "$ac_t""no" 1>&6
20667   cat >> confdefs.h <<EOF
20668 #define ssize_t signed int
20669 EOF
20670
20671 fi
20672
20673 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20674 echo "configure:20675: checking for caddr_t" >&5
20675 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20676   echo $ac_n "(cached) $ac_c" 1>&6
20677 else
20678   cat > conftest.$ac_ext <<EOF
20679 #line 20680 "configure"
20680 #include "confdefs.h"
20681 #include <sys/types.h>
20682 #if STDC_HEADERS
20683 #include <stdlib.h>
20684 #include <stddef.h>
20685 #endif
20686
20687 EOF
20688 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20689   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20690   rm -rf conftest*
20691   eval "ac_cv_type_caddr_t=yes"
20692 else
20693   rm -rf conftest*
20694   eval "ac_cv_type_caddr_t=no"
20695 fi
20696 rm -f conftest*
20697
20698 fi
20699 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20700   echo "$ac_t""yes" 1>&6
20701 else
20702   echo "$ac_t""no" 1>&6
20703   cat >> confdefs.h <<EOF
20704 #define caddr_t char *
20705 EOF
20706
20707 fi
20708
20709
20710 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20711 echo "configure:20712: checking for socklen_t" >&5
20712 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20713   echo $ac_n "(cached) $ac_c" 1>&6
20714 else
20715   cat > conftest.$ac_ext <<EOF
20716 #line 20717 "configure"
20717 #include "confdefs.h"
20718
20719 #ifdef HAVE_SYS_TYPES_H
20720 #include <sys/types.h>
20721 #endif
20722 #ifdef HAVE_SYS_SOCKET_H
20723 #include <sys/socket.h>
20724 #endif
20725
20726 int main() {
20727 socklen_t len;
20728 ; return 0; }
20729 EOF
20730 if { (eval echo configure:20731: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20731   rm -rf conftest*
20732   ol_cv_type_socklen_t=yes
20733 else
20734   echo "configure: failed program was:" >&5
20735   cat conftest.$ac_ext >&5
20736   rm -rf conftest*
20737   ol_cv_type_socklen_t=no
20738 fi
20739 rm -f conftest*
20740 fi
20741
20742 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20743   if test $ol_cv_type_socklen_t = no; then
20744     cat >> confdefs.h <<\EOF
20745 #define socklen_t int
20746 EOF
20747
20748   fi
20749  
20750 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20751 echo "configure:20752: checking for member st_blksize in aggregate type struct stat" >&5
20752 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20753   echo $ac_n "(cached) $ac_c" 1>&6
20754 else
20755   cat > conftest.$ac_ext <<EOF
20756 #line 20757 "configure"
20757 #include "confdefs.h"
20758 #include <sys/types.h>
20759 #include <sys/stat.h>
20760 int main() {
20761 struct stat foo; foo.st_blksize;
20762 ; return 0; }
20763 EOF
20764 if { (eval echo configure:20765: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20765   rm -rf conftest*
20766   ac_cv_c_struct_member_st_blksize=yes
20767 else
20768   echo "configure: failed program was:" >&5
20769   cat conftest.$ac_ext >&5
20770   rm -rf conftest*
20771   ac_cv_c_struct_member_st_blksize=no
20772 fi
20773 rm -f conftest*
20774 fi
20775
20776 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20777 st_blksize="$ac_cv_c_struct_member_st_blksize"
20778 if test $ac_cv_c_struct_member_st_blksize = yes; then
20779   cat >> confdefs.h <<\EOF
20780 #define HAVE_ST_BLKSIZE 1
20781 EOF
20782
20783 fi
20784
20785 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20786 echo "configure:20787: checking whether time.h and sys/time.h may both be included" >&5
20787 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20788   echo $ac_n "(cached) $ac_c" 1>&6
20789 else
20790   cat > conftest.$ac_ext <<EOF
20791 #line 20792 "configure"
20792 #include "confdefs.h"
20793 #include <sys/types.h>
20794 #include <sys/time.h>
20795 #include <time.h>
20796 int main() {
20797 struct tm *tp;
20798 ; return 0; }
20799 EOF
20800 if { (eval echo configure:20801: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20801   rm -rf conftest*
20802   ac_cv_header_time=yes
20803 else
20804   echo "configure: failed program was:" >&5
20805   cat conftest.$ac_ext >&5
20806   rm -rf conftest*
20807   ac_cv_header_time=no
20808 fi
20809 rm -f conftest*
20810 fi
20811
20812 echo "$ac_t""$ac_cv_header_time" 1>&6
20813 if test $ac_cv_header_time = yes; then
20814   cat >> confdefs.h <<\EOF
20815 #define TIME_WITH_SYS_TIME 1
20816 EOF
20817
20818 fi
20819
20820 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20821 echo "configure:20822: checking whether struct tm is in sys/time.h or time.h" >&5
20822 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20823   echo $ac_n "(cached) $ac_c" 1>&6
20824 else
20825   cat > conftest.$ac_ext <<EOF
20826 #line 20827 "configure"
20827 #include "confdefs.h"
20828 #include <sys/types.h>
20829 #include <time.h>
20830 int main() {
20831 struct tm *tp; tp->tm_sec;
20832 ; return 0; }
20833 EOF
20834 if { (eval echo configure:20835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20835   rm -rf conftest*
20836   ac_cv_struct_tm=time.h
20837 else
20838   echo "configure: failed program was:" >&5
20839   cat conftest.$ac_ext >&5
20840   rm -rf conftest*
20841   ac_cv_struct_tm=sys/time.h
20842 fi
20843 rm -f conftest*
20844 fi
20845
20846 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20847 if test $ac_cv_struct_tm = sys/time.h; then
20848   cat >> confdefs.h <<\EOF
20849 #define TM_IN_SYS_TIME 1
20850 EOF
20851
20852 fi
20853
20854 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20855 echo "configure:20856: checking for uid_t in sys/types.h" >&5
20856 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
20857   echo $ac_n "(cached) $ac_c" 1>&6
20858 else
20859   cat > conftest.$ac_ext <<EOF
20860 #line 20861 "configure"
20861 #include "confdefs.h"
20862 #include <sys/types.h>
20863 EOF
20864 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20865   egrep "uid_t" >/dev/null 2>&1; then
20866   rm -rf conftest*
20867   ac_cv_type_uid_t=yes
20868 else
20869   rm -rf conftest*
20870   ac_cv_type_uid_t=no
20871 fi
20872 rm -f conftest*
20873
20874 fi
20875
20876 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20877 if test $ac_cv_type_uid_t = no; then
20878   cat >> confdefs.h <<\EOF
20879 #define uid_t int
20880 EOF
20881
20882   cat >> confdefs.h <<\EOF
20883 #define gid_t int
20884 EOF
20885
20886 fi
20887
20888 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20889 echo "configure:20890: checking for sig_atomic_t" >&5
20890 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20891   echo $ac_n "(cached) $ac_c" 1>&6
20892 else
20893   cat > conftest.$ac_ext <<EOF
20894 #line 20895 "configure"
20895 #include "confdefs.h"
20896 #include <signal.h>
20897 int main() {
20898 sig_atomic_t atomic;
20899 ; return 0; }
20900 EOF
20901 if { (eval echo configure:20902: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20902   rm -rf conftest*
20903   ol_cv_type_sig_atomic_t=yes
20904 else
20905   echo "configure: failed program was:" >&5
20906   cat conftest.$ac_ext >&5
20907   rm -rf conftest*
20908   ol_cv_type_sig_atomic_t=no
20909 fi
20910 rm -f conftest*
20911 fi
20912
20913 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20914   if test $ol_cv_type_sig_atomic_t = no; then
20915     cat >> confdefs.h <<\EOF
20916 #define sig_atomic_t int
20917 EOF
20918
20919   fi
20920  
20921
20922
20923 # test for pw_gecos in struct passwd
20924 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
20925 echo "configure:20926: checking struct passwd for pw_gecos" >&5
20926 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
20927   echo $ac_n "(cached) $ac_c" 1>&6
20928 else
20929   
20930         cat > conftest.$ac_ext <<EOF
20931 #line 20932 "configure"
20932 #include "confdefs.h"
20933 #include <pwd.h>
20934 int main() {
20935
20936         struct passwd pwd;
20937         pwd.pw_gecos = pwd.pw_name;
20938
20939 ; return 0; }
20940 EOF
20941 if { (eval echo configure:20942: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20942   rm -rf conftest*
20943   ol_cv_struct_passwd_pw_gecos=yes
20944 else
20945   echo "configure: failed program was:" >&5
20946   cat conftest.$ac_ext >&5
20947   rm -rf conftest*
20948   ol_cv_struct_passwd_pw_gecos=no
20949 fi
20950 rm -f conftest*
20951 fi
20952
20953 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
20954 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
20955         cat >> confdefs.h <<\EOF
20956 #define HAVE_PW_GECOS 1
20957 EOF
20958
20959 fi
20960
20961 # test for pw_passwd in struct passwd
20962 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
20963 echo "configure:20964: checking struct passwd for pw_passwd" >&5
20964 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
20965   echo $ac_n "(cached) $ac_c" 1>&6
20966 else
20967   
20968         cat > conftest.$ac_ext <<EOF
20969 #line 20970 "configure"
20970 #include "confdefs.h"
20971 #include <pwd.h>
20972 int main() {
20973
20974         struct passwd pwd;
20975         pwd.pw_passwd = pwd.pw_name;
20976
20977 ; return 0; }
20978 EOF
20979 if { (eval echo configure:20980: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20980   rm -rf conftest*
20981   ol_cv_struct_passwd_pw_passwd=yes
20982 else
20983   echo "configure: failed program was:" >&5
20984   cat conftest.$ac_ext >&5
20985   rm -rf conftest*
20986   ol_cv_struct_passwd_pw_passwd=no
20987 fi
20988 rm -f conftest*
20989 fi
20990
20991 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
20992 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
20993         cat >> confdefs.h <<\EOF
20994 #define HAVE_PW_PASSWD 1
20995 EOF
20996
20997 fi
20998
20999
21000 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21001 echo "configure:21002: checking if toupper() requires islower()" >&5
21002 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21003   echo $ac_n "(cached) $ac_c" 1>&6
21004 else
21005   
21006         if test "$cross_compiling" = yes; then
21007   ol_cv_c_upper_lower=safe
21008 else
21009   cat > conftest.$ac_ext <<EOF
21010 #line 21011 "configure"
21011 #include "confdefs.h"
21012
21013 #include <ctype.h>
21014 main()
21015 {
21016         if ('C' == toupper('C'))
21017                 exit(0);
21018         else
21019                 exit(1);
21020 }
21021 EOF
21022 if { (eval echo configure:21023: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21023 then
21024   ol_cv_c_upper_lower=no
21025 else
21026   echo "configure: failed program was:" >&5
21027   cat conftest.$ac_ext >&5
21028   rm -fr conftest*
21029   ol_cv_c_upper_lower=yes
21030 fi
21031 rm -fr conftest*
21032 fi
21033
21034 fi
21035
21036 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21037 if test $ol_cv_c_upper_lower != no ; then
21038         cat >> confdefs.h <<\EOF
21039 #define C_UPPER_LOWER 1
21040 EOF
21041
21042 fi
21043
21044 echo $ac_n "checking for working const""... $ac_c" 1>&6
21045 echo "configure:21046: checking for working const" >&5
21046 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21047   echo $ac_n "(cached) $ac_c" 1>&6
21048 else
21049   cat > conftest.$ac_ext <<EOF
21050 #line 21051 "configure"
21051 #include "confdefs.h"
21052
21053 int main() {
21054
21055 /* Ultrix mips cc rejects this.  */
21056 typedef int charset[2]; const charset x;
21057 /* SunOS 4.1.1 cc rejects this.  */
21058 char const *const *ccp;
21059 char **p;
21060 /* NEC SVR4.0.2 mips cc rejects this.  */
21061 struct point {int x, y;};
21062 static struct point const zero = {0,0};
21063 /* AIX XL C 1.02.0.0 rejects this.
21064    It does not let you subtract one const X* pointer from another in an arm
21065    of an if-expression whose if-part is not a constant expression */
21066 const char *g = "string";
21067 ccp = &g + (g ? g-g : 0);
21068 /* HPUX 7.0 cc rejects these. */
21069 ++ccp;
21070 p = (char**) ccp;
21071 ccp = (char const *const *) p;
21072 { /* SCO 3.2v4 cc rejects this.  */
21073   char *t;
21074   char const *s = 0 ? (char *) 0 : (char const *) 0;
21075
21076   *t++ = 0;
21077 }
21078 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21079   int x[] = {25, 17};
21080   const int *foo = &x[0];
21081   ++foo;
21082 }
21083 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21084   typedef const int *iptr;
21085   iptr p = 0;
21086   ++p;
21087 }
21088 { /* AIX XL C 1.02.0.0 rejects this saying
21089      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21090   struct s { int j; const int *ap[3]; };
21091   struct s *b; b->j = 5;
21092 }
21093 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21094   const int foo = 10;
21095 }
21096
21097 ; return 0; }
21098 EOF
21099 if { (eval echo configure:21100: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21100   rm -rf conftest*
21101   ac_cv_c_const=yes
21102 else
21103   echo "configure: failed program was:" >&5
21104   cat conftest.$ac_ext >&5
21105   rm -rf conftest*
21106   ac_cv_c_const=no
21107 fi
21108 rm -f conftest*
21109 fi
21110
21111 echo "$ac_t""$ac_cv_c_const" 1>&6
21112 if test $ac_cv_c_const = no; then
21113   cat >> confdefs.h <<\EOF
21114 #define const 
21115 EOF
21116
21117 fi
21118
21119 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21120 echo "configure:21121: checking if compiler understands volatile" >&5
21121 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21122   echo $ac_n "(cached) $ac_c" 1>&6
21123 else
21124   cat > conftest.$ac_ext <<EOF
21125 #line 21126 "configure"
21126 #include "confdefs.h"
21127 int x, y, z;
21128 int main() {
21129 volatile int a; int * volatile b = x ? &y : &z;
21130       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21131       *b = 0;
21132 ; return 0; }
21133 EOF
21134 if { (eval echo configure:21135: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21135   rm -rf conftest*
21136   ol_cv_c_volatile=yes
21137 else
21138   echo "configure: failed program was:" >&5
21139   cat conftest.$ac_ext >&5
21140   rm -rf conftest*
21141   ol_cv_c_volatile=no
21142 fi
21143 rm -f conftest*
21144 fi
21145
21146 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21147   if test $ol_cv_c_volatile = yes; then
21148     : 
21149   else
21150     cat >> confdefs.h <<\EOF
21151 #define volatile 
21152 EOF
21153
21154   fi
21155  
21156
21157 if test $cross_compiling = yes ; then
21158         cat >> confdefs.h <<\EOF
21159 #define CROSS_COMPILING 1
21160 EOF
21161
21162 else
21163         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21164 echo "configure:21165: checking whether byte ordering is bigendian" >&5
21165 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21166   echo $ac_n "(cached) $ac_c" 1>&6
21167 else
21168   ac_cv_c_bigendian=unknown
21169 # See if sys/param.h defines the BYTE_ORDER macro.
21170 cat > conftest.$ac_ext <<EOF
21171 #line 21172 "configure"
21172 #include "confdefs.h"
21173 #include <sys/types.h>
21174 #include <sys/param.h>
21175 int main() {
21176
21177 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21178  bogus endian macros
21179 #endif
21180 ; return 0; }
21181 EOF
21182 if { (eval echo configure:21183: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21183   rm -rf conftest*
21184   # It does; now see whether it defined to BIG_ENDIAN or not.
21185 cat > conftest.$ac_ext <<EOF
21186 #line 21187 "configure"
21187 #include "confdefs.h"
21188 #include <sys/types.h>
21189 #include <sys/param.h>
21190 int main() {
21191
21192 #if BYTE_ORDER != BIG_ENDIAN
21193  not big endian
21194 #endif
21195 ; return 0; }
21196 EOF
21197 if { (eval echo configure:21198: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21198   rm -rf conftest*
21199   ac_cv_c_bigendian=yes
21200 else
21201   echo "configure: failed program was:" >&5
21202   cat conftest.$ac_ext >&5
21203   rm -rf conftest*
21204   ac_cv_c_bigendian=no
21205 fi
21206 rm -f conftest*
21207 else
21208   echo "configure: failed program was:" >&5
21209   cat conftest.$ac_ext >&5
21210 fi
21211 rm -f conftest*
21212 if test $ac_cv_c_bigendian = unknown; then
21213 if test "$cross_compiling" = yes; then
21214     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21215 else
21216   cat > conftest.$ac_ext <<EOF
21217 #line 21218 "configure"
21218 #include "confdefs.h"
21219 main () {
21220   /* Are we little or big endian?  From Harbison&Steele.  */
21221   union
21222   {
21223     long l;
21224     char c[sizeof (long)];
21225   } u;
21226   u.l = 1;
21227   exit (u.c[sizeof (long) - 1] == 1);
21228 }
21229 EOF
21230 if { (eval echo configure:21231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21231 then
21232   ac_cv_c_bigendian=no
21233 else
21234   echo "configure: failed program was:" >&5
21235   cat conftest.$ac_ext >&5
21236   rm -fr conftest*
21237   ac_cv_c_bigendian=yes
21238 fi
21239 rm -fr conftest*
21240 fi
21241
21242 fi
21243 fi
21244
21245 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21246 if test $ac_cv_c_bigendian = yes; then
21247   cat >> confdefs.h <<\EOF
21248 #define WORDS_BIGENDIAN 1
21249 EOF
21250
21251 fi
21252
21253 fi
21254
21255 echo $ac_n "checking size of short""... $ac_c" 1>&6
21256 echo "configure:21257: checking size of short" >&5 
21257 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21258   echo $ac_n "(cached) $ac_c" 1>&6
21259 else
21260   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21261   cat > conftest.$ac_ext <<EOF
21262 #line 21263 "configure"
21263 #include "confdefs.h"
21264 #include "confdefs.h" 
21265 #include <sys/types.h> 
21266  
21267
21268 int main() {
21269 switch (0) case 0: case (sizeof (short) == $ac_size):;
21270 ; return 0; }
21271 EOF
21272 if { (eval echo configure:21273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21273   rm -rf conftest*
21274   ac_cv_sizeof_short=$ac_size
21275 else
21276   echo "configure: failed program was:" >&5
21277   cat conftest.$ac_ext >&5
21278 fi
21279 rm -f conftest* 
21280   if test x$ac_cv_sizeof_short != x ; then break; fi 
21281 done 
21282
21283 fi
21284  
21285 if test x$ac_cv_sizeof_short = x ; then 
21286   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21287 fi 
21288 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21289 cat >> confdefs.h <<EOF
21290 #define SIZEOF_SHORT $ac_cv_sizeof_short
21291 EOF
21292  
21293  
21294 echo $ac_n "checking size of int""... $ac_c" 1>&6
21295 echo "configure:21296: checking size of int" >&5 
21296 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21297   echo $ac_n "(cached) $ac_c" 1>&6
21298 else
21299   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21300   cat > conftest.$ac_ext <<EOF
21301 #line 21302 "configure"
21302 #include "confdefs.h"
21303 #include "confdefs.h" 
21304 #include <sys/types.h> 
21305  
21306
21307 int main() {
21308 switch (0) case 0: case (sizeof (int) == $ac_size):;
21309 ; return 0; }
21310 EOF
21311 if { (eval echo configure:21312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21312   rm -rf conftest*
21313   ac_cv_sizeof_int=$ac_size
21314 else
21315   echo "configure: failed program was:" >&5
21316   cat conftest.$ac_ext >&5
21317 fi
21318 rm -f conftest* 
21319   if test x$ac_cv_sizeof_int != x ; then break; fi 
21320 done 
21321
21322 fi
21323  
21324 if test x$ac_cv_sizeof_int = x ; then 
21325   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21326 fi 
21327 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21328 cat >> confdefs.h <<EOF
21329 #define SIZEOF_INT $ac_cv_sizeof_int
21330 EOF
21331  
21332  
21333 echo $ac_n "checking size of long""... $ac_c" 1>&6
21334 echo "configure:21335: checking size of long" >&5 
21335 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21336   echo $ac_n "(cached) $ac_c" 1>&6
21337 else
21338   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21339   cat > conftest.$ac_ext <<EOF
21340 #line 21341 "configure"
21341 #include "confdefs.h"
21342 #include "confdefs.h" 
21343 #include <sys/types.h> 
21344  
21345
21346 int main() {
21347 switch (0) case 0: case (sizeof (long) == $ac_size):;
21348 ; return 0; }
21349 EOF
21350 if { (eval echo configure:21351: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21351   rm -rf conftest*
21352   ac_cv_sizeof_long=$ac_size
21353 else
21354   echo "configure: failed program was:" >&5
21355   cat conftest.$ac_ext >&5
21356 fi
21357 rm -f conftest* 
21358   if test x$ac_cv_sizeof_long != x ; then break; fi 
21359 done 
21360
21361 fi
21362  
21363 if test x$ac_cv_sizeof_long = x ; then 
21364   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21365 fi 
21366 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21367 cat >> confdefs.h <<EOF
21368 #define SIZEOF_LONG $ac_cv_sizeof_long
21369 EOF
21370  
21371
21372
21373 if test "$ac_cv_sizeof_int" -lt 4 ; then
21374         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21375
21376         cat >> confdefs.h <<\EOF
21377 #define LBER_INT_T long
21378 EOF
21379
21380 else
21381         cat >> confdefs.h <<\EOF
21382 #define LBER_INT_T int
21383 EOF
21384
21385 fi
21386
21387 cat >> confdefs.h <<\EOF
21388 #define LBER_LEN_T long
21389 EOF
21390
21391 cat >> confdefs.h <<\EOF
21392 #define LBER_SOCKET_T int
21393 EOF
21394
21395 cat >> confdefs.h <<\EOF
21396 #define LBER_TAG_T long
21397 EOF
21398
21399
21400 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21401 echo "configure:21402: checking for 8-bit clean memcmp" >&5
21402 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21403   echo $ac_n "(cached) $ac_c" 1>&6
21404 else
21405   if test "$cross_compiling" = yes; then
21406   ac_cv_func_memcmp_clean=no
21407 else
21408   cat > conftest.$ac_ext <<EOF
21409 #line 21410 "configure"
21410 #include "confdefs.h"
21411
21412 main()
21413 {
21414   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21415   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21416 }
21417
21418 EOF
21419 if { (eval echo configure:21420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21420 then
21421   ac_cv_func_memcmp_clean=yes
21422 else
21423   echo "configure: failed program was:" >&5
21424   cat conftest.$ac_ext >&5
21425   rm -fr conftest*
21426   ac_cv_func_memcmp_clean=no
21427 fi
21428 rm -fr conftest*
21429 fi
21430
21431 fi
21432
21433 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21434 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21435
21436 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21437 echo "configure:21438: checking for strftime" >&5
21438 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21439   echo $ac_n "(cached) $ac_c" 1>&6
21440 else
21441   cat > conftest.$ac_ext <<EOF
21442 #line 21443 "configure"
21443 #include "confdefs.h"
21444 /* System header to define __stub macros and hopefully few prototypes,
21445     which can conflict with char strftime(); below.  */
21446 #include <assert.h>
21447 /* Override any gcc2 internal prototype to avoid an error.  */
21448 /* We use char because int might match the return type of a gcc2
21449     builtin and then its argument prototype would still apply.  */
21450 char strftime();
21451 char (*f)();
21452
21453 int main() {
21454
21455 /* The GNU C library defines this for functions which it implements
21456     to always fail with ENOSYS.  Some functions are actually named
21457     something starting with __ and the normal name is an alias.  */
21458 #if defined (__stub_strftime) || defined (__stub___strftime)
21459 choke me
21460 #else
21461 f = strftime;
21462 #endif
21463
21464 ; return 0; }
21465 EOF
21466 if { (eval echo configure:21467: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21467   rm -rf conftest*
21468   eval "ac_cv_func_strftime=yes"
21469 else
21470   echo "configure: failed program was:" >&5
21471   cat conftest.$ac_ext >&5
21472   rm -rf conftest*
21473   eval "ac_cv_func_strftime=no"
21474 fi
21475 rm -f conftest*
21476 fi
21477
21478 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21479   echo "$ac_t""yes" 1>&6
21480   cat >> confdefs.h <<\EOF
21481 #define HAVE_STRFTIME 1
21482 EOF
21483
21484 else
21485   echo "$ac_t""no" 1>&6
21486 # strftime is in -lintl on SCO UNIX.
21487 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21488 echo "configure:21489: checking for strftime in -lintl" >&5
21489 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21490 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21491   echo $ac_n "(cached) $ac_c" 1>&6
21492 else
21493   ac_save_LIBS="$LIBS"
21494 LIBS="-lintl  $LIBS"
21495 cat > conftest.$ac_ext <<EOF
21496 #line 21497 "configure"
21497 #include "confdefs.h"
21498 /* Override any gcc2 internal prototype to avoid an error.  */
21499 /* We use char because int might match the return type of a gcc2
21500     builtin and then its argument prototype would still apply.  */
21501 char strftime();
21502
21503 int main() {
21504 strftime()
21505 ; return 0; }
21506 EOF
21507 if { (eval echo configure:21508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21508   rm -rf conftest*
21509   eval "ac_cv_lib_$ac_lib_var=yes"
21510 else
21511   echo "configure: failed program was:" >&5
21512   cat conftest.$ac_ext >&5
21513   rm -rf conftest*
21514   eval "ac_cv_lib_$ac_lib_var=no"
21515 fi
21516 rm -f conftest*
21517 LIBS="$ac_save_LIBS"
21518
21519 fi
21520 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21521   echo "$ac_t""yes" 1>&6
21522   cat >> confdefs.h <<\EOF
21523 #define HAVE_STRFTIME 1
21524 EOF
21525
21526 LIBS="-lintl $LIBS"
21527 else
21528   echo "$ac_t""no" 1>&6
21529 fi
21530
21531 fi
21532
21533
21534 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21535 echo "configure:21536: checking for inet_aton()" >&5
21536 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21537   echo $ac_n "(cached) $ac_c" 1>&6
21538 else
21539   cat > conftest.$ac_ext <<EOF
21540 #line 21541 "configure"
21541 #include "confdefs.h"
21542
21543 #ifdef HAVE_SYS_TYPES_H
21544 #       include <sys/types.h>
21545 #endif
21546 #ifdef HAVE_SYS_SOCKET_H
21547 #       include <sys/socket.h>
21548 #       ifdef HAVE_SYS_SELECT_H
21549 #               include <sys/select.h>
21550 #       endif
21551 #       include <netinet/in.h>
21552 #       ifdef HAVE_ARPA_INET_H
21553 #               include <arpa/inet.h>
21554 #       endif
21555 #endif
21556
21557 int main() {
21558 struct in_addr in;
21559 int rc = inet_aton( "255.255.255.255", &in );
21560 ; return 0; }
21561 EOF
21562 if { (eval echo configure:21563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21563   rm -rf conftest*
21564   ol_cv_func_inet_aton=yes
21565 else
21566   echo "configure: failed program was:" >&5
21567   cat conftest.$ac_ext >&5
21568   rm -rf conftest*
21569   ol_cv_func_inet_aton=no
21570 fi
21571 rm -f conftest*
21572 fi
21573
21574 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21575   if test $ol_cv_func_inet_aton != no; then
21576     cat >> confdefs.h <<\EOF
21577 #define HAVE_INET_ATON 1
21578 EOF
21579
21580   fi
21581  
21582
21583 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21584 echo "configure:21585: checking for _spawnlp" >&5
21585 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21586   echo $ac_n "(cached) $ac_c" 1>&6
21587 else
21588   cat > conftest.$ac_ext <<EOF
21589 #line 21590 "configure"
21590 #include "confdefs.h"
21591 /* System header to define __stub macros and hopefully few prototypes,
21592     which can conflict with char _spawnlp(); below.  */
21593 #include <assert.h>
21594 /* Override any gcc2 internal prototype to avoid an error.  */
21595 /* We use char because int might match the return type of a gcc2
21596     builtin and then its argument prototype would still apply.  */
21597 char _spawnlp();
21598 char (*f)();
21599
21600 int main() {
21601
21602 /* The GNU C library defines this for functions which it implements
21603     to always fail with ENOSYS.  Some functions are actually named
21604     something starting with __ and the normal name is an alias.  */
21605 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21606 choke me
21607 #else
21608 f = _spawnlp;
21609 #endif
21610
21611 ; return 0; }
21612 EOF
21613 if { (eval echo configure:21614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21614   rm -rf conftest*
21615   eval "ac_cv_func__spawnlp=yes"
21616 else
21617   echo "configure: failed program was:" >&5
21618   cat conftest.$ac_ext >&5
21619   rm -rf conftest*
21620   eval "ac_cv_func__spawnlp=no"
21621 fi
21622 rm -f conftest*
21623 fi
21624
21625 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21626   echo "$ac_t""yes" 1>&6
21627   cat >> confdefs.h <<\EOF
21628 #define HAVE_SPAWNLP 1
21629 EOF
21630
21631 else
21632   echo "$ac_t""no" 1>&6
21633 fi
21634
21635
21636 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21637 echo "configure:21638: checking for _snprintf" >&5
21638 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21639   echo $ac_n "(cached) $ac_c" 1>&6
21640 else
21641   cat > conftest.$ac_ext <<EOF
21642 #line 21643 "configure"
21643 #include "confdefs.h"
21644 /* System header to define __stub macros and hopefully few prototypes,
21645     which can conflict with char _snprintf(); below.  */
21646 #include <assert.h>
21647 /* Override any gcc2 internal prototype to avoid an error.  */
21648 /* We use char because int might match the return type of a gcc2
21649     builtin and then its argument prototype would still apply.  */
21650 char _snprintf();
21651 char (*f)();
21652
21653 int main() {
21654
21655 /* The GNU C library defines this for functions which it implements
21656     to always fail with ENOSYS.  Some functions are actually named
21657     something starting with __ and the normal name is an alias.  */
21658 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21659 choke me
21660 #else
21661 f = _snprintf;
21662 #endif
21663
21664 ; return 0; }
21665 EOF
21666 if { (eval echo configure:21667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21667   rm -rf conftest*
21668   eval "ac_cv_func__snprintf=yes"
21669 else
21670   echo "configure: failed program was:" >&5
21671   cat conftest.$ac_ext >&5
21672   rm -rf conftest*
21673   eval "ac_cv_func__snprintf=no"
21674 fi
21675 rm -f conftest*
21676 fi
21677
21678 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21679   echo "$ac_t""yes" 1>&6
21680   ac_cv_func_snprintf=yes
21681         cat >> confdefs.h <<\EOF
21682 #define snprintf _snprintf
21683 EOF
21684
21685
21686 else
21687   echo "$ac_t""no" 1>&6
21688 fi
21689
21690
21691 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21692 echo "configure:21693: checking for _vsnprintf" >&5
21693 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21694   echo $ac_n "(cached) $ac_c" 1>&6
21695 else
21696   cat > conftest.$ac_ext <<EOF
21697 #line 21698 "configure"
21698 #include "confdefs.h"
21699 /* System header to define __stub macros and hopefully few prototypes,
21700     which can conflict with char _vsnprintf(); below.  */
21701 #include <assert.h>
21702 /* Override any gcc2 internal prototype to avoid an error.  */
21703 /* We use char because int might match the return type of a gcc2
21704     builtin and then its argument prototype would still apply.  */
21705 char _vsnprintf();
21706 char (*f)();
21707
21708 int main() {
21709
21710 /* The GNU C library defines this for functions which it implements
21711     to always fail with ENOSYS.  Some functions are actually named
21712     something starting with __ and the normal name is an alias.  */
21713 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21714 choke me
21715 #else
21716 f = _vsnprintf;
21717 #endif
21718
21719 ; return 0; }
21720 EOF
21721 if { (eval echo configure:21722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21722   rm -rf conftest*
21723   eval "ac_cv_func__vsnprintf=yes"
21724 else
21725   echo "configure: failed program was:" >&5
21726   cat conftest.$ac_ext >&5
21727   rm -rf conftest*
21728   eval "ac_cv_func__vsnprintf=no"
21729 fi
21730 rm -f conftest*
21731 fi
21732
21733 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21734   echo "$ac_t""yes" 1>&6
21735   ac_cv_func_vsnprintf=yes
21736         cat >> confdefs.h <<\EOF
21737 #define vsnprintf _vsnprintf
21738 EOF
21739
21740
21741 else
21742   echo "$ac_t""no" 1>&6
21743 fi
21744
21745
21746 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21747 echo "configure:21748: checking for vprintf" >&5
21748 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21749   echo $ac_n "(cached) $ac_c" 1>&6
21750 else
21751   cat > conftest.$ac_ext <<EOF
21752 #line 21753 "configure"
21753 #include "confdefs.h"
21754 /* System header to define __stub macros and hopefully few prototypes,
21755     which can conflict with char vprintf(); below.  */
21756 #include <assert.h>
21757 /* Override any gcc2 internal prototype to avoid an error.  */
21758 /* We use char because int might match the return type of a gcc2
21759     builtin and then its argument prototype would still apply.  */
21760 char vprintf();
21761 char (*f)();
21762
21763 int main() {
21764
21765 /* The GNU C library defines this for functions which it implements
21766     to always fail with ENOSYS.  Some functions are actually named
21767     something starting with __ and the normal name is an alias.  */
21768 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21769 choke me
21770 #else
21771 f = vprintf;
21772 #endif
21773
21774 ; return 0; }
21775 EOF
21776 if { (eval echo configure:21777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21777   rm -rf conftest*
21778   eval "ac_cv_func_vprintf=yes"
21779 else
21780   echo "configure: failed program was:" >&5
21781   cat conftest.$ac_ext >&5
21782   rm -rf conftest*
21783   eval "ac_cv_func_vprintf=no"
21784 fi
21785 rm -f conftest*
21786 fi
21787
21788 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21789   echo "$ac_t""yes" 1>&6
21790   cat >> confdefs.h <<\EOF
21791 #define HAVE_VPRINTF 1
21792 EOF
21793
21794 else
21795   echo "$ac_t""no" 1>&6
21796 fi
21797
21798 if test "$ac_cv_func_vprintf" != yes; then
21799 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21800 echo "configure:21801: checking for _doprnt" >&5
21801 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21802   echo $ac_n "(cached) $ac_c" 1>&6
21803 else
21804   cat > conftest.$ac_ext <<EOF
21805 #line 21806 "configure"
21806 #include "confdefs.h"
21807 /* System header to define __stub macros and hopefully few prototypes,
21808     which can conflict with char _doprnt(); below.  */
21809 #include <assert.h>
21810 /* Override any gcc2 internal prototype to avoid an error.  */
21811 /* We use char because int might match the return type of a gcc2
21812     builtin and then its argument prototype would still apply.  */
21813 char _doprnt();
21814 char (*f)();
21815
21816 int main() {
21817
21818 /* The GNU C library defines this for functions which it implements
21819     to always fail with ENOSYS.  Some functions are actually named
21820     something starting with __ and the normal name is an alias.  */
21821 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21822 choke me
21823 #else
21824 f = _doprnt;
21825 #endif
21826
21827 ; return 0; }
21828 EOF
21829 if { (eval echo configure:21830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21830   rm -rf conftest*
21831   eval "ac_cv_func__doprnt=yes"
21832 else
21833   echo "configure: failed program was:" >&5
21834   cat conftest.$ac_ext >&5
21835   rm -rf conftest*
21836   eval "ac_cv_func__doprnt=no"
21837 fi
21838 rm -f conftest*
21839 fi
21840
21841 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21842   echo "$ac_t""yes" 1>&6
21843   cat >> confdefs.h <<\EOF
21844 #define HAVE_DOPRNT 1
21845 EOF
21846
21847 else
21848   echo "$ac_t""no" 1>&6
21849 fi
21850
21851 fi
21852
21853
21854 if test $ac_cv_func_vprintf = yes ; then
21855                 for ac_func in snprintf vsnprintf
21856 do
21857 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21858 echo "configure:21859: checking for $ac_func" >&5
21859 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21860   echo $ac_n "(cached) $ac_c" 1>&6
21861 else
21862   cat > conftest.$ac_ext <<EOF
21863 #line 21864 "configure"
21864 #include "confdefs.h"
21865 /* System header to define __stub macros and hopefully few prototypes,
21866     which can conflict with char $ac_func(); below.  */
21867 #include <assert.h>
21868 /* Override any gcc2 internal prototype to avoid an error.  */
21869 /* We use char because int might match the return type of a gcc2
21870     builtin and then its argument prototype would still apply.  */
21871 char $ac_func();
21872 char (*f)();
21873
21874 int main() {
21875
21876 /* The GNU C library defines this for functions which it implements
21877     to always fail with ENOSYS.  Some functions are actually named
21878     something starting with __ and the normal name is an alias.  */
21879 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21880 choke me
21881 #else
21882 f = $ac_func;
21883 #endif
21884
21885 ; return 0; }
21886 EOF
21887 if { (eval echo configure:21888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21888   rm -rf conftest*
21889   eval "ac_cv_func_$ac_func=yes"
21890 else
21891   echo "configure: failed program was:" >&5
21892   cat conftest.$ac_ext >&5
21893   rm -rf conftest*
21894   eval "ac_cv_func_$ac_func=no"
21895 fi
21896 rm -f conftest*
21897 fi
21898
21899 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21900   echo "$ac_t""yes" 1>&6
21901     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21902   cat >> confdefs.h <<EOF
21903 #define $ac_tr_func 1
21904 EOF
21905  
21906 else
21907   echo "$ac_t""no" 1>&6
21908 fi
21909 done
21910
21911 fi
21912
21913 for ac_func in \
21914         bcopy                   \
21915         closesocket             \
21916         chroot                  \
21917         endgrent                \
21918         endpwent                \
21919         fcntl                   \
21920         flock                   \
21921         fstat                   \
21922         getdtablesize   \
21923         getgrgid                \
21924         gethostname             \
21925         getpass                 \
21926         getpassphrase   \
21927         getpwuid                \
21928         getpwnam                \
21929         getspnam                \
21930         gettimeofday    \
21931         initgroups              \
21932         lockf                   \
21933         memcpy                  \
21934         memmove                 \
21935         mkstemp                 \
21936         mktemp                  \
21937         pipe                    \
21938         read                    \
21939         recv                    \
21940         recvfrom                \
21941         recvmsg                 \
21942         setpwfile               \
21943         setgid                  \
21944         setegid                 \
21945         setsid                  \
21946         setuid                  \
21947         seteuid                 \
21948         sigaction               \
21949         signal                  \
21950         sigset                  \
21951         strdup                  \
21952         strerror                \
21953         strpbrk                 \
21954         strrchr                 \
21955         strsep                  \
21956         strstr                  \
21957         strtol                  \
21958         strtoul                 \
21959         strspn                  \
21960         sysconf                 \
21961         usleep                  \
21962         waitpid                 \
21963         wait4                   \
21964         write                   \
21965         send                    \
21966         sendto                  \
21967
21968 do
21969 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21970 echo "configure:21971: checking for $ac_func" >&5
21971 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21972   echo $ac_n "(cached) $ac_c" 1>&6
21973 else
21974   cat > conftest.$ac_ext <<EOF
21975 #line 21976 "configure"
21976 #include "confdefs.h"
21977 /* System header to define __stub macros and hopefully few prototypes,
21978     which can conflict with char $ac_func(); below.  */
21979 #include <assert.h>
21980 /* Override any gcc2 internal prototype to avoid an error.  */
21981 /* We use char because int might match the return type of a gcc2
21982     builtin and then its argument prototype would still apply.  */
21983 char $ac_func();
21984 char (*f)();
21985
21986 int main() {
21987
21988 /* The GNU C library defines this for functions which it implements
21989     to always fail with ENOSYS.  Some functions are actually named
21990     something starting with __ and the normal name is an alias.  */
21991 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21992 choke me
21993 #else
21994 f = $ac_func;
21995 #endif
21996
21997 ; return 0; }
21998 EOF
21999 if { (eval echo configure:22000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22000   rm -rf conftest*
22001   eval "ac_cv_func_$ac_func=yes"
22002 else
22003   echo "configure: failed program was:" >&5
22004   cat conftest.$ac_ext >&5
22005   rm -rf conftest*
22006   eval "ac_cv_func_$ac_func=no"
22007 fi
22008 rm -f conftest*
22009 fi
22010
22011 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22012   echo "$ac_t""yes" 1>&6
22013     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22014   cat >> confdefs.h <<EOF
22015 #define $ac_tr_func 1
22016 EOF
22017  
22018 else
22019   echo "$ac_t""no" 1>&6
22020 fi
22021 done
22022
22023
22024 for ac_func in getopt
22025 do
22026 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22027 echo "configure:22028: checking for $ac_func" >&5
22028 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22029   echo $ac_n "(cached) $ac_c" 1>&6
22030 else
22031   cat > conftest.$ac_ext <<EOF
22032 #line 22033 "configure"
22033 #include "confdefs.h"
22034 /* System header to define __stub macros and hopefully few prototypes,
22035     which can conflict with char $ac_func(); below.  */
22036 #include <assert.h>
22037 /* Override any gcc2 internal prototype to avoid an error.  */
22038 /* We use char because int might match the return type of a gcc2
22039     builtin and then its argument prototype would still apply.  */
22040 char $ac_func();
22041 char (*f)();
22042
22043 int main() {
22044
22045 /* The GNU C library defines this for functions which it implements
22046     to always fail with ENOSYS.  Some functions are actually named
22047     something starting with __ and the normal name is an alias.  */
22048 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22049 choke me
22050 #else
22051 f = $ac_func;
22052 #endif
22053
22054 ; return 0; }
22055 EOF
22056 if { (eval echo configure:22057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22057   rm -rf conftest*
22058   eval "ac_cv_func_$ac_func=yes"
22059 else
22060   echo "configure: failed program was:" >&5
22061   cat conftest.$ac_ext >&5
22062   rm -rf conftest*
22063   eval "ac_cv_func_$ac_func=no"
22064 fi
22065 rm -f conftest*
22066 fi
22067
22068 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22069   echo "$ac_t""yes" 1>&6
22070     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22071   cat >> confdefs.h <<EOF
22072 #define $ac_tr_func 1
22073 EOF
22074  
22075 else
22076   echo "$ac_t""no" 1>&6
22077 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22078 fi
22079 done
22080
22081
22082
22083 if test "$ac_cv_func_getopt" != yes; then
22084         LIBSRCS="$LIBSRCS getopt.c"
22085 fi
22086 if test "$ac_cv_func_snprintf" != yes -o "$ac_cv_func_vsnprintf" != yes; then
22087         if test "$ac_cv_func_snprintf" != yes; then
22088                 cat >> confdefs.h <<\EOF
22089 #define snprintf ber_pvt_snprintf
22090 EOF
22091
22092         fi
22093         if test "$ac_cv_func_vsnprintf" != yes; then
22094                 cat >> confdefs.h <<\EOF
22095 #define vsnprintf ber_pvt_vsnprintf
22096 EOF
22097
22098         fi
22099 fi
22100
22101 # Check Configuration
22102 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22103 echo "configure:22104: checking declaration of sys_errlist" >&5
22104 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22105   echo $ac_n "(cached) $ac_c" 1>&6
22106 else
22107   
22108         cat > conftest.$ac_ext <<EOF
22109 #line 22110 "configure"
22110 #include "confdefs.h"
22111
22112 #include <stdio.h>
22113 #include <sys/types.h>
22114 #include <errno.h>
22115 #ifdef WINNT
22116 #include <stdlib.h>
22117 #endif 
22118 int main() {
22119 char *c = (char *) *sys_errlist
22120 ; return 0; }
22121 EOF
22122 if { (eval echo configure:22123: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22123   rm -rf conftest*
22124   ol_cv_dcl_sys_errlist=yes
22125         ol_cv_have_sys_errlist=yes
22126 else
22127   echo "configure: failed program was:" >&5
22128   cat conftest.$ac_ext >&5
22129   rm -rf conftest*
22130   ol_cv_dcl_sys_errlist=no
22131 fi
22132 rm -f conftest*
22133 fi
22134
22135 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22136 #
22137 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22138 if test $ol_cv_dcl_sys_errlist = no ; then
22139         cat >> confdefs.h <<\EOF
22140 #define DECL_SYS_ERRLIST 1
22141 EOF
22142
22143
22144         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22145 echo "configure:22146: checking existence of sys_errlist" >&5
22146 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22147   echo $ac_n "(cached) $ac_c" 1>&6
22148 else
22149   
22150                 cat > conftest.$ac_ext <<EOF
22151 #line 22152 "configure"
22152 #include "confdefs.h"
22153 #include <errno.h>
22154 int main() {
22155 char *c = (char *) *sys_errlist
22156 ; return 0; }
22157 EOF
22158 if { (eval echo configure:22159: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22159   rm -rf conftest*
22160   ol_cv_have_sys_errlist=yes
22161 else
22162   echo "configure: failed program was:" >&5
22163   cat conftest.$ac_ext >&5
22164   rm -rf conftest*
22165   ol_cv_have_sys_errlist=no
22166 fi
22167 rm -f conftest*
22168 fi
22169
22170 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22171 fi
22172 if test $ol_cv_have_sys_errlist = yes ; then
22173         cat >> confdefs.h <<\EOF
22174 #define HAVE_SYS_ERRLIST 1
22175 EOF
22176
22177 fi
22178
22179
22180
22181 if test "$ol_enable_debug" != no ; then
22182         cat >> confdefs.h <<\EOF
22183 #define LDAP_DEBUG 1
22184 EOF
22185
22186 fi
22187 if test "$ol_enable_syslog" = yes ; then
22188         cat >> confdefs.h <<\EOF
22189 #define LDAP_SYSLOG 1
22190 EOF
22191
22192 fi
22193 if test "$ol_enable_cache" = no ; then
22194         cat >> confdefs.h <<\EOF
22195 #define LDAP_NOCACHE 1
22196 EOF
22197
22198 fi
22199 if test "$ol_link_kbind" != no ; then
22200         cat >> confdefs.h <<\EOF
22201 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22202 EOF
22203
22204 fi
22205 if test "$ol_enable_proctitle" != no ; then
22206         cat >> confdefs.h <<\EOF
22207 #define LDAP_PROCTITLE 1
22208 EOF
22209
22210 fi
22211 if test "$ol_enable_referrals" != no ; then
22212         cat >> confdefs.h <<\EOF
22213 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22214 EOF
22215
22216 fi
22217 if test "$ol_enable_local" != no; then
22218         cat >> confdefs.h <<\EOF
22219 #define LDAP_PF_LOCAL 1
22220 EOF
22221
22222 fi
22223 if test "$ol_link_ipv6" != no; then
22224         cat >> confdefs.h <<\EOF
22225 #define LDAP_PF_INET6 1
22226 EOF
22227
22228 fi
22229 if test "$ol_enable_cleartext" != no ; then
22230         cat >> confdefs.h <<\EOF
22231 #define SLAPD_CLEARTEXT 1
22232 EOF
22233
22234 fi
22235 if test "$ol_enable_crypt" != no ; then
22236         cat >> confdefs.h <<\EOF
22237 #define SLAPD_CRYPT 1
22238 EOF
22239
22240 fi
22241 if test "$ol_link_kpasswd" != no ; then
22242         cat >> confdefs.h <<\EOF
22243 #define SLAPD_KPASSWD 1
22244 EOF
22245
22246 fi
22247 if test "$ol_link_spasswd" != no ; then
22248         cat >> confdefs.h <<\EOF
22249 #define SLAPD_SPASSWD 1
22250 EOF
22251
22252 fi
22253 if test "$ol_enable_multimaster" != no ; then
22254         cat >> confdefs.h <<\EOF
22255 #define SLAPD_MULTIMASTER 1
22256 EOF
22257
22258 fi
22259 if test "$ol_enable_phonetic" != no ; then
22260         cat >> confdefs.h <<\EOF
22261 #define SLAPD_PHONETIC 1
22262 EOF
22263
22264 fi
22265 if test "$ol_enable_rlookups" != no ; then
22266         cat >> confdefs.h <<\EOF
22267 #define SLAPD_RLOOKUPS 1
22268 EOF
22269
22270 fi
22271 if test "$ol_enable_aci" != no ; then
22272         cat >> confdefs.h <<\EOF
22273 #define SLAPD_ACI_ENABLED 1
22274 EOF
22275
22276 fi
22277
22278 if test "$ol_link_modules" != no ; then
22279         cat >> confdefs.h <<\EOF
22280 #define SLAPD_MODULES 1
22281 EOF
22282
22283         BUILD_SLAPD=yes
22284         SLAPD_MODULES_LDFLAGS="-dlopen self"
22285 fi
22286
22287 if test "$ol_enable_bdb" != no ; then
22288         cat >> confdefs.h <<\EOF
22289 #define SLAPD_BDB 1
22290 EOF
22291
22292         BUILD_SLAPD=yes
22293         BUILD_BDB=yes
22294         if test "$ol_with_bdb_module" != static ; then
22295                 cat >> confdefs.h <<\EOF
22296 #define SLAPD_BDB_DYNAMIC 1
22297 EOF
22298
22299                 BUILD_BDB=mod
22300                 BUILD_BDB_DYNAMIC=shared
22301                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22302         else
22303                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22304         fi
22305 fi
22306
22307 if test "$ol_link_dnssrv" != no ; then
22308         cat >> confdefs.h <<\EOF
22309 #define SLAPD_DNSSRV 1
22310 EOF
22311
22312         BUILD_SLAPD=yes
22313         BUILD_DNSSRV=yes
22314         if test "$ol_with_dnssrv_module" != static ; then
22315                 cat >> confdefs.h <<\EOF
22316 #define SLAPD_DNSSRV_DYNAMIC 1
22317 EOF
22318
22319                 BUILD_DNSSRV=mod
22320                 BUILD_DNSSRV_DYNAMIC=shared
22321                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22322         else
22323                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22324         fi
22325 fi
22326
22327 if test "$ol_enable_ldap" != no ; then
22328         cat >> confdefs.h <<\EOF
22329 #define SLAPD_LDAP 1
22330 EOF
22331
22332         BUILD_SLAPD=yes
22333         BUILD_LDAP=yes
22334         if test "$ol_with_ldap_module" != static ; then
22335                 cat >> confdefs.h <<\EOF
22336 #define SLAPD_LDAP_DYNAMIC 1
22337 EOF
22338
22339                 BUILD_LDAP=mod
22340                 BUILD_LDAP_DYNAMIC=shared
22341                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22342         else
22343                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22344         fi
22345 fi
22346
22347 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22348         cat >> confdefs.h <<\EOF
22349 #define SLAPD_LDBM 1
22350 EOF
22351
22352         BUILD_SLAPD=yes
22353         BUILD_LDBM=yes
22354         if test "$ol_with_ldbm_module" != static ; then
22355                 cat >> confdefs.h <<\EOF
22356 #define SLAPD_LDBM_DYNAMIC 1
22357 EOF
22358
22359                 BUILD_LDBM=mod
22360                 BUILD_LDBM_DYNAMIC=shared
22361                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22362         else
22363                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22364         fi
22365 fi
22366
22367 if test "$ol_enable_meta" != no ; then
22368         if test "$ol_enable_ldap" = no ; then
22369                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22370         fi
22371         if test "$ol_enable_rewrite" = no ; then
22372                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22373         fi
22374         cat >> confdefs.h <<\EOF
22375 #define SLAPD_META 1
22376 EOF
22377
22378         BUILD_SLAPD=yes
22379         BUILD_META=yes
22380         BUILD_LDAP=yes
22381         BUILD_REWRITE=yes
22382         if test "$ol_with_meta_module" != static ; then
22383                 cat >> confdefs.h <<\EOF
22384 #define SLAPD_META_DYNAMIC 1
22385 EOF
22386
22387                 BUILD_META=mod
22388                 BUILD_META_DYNAMIC=shared
22389                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22390         else
22391                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22392         fi
22393 fi
22394
22395 if test "$ol_enable_monitor" != no ; then
22396         cat >> confdefs.h <<\EOF
22397 #define SLAPD_MONITOR 1
22398 EOF
22399
22400         BUILD_SLAPD=yes
22401         BUILD_MONITOR=yes
22402         if test "$ol_with_monitor_module" != static ; then
22403                 cat >> confdefs.h <<\EOF
22404 #define SLAPD_MONITOR_DYNAMIC 1
22405 EOF
22406
22407                 BUILD_MONITOR=mod
22408                 BUILD_MONITOR_DYNAMIC=shared
22409                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22410         else
22411                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22412         fi
22413 fi
22414
22415 if test "$ol_enable_null" != no ; then
22416         cat >> confdefs.h <<\EOF
22417 #define SLAPD_NULL 1
22418 EOF
22419
22420         BUILD_SLAPD=yes
22421         BUILD_NULL=yes
22422         if test "$ol_with_null_module" != static ; then
22423                 cat >> confdefs.h <<\EOF
22424 #define SLAPD_NULL_DYNAMIC 1
22425 EOF
22426
22427                 BUILD_NULL=mod
22428                 BUILD_NULL_DYNAMIC=shared
22429                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22430         else
22431                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22432         fi
22433 fi
22434
22435 if test "$ol_enable_passwd" != no ; then
22436         cat >> confdefs.h <<\EOF
22437 #define SLAPD_PASSWD 1
22438 EOF
22439
22440         BUILD_SLAPD=yes
22441         BUILD_PASSWD=yes
22442         if test "$ol_with_passwd_module" != static ; then
22443                 cat >> confdefs.h <<\EOF
22444 #define SLAPD_PASSWD_DYNAMIC 1
22445 EOF
22446
22447                 BUILD_PASSWD=mod
22448                 BUILD_PASSWD_DYNAMIC=shared
22449                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22450         else
22451                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22452         fi
22453 fi
22454
22455 if test "$ol_link_perl" != no ; then
22456         cat >> confdefs.h <<\EOF
22457 #define SLAPD_PERL 1
22458 EOF
22459
22460         BUILD_SLAPD=yes
22461         BUILD_PERL=yes
22462         if test "$ol_with_perl_module" != static ; then
22463                 cat >> confdefs.h <<\EOF
22464 #define SLAPD_PERL_DYNAMIC 1
22465 EOF
22466
22467                 BUILD_PERL=mod
22468                 BUILD_PERL_DYNAMIC=shared
22469                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22470         else
22471                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22472         fi
22473 fi
22474
22475 if test "$ol_enable_shell" != no ; then
22476         cat >> confdefs.h <<\EOF
22477 #define SLAPD_SHELL 1
22478 EOF
22479
22480         BUILD_SLAPD=yes
22481         BUILD_SHELL=yes
22482         if test "$ol_with_shell_module" != static ; then
22483                 cat >> confdefs.h <<\EOF
22484 #define SLAPD_SHELL_DYNAMIC 1
22485 EOF
22486
22487                 BUILD_SHELL=mod
22488                 BUILD_SHELL_DYNAMIC=shared
22489                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22490         else
22491                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22492         fi
22493 fi
22494
22495 if test "$ol_link_sql" != no ; then
22496         cat >> confdefs.h <<\EOF
22497 #define SLAPD_SQL 1
22498 EOF
22499
22500         BUILD_SLAPD=yes
22501         BUILD_SQL=yes
22502         if test "$ol_with_sql_module" != static; then
22503                 cat >> confdefs.h <<\EOF
22504 #define SLAPD_SQL_DYNAMIC 1
22505 EOF
22506
22507                 BUILD_SQL=mod
22508                 BUILD_SQL_DYNAMIC=shared
22509                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22510         else
22511                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22512         fi
22513 fi
22514
22515 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22516         $BUILD_SLAPD = yes ; then
22517         BUILD_SLURPD=yes
22518 fi
22519
22520 if test "$ol_enable_rewrite" != no ; then
22521         cat >> confdefs.h <<\EOF
22522 #define ENABLE_REWRITE 1
22523 EOF
22524
22525         BUILD_REWRITE=yes
22526 fi
22527
22528
22529
22530 if test "$ac_cv_mingw32" = yes ; then
22531         PLAT=NT
22532         SLAPD_MODULES_LDFLAGS=
22533 else
22534         PLAT=UNIX
22535 fi
22536
22537 if test -z "$SLAPD_STATIC_BACKENDS"; then
22538         SLAPD_NO_STATIC='#'
22539 else
22540         SLAPD_NO_STATIC=
22541 fi
22542
22543
22544
22545
22546
22547
22548   
22549   
22550   
22551   
22552   
22553   
22554   
22555   
22556   
22557   
22558   
22559   
22560   
22561   
22562   
22563   
22564   
22565   
22566   
22567   
22568   
22569   
22570
22571
22572
22573
22574
22575
22576
22577
22578
22579
22580
22581
22582
22583
22584
22585
22586
22587
22588
22589
22590
22591
22592
22593
22594
22595
22596
22597
22598
22599
22600
22601
22602
22603
22604
22605
22606
22607 # Check whether --with-xxinstall or --without-xxinstall was given.
22608 if test "${with_xxinstall+set}" = set; then
22609   withval="$with_xxinstall"
22610   :
22611 fi
22612
22613
22614
22615 trap '' 1 2 15
22616
22617 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22618
22619 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22620 # Let make expand exec_prefix.
22621 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22622
22623 # Any assignment to VPATH causes Sun make to only execute
22624 # the first set of double-colon rules, so remove it if not needed.
22625 # If there is a colon in the path, we need to keep it.
22626 if test "x$srcdir" = x.; then
22627   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22628 fi
22629
22630 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22631
22632 DEFS=-DHAVE_CONFIG_H
22633
22634 # Without the "./", some shells look in PATH for config.status.
22635 : ${CONFIG_STATUS=./config.status}
22636
22637 echo creating $CONFIG_STATUS
22638 rm -f $CONFIG_STATUS
22639 cat > $CONFIG_STATUS <<EOF
22640 #! /bin/sh
22641 # Generated automatically by configure.
22642 # Run this file to recreate the current configuration.
22643 # This directory was configured as follows,
22644 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22645 #
22646 # $0 $ac_configure_args
22647 #
22648 # Compiler output produced by configure, useful for debugging
22649 # configure, is in ./config.log if it exists.
22650
22651 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22652 for ac_option
22653 do
22654   case "\$ac_option" in
22655   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22656     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22657     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22658   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22659     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22660     exit 0 ;;
22661   -help | --help | --hel | --he | --h)
22662     echo "\$ac_cs_usage"; exit 0 ;;
22663   *) echo "\$ac_cs_usage"; exit 1 ;;
22664   esac
22665 done
22666
22667 ac_given_srcdir=$srcdir
22668 ac_given_INSTALL="$INSTALL"
22669
22670 trap 'rm -fr `echo "\
22671 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22672 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22673 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22674 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22675 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22676 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22677 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22678 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22679 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22680 include/Makefile:build/top.mk:include/Makefile.in \
22681 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22682 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22683 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22684 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22685 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22686 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22687 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22688 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22689 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22690 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22691 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22692 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22693 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22694 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22695 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22696 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22697 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22698 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22699 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22700 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22701 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22702 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22703 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22704 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22705 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22706 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22707 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22708 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22709  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22710 EOF
22711 cat >> $CONFIG_STATUS <<EOF
22712
22713 # Protect against being on the right side of a sed subst in config.status.
22714 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22715  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22716 $ac_vpsub
22717 $extrasub
22718 s%@SHELL@%$SHELL%g
22719 s%@CFLAGS@%$CFLAGS%g
22720 s%@CPPFLAGS@%$CPPFLAGS%g
22721 s%@CXXFLAGS@%$CXXFLAGS%g
22722 s%@FFLAGS@%$FFLAGS%g
22723 s%@DEFS@%$DEFS%g
22724 s%@LDFLAGS@%$LDFLAGS%g
22725 s%@LIBS@%$LIBS%g
22726 s%@exec_prefix@%$exec_prefix%g
22727 s%@prefix@%$prefix%g
22728 s%@program_transform_name@%$program_transform_name%g
22729 s%@bindir@%$bindir%g
22730 s%@sbindir@%$sbindir%g
22731 s%@libexecdir@%$libexecdir%g
22732 s%@datadir@%$datadir%g
22733 s%@sysconfdir@%$sysconfdir%g
22734 s%@sharedstatedir@%$sharedstatedir%g
22735 s%@localstatedir@%$localstatedir%g
22736 s%@libdir@%$libdir%g
22737 s%@includedir@%$includedir%g
22738 s%@oldincludedir@%$oldincludedir%g
22739 s%@infodir@%$infodir%g
22740 s%@mandir@%$mandir%g
22741 s%@host@%$host%g
22742 s%@host_alias@%$host_alias%g
22743 s%@host_cpu@%$host_cpu%g
22744 s%@host_vendor@%$host_vendor%g
22745 s%@host_os@%$host_os%g
22746 s%@target@%$target%g
22747 s%@target_alias@%$target_alias%g
22748 s%@target_cpu@%$target_cpu%g
22749 s%@target_vendor@%$target_vendor%g
22750 s%@target_os@%$target_os%g
22751 s%@build@%$build%g
22752 s%@build_alias@%$build_alias%g
22753 s%@build_cpu@%$build_cpu%g
22754 s%@build_vendor@%$build_vendor%g
22755 s%@build_os@%$build_os%g
22756 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22757 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22758 s%@INSTALL_DATA@%$INSTALL_DATA%g
22759 s%@PACKAGE@%$PACKAGE%g
22760 s%@VERSION@%$VERSION%g
22761 s%@ACLOCAL@%$ACLOCAL%g
22762 s%@AUTOCONF@%$AUTOCONF%g
22763 s%@AUTOMAKE@%$AUTOMAKE%g
22764 s%@AUTOHEADER@%$AUTOHEADER%g
22765 s%@MAKEINFO@%$MAKEINFO%g
22766 s%@install_sh@%$install_sh%g
22767 s%@AMTAR@%$AMTAR%g
22768 s%@AWK@%$AWK%g
22769 s%@AMTARFLAGS@%$AMTARFLAGS%g
22770 s%@SET_MAKE@%$SET_MAKE%g
22771 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22772 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
22773 s%@top_builddir@%$top_builddir%g
22774 s%@ldap_subdir@%$ldap_subdir%g
22775 s%@CC@%$CC%g
22776 s%@AR@%$AR%g
22777 s%@LN_S@%$LN_S%g
22778 s%@OBJEXT@%$OBJEXT%g
22779 s%@EXEEXT@%$EXEEXT%g
22780 s%@ECHO@%$ECHO%g
22781 s%@RANLIB@%$RANLIB%g
22782 s%@STRIP@%$STRIP%g
22783 s%@DLLTOOL@%$DLLTOOL%g
22784 s%@AS@%$AS%g
22785 s%@OBJDUMP@%$OBJDUMP%g
22786 s%@CPP@%$CPP%g
22787 s%@LIBTOOL@%$LIBTOOL%g
22788 s%@LN_H@%$LN_H%g
22789 s%@SENDMAIL@%$SENDMAIL%g
22790 s%@EDITOR@%$EDITOR%g
22791 s%@PERLBIN@%$PERLBIN%g
22792 s%@OL_MKDEP@%$OL_MKDEP%g
22793 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22794 s%@LIBOBJS@%$LIBOBJS%g
22795 s%@LIBSRCS@%$LIBSRCS%g
22796 s%@PLAT@%$PLAT%g
22797 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22798 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22799 s%@BUILD_BDB@%$BUILD_BDB%g
22800 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22801 s%@BUILD_LDAP@%$BUILD_LDAP%g
22802 s%@BUILD_LDBM@%$BUILD_LDBM%g
22803 s%@BUILD_META@%$BUILD_META%g
22804 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
22805 s%@BUILD_NULL@%$BUILD_NULL%g
22806 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
22807 s%@BUILD_PERL@%$BUILD_PERL%g
22808 s%@BUILD_SHELL@%$BUILD_SHELL%g
22809 s%@BUILD_SQL@%$BUILD_SQL%g
22810 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
22811 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
22812 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
22813 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
22814 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
22815 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
22816 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
22817 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
22818 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
22819 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
22820 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
22821 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
22822 s%@LDAP_LIBS@%$LDAP_LIBS%g
22823 s%@LDIF_LIBS@%$LDIF_LIBS%g
22824 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
22825 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
22826 s%@LDBM_LIBS@%$LDBM_LIBS%g
22827 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
22828 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
22829 s%@WRAP_LIBS@%$WRAP_LIBS%g
22830 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
22831 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
22832 s%@SLAPD_NO_STATIC@%$SLAPD_NO_STATIC%g
22833 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
22834 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
22835 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
22836 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
22837 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
22838 s%@KRB4_LIBS@%$KRB4_LIBS%g
22839 s%@KRB5_LIBS@%$KRB5_LIBS%g
22840 s%@READLINE_LIBS@%$READLINE_LIBS%g
22841 s%@SASL_LIBS@%$SASL_LIBS%g
22842 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
22843 s%@TLS_LIBS@%$TLS_LIBS%g
22844 s%@MODULES_LIBS@%$MODULES_LIBS%g
22845 s%@AUTH_LIBS@%$AUTH_LIBS%g
22846 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
22847 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
22848 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
22849 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
22850
22851 CEOF
22852 EOF
22853
22854 cat >> $CONFIG_STATUS <<\EOF
22855
22856 # Split the substitutions into bite-sized pieces for seds with
22857 # small command number limits, like on Digital OSF/1 and HP-UX.
22858 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
22859 ac_file=1 # Number of current file.
22860 ac_beg=1 # First line for current file.
22861 ac_end=$ac_max_sed_cmds # Line after last line for current file.
22862 ac_more_lines=:
22863 ac_sed_cmds=""
22864 while $ac_more_lines; do
22865   if test $ac_beg -gt 1; then
22866     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
22867   else
22868     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
22869   fi
22870   if test ! -s conftest.s$ac_file; then
22871     ac_more_lines=false
22872     rm -f conftest.s$ac_file
22873   else
22874     if test -z "$ac_sed_cmds"; then
22875       ac_sed_cmds="sed -f conftest.s$ac_file"
22876     else
22877       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
22878     fi
22879     ac_file=`expr $ac_file + 1`
22880     ac_beg=$ac_end
22881     ac_end=`expr $ac_end + $ac_max_sed_cmds`
22882   fi
22883 done
22884 if test -z "$ac_sed_cmds"; then
22885   ac_sed_cmds=cat
22886 fi
22887 EOF
22888
22889 cat >> $CONFIG_STATUS <<EOF
22890
22891 CONFIG_FILES=\${CONFIG_FILES-"\
22892 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22893 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22894 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22895 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22896 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22897 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22898 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22899 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22900 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22901 include/Makefile:build/top.mk:include/Makefile.in \
22902 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22903 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22904 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22905 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22906 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22907 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22908 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22909 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22910 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22911 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22912 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22913 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22914 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22915 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22916 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22917 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22918 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22919 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22920 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22921 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22922 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22923 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22924 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22925 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22926 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22927 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22928 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22929 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22930 "}
22931 EOF
22932 cat >> $CONFIG_STATUS <<\EOF
22933 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
22934   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22935   case "$ac_file" in
22936   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22937        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22938   *) ac_file_in="${ac_file}.in" ;;
22939   esac
22940
22941   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
22942
22943   # Remove last slash and all that follows it.  Not all systems have dirname.
22944   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22945   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22946     # The file is in a subdirectory.
22947     test ! -d "$ac_dir" && mkdir "$ac_dir"
22948     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
22949     # A "../" for each directory in $ac_dir_suffix.
22950     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
22951   else
22952     ac_dir_suffix= ac_dots=
22953   fi
22954
22955   case "$ac_given_srcdir" in
22956   .)  srcdir=.
22957       if test -z "$ac_dots"; then top_srcdir=.
22958       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
22959   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
22960   *) # Relative path.
22961     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
22962     top_srcdir="$ac_dots$ac_given_srcdir" ;;
22963   esac
22964
22965   case "$ac_given_INSTALL" in
22966   [/$]*) INSTALL="$ac_given_INSTALL" ;;
22967   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
22968   esac
22969
22970   echo creating "$ac_file"
22971   rm -f "$ac_file"
22972   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
22973   case "$ac_file" in
22974   *[Mm]akefile*) ac_comsub="1i\\
22975 # $configure_input" ;;
22976   *) ac_comsub= ;;
22977   esac
22978
22979   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22980   sed -e "$ac_comsub
22981 s%@configure_input@%$configure_input%g
22982 s%@srcdir@%$srcdir%g
22983 s%@top_srcdir@%$top_srcdir%g
22984 s%@INSTALL@%$INSTALL%g
22985 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
22986 fi; done
22987 rm -f conftest.s*
22988
22989 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22990 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22991 #
22992 # ac_d sets the value in "#define NAME VALUE" lines.
22993 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22994 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
22995 ac_dC='\3'
22996 ac_dD='%g'
22997 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22998 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22999 ac_uB='\([      ]\)%\1#\2define\3'
23000 ac_uC=' '
23001 ac_uD='\4%g'
23002 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23003 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23004 ac_eB='$%\1#\2define\3'
23005 ac_eC=' '
23006 ac_eD='%g'
23007
23008 if test "${CONFIG_HEADERS+set}" != set; then
23009 EOF
23010 cat >> $CONFIG_STATUS <<EOF
23011   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23012 EOF
23013 cat >> $CONFIG_STATUS <<\EOF
23014 fi
23015 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23016   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23017   case "$ac_file" in
23018   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23019        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23020   *) ac_file_in="${ac_file}.in" ;;
23021   esac
23022
23023   echo creating $ac_file
23024
23025   rm -f conftest.frag conftest.in conftest.out
23026   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23027   cat $ac_file_inputs > conftest.in
23028
23029 EOF
23030
23031 # Transform confdefs.h into a sed script conftest.vals that substitutes
23032 # the proper values into config.h.in to produce config.h.  And first:
23033 # Protect against being on the right side of a sed subst in config.status.
23034 # Protect against being in an unquoted here document in config.status.
23035 rm -f conftest.vals
23036 cat > conftest.hdr <<\EOF
23037 s/[\\&%]/\\&/g
23038 s%[\\$`]%\\&%g
23039 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23040 s%ac_d%ac_u%gp
23041 s%ac_u%ac_e%gp
23042 EOF
23043 sed -n -f conftest.hdr confdefs.h > conftest.vals
23044 rm -f conftest.hdr
23045
23046 # This sed command replaces #undef with comments.  This is necessary, for
23047 # example, in the case of _POSIX_SOURCE, which is predefined and required
23048 # on some systems where configure will not decide to define it.
23049 cat >> conftest.vals <<\EOF
23050 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23051 EOF
23052
23053 # Break up conftest.vals because some shells have a limit on
23054 # the size of here documents, and old seds have small limits too.
23055
23056 rm -f conftest.tail
23057 while :
23058 do
23059   ac_lines=`grep -c . conftest.vals`
23060   # grep -c gives empty output for an empty file on some AIX systems.
23061   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23062   # Write a limited-size here document to conftest.frag.
23063   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23064   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23065   echo 'CEOF
23066   sed -f conftest.frag conftest.in > conftest.out
23067   rm -f conftest.in
23068   mv conftest.out conftest.in
23069 ' >> $CONFIG_STATUS
23070   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23071   rm -f conftest.vals
23072   mv conftest.tail conftest.vals
23073 done
23074 rm -f conftest.vals
23075
23076 cat >> $CONFIG_STATUS <<\EOF
23077   rm -f conftest.frag conftest.h
23078   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23079   cat conftest.in >> conftest.h
23080   rm -f conftest.in
23081   if cmp -s $ac_file conftest.h 2>/dev/null; then
23082     echo "$ac_file is unchanged"
23083     rm -f conftest.h
23084   else
23085     # Remove last slash and all that follows it.  Not all systems have dirname.
23086       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23087       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23088       # The file is in a subdirectory.
23089       test ! -d "$ac_dir" && mkdir "$ac_dir"
23090     fi
23091     rm -f $ac_file
23092     mv conftest.h $ac_file
23093   fi
23094 fi; done
23095
23096 EOF
23097 cat >> $CONFIG_STATUS <<EOF
23098
23099 EOF
23100 cat >> $CONFIG_STATUS <<\EOF
23101
23102 date > stamp-h
23103 echo Please run \"make depend\" to build dependencies
23104
23105 exit 0
23106 EOF
23107 chmod +x $CONFIG_STATUS
23108 rm -fr confdefs* $ac_clean_files
23109 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23110