]> git.sur5r.net Git - openldap/blob - configure
Import updated Makefiles with dynamic linking changes
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.408.2.6 2002/05/22 14:25:38 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_LIB=
2816 LDBM_LIBS=
2817 LTHREAD_LIBS=
2818 LUTIL_LIBS=
2819
2820 SLAPD_LIBS=
2821 SLURPD_LIBS=
2822
2823 BUILD_SLAPD=no
2824 BUILD_SLURPD=no
2825
2826 BUILD_THREAD=no
2827
2828 BUILD_BDB=no
2829 BUILD_DNSSRV=no
2830 BUILD_LDAP=no
2831 BUILD_LDBM=no
2832 BUILD_META=no
2833 BUILD_MONITOR=no
2834 BUILD_NULL=no
2835 BUILD_PASSWD=no
2836 BUILD_PERL=no
2837 BUILD_SHELL=no
2838 BUILD_SQL=no
2839
2840 BUILD_BDB_DYNAMIC=static
2841 BUILD_DNSSRV_DYNAMIC=static
2842 BUILD_LDAP_DYNAMIC=static
2843 BUILD_LDBM_DYNAMIC=static
2844 BUILD_META_DYNAMIC=static
2845 BUILD_MONITOR_DYNAMIC=static
2846 BUILD_NULL_DYNAMIC=static
2847 BUILD_PASSWD_DYNAMIC=static
2848 BUILD_PERL_DYNAMIC=static
2849 BUILD_SHELL_DYNAMIC=static
2850 BUILD_SQL_DYNAMIC=static
2851
2852 SLAPD_MODULES_LDFLAGS=
2853 SLAPD_MODULES_CPPFLAGS=
2854
2855 SLAPD_STATIC_BACKENDS=
2856 SLAPD_DYNAMIC_BACKENDS=
2857
2858 SLAPD_PERL_LDFLAGS=
2859 MOD_PERL_LDFLAGS=
2860 PERL_CPPFLAGS=
2861
2862 SLAPD_SQL_LDFLAGS=
2863 SLAPD_SQL_LIBS=
2864 SLAPD_SQL_INCLUDES=
2865
2866 KRB4_LIBS=
2867 KRB5_LIBS=
2868 READLINE_LIBS=
2869 SASL_LIBS=
2870 TERMCAP_LIBS=
2871 TLS_LIBS=
2872 MODULES_LIBS=
2873 AUTH_LIBS=
2874
2875 SLAPD_SLP_LIBS=
2876
2877
2878 # Find a good install program.  We prefer a C program (faster),
2879 # so one script is as good as another.  But avoid the broken or
2880 # incompatible versions:
2881 # SysV /etc/install, /usr/sbin/install
2882 # SunOS /usr/etc/install
2883 # IRIX /sbin/install
2884 # AIX /bin/install
2885 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2886 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2887 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2888 # ./install, which can be erroneously created by make from ./install.sh.
2889 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2890 echo "configure:2891: checking for a BSD compatible install" >&5
2891 if test -z "$INSTALL"; then
2892 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2893   echo $ac_n "(cached) $ac_c" 1>&6
2894 else
2895     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2896   for ac_dir in $PATH; do
2897     # Account for people who put trailing slashes in PATH elements.
2898     case "$ac_dir/" in
2899     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2900     *)
2901       # OSF1 and SCO ODT 3.0 have their own names for install.
2902       # Don't use installbsd from OSF since it installs stuff as root
2903       # by default.
2904       for ac_prog in ginstall scoinst install; do
2905         if test -f $ac_dir/$ac_prog; then
2906           if test $ac_prog = install &&
2907             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2908             # AIX install.  It has an incompatible calling convention.
2909             :
2910           elif test $ac_prog = install &&
2911             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2912             # program-specific install script used by HP pwplus--don't use.
2913             :
2914           else
2915             ac_cv_path_install="$ac_dir/$ac_prog -c"
2916             break 2
2917           fi
2918         fi
2919       done
2920       ;;
2921     esac
2922   done
2923   IFS="$ac_save_IFS"
2924
2925 fi
2926   if test "${ac_cv_path_install+set}" = set; then
2927     INSTALL="$ac_cv_path_install"
2928   else
2929     # As a last resort, use the slow shell script.  We don't cache a
2930     # path for INSTALL within a source directory, because that will
2931     # break other packages using the cache if that directory is
2932     # removed, or if the path is relative.
2933     INSTALL="$ac_install_sh"
2934   fi
2935 fi
2936 echo "$ac_t""$INSTALL" 1>&6
2937
2938 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2939 # It thinks the first close brace ends the variable substitution.
2940 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2941
2942 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2943
2944 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2945
2946
2947 cat >> confdefs.h <<\EOF
2948 #define HAVE_MKVERSION 1
2949 EOF
2950
2951
2952
2953
2954 ol_aix_threads=no
2955 case "$target" in
2956 *-*-aix*)       if test -z "$CC" ; then
2957                 case "$ol_with_threads" in
2958                 auto | yes |  posix) ol_aix_threads=yes ;;
2959                 esac
2960         fi
2961 ;;
2962 esac
2963
2964 if test $ol_aix_threads = yes ; then
2965         if test -z "${CC}" ; then
2966                 for ac_prog in cc_r xlc_r cc
2967 do
2968 # Extract the first word of "$ac_prog", so it can be a program name with args.
2969 set dummy $ac_prog; ac_word=$2
2970 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2971 echo "configure:2972: checking for $ac_word" >&5
2972 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2973   echo $ac_n "(cached) $ac_c" 1>&6
2974 else
2975   if test -n "$CC"; then
2976   ac_cv_prog_CC="$CC" # Let the user override the test.
2977 else
2978   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2979   ac_dummy="$PATH"
2980   for ac_dir in $ac_dummy; do
2981     test -z "$ac_dir" && ac_dir=.
2982     if test -f $ac_dir/$ac_word; then
2983       ac_cv_prog_CC="$ac_prog"
2984       break
2985     fi
2986   done
2987   IFS="$ac_save_ifs"
2988 fi
2989 fi
2990 CC="$ac_cv_prog_CC"
2991 if test -n "$CC"; then
2992   echo "$ac_t""$CC" 1>&6
2993 else
2994   echo "$ac_t""no" 1>&6
2995 fi
2996
2997 test -n "$CC" && break
2998 done
2999
3000
3001                 if test "$CC" = cc ; then
3002                                                 if test $ol_with_threads != auto ; then
3003                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3004                         else
3005                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3006                         fi
3007                         ol_with_threads=no
3008                 fi
3009         fi
3010
3011         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3012                 ol_with_threads=posix
3013                 ol_cv_pthread_create=yes
3014         fi
3015 fi
3016
3017 if test -z "${CC}"; then
3018         for ac_prog in cc
3019 do
3020 # Extract the first word of "$ac_prog", so it can be a program name with args.
3021 set dummy $ac_prog; ac_word=$2
3022 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3023 echo "configure:3024: checking for $ac_word" >&5
3024 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3025   echo $ac_n "(cached) $ac_c" 1>&6
3026 else
3027   if test -n "$CC"; then
3028   ac_cv_prog_CC="$CC" # Let the user override the test.
3029 else
3030   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3031   ac_dummy="$PATH"
3032   for ac_dir in $ac_dummy; do
3033     test -z "$ac_dir" && ac_dir=.
3034     if test -f $ac_dir/$ac_word; then
3035       ac_cv_prog_CC="$ac_prog"
3036       break
3037     fi
3038   done
3039   IFS="$ac_save_ifs"
3040 fi
3041 fi
3042 CC="$ac_cv_prog_CC"
3043 if test -n "$CC"; then
3044   echo "$ac_t""$CC" 1>&6
3045 else
3046   echo "$ac_t""no" 1>&6
3047 fi
3048
3049 test -n "$CC" && break
3050 done
3051
3052 fi
3053
3054
3055 if test -z "${AR}"; then
3056         for ac_prog in ar gar
3057 do
3058 # Extract the first word of "$ac_prog", so it can be a program name with args.
3059 set dummy $ac_prog; ac_word=$2
3060 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3061 echo "configure:3062: checking for $ac_word" >&5
3062 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3063   echo $ac_n "(cached) $ac_c" 1>&6
3064 else
3065   if test -n "$AR"; then
3066   ac_cv_prog_AR="$AR" # Let the user override the test.
3067 else
3068   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3069   ac_dummy="$PATH"
3070   for ac_dir in $ac_dummy; do
3071     test -z "$ac_dir" && ac_dir=.
3072     if test -f $ac_dir/$ac_word; then
3073       ac_cv_prog_AR="$ac_prog"
3074       break
3075     fi
3076   done
3077   IFS="$ac_save_ifs"
3078 fi
3079 fi
3080 AR="$ac_cv_prog_AR"
3081 if test -n "$AR"; then
3082   echo "$ac_t""$AR" 1>&6
3083 else
3084   echo "$ac_t""no" 1>&6
3085 fi
3086
3087 test -n "$AR" && break
3088 done
3089 test -n "$AR" || AR="missing"
3090
3091
3092         if test "${AR}" = "missing" ; then
3093                 { echo "configure: error: Unable to locate ar(1).  Check PATH or set AR." 1>&2; exit 1; }
3094         fi
3095 fi
3096
3097
3098
3099 # Find the correct PATH separator.  Usually this is `:', but
3100 # DJGPP uses `;' like DOS.
3101 if test "X${PATH_SEPARATOR+set}" != Xset; then
3102   UNAME=${UNAME-`uname 2>/dev/null`}
3103   case X$UNAME in
3104     *-DOS) lt_cv_sys_path_separator=';' ;;
3105     *)     lt_cv_sys_path_separator=':' ;;
3106   esac
3107   PATH_SEPARATOR=$lt_cv_sys_path_separator
3108 fi
3109
3110 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3111 echo "configure:3112: checking for Cygwin environment" >&5
3112 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3113   echo $ac_n "(cached) $ac_c" 1>&6
3114 else
3115   cat > conftest.$ac_ext <<EOF
3116 #line 3117 "configure"
3117 #include "confdefs.h"
3118
3119 int main() {
3120
3121 #ifndef __CYGWIN__
3122 #define __CYGWIN__ __CYGWIN32__
3123 #endif
3124 return __CYGWIN__;
3125 ; return 0; }
3126 EOF
3127 if { (eval echo configure:3128: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3128   rm -rf conftest*
3129   ac_cv_cygwin=yes
3130 else
3131   echo "configure: failed program was:" >&5
3132   cat conftest.$ac_ext >&5
3133   rm -rf conftest*
3134   ac_cv_cygwin=no
3135 fi
3136 rm -f conftest*
3137 fi
3138
3139 echo "$ac_t""$ac_cv_cygwin" 1>&6
3140 CYGWIN=
3141 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3142 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3143 echo "configure:3144: checking for mingw32 environment" >&5
3144 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3145   echo $ac_n "(cached) $ac_c" 1>&6
3146 else
3147   cat > conftest.$ac_ext <<EOF
3148 #line 3149 "configure"
3149 #include "confdefs.h"
3150
3151 int main() {
3152 return __MINGW32__;
3153 ; return 0; }
3154 EOF
3155 if { (eval echo configure:3156: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3156   rm -rf conftest*
3157   ac_cv_mingw32=yes
3158 else
3159   echo "configure: failed program was:" >&5
3160   cat conftest.$ac_ext >&5
3161   rm -rf conftest*
3162   ac_cv_mingw32=no
3163 fi
3164 rm -f conftest*
3165 fi
3166
3167 echo "$ac_t""$ac_cv_mingw32" 1>&6
3168 MINGW32=
3169 test "$ac_cv_mingw32" = yes && MINGW32=yes
3170 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3171 echo "configure:3172: checking for EMX OS/2 environment" >&5
3172 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3173   echo $ac_n "(cached) $ac_c" 1>&6
3174 else
3175   cat > conftest.$ac_ext <<EOF
3176 #line 3177 "configure"
3177 #include "confdefs.h"
3178
3179 int main() {
3180 return __EMX__;
3181 ; return 0; }
3182 EOF
3183 if { (eval echo configure:3184: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3184   rm -rf conftest*
3185   ac_cv_emxos2=yes
3186 else
3187   echo "configure: failed program was:" >&5
3188   cat conftest.$ac_ext >&5
3189   rm -rf conftest*
3190   ac_cv_emxos2=no
3191 fi
3192 rm -f conftest*
3193 fi
3194
3195 echo "$ac_t""$ac_cv_emxos2" 1>&6
3196 EMXOS2=
3197 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3198 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3199 echo "configure:3200: checking how to run the C preprocessor" >&5
3200 # On Suns, sometimes $CPP names a directory.
3201 if test -n "$CPP" && test -d "$CPP"; then
3202   CPP=
3203 fi
3204 if test -z "$CPP"; then
3205 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3206   echo $ac_n "(cached) $ac_c" 1>&6
3207 else
3208     # This must be in double quotes, not single quotes, because CPP may get
3209   # substituted into the Makefile and "${CC-cc}" will confuse make.
3210   CPP="${CC-cc} -E"
3211   # On the NeXT, cc -E runs the code through the compiler's parser,
3212   # not just through cpp.
3213   cat > conftest.$ac_ext <<EOF
3214 #line 3215 "configure"
3215 #include "confdefs.h"
3216 #include <assert.h>
3217 Syntax Error
3218 EOF
3219 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3220 { (eval echo configure:3221: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3221 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3222 if test -z "$ac_err"; then
3223   :
3224 else
3225   echo "$ac_err" >&5
3226   echo "configure: failed program was:" >&5
3227   cat conftest.$ac_ext >&5
3228   rm -rf conftest*
3229   CPP="${CC-cc} -E -traditional-cpp"
3230   cat > conftest.$ac_ext <<EOF
3231 #line 3232 "configure"
3232 #include "confdefs.h"
3233 #include <assert.h>
3234 Syntax Error
3235 EOF
3236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3237 { (eval echo configure:3238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3239 if test -z "$ac_err"; then
3240   :
3241 else
3242   echo "$ac_err" >&5
3243   echo "configure: failed program was:" >&5
3244   cat conftest.$ac_ext >&5
3245   rm -rf conftest*
3246   CPP="${CC-cc} -nologo -E"
3247   cat > conftest.$ac_ext <<EOF
3248 #line 3249 "configure"
3249 #include "confdefs.h"
3250 #include <assert.h>
3251 Syntax Error
3252 EOF
3253 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3254 { (eval echo configure:3255: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3255 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3256 if test -z "$ac_err"; then
3257   :
3258 else
3259   echo "$ac_err" >&5
3260   echo "configure: failed program was:" >&5
3261   cat conftest.$ac_ext >&5
3262   rm -rf conftest*
3263   CPP=/lib/cpp
3264 fi
3265 rm -f conftest*
3266 fi
3267 rm -f conftest*
3268 fi
3269 rm -f conftest*
3270   ac_cv_prog_CPP="$CPP"
3271 fi
3272   CPP="$ac_cv_prog_CPP"
3273 else
3274   ac_cv_prog_CPP="$CPP"
3275 fi
3276 echo "$ac_t""$CPP" 1>&6
3277
3278 # Check whether --enable-fast-install or --disable-fast-install was given.
3279 if test "${enable_fast_install+set}" = set; then
3280   enableval="$enable_fast_install"
3281   p=${PACKAGE-default}
3282 case $enableval in
3283 yes) enable_fast_install=yes ;;
3284 no) enable_fast_install=no ;;
3285 *)
3286   enable_fast_install=no
3287   # Look at the argument we got.  We use all the common list separators.
3288   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3289   for pkg in $enableval; do
3290     if test "X$pkg" = "X$p"; then
3291       enable_fast_install=yes
3292     fi
3293   done
3294   IFS="$ac_save_ifs"
3295   ;;
3296 esac
3297 else
3298   enable_fast_install=yes
3299 fi
3300
3301 # Extract the first word of "gcc", so it can be a program name with args.
3302 set dummy gcc; ac_word=$2
3303 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3304 echo "configure:3305: checking for $ac_word" >&5
3305 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3306   echo $ac_n "(cached) $ac_c" 1>&6
3307 else
3308   if test -n "$CC"; then
3309   ac_cv_prog_CC="$CC" # Let the user override the test.
3310 else
3311   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3312   ac_dummy="$PATH"
3313   for ac_dir in $ac_dummy; do
3314     test -z "$ac_dir" && ac_dir=.
3315     if test -f $ac_dir/$ac_word; then
3316       ac_cv_prog_CC="gcc"
3317       break
3318     fi
3319   done
3320   IFS="$ac_save_ifs"
3321 fi
3322 fi
3323 CC="$ac_cv_prog_CC"
3324 if test -n "$CC"; then
3325   echo "$ac_t""$CC" 1>&6
3326 else
3327   echo "$ac_t""no" 1>&6
3328 fi
3329
3330 if test -z "$CC"; then
3331   # Extract the first word of "cc", so it can be a program name with args.
3332 set dummy cc; ac_word=$2
3333 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3334 echo "configure:3335: checking for $ac_word" >&5
3335 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3336   echo $ac_n "(cached) $ac_c" 1>&6
3337 else
3338   if test -n "$CC"; then
3339   ac_cv_prog_CC="$CC" # Let the user override the test.
3340 else
3341   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3342   ac_prog_rejected=no
3343   ac_dummy="$PATH"
3344   for ac_dir in $ac_dummy; do
3345     test -z "$ac_dir" && ac_dir=.
3346     if test -f $ac_dir/$ac_word; then
3347       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3348         ac_prog_rejected=yes
3349         continue
3350       fi
3351       ac_cv_prog_CC="cc"
3352       break
3353     fi
3354   done
3355   IFS="$ac_save_ifs"
3356 if test $ac_prog_rejected = yes; then
3357   # We found a bogon in the path, so make sure we never use it.
3358   set dummy $ac_cv_prog_CC
3359   shift
3360   if test $# -gt 0; then
3361     # We chose a different compiler from the bogus one.
3362     # However, it has the same basename, so the bogon will be chosen
3363     # first if we set CC to just the basename; use the full file name.
3364     shift
3365     set dummy "$ac_dir/$ac_word" "$@"
3366     shift
3367     ac_cv_prog_CC="$@"
3368   fi
3369 fi
3370 fi
3371 fi
3372 CC="$ac_cv_prog_CC"
3373 if test -n "$CC"; then
3374   echo "$ac_t""$CC" 1>&6
3375 else
3376   echo "$ac_t""no" 1>&6
3377 fi
3378
3379   if test -z "$CC"; then
3380     case "`uname -s`" in
3381     *win32* | *WIN32* | *CYGWIN*)
3382       # Extract the first word of "cl", so it can be a program name with args.
3383 set dummy cl; ac_word=$2
3384 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3385 echo "configure:3386: checking for $ac_word" >&5
3386 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3387   echo $ac_n "(cached) $ac_c" 1>&6
3388 else
3389   if test -n "$CC"; then
3390   ac_cv_prog_CC="$CC" # Let the user override the test.
3391 else
3392   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3393   ac_dummy="$PATH"
3394   for ac_dir in $ac_dummy; do
3395     test -z "$ac_dir" && ac_dir=.
3396     if test -f $ac_dir/$ac_word; then
3397       ac_cv_prog_CC="cl"
3398       break
3399     fi
3400   done
3401   IFS="$ac_save_ifs"
3402 fi
3403 fi
3404 CC="$ac_cv_prog_CC"
3405 if test -n "$CC"; then
3406   echo "$ac_t""$CC" 1>&6
3407 else
3408   echo "$ac_t""no" 1>&6
3409 fi
3410  ;;
3411     esac
3412   fi
3413   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3414 fi
3415
3416 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3417 echo "configure:3418: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3418
3419 ac_ext=c
3420 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3421 ac_cpp='$CPP $CPPFLAGS'
3422 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3423 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3424 cross_compiling=$ac_cv_prog_cc_cross
3425
3426 cat > conftest.$ac_ext << EOF
3427
3428 #line 3429 "configure"
3429 #include "confdefs.h"
3430
3431 main(){return(0);}
3432 EOF
3433 if { (eval echo configure:3434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3434   ac_cv_prog_cc_works=yes
3435   # If we can't run a trivial program, we are probably using a cross compiler.
3436   if (./conftest; exit) 2>/dev/null; then
3437     ac_cv_prog_cc_cross=no
3438   else
3439     ac_cv_prog_cc_cross=yes
3440   fi
3441 else
3442   echo "configure: failed program was:" >&5
3443   cat conftest.$ac_ext >&5
3444   ac_cv_prog_cc_works=no
3445 fi
3446 rm -fr conftest*
3447 ac_ext=c
3448 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3449 ac_cpp='$CPP $CPPFLAGS'
3450 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3451 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3452 cross_compiling=$ac_cv_prog_cc_cross
3453
3454 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3455 if test $ac_cv_prog_cc_works = no; then
3456   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3457 fi
3458 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3459 echo "configure:3460: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3460 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3461 cross_compiling=$ac_cv_prog_cc_cross
3462
3463 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3464 echo "configure:3465: checking whether we are using GNU C" >&5
3465 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3466   echo $ac_n "(cached) $ac_c" 1>&6
3467 else
3468   cat > conftest.c <<EOF
3469 #ifdef __GNUC__
3470   yes;
3471 #endif
3472 EOF
3473 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3474: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3474   ac_cv_prog_gcc=yes
3475 else
3476   ac_cv_prog_gcc=no
3477 fi
3478 fi
3479
3480 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3481
3482 if test $ac_cv_prog_gcc = yes; then
3483   GCC=yes
3484 else
3485   GCC=
3486 fi
3487
3488 ac_test_CFLAGS="${CFLAGS+set}"
3489 ac_save_CFLAGS="$CFLAGS"
3490 CFLAGS=
3491 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3492 echo "configure:3493: checking whether ${CC-cc} accepts -g" >&5
3493 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3494   echo $ac_n "(cached) $ac_c" 1>&6
3495 else
3496   echo 'void f(){}' > conftest.c
3497 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3498   ac_cv_prog_cc_g=yes
3499 else
3500   ac_cv_prog_cc_g=no
3501 fi
3502 rm -f conftest*
3503
3504 fi
3505
3506 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3507 if test "$ac_test_CFLAGS" = set; then
3508   CFLAGS="$ac_save_CFLAGS"
3509 elif test $ac_cv_prog_cc_g = yes; then
3510   if test "$GCC" = yes; then
3511     CFLAGS="-g -O2"
3512   else
3513     CFLAGS="-g"
3514   fi
3515 else
3516   if test "$GCC" = yes; then
3517     CFLAGS="-O2"
3518   else
3519     CFLAGS=
3520   fi
3521 fi
3522
3523 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3524 if test "${with_gnu_ld+set}" = set; then
3525   withval="$with_gnu_ld"
3526   test "$withval" = no || with_gnu_ld=yes
3527 else
3528   with_gnu_ld=no
3529 fi
3530
3531 ac_prog=ld
3532 if test "$GCC" = yes; then
3533   # Check if gcc -print-prog-name=ld gives a path.
3534   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3535 echo "configure:3536: checking for ld used by GCC" >&5
3536   case $host in
3537   *-*-mingw*)
3538     # gcc leaves a trailing carriage return which upsets mingw
3539     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3540   *)
3541     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3542   esac
3543   case $ac_prog in
3544     # Accept absolute paths.
3545     [\\/]* | [A-Za-z]:[\\/]*)
3546       re_direlt='/[^/][^/]*/\.\./'
3547       # Canonicalize the path of ld
3548       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3549       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3550         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3551       done
3552       test -z "$LD" && LD="$ac_prog"
3553       ;;
3554   "")
3555     # If it fails, then pretend we aren't using GCC.
3556     ac_prog=ld
3557     ;;
3558   *)
3559     # If it is relative, then search for the first ld in PATH.
3560     with_gnu_ld=unknown
3561     ;;
3562   esac
3563 elif test "$with_gnu_ld" = yes; then
3564   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3565 echo "configure:3566: checking for GNU ld" >&5
3566 else
3567   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3568 echo "configure:3569: checking for non-GNU ld" >&5
3569 fi
3570 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3571   echo $ac_n "(cached) $ac_c" 1>&6
3572 else
3573   if test -z "$LD"; then
3574   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3575   for ac_dir in $PATH; do
3576     test -z "$ac_dir" && ac_dir=.
3577     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3578       lt_cv_path_LD="$ac_dir/$ac_prog"
3579       # Check to see if the program is GNU ld.  I'd rather use --version,
3580       # but apparently some GNU ld's only accept -v.
3581       # Break only if it was the GNU/non-GNU ld that we prefer.
3582       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3583         test "$with_gnu_ld" != no && break
3584       else
3585         test "$with_gnu_ld" != yes && break
3586       fi
3587     fi
3588   done
3589   IFS="$ac_save_ifs"
3590 else
3591   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3592 fi
3593 fi
3594
3595 LD="$lt_cv_path_LD"
3596 if test -n "$LD"; then
3597   echo "$ac_t""$LD" 1>&6
3598 else
3599   echo "$ac_t""no" 1>&6
3600 fi
3601 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3602 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3603 echo "configure:3604: checking if the linker ($LD) is GNU ld" >&5
3604 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3605   echo $ac_n "(cached) $ac_c" 1>&6
3606 else
3607   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3608 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3609   lt_cv_prog_gnu_ld=yes
3610 else
3611   lt_cv_prog_gnu_ld=no
3612 fi
3613 fi
3614
3615 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3616 with_gnu_ld=$lt_cv_prog_gnu_ld
3617
3618
3619 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3620 echo "configure:3621: checking for $LD option to reload object files" >&5
3621 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3622   echo $ac_n "(cached) $ac_c" 1>&6
3623 else
3624   lt_cv_ld_reload_flag='-r'
3625 fi
3626
3627 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3628 reload_flag=$lt_cv_ld_reload_flag
3629 test -n "$reload_flag" && reload_flag=" $reload_flag"
3630
3631 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3632 echo "configure:3633: checking for BSD-compatible nm" >&5
3633 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3634   echo $ac_n "(cached) $ac_c" 1>&6
3635 else
3636   if test -n "$NM"; then
3637   # Let the user override the test.
3638   lt_cv_path_NM="$NM"
3639 else
3640   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3641   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3642     test -z "$ac_dir" && ac_dir=.
3643     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3644     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3645       # Check to see if the nm accepts a BSD-compat flag.
3646       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3647       #   nm: unknown option "B" ignored
3648       # Tru64's nm complains that /dev/null is an invalid object file
3649       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3650         lt_cv_path_NM="$tmp_nm -B"
3651         break
3652       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3653         lt_cv_path_NM="$tmp_nm -p"
3654         break
3655       else
3656         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3657         continue # so that we can try to find one that supports BSD flags
3658       fi
3659     fi
3660   done
3661   IFS="$ac_save_ifs"
3662   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3663 fi
3664 fi
3665
3666 NM="$lt_cv_path_NM"
3667 echo "$ac_t""$NM" 1>&6
3668
3669 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3670 echo "configure:3671: checking whether ln -s works" >&5
3671 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3672   echo $ac_n "(cached) $ac_c" 1>&6
3673 else
3674   rm -f conftestdata
3675 if ln -s X conftestdata 2>/dev/null
3676 then
3677   rm -f conftestdata
3678   ac_cv_prog_LN_S="ln -s"
3679 else
3680   ac_cv_prog_LN_S=ln
3681 fi
3682 fi
3683 LN_S="$ac_cv_prog_LN_S"
3684 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3685   echo "$ac_t""yes" 1>&6
3686 else
3687   echo "$ac_t""no" 1>&6
3688 fi
3689
3690 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3691 echo "configure:3692: checking how to recognise dependant libraries" >&5
3692 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3693   echo $ac_n "(cached) $ac_c" 1>&6
3694 else
3695   lt_cv_file_magic_cmd='$MAGIC_CMD'
3696 lt_cv_file_magic_test_file=
3697 lt_cv_deplibs_check_method='unknown'
3698 # Need to set the preceding variable on all platforms that support
3699 # interlibrary dependencies.
3700 # 'none' -- dependencies not supported.
3701 # `unknown' -- same as none, but documents that we really don't know.
3702 # 'pass_all' -- all dependencies passed with no checks.
3703 # 'test_compile' -- check by making test program.
3704 # 'file_magic [[regex]]' -- check by looking for files in library path
3705 # which responds to the $file_magic_cmd with a given egrep regex.
3706 # If you have `file' or equivalent on your system and you're not sure
3707 # whether `pass_all' will *always* work, you probably want this one.
3708
3709 case $host_os in
3710 aix4* | aix5*)
3711   lt_cv_deplibs_check_method=pass_all
3712   ;;
3713
3714 beos*)
3715   lt_cv_deplibs_check_method=pass_all
3716   ;;
3717
3718 bsdi4*)
3719   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3720   lt_cv_file_magic_cmd='/usr/bin/file -L'
3721   lt_cv_file_magic_test_file=/shlib/libc.so
3722   ;;
3723
3724 cygwin* | mingw* | pw32*)
3725   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3726   lt_cv_file_magic_cmd='$OBJDUMP -f'
3727   ;;
3728
3729 darwin* | rhapsody*)
3730   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3731   lt_cv_file_magic_cmd='/usr/bin/file -L'
3732   case "$host_os" in
3733   rhapsody* | darwin1.[012])
3734     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3735     ;;
3736   *) # Darwin 1.3 on
3737     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3738     ;;
3739   esac
3740   ;;
3741
3742 freebsd*)
3743   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3744     case $host_cpu in
3745     i*86 )
3746       # Not sure whether the presence of OpenBSD here was a mistake.
3747       # Let's accept both of them until this is cleared up.
3748       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3749       lt_cv_file_magic_cmd=/usr/bin/file
3750       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3751       ;;
3752     esac
3753   else
3754     lt_cv_deplibs_check_method=pass_all
3755   fi
3756   ;;
3757
3758 gnu*)
3759   lt_cv_deplibs_check_method=pass_all
3760   ;;
3761
3762 hpux10.20*|hpux11*)
3763   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3764   lt_cv_file_magic_cmd=/usr/bin/file
3765   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3766   ;;
3767
3768 irix5* | irix6*)
3769   case $host_os in
3770   irix5*)
3771     # this will be overridden with pass_all, but let us keep it just in case
3772     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3773     ;;
3774   *)
3775     case $LD in
3776     *-32|*"-32 ") libmagic=32-bit;;
3777     *-n32|*"-n32 ") libmagic=N32;;
3778     *-64|*"-64 ") libmagic=64-bit;;
3779     *) libmagic=never-match;;
3780     esac
3781     # this will be overridden with pass_all, but let us keep it just in case
3782     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3783     ;;
3784   esac
3785   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3786   lt_cv_deplibs_check_method=pass_all
3787   ;;
3788
3789 # This must be Linux ELF.
3790 linux-gnu*)
3791   case $host_cpu in
3792   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3793     lt_cv_deplibs_check_method=pass_all ;;
3794   *)
3795     # glibc up to 2.1.1 does not perform some relocations on ARM
3796     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3797   esac
3798   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3799   ;;
3800
3801 netbsd*)
3802   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3803     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3804   else
3805     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3806   fi
3807   ;;
3808
3809 newos6*)
3810   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3811   lt_cv_file_magic_cmd=/usr/bin/file
3812   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3813   ;;
3814
3815 openbsd*)
3816   lt_cv_file_magic_cmd=/usr/bin/file
3817   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3818   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3819     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3820   else
3821     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3822   fi
3823   ;;
3824
3825 osf3* | osf4* | osf5*)
3826   # this will be overridden with pass_all, but let us keep it just in case
3827   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3828   lt_cv_file_magic_test_file=/shlib/libc.so
3829   lt_cv_deplibs_check_method=pass_all
3830   ;;
3831
3832 sco3.2v5*)
3833   lt_cv_deplibs_check_method=pass_all
3834   ;;
3835
3836 solaris*)
3837   lt_cv_deplibs_check_method=pass_all
3838   lt_cv_file_magic_test_file=/lib/libc.so
3839   ;;
3840
3841 sysv5uw[78]* | sysv4*uw2*)
3842   lt_cv_deplibs_check_method=pass_all
3843   ;;
3844
3845 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3846   case $host_vendor in
3847   motorola)
3848     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]'
3849     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3850     ;;
3851   ncr)
3852     lt_cv_deplibs_check_method=pass_all
3853     ;;
3854   sequent)
3855     lt_cv_file_magic_cmd='/bin/file'
3856     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3857     ;;
3858   sni)
3859     lt_cv_file_magic_cmd='/bin/file'
3860     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3861     lt_cv_file_magic_test_file=/lib/libc.so
3862     ;;
3863   esac
3864   ;;
3865 esac
3866
3867 fi
3868
3869 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3870 file_magic_cmd=$lt_cv_file_magic_cmd
3871 deplibs_check_method=$lt_cv_deplibs_check_method
3872
3873 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3874 echo "configure:3875: checking for object suffix" >&5
3875 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3876   echo $ac_n "(cached) $ac_c" 1>&6
3877 else
3878   rm -f conftest*
3879 echo 'int i = 1;' > conftest.$ac_ext
3880 if { (eval echo configure:3881: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3881   for ac_file in conftest.*; do
3882     case $ac_file in
3883     *.c) ;;
3884     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3885     esac
3886   done
3887 else
3888   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3889 fi
3890 rm -f conftest*
3891 fi
3892
3893 echo "$ac_t""$ac_cv_objext" 1>&6
3894 OBJEXT=$ac_cv_objext
3895 ac_objext=$ac_cv_objext
3896
3897
3898
3899
3900 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3901 echo "configure:3902: checking for executable suffix" >&5
3902 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3903   echo $ac_n "(cached) $ac_c" 1>&6
3904 else
3905   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3906   ac_cv_exeext=.exe
3907 else
3908   rm -f conftest*
3909   echo 'int main () { return 0; }' > conftest.$ac_ext
3910   ac_cv_exeext=
3911   if { (eval echo configure:3912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3912     for file in conftest.*; do
3913       case $file in
3914       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3915       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3916       esac
3917     done
3918   else
3919     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3920   fi
3921   rm -f conftest*
3922   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3923 fi
3924 fi
3925
3926 EXEEXT=""
3927 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3928 echo "$ac_t""${ac_cv_exeext}" 1>&6
3929 ac_exeext=$EXEEXT
3930
3931 if test $host != $build; then
3932   ac_tool_prefix=${host_alias}-
3933 else
3934   ac_tool_prefix=
3935 fi
3936
3937
3938
3939
3940 # Check for command to grab the raw symbol name followed by C symbol from nm.
3941 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3942 echo "configure:3943: checking command to parse $NM output" >&5
3943 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3944   echo $ac_n "(cached) $ac_c" 1>&6
3945 else
3946   
3947 # These are sane defaults that work on at least a few old systems.
3948 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3949
3950 # Character class describing NM global symbol codes.
3951 symcode='[BCDEGRST]'
3952
3953 # Regexp to match symbols that can be accessed directly from C.
3954 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3955
3956 # Transform the above into a raw symbol and a C symbol.
3957 symxfrm='\1 \2\3 \3'
3958
3959 # Transform an extracted symbol line into a proper C declaration
3960 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3961
3962 # Transform an extracted symbol line into symbol name and symbol address
3963 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'"
3964
3965 # Define system-specific variables.
3966 case $host_os in
3967 aix*)
3968   symcode='[BCDT]'
3969   ;;
3970 cygwin* | mingw* | pw32*)
3971   symcode='[ABCDGISTW]'
3972   ;;
3973 hpux*) # Its linker distinguishes data from code symbols
3974   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3975   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'"
3976   ;;
3977 irix*)
3978   symcode='[BCDEGRST]'
3979   ;;
3980 solaris* | sysv5*)
3981   symcode='[BDT]'
3982   ;;
3983 sysv4)
3984   symcode='[DFNSTU]'
3985   ;;
3986 esac
3987
3988 # Handle CRLF in mingw tool chain
3989 opt_cr=
3990 case $host_os in
3991 mingw*)
3992   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
3993   ;;
3994 esac
3995
3996 # If we're using GNU nm, then use its standard symbol codes.
3997 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
3998   symcode='[ABCDGISTW]'
3999 fi
4000
4001 # Try without a prefix undercore, then with it.
4002 for ac_symprfx in "" "_"; do
4003
4004   # Write the raw and C identifiers.
4005 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4006
4007   # Check to see that the pipe works correctly.
4008   pipe_works=no
4009   rm -f conftest*
4010   cat > conftest.$ac_ext <<EOF
4011 #ifdef __cplusplus
4012 extern "C" {
4013 #endif
4014 char nm_test_var;
4015 void nm_test_func(){}
4016 #ifdef __cplusplus
4017 }
4018 #endif
4019 int main(){nm_test_var='a';nm_test_func();return(0);}
4020 EOF
4021
4022   if { (eval echo configure:4023: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4023     # Now try to grab the symbols.
4024     nlist=conftest.nm
4025     if { (eval echo configure:4026: \"$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
4026       # Try sorting and uniquifying the output.
4027       if sort "$nlist" | uniq > "$nlist"T; then
4028         mv -f "$nlist"T "$nlist"
4029       else
4030         rm -f "$nlist"T
4031       fi
4032
4033       # Make sure that we snagged all the symbols we need.
4034       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4035         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4036           cat <<EOF > conftest.$ac_ext
4037 #ifdef __cplusplus
4038 extern "C" {
4039 #endif
4040
4041 EOF
4042           # Now generate the symbol file.
4043           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4044
4045           cat <<EOF >> conftest.$ac_ext
4046 #if defined (__STDC__) && __STDC__
4047 # define lt_ptr void *
4048 #else
4049 # define lt_ptr char *
4050 # define const
4051 #endif
4052
4053 /* The mapping between symbol names and symbols. */
4054 const struct {
4055   const char *name;
4056   lt_ptr address;
4057 }
4058 lt_preloaded_symbols[] =
4059 {
4060 EOF
4061           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4062           cat <<\EOF >> conftest.$ac_ext
4063   {0, (lt_ptr) 0}
4064 };
4065
4066 #ifdef __cplusplus
4067 }
4068 #endif
4069 EOF
4070           # Now try linking the two files.
4071           mv conftest.$ac_objext conftstm.$ac_objext
4072           save_LIBS="$LIBS"
4073           save_CFLAGS="$CFLAGS"
4074           LIBS="conftstm.$ac_objext"
4075           CFLAGS="$CFLAGS$no_builtin_flag"
4076           if { (eval echo configure:4077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4077             pipe_works=yes
4078           fi
4079           LIBS="$save_LIBS"
4080           CFLAGS="$save_CFLAGS"
4081         else
4082           echo "cannot find nm_test_func in $nlist" >&5
4083         fi
4084       else
4085         echo "cannot find nm_test_var in $nlist" >&5
4086       fi
4087     else
4088       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4089     fi
4090   else
4091     echo "$progname: failed program was:" >&5
4092     cat conftest.$ac_ext >&5
4093   fi
4094   rm -f conftest* conftst*
4095
4096   # Do not use the global_symbol_pipe unless it works.
4097   if test "$pipe_works" = yes; then
4098     break
4099   else
4100     lt_cv_sys_global_symbol_pipe=
4101   fi
4102 done
4103
4104 fi
4105
4106 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4107 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4108   global_symbol_to_cdecl=
4109   global_symbol_to_c_name_address=
4110 else
4111   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4112   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4113 fi
4114 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4115 then
4116   echo "$ac_t""failed" 1>&6
4117 else
4118   echo "$ac_t""ok" 1>&6
4119 fi
4120
4121 for ac_hdr in dlfcn.h
4122 do
4123 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4124 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4125 echo "configure:4126: checking for $ac_hdr" >&5
4126 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4127   echo $ac_n "(cached) $ac_c" 1>&6
4128 else
4129   cat > conftest.$ac_ext <<EOF
4130 #line 4131 "configure"
4131 #include "confdefs.h"
4132 #include <$ac_hdr>
4133 EOF
4134 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4135 { (eval echo configure:4136: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4136 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4137 if test -z "$ac_err"; then
4138   rm -rf conftest*
4139   eval "ac_cv_header_$ac_safe=yes"
4140 else
4141   echo "$ac_err" >&5
4142   echo "configure: failed program was:" >&5
4143   cat conftest.$ac_ext >&5
4144   rm -rf conftest*
4145   eval "ac_cv_header_$ac_safe=no"
4146 fi
4147 rm -f conftest*
4148 fi
4149 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4150   echo "$ac_t""yes" 1>&6
4151     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4152   cat >> confdefs.h <<EOF
4153 #define $ac_tr_hdr 1
4154 EOF
4155  
4156 else
4157   echo "$ac_t""no" 1>&6
4158 fi
4159 done
4160
4161
4162
4163
4164
4165 # Only perform the check for file, if the check method requires it
4166 case $deplibs_check_method in
4167 file_magic*)
4168   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4169     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4170 echo "configure:4171: checking for ${ac_tool_prefix}file" >&5
4171 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4172   echo $ac_n "(cached) $ac_c" 1>&6
4173 else
4174   case $MAGIC_CMD in
4175   /*)
4176   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4177   ;;
4178   ?:/*)
4179   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4180   ;;
4181   *)
4182   ac_save_MAGIC_CMD="$MAGIC_CMD"
4183   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4184   ac_dummy="/usr/bin:$PATH"
4185   for ac_dir in $ac_dummy; do
4186     test -z "$ac_dir" && ac_dir=.
4187     if test -f $ac_dir/${ac_tool_prefix}file; then
4188       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4189       if test -n "$file_magic_test_file"; then
4190         case $deplibs_check_method in
4191         "file_magic "*)
4192           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4193           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4194           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4195             egrep "$file_magic_regex" > /dev/null; then
4196             :
4197           else
4198             cat <<EOF 1>&2
4199
4200 *** Warning: the command libtool uses to detect shared libraries,
4201 *** $file_magic_cmd, produces output that libtool cannot recognize.
4202 *** The result is that libtool may fail to recognize shared libraries
4203 *** as such.  This will affect the creation of libtool libraries that
4204 *** depend on shared libraries, but programs linked with such libtool
4205 *** libraries will work regardless of this problem.  Nevertheless, you
4206 *** may want to report the problem to your system manager and/or to
4207 *** bug-libtool@gnu.org
4208
4209 EOF
4210           fi ;;
4211         esac
4212       fi
4213       break
4214     fi
4215   done
4216   IFS="$ac_save_ifs"
4217   MAGIC_CMD="$ac_save_MAGIC_CMD"
4218   ;;
4219 esac
4220 fi
4221
4222 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4223 if test -n "$MAGIC_CMD"; then
4224   echo "$ac_t""$MAGIC_CMD" 1>&6
4225 else
4226   echo "$ac_t""no" 1>&6
4227 fi
4228
4229 if test -z "$lt_cv_path_MAGIC_CMD"; then
4230   if test -n "$ac_tool_prefix"; then
4231     echo $ac_n "checking for file""... $ac_c" 1>&6
4232 echo "configure:4233: checking for file" >&5
4233 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4234   echo $ac_n "(cached) $ac_c" 1>&6
4235 else
4236   case $MAGIC_CMD in
4237   /*)
4238   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4239   ;;
4240   ?:/*)
4241   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4242   ;;
4243   *)
4244   ac_save_MAGIC_CMD="$MAGIC_CMD"
4245   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4246   ac_dummy="/usr/bin:$PATH"
4247   for ac_dir in $ac_dummy; do
4248     test -z "$ac_dir" && ac_dir=.
4249     if test -f $ac_dir/file; then
4250       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4251       if test -n "$file_magic_test_file"; then
4252         case $deplibs_check_method in
4253         "file_magic "*)
4254           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4255           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4256           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4257             egrep "$file_magic_regex" > /dev/null; then
4258             :
4259           else
4260             cat <<EOF 1>&2
4261
4262 *** Warning: the command libtool uses to detect shared libraries,
4263 *** $file_magic_cmd, produces output that libtool cannot recognize.
4264 *** The result is that libtool may fail to recognize shared libraries
4265 *** as such.  This will affect the creation of libtool libraries that
4266 *** depend on shared libraries, but programs linked with such libtool
4267 *** libraries will work regardless of this problem.  Nevertheless, you
4268 *** may want to report the problem to your system manager and/or to
4269 *** bug-libtool@gnu.org
4270
4271 EOF
4272           fi ;;
4273         esac
4274       fi
4275       break
4276     fi
4277   done
4278   IFS="$ac_save_ifs"
4279   MAGIC_CMD="$ac_save_MAGIC_CMD"
4280   ;;
4281 esac
4282 fi
4283
4284 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4285 if test -n "$MAGIC_CMD"; then
4286   echo "$ac_t""$MAGIC_CMD" 1>&6
4287 else
4288   echo "$ac_t""no" 1>&6
4289 fi
4290
4291   else
4292     MAGIC_CMD=:
4293   fi
4294 fi
4295
4296   fi
4297   ;;
4298 esac
4299
4300 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4301 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4302 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4303 echo "configure:4304: checking for $ac_word" >&5
4304 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4305   echo $ac_n "(cached) $ac_c" 1>&6
4306 else
4307   if test -n "$RANLIB"; then
4308   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4309 else
4310   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4311   ac_dummy="$PATH"
4312   for ac_dir in $ac_dummy; do
4313     test -z "$ac_dir" && ac_dir=.
4314     if test -f $ac_dir/$ac_word; then
4315       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4316       break
4317     fi
4318   done
4319   IFS="$ac_save_ifs"
4320 fi
4321 fi
4322 RANLIB="$ac_cv_prog_RANLIB"
4323 if test -n "$RANLIB"; then
4324   echo "$ac_t""$RANLIB" 1>&6
4325 else
4326   echo "$ac_t""no" 1>&6
4327 fi
4328
4329
4330 if test -z "$ac_cv_prog_RANLIB"; then
4331 if test -n "$ac_tool_prefix"; then
4332   # Extract the first word of "ranlib", so it can be a program name with args.
4333 set dummy ranlib; ac_word=$2
4334 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4335 echo "configure:4336: checking for $ac_word" >&5
4336 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4337   echo $ac_n "(cached) $ac_c" 1>&6
4338 else
4339   if test -n "$RANLIB"; then
4340   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4341 else
4342   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4343   ac_dummy="$PATH"
4344   for ac_dir in $ac_dummy; do
4345     test -z "$ac_dir" && ac_dir=.
4346     if test -f $ac_dir/$ac_word; then
4347       ac_cv_prog_RANLIB="ranlib"
4348       break
4349     fi
4350   done
4351   IFS="$ac_save_ifs"
4352   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4353 fi
4354 fi
4355 RANLIB="$ac_cv_prog_RANLIB"
4356 if test -n "$RANLIB"; then
4357   echo "$ac_t""$RANLIB" 1>&6
4358 else
4359   echo "$ac_t""no" 1>&6
4360 fi
4361
4362 else
4363   RANLIB=":"
4364 fi
4365 fi
4366
4367 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4368 set dummy ${ac_tool_prefix}strip; ac_word=$2
4369 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4370 echo "configure:4371: checking for $ac_word" >&5
4371 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4372   echo $ac_n "(cached) $ac_c" 1>&6
4373 else
4374   if test -n "$STRIP"; then
4375   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4376 else
4377   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4378   ac_dummy="$PATH"
4379   for ac_dir in $ac_dummy; do
4380     test -z "$ac_dir" && ac_dir=.
4381     if test -f $ac_dir/$ac_word; then
4382       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4383       break
4384     fi
4385   done
4386   IFS="$ac_save_ifs"
4387 fi
4388 fi
4389 STRIP="$ac_cv_prog_STRIP"
4390 if test -n "$STRIP"; then
4391   echo "$ac_t""$STRIP" 1>&6
4392 else
4393   echo "$ac_t""no" 1>&6
4394 fi
4395
4396
4397 if test -z "$ac_cv_prog_STRIP"; then
4398 if test -n "$ac_tool_prefix"; then
4399   # Extract the first word of "strip", so it can be a program name with args.
4400 set dummy strip; ac_word=$2
4401 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4402 echo "configure:4403: checking for $ac_word" >&5
4403 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4404   echo $ac_n "(cached) $ac_c" 1>&6
4405 else
4406   if test -n "$STRIP"; then
4407   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4408 else
4409   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4410   ac_dummy="$PATH"
4411   for ac_dir in $ac_dummy; do
4412     test -z "$ac_dir" && ac_dir=.
4413     if test -f $ac_dir/$ac_word; then
4414       ac_cv_prog_STRIP="strip"
4415       break
4416     fi
4417   done
4418   IFS="$ac_save_ifs"
4419   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4420 fi
4421 fi
4422 STRIP="$ac_cv_prog_STRIP"
4423 if test -n "$STRIP"; then
4424   echo "$ac_t""$STRIP" 1>&6
4425 else
4426   echo "$ac_t""no" 1>&6
4427 fi
4428
4429 else
4430   STRIP=":"
4431 fi
4432 fi
4433
4434
4435 enable_dlopen=yes
4436 enable_win32_dll=yes
4437
4438 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4439 if test "${enable_libtool_lock+set}" = set; then
4440   enableval="$enable_libtool_lock"
4441   :
4442 fi
4443
4444 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4445
4446 # Some flags need to be propagated to the compiler or linker for good
4447 # libtool support.
4448 case $host in
4449 *-*-irix6*)
4450   # Find out which ABI we are using.
4451   echo '#line 4452 "configure"' > conftest.$ac_ext
4452   if { (eval echo configure:4453: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4453     case `/usr/bin/file conftest.$ac_objext` in
4454     *32-bit*)
4455       LD="${LD-ld} -32"
4456       ;;
4457     *N32*)
4458       LD="${LD-ld} -n32"
4459       ;;
4460     *64-bit*)
4461       LD="${LD-ld} -64"
4462       ;;
4463     esac
4464   fi
4465   rm -rf conftest*
4466   ;;
4467
4468 *-*-sco3.2v5*)
4469   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4470   SAVE_CFLAGS="$CFLAGS"
4471   CFLAGS="$CFLAGS -belf"
4472   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4473 echo "configure:4474: checking whether the C compiler needs -belf" >&5
4474 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4475   echo $ac_n "(cached) $ac_c" 1>&6
4476 else
4477   
4478      ac_ext=c
4479 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4480 ac_cpp='$CPP $CPPFLAGS'
4481 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4482 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4483 cross_compiling=$ac_cv_prog_cc_cross
4484
4485      cat > conftest.$ac_ext <<EOF
4486 #line 4487 "configure"
4487 #include "confdefs.h"
4488
4489 int main() {
4490
4491 ; return 0; }
4492 EOF
4493 if { (eval echo configure:4494: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4494   rm -rf conftest*
4495   lt_cv_cc_needs_belf=yes
4496 else
4497   echo "configure: failed program was:" >&5
4498   cat conftest.$ac_ext >&5
4499   rm -rf conftest*
4500   lt_cv_cc_needs_belf=no
4501 fi
4502 rm -f conftest*
4503      ac_ext=c
4504 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4505 ac_cpp='$CPP $CPPFLAGS'
4506 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4507 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4508 cross_compiling=$ac_cv_prog_cc_cross
4509
4510 fi
4511
4512 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4513   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4514     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4515     CFLAGS="$SAVE_CFLAGS"
4516   fi
4517   ;;
4518
4519 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4520   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4521 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4522 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4523 echo "configure:4524: checking for $ac_word" >&5
4524 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4525   echo $ac_n "(cached) $ac_c" 1>&6
4526 else
4527   if test -n "$DLLTOOL"; then
4528   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4529 else
4530   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4531   ac_dummy="$PATH"
4532   for ac_dir in $ac_dummy; do
4533     test -z "$ac_dir" && ac_dir=.
4534     if test -f $ac_dir/$ac_word; then
4535       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4536       break
4537     fi
4538   done
4539   IFS="$ac_save_ifs"
4540 fi
4541 fi
4542 DLLTOOL="$ac_cv_prog_DLLTOOL"
4543 if test -n "$DLLTOOL"; then
4544   echo "$ac_t""$DLLTOOL" 1>&6
4545 else
4546   echo "$ac_t""no" 1>&6
4547 fi
4548
4549
4550 if test -z "$ac_cv_prog_DLLTOOL"; then
4551 if test -n "$ac_tool_prefix"; then
4552   # Extract the first word of "dlltool", so it can be a program name with args.
4553 set dummy dlltool; ac_word=$2
4554 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4555 echo "configure:4556: checking for $ac_word" >&5
4556 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4557   echo $ac_n "(cached) $ac_c" 1>&6
4558 else
4559   if test -n "$DLLTOOL"; then
4560   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4561 else
4562   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4563   ac_dummy="$PATH"
4564   for ac_dir in $ac_dummy; do
4565     test -z "$ac_dir" && ac_dir=.
4566     if test -f $ac_dir/$ac_word; then
4567       ac_cv_prog_DLLTOOL="dlltool"
4568       break
4569     fi
4570   done
4571   IFS="$ac_save_ifs"
4572   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4573 fi
4574 fi
4575 DLLTOOL="$ac_cv_prog_DLLTOOL"
4576 if test -n "$DLLTOOL"; then
4577   echo "$ac_t""$DLLTOOL" 1>&6
4578 else
4579   echo "$ac_t""no" 1>&6
4580 fi
4581
4582 else
4583   DLLTOOL="false"
4584 fi
4585 fi
4586
4587   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4588 set dummy ${ac_tool_prefix}as; ac_word=$2
4589 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4590 echo "configure:4591: checking for $ac_word" >&5
4591 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4592   echo $ac_n "(cached) $ac_c" 1>&6
4593 else
4594   if test -n "$AS"; then
4595   ac_cv_prog_AS="$AS" # Let the user override the test.
4596 else
4597   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4598   ac_dummy="$PATH"
4599   for ac_dir in $ac_dummy; do
4600     test -z "$ac_dir" && ac_dir=.
4601     if test -f $ac_dir/$ac_word; then
4602       ac_cv_prog_AS="${ac_tool_prefix}as"
4603       break
4604     fi
4605   done
4606   IFS="$ac_save_ifs"
4607 fi
4608 fi
4609 AS="$ac_cv_prog_AS"
4610 if test -n "$AS"; then
4611   echo "$ac_t""$AS" 1>&6
4612 else
4613   echo "$ac_t""no" 1>&6
4614 fi
4615
4616
4617 if test -z "$ac_cv_prog_AS"; then
4618 if test -n "$ac_tool_prefix"; then
4619   # Extract the first word of "as", so it can be a program name with args.
4620 set dummy as; ac_word=$2
4621 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4622 echo "configure:4623: checking for $ac_word" >&5
4623 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4624   echo $ac_n "(cached) $ac_c" 1>&6
4625 else
4626   if test -n "$AS"; then
4627   ac_cv_prog_AS="$AS" # Let the user override the test.
4628 else
4629   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4630   ac_dummy="$PATH"
4631   for ac_dir in $ac_dummy; do
4632     test -z "$ac_dir" && ac_dir=.
4633     if test -f $ac_dir/$ac_word; then
4634       ac_cv_prog_AS="as"
4635       break
4636     fi
4637   done
4638   IFS="$ac_save_ifs"
4639   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4640 fi
4641 fi
4642 AS="$ac_cv_prog_AS"
4643 if test -n "$AS"; then
4644   echo "$ac_t""$AS" 1>&6
4645 else
4646   echo "$ac_t""no" 1>&6
4647 fi
4648
4649 else
4650   AS="false"
4651 fi
4652 fi
4653
4654   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4655 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4656 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4657 echo "configure:4658: checking for $ac_word" >&5
4658 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4659   echo $ac_n "(cached) $ac_c" 1>&6
4660 else
4661   if test -n "$OBJDUMP"; then
4662   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4663 else
4664   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4665   ac_dummy="$PATH"
4666   for ac_dir in $ac_dummy; do
4667     test -z "$ac_dir" && ac_dir=.
4668     if test -f $ac_dir/$ac_word; then
4669       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4670       break
4671     fi
4672   done
4673   IFS="$ac_save_ifs"
4674 fi
4675 fi
4676 OBJDUMP="$ac_cv_prog_OBJDUMP"
4677 if test -n "$OBJDUMP"; then
4678   echo "$ac_t""$OBJDUMP" 1>&6
4679 else
4680   echo "$ac_t""no" 1>&6
4681 fi
4682
4683
4684 if test -z "$ac_cv_prog_OBJDUMP"; then
4685 if test -n "$ac_tool_prefix"; then
4686   # Extract the first word of "objdump", so it can be a program name with args.
4687 set dummy objdump; ac_word=$2
4688 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4689 echo "configure:4690: checking for $ac_word" >&5
4690 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4691   echo $ac_n "(cached) $ac_c" 1>&6
4692 else
4693   if test -n "$OBJDUMP"; then
4694   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4695 else
4696   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4697   ac_dummy="$PATH"
4698   for ac_dir in $ac_dummy; do
4699     test -z "$ac_dir" && ac_dir=.
4700     if test -f $ac_dir/$ac_word; then
4701       ac_cv_prog_OBJDUMP="objdump"
4702       break
4703     fi
4704   done
4705   IFS="$ac_save_ifs"
4706   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4707 fi
4708 fi
4709 OBJDUMP="$ac_cv_prog_OBJDUMP"
4710 if test -n "$OBJDUMP"; then
4711   echo "$ac_t""$OBJDUMP" 1>&6
4712 else
4713   echo "$ac_t""no" 1>&6
4714 fi
4715
4716 else
4717   OBJDUMP="false"
4718 fi
4719 fi
4720
4721
4722   # recent cygwin and mingw systems supply a stub DllMain which the user
4723   # can override, but on older systems we have to supply one
4724   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4725 echo "configure:4726: checking if libtool should supply DllMain function" >&5
4726 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4727   echo $ac_n "(cached) $ac_c" 1>&6
4728 else
4729   cat > conftest.$ac_ext <<EOF
4730 #line 4731 "configure"
4731 #include "confdefs.h"
4732
4733 int main() {
4734 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4735       DllMain (0, 0, 0);
4736 ; return 0; }
4737 EOF
4738 if { (eval echo configure:4739: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4739   rm -rf conftest*
4740   lt_cv_need_dllmain=no
4741 else
4742   echo "configure: failed program was:" >&5
4743   cat conftest.$ac_ext >&5
4744   rm -rf conftest*
4745   lt_cv_need_dllmain=yes
4746 fi
4747 rm -f conftest*
4748 fi
4749
4750 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4751
4752   case $host/$CC in
4753   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4754     # old mingw systems require "-dll" to link a DLL, while more recent ones
4755     # require "-mdll"
4756     SAVE_CFLAGS="$CFLAGS"
4757     CFLAGS="$CFLAGS -mdll"
4758     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4759 echo "configure:4760: checking how to link DLLs" >&5
4760 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4761   echo $ac_n "(cached) $ac_c" 1>&6
4762 else
4763   cat > conftest.$ac_ext <<EOF
4764 #line 4765 "configure"
4765 #include "confdefs.h"
4766
4767 int main() {
4768
4769 ; return 0; }
4770 EOF
4771 if { (eval echo configure:4772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4772   rm -rf conftest*
4773   lt_cv_cc_dll_switch=-mdll
4774 else
4775   echo "configure: failed program was:" >&5
4776   cat conftest.$ac_ext >&5
4777   rm -rf conftest*
4778   lt_cv_cc_dll_switch=-dll
4779 fi
4780 rm -f conftest*
4781 fi
4782
4783 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4784     CFLAGS="$SAVE_CFLAGS" ;;
4785   *-*-cygwin* | *-*-pw32*)
4786     # cygwin systems need to pass --dll to the linker, and not link
4787     # crt.o which will require a WinMain@16 definition.
4788     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4789   esac
4790   ;;
4791   
4792 esac
4793
4794 # Sed substitution that helps us do robust quoting.  It backslashifies
4795 # metacharacters that are still active within double-quoted strings.
4796 Xsed='sed -e s/^X//'
4797 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4798
4799 # Same as above, but do not quote variable references.
4800 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4801
4802 # Sed substitution to delay expansion of an escaped shell variable in a
4803 # double_quote_subst'ed string.
4804 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4805
4806 # Constants:
4807 rm="rm -f"
4808
4809 # Global variables:
4810 default_ofile=libtool
4811 can_build_shared=yes
4812
4813 # All known linkers require a `.a' archive for static linking (except M$VC,
4814 # which needs '.lib').
4815 libext=a
4816 ltmain="$ac_aux_dir/ltmain.sh"
4817 ofile="$default_ofile"
4818 with_gnu_ld="$lt_cv_prog_gnu_ld"
4819 need_locks="$enable_libtool_lock"
4820
4821 old_CC="$CC"
4822 old_CFLAGS="$CFLAGS"
4823
4824 # Set sane defaults for various variables
4825 test -z "$AR" && AR=ar
4826 test -z "$AR_FLAGS" && AR_FLAGS=cru
4827 test -z "$AS" && AS=as
4828 test -z "$CC" && CC=cc
4829 test -z "$DLLTOOL" && DLLTOOL=dlltool
4830 test -z "$LD" && LD=ld
4831 test -z "$LN_S" && LN_S="ln -s"
4832 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4833 test -z "$NM" && NM=nm
4834 test -z "$OBJDUMP" && OBJDUMP=objdump
4835 test -z "$RANLIB" && RANLIB=:
4836 test -z "$STRIP" && STRIP=:
4837 test -z "$ac_objext" && ac_objext=o
4838
4839 if test x"$host" != x"$build"; then
4840   ac_tool_prefix=${host_alias}-
4841 else
4842   ac_tool_prefix=
4843 fi
4844
4845 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4846 case $host_os in
4847 linux-gnu*) ;;
4848 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4849 esac
4850
4851 case $host_os in
4852 aix3*)
4853   # AIX sometimes has problems with the GCC collect2 program.  For some
4854   # reason, if we set the COLLECT_NAMES environment variable, the problems
4855   # vanish in a puff of smoke.
4856   if test "X${COLLECT_NAMES+set}" != Xset; then
4857     COLLECT_NAMES=
4858     export COLLECT_NAMES
4859   fi
4860   ;;
4861 esac
4862
4863 # Determine commands to create old-style static archives.
4864 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4865 old_postinstall_cmds='chmod 644 $oldlib'
4866 old_postuninstall_cmds=
4867
4868 if test -n "$RANLIB"; then
4869   case $host_os in
4870   openbsd*)
4871     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4872     ;;
4873   *)
4874     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4875     ;;
4876   esac
4877   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4878 fi
4879
4880 # Allow CC to be a program name with arguments.
4881 set dummy $CC
4882 compiler="$2"
4883
4884 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4885 echo "configure:4886: checking for objdir" >&5
4886 rm -f .libs 2>/dev/null
4887 mkdir .libs 2>/dev/null
4888 if test -d .libs; then
4889   objdir=.libs
4890 else
4891   # MS-DOS does not allow filenames that begin with a dot.
4892   objdir=_libs
4893 fi
4894 rmdir .libs 2>/dev/null
4895 echo "$ac_t""$objdir" 1>&6
4896
4897
4898 # Check whether --with-pic or --without-pic was given.
4899 if test "${with_pic+set}" = set; then
4900   withval="$with_pic"
4901   pic_mode="$withval"
4902 else
4903   pic_mode=default
4904 fi
4905
4906 test -z "$pic_mode" && pic_mode=default
4907
4908 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4909 # in isolation, and that seeing it set (from the cache) indicates that
4910 # the associated values are set (in the cache) correctly too.
4911 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4912 echo "configure:4913: checking for $compiler option to produce PIC" >&5
4913 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4914   echo $ac_n "(cached) $ac_c" 1>&6
4915 else
4916    lt_cv_prog_cc_pic=
4917   lt_cv_prog_cc_shlib=
4918   lt_cv_prog_cc_wl=
4919   lt_cv_prog_cc_static=
4920   lt_cv_prog_cc_no_builtin=
4921   lt_cv_prog_cc_can_build_shared=$can_build_shared
4922
4923   if test "$GCC" = yes; then
4924     lt_cv_prog_cc_wl='-Wl,'
4925     lt_cv_prog_cc_static='-static'
4926
4927     case $host_os in
4928     aix*)
4929       # Below there is a dirty hack to force normal static linking with -ldl
4930       # The problem is because libdl dynamically linked with both libc and
4931       # libC (AIX C++ library), which obviously doesn't included in libraries
4932       # list by gcc. This cause undefined symbols with -static flags.
4933       # This hack allows C programs to be linked with "-static -ldl", but
4934       # not sure about C++ programs.
4935       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4936       ;;
4937     amigaos*)
4938       # FIXME: we need at least 68020 code to build shared libraries, but
4939       # adding the `-m68020' flag to GCC prevents building anything better,
4940       # like `-m68040'.
4941       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4942       ;;
4943     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
4944       # PIC is the default for these OSes.
4945       ;;
4946     darwin* | rhapsody*)
4947       # PIC is the default on this platform
4948       # Common symbols not allowed in MH_DYLIB files
4949       lt_cv_prog_cc_pic='-fno-common'
4950       ;;
4951     cygwin* | mingw* | pw32* | os2*)
4952       # This hack is so that the source file can tell whether it is being
4953       # built for inclusion in a dll (and should export symbols for example).
4954       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4955       ;;
4956     sysv4*MP*)
4957       if test -d /usr/nec; then
4958          lt_cv_prog_cc_pic=-Kconform_pic
4959       fi
4960       ;;
4961     *)
4962       lt_cv_prog_cc_pic='-fPIC'
4963       ;;
4964     esac
4965   else
4966     # PORTME Check for PIC flags for the system compiler.
4967     case $host_os in
4968     aix3* | aix4* | aix5*)
4969       lt_cv_prog_cc_wl='-Wl,'
4970       # All AIX code is PIC.
4971       if test "$host_cpu" = ia64; then
4972         # AIX 5 now supports IA64 processor
4973         lt_cv_prog_cc_static='-Bstatic'
4974       else
4975         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4976       fi
4977       ;;
4978
4979     hpux9* | hpux10* | hpux11*)
4980       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4981       lt_cv_prog_cc_wl='-Wl,'
4982       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4983       lt_cv_prog_cc_pic='+Z'
4984       ;;
4985
4986     irix5* | irix6*)
4987       lt_cv_prog_cc_wl='-Wl,'
4988       lt_cv_prog_cc_static='-non_shared'
4989       # PIC (with -KPIC) is the default.
4990       ;;
4991
4992     cygwin* | mingw* | pw32* | os2*)
4993       # This hack is so that the source file can tell whether it is being
4994       # built for inclusion in a dll (and should export symbols for example).
4995       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4996       ;;
4997
4998     newsos6)
4999       lt_cv_prog_cc_pic='-KPIC'
5000       lt_cv_prog_cc_static='-Bstatic'
5001       ;;
5002
5003     osf3* | osf4* | osf5*)
5004       # All OSF/1 code is PIC.
5005       lt_cv_prog_cc_wl='-Wl,'
5006       lt_cv_prog_cc_static='-non_shared'
5007       ;;
5008
5009     sco3.2v5*)
5010       lt_cv_prog_cc_pic='-Kpic'
5011       lt_cv_prog_cc_static='-dn'
5012       lt_cv_prog_cc_shlib='-belf'
5013       ;;
5014
5015     solaris*)
5016       lt_cv_prog_cc_pic='-KPIC'
5017       lt_cv_prog_cc_static='-Bstatic'
5018       lt_cv_prog_cc_wl='-Wl,'
5019       ;;
5020
5021     sunos4*)
5022       lt_cv_prog_cc_pic='-PIC'
5023       lt_cv_prog_cc_static='-Bstatic'
5024       lt_cv_prog_cc_wl='-Qoption ld '
5025       ;;
5026
5027     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5028       lt_cv_prog_cc_pic='-KPIC'
5029       lt_cv_prog_cc_static='-Bstatic'
5030       if test "x$host_vendor" = xsni; then
5031         lt_cv_prog_cc_wl='-LD'
5032       else
5033         lt_cv_prog_cc_wl='-Wl,'
5034       fi
5035       ;;
5036
5037     uts4*)
5038       lt_cv_prog_cc_pic='-pic'
5039       lt_cv_prog_cc_static='-Bstatic'
5040       ;;
5041
5042     sysv4*MP*)
5043       if test -d /usr/nec ;then
5044         lt_cv_prog_cc_pic='-Kconform_pic'
5045         lt_cv_prog_cc_static='-Bstatic'
5046       fi
5047       ;;
5048
5049     *)
5050       lt_cv_prog_cc_can_build_shared=no
5051       ;;
5052     esac
5053   fi
5054
5055 fi
5056
5057 if test -z "$lt_cv_prog_cc_pic"; then
5058   echo "$ac_t""none" 1>&6
5059 else
5060   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5061
5062   # Check to make sure the pic_flag actually works.
5063   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5064 echo "configure:5065: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5065   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5066   echo $ac_n "(cached) $ac_c" 1>&6
5067 else
5068       save_CFLAGS="$CFLAGS"
5069     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5070     cat > conftest.$ac_ext <<EOF
5071 #line 5072 "configure"
5072 #include "confdefs.h"
5073
5074 int main() {
5075
5076 ; return 0; }
5077 EOF
5078 if { (eval echo configure:5079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5079   rm -rf conftest*
5080         case $host_os in
5081       hpux9* | hpux10* | hpux11*)
5082         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5083         # they create non-PIC objects.  So, if there were any warnings, we
5084         # assume that PIC is not supported.
5085         if test -s conftest.err; then
5086           lt_cv_prog_cc_pic_works=no
5087         else
5088           lt_cv_prog_cc_pic_works=yes
5089         fi
5090         ;;
5091       *)
5092         lt_cv_prog_cc_pic_works=yes
5093         ;;
5094       esac
5095     
5096 else
5097   echo "configure: failed program was:" >&5
5098   cat conftest.$ac_ext >&5
5099   rm -rf conftest*
5100         lt_cv_prog_cc_pic_works=no
5101     
5102 fi
5103 rm -f conftest*
5104     CFLAGS="$save_CFLAGS"
5105   
5106 fi
5107
5108
5109   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5110     lt_cv_prog_cc_pic=
5111     lt_cv_prog_cc_can_build_shared=no
5112   else
5113     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5114   fi
5115
5116   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5117 fi
5118
5119 # Check for any special shared library compilation flags.
5120 if test -n "$lt_cv_prog_cc_shlib"; then
5121   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5122   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5123   else
5124    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5125     lt_cv_prog_cc_can_build_shared=no
5126   fi
5127 fi
5128
5129 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5130 echo "configure:5131: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5131 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5132   echo $ac_n "(cached) $ac_c" 1>&6
5133 else
5134     lt_cv_prog_cc_static_works=no
5135   save_LDFLAGS="$LDFLAGS"
5136   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5137   cat > conftest.$ac_ext <<EOF
5138 #line 5139 "configure"
5139 #include "confdefs.h"
5140
5141 int main() {
5142
5143 ; return 0; }
5144 EOF
5145 if { (eval echo configure:5146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5146   rm -rf conftest*
5147   lt_cv_prog_cc_static_works=yes
5148 else
5149   echo "configure: failed program was:" >&5
5150   cat conftest.$ac_ext >&5
5151 fi
5152 rm -f conftest*
5153   LDFLAGS="$save_LDFLAGS"
5154
5155 fi
5156
5157
5158 # Belt *and* braces to stop my trousers falling down:
5159 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5160 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5161
5162 pic_flag="$lt_cv_prog_cc_pic"
5163 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5164 wl="$lt_cv_prog_cc_wl"
5165 link_static_flag="$lt_cv_prog_cc_static"
5166 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5167 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5168
5169
5170 # Check to see if options -o and -c are simultaneously supported by compiler
5171 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5172 echo "configure:5173: checking if $compiler supports -c -o file.$ac_objext" >&5
5173 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5174   echo $ac_n "(cached) $ac_c" 1>&6
5175 else
5176   
5177 $rm -r conftest 2>/dev/null
5178 mkdir conftest
5179 cd conftest
5180 echo "int some_variable = 0;" > conftest.$ac_ext
5181 mkdir out
5182 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5183 # that will create temporary files in the current directory regardless of
5184 # the output directory.  Thus, making CWD read-only will cause this test
5185 # to fail, enabling locking or at least warning the user not to do parallel
5186 # builds.
5187 chmod -w .
5188 save_CFLAGS="$CFLAGS"
5189 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5190 compiler_c_o=no
5191 if { (eval echo configure:5192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5192   # The compiler can only warn and ignore the option if not recognized
5193   # So say no if there are warnings
5194   if test -s out/conftest.err; then
5195     lt_cv_compiler_c_o=no
5196   else
5197     lt_cv_compiler_c_o=yes
5198   fi
5199 else
5200   # Append any errors to the config.log.
5201   cat out/conftest.err 1>&5
5202   lt_cv_compiler_c_o=no
5203 fi
5204 CFLAGS="$save_CFLAGS"
5205 chmod u+w .
5206 $rm conftest* out/*
5207 rmdir out
5208 cd ..
5209 rmdir conftest
5210 $rm -r conftest 2>/dev/null
5211
5212 fi
5213
5214 compiler_c_o=$lt_cv_compiler_c_o
5215 echo "$ac_t""$compiler_c_o" 1>&6
5216
5217 if test x"$compiler_c_o" = x"yes"; then
5218   # Check to see if we can write to a .lo
5219   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5220 echo "configure:5221: checking if $compiler supports -c -o file.lo" >&5
5221   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5222   echo $ac_n "(cached) $ac_c" 1>&6
5223 else
5224   
5225   lt_cv_compiler_o_lo=no
5226   save_CFLAGS="$CFLAGS"
5227   CFLAGS="$CFLAGS -c -o conftest.lo"
5228   save_objext="$ac_objext"
5229   ac_objext=lo
5230   cat > conftest.$ac_ext <<EOF
5231 #line 5232 "configure"
5232 #include "confdefs.h"
5233
5234 int main() {
5235 int some_variable = 0;
5236 ; return 0; }
5237 EOF
5238 if { (eval echo configure:5239: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5239   rm -rf conftest*
5240       # The compiler can only warn and ignore the option if not recognized
5241     # So say no if there are warnings
5242     if test -s conftest.err; then
5243       lt_cv_compiler_o_lo=no
5244     else
5245       lt_cv_compiler_o_lo=yes
5246     fi
5247   
5248 else
5249   echo "configure: failed program was:" >&5
5250   cat conftest.$ac_ext >&5
5251 fi
5252 rm -f conftest*
5253   ac_objext="$save_objext"
5254   CFLAGS="$save_CFLAGS"
5255   
5256 fi
5257
5258   compiler_o_lo=$lt_cv_compiler_o_lo
5259   echo "$ac_t""$compiler_o_lo" 1>&6
5260 else
5261   compiler_o_lo=no
5262 fi
5263
5264 # Check to see if we can do hard links to lock some files if needed
5265 hard_links="nottested"
5266 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5267   # do not overwrite the value of need_locks provided by the user
5268   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5269 echo "configure:5270: checking if we can lock with hard links" >&5
5270   hard_links=yes
5271   $rm conftest*
5272   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5273   touch conftest.a
5274   ln conftest.a conftest.b 2>&5 || hard_links=no
5275   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5276   echo "$ac_t""$hard_links" 1>&6
5277   if test "$hard_links" = no; then
5278     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5279     need_locks=warn
5280   fi
5281 else
5282   need_locks=no
5283 fi
5284
5285 if test "$GCC" = yes; then
5286   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5287   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5288 echo "configure:5289: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5289   echo "int some_variable = 0;" > conftest.$ac_ext
5290   save_CFLAGS="$CFLAGS"
5291   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5292   compiler_rtti_exceptions=no
5293   cat > conftest.$ac_ext <<EOF
5294 #line 5295 "configure"
5295 #include "confdefs.h"
5296
5297 int main() {
5298 int some_variable = 0;
5299 ; return 0; }
5300 EOF
5301 if { (eval echo configure:5302: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5302   rm -rf conftest*
5303       # The compiler can only warn and ignore the option if not recognized
5304     # So say no if there are warnings
5305     if test -s conftest.err; then
5306       compiler_rtti_exceptions=no
5307     else
5308       compiler_rtti_exceptions=yes
5309     fi
5310   
5311 else
5312   echo "configure: failed program was:" >&5
5313   cat conftest.$ac_ext >&5
5314 fi
5315 rm -f conftest*
5316   CFLAGS="$save_CFLAGS"
5317   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5318
5319   if test "$compiler_rtti_exceptions" = "yes"; then
5320     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5321   else
5322     no_builtin_flag=' -fno-builtin'
5323   fi
5324 fi
5325
5326 # See if the linker supports building shared libraries.
5327 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5328 echo "configure:5329: checking whether the linker ($LD) supports shared libraries" >&5
5329
5330 allow_undefined_flag=
5331 no_undefined_flag=
5332 need_lib_prefix=unknown
5333 need_version=unknown
5334 # when you set need_version to no, make sure it does not cause -set_version
5335 # flags to be left without arguments
5336 archive_cmds=
5337 archive_expsym_cmds=
5338 old_archive_from_new_cmds=
5339 old_archive_from_expsyms_cmds=
5340 export_dynamic_flag_spec=
5341 whole_archive_flag_spec=
5342 thread_safe_flag_spec=
5343 hardcode_into_libs=no
5344 hardcode_libdir_flag_spec=
5345 hardcode_libdir_separator=
5346 hardcode_direct=no
5347 hardcode_minus_L=no
5348 hardcode_shlibpath_var=unsupported
5349 runpath_var=
5350 link_all_deplibs=unknown
5351 always_export_symbols=no
5352 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5353 # include_expsyms should be a list of space-separated symbols to be *always*
5354 # included in the symbol list
5355 include_expsyms=
5356 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5357 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5358 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5359 # as well as any symbol that contains `d'.
5360 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5361 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5362 # platforms (ab)use it in PIC code, but their linkers get confused if
5363 # the symbol is explicitly referenced.  Since portable code cannot
5364 # rely on this symbol name, it's probably fine to never include it in
5365 # preloaded symbol tables.
5366 extract_expsyms_cmds=
5367
5368 case $host_os in
5369 cygwin* | mingw* | pw32*)
5370   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5371   # When not using gcc, we currently assume that we are using
5372   # Microsoft Visual C++.
5373   if test "$GCC" != yes; then
5374     with_gnu_ld=no
5375   fi
5376   ;;
5377 openbsd*)
5378   with_gnu_ld=no
5379   ;;
5380 esac
5381
5382 ld_shlibs=yes
5383 if test "$with_gnu_ld" = yes; then
5384   # If archive_cmds runs LD, not CC, wlarc should be empty
5385   wlarc='${wl}'
5386
5387   # See if GNU ld supports shared libraries.
5388   case $host_os in
5389   aix3* | aix4* | aix5*)
5390     # On AIX, the GNU linker is very broken
5391     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5392     ld_shlibs=no
5393     cat <<EOF 1>&2
5394
5395 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5396 *** to be unable to reliably create shared libraries on AIX.
5397 *** Therefore, libtool is disabling shared libraries support.  If you
5398 *** really care for shared libraries, you may want to modify your PATH
5399 *** so that a non-GNU linker is found, and then restart.
5400
5401 EOF
5402     ;;
5403
5404   amigaos*)
5405     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)'
5406     hardcode_libdir_flag_spec='-L$libdir'
5407     hardcode_minus_L=yes
5408
5409     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5410     # that the semantics of dynamic libraries on AmigaOS, at least up
5411     # to version 4, is to share data among multiple programs linked
5412     # with the same dynamic library.  Since this doesn't match the
5413     # behavior of shared libraries on other platforms, we can use
5414     # them.
5415     ld_shlibs=no
5416     ;;
5417
5418   beos*)
5419     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5420       allow_undefined_flag=unsupported
5421       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5422       # support --undefined.  This deserves some investigation.  FIXME
5423       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5424     else
5425       ld_shlibs=no
5426     fi
5427     ;;
5428
5429   cygwin* | mingw* | pw32*)
5430     # hardcode_libdir_flag_spec is actually meaningless, as there is
5431     # no search path for DLLs.
5432     hardcode_libdir_flag_spec='-L$libdir'
5433     allow_undefined_flag=unsupported
5434     always_export_symbols=yes
5435
5436     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5437       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5438       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5439       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5440       else $CC -o impgen impgen.c ; fi)~
5441       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5442
5443     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5444
5445     # cygwin and mingw dlls have different entry points and sets of symbols
5446     # to exclude.
5447     # FIXME: what about values for MSVC?
5448     dll_entry=__cygwin_dll_entry@12
5449     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5450     case $host_os in
5451     mingw*)
5452       # mingw values
5453       dll_entry=_DllMainCRTStartup@12
5454       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5455       ;;
5456     esac
5457
5458     # mingw and cygwin differ, and it's simplest to just exclude the union
5459     # of the two symbol sets.
5460     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5461
5462     # recent cygwin and mingw systems supply a stub DllMain which the user
5463     # can override, but on older systems we have to supply one (in ltdll.c)
5464     if test "x$lt_cv_need_dllmain" = "xyes"; then
5465       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5466       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~
5467         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5468     else
5469       ltdll_obj=
5470       ltdll_cmds=
5471     fi
5472
5473     # Extract the symbol export list from an `--export-all' def file,
5474     # then regenerate the def file from the symbol export list, so that
5475     # the compiled dll only exports the symbol export list.
5476     # Be careful not to strip the DATA tag left be newer dlltools.
5477     export_symbols_cmds="$ltdll_cmds"'
5478       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5479       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5480
5481     # If the export-symbols file already is a .def file (1st line
5482     # is EXPORTS), use it as is.
5483     # If DATA tags from a recent dlltool are present, honour them!
5484     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5485         cp $export_symbols $output_objdir/$soname-def;
5486       else
5487         echo EXPORTS > $output_objdir/$soname-def;
5488         _lt_hint=1;
5489         cat $export_symbols | while read symbol; do
5490          set dummy \$symbol;
5491          case \$# in
5492            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5493            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5494          esac;
5495          _lt_hint=`expr 1 + \$_lt_hint`;
5496         done;
5497       fi~
5498       '"$ltdll_cmds"'
5499       $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~
5500       $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~
5501       $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~
5502       $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~
5503       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5504     ;;
5505
5506   netbsd*)
5507     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5508       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5509       wlarc=
5510     else
5511       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5512       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5513     fi
5514     ;;
5515
5516   solaris* | sysv5*)
5517     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5518       ld_shlibs=no
5519       cat <<EOF 1>&2
5520
5521 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5522 *** create shared libraries on Solaris systems.  Therefore, libtool
5523 *** is disabling shared libraries support.  We urge you to upgrade GNU
5524 *** binutils to release 2.9.1 or newer.  Another option is to modify
5525 *** your PATH or compiler configuration so that the native linker is
5526 *** used, and then restart.
5527
5528 EOF
5529     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5530       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5531       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5532     else
5533       ld_shlibs=no
5534     fi
5535     ;;
5536
5537   sunos4*)
5538     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5539     wlarc=
5540     hardcode_direct=yes
5541     hardcode_shlibpath_var=no
5542     ;;
5543
5544   *)
5545     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5546       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5547       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5548     else
5549       ld_shlibs=no
5550     fi
5551     ;;
5552   esac
5553
5554   if test "$ld_shlibs" = yes; then
5555     runpath_var=LD_RUN_PATH
5556     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5557     export_dynamic_flag_spec='${wl}--export-dynamic'
5558     case $host_os in
5559     cygwin* | mingw* | pw32*)
5560       # dlltool doesn't understand --whole-archive et. al.
5561       whole_archive_flag_spec=
5562       ;;
5563     *)
5564       # ancient GNU ld didn't support --whole-archive et. al.
5565       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5566         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5567       else
5568         whole_archive_flag_spec=
5569       fi
5570       ;;
5571     esac
5572   fi
5573 else
5574   # PORTME fill in a description of your system's linker (not GNU ld)
5575   case $host_os in
5576   aix3*)
5577     allow_undefined_flag=unsupported
5578     always_export_symbols=yes
5579     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'
5580     # Note: this linker hardcodes the directories in LIBPATH if there
5581     # are no directories specified by -L.
5582     hardcode_minus_L=yes
5583     if test "$GCC" = yes && test -z "$link_static_flag"; then
5584       # Neither direct hardcoding nor static linking is supported with a
5585       # broken collect2.
5586       hardcode_direct=unsupported
5587     fi
5588     ;;
5589
5590   aix4* | aix5*)
5591     if test "$host_cpu" = ia64; then
5592       # On IA64, the linker does run time linking by default, so we don't
5593       # have to do anything special.
5594       aix_use_runtimelinking=no
5595       exp_sym_flag='-Bexport'
5596       no_entry_flag=""
5597     else
5598       aix_use_runtimelinking=no
5599
5600       # Test if we are trying to use run time linking or normal
5601       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5602       # need to do runtime linking.
5603       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5604         for ld_flag in $LDFLAGS; do
5605           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5606             aix_use_runtimelinking=yes
5607             break
5608           fi
5609         done
5610       esac
5611
5612       exp_sym_flag='-bexport'
5613       no_entry_flag='-bnoentry'
5614     fi
5615
5616     # When large executables or shared objects are built, AIX ld can
5617     # have problems creating the table of contents.  If linking a library
5618     # or program results in "error TOC overflow" add -mminimal-toc to
5619     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5620     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5621
5622     hardcode_direct=yes
5623     archive_cmds=''
5624     hardcode_libdir_separator=':'
5625     if test "$GCC" = yes; then
5626       case $host_os in aix4.[012]|aix4.[012].*)
5627         collect2name=`${CC} -print-prog-name=collect2`
5628         if test -f "$collect2name" && \
5629           strings "$collect2name" | grep resolve_lib_name >/dev/null
5630         then
5631           # We have reworked collect2
5632           hardcode_direct=yes
5633         else
5634           # We have old collect2
5635           hardcode_direct=unsupported
5636           # It fails to find uninstalled libraries when the uninstalled
5637           # path is not listed in the libpath.  Setting hardcode_minus_L
5638           # to unsupported forces relinking
5639           hardcode_minus_L=yes
5640           hardcode_libdir_flag_spec='-L$libdir'
5641           hardcode_libdir_separator=
5642         fi
5643       esac
5644
5645       shared_flag='-shared'
5646     else
5647       # not using gcc
5648       if test "$host_cpu" = ia64; then
5649         shared_flag='${wl}-G'
5650       else
5651         if test "$aix_use_runtimelinking" = yes; then
5652           shared_flag='${wl}-G'
5653         else
5654           shared_flag='${wl}-bM:SRE'
5655         fi
5656       fi
5657     fi
5658
5659     # It seems that -bexpall can do strange things, so it is better to
5660     # generate a list of symbols to export.
5661     always_export_symbols=yes
5662     if test "$aix_use_runtimelinking" = yes; then
5663       # Warning - without using the other runtime loading flags (-brtl),
5664       # -berok will link without error, but may produce a broken library.
5665       allow_undefined_flag='-berok'
5666       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5667       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"
5668     else
5669       if test "$host_cpu" = ia64; then
5670         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5671         allow_undefined_flag="-z nodefs"
5672         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"
5673       else
5674         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5675         # Warning - without using the other run time loading flags,
5676         # -berok will link without error, but may produce a broken library.
5677         allow_undefined_flag='${wl}-berok'
5678         # This is a bit strange, but is similar to how AIX traditionally builds
5679         # it's shared libraries.
5680         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'
5681       fi
5682     fi
5683     ;;
5684
5685   amigaos*)
5686     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)'
5687     hardcode_libdir_flag_spec='-L$libdir'
5688     hardcode_minus_L=yes
5689     # see comment about different semantics on the GNU ld section
5690     ld_shlibs=no
5691     ;;
5692
5693   cygwin* | mingw* | pw32*)
5694     # When not using gcc, we currently assume that we are using
5695     # Microsoft Visual C++.
5696     # hardcode_libdir_flag_spec is actually meaningless, as there is
5697     # no search path for DLLs.
5698     hardcode_libdir_flag_spec=' '
5699     allow_undefined_flag=unsupported
5700     # Tell ltmain to make .lib files, not .a files.
5701     libext=lib
5702     # FIXME: Setting linknames here is a bad hack.
5703     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5704     # The linker will automatically build a .lib file if we build a DLL.
5705     old_archive_from_new_cmds='true'
5706     # FIXME: Should let the user specify the lib program.
5707     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5708     fix_srcfile_path='`cygpath -w "$srcfile"`'
5709     ;;
5710
5711   darwin* | rhapsody*)
5712     case "$host_os" in
5713     rhapsody* | darwin1.[012])
5714       allow_undefined_flag='-undefined suppress'
5715       ;;
5716     *) # Darwin 1.3 on
5717       allow_undefined_flag='-flat_namespace -undefined suppress'
5718       ;;
5719     esac
5720     # FIXME: Relying on posixy $() will cause problems for
5721     #        cross-compilation, but unfortunately the echo tests do not
5722     #        yet detect zsh echo's removal of \ escapes.
5723     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'
5724     # We need to add '_' to the symbols in $export_symbols first
5725     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5726     hardcode_direct=yes
5727     hardcode_shlibpath_var=no
5728     whole_archive_flag_spec='-all_load $convenience'
5729     ;;
5730
5731   freebsd1*)
5732     ld_shlibs=no
5733     ;;
5734
5735   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5736   # support.  Future versions do this automatically, but an explicit c++rt0.o
5737   # does not break anything, and helps significantly (at the cost of a little
5738   # extra space).
5739   freebsd2.2*)
5740     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5741     hardcode_libdir_flag_spec='-R$libdir'
5742     hardcode_direct=yes
5743     hardcode_shlibpath_var=no
5744     ;;
5745
5746   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5747   freebsd2*)
5748     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5749     hardcode_direct=yes
5750     hardcode_minus_L=yes
5751     hardcode_shlibpath_var=no
5752     ;;
5753
5754   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5755   freebsd*)
5756     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5757     hardcode_libdir_flag_spec='-R$libdir'
5758     hardcode_direct=yes
5759     hardcode_shlibpath_var=no
5760     ;;
5761
5762   hpux9* | hpux10* | hpux11*)
5763     case $host_os in
5764     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' ;;
5765     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5766     esac
5767     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5768     hardcode_libdir_separator=:
5769     hardcode_direct=yes
5770     hardcode_minus_L=yes # Not in the search PATH, but as the default
5771                          # location of the library.
5772     export_dynamic_flag_spec='${wl}-E'
5773     ;;
5774
5775   irix5* | irix6*)
5776     if test "$GCC" = yes; then
5777       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'
5778     else
5779       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'
5780     fi
5781     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5782     hardcode_libdir_separator=:
5783     link_all_deplibs=yes
5784     ;;
5785
5786   netbsd*)
5787     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5788       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5789     else
5790       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5791     fi
5792     hardcode_libdir_flag_spec='-R$libdir'
5793     hardcode_direct=yes
5794     hardcode_shlibpath_var=no
5795     ;;
5796
5797   newsos6)
5798     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5799     hardcode_direct=yes
5800     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5801     hardcode_libdir_separator=:
5802     hardcode_shlibpath_var=no
5803     ;;
5804
5805   openbsd*)
5806     hardcode_direct=yes
5807     hardcode_shlibpath_var=no
5808     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5809       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5810       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5811       export_dynamic_flag_spec='${wl}-E'
5812     else
5813       case "$host_os" in
5814       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5815         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5816         hardcode_libdir_flag_spec='-R$libdir'
5817         ;;
5818       *)
5819         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5820         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5821         ;;
5822       esac
5823     fi
5824     ;;
5825
5826   os2*)
5827     hardcode_libdir_flag_spec='-L$libdir'
5828     hardcode_minus_L=yes
5829     allow_undefined_flag=unsupported
5830     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'
5831     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5832     ;;
5833
5834   osf3*)
5835     if test "$GCC" = yes; then
5836       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5837       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'
5838     else
5839       allow_undefined_flag=' -expect_unresolved \*'
5840       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'
5841     fi
5842     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5843     hardcode_libdir_separator=:
5844     ;;
5845
5846   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5847     if test "$GCC" = yes; then
5848       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5849       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'
5850       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5851     else
5852       allow_undefined_flag=' -expect_unresolved \*'
5853       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'
5854       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5855       $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'
5856
5857       #Both c and cxx compiler support -rpath directly
5858       hardcode_libdir_flag_spec='-rpath $libdir'
5859     fi
5860     hardcode_libdir_separator=:
5861     ;;
5862
5863   sco3.2v5*)
5864     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5865     hardcode_shlibpath_var=no
5866     runpath_var=LD_RUN_PATH
5867     hardcode_runpath_var=yes
5868     export_dynamic_flag_spec='${wl}-Bexport'
5869     ;;
5870
5871   solaris*)
5872     # gcc --version < 3.0 without binutils cannot create self contained
5873     # shared libraries reliably, requiring libgcc.a to resolve some of
5874     # the object symbols generated in some cases.  Libraries that use
5875     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5876     # a copy of libgcc.a into every shared library to guarantee resolving
5877     # such symbols causes other problems:  According to Tim Van Holder
5878     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5879     # (to the application) exception stack for one thing.
5880     no_undefined_flag=' -z defs'
5881     if test "$GCC" = yes; then
5882       case `$CC --version 2>/dev/null` in
5883       [12].*)
5884         cat <<EOF 1>&2
5885
5886 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5887 *** create self contained shared libraries on Solaris systems, without
5888 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5889 *** -no-undefined support, which will at least allow you to build shared
5890 *** libraries.  However, you may find that when you link such libraries
5891 *** into an application without using GCC, you have to manually add
5892 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5893 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5894 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5895
5896 EOF
5897         no_undefined_flag=
5898         ;;
5899       esac
5900     fi
5901     # $CC -shared without GNU ld will not create a library from C++
5902     # object files and a static libstdc++, better avoid it by now
5903     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5904     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5905                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5906     hardcode_libdir_flag_spec='-R$libdir'
5907     hardcode_shlibpath_var=no
5908     case $host_os in
5909     solaris2.[0-5] | solaris2.[0-5].*) ;;
5910     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5911       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5912     esac
5913     link_all_deplibs=yes
5914     ;;
5915
5916   sunos4*)
5917     if test "x$host_vendor" = xsequent; then
5918       # Use $CC to link under sequent, because it throws in some extra .o
5919       # files that make .init and .fini sections work.
5920       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5921     else
5922       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5923     fi
5924     hardcode_libdir_flag_spec='-L$libdir'
5925     hardcode_direct=yes
5926     hardcode_minus_L=yes
5927     hardcode_shlibpath_var=no
5928     ;;
5929
5930   sysv4)
5931     if test "x$host_vendor" = xsno; then
5932       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5933       hardcode_direct=yes # is this really true???
5934     else
5935       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5936       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5937     fi
5938     runpath_var='LD_RUN_PATH'
5939     hardcode_shlibpath_var=no
5940     ;;
5941
5942   sysv4.3*)
5943     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5944     hardcode_shlibpath_var=no
5945     export_dynamic_flag_spec='-Bexport'
5946     ;;
5947
5948   sysv5*)
5949     no_undefined_flag=' -z text'
5950     # $CC -shared without GNU ld will not create a library from C++
5951     # object files and a static libstdc++, better avoid it by now
5952     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5953     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5954                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5955     hardcode_libdir_flag_spec=
5956     hardcode_shlibpath_var=no
5957     runpath_var='LD_RUN_PATH'
5958     ;;
5959
5960   uts4*)
5961     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5962     hardcode_libdir_flag_spec='-L$libdir'
5963     hardcode_shlibpath_var=no
5964     ;;
5965
5966   dgux*)
5967     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5968     hardcode_libdir_flag_spec='-L$libdir'
5969     hardcode_shlibpath_var=no
5970     ;;
5971
5972   sysv4*MP*)
5973     if test -d /usr/nec; then
5974       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5975       hardcode_shlibpath_var=no
5976       runpath_var=LD_RUN_PATH
5977       hardcode_runpath_var=yes
5978       ld_shlibs=yes
5979     fi
5980     ;;
5981
5982   sysv4.2uw2*)
5983     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5984     hardcode_direct=yes
5985     hardcode_minus_L=no
5986     hardcode_shlibpath_var=no
5987     hardcode_runpath_var=yes
5988     runpath_var=LD_RUN_PATH
5989     ;;
5990
5991   sysv5uw7* | unixware7*)
5992     no_undefined_flag='${wl}-z ${wl}text'
5993     if test "$GCC" = yes; then
5994       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5995     else
5996       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
5997     fi
5998     runpath_var='LD_RUN_PATH'
5999     hardcode_shlibpath_var=no
6000     ;;
6001
6002   *)
6003     ld_shlibs=no
6004     ;;
6005   esac
6006 fi
6007 echo "$ac_t""$ld_shlibs" 1>&6
6008 test "$ld_shlibs" = no && can_build_shared=no
6009
6010 # Check hardcoding attributes.
6011 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6012 echo "configure:6013: checking how to hardcode library paths into programs" >&5
6013 hardcode_action=
6014 if test -n "$hardcode_libdir_flag_spec" || \
6015    test -n "$runpath_var"; then
6016
6017   # We can hardcode non-existant directories.
6018   if test "$hardcode_direct" != no &&
6019      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6020      # have to relink, otherwise we might link with an installed library
6021      # when we should be linking with a yet-to-be-installed one
6022      ## test "$hardcode_shlibpath_var" != no &&
6023      test "$hardcode_minus_L" != no; then
6024     # Linking always hardcodes the temporary library directory.
6025     hardcode_action=relink
6026   else
6027     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6028     hardcode_action=immediate
6029   fi
6030 else
6031   # We cannot hardcode anything, or else we can only hardcode existing
6032   # directories.
6033   hardcode_action=unsupported
6034 fi
6035 echo "$ac_t""$hardcode_action" 1>&6
6036
6037 striplib=
6038 old_striplib=
6039 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6040 echo "configure:6041: checking whether stripping libraries is possible" >&5
6041 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6042   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6043   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6044   echo "$ac_t""yes" 1>&6
6045 else
6046   echo "$ac_t""no" 1>&6
6047 fi
6048
6049 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6050 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6051
6052 # PORTME Fill in your ld.so characteristics
6053 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6054 echo "configure:6055: checking dynamic linker characteristics" >&5
6055 library_names_spec=
6056 libname_spec='lib$name'
6057 soname_spec=
6058 postinstall_cmds=
6059 postuninstall_cmds=
6060 finish_cmds=
6061 finish_eval=
6062 shlibpath_var=
6063 shlibpath_overrides_runpath=unknown
6064 version_type=none
6065 dynamic_linker="$host_os ld.so"
6066 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6067 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6068
6069 case $host_os in
6070 aix3*)
6071   version_type=linux
6072   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6073   shlibpath_var=LIBPATH
6074
6075   # AIX has no versioning support, so we append a major version to the name.
6076   soname_spec='${libname}${release}.so$major'
6077   ;;
6078
6079 aix4* | aix5*)
6080   version_type=linux
6081   if test "$host_cpu" = ia64; then
6082     # AIX 5 supports IA64
6083     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6084     shlibpath_var=LD_LIBRARY_PATH
6085   else
6086     # With GCC up to 2.95.x, collect2 would create an import file
6087     # for dependence libraries.  The import file would start with
6088     # the line `#! .'.  This would cause the generated library to
6089     # depend on `.', always an invalid library.  This was fixed in
6090     # development snapshots of GCC prior to 3.0.
6091     case $host_os in
6092       aix4 | aix4.[01] | aix4.[01].*)
6093         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6094              echo ' yes '
6095              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6096           :
6097         else
6098           can_build_shared=no
6099         fi
6100         ;;
6101     esac
6102     # AIX (on Power*) has no versioning support, so currently we can
6103     # not hardcode correct soname into executable. Probably we can
6104     # add versioning support to collect2, so additional links can
6105     # be useful in future.
6106     if test "$aix_use_runtimelinking" = yes; then
6107       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6108       # instead of lib<name>.a to let people know that these are not
6109       # typical AIX shared libraries.
6110       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6111     else
6112       # We preserve .a as extension for shared libraries through AIX4.2
6113       # and later when we are not doing run time linking.
6114       library_names_spec='${libname}${release}.a $libname.a'
6115       soname_spec='${libname}${release}.so$major'
6116     fi
6117     shlibpath_var=LIBPATH
6118   fi
6119   ;;
6120
6121 amigaos*)
6122   library_names_spec='$libname.ixlibrary $libname.a'
6123   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6124   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'
6125   ;;
6126
6127 beos*)
6128   library_names_spec='${libname}.so'
6129   dynamic_linker="$host_os ld.so"
6130   shlibpath_var=LIBRARY_PATH
6131   ;;
6132
6133 bsdi4*)
6134   version_type=linux
6135   need_version=no
6136   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6137   soname_spec='${libname}${release}.so$major'
6138   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6139   shlibpath_var=LD_LIBRARY_PATH
6140   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6141   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6142   export_dynamic_flag_spec=-rdynamic
6143   # the default ld.so.conf also contains /usr/contrib/lib and
6144   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6145   # libtool to hard-code these into programs
6146   ;;
6147
6148 cygwin* | mingw* | pw32*)
6149   version_type=windows
6150   need_version=no
6151   need_lib_prefix=no
6152   case $GCC,$host_os in
6153   yes,cygwin*)
6154     library_names_spec='$libname.dll.a'
6155     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6156     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6157       dldir=$destdir/`dirname \$dlpath`~
6158       test -d \$dldir || mkdir -p \$dldir~
6159       $install_prog .libs/$dlname \$dldir/$dlname'
6160     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6161       dlpath=$dir/\$dldll~
6162        $rm \$dlpath'
6163     ;;
6164   yes,mingw*)
6165     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6166     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6167     ;;
6168   yes,pw32*)
6169     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6170     ;;
6171   *)
6172     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6173     ;;
6174   esac
6175   dynamic_linker='Win32 ld.exe'
6176   # FIXME: first we should search . and the directory the executable is in
6177   shlibpath_var=PATH
6178   ;;
6179
6180 darwin* | rhapsody*)
6181   dynamic_linker="$host_os dyld"
6182   version_type=darwin
6183   need_lib_prefix=no
6184   need_version=no
6185   # FIXME: Relying on posixy $() will cause problems for
6186   #        cross-compilation, but unfortunately the echo tests do not
6187   #        yet detect zsh echo's removal of \ escapes.
6188   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)'
6189   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6190   shlibpath_overrides_runpath=yes
6191   shlibpath_var=DYLD_LIBRARY_PATH
6192   ;;
6193
6194 freebsd1*)
6195   dynamic_linker=no
6196   ;;
6197
6198 freebsd*)
6199   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6200   version_type=freebsd-$objformat
6201   case $version_type in
6202     freebsd-elf*)
6203       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6204       need_version=no
6205       need_lib_prefix=no
6206       ;;
6207     freebsd-*)
6208       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6209       need_version=yes
6210       ;;
6211   esac
6212   shlibpath_var=LD_LIBRARY_PATH
6213   case $host_os in
6214   freebsd2*)
6215     shlibpath_overrides_runpath=yes
6216     ;;
6217   *)
6218     shlibpath_overrides_runpath=no
6219     hardcode_into_libs=yes
6220     ;;
6221   esac
6222   ;;
6223
6224 gnu*)
6225   version_type=linux
6226   need_lib_prefix=no
6227   need_version=no
6228   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6229   soname_spec='${libname}${release}.so$major'
6230   shlibpath_var=LD_LIBRARY_PATH
6231   hardcode_into_libs=yes
6232   ;;
6233
6234 hpux9* | hpux10* | hpux11*)
6235   # Give a soname corresponding to the major version so that dld.sl refuses to
6236   # link against other versions.
6237   dynamic_linker="$host_os dld.sl"
6238   version_type=sunos
6239   need_lib_prefix=no
6240   need_version=no
6241   shlibpath_var=SHLIB_PATH
6242   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6243   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6244   soname_spec='${libname}${release}.sl$major'
6245   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6246   postinstall_cmds='chmod 555 $lib'
6247   ;;
6248
6249 irix5* | irix6*)
6250   version_type=irix
6251   need_lib_prefix=no
6252   need_version=no
6253   soname_spec='${libname}${release}.so$major'
6254   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6255   case $host_os in
6256   irix5*)
6257     libsuff= shlibsuff=
6258     ;;
6259   *)
6260     case $LD in # libtool.m4 will add one of these switches to LD
6261     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6262     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6263     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6264     *) libsuff= shlibsuff= libmagic=never-match;;
6265     esac
6266     ;;
6267   esac
6268   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6269   shlibpath_overrides_runpath=no
6270   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6271   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6272   ;;
6273
6274 # No shared lib support for Linux oldld, aout, or coff.
6275 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6276   dynamic_linker=no
6277   ;;
6278
6279 # This must be Linux ELF.
6280 linux-gnu*)
6281   version_type=linux
6282   need_lib_prefix=no
6283   need_version=no
6284   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6285   soname_spec='${libname}${release}.so$major'
6286   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6287   shlibpath_var=LD_LIBRARY_PATH
6288   shlibpath_overrides_runpath=no
6289   # This implies no fast_install, which is unacceptable.
6290   # Some rework will be needed to allow for fast_install
6291   # before this can be enabled.
6292   hardcode_into_libs=yes
6293
6294   # We used to test for /lib/ld.so.1 and disable shared libraries on
6295   # powerpc, because MkLinux only supported shared libraries with the
6296   # GNU dynamic linker.  Since this was broken with cross compilers,
6297   # most powerpc-linux boxes support dynamic linking these days and
6298   # people can always --disable-shared, the test was removed, and we
6299   # assume the GNU/Linux dynamic linker is in use.
6300   dynamic_linker='GNU/Linux ld.so'
6301   ;;
6302
6303 netbsd*)
6304   version_type=sunos
6305   need_lib_prefix=no
6306   need_version=no
6307   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6308     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6309     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6310     dynamic_linker='NetBSD (a.out) ld.so'
6311   else
6312     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6313     soname_spec='${libname}${release}.so$major'
6314     dynamic_linker='NetBSD ld.elf_so'
6315   fi
6316   shlibpath_var=LD_LIBRARY_PATH
6317   shlibpath_overrides_runpath=yes
6318   hardcode_into_libs=yes
6319   ;;
6320
6321 newsos6)
6322   version_type=linux
6323   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6324   shlibpath_var=LD_LIBRARY_PATH
6325   shlibpath_overrides_runpath=yes
6326   ;;
6327
6328 openbsd*)
6329   version_type=sunos
6330   need_lib_prefix=no
6331   need_version=no
6332   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6333     case "$host_os" in
6334     openbsd2.[89] | openbsd2.[89].*)
6335       shlibpath_overrides_runpath=no
6336       ;;
6337     *)
6338       shlibpath_overrides_runpath=yes
6339       ;;
6340     esac
6341   else
6342     shlibpath_overrides_runpath=yes
6343   fi
6344   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6345   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6346   shlibpath_var=LD_LIBRARY_PATH
6347   ;;
6348
6349 os2*)
6350   libname_spec='$name'
6351   need_lib_prefix=no
6352   library_names_spec='$libname.dll $libname.a'
6353   dynamic_linker='OS/2 ld.exe'
6354   shlibpath_var=LIBPATH
6355   ;;
6356
6357 osf3* | osf4* | osf5*)
6358   version_type=osf
6359   need_version=no
6360   soname_spec='${libname}${release}.so'
6361   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6362   shlibpath_var=LD_LIBRARY_PATH
6363   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6364   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6365   ;;
6366
6367 sco3.2v5*)
6368   version_type=osf
6369   soname_spec='${libname}${release}.so$major'
6370   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6371   shlibpath_var=LD_LIBRARY_PATH
6372   ;;
6373
6374 solaris*)
6375   version_type=linux
6376   need_lib_prefix=no
6377   need_version=no
6378   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6379   soname_spec='${libname}${release}.so$major'
6380   shlibpath_var=LD_LIBRARY_PATH
6381   shlibpath_overrides_runpath=yes
6382   hardcode_into_libs=yes
6383   # ldd complains unless libraries are executable
6384   postinstall_cmds='chmod +x $lib'
6385   ;;
6386
6387 sunos4*)
6388   version_type=sunos
6389   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6390   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6391   shlibpath_var=LD_LIBRARY_PATH
6392   shlibpath_overrides_runpath=yes
6393   if test "$with_gnu_ld" = yes; then
6394     need_lib_prefix=no
6395   fi
6396   need_version=yes
6397   ;;
6398
6399 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6400   version_type=linux
6401   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6402   soname_spec='${libname}${release}.so$major'
6403   shlibpath_var=LD_LIBRARY_PATH
6404   case $host_vendor in
6405     sni)
6406       shlibpath_overrides_runpath=no
6407       ;;
6408     motorola)
6409       need_lib_prefix=no
6410       need_version=no
6411       shlibpath_overrides_runpath=no
6412       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6413       ;;
6414   esac
6415   ;;
6416
6417 uts4*)
6418   version_type=linux
6419   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6420   soname_spec='${libname}${release}.so$major'
6421   shlibpath_var=LD_LIBRARY_PATH
6422   ;;
6423
6424 dgux*)
6425   version_type=linux
6426   need_lib_prefix=no
6427   need_version=no
6428   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6429   soname_spec='${libname}${release}.so$major'
6430   shlibpath_var=LD_LIBRARY_PATH
6431   ;;
6432
6433 sysv4*MP*)
6434   if test -d /usr/nec ;then
6435     version_type=linux
6436     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6437     soname_spec='$libname.so.$major'
6438     shlibpath_var=LD_LIBRARY_PATH
6439   fi
6440   ;;
6441
6442 *)
6443   dynamic_linker=no
6444   ;;
6445 esac
6446 echo "$ac_t""$dynamic_linker" 1>&6
6447 test "$dynamic_linker" = no && can_build_shared=no
6448
6449 # Report the final consequences.
6450 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6451 echo "configure:6452: checking if libtool supports shared libraries" >&5
6452 echo "$ac_t""$can_build_shared" 1>&6
6453
6454 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6455 echo "configure:6456: checking whether to build shared libraries" >&5
6456 test "$can_build_shared" = "no" && enable_shared=no
6457
6458 # On AIX, shared libraries and static libraries use the same namespace, and
6459 # are all built from PIC.
6460 case "$host_os" in
6461 aix3*)
6462   test "$enable_shared" = yes && enable_static=no
6463   if test -n "$RANLIB"; then
6464     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6465     postinstall_cmds='$RANLIB $lib'
6466   fi
6467   ;;
6468
6469 aix4*)
6470   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6471     test "$enable_shared" = yes && enable_static=no
6472   fi
6473   ;;
6474 esac
6475 echo "$ac_t""$enable_shared" 1>&6
6476
6477 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6478 echo "configure:6479: checking whether to build static libraries" >&5
6479 # Make sure either enable_shared or enable_static is yes.
6480 test "$enable_shared" = yes || enable_static=yes
6481 echo "$ac_t""$enable_static" 1>&6
6482
6483 if test "$hardcode_action" = relink; then
6484   # Fast installation is not supported
6485   enable_fast_install=no
6486 elif test "$shlibpath_overrides_runpath" = yes ||
6487      test "$enable_shared" = no; then
6488   # Fast installation is not necessary
6489   enable_fast_install=needless
6490 fi
6491
6492 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6493 if test "$GCC" = yes; then
6494   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6495 fi
6496
6497 if test "x$enable_dlopen" != xyes; then
6498   enable_dlopen=unknown
6499   enable_dlopen_self=unknown
6500   enable_dlopen_self_static=unknown
6501 else
6502   lt_cv_dlopen=no
6503   lt_cv_dlopen_libs=
6504
6505   case $host_os in
6506   beos*)
6507     lt_cv_dlopen="load_add_on"
6508     lt_cv_dlopen_libs=
6509     lt_cv_dlopen_self=yes
6510     ;;
6511
6512   cygwin* | mingw* | pw32*)
6513     lt_cv_dlopen="LoadLibrary"
6514     lt_cv_dlopen_libs=
6515    ;;
6516
6517   *)
6518     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6519 echo "configure:6520: checking for shl_load" >&5
6520 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6521   echo $ac_n "(cached) $ac_c" 1>&6
6522 else
6523   cat > conftest.$ac_ext <<EOF
6524 #line 6525 "configure"
6525 #include "confdefs.h"
6526 /* System header to define __stub macros and hopefully few prototypes,
6527     which can conflict with char shl_load(); below.  */
6528 #include <assert.h>
6529 /* Override any gcc2 internal prototype to avoid an error.  */
6530 /* We use char because int might match the return type of a gcc2
6531     builtin and then its argument prototype would still apply.  */
6532 char shl_load();
6533 char (*f)();
6534
6535 int main() {
6536
6537 /* The GNU C library defines this for functions which it implements
6538     to always fail with ENOSYS.  Some functions are actually named
6539     something starting with __ and the normal name is an alias.  */
6540 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6541 choke me
6542 #else
6543 f = shl_load;
6544 #endif
6545
6546 ; return 0; }
6547 EOF
6548 if { (eval echo configure:6549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6549   rm -rf conftest*
6550   eval "ac_cv_func_shl_load=yes"
6551 else
6552   echo "configure: failed program was:" >&5
6553   cat conftest.$ac_ext >&5
6554   rm -rf conftest*
6555   eval "ac_cv_func_shl_load=no"
6556 fi
6557 rm -f conftest*
6558 fi
6559
6560 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6561   echo "$ac_t""yes" 1>&6
6562   lt_cv_dlopen="shl_load"
6563 else
6564   echo "$ac_t""no" 1>&6
6565 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6566 echo "configure:6567: checking for shl_load in -ldld" >&5
6567 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6568 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6569   echo $ac_n "(cached) $ac_c" 1>&6
6570 else
6571   ac_save_LIBS="$LIBS"
6572 LIBS="-ldld  $LIBS"
6573 cat > conftest.$ac_ext <<EOF
6574 #line 6575 "configure"
6575 #include "confdefs.h"
6576 /* Override any gcc2 internal prototype to avoid an error.  */
6577 /* We use char because int might match the return type of a gcc2
6578     builtin and then its argument prototype would still apply.  */
6579 char shl_load();
6580
6581 int main() {
6582 shl_load()
6583 ; return 0; }
6584 EOF
6585 if { (eval echo configure:6586: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6586   rm -rf conftest*
6587   eval "ac_cv_lib_$ac_lib_var=yes"
6588 else
6589   echo "configure: failed program was:" >&5
6590   cat conftest.$ac_ext >&5
6591   rm -rf conftest*
6592   eval "ac_cv_lib_$ac_lib_var=no"
6593 fi
6594 rm -f conftest*
6595 LIBS="$ac_save_LIBS"
6596
6597 fi
6598 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6599   echo "$ac_t""yes" 1>&6
6600   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6601 else
6602   echo "$ac_t""no" 1>&6
6603 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6604 echo "configure:6605: checking for dlopen" >&5
6605 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6606   echo $ac_n "(cached) $ac_c" 1>&6
6607 else
6608   cat > conftest.$ac_ext <<EOF
6609 #line 6610 "configure"
6610 #include "confdefs.h"
6611 /* System header to define __stub macros and hopefully few prototypes,
6612     which can conflict with char dlopen(); below.  */
6613 #include <assert.h>
6614 /* Override any gcc2 internal prototype to avoid an error.  */
6615 /* We use char because int might match the return type of a gcc2
6616     builtin and then its argument prototype would still apply.  */
6617 char dlopen();
6618 char (*f)();
6619
6620 int main() {
6621
6622 /* The GNU C library defines this for functions which it implements
6623     to always fail with ENOSYS.  Some functions are actually named
6624     something starting with __ and the normal name is an alias.  */
6625 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6626 choke me
6627 #else
6628 f = dlopen;
6629 #endif
6630
6631 ; return 0; }
6632 EOF
6633 if { (eval echo configure:6634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6634   rm -rf conftest*
6635   eval "ac_cv_func_dlopen=yes"
6636 else
6637   echo "configure: failed program was:" >&5
6638   cat conftest.$ac_ext >&5
6639   rm -rf conftest*
6640   eval "ac_cv_func_dlopen=no"
6641 fi
6642 rm -f conftest*
6643 fi
6644
6645 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6646   echo "$ac_t""yes" 1>&6
6647   lt_cv_dlopen="dlopen"
6648 else
6649   echo "$ac_t""no" 1>&6
6650 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6651 echo "configure:6652: checking for dlopen in -ldl" >&5
6652 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6653 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6654   echo $ac_n "(cached) $ac_c" 1>&6
6655 else
6656   ac_save_LIBS="$LIBS"
6657 LIBS="-ldl  $LIBS"
6658 cat > conftest.$ac_ext <<EOF
6659 #line 6660 "configure"
6660 #include "confdefs.h"
6661 /* Override any gcc2 internal prototype to avoid an error.  */
6662 /* We use char because int might match the return type of a gcc2
6663     builtin and then its argument prototype would still apply.  */
6664 char dlopen();
6665
6666 int main() {
6667 dlopen()
6668 ; return 0; }
6669 EOF
6670 if { (eval echo configure:6671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6671   rm -rf conftest*
6672   eval "ac_cv_lib_$ac_lib_var=yes"
6673 else
6674   echo "configure: failed program was:" >&5
6675   cat conftest.$ac_ext >&5
6676   rm -rf conftest*
6677   eval "ac_cv_lib_$ac_lib_var=no"
6678 fi
6679 rm -f conftest*
6680 LIBS="$ac_save_LIBS"
6681
6682 fi
6683 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6684   echo "$ac_t""yes" 1>&6
6685   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6686 else
6687   echo "$ac_t""no" 1>&6
6688 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6689 echo "configure:6690: checking for dlopen in -lsvld" >&5
6690 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6691 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6692   echo $ac_n "(cached) $ac_c" 1>&6
6693 else
6694   ac_save_LIBS="$LIBS"
6695 LIBS="-lsvld  $LIBS"
6696 cat > conftest.$ac_ext <<EOF
6697 #line 6698 "configure"
6698 #include "confdefs.h"
6699 /* Override any gcc2 internal prototype to avoid an error.  */
6700 /* We use char because int might match the return type of a gcc2
6701     builtin and then its argument prototype would still apply.  */
6702 char dlopen();
6703
6704 int main() {
6705 dlopen()
6706 ; return 0; }
6707 EOF
6708 if { (eval echo configure:6709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6709   rm -rf conftest*
6710   eval "ac_cv_lib_$ac_lib_var=yes"
6711 else
6712   echo "configure: failed program was:" >&5
6713   cat conftest.$ac_ext >&5
6714   rm -rf conftest*
6715   eval "ac_cv_lib_$ac_lib_var=no"
6716 fi
6717 rm -f conftest*
6718 LIBS="$ac_save_LIBS"
6719
6720 fi
6721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6722   echo "$ac_t""yes" 1>&6
6723   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6724 else
6725   echo "$ac_t""no" 1>&6
6726 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6727 echo "configure:6728: checking for dld_link in -ldld" >&5
6728 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6729 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6730   echo $ac_n "(cached) $ac_c" 1>&6
6731 else
6732   ac_save_LIBS="$LIBS"
6733 LIBS="-ldld  $LIBS"
6734 cat > conftest.$ac_ext <<EOF
6735 #line 6736 "configure"
6736 #include "confdefs.h"
6737 /* Override any gcc2 internal prototype to avoid an error.  */
6738 /* We use char because int might match the return type of a gcc2
6739     builtin and then its argument prototype would still apply.  */
6740 char dld_link();
6741
6742 int main() {
6743 dld_link()
6744 ; return 0; }
6745 EOF
6746 if { (eval echo configure:6747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6747   rm -rf conftest*
6748   eval "ac_cv_lib_$ac_lib_var=yes"
6749 else
6750   echo "configure: failed program was:" >&5
6751   cat conftest.$ac_ext >&5
6752   rm -rf conftest*
6753   eval "ac_cv_lib_$ac_lib_var=no"
6754 fi
6755 rm -f conftest*
6756 LIBS="$ac_save_LIBS"
6757
6758 fi
6759 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6760   echo "$ac_t""yes" 1>&6
6761   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6762 else
6763   echo "$ac_t""no" 1>&6
6764 fi
6765
6766               
6767 fi
6768
6769             
6770 fi
6771
6772           
6773 fi
6774
6775         
6776 fi
6777
6778       
6779 fi
6780
6781     ;;
6782   esac
6783
6784   if test "x$lt_cv_dlopen" != xno; then
6785     enable_dlopen=yes
6786   else
6787     enable_dlopen=no
6788   fi
6789
6790   case $lt_cv_dlopen in
6791   dlopen)
6792     save_CPPFLAGS="$CPPFLAGS"
6793         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6794
6795     save_LDFLAGS="$LDFLAGS"
6796     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6797
6798     save_LIBS="$LIBS"
6799     LIBS="$lt_cv_dlopen_libs $LIBS"
6800
6801     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6802 echo "configure:6803: checking whether a program can dlopen itself" >&5
6803 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6804   echo $ac_n "(cached) $ac_c" 1>&6
6805 else
6806           if test "$cross_compiling" = yes; then :
6807   lt_cv_dlopen_self=cross
6808 else
6809     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6810   lt_status=$lt_dlunknown
6811   cat > conftest.$ac_ext <<EOF
6812 #line 6813 "configure"
6813 #include "confdefs.h"
6814
6815 #if HAVE_DLFCN_H
6816 #include <dlfcn.h>
6817 #endif
6818
6819 #include <stdio.h>
6820
6821 #ifdef RTLD_GLOBAL
6822 #  define LT_DLGLOBAL           RTLD_GLOBAL
6823 #else
6824 #  ifdef DL_GLOBAL
6825 #    define LT_DLGLOBAL         DL_GLOBAL
6826 #  else
6827 #    define LT_DLGLOBAL         0
6828 #  endif
6829 #endif
6830
6831 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6832    find out it does not work in some platform. */
6833 #ifndef LT_DLLAZY_OR_NOW
6834 #  ifdef RTLD_LAZY
6835 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6836 #  else
6837 #    ifdef DL_LAZY
6838 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6839 #    else
6840 #      ifdef RTLD_NOW
6841 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6842 #      else
6843 #        ifdef DL_NOW
6844 #          define LT_DLLAZY_OR_NOW      DL_NOW
6845 #        else
6846 #          define LT_DLLAZY_OR_NOW      0
6847 #        endif
6848 #      endif
6849 #    endif
6850 #  endif
6851 #endif
6852
6853 #ifdef __cplusplus
6854 extern "C" void exit (int);
6855 #endif
6856
6857 void fnord() { int i=42;}
6858 int main ()
6859 {
6860   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6861   int status = $lt_dlunknown;
6862
6863   if (self)
6864     {
6865       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6866       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6867       /* dlclose (self); */
6868     }
6869
6870     exit (status);
6871 }
6872 EOF
6873   if { (eval echo configure:6874: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6874     (./conftest; exit; ) 2>/dev/null
6875     lt_status=$?
6876     case x$lt_status in
6877       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6878       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6879       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6880     esac
6881   else :
6882     # compilation failed
6883     lt_cv_dlopen_self=no
6884   fi
6885 fi
6886 rm -fr conftest*
6887
6888     
6889 fi
6890
6891 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6892
6893     if test "x$lt_cv_dlopen_self" = xyes; then
6894       LDFLAGS="$LDFLAGS $link_static_flag"
6895       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6896 echo "configure:6897: checking whether a statically linked program can dlopen itself" >&5
6897 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6898   echo $ac_n "(cached) $ac_c" 1>&6
6899 else
6900           if test "$cross_compiling" = yes; then :
6901   lt_cv_dlopen_self_static=cross
6902 else
6903     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6904   lt_status=$lt_dlunknown
6905   cat > conftest.$ac_ext <<EOF
6906 #line 6907 "configure"
6907 #include "confdefs.h"
6908
6909 #if HAVE_DLFCN_H
6910 #include <dlfcn.h>
6911 #endif
6912
6913 #include <stdio.h>
6914
6915 #ifdef RTLD_GLOBAL
6916 #  define LT_DLGLOBAL           RTLD_GLOBAL
6917 #else
6918 #  ifdef DL_GLOBAL
6919 #    define LT_DLGLOBAL         DL_GLOBAL
6920 #  else
6921 #    define LT_DLGLOBAL         0
6922 #  endif
6923 #endif
6924
6925 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6926    find out it does not work in some platform. */
6927 #ifndef LT_DLLAZY_OR_NOW
6928 #  ifdef RTLD_LAZY
6929 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6930 #  else
6931 #    ifdef DL_LAZY
6932 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6933 #    else
6934 #      ifdef RTLD_NOW
6935 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6936 #      else
6937 #        ifdef DL_NOW
6938 #          define LT_DLLAZY_OR_NOW      DL_NOW
6939 #        else
6940 #          define LT_DLLAZY_OR_NOW      0
6941 #        endif
6942 #      endif
6943 #    endif
6944 #  endif
6945 #endif
6946
6947 #ifdef __cplusplus
6948 extern "C" void exit (int);
6949 #endif
6950
6951 void fnord() { int i=42;}
6952 int main ()
6953 {
6954   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6955   int status = $lt_dlunknown;
6956
6957   if (self)
6958     {
6959       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6960       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6961       /* dlclose (self); */
6962     }
6963
6964     exit (status);
6965 }
6966 EOF
6967   if { (eval echo configure:6968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6968     (./conftest; exit; ) 2>/dev/null
6969     lt_status=$?
6970     case x$lt_status in
6971       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6972       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6973       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6974     esac
6975   else :
6976     # compilation failed
6977     lt_cv_dlopen_self_static=no
6978   fi
6979 fi
6980 rm -fr conftest*
6981
6982       
6983 fi
6984
6985 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
6986     fi
6987
6988     CPPFLAGS="$save_CPPFLAGS"
6989     LDFLAGS="$save_LDFLAGS"
6990     LIBS="$save_LIBS"
6991     ;;
6992   esac
6993
6994   case $lt_cv_dlopen_self in
6995   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
6996   *) enable_dlopen_self=unknown ;;
6997   esac
6998
6999   case $lt_cv_dlopen_self_static in
7000   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7001   *) enable_dlopen_self_static=unknown ;;
7002   esac
7003 fi
7004
7005
7006 if test "$enable_shared" = yes && test "$GCC" = yes; then
7007   case $archive_cmds in
7008   *'~'*)
7009     # FIXME: we may have to deal with multi-command sequences.
7010     ;;
7011   '$CC '*)
7012     # Test whether the compiler implicitly links with -lc since on some
7013     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7014     # to ld, don't add -lc before -lgcc.
7015     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7016 echo "configure:7017: checking whether -lc should be explicitly linked in" >&5
7017     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7018   echo $ac_n "(cached) $ac_c" 1>&6
7019 else
7020   $rm conftest*
7021     echo 'static int dummy;' > conftest.$ac_ext
7022
7023     if { (eval echo configure:7024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7024       soname=conftest
7025       lib=conftest
7026       libobjs=conftest.$ac_objext
7027       deplibs=
7028       wl=$lt_cv_prog_cc_wl
7029       compiler_flags=-v
7030       linker_flags=-v
7031       verstring=
7032       output_objdir=.
7033       libname=conftest
7034       save_allow_undefined_flag=$allow_undefined_flag
7035       allow_undefined_flag=
7036       if { (eval echo configure:7037: \"$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; }
7037       then
7038         lt_cv_archive_cmds_need_lc=no
7039       else
7040         lt_cv_archive_cmds_need_lc=yes
7041       fi
7042       allow_undefined_flag=$save_allow_undefined_flag
7043     else
7044       cat conftest.err 1>&5
7045     fi
7046 fi
7047
7048     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7049     ;;
7050   esac
7051 fi
7052 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7053
7054 # The second clause should only fire when bootstrapping the
7055 # libtool distribution, otherwise you forgot to ship ltmain.sh
7056 # with your package, and you will get complaints that there are
7057 # no rules to generate ltmain.sh.
7058 if test -f "$ltmain"; then
7059   :
7060 else
7061   # If there is no Makefile yet, we rely on a make rule to execute
7062   # `config.status --recheck' to rerun these tests and create the
7063   # libtool script then.
7064   test -f Makefile && make "$ltmain"
7065 fi
7066
7067 if test -f "$ltmain"; then
7068   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7069   $rm -f "${ofile}T"
7070
7071   echo creating $ofile
7072
7073   # Now quote all the things that may contain metacharacters while being
7074   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7075   # variables and quote the copies for generation of the libtool script.
7076   for var in echo old_CC old_CFLAGS \
7077     AR AR_FLAGS CC LD LN_S NM SHELL \
7078     reload_flag reload_cmds wl \
7079     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7080     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7081     library_names_spec soname_spec \
7082     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7083     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7084     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7085     old_striplib striplib file_magic_cmd export_symbols_cmds \
7086     deplibs_check_method allow_undefined_flag no_undefined_flag \
7087     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7088     global_symbol_to_c_name_address \
7089     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7090     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7091     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7092
7093     case $var in
7094     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7095     old_postinstall_cmds | old_postuninstall_cmds | \
7096     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7097     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7098     postinstall_cmds | postuninstall_cmds | \
7099     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7100       # Double-quote double-evaled strings.
7101       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7102       ;;
7103     *)
7104       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7105       ;;
7106     esac
7107   done
7108
7109   cat <<__EOF__ > "${ofile}T"
7110 #! $SHELL
7111
7112 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7113 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7114 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7115 #
7116 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7117 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7118 #
7119 # This program is free software; you can redistribute it and/or modify
7120 # it under the terms of the GNU General Public License as published by
7121 # the Free Software Foundation; either version 2 of the License, or
7122 # (at your option) any later version.
7123 #
7124 # This program is distributed in the hope that it will be useful, but
7125 # WITHOUT ANY WARRANTY; without even the implied warranty of
7126 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7127 # General Public License for more details.
7128 #
7129 # You should have received a copy of the GNU General Public License
7130 # along with this program; if not, write to the Free Software
7131 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7132 #
7133 # As a special exception to the GNU General Public License, if you
7134 # distribute this file as part of a program that contains a
7135 # configuration script generated by Autoconf, you may include it under
7136 # the same distribution terms that you use for the rest of that program.
7137
7138 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7139 Xsed="sed -e s/^X//"
7140
7141 # The HP-UX ksh and POSIX shell print the target directory to stdout
7142 # if CDPATH is set.
7143 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7144
7145 # ### BEGIN LIBTOOL CONFIG
7146
7147 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7148
7149 # Shell to use when invoking shell scripts.
7150 SHELL=$lt_SHELL
7151
7152 # Whether or not to build shared libraries.
7153 build_libtool_libs=$enable_shared
7154
7155 # Whether or not to build static libraries.
7156 build_old_libs=$enable_static
7157
7158 # Whether or not to add -lc for building shared libraries.
7159 build_libtool_need_lc=$need_lc
7160
7161 # Whether or not to optimize for fast installation.
7162 fast_install=$enable_fast_install
7163
7164 # The host system.
7165 host_alias=$host_alias
7166 host=$host
7167
7168 # An echo program that does not interpret backslashes.
7169 echo=$lt_echo
7170
7171 # The archiver.
7172 AR=$lt_AR
7173 AR_FLAGS=$lt_AR_FLAGS
7174
7175 # The default C compiler.
7176 CC=$lt_CC
7177
7178 # Is the compiler the GNU C compiler?
7179 with_gcc=$GCC
7180
7181 # The linker used to build libraries.
7182 LD=$lt_LD
7183
7184 # Whether we need hard or soft links.
7185 LN_S=$lt_LN_S
7186
7187 # A BSD-compatible nm program.
7188 NM=$lt_NM
7189
7190 # A symbol stripping program
7191 STRIP=$STRIP
7192
7193 # Used to examine libraries when file_magic_cmd begins "file"
7194 MAGIC_CMD=$MAGIC_CMD
7195
7196 # Used on cygwin: DLL creation program.
7197 DLLTOOL="$DLLTOOL"
7198
7199 # Used on cygwin: object dumper.
7200 OBJDUMP="$OBJDUMP"
7201
7202 # Used on cygwin: assembler.
7203 AS="$AS"
7204
7205 # The name of the directory that contains temporary libtool files.
7206 objdir=$objdir
7207
7208 # How to create reloadable object files.
7209 reload_flag=$lt_reload_flag
7210 reload_cmds=$lt_reload_cmds
7211
7212 # How to pass a linker flag through the compiler.
7213 wl=$lt_wl
7214
7215 # Object file suffix (normally "o").
7216 objext="$ac_objext"
7217
7218 # Old archive suffix (normally "a").
7219 libext="$libext"
7220
7221 # Executable file suffix (normally "").
7222 exeext="$exeext"
7223
7224 # Additional compiler flags for building library objects.
7225 pic_flag=$lt_pic_flag
7226 pic_mode=$pic_mode
7227
7228 # Does compiler simultaneously support -c and -o options?
7229 compiler_c_o=$lt_compiler_c_o
7230
7231 # Can we write directly to a .lo ?
7232 compiler_o_lo=$lt_compiler_o_lo
7233
7234 # Must we lock files when doing compilation ?
7235 need_locks=$lt_need_locks
7236
7237 # Do we need the lib prefix for modules?
7238 need_lib_prefix=$need_lib_prefix
7239
7240 # Do we need a version for libraries?
7241 need_version=$need_version
7242
7243 # Whether dlopen is supported.
7244 dlopen_support=$enable_dlopen
7245
7246 # Whether dlopen of programs is supported.
7247 dlopen_self=$enable_dlopen_self
7248
7249 # Whether dlopen of statically linked programs is supported.
7250 dlopen_self_static=$enable_dlopen_self_static
7251
7252 # Compiler flag to prevent dynamic linking.
7253 link_static_flag=$lt_link_static_flag
7254
7255 # Compiler flag to turn off builtin functions.
7256 no_builtin_flag=$lt_no_builtin_flag
7257
7258 # Compiler flag to allow reflexive dlopens.
7259 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7260
7261 # Compiler flag to generate shared objects directly from archives.
7262 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7263
7264 # Compiler flag to generate thread-safe objects.
7265 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7266
7267 # Library versioning type.
7268 version_type=$version_type
7269
7270 # Format of library name prefix.
7271 libname_spec=$lt_libname_spec
7272
7273 # List of archive names.  First name is the real one, the rest are links.
7274 # The last name is the one that the linker finds with -lNAME.
7275 library_names_spec=$lt_library_names_spec
7276
7277 # The coded name of the library, if different from the real name.
7278 soname_spec=$lt_soname_spec
7279
7280 # Commands used to build and install an old-style archive.
7281 RANLIB=$lt_RANLIB
7282 old_archive_cmds=$lt_old_archive_cmds
7283 old_postinstall_cmds=$lt_old_postinstall_cmds
7284 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7285
7286 # Create an old-style archive from a shared archive.
7287 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7288
7289 # Create a temporary old-style archive to link instead of a shared archive.
7290 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7291
7292 # Commands used to build and install a shared archive.
7293 archive_cmds=$lt_archive_cmds
7294 archive_expsym_cmds=$lt_archive_expsym_cmds
7295 postinstall_cmds=$lt_postinstall_cmds
7296 postuninstall_cmds=$lt_postuninstall_cmds
7297
7298 # Commands to strip libraries.
7299 old_striplib=$lt_old_striplib
7300 striplib=$lt_striplib
7301
7302 # Method to check whether dependent libraries are shared objects.
7303 deplibs_check_method=$lt_deplibs_check_method
7304
7305 # Command to use when deplibs_check_method == file_magic.
7306 file_magic_cmd=$lt_file_magic_cmd
7307
7308 # Flag that allows shared libraries with undefined symbols to be built.
7309 allow_undefined_flag=$lt_allow_undefined_flag
7310
7311 # Flag that forces no undefined symbols.
7312 no_undefined_flag=$lt_no_undefined_flag
7313
7314 # Commands used to finish a libtool library installation in a directory.
7315 finish_cmds=$lt_finish_cmds
7316
7317 # Same as above, but a single script fragment to be evaled but not shown.
7318 finish_eval=$lt_finish_eval
7319
7320 # Take the output of nm and produce a listing of raw symbols and C names.
7321 global_symbol_pipe=$lt_global_symbol_pipe
7322
7323 # Transform the output of nm in a proper C declaration
7324 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7325
7326 # Transform the output of nm in a C name address pair
7327 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7328
7329 # This is the shared library runtime path variable.
7330 runpath_var=$runpath_var
7331
7332 # This is the shared library path variable.
7333 shlibpath_var=$shlibpath_var
7334
7335 # Is shlibpath searched before the hard-coded library search path?
7336 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7337
7338 # How to hardcode a shared library path into an executable.
7339 hardcode_action=$hardcode_action
7340
7341 # Whether we should hardcode library paths into libraries.
7342 hardcode_into_libs=$hardcode_into_libs
7343
7344 # Flag to hardcode \$libdir into a binary during linking.
7345 # This must work even if \$libdir does not exist.
7346 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7347
7348 # Whether we need a single -rpath flag with a separated argument.
7349 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7350
7351 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7352 # resulting binary.
7353 hardcode_direct=$hardcode_direct
7354
7355 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7356 # resulting binary.
7357 hardcode_minus_L=$hardcode_minus_L
7358
7359 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7360 # the resulting binary.
7361 hardcode_shlibpath_var=$hardcode_shlibpath_var
7362
7363 # Variables whose values should be saved in libtool wrapper scripts and
7364 # restored at relink time.
7365 variables_saved_for_relink="$variables_saved_for_relink"
7366
7367 # Whether libtool must link a program against all its dependency libraries.
7368 link_all_deplibs=$link_all_deplibs
7369
7370 # Compile-time system search path for libraries
7371 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7372
7373 # Run-time system search path for libraries
7374 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7375
7376 # Fix the shell variable \$srcfile for the compiler.
7377 fix_srcfile_path="$fix_srcfile_path"
7378
7379 # Set to yes if exported symbols are required.
7380 always_export_symbols=$always_export_symbols
7381
7382 # The commands to list exported symbols.
7383 export_symbols_cmds=$lt_export_symbols_cmds
7384
7385 # The commands to extract the exported symbol list from a shared archive.
7386 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7387
7388 # Symbols that should not be listed in the preloaded symbols.
7389 exclude_expsyms=$lt_exclude_expsyms
7390
7391 # Symbols that must always be exported.
7392 include_expsyms=$lt_include_expsyms
7393
7394 # ### END LIBTOOL CONFIG
7395
7396 __EOF__
7397
7398   case $host_os in
7399   aix3*)
7400     cat <<\EOF >> "${ofile}T"
7401
7402 # AIX sometimes has problems with the GCC collect2 program.  For some
7403 # reason, if we set the COLLECT_NAMES environment variable, the problems
7404 # vanish in a puff of smoke.
7405 if test "X${COLLECT_NAMES+set}" != Xset; then
7406   COLLECT_NAMES=
7407   export COLLECT_NAMES
7408 fi
7409 EOF
7410     ;;
7411   esac
7412
7413   case $host_os in
7414   cygwin* | mingw* | pw32* | os2*)
7415     cat <<'EOF' >> "${ofile}T"
7416       # This is a source program that is used to create dlls on Windows
7417       # Don't remove nor modify the starting and closing comments
7418 # /* ltdll.c starts here */
7419 # #define WIN32_LEAN_AND_MEAN
7420 # #include <windows.h>
7421 # #undef WIN32_LEAN_AND_MEAN
7422 # #include <stdio.h>
7423 #
7424 # #ifndef __CYGWIN__
7425 # #  ifdef __CYGWIN32__
7426 # #    define __CYGWIN__ __CYGWIN32__
7427 # #  endif
7428 # #endif
7429 #
7430 # #ifdef __cplusplus
7431 # extern "C" {
7432 # #endif
7433 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7434 # #ifdef __cplusplus
7435 # }
7436 # #endif
7437 #
7438 # #ifdef __CYGWIN__
7439 # #include <cygwin/cygwin_dll.h>
7440 # DECLARE_CYGWIN_DLL( DllMain );
7441 # #endif
7442 # HINSTANCE __hDllInstance_base;
7443 #
7444 # BOOL APIENTRY
7445 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7446 # {
7447 #   __hDllInstance_base = hInst;
7448 #   return TRUE;
7449 # }
7450 # /* ltdll.c ends here */
7451         # This is a source program that is used to create import libraries
7452         # on Windows for dlls which lack them. Don't remove nor modify the
7453         # starting and closing comments
7454 # /* impgen.c starts here */
7455 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7456 #
7457 #  This file is part of GNU libtool.
7458 #
7459 #  This program is free software; you can redistribute it and/or modify
7460 #  it under the terms of the GNU General Public License as published by
7461 #  the Free Software Foundation; either version 2 of the License, or
7462 #  (at your option) any later version.
7463 #
7464 #  This program is distributed in the hope that it will be useful,
7465 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7466 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7467 #  GNU General Public License for more details.
7468 #
7469 #  You should have received a copy of the GNU General Public License
7470 #  along with this program; if not, write to the Free Software
7471 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7472 #  */
7473 #
7474 # #include <stdio.h>            /* for printf() */
7475 # #include <unistd.h>           /* for open(), lseek(), read() */
7476 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7477 # #include <string.h>           /* for strdup() */
7478 #
7479 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7480 # #ifndef O_BINARY
7481 # #define O_BINARY 0
7482 # #endif
7483 #
7484 # static unsigned int
7485 # pe_get16 (fd, offset)
7486 #      int fd;
7487 #      int offset;
7488 # {
7489 #   unsigned char b[2];
7490 #   lseek (fd, offset, SEEK_SET);
7491 #   read (fd, b, 2);
7492 #   return b[0] + (b[1]<<8);
7493 # }
7494 #
7495 # static unsigned int
7496 # pe_get32 (fd, offset)
7497 #     int fd;
7498 #     int offset;
7499 # {
7500 #   unsigned char b[4];
7501 #   lseek (fd, offset, SEEK_SET);
7502 #   read (fd, b, 4);
7503 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7504 # }
7505 #
7506 # static unsigned int
7507 # pe_as32 (ptr)
7508 #      void *ptr;
7509 # {
7510 #   unsigned char *b = ptr;
7511 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7512 # }
7513 #
7514 # int
7515 # main (argc, argv)
7516 #     int argc;
7517 #     char *argv[];
7518 # {
7519 #     int dll;
7520 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7521 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7522 #     unsigned long name_rvas, nexp;
7523 #     unsigned char *expdata, *erva;
7524 #     char *filename, *dll_name;
7525 #
7526 #     filename = argv[1];
7527 #
7528 #     dll = open(filename, O_RDONLY|O_BINARY);
7529 #     if (dll < 1)
7530 #       return 1;
7531 #
7532 #     dll_name = filename;
7533 #
7534 #     for (i=0; filename[i]; i++)
7535 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7536 #           dll_name = filename + i +1;
7537 #
7538 #     pe_header_offset = pe_get32 (dll, 0x3c);
7539 #     opthdr_ofs = pe_header_offset + 4 + 20;
7540 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7541 #
7542 #     if (num_entries < 1) /* no exports */
7543 #       return 1;
7544 #
7545 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7546 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7547 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7548 #     secptr = (pe_header_offset + 4 + 20 +
7549 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7550 #
7551 #     expptr = 0;
7552 #     for (i = 0; i < nsections; i++)
7553 #     {
7554 #       char sname[8];
7555 #       unsigned long secptr1 = secptr + 40 * i;
7556 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7557 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7558 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7559 #       lseek(dll, secptr1, SEEK_SET);
7560 #       read(dll, sname, 8);
7561 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7562 #       {
7563 #           expptr = fptr + (export_rva - vaddr);
7564 #           if (export_rva + export_size > vaddr + vsize)
7565 #               export_size = vsize - (export_rva - vaddr);
7566 #           break;
7567 #       }
7568 #     }
7569 #
7570 #     expdata = (unsigned char*)malloc(export_size);
7571 #     lseek (dll, expptr, SEEK_SET);
7572 #     read (dll, expdata, export_size);
7573 #     erva = expdata - export_rva;
7574 #
7575 #     nexp = pe_as32 (expdata+24);
7576 #     name_rvas = pe_as32 (expdata+32);
7577 #
7578 #     printf ("EXPORTS\n");
7579 #     for (i = 0; i<nexp; i++)
7580 #     {
7581 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7582 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7583 #     }
7584 #
7585 #     return 0;
7586 # }
7587 # /* impgen.c ends here */
7588
7589 EOF
7590     ;;
7591   esac
7592
7593   # We use sed instead of cat because bash on DJGPP gets confused if
7594   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7595   # text mode, it properly converts lines to CR/LF.  This bash problem
7596   # is reportedly fixed, but why not run on old versions too?
7597   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7598
7599   mv -f "${ofile}T" "$ofile" || \
7600     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7601   chmod +x "$ofile"
7602 fi
7603
7604
7605
7606
7607
7608 # This can be used to rebuild libtool when needed
7609 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7610
7611 # Always use our own libtool.
7612 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7613
7614 # Prevent multiple expansion
7615
7616
7617
7618 for ac_prog in mawk gawk nawk awk
7619 do
7620 # Extract the first word of "$ac_prog", so it can be a program name with args.
7621 set dummy $ac_prog; ac_word=$2
7622 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7623 echo "configure:7624: checking for $ac_word" >&5
7624 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7625   echo $ac_n "(cached) $ac_c" 1>&6
7626 else
7627   if test -n "$AWK"; then
7628   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7629 else
7630   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7631   ac_dummy="$PATH"
7632   for ac_dir in $ac_dummy; do
7633     test -z "$ac_dir" && ac_dir=.
7634     if test -f $ac_dir/$ac_word; then
7635       ac_cv_prog_AWK="$ac_prog"
7636       break
7637     fi
7638   done
7639   IFS="$ac_save_ifs"
7640 fi
7641 fi
7642 AWK="$ac_cv_prog_AWK"
7643 if test -n "$AWK"; then
7644   echo "$ac_t""$AWK" 1>&6
7645 else
7646   echo "$ac_t""no" 1>&6
7647 fi
7648
7649 test -n "$AWK" && break
7650 done
7651
7652 # test for ln hardlink support
7653 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7654 echo "configure:7655: checking whether ln works" >&5
7655 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7656   echo $ac_n "(cached) $ac_c" 1>&6
7657 else
7658   rm -f conftest.src conftest.dst
7659 echo "conftest" > conftest.src
7660 if ln conftest.src conftest.dst 2>/dev/null
7661 then
7662   ol_cv_prog_LN_H="ln"
7663 else
7664   ol_cv_prog_LN_H="cp"
7665 fi
7666 rm -f conftest.src conftest.dst
7667
7668 fi
7669 LN_H="$ol_cv_prog_LN_H"
7670 if test "$ol_cv_prog_LN_H" = "ln"; then
7671         echo "$ac_t""yes" 1>&6
7672 else
7673         echo "$ac_t""no" 1>&6
7674 fi
7675
7676 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7677 echo "configure:7678: checking whether ln -s works" >&5
7678 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7679   echo $ac_n "(cached) $ac_c" 1>&6
7680 else
7681   rm -f conftestdata
7682 if ln -s X conftestdata 2>/dev/null
7683 then
7684   rm -f conftestdata
7685   ac_cv_prog_LN_S="ln -s"
7686 else
7687   ac_cv_prog_LN_S=ln
7688 fi
7689 fi
7690 LN_S="$ac_cv_prog_LN_S"
7691 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7692   echo "$ac_t""yes" 1>&6
7693 else
7694   echo "$ac_t""no" 1>&6
7695 fi
7696
7697
7698 # Extract the first word of "sendmail", so it can be a program name with args.
7699 set dummy sendmail; ac_word=$2
7700 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7701 echo "configure:7702: checking for $ac_word" >&5
7702 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7703   echo $ac_n "(cached) $ac_c" 1>&6
7704 else
7705   case "$SENDMAIL" in
7706   /*)
7707   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7708   ;;
7709   ?:/*)
7710   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7711   ;;
7712   *)
7713   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7714   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7715   for ac_dir in $ac_dummy; do 
7716     test -z "$ac_dir" && ac_dir=.
7717     if test -f $ac_dir/$ac_word; then
7718       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7719       break
7720     fi
7721   done
7722   IFS="$ac_save_ifs"
7723   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7724   ;;
7725 esac
7726 fi
7727 SENDMAIL="$ac_cv_path_SENDMAIL"
7728 if test -n "$SENDMAIL"; then
7729   echo "$ac_t""$SENDMAIL" 1>&6
7730 else
7731   echo "$ac_t""no" 1>&6
7732 fi
7733
7734 # Extract the first word of "vi", so it can be a program name with args.
7735 set dummy vi; ac_word=$2
7736 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7737 echo "configure:7738: checking for $ac_word" >&5
7738 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7739   echo $ac_n "(cached) $ac_c" 1>&6
7740 else
7741   case "$EDITOR" in
7742   /*)
7743   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7744   ;;
7745   ?:/*)
7746   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7747   ;;
7748   *)
7749   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7750   ac_dummy="$PATH:/usr/ucb"
7751   for ac_dir in $ac_dummy; do 
7752     test -z "$ac_dir" && ac_dir=.
7753     if test -f $ac_dir/$ac_word; then
7754       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7755       break
7756     fi
7757   done
7758   IFS="$ac_save_ifs"
7759   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7760   ;;
7761 esac
7762 fi
7763 EDITOR="$ac_cv_path_EDITOR"
7764 if test -n "$EDITOR"; then
7765   echo "$ac_t""$EDITOR" 1>&6
7766 else
7767   echo "$ac_t""no" 1>&6
7768 fi
7769
7770
7771 ol_link_perl=no
7772 if test $ol_enable_perl != no ; then
7773         # Extract the first word of "perl", so it can be a program name with args.
7774 set dummy perl; ac_word=$2
7775 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7776 echo "configure:7777: checking for $ac_word" >&5
7777 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7778   echo $ac_n "(cached) $ac_c" 1>&6
7779 else
7780   case "$PERLBIN" in
7781   /*)
7782   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7783   ;;
7784   ?:/*)
7785   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7786   ;;
7787   *)
7788   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7789   ac_dummy="$PATH"
7790   for ac_dir in $ac_dummy; do 
7791     test -z "$ac_dir" && ac_dir=.
7792     if test -f $ac_dir/$ac_word; then
7793       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7794       break
7795     fi
7796   done
7797   IFS="$ac_save_ifs"
7798   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7799   ;;
7800 esac
7801 fi
7802 PERLBIN="$ac_cv_path_PERLBIN"
7803 if test -n "$PERLBIN"; then
7804   echo "$ac_t""$PERLBIN" 1>&6
7805 else
7806   echo "$ac_t""no" 1>&6
7807 fi
7808
7809
7810         if test "no$PERLBIN" = "no" ; then
7811                 if test $ol_enable_perl = yes ; then
7812                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7813                 fi
7814
7815         else
7816                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7817                 if test x"$ol_with_perl_module" = "xstatic" ; then
7818                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7819                 else
7820                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7821                 fi
7822                                 ol_link_perl=yes
7823         fi
7824 fi
7825
7826 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7827 echo "configure:7828: checking how to run the C preprocessor" >&5
7828 # On Suns, sometimes $CPP names a directory.
7829 if test -n "$CPP" && test -d "$CPP"; then
7830   CPP=
7831 fi
7832 if test -z "$CPP"; then
7833 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7834   echo $ac_n "(cached) $ac_c" 1>&6
7835 else
7836     # This must be in double quotes, not single quotes, because CPP may get
7837   # substituted into the Makefile and "${CC-cc}" will confuse make.
7838   CPP="${CC-cc} -E"
7839   # On the NeXT, cc -E runs the code through the compiler's parser,
7840   # not just through cpp.
7841   cat > conftest.$ac_ext <<EOF
7842 #line 7843 "configure"
7843 #include "confdefs.h"
7844 #include <assert.h>
7845 Syntax Error
7846 EOF
7847 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7848 { (eval echo configure:7849: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7849 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7850 if test -z "$ac_err"; then
7851   :
7852 else
7853   echo "$ac_err" >&5
7854   echo "configure: failed program was:" >&5
7855   cat conftest.$ac_ext >&5
7856   rm -rf conftest*
7857   CPP="${CC-cc} -E -traditional-cpp"
7858   cat > conftest.$ac_ext <<EOF
7859 #line 7860 "configure"
7860 #include "confdefs.h"
7861 #include <assert.h>
7862 Syntax Error
7863 EOF
7864 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7865 { (eval echo configure:7866: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7866 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7867 if test -z "$ac_err"; then
7868   :
7869 else
7870   echo "$ac_err" >&5
7871   echo "configure: failed program was:" >&5
7872   cat conftest.$ac_ext >&5
7873   rm -rf conftest*
7874   CPP="${CC-cc} -nologo -E"
7875   cat > conftest.$ac_ext <<EOF
7876 #line 7877 "configure"
7877 #include "confdefs.h"
7878 #include <assert.h>
7879 Syntax Error
7880 EOF
7881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7882 { (eval echo configure:7883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7884 if test -z "$ac_err"; then
7885   :
7886 else
7887   echo "$ac_err" >&5
7888   echo "configure: failed program was:" >&5
7889   cat conftest.$ac_ext >&5
7890   rm -rf conftest*
7891   CPP=/lib/cpp
7892 fi
7893 rm -f conftest*
7894 fi
7895 rm -f conftest*
7896 fi
7897 rm -f conftest*
7898   ac_cv_prog_CPP="$CPP"
7899 fi
7900   CPP="$ac_cv_prog_CPP"
7901 else
7902   ac_cv_prog_CPP="$CPP"
7903 fi
7904 echo "$ac_t""$CPP" 1>&6
7905
7906
7907 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7908         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7909
7910 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7911         echo "configure: warning: programs compiled here do run here..." 1>&2
7912         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7913
7914 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7915         echo "configure: warning: programs compiled here do not run here..." 1>&2
7916         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7917 fi
7918
7919
7920 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7921 echo "configure:7922: checking for Cygwin environment" >&5
7922 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7923   echo $ac_n "(cached) $ac_c" 1>&6
7924 else
7925   cat > conftest.$ac_ext <<EOF
7926 #line 7927 "configure"
7927 #include "confdefs.h"
7928
7929 int main() {
7930
7931 #ifndef __CYGWIN__
7932 #define __CYGWIN__ __CYGWIN32__
7933 #endif
7934 return __CYGWIN__;
7935 ; return 0; }
7936 EOF
7937 if { (eval echo configure:7938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7938   rm -rf conftest*
7939   ac_cv_cygwin=yes
7940 else
7941   echo "configure: failed program was:" >&5
7942   cat conftest.$ac_ext >&5
7943   rm -rf conftest*
7944   ac_cv_cygwin=no
7945 fi
7946 rm -f conftest*
7947 fi
7948
7949 echo "$ac_t""$ac_cv_cygwin" 1>&6
7950 CYGWIN=
7951 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7952 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7953 echo "configure:7954: checking for mingw32 environment" >&5
7954 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7955   echo $ac_n "(cached) $ac_c" 1>&6
7956 else
7957   cat > conftest.$ac_ext <<EOF
7958 #line 7959 "configure"
7959 #include "confdefs.h"
7960
7961 int main() {
7962 return __MINGW32__;
7963 ; return 0; }
7964 EOF
7965 if { (eval echo configure:7966: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7966   rm -rf conftest*
7967   ac_cv_mingw32=yes
7968 else
7969   echo "configure: failed program was:" >&5
7970   cat conftest.$ac_ext >&5
7971   rm -rf conftest*
7972   ac_cv_mingw32=no
7973 fi
7974 rm -f conftest*
7975 fi
7976
7977 echo "$ac_t""$ac_cv_mingw32" 1>&6
7978 MINGW32=
7979 test "$ac_cv_mingw32" = yes && MINGW32=yes
7980
7981
7982
7983 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7984 echo "configure:7985: checking for executable suffix" >&5
7985 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7986   echo $ac_n "(cached) $ac_c" 1>&6
7987 else
7988   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7989   ac_cv_exeext=.exe
7990 else
7991   rm -f conftest*
7992   echo 'int main () { return 0; }' > conftest.$ac_ext
7993   ac_cv_exeext=
7994   if { (eval echo configure:7995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7995     for file in conftest.*; do
7996       case $file in
7997       *.c | *.C | *.o | *.obj | *.xcoff) ;;
7998       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
7999       esac
8000     done
8001   else
8002     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8003   fi
8004   rm -f conftest*
8005   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8006 fi
8007 fi
8008
8009 EXEEXT=""
8010 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8011 echo "$ac_t""${ac_cv_exeext}" 1>&6
8012 ac_exeext=$EXEEXT
8013
8014 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8015 echo "configure:8016: checking for object suffix" >&5
8016 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8017   echo $ac_n "(cached) $ac_c" 1>&6
8018 else
8019   rm -f conftest*
8020 echo 'int i = 1;' > conftest.$ac_ext
8021 if { (eval echo configure:8022: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8022   for ac_file in conftest.*; do
8023     case $ac_file in
8024     *.c) ;;
8025     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8026     esac
8027   done
8028 else
8029   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8030 fi
8031 rm -f conftest*
8032 fi
8033
8034 echo "$ac_t""$ac_cv_objext" 1>&6
8035 OBJEXT=$ac_cv_objext
8036 ac_objext=$ac_cv_objext
8037
8038
8039 cat >> confdefs.h <<EOF
8040 #define EXEEXT "${EXEEXT}"
8041 EOF
8042
8043
8044 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8045 echo "configure:8046: checking for be_app in -lbe" >&5
8046 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8047 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8048   echo $ac_n "(cached) $ac_c" 1>&6
8049 else
8050   ac_save_LIBS="$LIBS"
8051 LIBS="-lbe -lroot -lnet $LIBS"
8052 cat > conftest.$ac_ext <<EOF
8053 #line 8054 "configure"
8054 #include "confdefs.h"
8055 /* Override any gcc2 internal prototype to avoid an error.  */
8056 /* We use char because int might match the return type of a gcc2
8057     builtin and then its argument prototype would still apply.  */
8058 char be_app();
8059
8060 int main() {
8061 be_app()
8062 ; return 0; }
8063 EOF
8064 if { (eval echo configure:8065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8065   rm -rf conftest*
8066   eval "ac_cv_lib_$ac_lib_var=yes"
8067 else
8068   echo "configure: failed program was:" >&5
8069   cat conftest.$ac_ext >&5
8070   rm -rf conftest*
8071   eval "ac_cv_lib_$ac_lib_var=no"
8072 fi
8073 rm -f conftest*
8074 LIBS="$ac_save_LIBS"
8075
8076 fi
8077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8078   echo "$ac_t""yes" 1>&6
8079   LIBS="$LIBS -lbe -lroot -lnet"
8080 else
8081   echo "$ac_t""no" 1>&6
8082 :
8083 fi
8084
8085
8086
8087
8088
8089 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8090 echo "configure:8091: checking for ${CC-cc} option to accept ANSI C" >&5
8091 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8092   echo $ac_n "(cached) $ac_c" 1>&6
8093 else
8094   am_cv_prog_cc_stdc=no
8095 ac_save_CC="$CC"
8096 # Don't try gcc -ansi; that turns off useful extensions and
8097 # breaks some systems' header files.
8098 # AIX                   -qlanglvl=ansi
8099 # Ultrix and OSF/1      -std1
8100 # HP-UX 10.20 and later -Ae
8101 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8102 # SVR4                  -Xc -D__EXTENSIONS__
8103 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8104 do
8105   CC="$ac_save_CC $ac_arg"
8106   cat > conftest.$ac_ext <<EOF
8107 #line 8108 "configure"
8108 #include "confdefs.h"
8109 #include <stdarg.h>
8110 #include <stdio.h>
8111 #include <sys/types.h>
8112 #include <sys/stat.h>
8113 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8114 struct buf { int x; };
8115 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8116 static char *e (p, i)
8117      char **p;
8118      int i;
8119 {
8120   return p[i];
8121 }
8122 static char *f (char * (*g) (char **, int), char **p, ...)
8123 {
8124   char *s;
8125   va_list v;
8126   va_start (v,p);
8127   s = g (p, va_arg (v,int));
8128   va_end (v);
8129   return s;
8130 }
8131 int test (int i, double x);
8132 struct s1 {int (*f) (int a);};
8133 struct s2 {int (*f) (double a);};
8134 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8135 int argc;
8136 char **argv;
8137
8138 int main() {
8139
8140 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8141
8142 ; return 0; }
8143 EOF
8144 if { (eval echo configure:8145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8145   rm -rf conftest*
8146   am_cv_prog_cc_stdc="$ac_arg"; break
8147 else
8148   echo "configure: failed program was:" >&5
8149   cat conftest.$ac_ext >&5
8150 fi
8151 rm -f conftest*
8152 done
8153 CC="$ac_save_CC"
8154
8155 fi
8156
8157 if test -z "$am_cv_prog_cc_stdc"; then
8158   echo "$ac_t""none needed" 1>&6
8159 else
8160   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8161 fi
8162 case "x$am_cv_prog_cc_stdc" in
8163   x|xno) ;;
8164   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8165 esac
8166
8167 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8168         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8169 fi
8170
8171 # test for make depend flag
8172 OL_MKDEP=
8173 OL_MKDEP_FLAGS=
8174 if test -z "${MKDEP}"; then
8175         OL_MKDEP="${CC-cc}"
8176         if test -z "${MKDEP_FLAGS}"; then
8177                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8178 echo "configure:8179: checking for ${OL_MKDEP} depend flag" >&5
8179 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8180   echo $ac_n "(cached) $ac_c" 1>&6
8181 else
8182   
8183                         ol_cv_mkdep=no
8184                         for flag in "-M" "-xM"; do
8185                                 cat > conftest.c <<EOF
8186  noCode;
8187 EOF
8188                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8189: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8189                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8190                                 then
8191                                         if test ! -f conftest."${ac_object}" ; then
8192                                                 ol_cv_mkdep=$flag
8193                                                 OL_MKDEP_FLAGS="$flag"
8194                                                 break
8195                                         fi
8196                                 fi
8197                         done
8198                         rm -f conftest*
8199                 
8200 fi
8201
8202 echo "$ac_t""$ol_cv_mkdep" 1>&6
8203         else
8204                 cc_cv_mkdep=yes
8205                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8206         fi
8207 else
8208         cc_cv_mkdep=yes
8209         OL_MKDEP="${MKDEP}"
8210         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8211 fi
8212
8213
8214
8215 if test "${ol_cv_mkdep}" = no ; then
8216         # this will soon become an error
8217         echo "configure: warning: do not know how to generate dependencies" 1>&2
8218 fi
8219
8220 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8221 echo "configure:8222: checking for afopen in -ls" >&5
8222 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8223 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8224   echo $ac_n "(cached) $ac_c" 1>&6
8225 else
8226   ac_save_LIBS="$LIBS"
8227 LIBS="-ls  $LIBS"
8228 cat > conftest.$ac_ext <<EOF
8229 #line 8230 "configure"
8230 #include "confdefs.h"
8231 /* Override any gcc2 internal prototype to avoid an error.  */
8232 /* We use char because int might match the return type of a gcc2
8233     builtin and then its argument prototype would still apply.  */
8234 char afopen();
8235
8236 int main() {
8237 afopen()
8238 ; return 0; }
8239 EOF
8240 if { (eval echo configure:8241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8241   rm -rf conftest*
8242   eval "ac_cv_lib_$ac_lib_var=yes"
8243 else
8244   echo "configure: failed program was:" >&5
8245   cat conftest.$ac_ext >&5
8246   rm -rf conftest*
8247   eval "ac_cv_lib_$ac_lib_var=no"
8248 fi
8249 rm -f conftest*
8250 LIBS="$ac_save_LIBS"
8251
8252 fi
8253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8254   echo "$ac_t""yes" 1>&6
8255   
8256         AUTH_LIBS=-ls
8257         cat >> confdefs.h <<\EOF
8258 #define HAVE_AIX_SECURITY 1
8259 EOF
8260
8261
8262 else
8263   echo "$ac_t""no" 1>&6
8264 fi
8265
8266
8267
8268 ol_link_modules=no
8269 if test $ol_enable_modules != no ; then
8270         for ac_hdr in ltdl.h
8271 do
8272 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8273 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8274 echo "configure:8275: checking for $ac_hdr" >&5
8275 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8276   echo $ac_n "(cached) $ac_c" 1>&6
8277 else
8278   cat > conftest.$ac_ext <<EOF
8279 #line 8280 "configure"
8280 #include "confdefs.h"
8281 #include <$ac_hdr>
8282 EOF
8283 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8284 { (eval echo configure:8285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8285 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8286 if test -z "$ac_err"; then
8287   rm -rf conftest*
8288   eval "ac_cv_header_$ac_safe=yes"
8289 else
8290   echo "$ac_err" >&5
8291   echo "configure: failed program was:" >&5
8292   cat conftest.$ac_ext >&5
8293   rm -rf conftest*
8294   eval "ac_cv_header_$ac_safe=no"
8295 fi
8296 rm -f conftest*
8297 fi
8298 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8299   echo "$ac_t""yes" 1>&6
8300     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8301   cat >> confdefs.h <<EOF
8302 #define $ac_tr_hdr 1
8303 EOF
8304  
8305 else
8306   echo "$ac_t""no" 1>&6
8307 fi
8308 done
8309
8310
8311         if test $ac_cv_header_ltdl_h = no ; then
8312                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8313         fi
8314
8315         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8316 echo "configure:8317: checking for lt_dlinit in -lltdl" >&5
8317 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8318 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8319   echo $ac_n "(cached) $ac_c" 1>&6
8320 else
8321   ac_save_LIBS="$LIBS"
8322 LIBS="-lltdl  $LIBS"
8323 cat > conftest.$ac_ext <<EOF
8324 #line 8325 "configure"
8325 #include "confdefs.h"
8326 /* Override any gcc2 internal prototype to avoid an error.  */
8327 /* We use char because int might match the return type of a gcc2
8328     builtin and then its argument prototype would still apply.  */
8329 char lt_dlinit();
8330
8331 int main() {
8332 lt_dlinit()
8333 ; return 0; }
8334 EOF
8335 if { (eval echo configure:8336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8336   rm -rf conftest*
8337   eval "ac_cv_lib_$ac_lib_var=yes"
8338 else
8339   echo "configure: failed program was:" >&5
8340   cat conftest.$ac_ext >&5
8341   rm -rf conftest*
8342   eval "ac_cv_lib_$ac_lib_var=no"
8343 fi
8344 rm -f conftest*
8345 LIBS="$ac_save_LIBS"
8346
8347 fi
8348 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8349   echo "$ac_t""yes" 1>&6
8350   
8351                 MODULES_LIBS=-lltdl
8352                 cat >> confdefs.h <<\EOF
8353 #define HAVE_LIBLTDL 1
8354 EOF
8355
8356         
8357 else
8358   echo "$ac_t""no" 1>&6
8359 fi
8360
8361
8362         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8363                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8364         fi
8365         ol_link_modules=yes
8366 else
8367         ol_with_bdb_module=static
8368         ol_with_dnssrv_module=static
8369         ol_with_ldap_module=static
8370         ol_with_ldbm_module=static
8371         ol_with_meta_module=static
8372         ol_with_monitor_module=static
8373         ol_with_null_module=static
8374         ol_with_passwd_module=static
8375         ol_with_perl_module=static
8376         ol_with_shell_module=static
8377         ol_with_sql_module=static
8378 fi
8379
8380 # test for EBCDIC
8381 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8382 echo "configure:8383: checking for EBCDIC" >&5
8383 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8384   echo $ac_n "(cached) $ac_c" 1>&6
8385 else
8386   
8387         cat > conftest.$ac_ext <<EOF
8388 #line 8389 "configure"
8389 #include "confdefs.h"
8390
8391 #if !('M' == 0xd4)
8392 #include <__ASCII__/generate_error.h>
8393 #endif
8394
8395 EOF
8396 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8397 { (eval echo configure:8398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8398 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8399 if test -z "$ac_err"; then
8400   rm -rf conftest*
8401   ol_cv_cpp_ebcdic=yes
8402 else
8403   echo "$ac_err" >&5
8404   echo "configure: failed program was:" >&5
8405   cat conftest.$ac_ext >&5
8406   rm -rf conftest*
8407   ol_cv_cpp_ebcdic=no
8408 fi
8409 rm -f conftest*
8410 fi
8411
8412 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8413 if test $ol_cv_cpp_ebcdic = yes ; then
8414         cat >> confdefs.h <<\EOF
8415 #define HAVE_EBCDIC 1
8416 EOF
8417
8418 fi
8419
8420 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8421 echo "configure:8422: checking for ANSI C header files" >&5
8422 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8423   echo $ac_n "(cached) $ac_c" 1>&6
8424 else
8425   cat > conftest.$ac_ext <<EOF
8426 #line 8427 "configure"
8427 #include "confdefs.h"
8428 #include <stdlib.h>
8429 #include <stdarg.h>
8430 #include <string.h>
8431 #include <float.h>
8432 EOF
8433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8434 { (eval echo configure:8435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8436 if test -z "$ac_err"; then
8437   rm -rf conftest*
8438   ol_cv_header_stdc=yes
8439 else
8440   echo "$ac_err" >&5
8441   echo "configure: failed program was:" >&5
8442   cat conftest.$ac_ext >&5
8443   rm -rf conftest*
8444   ol_cv_header_stdc=no
8445 fi
8446 rm -f conftest*
8447
8448 if test $ol_cv_header_stdc = yes; then
8449   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8450 cat > conftest.$ac_ext <<EOF
8451 #line 8452 "configure"
8452 #include "confdefs.h"
8453 #include <string.h>
8454 EOF
8455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8456   egrep "memchr" >/dev/null 2>&1; then
8457   :
8458 else
8459   rm -rf conftest*
8460   ol_cv_header_stdc=no
8461 fi
8462 rm -f conftest*
8463
8464 fi
8465
8466 if test $ol_cv_header_stdc = yes; then
8467   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8468 cat > conftest.$ac_ext <<EOF
8469 #line 8470 "configure"
8470 #include "confdefs.h"
8471 #include <stdlib.h>
8472 EOF
8473 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8474   egrep "free" >/dev/null 2>&1; then
8475   :
8476 else
8477   rm -rf conftest*
8478   ol_cv_header_stdc=no
8479 fi
8480 rm -f conftest*
8481
8482 fi
8483
8484 if test $ol_cv_header_stdc = yes; then
8485   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8486 if test "$cross_compiling" = yes; then
8487   :
8488 else
8489   cat > conftest.$ac_ext <<EOF
8490 #line 8491 "configure"
8491 #include "confdefs.h"
8492 #include <ctype.h>
8493 #ifndef HAVE_EBCDIC
8494 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8495 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8496 #else
8497 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8498                 || ('j' <= (c) && (c) <= 'r') \
8499                 || ('s' <= (c) && (c) <= 'z'))
8500 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8501 #endif
8502 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8503 int main () { int i; for (i = 0; i < 256; i++)
8504 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8505 exit (0); }
8506
8507 EOF
8508 if { (eval echo configure:8509: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8509 then
8510   :
8511 else
8512   echo "configure: failed program was:" >&5
8513   cat conftest.$ac_ext >&5
8514   rm -fr conftest*
8515   ol_cv_header_stdc=no
8516 fi
8517 rm -fr conftest*
8518 fi
8519
8520 fi
8521 fi
8522
8523 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8524 if test $ol_cv_header_stdc = yes; then
8525   cat >> confdefs.h <<\EOF
8526 #define STDC_HEADERS 1
8527 EOF
8528
8529 fi
8530 ac_cv_header_stdc=disable
8531
8532
8533 if test $ol_cv_header_stdc != yes; then
8534         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8535 fi
8536
8537 ac_header_dirent=no
8538 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8539 do
8540 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8541 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8542 echo "configure:8543: checking for $ac_hdr that defines DIR" >&5
8543 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8544   echo $ac_n "(cached) $ac_c" 1>&6
8545 else
8546   cat > conftest.$ac_ext <<EOF
8547 #line 8548 "configure"
8548 #include "confdefs.h"
8549 #include <sys/types.h>
8550 #include <$ac_hdr>
8551 int main() {
8552 DIR *dirp = 0;
8553 ; return 0; }
8554 EOF
8555 if { (eval echo configure:8556: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8556   rm -rf conftest*
8557   eval "ac_cv_header_dirent_$ac_safe=yes"
8558 else
8559   echo "configure: failed program was:" >&5
8560   cat conftest.$ac_ext >&5
8561   rm -rf conftest*
8562   eval "ac_cv_header_dirent_$ac_safe=no"
8563 fi
8564 rm -f conftest*
8565 fi
8566 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8567   echo "$ac_t""yes" 1>&6
8568     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8569   cat >> confdefs.h <<EOF
8570 #define $ac_tr_hdr 1
8571 EOF
8572  ac_header_dirent=$ac_hdr; break
8573 else
8574   echo "$ac_t""no" 1>&6
8575 fi
8576 done
8577 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8578 if test $ac_header_dirent = dirent.h; then
8579 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8580 echo "configure:8581: checking for opendir in -ldir" >&5
8581 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8582 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8583   echo $ac_n "(cached) $ac_c" 1>&6
8584 else
8585   ac_save_LIBS="$LIBS"
8586 LIBS="-ldir  $LIBS"
8587 cat > conftest.$ac_ext <<EOF
8588 #line 8589 "configure"
8589 #include "confdefs.h"
8590 /* Override any gcc2 internal prototype to avoid an error.  */
8591 /* We use char because int might match the return type of a gcc2
8592     builtin and then its argument prototype would still apply.  */
8593 char opendir();
8594
8595 int main() {
8596 opendir()
8597 ; return 0; }
8598 EOF
8599 if { (eval echo configure:8600: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8600   rm -rf conftest*
8601   eval "ac_cv_lib_$ac_lib_var=yes"
8602 else
8603   echo "configure: failed program was:" >&5
8604   cat conftest.$ac_ext >&5
8605   rm -rf conftest*
8606   eval "ac_cv_lib_$ac_lib_var=no"
8607 fi
8608 rm -f conftest*
8609 LIBS="$ac_save_LIBS"
8610
8611 fi
8612 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8613   echo "$ac_t""yes" 1>&6
8614   LIBS="$LIBS -ldir"
8615 else
8616   echo "$ac_t""no" 1>&6
8617 fi
8618
8619 else
8620 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8621 echo "configure:8622: checking for opendir in -lx" >&5
8622 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8623 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8624   echo $ac_n "(cached) $ac_c" 1>&6
8625 else
8626   ac_save_LIBS="$LIBS"
8627 LIBS="-lx  $LIBS"
8628 cat > conftest.$ac_ext <<EOF
8629 #line 8630 "configure"
8630 #include "confdefs.h"
8631 /* Override any gcc2 internal prototype to avoid an error.  */
8632 /* We use char because int might match the return type of a gcc2
8633     builtin and then its argument prototype would still apply.  */
8634 char opendir();
8635
8636 int main() {
8637 opendir()
8638 ; return 0; }
8639 EOF
8640 if { (eval echo configure:8641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8641   rm -rf conftest*
8642   eval "ac_cv_lib_$ac_lib_var=yes"
8643 else
8644   echo "configure: failed program was:" >&5
8645   cat conftest.$ac_ext >&5
8646   rm -rf conftest*
8647   eval "ac_cv_lib_$ac_lib_var=no"
8648 fi
8649 rm -f conftest*
8650 LIBS="$ac_save_LIBS"
8651
8652 fi
8653 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8654   echo "$ac_t""yes" 1>&6
8655   LIBS="$LIBS -lx"
8656 else
8657   echo "$ac_t""no" 1>&6
8658 fi
8659
8660 fi
8661
8662 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8663 echo "configure:8664: checking for sys/wait.h that is POSIX.1 compatible" >&5
8664 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8665   echo $ac_n "(cached) $ac_c" 1>&6
8666 else
8667   cat > conftest.$ac_ext <<EOF
8668 #line 8669 "configure"
8669 #include "confdefs.h"
8670 #include <sys/types.h>
8671 #include <sys/wait.h>
8672 #ifndef WEXITSTATUS
8673 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8674 #endif
8675 #ifndef WIFEXITED
8676 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8677 #endif
8678 int main() {
8679 int s;
8680 wait (&s);
8681 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8682 ; return 0; }
8683 EOF
8684 if { (eval echo configure:8685: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8685   rm -rf conftest*
8686   ac_cv_header_sys_wait_h=yes
8687 else
8688   echo "configure: failed program was:" >&5
8689   cat conftest.$ac_ext >&5
8690   rm -rf conftest*
8691   ac_cv_header_sys_wait_h=no
8692 fi
8693 rm -f conftest*
8694 fi
8695
8696 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8697 if test $ac_cv_header_sys_wait_h = yes; then
8698   cat >> confdefs.h <<\EOF
8699 #define HAVE_SYS_WAIT_H 1
8700 EOF
8701
8702 fi
8703
8704 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8705 echo "configure:8706: checking POSIX termios" >&5
8706 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8707   echo $ac_n "(cached) $ac_c" 1>&6
8708 else
8709   cat > conftest.$ac_ext <<EOF
8710 #line 8711 "configure"
8711 #include "confdefs.h"
8712 #include <sys/types.h>
8713 #include <unistd.h>
8714 #include <termios.h>
8715 int main() {
8716 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8717    tcgetattr(0, 0);
8718 ; return 0; }
8719 EOF
8720 if { (eval echo configure:8721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8721   rm -rf conftest*
8722   am_cv_sys_posix_termios=yes
8723 else
8724   echo "configure: failed program was:" >&5
8725   cat conftest.$ac_ext >&5
8726   rm -rf conftest*
8727   am_cv_sys_posix_termios=no
8728 fi
8729 rm -f conftest*
8730 fi
8731
8732 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8733
8734
8735  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8736 echo "configure:8737: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8737 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8738   echo $ac_n "(cached) $ac_c" 1>&6
8739 else
8740   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8741
8742   gwinsz_in_termios_h=no
8743   if test $am_cv_sys_posix_termios = yes; then
8744     cat > conftest.$ac_ext <<EOF
8745 #line 8746 "configure"
8746 #include "confdefs.h"
8747 #include <sys/types.h>
8748 #     include <termios.h>
8749 #     ifdef TIOCGWINSZ
8750         yes
8751 #     endif
8752     
8753 EOF
8754 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8755   egrep "yes" >/dev/null 2>&1; then
8756   rm -rf conftest*
8757   gwinsz_in_termios_h=yes
8758 fi
8759 rm -f conftest*
8760
8761   fi
8762
8763   if test $gwinsz_in_termios_h = no; then
8764     cat > conftest.$ac_ext <<EOF
8765 #line 8766 "configure"
8766 #include "confdefs.h"
8767 #include <sys/types.h>
8768 #     include <sys/ioctl.h>
8769 #     ifdef TIOCGWINSZ
8770         yes
8771 #     endif
8772     
8773 EOF
8774 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8775   egrep "yes" >/dev/null 2>&1; then
8776   rm -rf conftest*
8777   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8778 fi
8779 rm -f conftest*
8780
8781   fi
8782   
8783 fi
8784
8785 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8786   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8787     cat >> confdefs.h <<\EOF
8788 #define GWINSZ_IN_SYS_IOCTL 1
8789 EOF
8790
8791   fi
8792
8793 if test $am_cv_sys_posix_termios = yes ; then
8794         cat >> confdefs.h <<\EOF
8795 #define HAVE_POSIX_TERMIOS 1
8796 EOF
8797
8798 fi
8799
8800 for ac_hdr in \
8801         arpa/inet.h             \
8802         arpa/nameser.h  \
8803         assert.h                \
8804         conio.h                 \
8805         crypt.h                 \
8806         direct.h                \
8807         errno.h                 \
8808         fcntl.h                 \
8809         filio.h                 \
8810         getopt.h                \
8811         grp.h                   \
8812         io.h                    \
8813         libutil.h               \
8814         limits.h                \
8815         locale.h                \
8816         netinet/tcp.h   \
8817         malloc.h                \
8818         memory.h                \
8819         psap.h                  \
8820         pwd.h                   \
8821         process.h               \
8822         resolv.h                \
8823         sgtty.h                 \
8824         shadow.h                \
8825         stddef.h                \
8826         string.h                \
8827         strings.h               \
8828         sysexits.h              \
8829         sys/file.h              \
8830         sys/filio.h             \
8831         sys/errno.h             \
8832         sys/ioctl.h             \
8833         sys/param.h             \
8834         sys/resource.h  \
8835         sys/select.h    \
8836         sys/socket.h    \
8837         sys/syslog.h    \
8838         sys/time.h              \
8839         sys/types.h             \
8840         syslog.h                \
8841         termios.h               \
8842         unistd.h                \
8843         winsock.h               \
8844         winsock2.h              \
8845
8846 do
8847 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8848 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8849 echo "configure:8850: checking for $ac_hdr" >&5
8850 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8851   echo $ac_n "(cached) $ac_c" 1>&6
8852 else
8853   cat > conftest.$ac_ext <<EOF
8854 #line 8855 "configure"
8855 #include "confdefs.h"
8856 #include <$ac_hdr>
8857 EOF
8858 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8859 { (eval echo configure:8860: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8860 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8861 if test -z "$ac_err"; then
8862   rm -rf conftest*
8863   eval "ac_cv_header_$ac_safe=yes"
8864 else
8865   echo "$ac_err" >&5
8866   echo "configure: failed program was:" >&5
8867   cat conftest.$ac_ext >&5
8868   rm -rf conftest*
8869   eval "ac_cv_header_$ac_safe=no"
8870 fi
8871 rm -f conftest*
8872 fi
8873 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8874   echo "$ac_t""yes" 1>&6
8875     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8876   cat >> confdefs.h <<EOF
8877 #define $ac_tr_hdr 1
8878 EOF
8879  
8880 else
8881   echo "$ac_t""no" 1>&6
8882 fi
8883 done
8884
8885
8886
8887
8888 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8889 echo "configure:8890: checking for dlopen" >&5
8890 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8891   echo $ac_n "(cached) $ac_c" 1>&6
8892 else
8893   cat > conftest.$ac_ext <<EOF
8894 #line 8895 "configure"
8895 #include "confdefs.h"
8896 /* System header to define __stub macros and hopefully few prototypes,
8897     which can conflict with char dlopen(); below.  */
8898 #include <assert.h>
8899 /* Override any gcc2 internal prototype to avoid an error.  */
8900 /* We use char because int might match the return type of a gcc2
8901     builtin and then its argument prototype would still apply.  */
8902 char dlopen();
8903 char (*f)();
8904
8905 int main() {
8906
8907 /* The GNU C library defines this for functions which it implements
8908     to always fail with ENOSYS.  Some functions are actually named
8909     something starting with __ and the normal name is an alias.  */
8910 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8911 choke me
8912 #else
8913 f = dlopen;
8914 #endif
8915
8916 ; return 0; }
8917 EOF
8918 if { (eval echo configure:8919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8919   rm -rf conftest*
8920   eval "ac_cv_func_dlopen=yes"
8921 else
8922   echo "configure: failed program was:" >&5
8923   cat conftest.$ac_ext >&5
8924   rm -rf conftest*
8925   eval "ac_cv_func_dlopen=no"
8926 fi
8927 rm -f conftest*
8928 fi
8929
8930 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8931   echo "$ac_t""yes" 1>&6
8932   :
8933 else
8934   echo "$ac_t""no" 1>&6
8935 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8936 echo "configure:8937: checking for dlopen in -ldl" >&5
8937 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8938 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8939   echo $ac_n "(cached) $ac_c" 1>&6
8940 else
8941   ac_save_LIBS="$LIBS"
8942 LIBS="-ldl  $LIBS"
8943 cat > conftest.$ac_ext <<EOF
8944 #line 8945 "configure"
8945 #include "confdefs.h"
8946 /* Override any gcc2 internal prototype to avoid an error.  */
8947 /* We use char because int might match the return type of a gcc2
8948     builtin and then its argument prototype would still apply.  */
8949 char dlopen();
8950
8951 int main() {
8952 dlopen()
8953 ; return 0; }
8954 EOF
8955 if { (eval echo configure:8956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8956   rm -rf conftest*
8957   eval "ac_cv_lib_$ac_lib_var=yes"
8958 else
8959   echo "configure: failed program was:" >&5
8960   cat conftest.$ac_ext >&5
8961   rm -rf conftest*
8962   eval "ac_cv_lib_$ac_lib_var=no"
8963 fi
8964 rm -f conftest*
8965 LIBS="$ac_save_LIBS"
8966
8967 fi
8968 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8969   echo "$ac_t""yes" 1>&6
8970     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8971     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8972   cat >> confdefs.h <<EOF
8973 #define $ac_tr_lib 1
8974 EOF
8975
8976   LIBS="-ldl $LIBS"
8977
8978 else
8979   echo "$ac_t""no" 1>&6
8980 fi
8981
8982 fi
8983
8984
8985 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8986 echo "configure:8987: checking for sigset in -lV3" >&5
8987 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8988 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8989   echo $ac_n "(cached) $ac_c" 1>&6
8990 else
8991   ac_save_LIBS="$LIBS"
8992 LIBS="-lV3  $LIBS"
8993 cat > conftest.$ac_ext <<EOF
8994 #line 8995 "configure"
8995 #include "confdefs.h"
8996 /* Override any gcc2 internal prototype to avoid an error.  */
8997 /* We use char because int might match the return type of a gcc2
8998     builtin and then its argument prototype would still apply.  */
8999 char sigset();
9000
9001 int main() {
9002 sigset()
9003 ; return 0; }
9004 EOF
9005 if { (eval echo configure:9006: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9006   rm -rf conftest*
9007   eval "ac_cv_lib_$ac_lib_var=yes"
9008 else
9009   echo "configure: failed program was:" >&5
9010   cat conftest.$ac_ext >&5
9011   rm -rf conftest*
9012   eval "ac_cv_lib_$ac_lib_var=no"
9013 fi
9014 rm -f conftest*
9015 LIBS="$ac_save_LIBS"
9016
9017 fi
9018 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9019   echo "$ac_t""yes" 1>&6
9020     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9021     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9022   cat >> confdefs.h <<EOF
9023 #define $ac_tr_lib 1
9024 EOF
9025
9026   LIBS="-lV3 $LIBS"
9027
9028 else
9029   echo "$ac_t""no" 1>&6
9030 fi
9031
9032
9033 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9034 echo "configure:9035: checking for winsock" >&5
9035 save_LIBS="$LIBS"
9036 for curlib in ws2_32 wsock32; do
9037         LIBS="$LIBS -l$curlib"
9038         cat > conftest.$ac_ext <<EOF
9039 #line 9040 "configure"
9040 #include "confdefs.h"
9041
9042                         char socket@12();
9043                         char select@20();
9044                         char closesocket@4();
9045                         char gethostname@8();
9046                         
9047 int main() {
9048
9049                         socket@12();
9050                         select@20();
9051                         closesocket@4();
9052                         gethostname@8();
9053                         
9054 ; return 0; }
9055 EOF
9056 if { (eval echo configure:9057: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9057   rm -rf conftest*
9058   have_winsock=yes
9059 else
9060   echo "configure: failed program was:" >&5
9061   cat conftest.$ac_ext >&5
9062   rm -rf conftest*
9063   have_winsock=no
9064 fi
9065 rm -f conftest*
9066
9067         if test $have_winsock = yes; then
9068                 cat >> confdefs.h <<\EOF
9069 #define HAVE_WINSOCK 1
9070 EOF
9071
9072                 ac_cv_func_socket=yes
9073                 ac_cv_func_select=yes
9074                 ac_cv_func_closesocket=yes
9075                 ac_cv_func_gethostname=yes
9076                 if test $curlib = ws2_32; then
9077                         have_winsock=winsock2
9078                         cat >> confdefs.h <<\EOF
9079 #define HAVE_WINSOCK2 1
9080 EOF
9081
9082                 fi
9083                 break
9084         fi
9085         LIBS="$save_LIBS"
9086 done
9087 echo "$ac_t""$have_winsock" 1>&6
9088
9089
9090 echo $ac_n "checking for socket""... $ac_c" 1>&6
9091 echo "configure:9092: checking for socket" >&5
9092 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9093   echo $ac_n "(cached) $ac_c" 1>&6
9094 else
9095   cat > conftest.$ac_ext <<EOF
9096 #line 9097 "configure"
9097 #include "confdefs.h"
9098 /* System header to define __stub macros and hopefully few prototypes,
9099     which can conflict with char socket(); below.  */
9100 #include <assert.h>
9101 /* Override any gcc2 internal prototype to avoid an error.  */
9102 /* We use char because int might match the return type of a gcc2
9103     builtin and then its argument prototype would still apply.  */
9104 char socket();
9105 char (*f)();
9106
9107 int main() {
9108
9109 /* The GNU C library defines this for functions which it implements
9110     to always fail with ENOSYS.  Some functions are actually named
9111     something starting with __ and the normal name is an alias.  */
9112 #if defined (__stub_socket) || defined (__stub___socket)
9113 choke me
9114 #else
9115 f = socket;
9116 #endif
9117
9118 ; return 0; }
9119 EOF
9120 if { (eval echo configure:9121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9121   rm -rf conftest*
9122   eval "ac_cv_func_socket=yes"
9123 else
9124   echo "configure: failed program was:" >&5
9125   cat conftest.$ac_ext >&5
9126   rm -rf conftest*
9127   eval "ac_cv_func_socket=no"
9128 fi
9129 rm -f conftest*
9130 fi
9131
9132 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9133   echo "$ac_t""yes" 1>&6
9134   :
9135 else
9136   echo "$ac_t""no" 1>&6
9137         
9138         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9139 echo "configure:9140: checking for main in -lsocket" >&5
9140 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9141 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9142   echo $ac_n "(cached) $ac_c" 1>&6
9143 else
9144   ac_save_LIBS="$LIBS"
9145 LIBS="-lsocket  $LIBS"
9146 cat > conftest.$ac_ext <<EOF
9147 #line 9148 "configure"
9148 #include "confdefs.h"
9149
9150 int main() {
9151 main()
9152 ; return 0; }
9153 EOF
9154 if { (eval echo configure:9155: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9155   rm -rf conftest*
9156   eval "ac_cv_lib_$ac_lib_var=yes"
9157 else
9158   echo "configure: failed program was:" >&5
9159   cat conftest.$ac_ext >&5
9160   rm -rf conftest*
9161   eval "ac_cv_lib_$ac_lib_var=no"
9162 fi
9163 rm -f conftest*
9164 LIBS="$ac_save_LIBS"
9165
9166 fi
9167 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9168   echo "$ac_t""yes" 1>&6
9169     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9170     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9171   cat >> confdefs.h <<EOF
9172 #define $ac_tr_lib 1
9173 EOF
9174
9175   LIBS="-lsocket $LIBS"
9176
9177 else
9178   echo "$ac_t""no" 1>&6
9179 fi
9180
9181         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9182 echo "configure:9183: checking for main in -lnet" >&5
9183 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9184 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9185   echo $ac_n "(cached) $ac_c" 1>&6
9186 else
9187   ac_save_LIBS="$LIBS"
9188 LIBS="-lnet  $LIBS"
9189 cat > conftest.$ac_ext <<EOF
9190 #line 9191 "configure"
9191 #include "confdefs.h"
9192
9193 int main() {
9194 main()
9195 ; return 0; }
9196 EOF
9197 if { (eval echo configure:9198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9198   rm -rf conftest*
9199   eval "ac_cv_lib_$ac_lib_var=yes"
9200 else
9201   echo "configure: failed program was:" >&5
9202   cat conftest.$ac_ext >&5
9203   rm -rf conftest*
9204   eval "ac_cv_lib_$ac_lib_var=no"
9205 fi
9206 rm -f conftest*
9207 LIBS="$ac_save_LIBS"
9208
9209 fi
9210 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9211   echo "$ac_t""yes" 1>&6
9212     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9213     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9214   cat >> confdefs.h <<EOF
9215 #define $ac_tr_lib 1
9216 EOF
9217
9218   LIBS="-lnet $LIBS"
9219
9220 else
9221   echo "$ac_t""no" 1>&6
9222 fi
9223
9224         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9225 echo "configure:9226: checking for main in -lnsl_s" >&5
9226 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9227 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9228   echo $ac_n "(cached) $ac_c" 1>&6
9229 else
9230   ac_save_LIBS="$LIBS"
9231 LIBS="-lnsl_s  $LIBS"
9232 cat > conftest.$ac_ext <<EOF
9233 #line 9234 "configure"
9234 #include "confdefs.h"
9235
9236 int main() {
9237 main()
9238 ; return 0; }
9239 EOF
9240 if { (eval echo configure:9241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9241   rm -rf conftest*
9242   eval "ac_cv_lib_$ac_lib_var=yes"
9243 else
9244   echo "configure: failed program was:" >&5
9245   cat conftest.$ac_ext >&5
9246   rm -rf conftest*
9247   eval "ac_cv_lib_$ac_lib_var=no"
9248 fi
9249 rm -f conftest*
9250 LIBS="$ac_save_LIBS"
9251
9252 fi
9253 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9254   echo "$ac_t""yes" 1>&6
9255     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9256     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9257   cat >> confdefs.h <<EOF
9258 #define $ac_tr_lib 1
9259 EOF
9260
9261   LIBS="-lnsl_s $LIBS"
9262
9263 else
9264   echo "$ac_t""no" 1>&6
9265 fi
9266
9267         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9268 echo "configure:9269: checking for main in -lnsl" >&5
9269 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9270 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9271   echo $ac_n "(cached) $ac_c" 1>&6
9272 else
9273   ac_save_LIBS="$LIBS"
9274 LIBS="-lnsl  $LIBS"
9275 cat > conftest.$ac_ext <<EOF
9276 #line 9277 "configure"
9277 #include "confdefs.h"
9278
9279 int main() {
9280 main()
9281 ; return 0; }
9282 EOF
9283 if { (eval echo configure:9284: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9284   rm -rf conftest*
9285   eval "ac_cv_lib_$ac_lib_var=yes"
9286 else
9287   echo "configure: failed program was:" >&5
9288   cat conftest.$ac_ext >&5
9289   rm -rf conftest*
9290   eval "ac_cv_lib_$ac_lib_var=no"
9291 fi
9292 rm -f conftest*
9293 LIBS="$ac_save_LIBS"
9294
9295 fi
9296 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9297   echo "$ac_t""yes" 1>&6
9298     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9299     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9300   cat >> confdefs.h <<EOF
9301 #define $ac_tr_lib 1
9302 EOF
9303
9304   LIBS="-lnsl $LIBS"
9305
9306 else
9307   echo "$ac_t""no" 1>&6
9308 fi
9309
9310         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9311 echo "configure:9312: checking for socket in -linet" >&5
9312 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9313 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9314   echo $ac_n "(cached) $ac_c" 1>&6
9315 else
9316   ac_save_LIBS="$LIBS"
9317 LIBS="-linet  $LIBS"
9318 cat > conftest.$ac_ext <<EOF
9319 #line 9320 "configure"
9320 #include "confdefs.h"
9321 /* Override any gcc2 internal prototype to avoid an error.  */
9322 /* We use char because int might match the return type of a gcc2
9323     builtin and then its argument prototype would still apply.  */
9324 char socket();
9325
9326 int main() {
9327 socket()
9328 ; return 0; }
9329 EOF
9330 if { (eval echo configure:9331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9331   rm -rf conftest*
9332   eval "ac_cv_lib_$ac_lib_var=yes"
9333 else
9334   echo "configure: failed program was:" >&5
9335   cat conftest.$ac_ext >&5
9336   rm -rf conftest*
9337   eval "ac_cv_lib_$ac_lib_var=no"
9338 fi
9339 rm -f conftest*
9340 LIBS="$ac_save_LIBS"
9341
9342 fi
9343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9344   echo "$ac_t""yes" 1>&6
9345     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9346     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9347   cat >> confdefs.h <<EOF
9348 #define $ac_tr_lib 1
9349 EOF
9350
9351   LIBS="-linet $LIBS"
9352
9353 else
9354   echo "$ac_t""no" 1>&6
9355 fi
9356
9357         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9358 echo "configure:9359: checking for main in -lgen" >&5
9359 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9360 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9361   echo $ac_n "(cached) $ac_c" 1>&6
9362 else
9363   ac_save_LIBS="$LIBS"
9364 LIBS="-lgen  $LIBS"
9365 cat > conftest.$ac_ext <<EOF
9366 #line 9367 "configure"
9367 #include "confdefs.h"
9368
9369 int main() {
9370 main()
9371 ; return 0; }
9372 EOF
9373 if { (eval echo configure:9374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9374   rm -rf conftest*
9375   eval "ac_cv_lib_$ac_lib_var=yes"
9376 else
9377   echo "configure: failed program was:" >&5
9378   cat conftest.$ac_ext >&5
9379   rm -rf conftest*
9380   eval "ac_cv_lib_$ac_lib_var=no"
9381 fi
9382 rm -f conftest*
9383 LIBS="$ac_save_LIBS"
9384
9385 fi
9386 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9387   echo "$ac_t""yes" 1>&6
9388     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9389     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9390   cat >> confdefs.h <<EOF
9391 #define $ac_tr_lib 1
9392 EOF
9393
9394   LIBS="-lgen $LIBS"
9395
9396 else
9397   echo "$ac_t""no" 1>&6
9398 fi
9399
9400
9401 fi
9402
9403
9404 echo $ac_n "checking for select""... $ac_c" 1>&6
9405 echo "configure:9406: checking for select" >&5
9406 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9407   echo $ac_n "(cached) $ac_c" 1>&6
9408 else
9409   cat > conftest.$ac_ext <<EOF
9410 #line 9411 "configure"
9411 #include "confdefs.h"
9412 /* System header to define __stub macros and hopefully few prototypes,
9413     which can conflict with char select(); below.  */
9414 #include <assert.h>
9415 /* Override any gcc2 internal prototype to avoid an error.  */
9416 /* We use char because int might match the return type of a gcc2
9417     builtin and then its argument prototype would still apply.  */
9418 char select();
9419 char (*f)();
9420
9421 int main() {
9422
9423 /* The GNU C library defines this for functions which it implements
9424     to always fail with ENOSYS.  Some functions are actually named
9425     something starting with __ and the normal name is an alias.  */
9426 #if defined (__stub_select) || defined (__stub___select)
9427 choke me
9428 #else
9429 f = select;
9430 #endif
9431
9432 ; return 0; }
9433 EOF
9434 if { (eval echo configure:9435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9435   rm -rf conftest*
9436   eval "ac_cv_func_select=yes"
9437 else
9438   echo "configure: failed program was:" >&5
9439   cat conftest.$ac_ext >&5
9440   rm -rf conftest*
9441   eval "ac_cv_func_select=no"
9442 fi
9443 rm -f conftest*
9444 fi
9445
9446 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9447   echo "$ac_t""yes" 1>&6
9448   :
9449 else
9450   echo "$ac_t""no" 1>&6
9451 { echo "configure: error: select() required." 1>&2; exit 1; }
9452 fi
9453
9454
9455 if test "${ac_cv_header_winsock_h}" != yes; then
9456                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9457 echo "configure:9458: checking types of arguments for select()" >&5
9458  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9459   echo $ac_n "(cached) $ac_c" 1>&6
9460 else
9461    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9462   echo $ac_n "(cached) $ac_c" 1>&6
9463 else
9464     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9465   echo $ac_n "(cached) $ac_c" 1>&6
9466 else
9467      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9468      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9469       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9470        cat > conftest.$ac_ext <<EOF
9471 #line 9472 "configure"
9472 #include "confdefs.h"
9473 #ifdef HAVE_SYS_TYPES_H
9474 #include <sys/types.h>
9475 #endif
9476 #ifdef HAVE_SYS_TIME_H
9477 #include <sys/time.h>
9478 #endif
9479 #ifdef HAVE_SYS_SELECT_H
9480 #include <sys/select.h>
9481 #endif
9482 #ifdef HAVE_SYS_SOCKET_H
9483 #include <sys/socket.h>
9484 #endif
9485 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);
9486 int main() {
9487
9488 ; return 0; }
9489 EOF
9490 if { (eval echo configure:9491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9491   rm -rf conftest*
9492           ac_not_found=no ; break 3
9493 else
9494   echo "configure: failed program was:" >&5
9495   cat conftest.$ac_ext >&5
9496   rm -rf conftest*
9497   ac_not_found=yes
9498 fi
9499 rm -f conftest*
9500       done
9501      done
9502     done
9503    
9504 fi
9505   
9506 fi
9507  
9508 fi
9509  if test "$ac_not_found" = yes; then
9510   ac_cv_func_select_arg1=int 
9511   ac_cv_func_select_arg234='int *' 
9512   ac_cv_func_select_arg5='struct timeval *'
9513  fi
9514  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9515  cat >> confdefs.h <<EOF
9516 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9517 EOF
9518
9519  cat >> confdefs.h <<EOF
9520 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9521 EOF
9522
9523  cat >> confdefs.h <<EOF
9524 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9525 EOF
9526
9527
9528 fi
9529
9530
9531 for ac_hdr in regex.h 
9532 do
9533 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9534 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9535 echo "configure:9536: checking for $ac_hdr" >&5
9536 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9537   echo $ac_n "(cached) $ac_c" 1>&6
9538 else
9539   cat > conftest.$ac_ext <<EOF
9540 #line 9541 "configure"
9541 #include "confdefs.h"
9542 #include <$ac_hdr>
9543 EOF
9544 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9545 { (eval echo configure:9546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9546 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9547 if test -z "$ac_err"; then
9548   rm -rf conftest*
9549   eval "ac_cv_header_$ac_safe=yes"
9550 else
9551   echo "$ac_err" >&5
9552   echo "configure: failed program was:" >&5
9553   cat conftest.$ac_ext >&5
9554   rm -rf conftest*
9555   eval "ac_cv_header_$ac_safe=no"
9556 fi
9557 rm -f conftest*
9558 fi
9559 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9560   echo "$ac_t""yes" 1>&6
9561     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9562   cat >> confdefs.h <<EOF
9563 #define $ac_tr_hdr 1
9564 EOF
9565  
9566 else
9567   echo "$ac_t""no" 1>&6
9568 fi
9569 done
9570
9571 if test "$ac_cv_header_regex_h" != yes ; then
9572         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9573 fi
9574
9575 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9576 echo "configure:9577: checking for library containing regfree" >&5
9577 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9578   echo $ac_n "(cached) $ac_c" 1>&6
9579 else
9580   ac_func_search_save_LIBS="$LIBS"
9581 ac_cv_search_regfree="no"
9582 cat > conftest.$ac_ext <<EOF
9583 #line 9584 "configure"
9584 #include "confdefs.h"
9585 /* Override any gcc2 internal prototype to avoid an error.  */
9586 /* We use char because int might match the return type of a gcc2
9587     builtin and then its argument prototype would still apply.  */
9588 char regfree();
9589
9590 int main() {
9591 regfree()
9592 ; return 0; }
9593 EOF
9594 if { (eval echo configure:9595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9595   rm -rf conftest*
9596   ac_cv_search_regfree="none required"
9597 else
9598   echo "configure: failed program was:" >&5
9599   cat conftest.$ac_ext >&5
9600 fi
9601 rm -f conftest*
9602 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9603 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9604 cat > conftest.$ac_ext <<EOF
9605 #line 9606 "configure"
9606 #include "confdefs.h"
9607 /* Override any gcc2 internal prototype to avoid an error.  */
9608 /* We use char because int might match the return type of a gcc2
9609     builtin and then its argument prototype would still apply.  */
9610 char regfree();
9611
9612 int main() {
9613 regfree()
9614 ; return 0; }
9615 EOF
9616 if { (eval echo configure:9617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9617   rm -rf conftest*
9618   ac_cv_search_regfree="-l$ac_lib"
9619 break
9620 else
9621   echo "configure: failed program was:" >&5
9622   cat conftest.$ac_ext >&5
9623 fi
9624 rm -f conftest*
9625 done
9626 LIBS="$ac_func_search_save_LIBS"
9627 fi
9628
9629 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9630 if test "$ac_cv_search_regfree" != "no"; then
9631   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9632   :
9633 else :
9634   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9635 fi
9636
9637
9638 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9639 echo "configure:9640: checking for compatible POSIX regex" >&5
9640 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9641   echo $ac_n "(cached) $ac_c" 1>&6
9642 else
9643   
9644         if test "$cross_compiling" = yes; then
9645   ol_cv_c_posix_regex=cross
9646 else
9647   cat > conftest.$ac_ext <<EOF
9648 #line 9649 "configure"
9649 #include "confdefs.h"
9650
9651 #include <sys/types.h>
9652 #include <regex.h>
9653 static char *pattern, *string;
9654 main()
9655 {
9656         int rc;
9657         regex_t re;
9658
9659         pattern = "^A";
9660
9661         if(regcomp(&re, pattern, 0)) {
9662                 return -1;
9663         }
9664         
9665         string = "ALL MATCH";
9666         
9667         rc = regexec(&re, string, 0, (void*)0, 0);
9668
9669         regfree(&re);
9670
9671         return rc;
9672 }
9673 EOF
9674 if { (eval echo configure:9675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9675 then
9676   ol_cv_c_posix_regex=yes
9677 else
9678   echo "configure: failed program was:" >&5
9679   cat conftest.$ac_ext >&5
9680   rm -fr conftest*
9681   ol_cv_c_posix_regex=no
9682 fi
9683 rm -fr conftest*
9684 fi
9685
9686 fi
9687
9688 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9689
9690 if test "$ol_cv_c_posix_regex" = no ; then
9691         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9692 fi
9693
9694
9695 have_uuid=no
9696 for ac_hdr in sys/uuid.h
9697 do
9698 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9699 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9700 echo "configure:9701: checking for $ac_hdr" >&5
9701 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9702   echo $ac_n "(cached) $ac_c" 1>&6
9703 else
9704   cat > conftest.$ac_ext <<EOF
9705 #line 9706 "configure"
9706 #include "confdefs.h"
9707 #include <$ac_hdr>
9708 EOF
9709 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9710 { (eval echo configure:9711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9711 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9712 if test -z "$ac_err"; then
9713   rm -rf conftest*
9714   eval "ac_cv_header_$ac_safe=yes"
9715 else
9716   echo "$ac_err" >&5
9717   echo "configure: failed program was:" >&5
9718   cat conftest.$ac_ext >&5
9719   rm -rf conftest*
9720   eval "ac_cv_header_$ac_safe=no"
9721 fi
9722 rm -f conftest*
9723 fi
9724 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9725   echo "$ac_t""yes" 1>&6
9726     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9727   cat >> confdefs.h <<EOF
9728 #define $ac_tr_hdr 1
9729 EOF
9730  
9731 else
9732   echo "$ac_t""no" 1>&6
9733 fi
9734 done
9735
9736 if test $ac_cv_header_sys_uuid_h = yes ; then
9737         save_LIBS="$LIBS"
9738         
9739 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9740 echo "configure:9741: checking for library containing uuid_to_str" >&5
9741 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9742   echo $ac_n "(cached) $ac_c" 1>&6
9743 else
9744   ac_func_search_save_LIBS="$LIBS"
9745 ac_cv_search_uuid_to_str="no"
9746 cat > conftest.$ac_ext <<EOF
9747 #line 9748 "configure"
9748 #include "confdefs.h"
9749 /* Override any gcc2 internal prototype to avoid an error.  */
9750 /* We use char because int might match the return type of a gcc2
9751     builtin and then its argument prototype would still apply.  */
9752 char uuid_to_str();
9753
9754 int main() {
9755 uuid_to_str()
9756 ; return 0; }
9757 EOF
9758 if { (eval echo configure:9759: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9759   rm -rf conftest*
9760   ac_cv_search_uuid_to_str="none required"
9761 else
9762   echo "configure: failed program was:" >&5
9763   cat conftest.$ac_ext >&5
9764 fi
9765 rm -f conftest*
9766 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9767 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9768 cat > conftest.$ac_ext <<EOF
9769 #line 9770 "configure"
9770 #include "confdefs.h"
9771 /* Override any gcc2 internal prototype to avoid an error.  */
9772 /* We use char because int might match the return type of a gcc2
9773     builtin and then its argument prototype would still apply.  */
9774 char uuid_to_str();
9775
9776 int main() {
9777 uuid_to_str()
9778 ; return 0; }
9779 EOF
9780 if { (eval echo configure:9781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9781   rm -rf conftest*
9782   ac_cv_search_uuid_to_str="-l$ac_lib"
9783 break
9784 else
9785   echo "configure: failed program was:" >&5
9786   cat conftest.$ac_ext >&5
9787 fi
9788 rm -f conftest*
9789 done
9790 LIBS="$ac_func_search_save_LIBS"
9791 fi
9792
9793 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9794 if test "$ac_cv_search_uuid_to_str" != "no"; then
9795   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9796   have_uuid=yes
9797 else :
9798   :
9799 fi
9800         LIBS="$save_LIBS"
9801
9802         if test have_uuid = yes ; then
9803                 cat >> confdefs.h <<\EOF
9804 #define HAVE_UUID_TO_STR 1
9805 EOF
9806
9807
9808                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9809                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9810         fi
9811 fi
9812
9813 if test $have_uuid = no ; then
9814         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9815 echo "configure:9816: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9816         save_LIBS="$LIBS"
9817         LIBS="$LIBS -lrpcrt4"
9818         cat > conftest.$ac_ext <<EOF
9819 #line 9820 "configure"
9820 #include "confdefs.h"
9821
9822                 char UuidCreate@4();
9823                 char UuidToStringA@8();
9824                 
9825 int main() {
9826
9827                 UuidCreate@4();
9828                 UuidToStringA@8();
9829                 
9830 ; return 0; }
9831 EOF
9832 if { (eval echo configure:9833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9833   rm -rf conftest*
9834   need_rpcrt=yes
9835 else
9836   echo "configure: failed program was:" >&5
9837   cat conftest.$ac_ext >&5
9838   rm -rf conftest*
9839   need_rpcrt=no
9840 fi
9841 rm -f conftest*
9842         if test $need_rpcrt = yes; then
9843                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9844         fi
9845         LIBS="$save_LIBS"
9846         echo "$ac_t""$need_rpcrt" 1>&6
9847 fi
9848
9849 ol_link_dnssrv=no
9850 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9851 echo "configure:9852: checking for res_query" >&5
9852 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9853   echo $ac_n "(cached) $ac_c" 1>&6
9854 else
9855   cat > conftest.$ac_ext <<EOF
9856 #line 9857 "configure"
9857 #include "confdefs.h"
9858 /* System header to define __stub macros and hopefully few prototypes,
9859     which can conflict with char res_query(); below.  */
9860 #include <assert.h>
9861 /* Override any gcc2 internal prototype to avoid an error.  */
9862 /* We use char because int might match the return type of a gcc2
9863     builtin and then its argument prototype would still apply.  */
9864 char res_query();
9865 char (*f)();
9866
9867 int main() {
9868
9869 /* The GNU C library defines this for functions which it implements
9870     to always fail with ENOSYS.  Some functions are actually named
9871     something starting with __ and the normal name is an alias.  */
9872 #if defined (__stub_res_query) || defined (__stub___res_query)
9873 choke me
9874 #else
9875 f = res_query;
9876 #endif
9877
9878 ; return 0; }
9879 EOF
9880 if { (eval echo configure:9881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9881   rm -rf conftest*
9882   eval "ac_cv_func_res_query=yes"
9883 else
9884   echo "configure: failed program was:" >&5
9885   cat conftest.$ac_ext >&5
9886   rm -rf conftest*
9887   eval "ac_cv_func_res_query=no"
9888 fi
9889 rm -f conftest*
9890 fi
9891
9892 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9893   echo "$ac_t""yes" 1>&6
9894   :
9895 else
9896   echo "$ac_t""no" 1>&6
9897 fi
9898
9899 if test $ac_cv_func_res_query = no ; then 
9900         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9901 echo "configure:9902: checking for __res_query" >&5
9902 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9903   echo $ac_n "(cached) $ac_c" 1>&6
9904 else
9905   cat > conftest.$ac_ext <<EOF
9906 #line 9907 "configure"
9907 #include "confdefs.h"
9908 /* System header to define __stub macros and hopefully few prototypes,
9909     which can conflict with char __res_query(); below.  */
9910 #include <assert.h>
9911 /* Override any gcc2 internal prototype to avoid an error.  */
9912 /* We use char because int might match the return type of a gcc2
9913     builtin and then its argument prototype would still apply.  */
9914 char __res_query();
9915 char (*f)();
9916
9917 int main() {
9918
9919 /* The GNU C library defines this for functions which it implements
9920     to always fail with ENOSYS.  Some functions are actually named
9921     something starting with __ and the normal name is an alias.  */
9922 #if defined (__stub___res_query) || defined (__stub_____res_query)
9923 choke me
9924 #else
9925 f = __res_query;
9926 #endif
9927
9928 ; return 0; }
9929 EOF
9930 if { (eval echo configure:9931: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9931   rm -rf conftest*
9932   eval "ac_cv_func___res_query=yes"
9933 else
9934   echo "configure: failed program was:" >&5
9935   cat conftest.$ac_ext >&5
9936   rm -rf conftest*
9937   eval "ac_cv_func___res_query=no"
9938 fi
9939 rm -f conftest*
9940 fi
9941
9942 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9943   echo "$ac_t""yes" 1>&6
9944   :
9945 else
9946   echo "$ac_t""no" 1>&6
9947 fi
9948
9949         ac_cv_func_res_query=$ac_cv_func___res_query
9950 fi
9951
9952 if test $ac_cv_func_res_query = no ; then 
9953         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9954 echo "configure:9955: checking for res_query in -lbind" >&5
9955 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9956 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9957   echo $ac_n "(cached) $ac_c" 1>&6
9958 else
9959   ac_save_LIBS="$LIBS"
9960 LIBS="-lbind  $LIBS"
9961 cat > conftest.$ac_ext <<EOF
9962 #line 9963 "configure"
9963 #include "confdefs.h"
9964 /* Override any gcc2 internal prototype to avoid an error.  */
9965 /* We use char because int might match the return type of a gcc2
9966     builtin and then its argument prototype would still apply.  */
9967 char res_query();
9968
9969 int main() {
9970 res_query()
9971 ; return 0; }
9972 EOF
9973 if { (eval echo configure:9974: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9974   rm -rf conftest*
9975   eval "ac_cv_lib_$ac_lib_var=yes"
9976 else
9977   echo "configure: failed program was:" >&5
9978   cat conftest.$ac_ext >&5
9979   rm -rf conftest*
9980   eval "ac_cv_lib_$ac_lib_var=no"
9981 fi
9982 rm -f conftest*
9983 LIBS="$ac_save_LIBS"
9984
9985 fi
9986 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9987   echo "$ac_t""yes" 1>&6
9988     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9989     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9990   cat >> confdefs.h <<EOF
9991 #define $ac_tr_lib 1
9992 EOF
9993
9994   LIBS="-lbind $LIBS"
9995
9996 else
9997   echo "$ac_t""no" 1>&6
9998 fi
9999
10000         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10001 fi
10002
10003 if test $ac_cv_func_res_query = no ; then 
10004         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10005 echo "configure:10006: checking for __res_query in -lbind" >&5
10006 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10007 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10008   echo $ac_n "(cached) $ac_c" 1>&6
10009 else
10010   ac_save_LIBS="$LIBS"
10011 LIBS="-lbind  $LIBS"
10012 cat > conftest.$ac_ext <<EOF
10013 #line 10014 "configure"
10014 #include "confdefs.h"
10015 /* Override any gcc2 internal prototype to avoid an error.  */
10016 /* We use char because int might match the return type of a gcc2
10017     builtin and then its argument prototype would still apply.  */
10018 char __res_query();
10019
10020 int main() {
10021 __res_query()
10022 ; return 0; }
10023 EOF
10024 if { (eval echo configure:10025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10025   rm -rf conftest*
10026   eval "ac_cv_lib_$ac_lib_var=yes"
10027 else
10028   echo "configure: failed program was:" >&5
10029   cat conftest.$ac_ext >&5
10030   rm -rf conftest*
10031   eval "ac_cv_lib_$ac_lib_var=no"
10032 fi
10033 rm -f conftest*
10034 LIBS="$ac_save_LIBS"
10035
10036 fi
10037 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10038   echo "$ac_t""yes" 1>&6
10039     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10040     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10041   cat >> confdefs.h <<EOF
10042 #define $ac_tr_lib 1
10043 EOF
10044
10045   LIBS="-lbind $LIBS"
10046
10047 else
10048   echo "$ac_t""no" 1>&6
10049 fi
10050
10051         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10052 fi
10053
10054 if test $ac_cv_func_res_query = no ; then 
10055         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10056 echo "configure:10057: checking for res_query in -lresolv" >&5
10057 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10058 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10059   echo $ac_n "(cached) $ac_c" 1>&6
10060 else
10061   ac_save_LIBS="$LIBS"
10062 LIBS="-lresolv  $LIBS"
10063 cat > conftest.$ac_ext <<EOF
10064 #line 10065 "configure"
10065 #include "confdefs.h"
10066 /* Override any gcc2 internal prototype to avoid an error.  */
10067 /* We use char because int might match the return type of a gcc2
10068     builtin and then its argument prototype would still apply.  */
10069 char res_query();
10070
10071 int main() {
10072 res_query()
10073 ; return 0; }
10074 EOF
10075 if { (eval echo configure:10076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10076   rm -rf conftest*
10077   eval "ac_cv_lib_$ac_lib_var=yes"
10078 else
10079   echo "configure: failed program was:" >&5
10080   cat conftest.$ac_ext >&5
10081   rm -rf conftest*
10082   eval "ac_cv_lib_$ac_lib_var=no"
10083 fi
10084 rm -f conftest*
10085 LIBS="$ac_save_LIBS"
10086
10087 fi
10088 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10089   echo "$ac_t""yes" 1>&6
10090     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10091     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10092   cat >> confdefs.h <<EOF
10093 #define $ac_tr_lib 1
10094 EOF
10095
10096   LIBS="-lresolv $LIBS"
10097
10098 else
10099   echo "$ac_t""no" 1>&6
10100 fi
10101
10102         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10103 fi
10104
10105 if test $ac_cv_func_res_query = no ; then 
10106         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10107 echo "configure:10108: checking for __res_query in -lresolv" >&5
10108 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10109 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10110   echo $ac_n "(cached) $ac_c" 1>&6
10111 else
10112   ac_save_LIBS="$LIBS"
10113 LIBS="-lresolv  $LIBS"
10114 cat > conftest.$ac_ext <<EOF
10115 #line 10116 "configure"
10116 #include "confdefs.h"
10117 /* Override any gcc2 internal prototype to avoid an error.  */
10118 /* We use char because int might match the return type of a gcc2
10119     builtin and then its argument prototype would still apply.  */
10120 char __res_query();
10121
10122 int main() {
10123 __res_query()
10124 ; return 0; }
10125 EOF
10126 if { (eval echo configure:10127: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10127   rm -rf conftest*
10128   eval "ac_cv_lib_$ac_lib_var=yes"
10129 else
10130   echo "configure: failed program was:" >&5
10131   cat conftest.$ac_ext >&5
10132   rm -rf conftest*
10133   eval "ac_cv_lib_$ac_lib_var=no"
10134 fi
10135 rm -f conftest*
10136 LIBS="$ac_save_LIBS"
10137
10138 fi
10139 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10140   echo "$ac_t""yes" 1>&6
10141     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10142     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10143   cat >> confdefs.h <<EOF
10144 #define $ac_tr_lib 1
10145 EOF
10146
10147   LIBS="-lresolv $LIBS"
10148
10149 else
10150   echo "$ac_t""no" 1>&6
10151 fi
10152
10153         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10154 fi
10155
10156 if test "$ac_cv_func_res_query" = yes ; then
10157         cat >> confdefs.h <<\EOF
10158 #define HAVE_RES_QUERY 1
10159 EOF
10160
10161
10162         if test $ol_enable_dnssrv != no ; then
10163                 ol_link_dnssrv=yes
10164         fi
10165 fi
10166
10167 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10168         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10169 fi
10170
10171 for ac_func in getaddrinfo gai_strerror inet_ntop 
10172 do
10173 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10174 echo "configure:10175: checking for $ac_func" >&5
10175 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10176   echo $ac_n "(cached) $ac_c" 1>&6
10177 else
10178   cat > conftest.$ac_ext <<EOF
10179 #line 10180 "configure"
10180 #include "confdefs.h"
10181 /* System header to define __stub macros and hopefully few prototypes,
10182     which can conflict with char $ac_func(); below.  */
10183 #include <assert.h>
10184 /* Override any gcc2 internal prototype to avoid an error.  */
10185 /* We use char because int might match the return type of a gcc2
10186     builtin and then its argument prototype would still apply.  */
10187 char $ac_func();
10188 char (*f)();
10189
10190 int main() {
10191
10192 /* The GNU C library defines this for functions which it implements
10193     to always fail with ENOSYS.  Some functions are actually named
10194     something starting with __ and the normal name is an alias.  */
10195 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10196 choke me
10197 #else
10198 f = $ac_func;
10199 #endif
10200
10201 ; return 0; }
10202 EOF
10203 if { (eval echo configure:10204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10204   rm -rf conftest*
10205   eval "ac_cv_func_$ac_func=yes"
10206 else
10207   echo "configure: failed program was:" >&5
10208   cat conftest.$ac_ext >&5
10209   rm -rf conftest*
10210   eval "ac_cv_func_$ac_func=no"
10211 fi
10212 rm -f conftest*
10213 fi
10214
10215 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10216   echo "$ac_t""yes" 1>&6
10217     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10218   cat >> confdefs.h <<EOF
10219 #define $ac_tr_func 1
10220 EOF
10221  
10222 else
10223   echo "$ac_t""no" 1>&6
10224 fi
10225 done
10226
10227
10228 ol_link_ipv6=no
10229 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10230         if test $ol_enable_ipv6 = yes ; then
10231                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10232         fi
10233 elif test $ol_enable_ipv6 != no ; then
10234         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10235 echo "configure:10236: checking INET6_ADDRSTRLEN" >&5
10236 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10237   echo $ac_n "(cached) $ac_c" 1>&6
10238 else
10239   
10240                 cat > conftest.$ac_ext <<EOF
10241 #line 10242 "configure"
10242 #include "confdefs.h"
10243
10244 #                       include <netinet/in.h>
10245 #                       ifdef INET6_ADDRSTRLEN
10246                                 __has_inet6_addrstrlen__;
10247 #                       endif
10248                 
10249 EOF
10250 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10251   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10252   rm -rf conftest*
10253   ol_cv_inet6_addrstrlen=yes
10254 else
10255   rm -rf conftest*
10256   ol_cv_inet6_addrstrlen=no
10257 fi
10258 rm -f conftest*
10259
10260 fi
10261
10262 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10263
10264         if test $ol_cv_inet6_addrstrlen = yes ; then
10265                 ol_link_ipv6=yes
10266         elif test $ol_enable_ipv6 = yes ; then
10267                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10268         fi
10269 fi
10270
10271 if test $ol_enable_local != no ; then
10272         for ac_hdr in sys/un.h 
10273 do
10274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10276 echo "configure:10277: checking for $ac_hdr" >&5
10277 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10278   echo $ac_n "(cached) $ac_c" 1>&6
10279 else
10280   cat > conftest.$ac_ext <<EOF
10281 #line 10282 "configure"
10282 #include "confdefs.h"
10283 #include <$ac_hdr>
10284 EOF
10285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10286 { (eval echo configure:10287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10288 if test -z "$ac_err"; then
10289   rm -rf conftest*
10290   eval "ac_cv_header_$ac_safe=yes"
10291 else
10292   echo "$ac_err" >&5
10293   echo "configure: failed program was:" >&5
10294   cat conftest.$ac_ext >&5
10295   rm -rf conftest*
10296   eval "ac_cv_header_$ac_safe=no"
10297 fi
10298 rm -f conftest*
10299 fi
10300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10301   echo "$ac_t""yes" 1>&6
10302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10303   cat >> confdefs.h <<EOF
10304 #define $ac_tr_hdr 1
10305 EOF
10306  
10307 else
10308   echo "$ac_t""no" 1>&6
10309 fi
10310 done
10311
10312
10313         if test $ol_enable_local = auto ; then
10314                 ol_enable_local=$ac_cv_header_sys_un_h
10315         elif test $ac_cv_header_sys_un_h = no ; then
10316                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10317         fi
10318 fi
10319
10320 ol_link_kbind=no
10321 ol_link_kpasswd=no
10322 ol_link_krb5=no
10323 ol_link_krb4=no
10324
10325 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10326         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10327         -o $ol_with_kerberos = k425 ; then
10328
10329         for ac_hdr in krb5.h
10330 do
10331 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10332 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10333 echo "configure:10334: checking for $ac_hdr" >&5
10334 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10335   echo $ac_n "(cached) $ac_c" 1>&6
10336 else
10337   cat > conftest.$ac_ext <<EOF
10338 #line 10339 "configure"
10339 #include "confdefs.h"
10340 #include <$ac_hdr>
10341 EOF
10342 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10343 { (eval echo configure:10344: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10344 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10345 if test -z "$ac_err"; then
10346   rm -rf conftest*
10347   eval "ac_cv_header_$ac_safe=yes"
10348 else
10349   echo "$ac_err" >&5
10350   echo "configure: failed program was:" >&5
10351   cat conftest.$ac_ext >&5
10352   rm -rf conftest*
10353   eval "ac_cv_header_$ac_safe=no"
10354 fi
10355 rm -f conftest*
10356 fi
10357 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10358   echo "$ac_t""yes" 1>&6
10359     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10360   cat >> confdefs.h <<EOF
10361 #define $ac_tr_hdr 1
10362 EOF
10363  
10364 else
10365   echo "$ac_t""no" 1>&6
10366 fi
10367 done
10368
10369
10370         if test $ac_cv_header_krb5_h = yes ; then
10371                                 for ac_hdr in heim_err.h
10372 do
10373 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10374 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10375 echo "configure:10376: checking for $ac_hdr" >&5
10376 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10377   echo $ac_n "(cached) $ac_c" 1>&6
10378 else
10379   cat > conftest.$ac_ext <<EOF
10380 #line 10381 "configure"
10381 #include "confdefs.h"
10382 #include <$ac_hdr>
10383 EOF
10384 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10385 { (eval echo configure:10386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10386 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10387 if test -z "$ac_err"; then
10388   rm -rf conftest*
10389   eval "ac_cv_header_$ac_safe=yes"
10390 else
10391   echo "$ac_err" >&5
10392   echo "configure: failed program was:" >&5
10393   cat conftest.$ac_ext >&5
10394   rm -rf conftest*
10395   eval "ac_cv_header_$ac_safe=no"
10396 fi
10397 rm -f conftest*
10398 fi
10399 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10400   echo "$ac_t""yes" 1>&6
10401     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10402   cat >> confdefs.h <<EOF
10403 #define $ac_tr_hdr 1
10404 EOF
10405  
10406 else
10407   echo "$ac_t""no" 1>&6
10408 fi
10409 done
10410
10411                 if test $ac_cv_header_heim_err_h = yes ; then
10412                         krb5_impl=heimdal
10413                 else
10414                         krb5_impl=mit
10415                 fi
10416
10417                 if test $krb5_impl = mit; then
10418                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10419 echo "configure:10420: checking for main in -lk5crypto" >&5
10420 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10421 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10422   echo $ac_n "(cached) $ac_c" 1>&6
10423 else
10424   ac_save_LIBS="$LIBS"
10425 LIBS="-lk5crypto  $LIBS"
10426 cat > conftest.$ac_ext <<EOF
10427 #line 10428 "configure"
10428 #include "confdefs.h"
10429
10430 int main() {
10431 main()
10432 ; return 0; }
10433 EOF
10434 if { (eval echo configure:10435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10435   rm -rf conftest*
10436   eval "ac_cv_lib_$ac_lib_var=yes"
10437 else
10438   echo "configure: failed program was:" >&5
10439   cat conftest.$ac_ext >&5
10440   rm -rf conftest*
10441   eval "ac_cv_lib_$ac_lib_var=no"
10442 fi
10443 rm -f conftest*
10444 LIBS="$ac_save_LIBS"
10445
10446 fi
10447 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10448   echo "$ac_t""yes" 1>&6
10449   krb5crypto=k5crypto
10450 else
10451   echo "$ac_t""no" 1>&6
10452 krb5crypto=crypto
10453 fi
10454
10455
10456                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10457 echo "configure:10458: checking for main in -lkrb5" >&5
10458 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10459 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10460   echo $ac_n "(cached) $ac_c" 1>&6
10461 else
10462   ac_save_LIBS="$LIBS"
10463 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10464 cat > conftest.$ac_ext <<EOF
10465 #line 10466 "configure"
10466 #include "confdefs.h"
10467
10468 int main() {
10469 main()
10470 ; return 0; }
10471 EOF
10472 if { (eval echo configure:10473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10473   rm -rf conftest*
10474   eval "ac_cv_lib_$ac_lib_var=yes"
10475 else
10476   echo "configure: failed program was:" >&5
10477   cat conftest.$ac_ext >&5
10478   rm -rf conftest*
10479   eval "ac_cv_lib_$ac_lib_var=no"
10480 fi
10481 rm -f conftest*
10482 LIBS="$ac_save_LIBS"
10483
10484 fi
10485 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10486   echo "$ac_t""yes" 1>&6
10487   have_krb5=yes
10488                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10489 else
10490   echo "$ac_t""no" 1>&6
10491 have_krb5=no
10492 fi
10493
10494
10495                 elif test $krb5_impl = heimdal; then
10496                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10497 echo "configure:10498: checking for main in -ldes" >&5
10498 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10499 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10500   echo $ac_n "(cached) $ac_c" 1>&6
10501 else
10502   ac_save_LIBS="$LIBS"
10503 LIBS="-ldes  $LIBS"
10504 cat > conftest.$ac_ext <<EOF
10505 #line 10506 "configure"
10506 #include "confdefs.h"
10507
10508 int main() {
10509 main()
10510 ; return 0; }
10511 EOF
10512 if { (eval echo configure:10513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10513   rm -rf conftest*
10514   eval "ac_cv_lib_$ac_lib_var=yes"
10515 else
10516   echo "configure: failed program was:" >&5
10517   cat conftest.$ac_ext >&5
10518   rm -rf conftest*
10519   eval "ac_cv_lib_$ac_lib_var=no"
10520 fi
10521 rm -f conftest*
10522 LIBS="$ac_save_LIBS"
10523
10524 fi
10525 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10526   echo "$ac_t""yes" 1>&6
10527   krb5crypto=des
10528 else
10529   echo "$ac_t""no" 1>&6
10530 krb5crypto=crypto
10531 fi
10532
10533
10534                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10535 echo "configure:10536: checking for main in -lkrb5" >&5
10536 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10537 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10538   echo $ac_n "(cached) $ac_c" 1>&6
10539 else
10540   ac_save_LIBS="$LIBS"
10541 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10542 cat > conftest.$ac_ext <<EOF
10543 #line 10544 "configure"
10544 #include "confdefs.h"
10545
10546 int main() {
10547 main()
10548 ; return 0; }
10549 EOF
10550 if { (eval echo configure:10551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10551   rm -rf conftest*
10552   eval "ac_cv_lib_$ac_lib_var=yes"
10553 else
10554   echo "configure: failed program was:" >&5
10555   cat conftest.$ac_ext >&5
10556   rm -rf conftest*
10557   eval "ac_cv_lib_$ac_lib_var=no"
10558 fi
10559 rm -f conftest*
10560 LIBS="$ac_save_LIBS"
10561
10562 fi
10563 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10564   echo "$ac_t""yes" 1>&6
10565   have_krb5=yes
10566                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10567 else
10568   echo "$ac_t""no" 1>&6
10569 have_krb5=no
10570 fi
10571
10572
10573                         cat >> confdefs.h <<\EOF
10574 #define HAVE_HEIMDAL_KERBEROS 1
10575 EOF
10576
10577
10578                 else
10579                         have_krb5=no
10580                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10581                 fi
10582
10583                 if test $have_krb5 = yes ; then
10584                         ol_link_krb5=yes
10585
10586                         cat >> confdefs.h <<\EOF
10587 #define HAVE_KRB5 1
10588 EOF
10589
10590
10591                         if test $ol_enable_kpasswd != no ; then
10592                                 ol_link_kpasswd=yes;
10593                         fi
10594
10595                         if test $ol_with_kerberos = k5only ; then
10596                                 ol_with_kerberos=found
10597                         fi
10598
10599                 elif test $ol_with_kerberos != auto ; then
10600                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10601                 fi
10602
10603         fi
10604 fi
10605
10606 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10607         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10608
10609         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10610 do
10611 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10612 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10613 echo "configure:10614: checking for $ac_hdr" >&5
10614 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10615   echo $ac_n "(cached) $ac_c" 1>&6
10616 else
10617   cat > conftest.$ac_ext <<EOF
10618 #line 10619 "configure"
10619 #include "confdefs.h"
10620 #include <$ac_hdr>
10621 EOF
10622 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10623 { (eval echo configure:10624: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10624 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10625 if test -z "$ac_err"; then
10626   rm -rf conftest*
10627   eval "ac_cv_header_$ac_safe=yes"
10628 else
10629   echo "$ac_err" >&5
10630   echo "configure: failed program was:" >&5
10631   cat conftest.$ac_ext >&5
10632   rm -rf conftest*
10633   eval "ac_cv_header_$ac_safe=no"
10634 fi
10635 rm -f conftest*
10636 fi
10637 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10638   echo "$ac_t""yes" 1>&6
10639     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10640   cat >> confdefs.h <<EOF
10641 #define $ac_tr_hdr 1
10642 EOF
10643  
10644 else
10645   echo "$ac_t""no" 1>&6
10646 fi
10647 done
10648
10649
10650         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10651                 if test $krb5_impl = mit; then
10652                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10653 echo "configure:10654: checking for main in -lkrb4" >&5
10654 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10655 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10656   echo $ac_n "(cached) $ac_c" 1>&6
10657 else
10658   ac_save_LIBS="$LIBS"
10659 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10660 cat > conftest.$ac_ext <<EOF
10661 #line 10662 "configure"
10662 #include "confdefs.h"
10663
10664 int main() {
10665 main()
10666 ; return 0; }
10667 EOF
10668 if { (eval echo configure:10669: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10669   rm -rf conftest*
10670   eval "ac_cv_lib_$ac_lib_var=yes"
10671 else
10672   echo "configure: failed program was:" >&5
10673   cat conftest.$ac_ext >&5
10674   rm -rf conftest*
10675   eval "ac_cv_lib_$ac_lib_var=no"
10676 fi
10677 rm -f conftest*
10678 LIBS="$ac_save_LIBS"
10679
10680 fi
10681 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10682   echo "$ac_t""yes" 1>&6
10683   have_k425=yes
10684                                 KRB4_LIBS="-lkrb4 -ldes425"
10685 else
10686   echo "$ac_t""no" 1>&6
10687 have_k425=no
10688 fi
10689
10690
10691                 elif test $krb5_impl = heimdal; then
10692                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10693 echo "configure:10694: checking for main in -lkrb4" >&5
10694 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10695 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10696   echo $ac_n "(cached) $ac_c" 1>&6
10697 else
10698   ac_save_LIBS="$LIBS"
10699 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10700 cat > conftest.$ac_ext <<EOF
10701 #line 10702 "configure"
10702 #include "confdefs.h"
10703
10704 int main() {
10705 main()
10706 ; return 0; }
10707 EOF
10708 if { (eval echo configure:10709: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10709   rm -rf conftest*
10710   eval "ac_cv_lib_$ac_lib_var=yes"
10711 else
10712   echo "configure: failed program was:" >&5
10713   cat conftest.$ac_ext >&5
10714   rm -rf conftest*
10715   eval "ac_cv_lib_$ac_lib_var=no"
10716 fi
10717 rm -f conftest*
10718 LIBS="$ac_save_LIBS"
10719
10720 fi
10721 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10722   echo "$ac_t""yes" 1>&6
10723   have_k425=yes
10724                                 KRB4_LIBS="-lkrb4"
10725 else
10726   echo "$ac_t""no" 1>&6
10727 have_k425=no
10728 fi
10729
10730
10731                 else
10732                         have_425=no
10733                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10734                 fi
10735
10736                 if test $have_k425 = yes ; then
10737                         ol_with_kerberos=found
10738                         ol_link_krb4=yes
10739
10740                         cat >> confdefs.h <<\EOF
10741 #define HAVE_KRB425 1
10742 EOF
10743
10744                         cat >> confdefs.h <<\EOF
10745 #define HAVE_KRB4 1
10746 EOF
10747
10748
10749                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10750 echo "configure:10751: checking for des_debug in Kerberos libraries" >&5
10751 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10752   echo $ac_n "(cached) $ac_c" 1>&6
10753 else
10754   
10755                                                                 save_LIBS="$LIBS"
10756                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10757                                 cat > conftest.$ac_ext <<EOF
10758 #line 10759 "configure"
10759 #include "confdefs.h"
10760
10761 #include <kerberosIV/krb.h>
10762 #include <kerberosIV/des.h>
10763 extern int des_debug;
10764
10765 int main() {
10766
10767 des_debug = 1;
10768
10769 ; return 0; }
10770 EOF
10771 if { (eval echo configure:10772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10772   rm -rf conftest*
10773   ol_cv_var_des_debug=yes
10774 else
10775   echo "configure: failed program was:" >&5
10776   cat conftest.$ac_ext >&5
10777   rm -rf conftest*
10778   ol_cv_var_des_debug=no
10779 fi
10780 rm -f conftest*
10781                                                                 LIBS="$save_LIBS"
10782                         
10783 fi
10784
10785 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10786
10787                         if test $ol_cv_var_des_debug = yes ; then
10788                                 cat >> confdefs.h <<\EOF
10789 #define HAVE_DES_DEBUG 1
10790 EOF
10791
10792                         fi
10793
10794                         LIBS="$save_LIBS"
10795                 fi
10796         fi
10797 fi
10798
10799 if test $ol_link_krb5 = yes ; then
10800         ol_with_kerberos=found
10801 fi
10802
10803 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10804         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10805
10806         for ac_hdr in krb.h des.h krb-archaeology.h 
10807 do
10808 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10809 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10810 echo "configure:10811: checking for $ac_hdr" >&5
10811 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10812   echo $ac_n "(cached) $ac_c" 1>&6
10813 else
10814   cat > conftest.$ac_ext <<EOF
10815 #line 10816 "configure"
10816 #include "confdefs.h"
10817 #include <$ac_hdr>
10818 EOF
10819 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10820 { (eval echo configure:10821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10821 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10822 if test -z "$ac_err"; then
10823   rm -rf conftest*
10824   eval "ac_cv_header_$ac_safe=yes"
10825 else
10826   echo "$ac_err" >&5
10827   echo "configure: failed program was:" >&5
10828   cat conftest.$ac_ext >&5
10829   rm -rf conftest*
10830   eval "ac_cv_header_$ac_safe=no"
10831 fi
10832 rm -f conftest*
10833 fi
10834 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10835   echo "$ac_t""yes" 1>&6
10836     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10837   cat >> confdefs.h <<EOF
10838 #define $ac_tr_hdr 1
10839 EOF
10840  
10841 else
10842   echo "$ac_t""no" 1>&6
10843 fi
10844 done
10845
10846
10847         if test $ac_cv_header_krb_h = yes ; then
10848                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10849 echo "configure:10850: checking for main in -lkrb" >&5
10850 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10851 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10852   echo $ac_n "(cached) $ac_c" 1>&6
10853 else
10854   ac_save_LIBS="$LIBS"
10855 LIBS="-lkrb -ldes $LIBS"
10856 cat > conftest.$ac_ext <<EOF
10857 #line 10858 "configure"
10858 #include "confdefs.h"
10859
10860 int main() {
10861 main()
10862 ; return 0; }
10863 EOF
10864 if { (eval echo configure:10865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10865   rm -rf conftest*
10866   eval "ac_cv_lib_$ac_lib_var=yes"
10867 else
10868   echo "configure: failed program was:" >&5
10869   cat conftest.$ac_ext >&5
10870   rm -rf conftest*
10871   eval "ac_cv_lib_$ac_lib_var=no"
10872 fi
10873 rm -f conftest*
10874 LIBS="$ac_save_LIBS"
10875
10876 fi
10877 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10878   echo "$ac_t""yes" 1>&6
10879   have_k4=yes
10880 else
10881   echo "$ac_t""no" 1>&6
10882 have_k4=no
10883 fi
10884
10885
10886                 if test $have_k4 = yes ; then
10887                         ol_with_kerberos=found
10888                         ol_link_krb4=yes
10889
10890                         cat >> confdefs.h <<\EOF
10891 #define HAVE_KRB4 1
10892 EOF
10893
10894
10895                         KRB4_LIBS="-lkrb -ldes"
10896
10897                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10898                                 cat >> confdefs.h <<\EOF
10899 #define HAVE_KTH_KERBEROS 1
10900 EOF
10901
10902                         fi
10903                 fi
10904         fi
10905 fi
10906
10907 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10908         ol_link_kpasswd=yes
10909 fi
10910
10911 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10912         ol_link_kbind=yes
10913
10914 elif test $ol_enable_kbind = yes ; then
10915         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10916 fi
10917
10918 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10919         cat >> confdefs.h <<\EOF
10920 #define HAVE_KERBEROS 1
10921 EOF
10922
10923
10924 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10925         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10926 fi
10927
10928 ol_link_tls=no
10929 if test $ol_with_tls != no ; then
10930         for ac_hdr in openssl/ssl.h ssl.h
10931 do
10932 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10933 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10934 echo "configure:10935: checking for $ac_hdr" >&5
10935 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10936   echo $ac_n "(cached) $ac_c" 1>&6
10937 else
10938   cat > conftest.$ac_ext <<EOF
10939 #line 10940 "configure"
10940 #include "confdefs.h"
10941 #include <$ac_hdr>
10942 EOF
10943 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10944 { (eval echo configure:10945: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10945 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10946 if test -z "$ac_err"; then
10947   rm -rf conftest*
10948   eval "ac_cv_header_$ac_safe=yes"
10949 else
10950   echo "$ac_err" >&5
10951   echo "configure: failed program was:" >&5
10952   cat conftest.$ac_ext >&5
10953   rm -rf conftest*
10954   eval "ac_cv_header_$ac_safe=no"
10955 fi
10956 rm -f conftest*
10957 fi
10958 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10959   echo "$ac_t""yes" 1>&6
10960     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10961   cat >> confdefs.h <<EOF
10962 #define $ac_tr_hdr 1
10963 EOF
10964  
10965 else
10966   echo "$ac_t""no" 1>&6
10967 fi
10968 done
10969
10970         
10971         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
10972                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10973 echo "configure:10974: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10974 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10975 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10976   echo $ac_n "(cached) $ac_c" 1>&6
10977 else
10978   ac_save_LIBS="$LIBS"
10979 LIBS="-lssl -lcrypto $LIBS"
10980 cat > conftest.$ac_ext <<EOF
10981 #line 10982 "configure"
10982 #include "confdefs.h"
10983 /* Override any gcc2 internal prototype to avoid an error.  */
10984 /* We use char because int might match the return type of a gcc2
10985     builtin and then its argument prototype would still apply.  */
10986 char SSLeay_add_ssl_algorithms();
10987
10988 int main() {
10989 SSLeay_add_ssl_algorithms()
10990 ; return 0; }
10991 EOF
10992 if { (eval echo configure:10993: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10993   rm -rf conftest*
10994   eval "ac_cv_lib_$ac_lib_var=yes"
10995 else
10996   echo "configure: failed program was:" >&5
10997   cat conftest.$ac_ext >&5
10998   rm -rf conftest*
10999   eval "ac_cv_lib_$ac_lib_var=no"
11000 fi
11001 rm -f conftest*
11002 LIBS="$ac_save_LIBS"
11003
11004 fi
11005 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11006   echo "$ac_t""yes" 1>&6
11007   have_ssleay=yes
11008                         need_rsaref=no
11009 else
11010   echo "$ac_t""no" 1>&6
11011 have_ssleay=no
11012 fi
11013
11014                         
11015                 if test $have_ssleay = no ; then
11016                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11017 echo "configure:11018: checking for SSL_library_init in -lssl" >&5
11018 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11019 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11020   echo $ac_n "(cached) $ac_c" 1>&6
11021 else
11022   ac_save_LIBS="$LIBS"
11023 LIBS="-lssl -lcrypto $LIBS"
11024 cat > conftest.$ac_ext <<EOF
11025 #line 11026 "configure"
11026 #include "confdefs.h"
11027 /* Override any gcc2 internal prototype to avoid an error.  */
11028 /* We use char because int might match the return type of a gcc2
11029     builtin and then its argument prototype would still apply.  */
11030 char SSL_library_init();
11031
11032 int main() {
11033 SSL_library_init()
11034 ; return 0; }
11035 EOF
11036 if { (eval echo configure:11037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11037   rm -rf conftest*
11038   eval "ac_cv_lib_$ac_lib_var=yes"
11039 else
11040   echo "configure: failed program was:" >&5
11041   cat conftest.$ac_ext >&5
11042   rm -rf conftest*
11043   eval "ac_cv_lib_$ac_lib_var=no"
11044 fi
11045 rm -f conftest*
11046 LIBS="$ac_save_LIBS"
11047
11048 fi
11049 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11050   echo "$ac_t""yes" 1>&6
11051   have_ssleay=yes
11052                                 need_rsaref=no
11053 else
11054   echo "$ac_t""no" 1>&6
11055 have_ssleay=no
11056 fi
11057
11058                 fi
11059
11060                 if test $have_ssleay = no ; then
11061                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11062 echo "configure:11063: checking for ssl3_accept in -lssl" >&5
11063 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11064 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11065   echo $ac_n "(cached) $ac_c" 1>&6
11066 else
11067   ac_save_LIBS="$LIBS"
11068 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11069 cat > conftest.$ac_ext <<EOF
11070 #line 11071 "configure"
11071 #include "confdefs.h"
11072 /* Override any gcc2 internal prototype to avoid an error.  */
11073 /* We use char because int might match the return type of a gcc2
11074     builtin and then its argument prototype would still apply.  */
11075 char ssl3_accept();
11076
11077 int main() {
11078 ssl3_accept()
11079 ; return 0; }
11080 EOF
11081 if { (eval echo configure:11082: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11082   rm -rf conftest*
11083   eval "ac_cv_lib_$ac_lib_var=yes"
11084 else
11085   echo "configure: failed program was:" >&5
11086   cat conftest.$ac_ext >&5
11087   rm -rf conftest*
11088   eval "ac_cv_lib_$ac_lib_var=no"
11089 fi
11090 rm -f conftest*
11091 LIBS="$ac_save_LIBS"
11092
11093 fi
11094 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11095   echo "$ac_t""yes" 1>&6
11096   have_ssleay=yes
11097                                 need_rsaref=yes
11098 else
11099   echo "$ac_t""no" 1>&6
11100 have_ssleay=no
11101 fi
11102
11103                 fi
11104
11105                 if test $have_ssleay = yes ; then
11106                         ol_with_tls=found
11107                         ol_link_tls=yes
11108
11109                         cat >> confdefs.h <<\EOF
11110 #define HAVE_SSLEAY 1
11111 EOF
11112
11113
11114                         if test $need_rsaref = yes; then
11115                                 cat >> confdefs.h <<\EOF
11116 #define HAVE_RSAREF 1
11117 EOF
11118
11119
11120                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11121                         else
11122                                 TLS_LIBS="-lssl -lcrypto"
11123                         fi
11124                 fi
11125         fi
11126
11127 else
11128         echo "configure: warning: TLS data protection not supported!" 1>&2
11129 fi
11130
11131 if test $ol_link_tls = yes ; then
11132         cat >> confdefs.h <<\EOF
11133 #define HAVE_TLS 1
11134 EOF
11135
11136
11137 elif test $ol_with_tls = auto ; then
11138         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11139         echo "configure: warning: TLS data protection not supported!" 1>&2
11140
11141 elif test $ol_with_tls != no ; then
11142         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11143 fi
11144
11145 if test $ol_enable_lmpasswd != no; then
11146         if test $ol_link_tls != yes ; then
11147                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11148         fi
11149
11150         cat >> confdefs.h <<\EOF
11151 #define SLAPD_LMHASH 1
11152 EOF
11153
11154 fi
11155
11156 for ac_func in \
11157         ctime_r                 \
11158         gethostbyname_r gethostbyaddr_r \
11159
11160 do
11161 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11162 echo "configure:11163: checking for $ac_func" >&5
11163 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11164   echo $ac_n "(cached) $ac_c" 1>&6
11165 else
11166   cat > conftest.$ac_ext <<EOF
11167 #line 11168 "configure"
11168 #include "confdefs.h"
11169 /* System header to define __stub macros and hopefully few prototypes,
11170     which can conflict with char $ac_func(); below.  */
11171 #include <assert.h>
11172 /* Override any gcc2 internal prototype to avoid an error.  */
11173 /* We use char because int might match the return type of a gcc2
11174     builtin and then its argument prototype would still apply.  */
11175 char $ac_func();
11176 char (*f)();
11177
11178 int main() {
11179
11180 /* The GNU C library defines this for functions which it implements
11181     to always fail with ENOSYS.  Some functions are actually named
11182     something starting with __ and the normal name is an alias.  */
11183 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11184 choke me
11185 #else
11186 f = $ac_func;
11187 #endif
11188
11189 ; return 0; }
11190 EOF
11191 if { (eval echo configure:11192: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11192   rm -rf conftest*
11193   eval "ac_cv_func_$ac_func=yes"
11194 else
11195   echo "configure: failed program was:" >&5
11196   cat conftest.$ac_ext >&5
11197   rm -rf conftest*
11198   eval "ac_cv_func_$ac_func=no"
11199 fi
11200 rm -f conftest*
11201 fi
11202
11203 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11204   echo "$ac_t""yes" 1>&6
11205     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11206   cat >> confdefs.h <<EOF
11207 #define $ac_tr_func 1
11208 EOF
11209  
11210 else
11211   echo "$ac_t""no" 1>&6
11212 fi
11213 done
11214
11215
11216 if test "$ac_cv_func_ctime_r" = no ; then
11217         ol_cv_func_ctime_r_nargs=0
11218 else
11219         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11220 echo "configure:11221: checking number of arguments of ctime_r" >&5
11221 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11222   echo $ac_n "(cached) $ac_c" 1>&6
11223 else
11224   cat > conftest.$ac_ext <<EOF
11225 #line 11226 "configure"
11226 #include "confdefs.h"
11227 #include <time.h>
11228 int main() {
11229 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11230 ; return 0; }
11231 EOF
11232 if { (eval echo configure:11233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11233   rm -rf conftest*
11234   ol_cv_func_ctime_r_nargs3=yes
11235 else
11236   echo "configure: failed program was:" >&5
11237   cat conftest.$ac_ext >&5
11238   rm -rf conftest*
11239   ol_cv_func_ctime_r_nargs3=no
11240 fi
11241 rm -f conftest*
11242
11243         cat > conftest.$ac_ext <<EOF
11244 #line 11245 "configure"
11245 #include "confdefs.h"
11246 #include <time.h>
11247 int main() {
11248 time_t ti; char *buffer; ctime_r(&ti,buffer);
11249 ; return 0; }
11250 EOF
11251 if { (eval echo configure:11252: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11252   rm -rf conftest*
11253   ol_cv_func_ctime_r_nargs2=yes
11254 else
11255   echo "configure: failed program was:" >&5
11256   cat conftest.$ac_ext >&5
11257   rm -rf conftest*
11258   ol_cv_func_ctime_r_nargs2=no
11259 fi
11260 rm -f conftest*
11261
11262         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11263                 $ol_cv_func_ctime_r_nargs2 = no ; then
11264
11265                 ol_cv_func_ctime_r_nargs=3
11266
11267         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11268                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11269
11270                 ol_cv_func_ctime_r_nargs=2
11271
11272         else
11273                 ol_cv_func_ctime_r_nargs=0
11274         fi
11275   
11276 fi
11277
11278 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11279
11280   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11281         cat >> confdefs.h <<EOF
11282 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11283 EOF
11284
11285   fi
11286
11287 fi
11288
11289 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11290         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11291 echo "configure:11292: checking number of arguments of gethostbyname_r" >&5
11292 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11293   echo $ac_n "(cached) $ac_c" 1>&6
11294 else
11295   cat > conftest.$ac_ext <<EOF
11296 #line 11297 "configure"
11297 #include "confdefs.h"
11298 #include <sys/types.h>
11299 #include <sys/socket.h>
11300 #include <netinet/in.h>
11301 #include <netdb.h>
11302 #define BUFSIZE (sizeof(struct hostent)+10)
11303 int main() {
11304 struct hostent hent; char buffer[BUFSIZE];
11305                 int bufsize=BUFSIZE;int h_errno;
11306                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11307                         buffer, bufsize, &h_errno);
11308 ; return 0; }
11309 EOF
11310 if { (eval echo configure:11311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11311   rm -rf conftest*
11312   ol_cv_func_gethostbyname_r_nargs5=yes
11313 else
11314   echo "configure: failed program was:" >&5
11315   cat conftest.$ac_ext >&5
11316   rm -rf conftest*
11317   ol_cv_func_gethostbyname_r_nargs5=no
11318 fi
11319 rm -f conftest*
11320
11321         cat > conftest.$ac_ext <<EOF
11322 #line 11323 "configure"
11323 #include "confdefs.h"
11324 #include <sys/types.h>
11325 #include <sys/socket.h>
11326 #include <netinet/in.h>
11327 #include <netdb.h>
11328 #define BUFSIZE (sizeof(struct hostent)+10)
11329 int main() {
11330 struct hostent hent;struct hostent *rhent;
11331                 char buffer[BUFSIZE];
11332                 int bufsize=BUFSIZE;int h_errno;
11333                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11334                         &rhent, &h_errno);
11335 ; return 0; }
11336 EOF
11337 if { (eval echo configure:11338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11338   rm -rf conftest*
11339   ol_cv_func_gethostbyname_r_nargs6=yes
11340 else
11341   echo "configure: failed program was:" >&5
11342   cat conftest.$ac_ext >&5
11343   rm -rf conftest*
11344   ol_cv_func_gethostbyname_r_nargs6=no
11345 fi
11346 rm -f conftest*
11347
11348         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11349                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11350
11351                 ol_cv_func_gethostbyname_r_nargs=5
11352
11353         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11354                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11355
11356                 ol_cv_func_gethostbyname_r_nargs=6
11357
11358         else
11359                 ol_cv_func_gethostbyname_r_nargs=0
11360         fi
11361   
11362 fi
11363
11364 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11365   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11366         cat >> confdefs.h <<EOF
11367 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11368 EOF
11369
11370   fi
11371
11372 else
11373         ol_cv_func_gethostbyname_r_nargs=0
11374 fi
11375  
11376 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11377         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11378 echo "configure:11379: checking number of arguments of gethostbyaddr_r" >&5
11379 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11380   echo $ac_n "(cached) $ac_c" 1>&6
11381 else
11382   cat > conftest.$ac_ext <<EOF
11383 #line 11384 "configure"
11384 #include "confdefs.h"
11385 #include <sys/types.h>
11386 #include <sys/socket.h>
11387 #include <netinet/in.h>
11388 #include <netdb.h>
11389 #define BUFSIZE (sizeof(struct hostent)+10)
11390 int main() {
11391 struct hostent hent; char buffer[BUFSIZE]; 
11392             struct in_addr add;
11393             size_t alen=sizeof(struct in_addr);
11394             int bufsize=BUFSIZE;int h_errno;
11395                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11396                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11397 ; return 0; }
11398 EOF
11399 if { (eval echo configure:11400: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11400   rm -rf conftest*
11401   ol_cv_func_gethostbyaddr_r_nargs7=yes
11402 else
11403   echo "configure: failed program was:" >&5
11404   cat conftest.$ac_ext >&5
11405   rm -rf conftest*
11406   ol_cv_func_gethostbyaddr_r_nargs7=no
11407 fi
11408 rm -f conftest*
11409
11410         cat > conftest.$ac_ext <<EOF
11411 #line 11412 "configure"
11412 #include "confdefs.h"
11413 #include <sys/types.h>
11414 #include <sys/socket.h>
11415 #include <netinet/in.h>
11416 #include <netdb.h>
11417 #define BUFSIZE (sizeof(struct hostent)+10)
11418 int main() {
11419 struct hostent hent;
11420                 struct hostent *rhent; char buffer[BUFSIZE]; 
11421                 struct in_addr add;
11422                 size_t alen=sizeof(struct in_addr);
11423                 int bufsize=BUFSIZE;int h_errno;
11424                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11425                         alen, AF_INET, &hent, buffer, bufsize, 
11426                         &rhent, &h_errno);
11427 ; return 0; }
11428 EOF
11429 if { (eval echo configure:11430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11430   rm -rf conftest*
11431   ol_cv_func_gethostbyaddr_r_nargs8=yes
11432 else
11433   echo "configure: failed program was:" >&5
11434   cat conftest.$ac_ext >&5
11435   rm -rf conftest*
11436   ol_cv_func_gethostbyaddr_r_nargs8=no
11437 fi
11438 rm -f conftest*
11439
11440         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11441                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11442
11443                 ol_cv_func_gethostbyaddr_r_nargs=7
11444
11445         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11446                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11447
11448                 ol_cv_func_gethostbyaddr_r_nargs=8
11449
11450         else
11451                 ol_cv_func_gethostbyaddr_r_nargs=0
11452         fi
11453   
11454 fi
11455
11456 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11457   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11458     cat >> confdefs.h <<EOF
11459 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11460 EOF
11461
11462   fi
11463
11464 else
11465         ol_cv_func_gethostbyaddr_r_nargs=0
11466 fi
11467
11468 if test "$ac_cv_func_ctime_r" = yes \
11469         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11470         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11471         -a "$ac_cv_func_gethostbyname_r" = yes \
11472         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11473         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11474         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11475         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11476         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11477         ; then
11478  
11479         cat >> confdefs.h <<\EOF
11480 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11481 EOF
11482
11483 fi
11484
11485 ol_link_threads=no
11486
11487 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11488         -o $ol_with_threads = nt ; then
11489
11490         
11491         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11492 echo "configure:11493: checking for _beginthread" >&5
11493 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11494   echo $ac_n "(cached) $ac_c" 1>&6
11495 else
11496   cat > conftest.$ac_ext <<EOF
11497 #line 11498 "configure"
11498 #include "confdefs.h"
11499 /* System header to define __stub macros and hopefully few prototypes,
11500     which can conflict with char _beginthread(); below.  */
11501 #include <assert.h>
11502 /* Override any gcc2 internal prototype to avoid an error.  */
11503 /* We use char because int might match the return type of a gcc2
11504     builtin and then its argument prototype would still apply.  */
11505 char _beginthread();
11506 char (*f)();
11507
11508 int main() {
11509
11510 /* The GNU C library defines this for functions which it implements
11511     to always fail with ENOSYS.  Some functions are actually named
11512     something starting with __ and the normal name is an alias.  */
11513 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11514 choke me
11515 #else
11516 f = _beginthread;
11517 #endif
11518
11519 ; return 0; }
11520 EOF
11521 if { (eval echo configure:11522: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11522   rm -rf conftest*
11523   eval "ac_cv_func__beginthread=yes"
11524 else
11525   echo "configure: failed program was:" >&5
11526   cat conftest.$ac_ext >&5
11527   rm -rf conftest*
11528   eval "ac_cv_func__beginthread=no"
11529 fi
11530 rm -f conftest*
11531 fi
11532
11533 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11534   echo "$ac_t""yes" 1>&6
11535   :
11536 else
11537   echo "$ac_t""no" 1>&6
11538 fi
11539
11540
11541         if test $ac_cv_func__beginthread = yes ; then
11542                 cat >> confdefs.h <<\EOF
11543 #define HAVE_NT_THREADS 1
11544 EOF
11545
11546                 ol_cv_nt_threads=yes
11547         fi
11548
11549
11550         if test "$ol_cv_nt_threads" = yes ; then
11551                 ol_link_threads=nt
11552                 ol_with_threads=found
11553                 ol_with_yielding_select=yes
11554
11555                 cat >> confdefs.h <<\EOF
11556 #define HAVE_NT_SERVICE_MANAGER 1
11557 EOF
11558
11559                 cat >> confdefs.h <<\EOF
11560 #define HAVE_NT_EVENT_LOG 1
11561 EOF
11562
11563         fi
11564
11565         if test $ol_with_threads = nt ; then
11566                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11567         fi
11568 fi
11569
11570 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11571         -o $ol_with_threads = posix ; then
11572
11573         for ac_hdr in pthread.h
11574 do
11575 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11576 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11577 echo "configure:11578: checking for $ac_hdr" >&5
11578 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11579   echo $ac_n "(cached) $ac_c" 1>&6
11580 else
11581   cat > conftest.$ac_ext <<EOF
11582 #line 11583 "configure"
11583 #include "confdefs.h"
11584 #include <$ac_hdr>
11585 EOF
11586 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11587 { (eval echo configure:11588: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11588 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11589 if test -z "$ac_err"; then
11590   rm -rf conftest*
11591   eval "ac_cv_header_$ac_safe=yes"
11592 else
11593   echo "$ac_err" >&5
11594   echo "configure: failed program was:" >&5
11595   cat conftest.$ac_ext >&5
11596   rm -rf conftest*
11597   eval "ac_cv_header_$ac_safe=no"
11598 fi
11599 rm -f conftest*
11600 fi
11601 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11602   echo "$ac_t""yes" 1>&6
11603     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11604   cat >> confdefs.h <<EOF
11605 #define $ac_tr_hdr 1
11606 EOF
11607  
11608 else
11609   echo "$ac_t""no" 1>&6
11610 fi
11611 done
11612
11613
11614         if test $ac_cv_header_pthread_h = yes ; then
11615                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11616 echo "configure:11617: checking POSIX thread version" >&5
11617 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11618   echo $ac_n "(cached) $ac_c" 1>&6
11619 else
11620   
11621         cat > conftest.$ac_ext <<EOF
11622 #line 11623 "configure"
11623 #include "confdefs.h"
11624
11625 #               include <pthread.h>
11626                 /* this check could be improved */
11627 #               ifdef PTHREAD_ONCE_INIT
11628                         pthread_version_final;
11629 #               endif
11630         
11631 EOF
11632 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11633   egrep "pthread_version_final" >/dev/null 2>&1; then
11634   rm -rf conftest*
11635   ol_pthread_final=yes
11636 else
11637   rm -rf conftest*
11638   ol_pthread_final=no
11639 fi
11640 rm -f conftest*
11641
11642
11643         cat > conftest.$ac_ext <<EOF
11644 #line 11645 "configure"
11645 #include "confdefs.h"
11646
11647 #               include <pthread.h>
11648                 /* this check could be improved */
11649 #               ifdef pthread_once_init
11650                         pthread_version_draft4;
11651 #               endif
11652         
11653 EOF
11654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11655   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11656   rm -rf conftest*
11657   ol_pthread_draft4=yes
11658 else
11659   rm -rf conftest*
11660   ol_pthread_draft4=no
11661 fi
11662 rm -f conftest*
11663
11664
11665         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11666                 ol_cv_pthread_version=final
11667         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11668                 ol_cv_pthread_version=draft4
11669         else
11670                 ol_cv_pthread_version=unknown
11671         fi
11672
11673 fi
11674
11675 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11676
11677
11678                 if test $ol_cv_pthread_version = final ; then
11679                         cat >> confdefs.h <<\EOF
11680 #define HAVE_PTHREADS_FINAL 1
11681 EOF
11682
11683                 elif test $ol_cv_pthread_version = draft4 ; then
11684                         cat >> confdefs.h <<\EOF
11685 #define HAVE_PTHREADS_D4 1
11686 EOF
11687
11688                 else
11689                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11690                 fi
11691
11692                 # consider threads found
11693                 ol_with_threads=found
11694
11695                 
11696         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11697 echo "configure:11698: checking for LinuxThreads pthread.h" >&5
11698 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11699   echo $ac_n "(cached) $ac_c" 1>&6
11700 else
11701   cat > conftest.$ac_ext <<EOF
11702 #line 11703 "configure"
11703 #include "confdefs.h"
11704 #include <pthread.h>
11705 EOF
11706 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11707   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11708   rm -rf conftest*
11709   ol_cv_header_linux_threads=yes
11710 else
11711   rm -rf conftest*
11712   ol_cv_header_linux_threads=no
11713 fi
11714 rm -f conftest*
11715
11716                 
11717 fi
11718
11719 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11720         if test $ol_cv_header_linux_threads = yes; then
11721                 cat >> confdefs.h <<\EOF
11722 #define HAVE_LINUX_THREADS 1
11723 EOF
11724
11725         fi
11726
11727                 
11728         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11729 echo "configure:11730: checking for GNU Pth pthread.h" >&5
11730 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11731   echo $ac_n "(cached) $ac_c" 1>&6
11732 else
11733   cat > conftest.$ac_ext <<EOF
11734 #line 11735 "configure"
11735 #include "confdefs.h"
11736 #include <pthread.h>
11737 #ifdef _POSIX_THREAD_IS_GNU_PTH
11738         __gnu_pth__;
11739 #endif
11740
11741 EOF
11742 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11743   egrep "__gnu_pth__" >/dev/null 2>&1; then
11744   rm -rf conftest*
11745   ol_cv_header_gnu_pth_pthread_h=yes
11746 else
11747   rm -rf conftest*
11748   ol_cv_header_gnu_pth_pthread_h=no
11749 fi
11750 rm -f conftest*
11751
11752                 
11753 fi
11754
11755 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11756
11757
11758                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11759                         for ac_hdr in sched.h
11760 do
11761 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11762 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11763 echo "configure:11764: checking for $ac_hdr" >&5
11764 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11765   echo $ac_n "(cached) $ac_c" 1>&6
11766 else
11767   cat > conftest.$ac_ext <<EOF
11768 #line 11769 "configure"
11769 #include "confdefs.h"
11770 #include <$ac_hdr>
11771 EOF
11772 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11773 { (eval echo configure:11774: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11774 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11775 if test -z "$ac_err"; then
11776   rm -rf conftest*
11777   eval "ac_cv_header_$ac_safe=yes"
11778 else
11779   echo "$ac_err" >&5
11780   echo "configure: failed program was:" >&5
11781   cat conftest.$ac_ext >&5
11782   rm -rf conftest*
11783   eval "ac_cv_header_$ac_safe=no"
11784 fi
11785 rm -f conftest*
11786 fi
11787 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11788   echo "$ac_t""yes" 1>&6
11789     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11790   cat >> confdefs.h <<EOF
11791 #define $ac_tr_hdr 1
11792 EOF
11793  
11794 else
11795   echo "$ac_t""no" 1>&6
11796 fi
11797 done
11798
11799                 fi
11800
11801                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11802                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11803 echo "configure:11804: checking for pthread_create in default libraries" >&5
11804 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11805   echo $ac_n "(cached) $ac_c" 1>&6
11806 else
11807   
11808                 if test "$cross_compiling" = yes; then
11809   cat > conftest.$ac_ext <<EOF
11810 #line 11811 "configure"
11811 #include "confdefs.h"
11812 /* pthread test headers */
11813 #include <pthread.h>
11814 #ifndef NULL
11815 #define NULL (void*)0
11816 #endif
11817
11818 static void *task(p)
11819         void *p;
11820 {
11821         return (void *) (p == NULL);
11822 }
11823
11824 int main() {
11825
11826         /* pthread test function */
11827         pthread_t t;
11828         int status;
11829         int detach = 1;
11830
11831 #ifdef HAVE_PTHREADS_FINAL
11832         /* Final pthreads */
11833         pthread_attr_t attr;
11834
11835         status = pthread_attr_init(&attr);
11836         if( status ) return status;
11837
11838 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11839         if( !detach ) {
11840 #if defined( PTHREAD_CREATE_JOINABLE )
11841                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11842 #else
11843                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11844 #endif
11845
11846 #ifdef PTHREAD_CREATE_DETACHED
11847         } else {
11848                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11849 #endif
11850         }
11851         if( status ) return status;
11852 #endif
11853
11854         status = pthread_create( &t, &attr, task, NULL );
11855         if( status ) return status;
11856
11857 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11858         if( detach ) {
11859                 /* give thread a chance to complete */
11860                 /* it should remain joinable and hence detachable */
11861                 sleep( 1 );
11862
11863                 status = pthread_detach( t );
11864                 if( status ) return status;
11865         }
11866 #endif
11867
11868 #else
11869         /* Draft 4 pthreads */
11870         status = pthread_create( &t, pthread_attr_default, task, NULL );
11871         if( status ) return status;
11872
11873         if( detach ) {
11874                 /* give thread a chance to complete */
11875                 /* it should remain joinable and hence detachable */
11876                 sleep( 1 );
11877
11878                 status = pthread_detach( &t );
11879                 if( status ) return status;
11880         }
11881 #endif
11882
11883 #ifdef HAVE_LINUX_THREADS
11884         pthread_kill_other_threads_np();
11885 #endif
11886
11887         return 0;
11888
11889 ; return 0; }
11890 EOF
11891 if { (eval echo configure:11892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11892   rm -rf conftest*
11893   ol_cv_pthread_create=yes
11894 else
11895   echo "configure: failed program was:" >&5
11896   cat conftest.$ac_ext >&5
11897   rm -rf conftest*
11898   ol_cv_pthread_create=no
11899 fi
11900 rm -f conftest*
11901 else
11902   cat > conftest.$ac_ext <<EOF
11903 #line 11904 "configure"
11904 #include "confdefs.h"
11905 /* pthread test headers */
11906 #include <pthread.h>
11907 #ifndef NULL
11908 #define NULL (void*)0
11909 #endif
11910
11911 static void *task(p)
11912         void *p;
11913 {
11914         return (void *) (p == NULL);
11915 }
11916
11917
11918 int main(argc, argv)
11919         int argc;
11920         char **argv;
11921 {
11922
11923         /* pthread test function */
11924         pthread_t t;
11925         int status;
11926         int detach = 1;
11927
11928 #ifdef HAVE_PTHREADS_FINAL
11929         /* Final pthreads */
11930         pthread_attr_t attr;
11931
11932         status = pthread_attr_init(&attr);
11933         if( status ) return status;
11934
11935 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11936         if( !detach ) {
11937 #if defined( PTHREAD_CREATE_JOINABLE )
11938                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11939 #else
11940                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11941 #endif
11942
11943 #ifdef PTHREAD_CREATE_DETACHED
11944         } else {
11945                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11946 #endif
11947         }
11948         if( status ) return status;
11949 #endif
11950
11951         status = pthread_create( &t, &attr, task, NULL );
11952         if( status ) return status;
11953
11954 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11955         if( detach ) {
11956                 /* give thread a chance to complete */
11957                 /* it should remain joinable and hence detachable */
11958                 sleep( 1 );
11959
11960                 status = pthread_detach( t );
11961                 if( status ) return status;
11962         }
11963 #endif
11964
11965 #else
11966         /* Draft 4 pthreads */
11967         status = pthread_create( &t, pthread_attr_default, task, NULL );
11968         if( status ) return status;
11969
11970         if( detach ) {
11971                 /* give thread a chance to complete */
11972                 /* it should remain joinable and hence detachable */
11973                 sleep( 1 );
11974
11975                 status = pthread_detach( &t );
11976                 if( status ) return status;
11977         }
11978 #endif
11979
11980 #ifdef HAVE_LINUX_THREADS
11981         pthread_kill_other_threads_np();
11982 #endif
11983
11984         return 0;
11985
11986 }
11987
11988 EOF
11989 if { (eval echo configure:11990: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11990 then
11991   ol_cv_pthread_create=yes
11992 else
11993   echo "configure: failed program was:" >&5
11994   cat conftest.$ac_ext >&5
11995   rm -fr conftest*
11996   ol_cv_pthread_create=no
11997 fi
11998 rm -fr conftest*
11999 fi
12000
12001 fi
12002
12003 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12004
12005                 if test $ol_cv_pthread_create != no ; then
12006                         ol_link_threads=posix
12007                         ol_link_pthreads=""
12008                 fi
12009                 
12010                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12011 if test "$ol_link_threads" = no ; then
12012         # try -kthread
12013         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12014 echo "configure:12015: checking for pthread link with -kthread" >&5
12015 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12016   echo $ac_n "(cached) $ac_c" 1>&6
12017 else
12018   
12019                 # save the flags
12020                 ol_LIBS="$LIBS"
12021                 LIBS="-kthread $LIBS"
12022
12023                 if test "$cross_compiling" = yes; then
12024   cat > conftest.$ac_ext <<EOF
12025 #line 12026 "configure"
12026 #include "confdefs.h"
12027 /* pthread test headers */
12028 #include <pthread.h>
12029 #ifndef NULL
12030 #define NULL (void*)0
12031 #endif
12032
12033 static void *task(p)
12034         void *p;
12035 {
12036         return (void *) (p == NULL);
12037 }
12038
12039 int main() {
12040
12041         /* pthread test function */
12042         pthread_t t;
12043         int status;
12044         int detach = 1;
12045
12046 #ifdef HAVE_PTHREADS_FINAL
12047         /* Final pthreads */
12048         pthread_attr_t attr;
12049
12050         status = pthread_attr_init(&attr);
12051         if( status ) return status;
12052
12053 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12054         if( !detach ) {
12055 #if defined( PTHREAD_CREATE_JOINABLE )
12056                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12057 #else
12058                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12059 #endif
12060
12061 #ifdef PTHREAD_CREATE_DETACHED
12062         } else {
12063                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12064 #endif
12065         }
12066         if( status ) return status;
12067 #endif
12068
12069         status = pthread_create( &t, &attr, task, NULL );
12070         if( status ) return status;
12071
12072 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12073         if( detach ) {
12074                 /* give thread a chance to complete */
12075                 /* it should remain joinable and hence detachable */
12076                 sleep( 1 );
12077
12078                 status = pthread_detach( t );
12079                 if( status ) return status;
12080         }
12081 #endif
12082
12083 #else
12084         /* Draft 4 pthreads */
12085         status = pthread_create( &t, pthread_attr_default, task, NULL );
12086         if( status ) return status;
12087
12088         if( detach ) {
12089                 /* give thread a chance to complete */
12090                 /* it should remain joinable and hence detachable */
12091                 sleep( 1 );
12092
12093                 status = pthread_detach( &t );
12094                 if( status ) return status;
12095         }
12096 #endif
12097
12098 #ifdef HAVE_LINUX_THREADS
12099         pthread_kill_other_threads_np();
12100 #endif
12101
12102         return 0;
12103
12104 ; return 0; }
12105 EOF
12106 if { (eval echo configure:12107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12107   rm -rf conftest*
12108   ol_cv_pthread_kthread=yes
12109 else
12110   echo "configure: failed program was:" >&5
12111   cat conftest.$ac_ext >&5
12112   rm -rf conftest*
12113   ol_cv_pthread_kthread=no
12114 fi
12115 rm -f conftest*
12116 else
12117   cat > conftest.$ac_ext <<EOF
12118 #line 12119 "configure"
12119 #include "confdefs.h"
12120 /* pthread test headers */
12121 #include <pthread.h>
12122 #ifndef NULL
12123 #define NULL (void*)0
12124 #endif
12125
12126 static void *task(p)
12127         void *p;
12128 {
12129         return (void *) (p == NULL);
12130 }
12131
12132
12133 int main(argc, argv)
12134         int argc;
12135         char **argv;
12136 {
12137
12138         /* pthread test function */
12139         pthread_t t;
12140         int status;
12141         int detach = 1;
12142
12143 #ifdef HAVE_PTHREADS_FINAL
12144         /* Final pthreads */
12145         pthread_attr_t attr;
12146
12147         status = pthread_attr_init(&attr);
12148         if( status ) return status;
12149
12150 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12151         if( !detach ) {
12152 #if defined( PTHREAD_CREATE_JOINABLE )
12153                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12154 #else
12155                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12156 #endif
12157
12158 #ifdef PTHREAD_CREATE_DETACHED
12159         } else {
12160                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12161 #endif
12162         }
12163         if( status ) return status;
12164 #endif
12165
12166         status = pthread_create( &t, &attr, task, NULL );
12167         if( status ) return status;
12168
12169 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12170         if( detach ) {
12171                 /* give thread a chance to complete */
12172                 /* it should remain joinable and hence detachable */
12173                 sleep( 1 );
12174
12175                 status = pthread_detach( t );
12176                 if( status ) return status;
12177         }
12178 #endif
12179
12180 #else
12181         /* Draft 4 pthreads */
12182         status = pthread_create( &t, pthread_attr_default, task, NULL );
12183         if( status ) return status;
12184
12185         if( detach ) {
12186                 /* give thread a chance to complete */
12187                 /* it should remain joinable and hence detachable */
12188                 sleep( 1 );
12189
12190                 status = pthread_detach( &t );
12191                 if( status ) return status;
12192         }
12193 #endif
12194
12195 #ifdef HAVE_LINUX_THREADS
12196         pthread_kill_other_threads_np();
12197 #endif
12198
12199         return 0;
12200
12201 }
12202
12203 EOF
12204 if { (eval echo configure:12205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12205 then
12206   ol_cv_pthread_kthread=yes
12207 else
12208   echo "configure: failed program was:" >&5
12209   cat conftest.$ac_ext >&5
12210   rm -fr conftest*
12211   ol_cv_pthread_kthread=no
12212 fi
12213 rm -fr conftest*
12214 fi
12215
12216
12217                 # restore the LIBS
12218                 LIBS="$ol_LIBS"
12219         
12220 fi
12221
12222 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12223
12224         if test $ol_cv_pthread_kthread = yes ; then
12225                 ol_link_pthreads="-kthread"
12226                 ol_link_threads=posix
12227         fi
12228 fi
12229
12230                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12231 if test "$ol_link_threads" = no ; then
12232         # try -pthread
12233         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12234 echo "configure:12235: checking for pthread link with -pthread" >&5
12235 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12236   echo $ac_n "(cached) $ac_c" 1>&6
12237 else
12238   
12239                 # save the flags
12240                 ol_LIBS="$LIBS"
12241                 LIBS="-pthread $LIBS"
12242
12243                 if test "$cross_compiling" = yes; then
12244   cat > conftest.$ac_ext <<EOF
12245 #line 12246 "configure"
12246 #include "confdefs.h"
12247 /* pthread test headers */
12248 #include <pthread.h>
12249 #ifndef NULL
12250 #define NULL (void*)0
12251 #endif
12252
12253 static void *task(p)
12254         void *p;
12255 {
12256         return (void *) (p == NULL);
12257 }
12258
12259 int main() {
12260
12261         /* pthread test function */
12262         pthread_t t;
12263         int status;
12264         int detach = 1;
12265
12266 #ifdef HAVE_PTHREADS_FINAL
12267         /* Final pthreads */
12268         pthread_attr_t attr;
12269
12270         status = pthread_attr_init(&attr);
12271         if( status ) return status;
12272
12273 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12274         if( !detach ) {
12275 #if defined( PTHREAD_CREATE_JOINABLE )
12276                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12277 #else
12278                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12279 #endif
12280
12281 #ifdef PTHREAD_CREATE_DETACHED
12282         } else {
12283                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12284 #endif
12285         }
12286         if( status ) return status;
12287 #endif
12288
12289         status = pthread_create( &t, &attr, task, NULL );
12290         if( status ) return status;
12291
12292 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12293         if( detach ) {
12294                 /* give thread a chance to complete */
12295                 /* it should remain joinable and hence detachable */
12296                 sleep( 1 );
12297
12298                 status = pthread_detach( t );
12299                 if( status ) return status;
12300         }
12301 #endif
12302
12303 #else
12304         /* Draft 4 pthreads */
12305         status = pthread_create( &t, pthread_attr_default, task, NULL );
12306         if( status ) return status;
12307
12308         if( detach ) {
12309                 /* give thread a chance to complete */
12310                 /* it should remain joinable and hence detachable */
12311                 sleep( 1 );
12312
12313                 status = pthread_detach( &t );
12314                 if( status ) return status;
12315         }
12316 #endif
12317
12318 #ifdef HAVE_LINUX_THREADS
12319         pthread_kill_other_threads_np();
12320 #endif
12321
12322         return 0;
12323
12324 ; return 0; }
12325 EOF
12326 if { (eval echo configure:12327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12327   rm -rf conftest*
12328   ol_cv_pthread_pthread=yes
12329 else
12330   echo "configure: failed program was:" >&5
12331   cat conftest.$ac_ext >&5
12332   rm -rf conftest*
12333   ol_cv_pthread_pthread=no
12334 fi
12335 rm -f conftest*
12336 else
12337   cat > conftest.$ac_ext <<EOF
12338 #line 12339 "configure"
12339 #include "confdefs.h"
12340 /* pthread test headers */
12341 #include <pthread.h>
12342 #ifndef NULL
12343 #define NULL (void*)0
12344 #endif
12345
12346 static void *task(p)
12347         void *p;
12348 {
12349         return (void *) (p == NULL);
12350 }
12351
12352
12353 int main(argc, argv)
12354         int argc;
12355         char **argv;
12356 {
12357
12358         /* pthread test function */
12359         pthread_t t;
12360         int status;
12361         int detach = 1;
12362
12363 #ifdef HAVE_PTHREADS_FINAL
12364         /* Final pthreads */
12365         pthread_attr_t attr;
12366
12367         status = pthread_attr_init(&attr);
12368         if( status ) return status;
12369
12370 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12371         if( !detach ) {
12372 #if defined( PTHREAD_CREATE_JOINABLE )
12373                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12374 #else
12375                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12376 #endif
12377
12378 #ifdef PTHREAD_CREATE_DETACHED
12379         } else {
12380                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12381 #endif
12382         }
12383         if( status ) return status;
12384 #endif
12385
12386         status = pthread_create( &t, &attr, task, NULL );
12387         if( status ) return status;
12388
12389 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12390         if( detach ) {
12391                 /* give thread a chance to complete */
12392                 /* it should remain joinable and hence detachable */
12393                 sleep( 1 );
12394
12395                 status = pthread_detach( t );
12396                 if( status ) return status;
12397         }
12398 #endif
12399
12400 #else
12401         /* Draft 4 pthreads */
12402         status = pthread_create( &t, pthread_attr_default, task, NULL );
12403         if( status ) return status;
12404
12405         if( detach ) {
12406                 /* give thread a chance to complete */
12407                 /* it should remain joinable and hence detachable */
12408                 sleep( 1 );
12409
12410                 status = pthread_detach( &t );
12411                 if( status ) return status;
12412         }
12413 #endif
12414
12415 #ifdef HAVE_LINUX_THREADS
12416         pthread_kill_other_threads_np();
12417 #endif
12418
12419         return 0;
12420
12421 }
12422
12423 EOF
12424 if { (eval echo configure:12425: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12425 then
12426   ol_cv_pthread_pthread=yes
12427 else
12428   echo "configure: failed program was:" >&5
12429   cat conftest.$ac_ext >&5
12430   rm -fr conftest*
12431   ol_cv_pthread_pthread=no
12432 fi
12433 rm -fr conftest*
12434 fi
12435
12436
12437                 # restore the LIBS
12438                 LIBS="$ol_LIBS"
12439         
12440 fi
12441
12442 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12443
12444         if test $ol_cv_pthread_pthread = yes ; then
12445                 ol_link_pthreads="-pthread"
12446                 ol_link_threads=posix
12447         fi
12448 fi
12449
12450                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12451 if test "$ol_link_threads" = no ; then
12452         # try -pthreads
12453         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12454 echo "configure:12455: checking for pthread link with -pthreads" >&5
12455 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12456   echo $ac_n "(cached) $ac_c" 1>&6
12457 else
12458   
12459                 # save the flags
12460                 ol_LIBS="$LIBS"
12461                 LIBS="-pthreads $LIBS"
12462
12463                 if test "$cross_compiling" = yes; then
12464   cat > conftest.$ac_ext <<EOF
12465 #line 12466 "configure"
12466 #include "confdefs.h"
12467 /* pthread test headers */
12468 #include <pthread.h>
12469 #ifndef NULL
12470 #define NULL (void*)0
12471 #endif
12472
12473 static void *task(p)
12474         void *p;
12475 {
12476         return (void *) (p == NULL);
12477 }
12478
12479 int main() {
12480
12481         /* pthread test function */
12482         pthread_t t;
12483         int status;
12484         int detach = 1;
12485
12486 #ifdef HAVE_PTHREADS_FINAL
12487         /* Final pthreads */
12488         pthread_attr_t attr;
12489
12490         status = pthread_attr_init(&attr);
12491         if( status ) return status;
12492
12493 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12494         if( !detach ) {
12495 #if defined( PTHREAD_CREATE_JOINABLE )
12496                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12497 #else
12498                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12499 #endif
12500
12501 #ifdef PTHREAD_CREATE_DETACHED
12502         } else {
12503                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12504 #endif
12505         }
12506         if( status ) return status;
12507 #endif
12508
12509         status = pthread_create( &t, &attr, task, NULL );
12510         if( status ) return status;
12511
12512 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12513         if( detach ) {
12514                 /* give thread a chance to complete */
12515                 /* it should remain joinable and hence detachable */
12516                 sleep( 1 );
12517
12518                 status = pthread_detach( t );
12519                 if( status ) return status;
12520         }
12521 #endif
12522
12523 #else
12524         /* Draft 4 pthreads */
12525         status = pthread_create( &t, pthread_attr_default, task, NULL );
12526         if( status ) return status;
12527
12528         if( detach ) {
12529                 /* give thread a chance to complete */
12530                 /* it should remain joinable and hence detachable */
12531                 sleep( 1 );
12532
12533                 status = pthread_detach( &t );
12534                 if( status ) return status;
12535         }
12536 #endif
12537
12538 #ifdef HAVE_LINUX_THREADS
12539         pthread_kill_other_threads_np();
12540 #endif
12541
12542         return 0;
12543
12544 ; return 0; }
12545 EOF
12546 if { (eval echo configure:12547: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12547   rm -rf conftest*
12548   ol_cv_pthread_pthreads=yes
12549 else
12550   echo "configure: failed program was:" >&5
12551   cat conftest.$ac_ext >&5
12552   rm -rf conftest*
12553   ol_cv_pthread_pthreads=no
12554 fi
12555 rm -f conftest*
12556 else
12557   cat > conftest.$ac_ext <<EOF
12558 #line 12559 "configure"
12559 #include "confdefs.h"
12560 /* pthread test headers */
12561 #include <pthread.h>
12562 #ifndef NULL
12563 #define NULL (void*)0
12564 #endif
12565
12566 static void *task(p)
12567         void *p;
12568 {
12569         return (void *) (p == NULL);
12570 }
12571
12572
12573 int main(argc, argv)
12574         int argc;
12575         char **argv;
12576 {
12577
12578         /* pthread test function */
12579         pthread_t t;
12580         int status;
12581         int detach = 1;
12582
12583 #ifdef HAVE_PTHREADS_FINAL
12584         /* Final pthreads */
12585         pthread_attr_t attr;
12586
12587         status = pthread_attr_init(&attr);
12588         if( status ) return status;
12589
12590 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12591         if( !detach ) {
12592 #if defined( PTHREAD_CREATE_JOINABLE )
12593                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12594 #else
12595                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12596 #endif
12597
12598 #ifdef PTHREAD_CREATE_DETACHED
12599         } else {
12600                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12601 #endif
12602         }
12603         if( status ) return status;
12604 #endif
12605
12606         status = pthread_create( &t, &attr, task, NULL );
12607         if( status ) return status;
12608
12609 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12610         if( detach ) {
12611                 /* give thread a chance to complete */
12612                 /* it should remain joinable and hence detachable */
12613                 sleep( 1 );
12614
12615                 status = pthread_detach( t );
12616                 if( status ) return status;
12617         }
12618 #endif
12619
12620 #else
12621         /* Draft 4 pthreads */
12622         status = pthread_create( &t, pthread_attr_default, task, NULL );
12623         if( status ) return status;
12624
12625         if( detach ) {
12626                 /* give thread a chance to complete */
12627                 /* it should remain joinable and hence detachable */
12628                 sleep( 1 );
12629
12630                 status = pthread_detach( &t );
12631                 if( status ) return status;
12632         }
12633 #endif
12634
12635 #ifdef HAVE_LINUX_THREADS
12636         pthread_kill_other_threads_np();
12637 #endif
12638
12639         return 0;
12640
12641 }
12642
12643 EOF
12644 if { (eval echo configure:12645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12645 then
12646   ol_cv_pthread_pthreads=yes
12647 else
12648   echo "configure: failed program was:" >&5
12649   cat conftest.$ac_ext >&5
12650   rm -fr conftest*
12651   ol_cv_pthread_pthreads=no
12652 fi
12653 rm -fr conftest*
12654 fi
12655
12656
12657                 # restore the LIBS
12658                 LIBS="$ol_LIBS"
12659         
12660 fi
12661
12662 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12663
12664         if test $ol_cv_pthread_pthreads = yes ; then
12665                 ol_link_pthreads="-pthreads"
12666                 ol_link_threads=posix
12667         fi
12668 fi
12669
12670                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12671 if test "$ol_link_threads" = no ; then
12672         # try -mthreads
12673         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12674 echo "configure:12675: checking for pthread link with -mthreads" >&5
12675 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12676   echo $ac_n "(cached) $ac_c" 1>&6
12677 else
12678   
12679                 # save the flags
12680                 ol_LIBS="$LIBS"
12681                 LIBS="-mthreads $LIBS"
12682
12683                 if test "$cross_compiling" = yes; then
12684   cat > conftest.$ac_ext <<EOF
12685 #line 12686 "configure"
12686 #include "confdefs.h"
12687 /* pthread test headers */
12688 #include <pthread.h>
12689 #ifndef NULL
12690 #define NULL (void*)0
12691 #endif
12692
12693 static void *task(p)
12694         void *p;
12695 {
12696         return (void *) (p == NULL);
12697 }
12698
12699 int main() {
12700
12701         /* pthread test function */
12702         pthread_t t;
12703         int status;
12704         int detach = 1;
12705
12706 #ifdef HAVE_PTHREADS_FINAL
12707         /* Final pthreads */
12708         pthread_attr_t attr;
12709
12710         status = pthread_attr_init(&attr);
12711         if( status ) return status;
12712
12713 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12714         if( !detach ) {
12715 #if defined( PTHREAD_CREATE_JOINABLE )
12716                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12717 #else
12718                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12719 #endif
12720
12721 #ifdef PTHREAD_CREATE_DETACHED
12722         } else {
12723                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12724 #endif
12725         }
12726         if( status ) return status;
12727 #endif
12728
12729         status = pthread_create( &t, &attr, task, NULL );
12730         if( status ) return status;
12731
12732 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12733         if( detach ) {
12734                 /* give thread a chance to complete */
12735                 /* it should remain joinable and hence detachable */
12736                 sleep( 1 );
12737
12738                 status = pthread_detach( t );
12739                 if( status ) return status;
12740         }
12741 #endif
12742
12743 #else
12744         /* Draft 4 pthreads */
12745         status = pthread_create( &t, pthread_attr_default, task, NULL );
12746         if( status ) return status;
12747
12748         if( detach ) {
12749                 /* give thread a chance to complete */
12750                 /* it should remain joinable and hence detachable */
12751                 sleep( 1 );
12752
12753                 status = pthread_detach( &t );
12754                 if( status ) return status;
12755         }
12756 #endif
12757
12758 #ifdef HAVE_LINUX_THREADS
12759         pthread_kill_other_threads_np();
12760 #endif
12761
12762         return 0;
12763
12764 ; return 0; }
12765 EOF
12766 if { (eval echo configure:12767: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12767   rm -rf conftest*
12768   ol_cv_pthread_mthreads=yes
12769 else
12770   echo "configure: failed program was:" >&5
12771   cat conftest.$ac_ext >&5
12772   rm -rf conftest*
12773   ol_cv_pthread_mthreads=no
12774 fi
12775 rm -f conftest*
12776 else
12777   cat > conftest.$ac_ext <<EOF
12778 #line 12779 "configure"
12779 #include "confdefs.h"
12780 /* pthread test headers */
12781 #include <pthread.h>
12782 #ifndef NULL
12783 #define NULL (void*)0
12784 #endif
12785
12786 static void *task(p)
12787         void *p;
12788 {
12789         return (void *) (p == NULL);
12790 }
12791
12792
12793 int main(argc, argv)
12794         int argc;
12795         char **argv;
12796 {
12797
12798         /* pthread test function */
12799         pthread_t t;
12800         int status;
12801         int detach = 1;
12802
12803 #ifdef HAVE_PTHREADS_FINAL
12804         /* Final pthreads */
12805         pthread_attr_t attr;
12806
12807         status = pthread_attr_init(&attr);
12808         if( status ) return status;
12809
12810 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12811         if( !detach ) {
12812 #if defined( PTHREAD_CREATE_JOINABLE )
12813                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12814 #else
12815                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12816 #endif
12817
12818 #ifdef PTHREAD_CREATE_DETACHED
12819         } else {
12820                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12821 #endif
12822         }
12823         if( status ) return status;
12824 #endif
12825
12826         status = pthread_create( &t, &attr, task, NULL );
12827         if( status ) return status;
12828
12829 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12830         if( detach ) {
12831                 /* give thread a chance to complete */
12832                 /* it should remain joinable and hence detachable */
12833                 sleep( 1 );
12834
12835                 status = pthread_detach( t );
12836                 if( status ) return status;
12837         }
12838 #endif
12839
12840 #else
12841         /* Draft 4 pthreads */
12842         status = pthread_create( &t, pthread_attr_default, task, NULL );
12843         if( status ) return status;
12844
12845         if( detach ) {
12846                 /* give thread a chance to complete */
12847                 /* it should remain joinable and hence detachable */
12848                 sleep( 1 );
12849
12850                 status = pthread_detach( &t );
12851                 if( status ) return status;
12852         }
12853 #endif
12854
12855 #ifdef HAVE_LINUX_THREADS
12856         pthread_kill_other_threads_np();
12857 #endif
12858
12859         return 0;
12860
12861 }
12862
12863 EOF
12864 if { (eval echo configure:12865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12865 then
12866   ol_cv_pthread_mthreads=yes
12867 else
12868   echo "configure: failed program was:" >&5
12869   cat conftest.$ac_ext >&5
12870   rm -fr conftest*
12871   ol_cv_pthread_mthreads=no
12872 fi
12873 rm -fr conftest*
12874 fi
12875
12876
12877                 # restore the LIBS
12878                 LIBS="$ol_LIBS"
12879         
12880 fi
12881
12882 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12883
12884         if test $ol_cv_pthread_mthreads = yes ; then
12885                 ol_link_pthreads="-mthreads"
12886                 ol_link_threads=posix
12887         fi
12888 fi
12889
12890                 # Pthread try link: -thread (ol_cv_pthread_thread)
12891 if test "$ol_link_threads" = no ; then
12892         # try -thread
12893         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12894 echo "configure:12895: checking for pthread link with -thread" >&5
12895 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12896   echo $ac_n "(cached) $ac_c" 1>&6
12897 else
12898   
12899                 # save the flags
12900                 ol_LIBS="$LIBS"
12901                 LIBS="-thread $LIBS"
12902
12903                 if test "$cross_compiling" = yes; then
12904   cat > conftest.$ac_ext <<EOF
12905 #line 12906 "configure"
12906 #include "confdefs.h"
12907 /* pthread test headers */
12908 #include <pthread.h>
12909 #ifndef NULL
12910 #define NULL (void*)0
12911 #endif
12912
12913 static void *task(p)
12914         void *p;
12915 {
12916         return (void *) (p == NULL);
12917 }
12918
12919 int main() {
12920
12921         /* pthread test function */
12922         pthread_t t;
12923         int status;
12924         int detach = 1;
12925
12926 #ifdef HAVE_PTHREADS_FINAL
12927         /* Final pthreads */
12928         pthread_attr_t attr;
12929
12930         status = pthread_attr_init(&attr);
12931         if( status ) return status;
12932
12933 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12934         if( !detach ) {
12935 #if defined( PTHREAD_CREATE_JOINABLE )
12936                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12937 #else
12938                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12939 #endif
12940
12941 #ifdef PTHREAD_CREATE_DETACHED
12942         } else {
12943                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12944 #endif
12945         }
12946         if( status ) return status;
12947 #endif
12948
12949         status = pthread_create( &t, &attr, task, NULL );
12950         if( status ) return status;
12951
12952 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12953         if( detach ) {
12954                 /* give thread a chance to complete */
12955                 /* it should remain joinable and hence detachable */
12956                 sleep( 1 );
12957
12958                 status = pthread_detach( t );
12959                 if( status ) return status;
12960         }
12961 #endif
12962
12963 #else
12964         /* Draft 4 pthreads */
12965         status = pthread_create( &t, pthread_attr_default, task, NULL );
12966         if( status ) return status;
12967
12968         if( detach ) {
12969                 /* give thread a chance to complete */
12970                 /* it should remain joinable and hence detachable */
12971                 sleep( 1 );
12972
12973                 status = pthread_detach( &t );
12974                 if( status ) return status;
12975         }
12976 #endif
12977
12978 #ifdef HAVE_LINUX_THREADS
12979         pthread_kill_other_threads_np();
12980 #endif
12981
12982         return 0;
12983
12984 ; return 0; }
12985 EOF
12986 if { (eval echo configure:12987: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12987   rm -rf conftest*
12988   ol_cv_pthread_thread=yes
12989 else
12990   echo "configure: failed program was:" >&5
12991   cat conftest.$ac_ext >&5
12992   rm -rf conftest*
12993   ol_cv_pthread_thread=no
12994 fi
12995 rm -f conftest*
12996 else
12997   cat > conftest.$ac_ext <<EOF
12998 #line 12999 "configure"
12999 #include "confdefs.h"
13000 /* pthread test headers */
13001 #include <pthread.h>
13002 #ifndef NULL
13003 #define NULL (void*)0
13004 #endif
13005
13006 static void *task(p)
13007         void *p;
13008 {
13009         return (void *) (p == NULL);
13010 }
13011
13012
13013 int main(argc, argv)
13014         int argc;
13015         char **argv;
13016 {
13017
13018         /* pthread test function */
13019         pthread_t t;
13020         int status;
13021         int detach = 1;
13022
13023 #ifdef HAVE_PTHREADS_FINAL
13024         /* Final pthreads */
13025         pthread_attr_t attr;
13026
13027         status = pthread_attr_init(&attr);
13028         if( status ) return status;
13029
13030 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13031         if( !detach ) {
13032 #if defined( PTHREAD_CREATE_JOINABLE )
13033                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13034 #else
13035                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13036 #endif
13037
13038 #ifdef PTHREAD_CREATE_DETACHED
13039         } else {
13040                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13041 #endif
13042         }
13043         if( status ) return status;
13044 #endif
13045
13046         status = pthread_create( &t, &attr, task, NULL );
13047         if( status ) return status;
13048
13049 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13050         if( detach ) {
13051                 /* give thread a chance to complete */
13052                 /* it should remain joinable and hence detachable */
13053                 sleep( 1 );
13054
13055                 status = pthread_detach( t );
13056                 if( status ) return status;
13057         }
13058 #endif
13059
13060 #else
13061         /* Draft 4 pthreads */
13062         status = pthread_create( &t, pthread_attr_default, task, NULL );
13063         if( status ) return status;
13064
13065         if( detach ) {
13066                 /* give thread a chance to complete */
13067                 /* it should remain joinable and hence detachable */
13068                 sleep( 1 );
13069
13070                 status = pthread_detach( &t );
13071                 if( status ) return status;
13072         }
13073 #endif
13074
13075 #ifdef HAVE_LINUX_THREADS
13076         pthread_kill_other_threads_np();
13077 #endif
13078
13079         return 0;
13080
13081 }
13082
13083 EOF
13084 if { (eval echo configure:13085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13085 then
13086   ol_cv_pthread_thread=yes
13087 else
13088   echo "configure: failed program was:" >&5
13089   cat conftest.$ac_ext >&5
13090   rm -fr conftest*
13091   ol_cv_pthread_thread=no
13092 fi
13093 rm -fr conftest*
13094 fi
13095
13096
13097                 # restore the LIBS
13098                 LIBS="$ol_LIBS"
13099         
13100 fi
13101
13102 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13103
13104         if test $ol_cv_pthread_thread = yes ; then
13105                 ol_link_pthreads="-thread"
13106                 ol_link_threads=posix
13107         fi
13108 fi
13109
13110
13111                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13112 if test "$ol_link_threads" = no ; then
13113         # try -lpthread -lmach -lexc -lc_r
13114         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13115 echo "configure:13116: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13116 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13117   echo $ac_n "(cached) $ac_c" 1>&6
13118 else
13119   
13120                 # save the flags
13121                 ol_LIBS="$LIBS"
13122                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13123
13124                 if test "$cross_compiling" = yes; then
13125   cat > conftest.$ac_ext <<EOF
13126 #line 13127 "configure"
13127 #include "confdefs.h"
13128 /* pthread test headers */
13129 #include <pthread.h>
13130 #ifndef NULL
13131 #define NULL (void*)0
13132 #endif
13133
13134 static void *task(p)
13135         void *p;
13136 {
13137         return (void *) (p == NULL);
13138 }
13139
13140 int main() {
13141
13142         /* pthread test function */
13143         pthread_t t;
13144         int status;
13145         int detach = 1;
13146
13147 #ifdef HAVE_PTHREADS_FINAL
13148         /* Final pthreads */
13149         pthread_attr_t attr;
13150
13151         status = pthread_attr_init(&attr);
13152         if( status ) return status;
13153
13154 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13155         if( !detach ) {
13156 #if defined( PTHREAD_CREATE_JOINABLE )
13157                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13158 #else
13159                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13160 #endif
13161
13162 #ifdef PTHREAD_CREATE_DETACHED
13163         } else {
13164                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13165 #endif
13166         }
13167         if( status ) return status;
13168 #endif
13169
13170         status = pthread_create( &t, &attr, task, NULL );
13171         if( status ) return status;
13172
13173 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13174         if( detach ) {
13175                 /* give thread a chance to complete */
13176                 /* it should remain joinable and hence detachable */
13177                 sleep( 1 );
13178
13179                 status = pthread_detach( t );
13180                 if( status ) return status;
13181         }
13182 #endif
13183
13184 #else
13185         /* Draft 4 pthreads */
13186         status = pthread_create( &t, pthread_attr_default, task, NULL );
13187         if( status ) return status;
13188
13189         if( detach ) {
13190                 /* give thread a chance to complete */
13191                 /* it should remain joinable and hence detachable */
13192                 sleep( 1 );
13193
13194                 status = pthread_detach( &t );
13195                 if( status ) return status;
13196         }
13197 #endif
13198
13199 #ifdef HAVE_LINUX_THREADS
13200         pthread_kill_other_threads_np();
13201 #endif
13202
13203         return 0;
13204
13205 ; return 0; }
13206 EOF
13207 if { (eval echo configure:13208: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13208   rm -rf conftest*
13209   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13210 else
13211   echo "configure: failed program was:" >&5
13212   cat conftest.$ac_ext >&5
13213   rm -rf conftest*
13214   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13215 fi
13216 rm -f conftest*
13217 else
13218   cat > conftest.$ac_ext <<EOF
13219 #line 13220 "configure"
13220 #include "confdefs.h"
13221 /* pthread test headers */
13222 #include <pthread.h>
13223 #ifndef NULL
13224 #define NULL (void*)0
13225 #endif
13226
13227 static void *task(p)
13228         void *p;
13229 {
13230         return (void *) (p == NULL);
13231 }
13232
13233
13234 int main(argc, argv)
13235         int argc;
13236         char **argv;
13237 {
13238
13239         /* pthread test function */
13240         pthread_t t;
13241         int status;
13242         int detach = 1;
13243
13244 #ifdef HAVE_PTHREADS_FINAL
13245         /* Final pthreads */
13246         pthread_attr_t attr;
13247
13248         status = pthread_attr_init(&attr);
13249         if( status ) return status;
13250
13251 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13252         if( !detach ) {
13253 #if defined( PTHREAD_CREATE_JOINABLE )
13254                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13255 #else
13256                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13257 #endif
13258
13259 #ifdef PTHREAD_CREATE_DETACHED
13260         } else {
13261                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13262 #endif
13263         }
13264         if( status ) return status;
13265 #endif
13266
13267         status = pthread_create( &t, &attr, task, NULL );
13268         if( status ) return status;
13269
13270 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13271         if( detach ) {
13272                 /* give thread a chance to complete */
13273                 /* it should remain joinable and hence detachable */
13274                 sleep( 1 );
13275
13276                 status = pthread_detach( t );
13277                 if( status ) return status;
13278         }
13279 #endif
13280
13281 #else
13282         /* Draft 4 pthreads */
13283         status = pthread_create( &t, pthread_attr_default, task, NULL );
13284         if( status ) return status;
13285
13286         if( detach ) {
13287                 /* give thread a chance to complete */
13288                 /* it should remain joinable and hence detachable */
13289                 sleep( 1 );
13290
13291                 status = pthread_detach( &t );
13292                 if( status ) return status;
13293         }
13294 #endif
13295
13296 #ifdef HAVE_LINUX_THREADS
13297         pthread_kill_other_threads_np();
13298 #endif
13299
13300         return 0;
13301
13302 }
13303
13304 EOF
13305 if { (eval echo configure:13306: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13306 then
13307   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13308 else
13309   echo "configure: failed program was:" >&5
13310   cat conftest.$ac_ext >&5
13311   rm -fr conftest*
13312   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13313 fi
13314 rm -fr conftest*
13315 fi
13316
13317
13318                 # restore the LIBS
13319                 LIBS="$ol_LIBS"
13320         
13321 fi
13322
13323 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13324
13325         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13326                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13327                 ol_link_threads=posix
13328         fi
13329 fi
13330
13331                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13332 if test "$ol_link_threads" = no ; then
13333         # try -lpthread -lmach -lexc
13334         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13335 echo "configure:13336: checking for pthread link with -lpthread -lmach -lexc" >&5
13336 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13337   echo $ac_n "(cached) $ac_c" 1>&6
13338 else
13339   
13340                 # save the flags
13341                 ol_LIBS="$LIBS"
13342                 LIBS="-lpthread -lmach -lexc $LIBS"
13343
13344                 if test "$cross_compiling" = yes; then
13345   cat > conftest.$ac_ext <<EOF
13346 #line 13347 "configure"
13347 #include "confdefs.h"
13348 /* pthread test headers */
13349 #include <pthread.h>
13350 #ifndef NULL
13351 #define NULL (void*)0
13352 #endif
13353
13354 static void *task(p)
13355         void *p;
13356 {
13357         return (void *) (p == NULL);
13358 }
13359
13360 int main() {
13361
13362         /* pthread test function */
13363         pthread_t t;
13364         int status;
13365         int detach = 1;
13366
13367 #ifdef HAVE_PTHREADS_FINAL
13368         /* Final pthreads */
13369         pthread_attr_t attr;
13370
13371         status = pthread_attr_init(&attr);
13372         if( status ) return status;
13373
13374 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13375         if( !detach ) {
13376 #if defined( PTHREAD_CREATE_JOINABLE )
13377                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13378 #else
13379                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13380 #endif
13381
13382 #ifdef PTHREAD_CREATE_DETACHED
13383         } else {
13384                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13385 #endif
13386         }
13387         if( status ) return status;
13388 #endif
13389
13390         status = pthread_create( &t, &attr, task, NULL );
13391         if( status ) return status;
13392
13393 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13394         if( detach ) {
13395                 /* give thread a chance to complete */
13396                 /* it should remain joinable and hence detachable */
13397                 sleep( 1 );
13398
13399                 status = pthread_detach( t );
13400                 if( status ) return status;
13401         }
13402 #endif
13403
13404 #else
13405         /* Draft 4 pthreads */
13406         status = pthread_create( &t, pthread_attr_default, task, NULL );
13407         if( status ) return status;
13408
13409         if( detach ) {
13410                 /* give thread a chance to complete */
13411                 /* it should remain joinable and hence detachable */
13412                 sleep( 1 );
13413
13414                 status = pthread_detach( &t );
13415                 if( status ) return status;
13416         }
13417 #endif
13418
13419 #ifdef HAVE_LINUX_THREADS
13420         pthread_kill_other_threads_np();
13421 #endif
13422
13423         return 0;
13424
13425 ; return 0; }
13426 EOF
13427 if { (eval echo configure:13428: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13428   rm -rf conftest*
13429   ol_cv_pthread_lpthread_lmach_lexc=yes
13430 else
13431   echo "configure: failed program was:" >&5
13432   cat conftest.$ac_ext >&5
13433   rm -rf conftest*
13434   ol_cv_pthread_lpthread_lmach_lexc=no
13435 fi
13436 rm -f conftest*
13437 else
13438   cat > conftest.$ac_ext <<EOF
13439 #line 13440 "configure"
13440 #include "confdefs.h"
13441 /* pthread test headers */
13442 #include <pthread.h>
13443 #ifndef NULL
13444 #define NULL (void*)0
13445 #endif
13446
13447 static void *task(p)
13448         void *p;
13449 {
13450         return (void *) (p == NULL);
13451 }
13452
13453
13454 int main(argc, argv)
13455         int argc;
13456         char **argv;
13457 {
13458
13459         /* pthread test function */
13460         pthread_t t;
13461         int status;
13462         int detach = 1;
13463
13464 #ifdef HAVE_PTHREADS_FINAL
13465         /* Final pthreads */
13466         pthread_attr_t attr;
13467
13468         status = pthread_attr_init(&attr);
13469         if( status ) return status;
13470
13471 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13472         if( !detach ) {
13473 #if defined( PTHREAD_CREATE_JOINABLE )
13474                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13475 #else
13476                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13477 #endif
13478
13479 #ifdef PTHREAD_CREATE_DETACHED
13480         } else {
13481                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13482 #endif
13483         }
13484         if( status ) return status;
13485 #endif
13486
13487         status = pthread_create( &t, &attr, task, NULL );
13488         if( status ) return status;
13489
13490 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13491         if( detach ) {
13492                 /* give thread a chance to complete */
13493                 /* it should remain joinable and hence detachable */
13494                 sleep( 1 );
13495
13496                 status = pthread_detach( t );
13497                 if( status ) return status;
13498         }
13499 #endif
13500
13501 #else
13502         /* Draft 4 pthreads */
13503         status = pthread_create( &t, pthread_attr_default, task, NULL );
13504         if( status ) return status;
13505
13506         if( detach ) {
13507                 /* give thread a chance to complete */
13508                 /* it should remain joinable and hence detachable */
13509                 sleep( 1 );
13510
13511                 status = pthread_detach( &t );
13512                 if( status ) return status;
13513         }
13514 #endif
13515
13516 #ifdef HAVE_LINUX_THREADS
13517         pthread_kill_other_threads_np();
13518 #endif
13519
13520         return 0;
13521
13522 }
13523
13524 EOF
13525 if { (eval echo configure:13526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13526 then
13527   ol_cv_pthread_lpthread_lmach_lexc=yes
13528 else
13529   echo "configure: failed program was:" >&5
13530   cat conftest.$ac_ext >&5
13531   rm -fr conftest*
13532   ol_cv_pthread_lpthread_lmach_lexc=no
13533 fi
13534 rm -fr conftest*
13535 fi
13536
13537
13538                 # restore the LIBS
13539                 LIBS="$ol_LIBS"
13540         
13541 fi
13542
13543 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13544
13545         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13546                 ol_link_pthreads="-lpthread -lmach -lexc"
13547                 ol_link_threads=posix
13548         fi
13549 fi
13550
13551
13552                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13553 if test "$ol_link_threads" = no ; then
13554         # try -lpthread -Wl,-woff,85
13555         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13556 echo "configure:13557: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13557 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13558   echo $ac_n "(cached) $ac_c" 1>&6
13559 else
13560   
13561                 # save the flags
13562                 ol_LIBS="$LIBS"
13563                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13564
13565                 if test "$cross_compiling" = yes; then
13566   cat > conftest.$ac_ext <<EOF
13567 #line 13568 "configure"
13568 #include "confdefs.h"
13569 /* pthread test headers */
13570 #include <pthread.h>
13571 #ifndef NULL
13572 #define NULL (void*)0
13573 #endif
13574
13575 static void *task(p)
13576         void *p;
13577 {
13578         return (void *) (p == NULL);
13579 }
13580
13581 int main() {
13582
13583         /* pthread test function */
13584         pthread_t t;
13585         int status;
13586         int detach = 1;
13587
13588 #ifdef HAVE_PTHREADS_FINAL
13589         /* Final pthreads */
13590         pthread_attr_t attr;
13591
13592         status = pthread_attr_init(&attr);
13593         if( status ) return status;
13594
13595 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13596         if( !detach ) {
13597 #if defined( PTHREAD_CREATE_JOINABLE )
13598                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13599 #else
13600                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13601 #endif
13602
13603 #ifdef PTHREAD_CREATE_DETACHED
13604         } else {
13605                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13606 #endif
13607         }
13608         if( status ) return status;
13609 #endif
13610
13611         status = pthread_create( &t, &attr, task, NULL );
13612         if( status ) return status;
13613
13614 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13615         if( detach ) {
13616                 /* give thread a chance to complete */
13617                 /* it should remain joinable and hence detachable */
13618                 sleep( 1 );
13619
13620                 status = pthread_detach( t );
13621                 if( status ) return status;
13622         }
13623 #endif
13624
13625 #else
13626         /* Draft 4 pthreads */
13627         status = pthread_create( &t, pthread_attr_default, task, NULL );
13628         if( status ) return status;
13629
13630         if( detach ) {
13631                 /* give thread a chance to complete */
13632                 /* it should remain joinable and hence detachable */
13633                 sleep( 1 );
13634
13635                 status = pthread_detach( &t );
13636                 if( status ) return status;
13637         }
13638 #endif
13639
13640 #ifdef HAVE_LINUX_THREADS
13641         pthread_kill_other_threads_np();
13642 #endif
13643
13644         return 0;
13645
13646 ; return 0; }
13647 EOF
13648 if { (eval echo configure:13649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13649   rm -rf conftest*
13650   ol_cv_pthread_lib_lpthread_woff=yes
13651 else
13652   echo "configure: failed program was:" >&5
13653   cat conftest.$ac_ext >&5
13654   rm -rf conftest*
13655   ol_cv_pthread_lib_lpthread_woff=no
13656 fi
13657 rm -f conftest*
13658 else
13659   cat > conftest.$ac_ext <<EOF
13660 #line 13661 "configure"
13661 #include "confdefs.h"
13662 /* pthread test headers */
13663 #include <pthread.h>
13664 #ifndef NULL
13665 #define NULL (void*)0
13666 #endif
13667
13668 static void *task(p)
13669         void *p;
13670 {
13671         return (void *) (p == NULL);
13672 }
13673
13674
13675 int main(argc, argv)
13676         int argc;
13677         char **argv;
13678 {
13679
13680         /* pthread test function */
13681         pthread_t t;
13682         int status;
13683         int detach = 1;
13684
13685 #ifdef HAVE_PTHREADS_FINAL
13686         /* Final pthreads */
13687         pthread_attr_t attr;
13688
13689         status = pthread_attr_init(&attr);
13690         if( status ) return status;
13691
13692 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13693         if( !detach ) {
13694 #if defined( PTHREAD_CREATE_JOINABLE )
13695                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13696 #else
13697                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13698 #endif
13699
13700 #ifdef PTHREAD_CREATE_DETACHED
13701         } else {
13702                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13703 #endif
13704         }
13705         if( status ) return status;
13706 #endif
13707
13708         status = pthread_create( &t, &attr, task, NULL );
13709         if( status ) return status;
13710
13711 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13712         if( detach ) {
13713                 /* give thread a chance to complete */
13714                 /* it should remain joinable and hence detachable */
13715                 sleep( 1 );
13716
13717                 status = pthread_detach( t );
13718                 if( status ) return status;
13719         }
13720 #endif
13721
13722 #else
13723         /* Draft 4 pthreads */
13724         status = pthread_create( &t, pthread_attr_default, task, NULL );
13725         if( status ) return status;
13726
13727         if( detach ) {
13728                 /* give thread a chance to complete */
13729                 /* it should remain joinable and hence detachable */
13730                 sleep( 1 );
13731
13732                 status = pthread_detach( &t );
13733                 if( status ) return status;
13734         }
13735 #endif
13736
13737 #ifdef HAVE_LINUX_THREADS
13738         pthread_kill_other_threads_np();
13739 #endif
13740
13741         return 0;
13742
13743 }
13744
13745 EOF
13746 if { (eval echo configure:13747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13747 then
13748   ol_cv_pthread_lib_lpthread_woff=yes
13749 else
13750   echo "configure: failed program was:" >&5
13751   cat conftest.$ac_ext >&5
13752   rm -fr conftest*
13753   ol_cv_pthread_lib_lpthread_woff=no
13754 fi
13755 rm -fr conftest*
13756 fi
13757
13758
13759                 # restore the LIBS
13760                 LIBS="$ol_LIBS"
13761         
13762 fi
13763
13764 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13765
13766         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13767                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13768                 ol_link_threads=posix
13769         fi
13770 fi
13771
13772
13773                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13774 if test "$ol_link_threads" = no ; then
13775         # try -lpthread
13776         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13777 echo "configure:13778: checking for pthread link with -lpthread" >&5
13778 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13779   echo $ac_n "(cached) $ac_c" 1>&6
13780 else
13781   
13782                 # save the flags
13783                 ol_LIBS="$LIBS"
13784                 LIBS="-lpthread $LIBS"
13785
13786                 if test "$cross_compiling" = yes; then
13787   cat > conftest.$ac_ext <<EOF
13788 #line 13789 "configure"
13789 #include "confdefs.h"
13790 /* pthread test headers */
13791 #include <pthread.h>
13792 #ifndef NULL
13793 #define NULL (void*)0
13794 #endif
13795
13796 static void *task(p)
13797         void *p;
13798 {
13799         return (void *) (p == NULL);
13800 }
13801
13802 int main() {
13803
13804         /* pthread test function */
13805         pthread_t t;
13806         int status;
13807         int detach = 1;
13808
13809 #ifdef HAVE_PTHREADS_FINAL
13810         /* Final pthreads */
13811         pthread_attr_t attr;
13812
13813         status = pthread_attr_init(&attr);
13814         if( status ) return status;
13815
13816 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13817         if( !detach ) {
13818 #if defined( PTHREAD_CREATE_JOINABLE )
13819                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13820 #else
13821                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13822 #endif
13823
13824 #ifdef PTHREAD_CREATE_DETACHED
13825         } else {
13826                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13827 #endif
13828         }
13829         if( status ) return status;
13830 #endif
13831
13832         status = pthread_create( &t, &attr, task, NULL );
13833         if( status ) return status;
13834
13835 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13836         if( detach ) {
13837                 /* give thread a chance to complete */
13838                 /* it should remain joinable and hence detachable */
13839                 sleep( 1 );
13840
13841                 status = pthread_detach( t );
13842                 if( status ) return status;
13843         }
13844 #endif
13845
13846 #else
13847         /* Draft 4 pthreads */
13848         status = pthread_create( &t, pthread_attr_default, task, NULL );
13849         if( status ) return status;
13850
13851         if( detach ) {
13852                 /* give thread a chance to complete */
13853                 /* it should remain joinable and hence detachable */
13854                 sleep( 1 );
13855
13856                 status = pthread_detach( &t );
13857                 if( status ) return status;
13858         }
13859 #endif
13860
13861 #ifdef HAVE_LINUX_THREADS
13862         pthread_kill_other_threads_np();
13863 #endif
13864
13865         return 0;
13866
13867 ; return 0; }
13868 EOF
13869 if { (eval echo configure:13870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13870   rm -rf conftest*
13871   ol_cv_pthread_lpthread=yes
13872 else
13873   echo "configure: failed program was:" >&5
13874   cat conftest.$ac_ext >&5
13875   rm -rf conftest*
13876   ol_cv_pthread_lpthread=no
13877 fi
13878 rm -f conftest*
13879 else
13880   cat > conftest.$ac_ext <<EOF
13881 #line 13882 "configure"
13882 #include "confdefs.h"
13883 /* pthread test headers */
13884 #include <pthread.h>
13885 #ifndef NULL
13886 #define NULL (void*)0
13887 #endif
13888
13889 static void *task(p)
13890         void *p;
13891 {
13892         return (void *) (p == NULL);
13893 }
13894
13895
13896 int main(argc, argv)
13897         int argc;
13898         char **argv;
13899 {
13900
13901         /* pthread test function */
13902         pthread_t t;
13903         int status;
13904         int detach = 1;
13905
13906 #ifdef HAVE_PTHREADS_FINAL
13907         /* Final pthreads */
13908         pthread_attr_t attr;
13909
13910         status = pthread_attr_init(&attr);
13911         if( status ) return status;
13912
13913 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13914         if( !detach ) {
13915 #if defined( PTHREAD_CREATE_JOINABLE )
13916                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13917 #else
13918                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13919 #endif
13920
13921 #ifdef PTHREAD_CREATE_DETACHED
13922         } else {
13923                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13924 #endif
13925         }
13926         if( status ) return status;
13927 #endif
13928
13929         status = pthread_create( &t, &attr, task, NULL );
13930         if( status ) return status;
13931
13932 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13933         if( detach ) {
13934                 /* give thread a chance to complete */
13935                 /* it should remain joinable and hence detachable */
13936                 sleep( 1 );
13937
13938                 status = pthread_detach( t );
13939                 if( status ) return status;
13940         }
13941 #endif
13942
13943 #else
13944         /* Draft 4 pthreads */
13945         status = pthread_create( &t, pthread_attr_default, task, NULL );
13946         if( status ) return status;
13947
13948         if( detach ) {
13949                 /* give thread a chance to complete */
13950                 /* it should remain joinable and hence detachable */
13951                 sleep( 1 );
13952
13953                 status = pthread_detach( &t );
13954                 if( status ) return status;
13955         }
13956 #endif
13957
13958 #ifdef HAVE_LINUX_THREADS
13959         pthread_kill_other_threads_np();
13960 #endif
13961
13962         return 0;
13963
13964 }
13965
13966 EOF
13967 if { (eval echo configure:13968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13968 then
13969   ol_cv_pthread_lpthread=yes
13970 else
13971   echo "configure: failed program was:" >&5
13972   cat conftest.$ac_ext >&5
13973   rm -fr conftest*
13974   ol_cv_pthread_lpthread=no
13975 fi
13976 rm -fr conftest*
13977 fi
13978
13979
13980                 # restore the LIBS
13981                 LIBS="$ol_LIBS"
13982         
13983 fi
13984
13985 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13986
13987         if test $ol_cv_pthread_lpthread = yes ; then
13988                 ol_link_pthreads="-lpthread"
13989                 ol_link_threads=posix
13990         fi
13991 fi
13992
13993                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13994 if test "$ol_link_threads" = no ; then
13995         # try -lc_r
13996         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13997 echo "configure:13998: checking for pthread link with -lc_r" >&5
13998 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13999   echo $ac_n "(cached) $ac_c" 1>&6
14000 else
14001   
14002                 # save the flags
14003                 ol_LIBS="$LIBS"
14004                 LIBS="-lc_r $LIBS"
14005
14006                 if test "$cross_compiling" = yes; then
14007   cat > conftest.$ac_ext <<EOF
14008 #line 14009 "configure"
14009 #include "confdefs.h"
14010 /* pthread test headers */
14011 #include <pthread.h>
14012 #ifndef NULL
14013 #define NULL (void*)0
14014 #endif
14015
14016 static void *task(p)
14017         void *p;
14018 {
14019         return (void *) (p == NULL);
14020 }
14021
14022 int main() {
14023
14024         /* pthread test function */
14025         pthread_t t;
14026         int status;
14027         int detach = 1;
14028
14029 #ifdef HAVE_PTHREADS_FINAL
14030         /* Final pthreads */
14031         pthread_attr_t attr;
14032
14033         status = pthread_attr_init(&attr);
14034         if( status ) return status;
14035
14036 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14037         if( !detach ) {
14038 #if defined( PTHREAD_CREATE_JOINABLE )
14039                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14040 #else
14041                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14042 #endif
14043
14044 #ifdef PTHREAD_CREATE_DETACHED
14045         } else {
14046                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14047 #endif
14048         }
14049         if( status ) return status;
14050 #endif
14051
14052         status = pthread_create( &t, &attr, task, NULL );
14053         if( status ) return status;
14054
14055 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14056         if( detach ) {
14057                 /* give thread a chance to complete */
14058                 /* it should remain joinable and hence detachable */
14059                 sleep( 1 );
14060
14061                 status = pthread_detach( t );
14062                 if( status ) return status;
14063         }
14064 #endif
14065
14066 #else
14067         /* Draft 4 pthreads */
14068         status = pthread_create( &t, pthread_attr_default, task, NULL );
14069         if( status ) return status;
14070
14071         if( detach ) {
14072                 /* give thread a chance to complete */
14073                 /* it should remain joinable and hence detachable */
14074                 sleep( 1 );
14075
14076                 status = pthread_detach( &t );
14077                 if( status ) return status;
14078         }
14079 #endif
14080
14081 #ifdef HAVE_LINUX_THREADS
14082         pthread_kill_other_threads_np();
14083 #endif
14084
14085         return 0;
14086
14087 ; return 0; }
14088 EOF
14089 if { (eval echo configure:14090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14090   rm -rf conftest*
14091   ol_cv_pthread_lc_r=yes
14092 else
14093   echo "configure: failed program was:" >&5
14094   cat conftest.$ac_ext >&5
14095   rm -rf conftest*
14096   ol_cv_pthread_lc_r=no
14097 fi
14098 rm -f conftest*
14099 else
14100   cat > conftest.$ac_ext <<EOF
14101 #line 14102 "configure"
14102 #include "confdefs.h"
14103 /* pthread test headers */
14104 #include <pthread.h>
14105 #ifndef NULL
14106 #define NULL (void*)0
14107 #endif
14108
14109 static void *task(p)
14110         void *p;
14111 {
14112         return (void *) (p == NULL);
14113 }
14114
14115
14116 int main(argc, argv)
14117         int argc;
14118         char **argv;
14119 {
14120
14121         /* pthread test function */
14122         pthread_t t;
14123         int status;
14124         int detach = 1;
14125
14126 #ifdef HAVE_PTHREADS_FINAL
14127         /* Final pthreads */
14128         pthread_attr_t attr;
14129
14130         status = pthread_attr_init(&attr);
14131         if( status ) return status;
14132
14133 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14134         if( !detach ) {
14135 #if defined( PTHREAD_CREATE_JOINABLE )
14136                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14137 #else
14138                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14139 #endif
14140
14141 #ifdef PTHREAD_CREATE_DETACHED
14142         } else {
14143                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14144 #endif
14145         }
14146         if( status ) return status;
14147 #endif
14148
14149         status = pthread_create( &t, &attr, task, NULL );
14150         if( status ) return status;
14151
14152 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14153         if( detach ) {
14154                 /* give thread a chance to complete */
14155                 /* it should remain joinable and hence detachable */
14156                 sleep( 1 );
14157
14158                 status = pthread_detach( t );
14159                 if( status ) return status;
14160         }
14161 #endif
14162
14163 #else
14164         /* Draft 4 pthreads */
14165         status = pthread_create( &t, pthread_attr_default, task, NULL );
14166         if( status ) return status;
14167
14168         if( detach ) {
14169                 /* give thread a chance to complete */
14170                 /* it should remain joinable and hence detachable */
14171                 sleep( 1 );
14172
14173                 status = pthread_detach( &t );
14174                 if( status ) return status;
14175         }
14176 #endif
14177
14178 #ifdef HAVE_LINUX_THREADS
14179         pthread_kill_other_threads_np();
14180 #endif
14181
14182         return 0;
14183
14184 }
14185
14186 EOF
14187 if { (eval echo configure:14188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14188 then
14189   ol_cv_pthread_lc_r=yes
14190 else
14191   echo "configure: failed program was:" >&5
14192   cat conftest.$ac_ext >&5
14193   rm -fr conftest*
14194   ol_cv_pthread_lc_r=no
14195 fi
14196 rm -fr conftest*
14197 fi
14198
14199
14200                 # restore the LIBS
14201                 LIBS="$ol_LIBS"
14202         
14203 fi
14204
14205 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14206
14207         if test $ol_cv_pthread_lc_r = yes ; then
14208                 ol_link_pthreads="-lc_r"
14209                 ol_link_threads=posix
14210         fi
14211 fi
14212
14213
14214                 # Pthread try link: -threads (ol_cv_pthread_threads)
14215 if test "$ol_link_threads" = no ; then
14216         # try -threads
14217         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14218 echo "configure:14219: checking for pthread link with -threads" >&5
14219 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14220   echo $ac_n "(cached) $ac_c" 1>&6
14221 else
14222   
14223                 # save the flags
14224                 ol_LIBS="$LIBS"
14225                 LIBS="-threads $LIBS"
14226
14227                 if test "$cross_compiling" = yes; then
14228   cat > conftest.$ac_ext <<EOF
14229 #line 14230 "configure"
14230 #include "confdefs.h"
14231 /* pthread test headers */
14232 #include <pthread.h>
14233 #ifndef NULL
14234 #define NULL (void*)0
14235 #endif
14236
14237 static void *task(p)
14238         void *p;
14239 {
14240         return (void *) (p == NULL);
14241 }
14242
14243 int main() {
14244
14245         /* pthread test function */
14246         pthread_t t;
14247         int status;
14248         int detach = 1;
14249
14250 #ifdef HAVE_PTHREADS_FINAL
14251         /* Final pthreads */
14252         pthread_attr_t attr;
14253
14254         status = pthread_attr_init(&attr);
14255         if( status ) return status;
14256
14257 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14258         if( !detach ) {
14259 #if defined( PTHREAD_CREATE_JOINABLE )
14260                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14261 #else
14262                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14263 #endif
14264
14265 #ifdef PTHREAD_CREATE_DETACHED
14266         } else {
14267                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14268 #endif
14269         }
14270         if( status ) return status;
14271 #endif
14272
14273         status = pthread_create( &t, &attr, task, NULL );
14274         if( status ) return status;
14275
14276 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14277         if( detach ) {
14278                 /* give thread a chance to complete */
14279                 /* it should remain joinable and hence detachable */
14280                 sleep( 1 );
14281
14282                 status = pthread_detach( t );
14283                 if( status ) return status;
14284         }
14285 #endif
14286
14287 #else
14288         /* Draft 4 pthreads */
14289         status = pthread_create( &t, pthread_attr_default, task, NULL );
14290         if( status ) return status;
14291
14292         if( detach ) {
14293                 /* give thread a chance to complete */
14294                 /* it should remain joinable and hence detachable */
14295                 sleep( 1 );
14296
14297                 status = pthread_detach( &t );
14298                 if( status ) return status;
14299         }
14300 #endif
14301
14302 #ifdef HAVE_LINUX_THREADS
14303         pthread_kill_other_threads_np();
14304 #endif
14305
14306         return 0;
14307
14308 ; return 0; }
14309 EOF
14310 if { (eval echo configure:14311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14311   rm -rf conftest*
14312   ol_cv_pthread_threads=yes
14313 else
14314   echo "configure: failed program was:" >&5
14315   cat conftest.$ac_ext >&5
14316   rm -rf conftest*
14317   ol_cv_pthread_threads=no
14318 fi
14319 rm -f conftest*
14320 else
14321   cat > conftest.$ac_ext <<EOF
14322 #line 14323 "configure"
14323 #include "confdefs.h"
14324 /* pthread test headers */
14325 #include <pthread.h>
14326 #ifndef NULL
14327 #define NULL (void*)0
14328 #endif
14329
14330 static void *task(p)
14331         void *p;
14332 {
14333         return (void *) (p == NULL);
14334 }
14335
14336
14337 int main(argc, argv)
14338         int argc;
14339         char **argv;
14340 {
14341
14342         /* pthread test function */
14343         pthread_t t;
14344         int status;
14345         int detach = 1;
14346
14347 #ifdef HAVE_PTHREADS_FINAL
14348         /* Final pthreads */
14349         pthread_attr_t attr;
14350
14351         status = pthread_attr_init(&attr);
14352         if( status ) return status;
14353
14354 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14355         if( !detach ) {
14356 #if defined( PTHREAD_CREATE_JOINABLE )
14357                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14358 #else
14359                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14360 #endif
14361
14362 #ifdef PTHREAD_CREATE_DETACHED
14363         } else {
14364                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14365 #endif
14366         }
14367         if( status ) return status;
14368 #endif
14369
14370         status = pthread_create( &t, &attr, task, NULL );
14371         if( status ) return status;
14372
14373 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14374         if( detach ) {
14375                 /* give thread a chance to complete */
14376                 /* it should remain joinable and hence detachable */
14377                 sleep( 1 );
14378
14379                 status = pthread_detach( t );
14380                 if( status ) return status;
14381         }
14382 #endif
14383
14384 #else
14385         /* Draft 4 pthreads */
14386         status = pthread_create( &t, pthread_attr_default, task, NULL );
14387         if( status ) return status;
14388
14389         if( detach ) {
14390                 /* give thread a chance to complete */
14391                 /* it should remain joinable and hence detachable */
14392                 sleep( 1 );
14393
14394                 status = pthread_detach( &t );
14395                 if( status ) return status;
14396         }
14397 #endif
14398
14399 #ifdef HAVE_LINUX_THREADS
14400         pthread_kill_other_threads_np();
14401 #endif
14402
14403         return 0;
14404
14405 }
14406
14407 EOF
14408 if { (eval echo configure:14409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14409 then
14410   ol_cv_pthread_threads=yes
14411 else
14412   echo "configure: failed program was:" >&5
14413   cat conftest.$ac_ext >&5
14414   rm -fr conftest*
14415   ol_cv_pthread_threads=no
14416 fi
14417 rm -fr conftest*
14418 fi
14419
14420
14421                 # restore the LIBS
14422                 LIBS="$ol_LIBS"
14423         
14424 fi
14425
14426 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14427
14428         if test $ol_cv_pthread_threads = yes ; then
14429                 ol_link_pthreads="-threads"
14430                 ol_link_threads=posix
14431         fi
14432 fi
14433
14434
14435                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14436 if test "$ol_link_threads" = no ; then
14437         # try -lpthreads -lmach -lexc -lc_r
14438         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14439 echo "configure:14440: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14440 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14441   echo $ac_n "(cached) $ac_c" 1>&6
14442 else
14443   
14444                 # save the flags
14445                 ol_LIBS="$LIBS"
14446                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14447
14448                 if test "$cross_compiling" = yes; then
14449   cat > conftest.$ac_ext <<EOF
14450 #line 14451 "configure"
14451 #include "confdefs.h"
14452 /* pthread test headers */
14453 #include <pthread.h>
14454 #ifndef NULL
14455 #define NULL (void*)0
14456 #endif
14457
14458 static void *task(p)
14459         void *p;
14460 {
14461         return (void *) (p == NULL);
14462 }
14463
14464 int main() {
14465
14466         /* pthread test function */
14467         pthread_t t;
14468         int status;
14469         int detach = 1;
14470
14471 #ifdef HAVE_PTHREADS_FINAL
14472         /* Final pthreads */
14473         pthread_attr_t attr;
14474
14475         status = pthread_attr_init(&attr);
14476         if( status ) return status;
14477
14478 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14479         if( !detach ) {
14480 #if defined( PTHREAD_CREATE_JOINABLE )
14481                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14482 #else
14483                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14484 #endif
14485
14486 #ifdef PTHREAD_CREATE_DETACHED
14487         } else {
14488                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14489 #endif
14490         }
14491         if( status ) return status;
14492 #endif
14493
14494         status = pthread_create( &t, &attr, task, NULL );
14495         if( status ) return status;
14496
14497 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14498         if( detach ) {
14499                 /* give thread a chance to complete */
14500                 /* it should remain joinable and hence detachable */
14501                 sleep( 1 );
14502
14503                 status = pthread_detach( t );
14504                 if( status ) return status;
14505         }
14506 #endif
14507
14508 #else
14509         /* Draft 4 pthreads */
14510         status = pthread_create( &t, pthread_attr_default, task, NULL );
14511         if( status ) return status;
14512
14513         if( detach ) {
14514                 /* give thread a chance to complete */
14515                 /* it should remain joinable and hence detachable */
14516                 sleep( 1 );
14517
14518                 status = pthread_detach( &t );
14519                 if( status ) return status;
14520         }
14521 #endif
14522
14523 #ifdef HAVE_LINUX_THREADS
14524         pthread_kill_other_threads_np();
14525 #endif
14526
14527         return 0;
14528
14529 ; return 0; }
14530 EOF
14531 if { (eval echo configure:14532: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14532   rm -rf conftest*
14533   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14534 else
14535   echo "configure: failed program was:" >&5
14536   cat conftest.$ac_ext >&5
14537   rm -rf conftest*
14538   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14539 fi
14540 rm -f conftest*
14541 else
14542   cat > conftest.$ac_ext <<EOF
14543 #line 14544 "configure"
14544 #include "confdefs.h"
14545 /* pthread test headers */
14546 #include <pthread.h>
14547 #ifndef NULL
14548 #define NULL (void*)0
14549 #endif
14550
14551 static void *task(p)
14552         void *p;
14553 {
14554         return (void *) (p == NULL);
14555 }
14556
14557
14558 int main(argc, argv)
14559         int argc;
14560         char **argv;
14561 {
14562
14563         /* pthread test function */
14564         pthread_t t;
14565         int status;
14566         int detach = 1;
14567
14568 #ifdef HAVE_PTHREADS_FINAL
14569         /* Final pthreads */
14570         pthread_attr_t attr;
14571
14572         status = pthread_attr_init(&attr);
14573         if( status ) return status;
14574
14575 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14576         if( !detach ) {
14577 #if defined( PTHREAD_CREATE_JOINABLE )
14578                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14579 #else
14580                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14581 #endif
14582
14583 #ifdef PTHREAD_CREATE_DETACHED
14584         } else {
14585                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14586 #endif
14587         }
14588         if( status ) return status;
14589 #endif
14590
14591         status = pthread_create( &t, &attr, task, NULL );
14592         if( status ) return status;
14593
14594 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14595         if( detach ) {
14596                 /* give thread a chance to complete */
14597                 /* it should remain joinable and hence detachable */
14598                 sleep( 1 );
14599
14600                 status = pthread_detach( t );
14601                 if( status ) return status;
14602         }
14603 #endif
14604
14605 #else
14606         /* Draft 4 pthreads */
14607         status = pthread_create( &t, pthread_attr_default, task, NULL );
14608         if( status ) return status;
14609
14610         if( detach ) {
14611                 /* give thread a chance to complete */
14612                 /* it should remain joinable and hence detachable */
14613                 sleep( 1 );
14614
14615                 status = pthread_detach( &t );
14616                 if( status ) return status;
14617         }
14618 #endif
14619
14620 #ifdef HAVE_LINUX_THREADS
14621         pthread_kill_other_threads_np();
14622 #endif
14623
14624         return 0;
14625
14626 }
14627
14628 EOF
14629 if { (eval echo configure:14630: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14630 then
14631   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14632 else
14633   echo "configure: failed program was:" >&5
14634   cat conftest.$ac_ext >&5
14635   rm -fr conftest*
14636   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14637 fi
14638 rm -fr conftest*
14639 fi
14640
14641
14642                 # restore the LIBS
14643                 LIBS="$ol_LIBS"
14644         
14645 fi
14646
14647 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14648
14649         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14650                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14651                 ol_link_threads=posix
14652         fi
14653 fi
14654
14655                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14656 if test "$ol_link_threads" = no ; then
14657         # try -lpthreads -lmach -lexc
14658         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14659 echo "configure:14660: checking for pthread link with -lpthreads -lmach -lexc" >&5
14660 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14661   echo $ac_n "(cached) $ac_c" 1>&6
14662 else
14663   
14664                 # save the flags
14665                 ol_LIBS="$LIBS"
14666                 LIBS="-lpthreads -lmach -lexc $LIBS"
14667
14668                 if test "$cross_compiling" = yes; then
14669   cat > conftest.$ac_ext <<EOF
14670 #line 14671 "configure"
14671 #include "confdefs.h"
14672 /* pthread test headers */
14673 #include <pthread.h>
14674 #ifndef NULL
14675 #define NULL (void*)0
14676 #endif
14677
14678 static void *task(p)
14679         void *p;
14680 {
14681         return (void *) (p == NULL);
14682 }
14683
14684 int main() {
14685
14686         /* pthread test function */
14687         pthread_t t;
14688         int status;
14689         int detach = 1;
14690
14691 #ifdef HAVE_PTHREADS_FINAL
14692         /* Final pthreads */
14693         pthread_attr_t attr;
14694
14695         status = pthread_attr_init(&attr);
14696         if( status ) return status;
14697
14698 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14699         if( !detach ) {
14700 #if defined( PTHREAD_CREATE_JOINABLE )
14701                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14702 #else
14703                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14704 #endif
14705
14706 #ifdef PTHREAD_CREATE_DETACHED
14707         } else {
14708                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14709 #endif
14710         }
14711         if( status ) return status;
14712 #endif
14713
14714         status = pthread_create( &t, &attr, task, NULL );
14715         if( status ) return status;
14716
14717 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14718         if( detach ) {
14719                 /* give thread a chance to complete */
14720                 /* it should remain joinable and hence detachable */
14721                 sleep( 1 );
14722
14723                 status = pthread_detach( t );
14724                 if( status ) return status;
14725         }
14726 #endif
14727
14728 #else
14729         /* Draft 4 pthreads */
14730         status = pthread_create( &t, pthread_attr_default, task, NULL );
14731         if( status ) return status;
14732
14733         if( detach ) {
14734                 /* give thread a chance to complete */
14735                 /* it should remain joinable and hence detachable */
14736                 sleep( 1 );
14737
14738                 status = pthread_detach( &t );
14739                 if( status ) return status;
14740         }
14741 #endif
14742
14743 #ifdef HAVE_LINUX_THREADS
14744         pthread_kill_other_threads_np();
14745 #endif
14746
14747         return 0;
14748
14749 ; return 0; }
14750 EOF
14751 if { (eval echo configure:14752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14752   rm -rf conftest*
14753   ol_cv_pthread_lpthreads_lmach_lexc=yes
14754 else
14755   echo "configure: failed program was:" >&5
14756   cat conftest.$ac_ext >&5
14757   rm -rf conftest*
14758   ol_cv_pthread_lpthreads_lmach_lexc=no
14759 fi
14760 rm -f conftest*
14761 else
14762   cat > conftest.$ac_ext <<EOF
14763 #line 14764 "configure"
14764 #include "confdefs.h"
14765 /* pthread test headers */
14766 #include <pthread.h>
14767 #ifndef NULL
14768 #define NULL (void*)0
14769 #endif
14770
14771 static void *task(p)
14772         void *p;
14773 {
14774         return (void *) (p == NULL);
14775 }
14776
14777
14778 int main(argc, argv)
14779         int argc;
14780         char **argv;
14781 {
14782
14783         /* pthread test function */
14784         pthread_t t;
14785         int status;
14786         int detach = 1;
14787
14788 #ifdef HAVE_PTHREADS_FINAL
14789         /* Final pthreads */
14790         pthread_attr_t attr;
14791
14792         status = pthread_attr_init(&attr);
14793         if( status ) return status;
14794
14795 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14796         if( !detach ) {
14797 #if defined( PTHREAD_CREATE_JOINABLE )
14798                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14799 #else
14800                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14801 #endif
14802
14803 #ifdef PTHREAD_CREATE_DETACHED
14804         } else {
14805                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14806 #endif
14807         }
14808         if( status ) return status;
14809 #endif
14810
14811         status = pthread_create( &t, &attr, task, NULL );
14812         if( status ) return status;
14813
14814 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14815         if( detach ) {
14816                 /* give thread a chance to complete */
14817                 /* it should remain joinable and hence detachable */
14818                 sleep( 1 );
14819
14820                 status = pthread_detach( t );
14821                 if( status ) return status;
14822         }
14823 #endif
14824
14825 #else
14826         /* Draft 4 pthreads */
14827         status = pthread_create( &t, pthread_attr_default, task, NULL );
14828         if( status ) return status;
14829
14830         if( detach ) {
14831                 /* give thread a chance to complete */
14832                 /* it should remain joinable and hence detachable */
14833                 sleep( 1 );
14834
14835                 status = pthread_detach( &t );
14836                 if( status ) return status;
14837         }
14838 #endif
14839
14840 #ifdef HAVE_LINUX_THREADS
14841         pthread_kill_other_threads_np();
14842 #endif
14843
14844         return 0;
14845
14846 }
14847
14848 EOF
14849 if { (eval echo configure:14850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14850 then
14851   ol_cv_pthread_lpthreads_lmach_lexc=yes
14852 else
14853   echo "configure: failed program was:" >&5
14854   cat conftest.$ac_ext >&5
14855   rm -fr conftest*
14856   ol_cv_pthread_lpthreads_lmach_lexc=no
14857 fi
14858 rm -fr conftest*
14859 fi
14860
14861
14862                 # restore the LIBS
14863                 LIBS="$ol_LIBS"
14864         
14865 fi
14866
14867 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14868
14869         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14870                 ol_link_pthreads="-lpthreads -lmach -lexc"
14871                 ol_link_threads=posix
14872         fi
14873 fi
14874
14875                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14876 if test "$ol_link_threads" = no ; then
14877         # try -lpthreads -lexc
14878         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14879 echo "configure:14880: checking for pthread link with -lpthreads -lexc" >&5
14880 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14881   echo $ac_n "(cached) $ac_c" 1>&6
14882 else
14883   
14884                 # save the flags
14885                 ol_LIBS="$LIBS"
14886                 LIBS="-lpthreads -lexc $LIBS"
14887
14888                 if test "$cross_compiling" = yes; then
14889   cat > conftest.$ac_ext <<EOF
14890 #line 14891 "configure"
14891 #include "confdefs.h"
14892 /* pthread test headers */
14893 #include <pthread.h>
14894 #ifndef NULL
14895 #define NULL (void*)0
14896 #endif
14897
14898 static void *task(p)
14899         void *p;
14900 {
14901         return (void *) (p == NULL);
14902 }
14903
14904 int main() {
14905
14906         /* pthread test function */
14907         pthread_t t;
14908         int status;
14909         int detach = 1;
14910
14911 #ifdef HAVE_PTHREADS_FINAL
14912         /* Final pthreads */
14913         pthread_attr_t attr;
14914
14915         status = pthread_attr_init(&attr);
14916         if( status ) return status;
14917
14918 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14919         if( !detach ) {
14920 #if defined( PTHREAD_CREATE_JOINABLE )
14921                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14922 #else
14923                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14924 #endif
14925
14926 #ifdef PTHREAD_CREATE_DETACHED
14927         } else {
14928                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14929 #endif
14930         }
14931         if( status ) return status;
14932 #endif
14933
14934         status = pthread_create( &t, &attr, task, NULL );
14935         if( status ) return status;
14936
14937 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14938         if( detach ) {
14939                 /* give thread a chance to complete */
14940                 /* it should remain joinable and hence detachable */
14941                 sleep( 1 );
14942
14943                 status = pthread_detach( t );
14944                 if( status ) return status;
14945         }
14946 #endif
14947
14948 #else
14949         /* Draft 4 pthreads */
14950         status = pthread_create( &t, pthread_attr_default, task, NULL );
14951         if( status ) return status;
14952
14953         if( detach ) {
14954                 /* give thread a chance to complete */
14955                 /* it should remain joinable and hence detachable */
14956                 sleep( 1 );
14957
14958                 status = pthread_detach( &t );
14959                 if( status ) return status;
14960         }
14961 #endif
14962
14963 #ifdef HAVE_LINUX_THREADS
14964         pthread_kill_other_threads_np();
14965 #endif
14966
14967         return 0;
14968
14969 ; return 0; }
14970 EOF
14971 if { (eval echo configure:14972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14972   rm -rf conftest*
14973   ol_cv_pthread_lpthreads_lexc=yes
14974 else
14975   echo "configure: failed program was:" >&5
14976   cat conftest.$ac_ext >&5
14977   rm -rf conftest*
14978   ol_cv_pthread_lpthreads_lexc=no
14979 fi
14980 rm -f conftest*
14981 else
14982   cat > conftest.$ac_ext <<EOF
14983 #line 14984 "configure"
14984 #include "confdefs.h"
14985 /* pthread test headers */
14986 #include <pthread.h>
14987 #ifndef NULL
14988 #define NULL (void*)0
14989 #endif
14990
14991 static void *task(p)
14992         void *p;
14993 {
14994         return (void *) (p == NULL);
14995 }
14996
14997
14998 int main(argc, argv)
14999         int argc;
15000         char **argv;
15001 {
15002
15003         /* pthread test function */
15004         pthread_t t;
15005         int status;
15006         int detach = 1;
15007
15008 #ifdef HAVE_PTHREADS_FINAL
15009         /* Final pthreads */
15010         pthread_attr_t attr;
15011
15012         status = pthread_attr_init(&attr);
15013         if( status ) return status;
15014
15015 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15016         if( !detach ) {
15017 #if defined( PTHREAD_CREATE_JOINABLE )
15018                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15019 #else
15020                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15021 #endif
15022
15023 #ifdef PTHREAD_CREATE_DETACHED
15024         } else {
15025                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15026 #endif
15027         }
15028         if( status ) return status;
15029 #endif
15030
15031         status = pthread_create( &t, &attr, task, NULL );
15032         if( status ) return status;
15033
15034 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15035         if( detach ) {
15036                 /* give thread a chance to complete */
15037                 /* it should remain joinable and hence detachable */
15038                 sleep( 1 );
15039
15040                 status = pthread_detach( t );
15041                 if( status ) return status;
15042         }
15043 #endif
15044
15045 #else
15046         /* Draft 4 pthreads */
15047         status = pthread_create( &t, pthread_attr_default, task, NULL );
15048         if( status ) return status;
15049
15050         if( detach ) {
15051                 /* give thread a chance to complete */
15052                 /* it should remain joinable and hence detachable */
15053                 sleep( 1 );
15054
15055                 status = pthread_detach( &t );
15056                 if( status ) return status;
15057         }
15058 #endif
15059
15060 #ifdef HAVE_LINUX_THREADS
15061         pthread_kill_other_threads_np();
15062 #endif
15063
15064         return 0;
15065
15066 }
15067
15068 EOF
15069 if { (eval echo configure:15070: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15070 then
15071   ol_cv_pthread_lpthreads_lexc=yes
15072 else
15073   echo "configure: failed program was:" >&5
15074   cat conftest.$ac_ext >&5
15075   rm -fr conftest*
15076   ol_cv_pthread_lpthreads_lexc=no
15077 fi
15078 rm -fr conftest*
15079 fi
15080
15081
15082                 # restore the LIBS
15083                 LIBS="$ol_LIBS"
15084         
15085 fi
15086
15087 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
15088
15089         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
15090                 ol_link_pthreads="-lpthreads -lexc"
15091                 ol_link_threads=posix
15092         fi
15093 fi
15094
15095
15096                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
15097 if test "$ol_link_threads" = no ; then
15098         # try -lpthreads
15099         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
15100 echo "configure:15101: checking for pthread link with -lpthreads" >&5
15101 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
15102   echo $ac_n "(cached) $ac_c" 1>&6
15103 else
15104   
15105                 # save the flags
15106                 ol_LIBS="$LIBS"
15107                 LIBS="-lpthreads $LIBS"
15108
15109                 if test "$cross_compiling" = yes; then
15110   cat > conftest.$ac_ext <<EOF
15111 #line 15112 "configure"
15112 #include "confdefs.h"
15113 /* pthread test headers */
15114 #include <pthread.h>
15115 #ifndef NULL
15116 #define NULL (void*)0
15117 #endif
15118
15119 static void *task(p)
15120         void *p;
15121 {
15122         return (void *) (p == NULL);
15123 }
15124
15125 int main() {
15126
15127         /* pthread test function */
15128         pthread_t t;
15129         int status;
15130         int detach = 1;
15131
15132 #ifdef HAVE_PTHREADS_FINAL
15133         /* Final pthreads */
15134         pthread_attr_t attr;
15135
15136         status = pthread_attr_init(&attr);
15137         if( status ) return status;
15138
15139 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15140         if( !detach ) {
15141 #if defined( PTHREAD_CREATE_JOINABLE )
15142                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15143 #else
15144                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15145 #endif
15146
15147 #ifdef PTHREAD_CREATE_DETACHED
15148         } else {
15149                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15150 #endif
15151         }
15152         if( status ) return status;
15153 #endif
15154
15155         status = pthread_create( &t, &attr, task, NULL );
15156         if( status ) return status;
15157
15158 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15159         if( detach ) {
15160                 /* give thread a chance to complete */
15161                 /* it should remain joinable and hence detachable */
15162                 sleep( 1 );
15163
15164                 status = pthread_detach( t );
15165                 if( status ) return status;
15166         }
15167 #endif
15168
15169 #else
15170         /* Draft 4 pthreads */
15171         status = pthread_create( &t, pthread_attr_default, task, NULL );
15172         if( status ) return status;
15173
15174         if( detach ) {
15175                 /* give thread a chance to complete */
15176                 /* it should remain joinable and hence detachable */
15177                 sleep( 1 );
15178
15179                 status = pthread_detach( &t );
15180                 if( status ) return status;
15181         }
15182 #endif
15183
15184 #ifdef HAVE_LINUX_THREADS
15185         pthread_kill_other_threads_np();
15186 #endif
15187
15188         return 0;
15189
15190 ; return 0; }
15191 EOF
15192 if { (eval echo configure:15193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15193   rm -rf conftest*
15194   ol_cv_pthread_lib_lpthreads=yes
15195 else
15196   echo "configure: failed program was:" >&5
15197   cat conftest.$ac_ext >&5
15198   rm -rf conftest*
15199   ol_cv_pthread_lib_lpthreads=no
15200 fi
15201 rm -f conftest*
15202 else
15203   cat > conftest.$ac_ext <<EOF
15204 #line 15205 "configure"
15205 #include "confdefs.h"
15206 /* pthread test headers */
15207 #include <pthread.h>
15208 #ifndef NULL
15209 #define NULL (void*)0
15210 #endif
15211
15212 static void *task(p)
15213         void *p;
15214 {
15215         return (void *) (p == NULL);
15216 }
15217
15218
15219 int main(argc, argv)
15220         int argc;
15221         char **argv;
15222 {
15223
15224         /* pthread test function */
15225         pthread_t t;
15226         int status;
15227         int detach = 1;
15228
15229 #ifdef HAVE_PTHREADS_FINAL
15230         /* Final pthreads */
15231         pthread_attr_t attr;
15232
15233         status = pthread_attr_init(&attr);
15234         if( status ) return status;
15235
15236 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15237         if( !detach ) {
15238 #if defined( PTHREAD_CREATE_JOINABLE )
15239                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15240 #else
15241                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15242 #endif
15243
15244 #ifdef PTHREAD_CREATE_DETACHED
15245         } else {
15246                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15247 #endif
15248         }
15249         if( status ) return status;
15250 #endif
15251
15252         status = pthread_create( &t, &attr, task, NULL );
15253         if( status ) return status;
15254
15255 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15256         if( detach ) {
15257                 /* give thread a chance to complete */
15258                 /* it should remain joinable and hence detachable */
15259                 sleep( 1 );
15260
15261                 status = pthread_detach( t );
15262                 if( status ) return status;
15263         }
15264 #endif
15265
15266 #else
15267         /* Draft 4 pthreads */
15268         status = pthread_create( &t, pthread_attr_default, task, NULL );
15269         if( status ) return status;
15270
15271         if( detach ) {
15272                 /* give thread a chance to complete */
15273                 /* it should remain joinable and hence detachable */
15274                 sleep( 1 );
15275
15276                 status = pthread_detach( &t );
15277                 if( status ) return status;
15278         }
15279 #endif
15280
15281 #ifdef HAVE_LINUX_THREADS
15282         pthread_kill_other_threads_np();
15283 #endif
15284
15285         return 0;
15286
15287 }
15288
15289 EOF
15290 if { (eval echo configure:15291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15291 then
15292   ol_cv_pthread_lib_lpthreads=yes
15293 else
15294   echo "configure: failed program was:" >&5
15295   cat conftest.$ac_ext >&5
15296   rm -fr conftest*
15297   ol_cv_pthread_lib_lpthreads=no
15298 fi
15299 rm -fr conftest*
15300 fi
15301
15302
15303                 # restore the LIBS
15304                 LIBS="$ol_LIBS"
15305         
15306 fi
15307
15308 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15309
15310         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15311                 ol_link_pthreads="-lpthreads"
15312                 ol_link_threads=posix
15313         fi
15314 fi
15315
15316
15317                 if test $ol_link_threads != no ; then
15318                         cat >> confdefs.h <<\EOF
15319 #define HAVE_PTHREADS 1
15320 EOF
15321
15322
15323                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15324
15325                                                 save_CPPFLAGS="$CPPFLAGS"
15326                         save_LIBS="$LIBS"
15327                         LIBS="$LTHREAD_LIBS $LIBS"
15328
15329                                                                                                 for ac_func in sched_yield pthread_yield
15330 do
15331 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15332 echo "configure:15333: checking for $ac_func" >&5
15333 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15334   echo $ac_n "(cached) $ac_c" 1>&6
15335 else
15336   cat > conftest.$ac_ext <<EOF
15337 #line 15338 "configure"
15338 #include "confdefs.h"
15339 /* System header to define __stub macros and hopefully few prototypes,
15340     which can conflict with char $ac_func(); below.  */
15341 #include <assert.h>
15342 /* Override any gcc2 internal prototype to avoid an error.  */
15343 /* We use char because int might match the return type of a gcc2
15344     builtin and then its argument prototype would still apply.  */
15345 char $ac_func();
15346 char (*f)();
15347
15348 int main() {
15349
15350 /* The GNU C library defines this for functions which it implements
15351     to always fail with ENOSYS.  Some functions are actually named
15352     something starting with __ and the normal name is an alias.  */
15353 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15354 choke me
15355 #else
15356 f = $ac_func;
15357 #endif
15358
15359 ; return 0; }
15360 EOF
15361 if { (eval echo configure:15362: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15362   rm -rf conftest*
15363   eval "ac_cv_func_$ac_func=yes"
15364 else
15365   echo "configure: failed program was:" >&5
15366   cat conftest.$ac_ext >&5
15367   rm -rf conftest*
15368   eval "ac_cv_func_$ac_func=no"
15369 fi
15370 rm -f conftest*
15371 fi
15372
15373 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15374   echo "$ac_t""yes" 1>&6
15375     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15376   cat >> confdefs.h <<EOF
15377 #define $ac_tr_func 1
15378 EOF
15379  
15380 else
15381   echo "$ac_t""no" 1>&6
15382 fi
15383 done
15384
15385
15386                         if test $ac_cv_func_sched_yield = no -a \
15387                                 $ac_cv_func_pthread_yield = no ; then
15388                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15389 echo "configure:15390: checking for sched_yield in -lrt" >&5
15390 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15391 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15392   echo $ac_n "(cached) $ac_c" 1>&6
15393 else
15394   ac_save_LIBS="$LIBS"
15395 LIBS="-lrt  $LIBS"
15396 cat > conftest.$ac_ext <<EOF
15397 #line 15398 "configure"
15398 #include "confdefs.h"
15399 /* Override any gcc2 internal prototype to avoid an error.  */
15400 /* We use char because int might match the return type of a gcc2
15401     builtin and then its argument prototype would still apply.  */
15402 char sched_yield();
15403
15404 int main() {
15405 sched_yield()
15406 ; return 0; }
15407 EOF
15408 if { (eval echo configure:15409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15409   rm -rf conftest*
15410   eval "ac_cv_lib_$ac_lib_var=yes"
15411 else
15412   echo "configure: failed program was:" >&5
15413   cat conftest.$ac_ext >&5
15414   rm -rf conftest*
15415   eval "ac_cv_lib_$ac_lib_var=no"
15416 fi
15417 rm -f conftest*
15418 LIBS="$ac_save_LIBS"
15419
15420 fi
15421 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15422   echo "$ac_t""yes" 1>&6
15423   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15424                                         cat >> confdefs.h <<\EOF
15425 #define HAVE_SCHED_YIELD 1
15426 EOF
15427
15428                                         ac_cv_func_sched_yield=yes
15429 else
15430   echo "$ac_t""no" 1>&6
15431 ac_cv_func_sched_yield=no
15432 fi
15433
15434                         fi
15435                         if test $ac_cv_func_sched_yield = no -a \
15436                                 $ac_cv_func_pthread_yield = no ; then
15437                                                                                                 for ac_func in thr_yield
15438 do
15439 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15440 echo "configure:15441: checking for $ac_func" >&5
15441 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15442   echo $ac_n "(cached) $ac_c" 1>&6
15443 else
15444   cat > conftest.$ac_ext <<EOF
15445 #line 15446 "configure"
15446 #include "confdefs.h"
15447 /* System header to define __stub macros and hopefully few prototypes,
15448     which can conflict with char $ac_func(); below.  */
15449 #include <assert.h>
15450 /* Override any gcc2 internal prototype to avoid an error.  */
15451 /* We use char because int might match the return type of a gcc2
15452     builtin and then its argument prototype would still apply.  */
15453 char $ac_func();
15454 char (*f)();
15455
15456 int main() {
15457
15458 /* The GNU C library defines this for functions which it implements
15459     to always fail with ENOSYS.  Some functions are actually named
15460     something starting with __ and the normal name is an alias.  */
15461 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15462 choke me
15463 #else
15464 f = $ac_func;
15465 #endif
15466
15467 ; return 0; }
15468 EOF
15469 if { (eval echo configure:15470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15470   rm -rf conftest*
15471   eval "ac_cv_func_$ac_func=yes"
15472 else
15473   echo "configure: failed program was:" >&5
15474   cat conftest.$ac_ext >&5
15475   rm -rf conftest*
15476   eval "ac_cv_func_$ac_func=no"
15477 fi
15478 rm -f conftest*
15479 fi
15480
15481 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15482   echo "$ac_t""yes" 1>&6
15483     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15484   cat >> confdefs.h <<EOF
15485 #define $ac_tr_func 1
15486 EOF
15487  
15488 else
15489   echo "$ac_t""no" 1>&6
15490 fi
15491 done
15492
15493                         fi
15494                         if test $ac_cv_func_sched_yield = no -a \
15495                                 $ac_cv_func_pthread_yield = no -a \
15496                                 "$ac_cv_func_thr_yield" = no ; then
15497                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15498                         fi
15499
15500                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15501 do
15502 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15503 echo "configure:15504: checking for $ac_func" >&5
15504 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15505   echo $ac_n "(cached) $ac_c" 1>&6
15506 else
15507   cat > conftest.$ac_ext <<EOF
15508 #line 15509 "configure"
15509 #include "confdefs.h"
15510 /* System header to define __stub macros and hopefully few prototypes,
15511     which can conflict with char $ac_func(); below.  */
15512 #include <assert.h>
15513 /* Override any gcc2 internal prototype to avoid an error.  */
15514 /* We use char because int might match the return type of a gcc2
15515     builtin and then its argument prototype would still apply.  */
15516 char $ac_func();
15517 char (*f)();
15518
15519 int main() {
15520
15521 /* The GNU C library defines this for functions which it implements
15522     to always fail with ENOSYS.  Some functions are actually named
15523     something starting with __ and the normal name is an alias.  */
15524 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15525 choke me
15526 #else
15527 f = $ac_func;
15528 #endif
15529
15530 ; return 0; }
15531 EOF
15532 if { (eval echo configure:15533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15533   rm -rf conftest*
15534   eval "ac_cv_func_$ac_func=yes"
15535 else
15536   echo "configure: failed program was:" >&5
15537   cat conftest.$ac_ext >&5
15538   rm -rf conftest*
15539   eval "ac_cv_func_$ac_func=no"
15540 fi
15541 rm -f conftest*
15542 fi
15543
15544 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15545   echo "$ac_t""yes" 1>&6
15546     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15547   cat >> confdefs.h <<EOF
15548 #define $ac_tr_func 1
15549 EOF
15550  
15551 else
15552   echo "$ac_t""no" 1>&6
15553 fi
15554 done
15555
15556
15557                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15558 echo "configure:15559: checking for pthread_detach with <pthread.h>" >&5
15559 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15560   echo $ac_n "(cached) $ac_c" 1>&6
15561 else
15562   
15563                                                                 cat > conftest.$ac_ext <<EOF
15564 #line 15565 "configure"
15565 #include "confdefs.h"
15566
15567 #include <pthread.h>
15568 #ifndef NULL
15569 #define NULL (void*)0
15570 #endif
15571
15572 int main() {
15573 pthread_detach(NULL);
15574 ; return 0; }
15575 EOF
15576 if { (eval echo configure:15577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15577   rm -rf conftest*
15578   ol_cv_func_pthread_detach=yes
15579 else
15580   echo "configure: failed program was:" >&5
15581   cat conftest.$ac_ext >&5
15582   rm -rf conftest*
15583   ol_cv_func_pthread_detach=no
15584 fi
15585 rm -f conftest*
15586                         
15587 fi
15588
15589 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15590
15591                         if test $ol_cv_func_pthread_detach = no ; then
15592                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15593                         fi
15594
15595                         cat >> confdefs.h <<\EOF
15596 #define HAVE_PTHREAD_DETACH 1
15597 EOF
15598
15599
15600                                                 for ac_func in \
15601                                 pthread_setconcurrency \
15602                                 pthread_getconcurrency \
15603                                 thr_setconcurrency \
15604                                 thr_getconcurrency \
15605                         
15606 do
15607 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15608 echo "configure:15609: checking for $ac_func" >&5
15609 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15610   echo $ac_n "(cached) $ac_c" 1>&6
15611 else
15612   cat > conftest.$ac_ext <<EOF
15613 #line 15614 "configure"
15614 #include "confdefs.h"
15615 /* System header to define __stub macros and hopefully few prototypes,
15616     which can conflict with char $ac_func(); below.  */
15617 #include <assert.h>
15618 /* Override any gcc2 internal prototype to avoid an error.  */
15619 /* We use char because int might match the return type of a gcc2
15620     builtin and then its argument prototype would still apply.  */
15621 char $ac_func();
15622 char (*f)();
15623
15624 int main() {
15625
15626 /* The GNU C library defines this for functions which it implements
15627     to always fail with ENOSYS.  Some functions are actually named
15628     something starting with __ and the normal name is an alias.  */
15629 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15630 choke me
15631 #else
15632 f = $ac_func;
15633 #endif
15634
15635 ; return 0; }
15636 EOF
15637 if { (eval echo configure:15638: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15638   rm -rf conftest*
15639   eval "ac_cv_func_$ac_func=yes"
15640 else
15641   echo "configure: failed program was:" >&5
15642   cat conftest.$ac_ext >&5
15643   rm -rf conftest*
15644   eval "ac_cv_func_$ac_func=no"
15645 fi
15646 rm -f conftest*
15647 fi
15648
15649 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15650   echo "$ac_t""yes" 1>&6
15651     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15652   cat >> confdefs.h <<EOF
15653 #define $ac_tr_func 1
15654 EOF
15655  
15656 else
15657   echo "$ac_t""no" 1>&6
15658 fi
15659 done
15660
15661
15662                         
15663         for ac_func in pthread_kill_other_threads_np
15664 do
15665 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15666 echo "configure:15667: checking for $ac_func" >&5
15667 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15668   echo $ac_n "(cached) $ac_c" 1>&6
15669 else
15670   cat > conftest.$ac_ext <<EOF
15671 #line 15672 "configure"
15672 #include "confdefs.h"
15673 /* System header to define __stub macros and hopefully few prototypes,
15674     which can conflict with char $ac_func(); below.  */
15675 #include <assert.h>
15676 /* Override any gcc2 internal prototype to avoid an error.  */
15677 /* We use char because int might match the return type of a gcc2
15678     builtin and then its argument prototype would still apply.  */
15679 char $ac_func();
15680 char (*f)();
15681
15682 int main() {
15683
15684 /* The GNU C library defines this for functions which it implements
15685     to always fail with ENOSYS.  Some functions are actually named
15686     something starting with __ and the normal name is an alias.  */
15687 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15688 choke me
15689 #else
15690 f = $ac_func;
15691 #endif
15692
15693 ; return 0; }
15694 EOF
15695 if { (eval echo configure:15696: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15696   rm -rf conftest*
15697   eval "ac_cv_func_$ac_func=yes"
15698 else
15699   echo "configure: failed program was:" >&5
15700   cat conftest.$ac_ext >&5
15701   rm -rf conftest*
15702   eval "ac_cv_func_$ac_func=no"
15703 fi
15704 rm -f conftest*
15705 fi
15706
15707 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15708   echo "$ac_t""yes" 1>&6
15709     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15710   cat >> confdefs.h <<EOF
15711 #define $ac_tr_func 1
15712 EOF
15713  
15714 else
15715   echo "$ac_t""no" 1>&6
15716 fi
15717 done
15718
15719         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15720 echo "configure:15721: checking for LinuxThreads implementation" >&5
15721 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15722   echo $ac_n "(cached) $ac_c" 1>&6
15723 else
15724   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15725 fi
15726
15727 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15728
15729                         
15730         
15731         
15732         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15733 echo "configure:15734: checking for LinuxThreads consistency" >&5
15734 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15735   echo $ac_n "(cached) $ac_c" 1>&6
15736 else
15737   
15738                 if test $ol_cv_header_linux_threads = yes -a \
15739                         $ol_cv_sys_linux_threads = yes; then
15740                         ol_cv_linux_threads=yes
15741                 elif test $ol_cv_header_linux_threads = no -a \
15742                         $ol_cv_sys_linux_threads = no; then
15743                         ol_cv_linux_threads=no
15744                 else
15745                         ol_cv_linux_threads=error
15746                 fi
15747         
15748 fi
15749
15750 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15751
15752
15753                         if test $ol_cv_linux_threads = error; then
15754                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15755                         fi
15756
15757                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15758 echo "configure:15759: checking if pthread_create() works" >&5
15759 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15760   echo $ac_n "(cached) $ac_c" 1>&6
15761 else
15762   
15763                         if test "$cross_compiling" = yes; then
15764                                 ol_cv_pthread_create_works=yes
15765 else
15766   cat > conftest.$ac_ext <<EOF
15767 #line 15768 "configure"
15768 #include "confdefs.h"
15769 /* pthread test headers */
15770 #include <pthread.h>
15771 #ifndef NULL
15772 #define NULL (void*)0
15773 #endif
15774
15775 static void *task(p)
15776         void *p;
15777 {
15778         return (void *) (p == NULL);
15779 }
15780
15781
15782 int main(argc, argv)
15783         int argc;
15784         char **argv;
15785 {
15786
15787         /* pthread test function */
15788         pthread_t t;
15789         int status;
15790         int detach = 1;
15791
15792 #ifdef HAVE_PTHREADS_FINAL
15793         /* Final pthreads */
15794         pthread_attr_t attr;
15795
15796         status = pthread_attr_init(&attr);
15797         if( status ) return status;
15798
15799 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15800         if( !detach ) {
15801 #if defined( PTHREAD_CREATE_JOINABLE )
15802                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15803 #else
15804                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15805 #endif
15806
15807 #ifdef PTHREAD_CREATE_DETACHED
15808         } else {
15809                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15810 #endif
15811         }
15812         if( status ) return status;
15813 #endif
15814
15815         status = pthread_create( &t, &attr, task, NULL );
15816         if( status ) return status;
15817
15818 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15819         if( detach ) {
15820                 /* give thread a chance to complete */
15821                 /* it should remain joinable and hence detachable */
15822                 sleep( 1 );
15823
15824                 status = pthread_detach( t );
15825                 if( status ) return status;
15826         }
15827 #endif
15828
15829 #else
15830         /* Draft 4 pthreads */
15831         status = pthread_create( &t, pthread_attr_default, task, NULL );
15832         if( status ) return status;
15833
15834         if( detach ) {
15835                 /* give thread a chance to complete */
15836                 /* it should remain joinable and hence detachable */
15837                 sleep( 1 );
15838
15839                 status = pthread_detach( &t );
15840                 if( status ) return status;
15841         }
15842 #endif
15843
15844 #ifdef HAVE_LINUX_THREADS
15845         pthread_kill_other_threads_np();
15846 #endif
15847
15848         return 0;
15849
15850 }
15851
15852 EOF
15853 if { (eval echo configure:15854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15854 then
15855   ol_cv_pthread_create_works=yes
15856 else
15857   echo "configure: failed program was:" >&5
15858   cat conftest.$ac_ext >&5
15859   rm -fr conftest*
15860   ol_cv_pthread_create_works=no
15861 fi
15862 rm -fr conftest*
15863 fi
15864
15865 fi
15866
15867 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15868
15869                         if test $ol_cv_pthread_create_works = no ; then
15870                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15871                         fi
15872
15873                                                 if test $ol_with_yielding_select = auto ; then
15874                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15875 echo "configure:15876: checking if select yields when using pthreads" >&5
15876 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15877   echo $ac_n "(cached) $ac_c" 1>&6
15878 else
15879   
15880                                 if test "$cross_compiling" = yes; then
15881   ol_cv_pthread_select_yields=cross
15882 else
15883   cat > conftest.$ac_ext <<EOF
15884 #line 15885 "configure"
15885 #include "confdefs.h"
15886
15887 #include <sys/types.h>
15888 #include <sys/time.h>
15889 #include <unistd.h>
15890 #include <pthread.h>
15891 #ifndef NULL
15892 #define NULL (void*) 0
15893 #endif
15894
15895 static int fildes[2];
15896
15897 static void *task(p)
15898         void *p;
15899 {
15900         int i;
15901         struct timeval tv;
15902
15903         fd_set rfds;
15904
15905         tv.tv_sec=10;
15906         tv.tv_usec=0;
15907
15908         FD_ZERO(&rfds);
15909         FD_SET(fildes[0], &rfds);
15910
15911         /* we're not interested in any fds */
15912         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15913
15914         if(i < 0) {
15915                 perror("select");
15916                 exit(10);
15917         }
15918
15919         exit(0); /* if we exit here, the select blocked the whole process */
15920 }
15921
15922 int main(argc, argv)
15923         int argc;
15924         char **argv;
15925 {
15926         pthread_t t;
15927
15928         /* create a pipe to select */
15929         if(pipe(&fildes[0])) {
15930                 perror("select");
15931                 exit(1);
15932         }
15933
15934 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15935         (void) pthread_setconcurrency(2);
15936 #else
15937 #ifdef HAVE_THR_SETCONCURRENCY
15938         /* Set Solaris LWP concurrency to 2 */
15939         thr_setconcurrency(2);
15940 #endif
15941 #endif
15942
15943 #if HAVE_PTHREADS_D4
15944         pthread_create(&t, pthread_attr_default, task, NULL);
15945 #else
15946         pthread_create(&t, NULL, task, NULL);
15947 #endif
15948
15949 #if HAVE_SCHED_YIELD
15950         sched_yield();  /* make sure task runs first */
15951 #else
15952 #ifdef HAVE_PTHREAD_YIELD
15953         pthread_yield();        /* make sure task runs first */
15954 #endif
15955 #endif
15956
15957         exit(2);
15958 }
15959 EOF
15960 if { (eval echo configure:15961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15961 then
15962   ol_cv_pthread_select_yields=no
15963 else
15964   echo "configure: failed program was:" >&5
15965   cat conftest.$ac_ext >&5
15966   rm -fr conftest*
15967   ol_cv_pthread_select_yields=yes
15968 fi
15969 rm -fr conftest*
15970 fi
15971
15972 fi
15973
15974 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15975
15976                                 if test $ol_cv_pthread_select_yields = cross ; then
15977                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15978                                 fi
15979
15980                                 if test $ol_cv_pthread_select_yields = yes ; then
15981                                         ol_with_yielding_select=yes
15982                                 fi
15983                         fi
15984
15985                                                 CPPFLAGS="$save_CPPFLAGS"
15986                         LIBS="$save_LIBS"
15987                 else
15988                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15989                 fi
15990         fi
15991
15992         if test $ol_with_threads = posix ; then
15993                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15994         fi
15995 fi
15996
15997 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15998         -o $ol_with_threads = mach ; then
15999
16000                 for ac_hdr in mach/cthreads.h cthreads.h
16001 do
16002 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16003 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16004 echo "configure:16005: checking for $ac_hdr" >&5
16005 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16006   echo $ac_n "(cached) $ac_c" 1>&6
16007 else
16008   cat > conftest.$ac_ext <<EOF
16009 #line 16010 "configure"
16010 #include "confdefs.h"
16011 #include <$ac_hdr>
16012 EOF
16013 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16014 { (eval echo configure:16015: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16015 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16016 if test -z "$ac_err"; then
16017   rm -rf conftest*
16018   eval "ac_cv_header_$ac_safe=yes"
16019 else
16020   echo "$ac_err" >&5
16021   echo "configure: failed program was:" >&5
16022   cat conftest.$ac_ext >&5
16023   rm -rf conftest*
16024   eval "ac_cv_header_$ac_safe=no"
16025 fi
16026 rm -f conftest*
16027 fi
16028 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16029   echo "$ac_t""yes" 1>&6
16030     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16031   cat >> confdefs.h <<EOF
16032 #define $ac_tr_hdr 1
16033 EOF
16034  
16035 else
16036   echo "$ac_t""no" 1>&6
16037 fi
16038 done
16039
16040         if test $ac_cv_header_mach_cthreads_h = yes ; then
16041                 ol_with_threads=found
16042
16043                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16044 echo "configure:16045: checking for cthread_fork" >&5
16045 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16046   echo $ac_n "(cached) $ac_c" 1>&6
16047 else
16048   cat > conftest.$ac_ext <<EOF
16049 #line 16050 "configure"
16050 #include "confdefs.h"
16051 /* System header to define __stub macros and hopefully few prototypes,
16052     which can conflict with char cthread_fork(); below.  */
16053 #include <assert.h>
16054 /* Override any gcc2 internal prototype to avoid an error.  */
16055 /* We use char because int might match the return type of a gcc2
16056     builtin and then its argument prototype would still apply.  */
16057 char cthread_fork();
16058 char (*f)();
16059
16060 int main() {
16061
16062 /* The GNU C library defines this for functions which it implements
16063     to always fail with ENOSYS.  Some functions are actually named
16064     something starting with __ and the normal name is an alias.  */
16065 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16066 choke me
16067 #else
16068 f = cthread_fork;
16069 #endif
16070
16071 ; return 0; }
16072 EOF
16073 if { (eval echo configure:16074: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16074   rm -rf conftest*
16075   eval "ac_cv_func_cthread_fork=yes"
16076 else
16077   echo "configure: failed program was:" >&5
16078   cat conftest.$ac_ext >&5
16079   rm -rf conftest*
16080   eval "ac_cv_func_cthread_fork=no"
16081 fi
16082 rm -f conftest*
16083 fi
16084
16085 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16086   echo "$ac_t""yes" 1>&6
16087   ol_link_threads=yes
16088 else
16089   echo "$ac_t""no" 1>&6
16090 fi
16091
16092
16093                 if test $ol_link_threads = no ; then
16094                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
16095 echo "configure:16096: checking for cthread_fork with -all_load" >&5
16096 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
16097   echo $ac_n "(cached) $ac_c" 1>&6
16098 else
16099   
16100                                                                 save_LIBS="$LIBS"
16101                                 LIBS="-all_load $LIBS"
16102                                 cat > conftest.$ac_ext <<EOF
16103 #line 16104 "configure"
16104 #include "confdefs.h"
16105 #include <mach/cthreads.h>
16106 int main() {
16107
16108                                         cthread_fork((void *)0, (void *)0);
16109                                         
16110 ; return 0; }
16111 EOF
16112 if { (eval echo configure:16113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16113   rm -rf conftest*
16114   ol_cv_cthread_all_load=yes
16115 else
16116   echo "configure: failed program was:" >&5
16117   cat conftest.$ac_ext >&5
16118   rm -rf conftest*
16119   ol_cv_cthread_all_load=no
16120 fi
16121 rm -f conftest*
16122                                                                 LIBS="$save_LIBS"
16123                         
16124 fi
16125
16126 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
16127
16128                         if test $ol_cv_cthread_all_load = yes ; then
16129                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
16130                                 ol_link_threads=mach
16131                                 ol_with_threads=found
16132                         fi
16133                 fi
16134
16135         elif test $ac_cv_header_cthreads_h = yes ; then
16136                                 
16137                 ol_with_threads=found
16138  
16139                                 save_LIBS="$LIBS"
16140                 LIBS="$LIBS -lthreads"
16141                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16142 echo "configure:16143: checking for cthread_fork" >&5
16143 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16144   echo $ac_n "(cached) $ac_c" 1>&6
16145 else
16146   cat > conftest.$ac_ext <<EOF
16147 #line 16148 "configure"
16148 #include "confdefs.h"
16149 /* System header to define __stub macros and hopefully few prototypes,
16150     which can conflict with char cthread_fork(); below.  */
16151 #include <assert.h>
16152 /* Override any gcc2 internal prototype to avoid an error.  */
16153 /* We use char because int might match the return type of a gcc2
16154     builtin and then its argument prototype would still apply.  */
16155 char cthread_fork();
16156 char (*f)();
16157
16158 int main() {
16159
16160 /* The GNU C library defines this for functions which it implements
16161     to always fail with ENOSYS.  Some functions are actually named
16162     something starting with __ and the normal name is an alias.  */
16163 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16164 choke me
16165 #else
16166 f = cthread_fork;
16167 #endif
16168
16169 ; return 0; }
16170 EOF
16171 if { (eval echo configure:16172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16172   rm -rf conftest*
16173   eval "ac_cv_func_cthread_fork=yes"
16174 else
16175   echo "configure: failed program was:" >&5
16176   cat conftest.$ac_ext >&5
16177   rm -rf conftest*
16178   eval "ac_cv_func_cthread_fork=no"
16179 fi
16180 rm -f conftest*
16181 fi
16182
16183 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16184   echo "$ac_t""yes" 1>&6
16185   ol_link_threads=yes
16186 else
16187   echo "$ac_t""no" 1>&6
16188 fi
16189
16190                 LIBS="$save_LIBS"
16191
16192                 if test $ol_link_threads = yes ; then
16193                         LTHREAD_LIBS="-lthreads"
16194                         ol_link_threads=mach
16195                         ol_with_threads=found
16196                 else
16197                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16198                 fi
16199
16200         elif test $ol_with_threads = mach ; then
16201                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16202         fi
16203
16204         if test $ol_link_threads = mach ; then
16205                 cat >> confdefs.h <<\EOF
16206 #define HAVE_MACH_CTHREADS 1
16207 EOF
16208
16209         elif test $ol_with_threads = found ; then
16210                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16211         fi
16212 fi
16213
16214 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16215         -o $ol_with_threads = pth ; then
16216
16217         for ac_hdr in pth.h
16218 do
16219 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16220 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16221 echo "configure:16222: checking for $ac_hdr" >&5
16222 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16223   echo $ac_n "(cached) $ac_c" 1>&6
16224 else
16225   cat > conftest.$ac_ext <<EOF
16226 #line 16227 "configure"
16227 #include "confdefs.h"
16228 #include <$ac_hdr>
16229 EOF
16230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16231 { (eval echo configure:16232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16233 if test -z "$ac_err"; then
16234   rm -rf conftest*
16235   eval "ac_cv_header_$ac_safe=yes"
16236 else
16237   echo "$ac_err" >&5
16238   echo "configure: failed program was:" >&5
16239   cat conftest.$ac_ext >&5
16240   rm -rf conftest*
16241   eval "ac_cv_header_$ac_safe=no"
16242 fi
16243 rm -f conftest*
16244 fi
16245 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16246   echo "$ac_t""yes" 1>&6
16247     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16248   cat >> confdefs.h <<EOF
16249 #define $ac_tr_hdr 1
16250 EOF
16251  
16252 else
16253   echo "$ac_t""no" 1>&6
16254 fi
16255 done
16256
16257
16258         if test $ac_cv_header_pth_h = yes ; then
16259                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16260 echo "configure:16261: checking for pth_version in -lpth" >&5
16261 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16262 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16263   echo $ac_n "(cached) $ac_c" 1>&6
16264 else
16265   ac_save_LIBS="$LIBS"
16266 LIBS="-lpth  $LIBS"
16267 cat > conftest.$ac_ext <<EOF
16268 #line 16269 "configure"
16269 #include "confdefs.h"
16270 /* Override any gcc2 internal prototype to avoid an error.  */
16271 /* We use char because int might match the return type of a gcc2
16272     builtin and then its argument prototype would still apply.  */
16273 char pth_version();
16274
16275 int main() {
16276 pth_version()
16277 ; return 0; }
16278 EOF
16279 if { (eval echo configure:16280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16280   rm -rf conftest*
16281   eval "ac_cv_lib_$ac_lib_var=yes"
16282 else
16283   echo "configure: failed program was:" >&5
16284   cat conftest.$ac_ext >&5
16285   rm -rf conftest*
16286   eval "ac_cv_lib_$ac_lib_var=no"
16287 fi
16288 rm -f conftest*
16289 LIBS="$ac_save_LIBS"
16290
16291 fi
16292 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16293   echo "$ac_t""yes" 1>&6
16294   have_pth=yes
16295 else
16296   echo "$ac_t""no" 1>&6
16297 have_pth=no
16298 fi
16299
16300
16301                 if test $have_pth = yes ; then
16302                         cat >> confdefs.h <<\EOF
16303 #define HAVE_GNU_PTH 1
16304 EOF
16305
16306                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16307                         ol_link_threads=pth
16308                         ol_with_threads=found
16309
16310                         if test $ol_with_yielding_select = auto ; then
16311                                 ol_with_yielding_select=yes
16312                         fi
16313                 fi
16314         fi
16315 fi
16316
16317 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16318         -o $ol_with_threads = lwp ; then
16319
16320                 for ac_hdr in thread.h synch.h
16321 do
16322 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16323 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16324 echo "configure:16325: checking for $ac_hdr" >&5
16325 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16326   echo $ac_n "(cached) $ac_c" 1>&6
16327 else
16328   cat > conftest.$ac_ext <<EOF
16329 #line 16330 "configure"
16330 #include "confdefs.h"
16331 #include <$ac_hdr>
16332 EOF
16333 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16334 { (eval echo configure:16335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16335 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16336 if test -z "$ac_err"; then
16337   rm -rf conftest*
16338   eval "ac_cv_header_$ac_safe=yes"
16339 else
16340   echo "$ac_err" >&5
16341   echo "configure: failed program was:" >&5
16342   cat conftest.$ac_ext >&5
16343   rm -rf conftest*
16344   eval "ac_cv_header_$ac_safe=no"
16345 fi
16346 rm -f conftest*
16347 fi
16348 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16349   echo "$ac_t""yes" 1>&6
16350     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16351   cat >> confdefs.h <<EOF
16352 #define $ac_tr_hdr 1
16353 EOF
16354  
16355 else
16356   echo "$ac_t""no" 1>&6
16357 fi
16358 done
16359
16360         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16361                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16362 echo "configure:16363: checking for thr_create in -lthread" >&5
16363 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16364 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16365   echo $ac_n "(cached) $ac_c" 1>&6
16366 else
16367   ac_save_LIBS="$LIBS"
16368 LIBS="-lthread  $LIBS"
16369 cat > conftest.$ac_ext <<EOF
16370 #line 16371 "configure"
16371 #include "confdefs.h"
16372 /* Override any gcc2 internal prototype to avoid an error.  */
16373 /* We use char because int might match the return type of a gcc2
16374     builtin and then its argument prototype would still apply.  */
16375 char thr_create();
16376
16377 int main() {
16378 thr_create()
16379 ; return 0; }
16380 EOF
16381 if { (eval echo configure:16382: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16382   rm -rf conftest*
16383   eval "ac_cv_lib_$ac_lib_var=yes"
16384 else
16385   echo "configure: failed program was:" >&5
16386   cat conftest.$ac_ext >&5
16387   rm -rf conftest*
16388   eval "ac_cv_lib_$ac_lib_var=no"
16389 fi
16390 rm -f conftest*
16391 LIBS="$ac_save_LIBS"
16392
16393 fi
16394 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16395   echo "$ac_t""yes" 1>&6
16396   have_thr=yes
16397 else
16398   echo "$ac_t""no" 1>&6
16399 have_thr=no
16400 fi
16401
16402
16403                 if test $have_thr = yes ; then
16404                         cat >> confdefs.h <<\EOF
16405 #define HAVE_THR 1
16406 EOF
16407
16408                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16409                         ol_link_threads=thr
16410
16411                         if test $ol_with_yielding_select = auto ; then
16412                                 ol_with_yielding_select=yes
16413                         fi
16414
16415                                                 for ac_func in \
16416                                 thr_setconcurrency \
16417                                 thr_getconcurrency \
16418                         
16419 do
16420 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16421 echo "configure:16422: checking for $ac_func" >&5
16422 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16423   echo $ac_n "(cached) $ac_c" 1>&6
16424 else
16425   cat > conftest.$ac_ext <<EOF
16426 #line 16427 "configure"
16427 #include "confdefs.h"
16428 /* System header to define __stub macros and hopefully few prototypes,
16429     which can conflict with char $ac_func(); below.  */
16430 #include <assert.h>
16431 /* Override any gcc2 internal prototype to avoid an error.  */
16432 /* We use char because int might match the return type of a gcc2
16433     builtin and then its argument prototype would still apply.  */
16434 char $ac_func();
16435 char (*f)();
16436
16437 int main() {
16438
16439 /* The GNU C library defines this for functions which it implements
16440     to always fail with ENOSYS.  Some functions are actually named
16441     something starting with __ and the normal name is an alias.  */
16442 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16443 choke me
16444 #else
16445 f = $ac_func;
16446 #endif
16447
16448 ; return 0; }
16449 EOF
16450 if { (eval echo configure:16451: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16451   rm -rf conftest*
16452   eval "ac_cv_func_$ac_func=yes"
16453 else
16454   echo "configure: failed program was:" >&5
16455   cat conftest.$ac_ext >&5
16456   rm -rf conftest*
16457   eval "ac_cv_func_$ac_func=no"
16458 fi
16459 rm -f conftest*
16460 fi
16461
16462 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16463   echo "$ac_t""yes" 1>&6
16464     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16465   cat >> confdefs.h <<EOF
16466 #define $ac_tr_func 1
16467 EOF
16468  
16469 else
16470   echo "$ac_t""no" 1>&6
16471 fi
16472 done
16473
16474                 fi
16475         fi
16476
16477                 for ac_hdr in lwp/lwp.h
16478 do
16479 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16480 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16481 echo "configure:16482: checking for $ac_hdr" >&5
16482 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16483   echo $ac_n "(cached) $ac_c" 1>&6
16484 else
16485   cat > conftest.$ac_ext <<EOF
16486 #line 16487 "configure"
16487 #include "confdefs.h"
16488 #include <$ac_hdr>
16489 EOF
16490 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16491 { (eval echo configure:16492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16492 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16493 if test -z "$ac_err"; then
16494   rm -rf conftest*
16495   eval "ac_cv_header_$ac_safe=yes"
16496 else
16497   echo "$ac_err" >&5
16498   echo "configure: failed program was:" >&5
16499   cat conftest.$ac_ext >&5
16500   rm -rf conftest*
16501   eval "ac_cv_header_$ac_safe=no"
16502 fi
16503 rm -f conftest*
16504 fi
16505 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16506   echo "$ac_t""yes" 1>&6
16507     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16508   cat >> confdefs.h <<EOF
16509 #define $ac_tr_hdr 1
16510 EOF
16511  
16512 else
16513   echo "$ac_t""no" 1>&6
16514 fi
16515 done
16516
16517         if test $ac_cv_header_lwp_lwp_h = yes ; then
16518                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16519 echo "configure:16520: checking for lwp_create in -llwp" >&5
16520 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16521 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16522   echo $ac_n "(cached) $ac_c" 1>&6
16523 else
16524   ac_save_LIBS="$LIBS"
16525 LIBS="-llwp  $LIBS"
16526 cat > conftest.$ac_ext <<EOF
16527 #line 16528 "configure"
16528 #include "confdefs.h"
16529 /* Override any gcc2 internal prototype to avoid an error.  */
16530 /* We use char because int might match the return type of a gcc2
16531     builtin and then its argument prototype would still apply.  */
16532 char lwp_create();
16533
16534 int main() {
16535 lwp_create()
16536 ; return 0; }
16537 EOF
16538 if { (eval echo configure:16539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16539   rm -rf conftest*
16540   eval "ac_cv_lib_$ac_lib_var=yes"
16541 else
16542   echo "configure: failed program was:" >&5
16543   cat conftest.$ac_ext >&5
16544   rm -rf conftest*
16545   eval "ac_cv_lib_$ac_lib_var=no"
16546 fi
16547 rm -f conftest*
16548 LIBS="$ac_save_LIBS"
16549
16550 fi
16551 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16552   echo "$ac_t""yes" 1>&6
16553   have_lwp=yes
16554 else
16555   echo "$ac_t""no" 1>&6
16556 have_lwp=no
16557 fi
16558
16559
16560                 if test $have_lwp = yes ; then
16561                         cat >> confdefs.h <<\EOF
16562 #define HAVE_LWP 1
16563 EOF
16564
16565                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16566                         ol_link_threads=lwp
16567
16568                         if test $ol_with_yielding_select = auto ; then
16569                                 ol_with_yielding_select=no
16570                         fi
16571                 fi
16572         fi
16573 fi
16574
16575 if test $ol_with_yielding_select = yes ; then
16576         cat >> confdefs.h <<\EOF
16577 #define HAVE_YIELDING_SELECT 1
16578 EOF
16579
16580 fi
16581
16582 if test $ol_with_threads = manual ; then
16583                 ol_link_threads=yes
16584
16585         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16586
16587         for ac_hdr in pthread.h sched.h
16588 do
16589 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16590 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16591 echo "configure:16592: checking for $ac_hdr" >&5
16592 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16593   echo $ac_n "(cached) $ac_c" 1>&6
16594 else
16595   cat > conftest.$ac_ext <<EOF
16596 #line 16597 "configure"
16597 #include "confdefs.h"
16598 #include <$ac_hdr>
16599 EOF
16600 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16601 { (eval echo configure:16602: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16602 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16603 if test -z "$ac_err"; then
16604   rm -rf conftest*
16605   eval "ac_cv_header_$ac_safe=yes"
16606 else
16607   echo "$ac_err" >&5
16608   echo "configure: failed program was:" >&5
16609   cat conftest.$ac_ext >&5
16610   rm -rf conftest*
16611   eval "ac_cv_header_$ac_safe=no"
16612 fi
16613 rm -f conftest*
16614 fi
16615 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16616   echo "$ac_t""yes" 1>&6
16617     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16618   cat >> confdefs.h <<EOF
16619 #define $ac_tr_hdr 1
16620 EOF
16621  
16622 else
16623   echo "$ac_t""no" 1>&6
16624 fi
16625 done
16626
16627         for ac_func in sched_yield pthread_yield
16628 do
16629 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16630 echo "configure:16631: checking for $ac_func" >&5
16631 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16632   echo $ac_n "(cached) $ac_c" 1>&6
16633 else
16634   cat > conftest.$ac_ext <<EOF
16635 #line 16636 "configure"
16636 #include "confdefs.h"
16637 /* System header to define __stub macros and hopefully few prototypes,
16638     which can conflict with char $ac_func(); below.  */
16639 #include <assert.h>
16640 /* Override any gcc2 internal prototype to avoid an error.  */
16641 /* We use char because int might match the return type of a gcc2
16642     builtin and then its argument prototype would still apply.  */
16643 char $ac_func();
16644 char (*f)();
16645
16646 int main() {
16647
16648 /* The GNU C library defines this for functions which it implements
16649     to always fail with ENOSYS.  Some functions are actually named
16650     something starting with __ and the normal name is an alias.  */
16651 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16652 choke me
16653 #else
16654 f = $ac_func;
16655 #endif
16656
16657 ; return 0; }
16658 EOF
16659 if { (eval echo configure:16660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16660   rm -rf conftest*
16661   eval "ac_cv_func_$ac_func=yes"
16662 else
16663   echo "configure: failed program was:" >&5
16664   cat conftest.$ac_ext >&5
16665   rm -rf conftest*
16666   eval "ac_cv_func_$ac_func=no"
16667 fi
16668 rm -f conftest*
16669 fi
16670
16671 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16672   echo "$ac_t""yes" 1>&6
16673     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16674   cat >> confdefs.h <<EOF
16675 #define $ac_tr_func 1
16676 EOF
16677  
16678 else
16679   echo "$ac_t""no" 1>&6
16680 fi
16681 done
16682
16683         
16684         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16685 echo "configure:16686: checking for LinuxThreads pthread.h" >&5
16686 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16687   echo $ac_n "(cached) $ac_c" 1>&6
16688 else
16689   cat > conftest.$ac_ext <<EOF
16690 #line 16691 "configure"
16691 #include "confdefs.h"
16692 #include <pthread.h>
16693 EOF
16694 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16695   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16696   rm -rf conftest*
16697   ol_cv_header_linux_threads=yes
16698 else
16699   rm -rf conftest*
16700   ol_cv_header_linux_threads=no
16701 fi
16702 rm -f conftest*
16703
16704                 
16705 fi
16706
16707 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16708         if test $ol_cv_header_linux_threads = yes; then
16709                 cat >> confdefs.h <<\EOF
16710 #define HAVE_LINUX_THREADS 1
16711 EOF
16712
16713         fi
16714
16715
16716         for ac_hdr in mach/cthreads.h
16717 do
16718 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16719 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16720 echo "configure:16721: checking for $ac_hdr" >&5
16721 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16722   echo $ac_n "(cached) $ac_c" 1>&6
16723 else
16724   cat > conftest.$ac_ext <<EOF
16725 #line 16726 "configure"
16726 #include "confdefs.h"
16727 #include <$ac_hdr>
16728 EOF
16729 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16730 { (eval echo configure:16731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16731 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16732 if test -z "$ac_err"; then
16733   rm -rf conftest*
16734   eval "ac_cv_header_$ac_safe=yes"
16735 else
16736   echo "$ac_err" >&5
16737   echo "configure: failed program was:" >&5
16738   cat conftest.$ac_ext >&5
16739   rm -rf conftest*
16740   eval "ac_cv_header_$ac_safe=no"
16741 fi
16742 rm -f conftest*
16743 fi
16744 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16745   echo "$ac_t""yes" 1>&6
16746     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16747   cat >> confdefs.h <<EOF
16748 #define $ac_tr_hdr 1
16749 EOF
16750  
16751 else
16752   echo "$ac_t""no" 1>&6
16753 fi
16754 done
16755
16756         for ac_hdr in lwp/lwp.h
16757 do
16758 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16759 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16760 echo "configure:16761: checking for $ac_hdr" >&5
16761 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16762   echo $ac_n "(cached) $ac_c" 1>&6
16763 else
16764   cat > conftest.$ac_ext <<EOF
16765 #line 16766 "configure"
16766 #include "confdefs.h"
16767 #include <$ac_hdr>
16768 EOF
16769 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16770 { (eval echo configure:16771: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16771 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16772 if test -z "$ac_err"; then
16773   rm -rf conftest*
16774   eval "ac_cv_header_$ac_safe=yes"
16775 else
16776   echo "$ac_err" >&5
16777   echo "configure: failed program was:" >&5
16778   cat conftest.$ac_ext >&5
16779   rm -rf conftest*
16780   eval "ac_cv_header_$ac_safe=no"
16781 fi
16782 rm -f conftest*
16783 fi
16784 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16785   echo "$ac_t""yes" 1>&6
16786     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16787   cat >> confdefs.h <<EOF
16788 #define $ac_tr_hdr 1
16789 EOF
16790  
16791 else
16792   echo "$ac_t""no" 1>&6
16793 fi
16794 done
16795
16796         for ac_hdr in thread.h synch.h
16797 do
16798 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16799 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16800 echo "configure:16801: checking for $ac_hdr" >&5
16801 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16802   echo $ac_n "(cached) $ac_c" 1>&6
16803 else
16804   cat > conftest.$ac_ext <<EOF
16805 #line 16806 "configure"
16806 #include "confdefs.h"
16807 #include <$ac_hdr>
16808 EOF
16809 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16810 { (eval echo configure:16811: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16811 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16812 if test -z "$ac_err"; then
16813   rm -rf conftest*
16814   eval "ac_cv_header_$ac_safe=yes"
16815 else
16816   echo "$ac_err" >&5
16817   echo "configure: failed program was:" >&5
16818   cat conftest.$ac_ext >&5
16819   rm -rf conftest*
16820   eval "ac_cv_header_$ac_safe=no"
16821 fi
16822 rm -f conftest*
16823 fi
16824 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16825   echo "$ac_t""yes" 1>&6
16826     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16827   cat >> confdefs.h <<EOF
16828 #define $ac_tr_hdr 1
16829 EOF
16830  
16831 else
16832   echo "$ac_t""no" 1>&6
16833 fi
16834 done
16835
16836 fi
16837
16838 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16839                         cat >> confdefs.h <<\EOF
16840 #define REENTRANT 1
16841 EOF
16842
16843         cat >> confdefs.h <<\EOF
16844 #define _REENTRANT 1
16845 EOF
16846
16847         cat >> confdefs.h <<\EOF
16848 #define THREAD_SAFE 1
16849 EOF
16850
16851         cat >> confdefs.h <<\EOF
16852 #define _THREAD_SAFE 1
16853 EOF
16854
16855         cat >> confdefs.h <<\EOF
16856 #define THREADSAFE 1
16857 EOF
16858
16859         cat >> confdefs.h <<\EOF
16860 #define _THREADSAFE 1
16861 EOF
16862
16863         cat >> confdefs.h <<\EOF
16864 #define _SGI_MP_SOURCE 1
16865 EOF
16866
16867
16868                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16869 echo "configure:16870: checking for thread specific errno" >&5
16870 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16871   echo $ac_n "(cached) $ac_c" 1>&6
16872 else
16873   
16874                 cat > conftest.$ac_ext <<EOF
16875 #line 16876 "configure"
16876 #include "confdefs.h"
16877 #include <errno.h>
16878 int main() {
16879 errno = 0;
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_errno_thread_specific=yes
16885 else
16886   echo "configure: failed program was:" >&5
16887   cat conftest.$ac_ext >&5
16888   rm -rf conftest*
16889   ol_cv_errno_thread_specific=no
16890 fi
16891 rm -f conftest*
16892         
16893 fi
16894
16895 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16896
16897                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16898 echo "configure:16899: checking for thread specific h_errno" >&5
16899 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16900   echo $ac_n "(cached) $ac_c" 1>&6
16901 else
16902   
16903                 cat > conftest.$ac_ext <<EOF
16904 #line 16905 "configure"
16905 #include "confdefs.h"
16906 #include <netdb.h>
16907 int main() {
16908 h_errno = 0;
16909 ; return 0; }
16910 EOF
16911 if { (eval echo configure:16912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16912   rm -rf conftest*
16913   ol_cv_h_errno_thread_specific=yes
16914 else
16915   echo "configure: failed program was:" >&5
16916   cat conftest.$ac_ext >&5
16917   rm -rf conftest*
16918   ol_cv_h_errno_thread_specific=no
16919 fi
16920 rm -f conftest*
16921         
16922 fi
16923
16924 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16925
16926         if test $ol_cv_errno_thread_specific != yes \
16927                 -o $ol_cv_h_errno_thread_specific != yes ; then
16928                 LIBS="$LTHREAD_LIBS $LIBS"
16929                 LTHREAD_LIBS=""
16930         fi
16931
16932 fi  
16933
16934 if test $ol_link_threads = no ; then
16935         if test $ol_with_threads = yes ; then
16936                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16937         fi
16938
16939         if test $ol_with_threads = auto ; then
16940                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16941                 ol_with_threads=no
16942         fi
16943
16944         cat >> confdefs.h <<\EOF
16945 #define NO_THREADS 1
16946 EOF
16947
16948         LTHREAD_LIBS=""
16949 fi
16950
16951 if test $ol_link_threads != no ; then
16952         cat >> confdefs.h <<\EOF
16953 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16954 EOF
16955
16956 fi
16957
16958 ol_link_ldbm=no 
16959
16960 if test $ol_with_ldbm_api = auto \
16961         -o $ol_with_ldbm_api = berkeley \
16962         -o $ol_with_ldbm_api = bcompat ; then
16963
16964         if test $ol_with_ldbm_api = bcompat; then \
16965                 for ac_hdr in db_185.h db.h
16966 do
16967 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16968 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16969 echo "configure:16970: checking for $ac_hdr" >&5
16970 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16971   echo $ac_n "(cached) $ac_c" 1>&6
16972 else
16973   cat > conftest.$ac_ext <<EOF
16974 #line 16975 "configure"
16975 #include "confdefs.h"
16976 #include <$ac_hdr>
16977 EOF
16978 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16979 { (eval echo configure:16980: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16980 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16981 if test -z "$ac_err"; then
16982   rm -rf conftest*
16983   eval "ac_cv_header_$ac_safe=yes"
16984 else
16985   echo "$ac_err" >&5
16986   echo "configure: failed program was:" >&5
16987   cat conftest.$ac_ext >&5
16988   rm -rf conftest*
16989   eval "ac_cv_header_$ac_safe=no"
16990 fi
16991 rm -f conftest*
16992 fi
16993 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16994   echo "$ac_t""yes" 1>&6
16995     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16996   cat >> confdefs.h <<EOF
16997 #define $ac_tr_hdr 1
16998 EOF
16999  
17000 else
17001   echo "$ac_t""no" 1>&6
17002 fi
17003 done
17004
17005 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17006         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17007 echo "configure:17008: checking if Berkeley DB header compatibility" >&5
17008 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17009   echo $ac_n "(cached) $ac_c" 1>&6
17010 else
17011   
17012                 cat > conftest.$ac_ext <<EOF
17013 #line 17014 "configure"
17014 #include "confdefs.h"
17015
17016 #if HAVE_DB_185_H
17017 #       include <db_185.h>
17018 #else
17019 #       include <db.h>
17020 #endif
17021
17022  /* this check could be improved */
17023 #ifndef DB_VERSION_MAJOR
17024 #       define DB_VERSION_MAJOR 1
17025 #endif
17026
17027 #if DB_VERSION_MAJOR == 1 
17028         __db_version_1
17029 #endif
17030
17031 EOF
17032 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17033   egrep "__db_version_1" >/dev/null 2>&1; then
17034   rm -rf conftest*
17035   ol_cv_header_db1=yes
17036 else
17037   rm -rf conftest*
17038   ol_cv_header_db1=no
17039 fi
17040 rm -f conftest*
17041
17042 fi
17043
17044 echo "$ac_t""$ol_cv_header_db1" 1>&6
17045
17046         if test $ol_cv_header_db1 = yes ; then
17047                 ol_cv_lib_db=no
17048 if test $ol_cv_lib_db = no ; then
17049         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17050 echo "configure:17051: checking for Berkeley DB link (default)" >&5
17051 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17052   echo $ac_n "(cached) $ac_c" 1>&6
17053 else
17054   
17055         ol_DB_LIB=
17056         ol_LIBS=$LIBS
17057         LIBS="$ol_DB_LIB $LIBS"
17058
17059         cat > conftest.$ac_ext <<EOF
17060 #line 17061 "configure"
17061 #include "confdefs.h"
17062
17063 #ifdef HAVE_DB_185_H
17064 # include <db_185.h>
17065 #else
17066 # include <db.h>
17067 #endif
17068
17069 #ifndef DB_VERSION_MAJOR
17070 # define DB_VERSION_MAJOR 1
17071 #endif
17072
17073 #ifndef NULL
17074 #define NULL ((void*)0)
17075 #endif
17076
17077 int main() {
17078
17079 #if DB_VERSION_MAJOR > 1
17080         {
17081                 char *version;
17082                 int major, minor, patch;
17083
17084                 version = db_version( &major, &minor, &patch );
17085
17086                 if( major != DB_VERSION_MAJOR ||
17087                         minor < DB_VERSION_MINOR )
17088                 {
17089                         printf("Berkeley DB version mismatch\n"
17090                                 "\texpected: %s\n\tgot: %s\n",
17091                                 DB_VERSION_STRING, version);
17092                         return 1;
17093                 }
17094         }
17095 #endif
17096
17097 #if DB_VERSION_MAJOR > 2
17098         db_env_create( NULL, 0 );
17099 #elif DB_VERSION_MAJOR > 1
17100         db_appexit( NULL );
17101 #else
17102         (void) dbopen( NULL, 0, 0, 0, NULL);
17103 #endif
17104
17105 ; return 0; }
17106 EOF
17107 if { (eval echo configure:17108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17108   rm -rf conftest*
17109   ol_cv_db_none=yes
17110 else
17111   echo "configure: failed program was:" >&5
17112   cat conftest.$ac_ext >&5
17113   rm -rf conftest*
17114   ol_cv_db_none=no
17115 fi
17116 rm -f conftest*
17117
17118         LIBS="$ol_LIBS"
17119
17120 fi
17121
17122 echo "$ac_t""$ol_cv_db_none" 1>&6
17123
17124         if test $ol_cv_db_none = yes ; then
17125                 ol_cv_lib_db=yes
17126         fi
17127 fi
17128
17129 if test $ol_cv_lib_db = no ; then
17130         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17131 echo "configure:17132: checking for Berkeley DB link (-ldb4)" >&5
17132 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17133   echo $ac_n "(cached) $ac_c" 1>&6
17134 else
17135   
17136         ol_DB_LIB=-ldb4
17137         ol_LIBS=$LIBS
17138         LIBS="$ol_DB_LIB $LIBS"
17139
17140         cat > conftest.$ac_ext <<EOF
17141 #line 17142 "configure"
17142 #include "confdefs.h"
17143
17144 #ifdef HAVE_DB_185_H
17145 # include <db_185.h>
17146 #else
17147 # include <db.h>
17148 #endif
17149
17150 #ifndef DB_VERSION_MAJOR
17151 # define DB_VERSION_MAJOR 1
17152 #endif
17153
17154 #ifndef NULL
17155 #define NULL ((void*)0)
17156 #endif
17157
17158 int main() {
17159
17160 #if DB_VERSION_MAJOR > 1
17161         {
17162                 char *version;
17163                 int major, minor, patch;
17164
17165                 version = db_version( &major, &minor, &patch );
17166
17167                 if( major != DB_VERSION_MAJOR ||
17168                         minor < DB_VERSION_MINOR )
17169                 {
17170                         printf("Berkeley DB version mismatch\n"
17171                                 "\texpected: %s\n\tgot: %s\n",
17172                                 DB_VERSION_STRING, version);
17173                         return 1;
17174                 }
17175         }
17176 #endif
17177
17178 #if DB_VERSION_MAJOR > 2
17179         db_env_create( NULL, 0 );
17180 #elif DB_VERSION_MAJOR > 1
17181         db_appexit( NULL );
17182 #else
17183         (void) dbopen( NULL, 0, 0, 0, NULL);
17184 #endif
17185
17186 ; return 0; }
17187 EOF
17188 if { (eval echo configure:17189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17189   rm -rf conftest*
17190   ol_cv_db_db4=yes
17191 else
17192   echo "configure: failed program was:" >&5
17193   cat conftest.$ac_ext >&5
17194   rm -rf conftest*
17195   ol_cv_db_db4=no
17196 fi
17197 rm -f conftest*
17198
17199         LIBS="$ol_LIBS"
17200
17201 fi
17202
17203 echo "$ac_t""$ol_cv_db_db4" 1>&6
17204
17205         if test $ol_cv_db_db4 = yes ; then
17206                 ol_cv_lib_db=-ldb4
17207         fi
17208 fi
17209
17210 if test $ol_cv_lib_db = no ; then
17211         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
17212 echo "configure:17213: checking for Berkeley DB link (-ldb-4)" >&5
17213 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
17214   echo $ac_n "(cached) $ac_c" 1>&6
17215 else
17216   
17217         ol_DB_LIB=-ldb-4
17218         ol_LIBS=$LIBS
17219         LIBS="$ol_DB_LIB $LIBS"
17220
17221         cat > conftest.$ac_ext <<EOF
17222 #line 17223 "configure"
17223 #include "confdefs.h"
17224
17225 #ifdef HAVE_DB_185_H
17226 # include <db_185.h>
17227 #else
17228 # include <db.h>
17229 #endif
17230
17231 #ifndef DB_VERSION_MAJOR
17232 # define DB_VERSION_MAJOR 1
17233 #endif
17234
17235 #ifndef NULL
17236 #define NULL ((void*)0)
17237 #endif
17238
17239 int main() {
17240
17241 #if DB_VERSION_MAJOR > 1
17242         {
17243                 char *version;
17244                 int major, minor, patch;
17245
17246                 version = db_version( &major, &minor, &patch );
17247
17248                 if( major != DB_VERSION_MAJOR ||
17249                         minor < DB_VERSION_MINOR )
17250                 {
17251                         printf("Berkeley DB version mismatch\n"
17252                                 "\texpected: %s\n\tgot: %s\n",
17253                                 DB_VERSION_STRING, version);
17254                         return 1;
17255                 }
17256         }
17257 #endif
17258
17259 #if DB_VERSION_MAJOR > 2
17260         db_env_create( NULL, 0 );
17261 #elif DB_VERSION_MAJOR > 1
17262         db_appexit( NULL );
17263 #else
17264         (void) dbopen( NULL, 0, 0, 0, NULL);
17265 #endif
17266
17267 ; return 0; }
17268 EOF
17269 if { (eval echo configure:17270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17270   rm -rf conftest*
17271   ol_cv_db_db_4=yes
17272 else
17273   echo "configure: failed program was:" >&5
17274   cat conftest.$ac_ext >&5
17275   rm -rf conftest*
17276   ol_cv_db_db_4=no
17277 fi
17278 rm -f conftest*
17279
17280         LIBS="$ol_LIBS"
17281
17282 fi
17283
17284 echo "$ac_t""$ol_cv_db_db_4" 1>&6
17285
17286         if test $ol_cv_db_db_4 = yes ; then
17287                 ol_cv_lib_db=-ldb-4
17288         fi
17289 fi
17290
17291 if test $ol_cv_lib_db = no ; then
17292         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17293 echo "configure:17294: checking for Berkeley DB link (-ldb)" >&5
17294 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17295   echo $ac_n "(cached) $ac_c" 1>&6
17296 else
17297   
17298         ol_DB_LIB=-ldb
17299         ol_LIBS=$LIBS
17300         LIBS="$ol_DB_LIB $LIBS"
17301
17302         cat > conftest.$ac_ext <<EOF
17303 #line 17304 "configure"
17304 #include "confdefs.h"
17305
17306 #ifdef HAVE_DB_185_H
17307 # include <db_185.h>
17308 #else
17309 # include <db.h>
17310 #endif
17311
17312 #ifndef DB_VERSION_MAJOR
17313 # define DB_VERSION_MAJOR 1
17314 #endif
17315
17316 #ifndef NULL
17317 #define NULL ((void*)0)
17318 #endif
17319
17320 int main() {
17321
17322 #if DB_VERSION_MAJOR > 1
17323         {
17324                 char *version;
17325                 int major, minor, patch;
17326
17327                 version = db_version( &major, &minor, &patch );
17328
17329                 if( major != DB_VERSION_MAJOR ||
17330                         minor < DB_VERSION_MINOR )
17331                 {
17332                         printf("Berkeley DB version mismatch\n"
17333                                 "\texpected: %s\n\tgot: %s\n",
17334                                 DB_VERSION_STRING, version);
17335                         return 1;
17336                 }
17337         }
17338 #endif
17339
17340 #if DB_VERSION_MAJOR > 2
17341         db_env_create( NULL, 0 );
17342 #elif DB_VERSION_MAJOR > 1
17343         db_appexit( NULL );
17344 #else
17345         (void) dbopen( NULL, 0, 0, 0, NULL);
17346 #endif
17347
17348 ; return 0; }
17349 EOF
17350 if { (eval echo configure:17351: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17351   rm -rf conftest*
17352   ol_cv_db_db=yes
17353 else
17354   echo "configure: failed program was:" >&5
17355   cat conftest.$ac_ext >&5
17356   rm -rf conftest*
17357   ol_cv_db_db=no
17358 fi
17359 rm -f conftest*
17360
17361         LIBS="$ol_LIBS"
17362
17363 fi
17364
17365 echo "$ac_t""$ol_cv_db_db" 1>&6
17366
17367         if test $ol_cv_db_db = yes ; then
17368                 ol_cv_lib_db=-ldb
17369         fi
17370 fi
17371
17372 if test $ol_cv_lib_db = no ; then
17373         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17374 echo "configure:17375: checking for Berkeley DB link (-ldb3)" >&5
17375 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17376   echo $ac_n "(cached) $ac_c" 1>&6
17377 else
17378   
17379         ol_DB_LIB=-ldb3
17380         ol_LIBS=$LIBS
17381         LIBS="$ol_DB_LIB $LIBS"
17382
17383         cat > conftest.$ac_ext <<EOF
17384 #line 17385 "configure"
17385 #include "confdefs.h"
17386
17387 #ifdef HAVE_DB_185_H
17388 # include <db_185.h>
17389 #else
17390 # include <db.h>
17391 #endif
17392
17393 #ifndef DB_VERSION_MAJOR
17394 # define DB_VERSION_MAJOR 1
17395 #endif
17396
17397 #ifndef NULL
17398 #define NULL ((void*)0)
17399 #endif
17400
17401 int main() {
17402
17403 #if DB_VERSION_MAJOR > 1
17404         {
17405                 char *version;
17406                 int major, minor, patch;
17407
17408                 version = db_version( &major, &minor, &patch );
17409
17410                 if( major != DB_VERSION_MAJOR ||
17411                         minor < DB_VERSION_MINOR )
17412                 {
17413                         printf("Berkeley DB version mismatch\n"
17414                                 "\texpected: %s\n\tgot: %s\n",
17415                                 DB_VERSION_STRING, version);
17416                         return 1;
17417                 }
17418         }
17419 #endif
17420
17421 #if DB_VERSION_MAJOR > 2
17422         db_env_create( NULL, 0 );
17423 #elif DB_VERSION_MAJOR > 1
17424         db_appexit( NULL );
17425 #else
17426         (void) dbopen( NULL, 0, 0, 0, NULL);
17427 #endif
17428
17429 ; return 0; }
17430 EOF
17431 if { (eval echo configure:17432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17432   rm -rf conftest*
17433   ol_cv_db_db3=yes
17434 else
17435   echo "configure: failed program was:" >&5
17436   cat conftest.$ac_ext >&5
17437   rm -rf conftest*
17438   ol_cv_db_db3=no
17439 fi
17440 rm -f conftest*
17441
17442         LIBS="$ol_LIBS"
17443
17444 fi
17445
17446 echo "$ac_t""$ol_cv_db_db3" 1>&6
17447
17448         if test $ol_cv_db_db3 = yes ; then
17449                 ol_cv_lib_db=-ldb3
17450         fi
17451 fi
17452
17453 if test $ol_cv_lib_db = no ; then
17454         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
17455 echo "configure:17456: checking for Berkeley DB link (-ldb-3)" >&5
17456 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
17457   echo $ac_n "(cached) $ac_c" 1>&6
17458 else
17459   
17460         ol_DB_LIB=-ldb-3
17461         ol_LIBS=$LIBS
17462         LIBS="$ol_DB_LIB $LIBS"
17463
17464         cat > conftest.$ac_ext <<EOF
17465 #line 17466 "configure"
17466 #include "confdefs.h"
17467
17468 #ifdef HAVE_DB_185_H
17469 # include <db_185.h>
17470 #else
17471 # include <db.h>
17472 #endif
17473
17474 #ifndef DB_VERSION_MAJOR
17475 # define DB_VERSION_MAJOR 1
17476 #endif
17477
17478 #ifndef NULL
17479 #define NULL ((void*)0)
17480 #endif
17481
17482 int main() {
17483
17484 #if DB_VERSION_MAJOR > 1
17485         {
17486                 char *version;
17487                 int major, minor, patch;
17488
17489                 version = db_version( &major, &minor, &patch );
17490
17491                 if( major != DB_VERSION_MAJOR ||
17492                         minor < DB_VERSION_MINOR )
17493                 {
17494                         printf("Berkeley DB version mismatch\n"
17495                                 "\texpected: %s\n\tgot: %s\n",
17496                                 DB_VERSION_STRING, version);
17497                         return 1;
17498                 }
17499         }
17500 #endif
17501
17502 #if DB_VERSION_MAJOR > 2
17503         db_env_create( NULL, 0 );
17504 #elif DB_VERSION_MAJOR > 1
17505         db_appexit( NULL );
17506 #else
17507         (void) dbopen( NULL, 0, 0, 0, NULL);
17508 #endif
17509
17510 ; return 0; }
17511 EOF
17512 if { (eval echo configure:17513: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17513   rm -rf conftest*
17514   ol_cv_db_db_3=yes
17515 else
17516   echo "configure: failed program was:" >&5
17517   cat conftest.$ac_ext >&5
17518   rm -rf conftest*
17519   ol_cv_db_db_3=no
17520 fi
17521 rm -f conftest*
17522
17523         LIBS="$ol_LIBS"
17524
17525 fi
17526
17527 echo "$ac_t""$ol_cv_db_db_3" 1>&6
17528
17529         if test $ol_cv_db_db_3 = yes ; then
17530                 ol_cv_lib_db=-ldb-3
17531         fi
17532 fi
17533
17534 if test $ol_cv_lib_db = no ; then
17535         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17536 echo "configure:17537: checking for Berkeley DB link (-ldb2)" >&5
17537 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17538   echo $ac_n "(cached) $ac_c" 1>&6
17539 else
17540   
17541         ol_DB_LIB=-ldb2
17542         ol_LIBS=$LIBS
17543         LIBS="$ol_DB_LIB $LIBS"
17544
17545         cat > conftest.$ac_ext <<EOF
17546 #line 17547 "configure"
17547 #include "confdefs.h"
17548
17549 #ifdef HAVE_DB_185_H
17550 # include <db_185.h>
17551 #else
17552 # include <db.h>
17553 #endif
17554
17555 #ifndef DB_VERSION_MAJOR
17556 # define DB_VERSION_MAJOR 1
17557 #endif
17558
17559 #ifndef NULL
17560 #define NULL ((void*)0)
17561 #endif
17562
17563 int main() {
17564
17565 #if DB_VERSION_MAJOR > 1
17566         {
17567                 char *version;
17568                 int major, minor, patch;
17569
17570                 version = db_version( &major, &minor, &patch );
17571
17572                 if( major != DB_VERSION_MAJOR ||
17573                         minor < DB_VERSION_MINOR )
17574                 {
17575                         printf("Berkeley DB version mismatch\n"
17576                                 "\texpected: %s\n\tgot: %s\n",
17577                                 DB_VERSION_STRING, version);
17578                         return 1;
17579                 }
17580         }
17581 #endif
17582
17583 #if DB_VERSION_MAJOR > 2
17584         db_env_create( NULL, 0 );
17585 #elif DB_VERSION_MAJOR > 1
17586         db_appexit( NULL );
17587 #else
17588         (void) dbopen( NULL, 0, 0, 0, NULL);
17589 #endif
17590
17591 ; return 0; }
17592 EOF
17593 if { (eval echo configure:17594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17594   rm -rf conftest*
17595   ol_cv_db_db2=yes
17596 else
17597   echo "configure: failed program was:" >&5
17598   cat conftest.$ac_ext >&5
17599   rm -rf conftest*
17600   ol_cv_db_db2=no
17601 fi
17602 rm -f conftest*
17603
17604         LIBS="$ol_LIBS"
17605
17606 fi
17607
17608 echo "$ac_t""$ol_cv_db_db2" 1>&6
17609
17610         if test $ol_cv_db_db2 = yes ; then
17611                 ol_cv_lib_db=-ldb2
17612         fi
17613 fi
17614
17615 if test $ol_cv_lib_db = no ; then
17616         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
17617 echo "configure:17618: checking for Berkeley DB link (-ldb-2)" >&5
17618 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
17619   echo $ac_n "(cached) $ac_c" 1>&6
17620 else
17621   
17622         ol_DB_LIB=-ldb-2
17623         ol_LIBS=$LIBS
17624         LIBS="$ol_DB_LIB $LIBS"
17625
17626         cat > conftest.$ac_ext <<EOF
17627 #line 17628 "configure"
17628 #include "confdefs.h"
17629
17630 #ifdef HAVE_DB_185_H
17631 # include <db_185.h>
17632 #else
17633 # include <db.h>
17634 #endif
17635
17636 #ifndef DB_VERSION_MAJOR
17637 # define DB_VERSION_MAJOR 1
17638 #endif
17639
17640 #ifndef NULL
17641 #define NULL ((void*)0)
17642 #endif
17643
17644 int main() {
17645
17646 #if DB_VERSION_MAJOR > 1
17647         {
17648                 char *version;
17649                 int major, minor, patch;
17650
17651                 version = db_version( &major, &minor, &patch );
17652
17653                 if( major != DB_VERSION_MAJOR ||
17654                         minor < DB_VERSION_MINOR )
17655                 {
17656                         printf("Berkeley DB version mismatch\n"
17657                                 "\texpected: %s\n\tgot: %s\n",
17658                                 DB_VERSION_STRING, version);
17659                         return 1;
17660                 }
17661         }
17662 #endif
17663
17664 #if DB_VERSION_MAJOR > 2
17665         db_env_create( NULL, 0 );
17666 #elif DB_VERSION_MAJOR > 1
17667         db_appexit( NULL );
17668 #else
17669         (void) dbopen( NULL, 0, 0, 0, NULL);
17670 #endif
17671
17672 ; return 0; }
17673 EOF
17674 if { (eval echo configure:17675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17675   rm -rf conftest*
17676   ol_cv_db_db_2=yes
17677 else
17678   echo "configure: failed program was:" >&5
17679   cat conftest.$ac_ext >&5
17680   rm -rf conftest*
17681   ol_cv_db_db_2=no
17682 fi
17683 rm -f conftest*
17684
17685         LIBS="$ol_LIBS"
17686
17687 fi
17688
17689 echo "$ac_t""$ol_cv_db_db_2" 1>&6
17690
17691         if test $ol_cv_db_db_2 = yes ; then
17692                 ol_cv_lib_db=-ldb-2
17693         fi
17694 fi
17695
17696 if test $ol_cv_lib_db = no ; then
17697         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17698 echo "configure:17699: checking for Berkeley DB link (-ldb1)" >&5
17699 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17700   echo $ac_n "(cached) $ac_c" 1>&6
17701 else
17702   
17703         ol_DB_LIB=-ldb1
17704         ol_LIBS=$LIBS
17705         LIBS="$ol_DB_LIB $LIBS"
17706
17707         cat > conftest.$ac_ext <<EOF
17708 #line 17709 "configure"
17709 #include "confdefs.h"
17710
17711 #ifdef HAVE_DB_185_H
17712 # include <db_185.h>
17713 #else
17714 # include <db.h>
17715 #endif
17716
17717 #ifndef DB_VERSION_MAJOR
17718 # define DB_VERSION_MAJOR 1
17719 #endif
17720
17721 #ifndef NULL
17722 #define NULL ((void*)0)
17723 #endif
17724
17725 int main() {
17726
17727 #if DB_VERSION_MAJOR > 1
17728         {
17729                 char *version;
17730                 int major, minor, patch;
17731
17732                 version = db_version( &major, &minor, &patch );
17733
17734                 if( major != DB_VERSION_MAJOR ||
17735                         minor < DB_VERSION_MINOR )
17736                 {
17737                         printf("Berkeley DB version mismatch\n"
17738                                 "\texpected: %s\n\tgot: %s\n",
17739                                 DB_VERSION_STRING, version);
17740                         return 1;
17741                 }
17742         }
17743 #endif
17744
17745 #if DB_VERSION_MAJOR > 2
17746         db_env_create( NULL, 0 );
17747 #elif DB_VERSION_MAJOR > 1
17748         db_appexit( NULL );
17749 #else
17750         (void) dbopen( NULL, 0, 0, 0, NULL);
17751 #endif
17752
17753 ; return 0; }
17754 EOF
17755 if { (eval echo configure:17756: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17756   rm -rf conftest*
17757   ol_cv_db_db1=yes
17758 else
17759   echo "configure: failed program was:" >&5
17760   cat conftest.$ac_ext >&5
17761   rm -rf conftest*
17762   ol_cv_db_db1=no
17763 fi
17764 rm -f conftest*
17765
17766         LIBS="$ol_LIBS"
17767
17768 fi
17769
17770 echo "$ac_t""$ol_cv_db_db1" 1>&6
17771
17772         if test $ol_cv_db_db1 = yes ; then
17773                 ol_cv_lib_db=-ldb1
17774         fi
17775 fi
17776
17777 if test $ol_cv_lib_db = no ; then
17778         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
17779 echo "configure:17780: checking for Berkeley DB link (-ldb-1)" >&5
17780 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
17781   echo $ac_n "(cached) $ac_c" 1>&6
17782 else
17783   
17784         ol_DB_LIB=-ldb-1
17785         ol_LIBS=$LIBS
17786         LIBS="$ol_DB_LIB $LIBS"
17787
17788         cat > conftest.$ac_ext <<EOF
17789 #line 17790 "configure"
17790 #include "confdefs.h"
17791
17792 #ifdef HAVE_DB_185_H
17793 # include <db_185.h>
17794 #else
17795 # include <db.h>
17796 #endif
17797
17798 #ifndef DB_VERSION_MAJOR
17799 # define DB_VERSION_MAJOR 1
17800 #endif
17801
17802 #ifndef NULL
17803 #define NULL ((void*)0)
17804 #endif
17805
17806 int main() {
17807
17808 #if DB_VERSION_MAJOR > 1
17809         {
17810                 char *version;
17811                 int major, minor, patch;
17812
17813                 version = db_version( &major, &minor, &patch );
17814
17815                 if( major != DB_VERSION_MAJOR ||
17816                         minor < DB_VERSION_MINOR )
17817                 {
17818                         printf("Berkeley DB version mismatch\n"
17819                                 "\texpected: %s\n\tgot: %s\n",
17820                                 DB_VERSION_STRING, version);
17821                         return 1;
17822                 }
17823         }
17824 #endif
17825
17826 #if DB_VERSION_MAJOR > 2
17827         db_env_create( NULL, 0 );
17828 #elif DB_VERSION_MAJOR > 1
17829         db_appexit( NULL );
17830 #else
17831         (void) dbopen( NULL, 0, 0, 0, NULL);
17832 #endif
17833
17834 ; return 0; }
17835 EOF
17836 if { (eval echo configure:17837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17837   rm -rf conftest*
17838   ol_cv_db_db_1=yes
17839 else
17840   echo "configure: failed program was:" >&5
17841   cat conftest.$ac_ext >&5
17842   rm -rf conftest*
17843   ol_cv_db_db_1=no
17844 fi
17845 rm -f conftest*
17846
17847         LIBS="$ol_LIBS"
17848
17849 fi
17850
17851 echo "$ac_t""$ol_cv_db_db_1" 1>&6
17852
17853         if test $ol_cv_db_db_1 = yes ; then
17854                 ol_cv_lib_db=-ldb-1
17855         fi
17856 fi
17857
17858
17859                 if test "$ol_cv_lib_db" != no ; then
17860                         ol_cv_berkeley_db=yes
17861                 fi
17862         fi
17863 fi
17864
17865         else
17866                 ol_cv_berkeley_db=no
17867 for ac_hdr in db.h
17868 do
17869 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17870 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17871 echo "configure:17872: checking for $ac_hdr" >&5
17872 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17873   echo $ac_n "(cached) $ac_c" 1>&6
17874 else
17875   cat > conftest.$ac_ext <<EOF
17876 #line 17877 "configure"
17877 #include "confdefs.h"
17878 #include <$ac_hdr>
17879 EOF
17880 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17881 { (eval echo configure:17882: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17882 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17883 if test -z "$ac_err"; then
17884   rm -rf conftest*
17885   eval "ac_cv_header_$ac_safe=yes"
17886 else
17887   echo "$ac_err" >&5
17888   echo "configure: failed program was:" >&5
17889   cat conftest.$ac_ext >&5
17890   rm -rf conftest*
17891   eval "ac_cv_header_$ac_safe=no"
17892 fi
17893 rm -f conftest*
17894 fi
17895 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17896   echo "$ac_t""yes" 1>&6
17897     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17898   cat >> confdefs.h <<EOF
17899 #define $ac_tr_hdr 1
17900 EOF
17901  
17902 else
17903   echo "$ac_t""no" 1>&6
17904 fi
17905 done
17906
17907 if test $ac_cv_header_db_h = yes; then
17908         ol_cv_lib_db=no
17909 if test $ol_cv_lib_db = no ; then
17910         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17911 echo "configure:17912: checking for Berkeley DB link (default)" >&5
17912 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17913   echo $ac_n "(cached) $ac_c" 1>&6
17914 else
17915   
17916         ol_DB_LIB=
17917         ol_LIBS=$LIBS
17918         LIBS="$ol_DB_LIB $LIBS"
17919
17920         cat > conftest.$ac_ext <<EOF
17921 #line 17922 "configure"
17922 #include "confdefs.h"
17923
17924 #ifdef HAVE_DB_185_H
17925 # include <db_185.h>
17926 #else
17927 # include <db.h>
17928 #endif
17929
17930 #ifndef DB_VERSION_MAJOR
17931 # define DB_VERSION_MAJOR 1
17932 #endif
17933
17934 #ifndef NULL
17935 #define NULL ((void*)0)
17936 #endif
17937
17938 int main() {
17939
17940 #if DB_VERSION_MAJOR > 1
17941         {
17942                 char *version;
17943                 int major, minor, patch;
17944
17945                 version = db_version( &major, &minor, &patch );
17946
17947                 if( major != DB_VERSION_MAJOR ||
17948                         minor < DB_VERSION_MINOR )
17949                 {
17950                         printf("Berkeley DB version mismatch\n"
17951                                 "\texpected: %s\n\tgot: %s\n",
17952                                 DB_VERSION_STRING, version);
17953                         return 1;
17954                 }
17955         }
17956 #endif
17957
17958 #if DB_VERSION_MAJOR > 2
17959         db_env_create( NULL, 0 );
17960 #elif DB_VERSION_MAJOR > 1
17961         db_appexit( NULL );
17962 #else
17963         (void) dbopen( NULL, 0, 0, 0, NULL);
17964 #endif
17965
17966 ; return 0; }
17967 EOF
17968 if { (eval echo configure:17969: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17969   rm -rf conftest*
17970   ol_cv_db_none=yes
17971 else
17972   echo "configure: failed program was:" >&5
17973   cat conftest.$ac_ext >&5
17974   rm -rf conftest*
17975   ol_cv_db_none=no
17976 fi
17977 rm -f conftest*
17978
17979         LIBS="$ol_LIBS"
17980
17981 fi
17982
17983 echo "$ac_t""$ol_cv_db_none" 1>&6
17984
17985         if test $ol_cv_db_none = yes ; then
17986                 ol_cv_lib_db=yes
17987         fi
17988 fi
17989
17990 if test $ol_cv_lib_db = no ; then
17991         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17992 echo "configure:17993: checking for Berkeley DB link (-ldb4)" >&5
17993 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17994   echo $ac_n "(cached) $ac_c" 1>&6
17995 else
17996   
17997         ol_DB_LIB=-ldb4
17998         ol_LIBS=$LIBS
17999         LIBS="$ol_DB_LIB $LIBS"
18000
18001         cat > conftest.$ac_ext <<EOF
18002 #line 18003 "configure"
18003 #include "confdefs.h"
18004
18005 #ifdef HAVE_DB_185_H
18006 # include <db_185.h>
18007 #else
18008 # include <db.h>
18009 #endif
18010
18011 #ifndef DB_VERSION_MAJOR
18012 # define DB_VERSION_MAJOR 1
18013 #endif
18014
18015 #ifndef NULL
18016 #define NULL ((void*)0)
18017 #endif
18018
18019 int main() {
18020
18021 #if DB_VERSION_MAJOR > 1
18022         {
18023                 char *version;
18024                 int major, minor, patch;
18025
18026                 version = db_version( &major, &minor, &patch );
18027
18028                 if( major != DB_VERSION_MAJOR ||
18029                         minor < DB_VERSION_MINOR )
18030                 {
18031                         printf("Berkeley DB version mismatch\n"
18032                                 "\texpected: %s\n\tgot: %s\n",
18033                                 DB_VERSION_STRING, version);
18034                         return 1;
18035                 }
18036         }
18037 #endif
18038
18039 #if DB_VERSION_MAJOR > 2
18040         db_env_create( NULL, 0 );
18041 #elif DB_VERSION_MAJOR > 1
18042         db_appexit( NULL );
18043 #else
18044         (void) dbopen( NULL, 0, 0, 0, NULL);
18045 #endif
18046
18047 ; return 0; }
18048 EOF
18049 if { (eval echo configure:18050: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18050   rm -rf conftest*
18051   ol_cv_db_db4=yes
18052 else
18053   echo "configure: failed program was:" >&5
18054   cat conftest.$ac_ext >&5
18055   rm -rf conftest*
18056   ol_cv_db_db4=no
18057 fi
18058 rm -f conftest*
18059
18060         LIBS="$ol_LIBS"
18061
18062 fi
18063
18064 echo "$ac_t""$ol_cv_db_db4" 1>&6
18065
18066         if test $ol_cv_db_db4 = yes ; then
18067                 ol_cv_lib_db=-ldb4
18068         fi
18069 fi
18070
18071 if test $ol_cv_lib_db = no ; then
18072         echo $ac_n "checking for Berkeley DB link (-ldb-4)""... $ac_c" 1>&6
18073 echo "configure:18074: checking for Berkeley DB link (-ldb-4)" >&5
18074 if eval "test \"\${ol_cv_db_db_4+set}\" = set"; then
18075   echo $ac_n "(cached) $ac_c" 1>&6
18076 else
18077   
18078         ol_DB_LIB=-ldb-4
18079         ol_LIBS=$LIBS
18080         LIBS="$ol_DB_LIB $LIBS"
18081
18082         cat > conftest.$ac_ext <<EOF
18083 #line 18084 "configure"
18084 #include "confdefs.h"
18085
18086 #ifdef HAVE_DB_185_H
18087 # include <db_185.h>
18088 #else
18089 # include <db.h>
18090 #endif
18091
18092 #ifndef DB_VERSION_MAJOR
18093 # define DB_VERSION_MAJOR 1
18094 #endif
18095
18096 #ifndef NULL
18097 #define NULL ((void*)0)
18098 #endif
18099
18100 int main() {
18101
18102 #if DB_VERSION_MAJOR > 1
18103         {
18104                 char *version;
18105                 int major, minor, patch;
18106
18107                 version = db_version( &major, &minor, &patch );
18108
18109                 if( major != DB_VERSION_MAJOR ||
18110                         minor < DB_VERSION_MINOR )
18111                 {
18112                         printf("Berkeley DB version mismatch\n"
18113                                 "\texpected: %s\n\tgot: %s\n",
18114                                 DB_VERSION_STRING, version);
18115                         return 1;
18116                 }
18117         }
18118 #endif
18119
18120 #if DB_VERSION_MAJOR > 2
18121         db_env_create( NULL, 0 );
18122 #elif DB_VERSION_MAJOR > 1
18123         db_appexit( NULL );
18124 #else
18125         (void) dbopen( NULL, 0, 0, 0, NULL);
18126 #endif
18127
18128 ; return 0; }
18129 EOF
18130 if { (eval echo configure:18131: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18131   rm -rf conftest*
18132   ol_cv_db_db_4=yes
18133 else
18134   echo "configure: failed program was:" >&5
18135   cat conftest.$ac_ext >&5
18136   rm -rf conftest*
18137   ol_cv_db_db_4=no
18138 fi
18139 rm -f conftest*
18140
18141         LIBS="$ol_LIBS"
18142
18143 fi
18144
18145 echo "$ac_t""$ol_cv_db_db_4" 1>&6
18146
18147         if test $ol_cv_db_db_4 = yes ; then
18148                 ol_cv_lib_db=-ldb-4
18149         fi
18150 fi
18151
18152 if test $ol_cv_lib_db = no ; then
18153         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
18154 echo "configure:18155: checking for Berkeley DB link (-ldb)" >&5
18155 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
18156   echo $ac_n "(cached) $ac_c" 1>&6
18157 else
18158   
18159         ol_DB_LIB=-ldb
18160         ol_LIBS=$LIBS
18161         LIBS="$ol_DB_LIB $LIBS"
18162
18163         cat > conftest.$ac_ext <<EOF
18164 #line 18165 "configure"
18165 #include "confdefs.h"
18166
18167 #ifdef HAVE_DB_185_H
18168 # include <db_185.h>
18169 #else
18170 # include <db.h>
18171 #endif
18172
18173 #ifndef DB_VERSION_MAJOR
18174 # define DB_VERSION_MAJOR 1
18175 #endif
18176
18177 #ifndef NULL
18178 #define NULL ((void*)0)
18179 #endif
18180
18181 int main() {
18182
18183 #if DB_VERSION_MAJOR > 1
18184         {
18185                 char *version;
18186                 int major, minor, patch;
18187
18188                 version = db_version( &major, &minor, &patch );
18189
18190                 if( major != DB_VERSION_MAJOR ||
18191                         minor < DB_VERSION_MINOR )
18192                 {
18193                         printf("Berkeley DB version mismatch\n"
18194                                 "\texpected: %s\n\tgot: %s\n",
18195                                 DB_VERSION_STRING, version);
18196                         return 1;
18197                 }
18198         }
18199 #endif
18200
18201 #if DB_VERSION_MAJOR > 2
18202         db_env_create( NULL, 0 );
18203 #elif DB_VERSION_MAJOR > 1
18204         db_appexit( NULL );
18205 #else
18206         (void) dbopen( NULL, 0, 0, 0, NULL);
18207 #endif
18208
18209 ; return 0; }
18210 EOF
18211 if { (eval echo configure:18212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18212   rm -rf conftest*
18213   ol_cv_db_db=yes
18214 else
18215   echo "configure: failed program was:" >&5
18216   cat conftest.$ac_ext >&5
18217   rm -rf conftest*
18218   ol_cv_db_db=no
18219 fi
18220 rm -f conftest*
18221
18222         LIBS="$ol_LIBS"
18223
18224 fi
18225
18226 echo "$ac_t""$ol_cv_db_db" 1>&6
18227
18228         if test $ol_cv_db_db = yes ; then
18229                 ol_cv_lib_db=-ldb
18230         fi
18231 fi
18232
18233 if test $ol_cv_lib_db = no ; then
18234         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
18235 echo "configure:18236: checking for Berkeley DB link (-ldb3)" >&5
18236 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
18237   echo $ac_n "(cached) $ac_c" 1>&6
18238 else
18239   
18240         ol_DB_LIB=-ldb3
18241         ol_LIBS=$LIBS
18242         LIBS="$ol_DB_LIB $LIBS"
18243
18244         cat > conftest.$ac_ext <<EOF
18245 #line 18246 "configure"
18246 #include "confdefs.h"
18247
18248 #ifdef HAVE_DB_185_H
18249 # include <db_185.h>
18250 #else
18251 # include <db.h>
18252 #endif
18253
18254 #ifndef DB_VERSION_MAJOR
18255 # define DB_VERSION_MAJOR 1
18256 #endif
18257
18258 #ifndef NULL
18259 #define NULL ((void*)0)
18260 #endif
18261
18262 int main() {
18263
18264 #if DB_VERSION_MAJOR > 1
18265         {
18266                 char *version;
18267                 int major, minor, patch;
18268
18269                 version = db_version( &major, &minor, &patch );
18270
18271                 if( major != DB_VERSION_MAJOR ||
18272                         minor < DB_VERSION_MINOR )
18273                 {
18274                         printf("Berkeley DB version mismatch\n"
18275                                 "\texpected: %s\n\tgot: %s\n",
18276                                 DB_VERSION_STRING, version);
18277                         return 1;
18278                 }
18279         }
18280 #endif
18281
18282 #if DB_VERSION_MAJOR > 2
18283         db_env_create( NULL, 0 );
18284 #elif DB_VERSION_MAJOR > 1
18285         db_appexit( NULL );
18286 #else
18287         (void) dbopen( NULL, 0, 0, 0, NULL);
18288 #endif
18289
18290 ; return 0; }
18291 EOF
18292 if { (eval echo configure:18293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18293   rm -rf conftest*
18294   ol_cv_db_db3=yes
18295 else
18296   echo "configure: failed program was:" >&5
18297   cat conftest.$ac_ext >&5
18298   rm -rf conftest*
18299   ol_cv_db_db3=no
18300 fi
18301 rm -f conftest*
18302
18303         LIBS="$ol_LIBS"
18304
18305 fi
18306
18307 echo "$ac_t""$ol_cv_db_db3" 1>&6
18308
18309         if test $ol_cv_db_db3 = yes ; then
18310                 ol_cv_lib_db=-ldb3
18311         fi
18312 fi
18313
18314 if test $ol_cv_lib_db = no ; then
18315         echo $ac_n "checking for Berkeley DB link (-ldb-3)""... $ac_c" 1>&6
18316 echo "configure:18317: checking for Berkeley DB link (-ldb-3)" >&5
18317 if eval "test \"\${ol_cv_db_db_3+set}\" = set"; then
18318   echo $ac_n "(cached) $ac_c" 1>&6
18319 else
18320   
18321         ol_DB_LIB=-ldb-3
18322         ol_LIBS=$LIBS
18323         LIBS="$ol_DB_LIB $LIBS"
18324
18325         cat > conftest.$ac_ext <<EOF
18326 #line 18327 "configure"
18327 #include "confdefs.h"
18328
18329 #ifdef HAVE_DB_185_H
18330 # include <db_185.h>
18331 #else
18332 # include <db.h>
18333 #endif
18334
18335 #ifndef DB_VERSION_MAJOR
18336 # define DB_VERSION_MAJOR 1
18337 #endif
18338
18339 #ifndef NULL
18340 #define NULL ((void*)0)
18341 #endif
18342
18343 int main() {
18344
18345 #if DB_VERSION_MAJOR > 1
18346         {
18347                 char *version;
18348                 int major, minor, patch;
18349
18350                 version = db_version( &major, &minor, &patch );
18351
18352                 if( major != DB_VERSION_MAJOR ||
18353                         minor < DB_VERSION_MINOR )
18354                 {
18355                         printf("Berkeley DB version mismatch\n"
18356                                 "\texpected: %s\n\tgot: %s\n",
18357                                 DB_VERSION_STRING, version);
18358                         return 1;
18359                 }
18360         }
18361 #endif
18362
18363 #if DB_VERSION_MAJOR > 2
18364         db_env_create( NULL, 0 );
18365 #elif DB_VERSION_MAJOR > 1
18366         db_appexit( NULL );
18367 #else
18368         (void) dbopen( NULL, 0, 0, 0, NULL);
18369 #endif
18370
18371 ; return 0; }
18372 EOF
18373 if { (eval echo configure:18374: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18374   rm -rf conftest*
18375   ol_cv_db_db_3=yes
18376 else
18377   echo "configure: failed program was:" >&5
18378   cat conftest.$ac_ext >&5
18379   rm -rf conftest*
18380   ol_cv_db_db_3=no
18381 fi
18382 rm -f conftest*
18383
18384         LIBS="$ol_LIBS"
18385
18386 fi
18387
18388 echo "$ac_t""$ol_cv_db_db_3" 1>&6
18389
18390         if test $ol_cv_db_db_3 = yes ; then
18391                 ol_cv_lib_db=-ldb-3
18392         fi
18393 fi
18394
18395 if test $ol_cv_lib_db = no ; then
18396         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18397 echo "configure:18398: checking for Berkeley DB link (-ldb2)" >&5
18398 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18399   echo $ac_n "(cached) $ac_c" 1>&6
18400 else
18401   
18402         ol_DB_LIB=-ldb2
18403         ol_LIBS=$LIBS
18404         LIBS="$ol_DB_LIB $LIBS"
18405
18406         cat > conftest.$ac_ext <<EOF
18407 #line 18408 "configure"
18408 #include "confdefs.h"
18409
18410 #ifdef HAVE_DB_185_H
18411 # include <db_185.h>
18412 #else
18413 # include <db.h>
18414 #endif
18415
18416 #ifndef DB_VERSION_MAJOR
18417 # define DB_VERSION_MAJOR 1
18418 #endif
18419
18420 #ifndef NULL
18421 #define NULL ((void*)0)
18422 #endif
18423
18424 int main() {
18425
18426 #if DB_VERSION_MAJOR > 1
18427         {
18428                 char *version;
18429                 int major, minor, patch;
18430
18431                 version = db_version( &major, &minor, &patch );
18432
18433                 if( major != DB_VERSION_MAJOR ||
18434                         minor < DB_VERSION_MINOR )
18435                 {
18436                         printf("Berkeley DB version mismatch\n"
18437                                 "\texpected: %s\n\tgot: %s\n",
18438                                 DB_VERSION_STRING, version);
18439                         return 1;
18440                 }
18441         }
18442 #endif
18443
18444 #if DB_VERSION_MAJOR > 2
18445         db_env_create( NULL, 0 );
18446 #elif DB_VERSION_MAJOR > 1
18447         db_appexit( NULL );
18448 #else
18449         (void) dbopen( NULL, 0, 0, 0, NULL);
18450 #endif
18451
18452 ; return 0; }
18453 EOF
18454 if { (eval echo configure:18455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18455   rm -rf conftest*
18456   ol_cv_db_db2=yes
18457 else
18458   echo "configure: failed program was:" >&5
18459   cat conftest.$ac_ext >&5
18460   rm -rf conftest*
18461   ol_cv_db_db2=no
18462 fi
18463 rm -f conftest*
18464
18465         LIBS="$ol_LIBS"
18466
18467 fi
18468
18469 echo "$ac_t""$ol_cv_db_db2" 1>&6
18470
18471         if test $ol_cv_db_db2 = yes ; then
18472                 ol_cv_lib_db=-ldb2
18473         fi
18474 fi
18475
18476 if test $ol_cv_lib_db = no ; then
18477         echo $ac_n "checking for Berkeley DB link (-ldb-2)""... $ac_c" 1>&6
18478 echo "configure:18479: checking for Berkeley DB link (-ldb-2)" >&5
18479 if eval "test \"\${ol_cv_db_db_2+set}\" = set"; then
18480   echo $ac_n "(cached) $ac_c" 1>&6
18481 else
18482   
18483         ol_DB_LIB=-ldb-2
18484         ol_LIBS=$LIBS
18485         LIBS="$ol_DB_LIB $LIBS"
18486
18487         cat > conftest.$ac_ext <<EOF
18488 #line 18489 "configure"
18489 #include "confdefs.h"
18490
18491 #ifdef HAVE_DB_185_H
18492 # include <db_185.h>
18493 #else
18494 # include <db.h>
18495 #endif
18496
18497 #ifndef DB_VERSION_MAJOR
18498 # define DB_VERSION_MAJOR 1
18499 #endif
18500
18501 #ifndef NULL
18502 #define NULL ((void*)0)
18503 #endif
18504
18505 int main() {
18506
18507 #if DB_VERSION_MAJOR > 1
18508         {
18509                 char *version;
18510                 int major, minor, patch;
18511
18512                 version = db_version( &major, &minor, &patch );
18513
18514                 if( major != DB_VERSION_MAJOR ||
18515                         minor < DB_VERSION_MINOR )
18516                 {
18517                         printf("Berkeley DB version mismatch\n"
18518                                 "\texpected: %s\n\tgot: %s\n",
18519                                 DB_VERSION_STRING, version);
18520                         return 1;
18521                 }
18522         }
18523 #endif
18524
18525 #if DB_VERSION_MAJOR > 2
18526         db_env_create( NULL, 0 );
18527 #elif DB_VERSION_MAJOR > 1
18528         db_appexit( NULL );
18529 #else
18530         (void) dbopen( NULL, 0, 0, 0, NULL);
18531 #endif
18532
18533 ; return 0; }
18534 EOF
18535 if { (eval echo configure:18536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18536   rm -rf conftest*
18537   ol_cv_db_db_2=yes
18538 else
18539   echo "configure: failed program was:" >&5
18540   cat conftest.$ac_ext >&5
18541   rm -rf conftest*
18542   ol_cv_db_db_2=no
18543 fi
18544 rm -f conftest*
18545
18546         LIBS="$ol_LIBS"
18547
18548 fi
18549
18550 echo "$ac_t""$ol_cv_db_db_2" 1>&6
18551
18552         if test $ol_cv_db_db_2 = yes ; then
18553                 ol_cv_lib_db=-ldb-2
18554         fi
18555 fi
18556
18557 if test $ol_cv_lib_db = no ; then
18558         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18559 echo "configure:18560: checking for Berkeley DB link (-ldb1)" >&5
18560 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18561   echo $ac_n "(cached) $ac_c" 1>&6
18562 else
18563   
18564         ol_DB_LIB=-ldb1
18565         ol_LIBS=$LIBS
18566         LIBS="$ol_DB_LIB $LIBS"
18567
18568         cat > conftest.$ac_ext <<EOF
18569 #line 18570 "configure"
18570 #include "confdefs.h"
18571
18572 #ifdef HAVE_DB_185_H
18573 # include <db_185.h>
18574 #else
18575 # include <db.h>
18576 #endif
18577
18578 #ifndef DB_VERSION_MAJOR
18579 # define DB_VERSION_MAJOR 1
18580 #endif
18581
18582 #ifndef NULL
18583 #define NULL ((void*)0)
18584 #endif
18585
18586 int main() {
18587
18588 #if DB_VERSION_MAJOR > 1
18589         {
18590                 char *version;
18591                 int major, minor, patch;
18592
18593                 version = db_version( &major, &minor, &patch );
18594
18595                 if( major != DB_VERSION_MAJOR ||
18596                         minor < DB_VERSION_MINOR )
18597                 {
18598                         printf("Berkeley DB version mismatch\n"
18599                                 "\texpected: %s\n\tgot: %s\n",
18600                                 DB_VERSION_STRING, version);
18601                         return 1;
18602                 }
18603         }
18604 #endif
18605
18606 #if DB_VERSION_MAJOR > 2
18607         db_env_create( NULL, 0 );
18608 #elif DB_VERSION_MAJOR > 1
18609         db_appexit( NULL );
18610 #else
18611         (void) dbopen( NULL, 0, 0, 0, NULL);
18612 #endif
18613
18614 ; return 0; }
18615 EOF
18616 if { (eval echo configure:18617: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18617   rm -rf conftest*
18618   ol_cv_db_db1=yes
18619 else
18620   echo "configure: failed program was:" >&5
18621   cat conftest.$ac_ext >&5
18622   rm -rf conftest*
18623   ol_cv_db_db1=no
18624 fi
18625 rm -f conftest*
18626
18627         LIBS="$ol_LIBS"
18628
18629 fi
18630
18631 echo "$ac_t""$ol_cv_db_db1" 1>&6
18632
18633         if test $ol_cv_db_db1 = yes ; then
18634                 ol_cv_lib_db=-ldb1
18635         fi
18636 fi
18637
18638 if test $ol_cv_lib_db = no ; then
18639         echo $ac_n "checking for Berkeley DB link (-ldb-1)""... $ac_c" 1>&6
18640 echo "configure:18641: checking for Berkeley DB link (-ldb-1)" >&5
18641 if eval "test \"\${ol_cv_db_db_1+set}\" = set"; then
18642   echo $ac_n "(cached) $ac_c" 1>&6
18643 else
18644   
18645         ol_DB_LIB=-ldb-1
18646         ol_LIBS=$LIBS
18647         LIBS="$ol_DB_LIB $LIBS"
18648
18649         cat > conftest.$ac_ext <<EOF
18650 #line 18651 "configure"
18651 #include "confdefs.h"
18652
18653 #ifdef HAVE_DB_185_H
18654 # include <db_185.h>
18655 #else
18656 # include <db.h>
18657 #endif
18658
18659 #ifndef DB_VERSION_MAJOR
18660 # define DB_VERSION_MAJOR 1
18661 #endif
18662
18663 #ifndef NULL
18664 #define NULL ((void*)0)
18665 #endif
18666
18667 int main() {
18668
18669 #if DB_VERSION_MAJOR > 1
18670         {
18671                 char *version;
18672                 int major, minor, patch;
18673
18674                 version = db_version( &major, &minor, &patch );
18675
18676                 if( major != DB_VERSION_MAJOR ||
18677                         minor < DB_VERSION_MINOR )
18678                 {
18679                         printf("Berkeley DB version mismatch\n"
18680                                 "\texpected: %s\n\tgot: %s\n",
18681                                 DB_VERSION_STRING, version);
18682                         return 1;
18683                 }
18684         }
18685 #endif
18686
18687 #if DB_VERSION_MAJOR > 2
18688         db_env_create( NULL, 0 );
18689 #elif DB_VERSION_MAJOR > 1
18690         db_appexit( NULL );
18691 #else
18692         (void) dbopen( NULL, 0, 0, 0, NULL);
18693 #endif
18694
18695 ; return 0; }
18696 EOF
18697 if { (eval echo configure:18698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18698   rm -rf conftest*
18699   ol_cv_db_db_1=yes
18700 else
18701   echo "configure: failed program was:" >&5
18702   cat conftest.$ac_ext >&5
18703   rm -rf conftest*
18704   ol_cv_db_db_1=no
18705 fi
18706 rm -f conftest*
18707
18708         LIBS="$ol_LIBS"
18709
18710 fi
18711
18712 echo "$ac_t""$ol_cv_db_db_1" 1>&6
18713
18714         if test $ol_cv_db_db_1 = yes ; then
18715                 ol_cv_lib_db=-ldb-1
18716         fi
18717 fi
18718
18719
18720         if test "$ol_cv_lib_db" != no ; then
18721                 ol_cv_berkeley_db=yes
18722                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18723 echo "configure:18724: checking for Berkeley DB thread support" >&5
18724 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18725   echo $ac_n "(cached) $ac_c" 1>&6
18726 else
18727   
18728         ol_LIBS="$LIBS"
18729         if test $ol_cv_lib_db != yes ; then
18730                 LIBS="$ol_cv_lib_db"
18731         fi
18732
18733         if test "$cross_compiling" = yes; then
18734   ol_cv_berkeley_db_thread=cross
18735 else
18736   cat > conftest.$ac_ext <<EOF
18737 #line 18738 "configure"
18738 #include "confdefs.h"
18739
18740 #ifdef HAVE_DB_185_H
18741         choke me;
18742 #else
18743 #include <db.h>
18744 #endif
18745 #ifndef NULL
18746 #define NULL ((void *)0)
18747 #endif
18748 main()
18749 {
18750         int rc;
18751         u_int32_t flags = DB_CREATE |
18752 #ifdef DB_PRIVATE
18753                 DB_PRIVATE |
18754 #endif
18755                 DB_THREAD;
18756
18757 #if DB_VERSION_MAJOR > 2
18758         DB_ENV *env = NULL;
18759
18760         rc = db_env_create( &env, 0 );
18761
18762         flags |= DB_INIT_MPOOL;
18763 #ifdef DB_MPOOL_PRIVATE
18764         flags |= DB_MPOOL_PRIVATE;
18765 #endif
18766
18767         if( rc ) {
18768                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18769                 return rc;
18770         }
18771
18772 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18773         rc = env->open( env, NULL, flags, 0 );
18774 #else
18775         rc = env->open( env, NULL, NULL, flags, 0 );
18776 #endif
18777
18778         if ( rc == 0 ) {
18779                 rc = env->close( env, 0 );
18780         }
18781
18782         if( rc ) {
18783                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18784                 return rc;
18785         }
18786
18787 #else
18788         DB_ENV env;
18789         memset( &env, '\0', sizeof(env) );
18790
18791         rc = db_appinit( NULL, NULL, &env, flags );
18792
18793         if( rc == 0 ) {
18794                 db_appexit( &env );
18795         }
18796
18797         unlink("__db_mpool.share");
18798         unlink("__db_lock.share");
18799 #endif
18800
18801         return rc;
18802 }
18803 EOF
18804 if { (eval echo configure:18805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18805 then
18806   ol_cv_berkeley_db_thread=yes
18807 else
18808   echo "configure: failed program was:" >&5
18809   cat conftest.$ac_ext >&5
18810   rm -fr conftest*
18811   ol_cv_berkeley_db_thread=no
18812 fi
18813 rm -fr conftest*
18814 fi
18815
18816
18817         LIBS="$ol_LIBS"
18818
18819         if test $ol_cv_berkeley_db_thread != no ; then
18820                 cat >> confdefs.h <<\EOF
18821 #define HAVE_BERKELEY_DB_THREAD 1
18822 EOF
18823
18824         fi
18825
18826 fi
18827
18828 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18829         fi
18830 fi
18831
18832         fi
18833
18834         if test $ol_cv_berkeley_db != no ; then
18835                 cat >> confdefs.h <<\EOF
18836 #define HAVE_BERKELEY_DB 1
18837 EOF
18838
18839
18840                 ol_link_ldbm=berkeley
18841                 ol_with_ldbm_api=berkeley
18842
18843                 if test $ol_with_ldbm_type = hash ; then
18844                         cat >> confdefs.h <<\EOF
18845 #define LDBM_USE_DBHASH 1
18846 EOF
18847
18848                 else
18849                         cat >> confdefs.h <<\EOF
18850 #define LDBM_USE_DBBTREE 1
18851 EOF
18852
18853                 fi
18854
18855                                                 if test $ol_cv_lib_db != yes ; then
18856                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18857                 fi
18858         fi
18859 fi
18860
18861 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18862         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18863 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18864         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18865 echo "configure:18866: checking Berkeley DB version for BDB backend" >&5
18866 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18867   echo $ac_n "(cached) $ac_c" 1>&6
18868 else
18869   
18870         cat > conftest.$ac_ext <<EOF
18871 #line 18872 "configure"
18872 #include "confdefs.h"
18873
18874 #include <db.h>
18875
18876  /* this check could be improved */
18877 #ifndef DB_VERSION_MAJOR
18878 #       define DB_VERSION_MAJOR 1
18879 #endif
18880
18881 /* require 4.0 or later */
18882 #if DB_VERSION_MAJOR >= 4 
18883         __db_version_compat
18884 #endif
18885         
18886 EOF
18887 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18888   egrep "__db_version_compat" >/dev/null 2>&1; then
18889   rm -rf conftest*
18890   ol_cv_bdb_compat=yes
18891 else
18892   rm -rf conftest*
18893   ol_cv_bdb_compat=no
18894 fi
18895 rm -f conftest*
18896
18897 fi
18898
18899 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18900
18901
18902         if test $ol_cv_bdb_compat = yes ; then
18903                 ol_enable_bdb=yes
18904         elif test $ol_enable_bdb = yes ; then
18905                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18906         else
18907                 ol_enable_bdb=no
18908         fi
18909 fi
18910
18911 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18912         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18913         ol_with_ldbm_api=none
18914 fi
18915
18916 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18917         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18918 echo "configure:18919: checking for MDBM library" >&5
18919 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18920   echo $ac_n "(cached) $ac_c" 1>&6
18921 else
18922         ol_LIBS="$LIBS"
18923         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18924 echo "configure:18925: checking for mdbm_set_chain" >&5
18925 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18926   echo $ac_n "(cached) $ac_c" 1>&6
18927 else
18928   cat > conftest.$ac_ext <<EOF
18929 #line 18930 "configure"
18930 #include "confdefs.h"
18931 /* System header to define __stub macros and hopefully few prototypes,
18932     which can conflict with char mdbm_set_chain(); below.  */
18933 #include <assert.h>
18934 /* Override any gcc2 internal prototype to avoid an error.  */
18935 /* We use char because int might match the return type of a gcc2
18936     builtin and then its argument prototype would still apply.  */
18937 char mdbm_set_chain();
18938 char (*f)();
18939
18940 int main() {
18941
18942 /* The GNU C library defines this for functions which it implements
18943     to always fail with ENOSYS.  Some functions are actually named
18944     something starting with __ and the normal name is an alias.  */
18945 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18946 choke me
18947 #else
18948 f = mdbm_set_chain;
18949 #endif
18950
18951 ; return 0; }
18952 EOF
18953 if { (eval echo configure:18954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18954   rm -rf conftest*
18955   eval "ac_cv_func_mdbm_set_chain=yes"
18956 else
18957   echo "configure: failed program was:" >&5
18958   cat conftest.$ac_ext >&5
18959   rm -rf conftest*
18960   eval "ac_cv_func_mdbm_set_chain=no"
18961 fi
18962 rm -f conftest*
18963 fi
18964
18965 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18966   echo "$ac_t""yes" 1>&6
18967   ol_cv_lib_mdbm=yes
18968 else
18969   echo "$ac_t""no" 1>&6
18970
18971                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18972 echo "configure:18973: checking for mdbm_set_chain in -lmdbm" >&5
18973 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18974 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18975   echo $ac_n "(cached) $ac_c" 1>&6
18976 else
18977   ac_save_LIBS="$LIBS"
18978 LIBS="-lmdbm  $LIBS"
18979 cat > conftest.$ac_ext <<EOF
18980 #line 18981 "configure"
18981 #include "confdefs.h"
18982 /* Override any gcc2 internal prototype to avoid an error.  */
18983 /* We use char because int might match the return type of a gcc2
18984     builtin and then its argument prototype would still apply.  */
18985 char mdbm_set_chain();
18986
18987 int main() {
18988 mdbm_set_chain()
18989 ; return 0; }
18990 EOF
18991 if { (eval echo configure:18992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18992   rm -rf conftest*
18993   eval "ac_cv_lib_$ac_lib_var=yes"
18994 else
18995   echo "configure: failed program was:" >&5
18996   cat conftest.$ac_ext >&5
18997   rm -rf conftest*
18998   eval "ac_cv_lib_$ac_lib_var=no"
18999 fi
19000 rm -f conftest*
19001 LIBS="$ac_save_LIBS"
19002
19003 fi
19004 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19005   echo "$ac_t""yes" 1>&6
19006   ol_cv_lib_mdbm=-lmdbm
19007 else
19008   echo "$ac_t""no" 1>&6
19009 ol_cv_lib_mdbm=no
19010 fi
19011
19012         
19013 fi
19014
19015         LIBS="$ol_LIBS"
19016
19017 fi
19018
19019 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
19020
19021
19022  for ac_hdr in mdbm.h
19023 do
19024 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19025 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19026 echo "configure:19027: checking for $ac_hdr" >&5
19027 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19028   echo $ac_n "(cached) $ac_c" 1>&6
19029 else
19030   cat > conftest.$ac_ext <<EOF
19031 #line 19032 "configure"
19032 #include "confdefs.h"
19033 #include <$ac_hdr>
19034 EOF
19035 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19036 { (eval echo configure:19037: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19037 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19038 if test -z "$ac_err"; then
19039   rm -rf conftest*
19040   eval "ac_cv_header_$ac_safe=yes"
19041 else
19042   echo "$ac_err" >&5
19043   echo "configure: failed program was:" >&5
19044   cat conftest.$ac_ext >&5
19045   rm -rf conftest*
19046   eval "ac_cv_header_$ac_safe=no"
19047 fi
19048 rm -f conftest*
19049 fi
19050 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19051   echo "$ac_t""yes" 1>&6
19052     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19053   cat >> confdefs.h <<EOF
19054 #define $ac_tr_hdr 1
19055 EOF
19056  
19057 else
19058   echo "$ac_t""no" 1>&6
19059 fi
19060 done
19061
19062  echo $ac_n "checking for db""... $ac_c" 1>&6
19063 echo "configure:19064: checking for db" >&5
19064 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
19065   echo $ac_n "(cached) $ac_c" 1>&6
19066 else
19067   
19068         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
19069                 ol_cv_mdbm=no
19070         else
19071                 ol_cv_mdbm=yes
19072         fi
19073
19074 fi
19075
19076 echo "$ac_t""$ol_cv_mdbm" 1>&6
19077  if test $ol_cv_mdbm = yes ; then
19078         cat >> confdefs.h <<\EOF
19079 #define HAVE_MDBM 1
19080 EOF
19081
19082  fi
19083
19084
19085         if test $ol_cv_mdbm = yes ; then
19086                 ol_link_ldbm=mdbm
19087                 ol_with_ldbm_api=mdbm
19088                 if test $ol_cv_lib_mdbm != yes ; then
19089                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
19090                 fi
19091         fi
19092 fi
19093
19094 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
19095         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
19096 echo "configure:19097: checking for GDBM library" >&5
19097 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
19098   echo $ac_n "(cached) $ac_c" 1>&6
19099 else
19100         ol_LIBS="$LIBS"
19101         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
19102 echo "configure:19103: checking for gdbm_open" >&5
19103 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
19104   echo $ac_n "(cached) $ac_c" 1>&6
19105 else
19106   cat > conftest.$ac_ext <<EOF
19107 #line 19108 "configure"
19108 #include "confdefs.h"
19109 /* System header to define __stub macros and hopefully few prototypes,
19110     which can conflict with char gdbm_open(); below.  */
19111 #include <assert.h>
19112 /* Override any gcc2 internal prototype to avoid an error.  */
19113 /* We use char because int might match the return type of a gcc2
19114     builtin and then its argument prototype would still apply.  */
19115 char gdbm_open();
19116 char (*f)();
19117
19118 int main() {
19119
19120 /* The GNU C library defines this for functions which it implements
19121     to always fail with ENOSYS.  Some functions are actually named
19122     something starting with __ and the normal name is an alias.  */
19123 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
19124 choke me
19125 #else
19126 f = gdbm_open;
19127 #endif
19128
19129 ; return 0; }
19130 EOF
19131 if { (eval echo configure:19132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19132   rm -rf conftest*
19133   eval "ac_cv_func_gdbm_open=yes"
19134 else
19135   echo "configure: failed program was:" >&5
19136   cat conftest.$ac_ext >&5
19137   rm -rf conftest*
19138   eval "ac_cv_func_gdbm_open=no"
19139 fi
19140 rm -f conftest*
19141 fi
19142
19143 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
19144   echo "$ac_t""yes" 1>&6
19145   ol_cv_lib_gdbm=yes
19146 else
19147   echo "$ac_t""no" 1>&6
19148
19149                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
19150 echo "configure:19151: checking for gdbm_open in -lgdbm" >&5
19151 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
19152 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19153   echo $ac_n "(cached) $ac_c" 1>&6
19154 else
19155   ac_save_LIBS="$LIBS"
19156 LIBS="-lgdbm  $LIBS"
19157 cat > conftest.$ac_ext <<EOF
19158 #line 19159 "configure"
19159 #include "confdefs.h"
19160 /* Override any gcc2 internal prototype to avoid an error.  */
19161 /* We use char because int might match the return type of a gcc2
19162     builtin and then its argument prototype would still apply.  */
19163 char gdbm_open();
19164
19165 int main() {
19166 gdbm_open()
19167 ; return 0; }
19168 EOF
19169 if { (eval echo configure:19170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19170   rm -rf conftest*
19171   eval "ac_cv_lib_$ac_lib_var=yes"
19172 else
19173   echo "configure: failed program was:" >&5
19174   cat conftest.$ac_ext >&5
19175   rm -rf conftest*
19176   eval "ac_cv_lib_$ac_lib_var=no"
19177 fi
19178 rm -f conftest*
19179 LIBS="$ac_save_LIBS"
19180
19181 fi
19182 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19183   echo "$ac_t""yes" 1>&6
19184   ol_cv_lib_gdbm=-lgdbm
19185 else
19186   echo "$ac_t""no" 1>&6
19187 ol_cv_lib_gdbm=no
19188 fi
19189
19190         
19191 fi
19192
19193         LIBS="$ol_LIBS"
19194
19195 fi
19196
19197 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
19198
19199
19200  for ac_hdr in gdbm.h
19201 do
19202 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19203 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19204 echo "configure:19205: checking for $ac_hdr" >&5
19205 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19206   echo $ac_n "(cached) $ac_c" 1>&6
19207 else
19208   cat > conftest.$ac_ext <<EOF
19209 #line 19210 "configure"
19210 #include "confdefs.h"
19211 #include <$ac_hdr>
19212 EOF
19213 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19214 { (eval echo configure:19215: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19215 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19216 if test -z "$ac_err"; then
19217   rm -rf conftest*
19218   eval "ac_cv_header_$ac_safe=yes"
19219 else
19220   echo "$ac_err" >&5
19221   echo "configure: failed program was:" >&5
19222   cat conftest.$ac_ext >&5
19223   rm -rf conftest*
19224   eval "ac_cv_header_$ac_safe=no"
19225 fi
19226 rm -f conftest*
19227 fi
19228 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19229   echo "$ac_t""yes" 1>&6
19230     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19231   cat >> confdefs.h <<EOF
19232 #define $ac_tr_hdr 1
19233 EOF
19234  
19235 else
19236   echo "$ac_t""no" 1>&6
19237 fi
19238 done
19239
19240  echo $ac_n "checking for db""... $ac_c" 1>&6
19241 echo "configure:19242: checking for db" >&5
19242 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
19243   echo $ac_n "(cached) $ac_c" 1>&6
19244 else
19245   
19246         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
19247                 ol_cv_gdbm=no
19248         else
19249                 ol_cv_gdbm=yes
19250         fi
19251
19252 fi
19253
19254 echo "$ac_t""$ol_cv_gdbm" 1>&6
19255  if test $ol_cv_gdbm = yes ; then
19256         cat >> confdefs.h <<\EOF
19257 #define HAVE_GDBM 1
19258 EOF
19259
19260  fi
19261
19262
19263         if test $ol_cv_gdbm = yes ; then
19264                 ol_link_ldbm=gdbm
19265                 ol_with_ldbm_api=gdbm
19266
19267                 if test $ol_cv_lib_gdbm != yes ; then
19268                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
19269                 fi
19270         fi
19271 fi
19272
19273 if test $ol_with_ldbm_api = ndbm ; then
19274         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
19275 echo "configure:19276: checking for NDBM library" >&5
19276 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
19277   echo $ac_n "(cached) $ac_c" 1>&6
19278 else
19279         ol_LIBS="$LIBS"
19280         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
19281 echo "configure:19282: checking for dbm_open" >&5
19282 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
19283   echo $ac_n "(cached) $ac_c" 1>&6
19284 else
19285   cat > conftest.$ac_ext <<EOF
19286 #line 19287 "configure"
19287 #include "confdefs.h"
19288 /* System header to define __stub macros and hopefully few prototypes,
19289     which can conflict with char dbm_open(); below.  */
19290 #include <assert.h>
19291 /* Override any gcc2 internal prototype to avoid an error.  */
19292 /* We use char because int might match the return type of a gcc2
19293     builtin and then its argument prototype would still apply.  */
19294 char dbm_open();
19295 char (*f)();
19296
19297 int main() {
19298
19299 /* The GNU C library defines this for functions which it implements
19300     to always fail with ENOSYS.  Some functions are actually named
19301     something starting with __ and the normal name is an alias.  */
19302 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
19303 choke me
19304 #else
19305 f = dbm_open;
19306 #endif
19307
19308 ; return 0; }
19309 EOF
19310 if { (eval echo configure:19311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19311   rm -rf conftest*
19312   eval "ac_cv_func_dbm_open=yes"
19313 else
19314   echo "configure: failed program was:" >&5
19315   cat conftest.$ac_ext >&5
19316   rm -rf conftest*
19317   eval "ac_cv_func_dbm_open=no"
19318 fi
19319 rm -f conftest*
19320 fi
19321
19322 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
19323   echo "$ac_t""yes" 1>&6
19324   ol_cv_lib_ndbm=yes
19325 else
19326   echo "$ac_t""no" 1>&6
19327
19328                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
19329 echo "configure:19330: checking for dbm_open in -lndbm" >&5
19330 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19331 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19332   echo $ac_n "(cached) $ac_c" 1>&6
19333 else
19334   ac_save_LIBS="$LIBS"
19335 LIBS="-lndbm  $LIBS"
19336 cat > conftest.$ac_ext <<EOF
19337 #line 19338 "configure"
19338 #include "confdefs.h"
19339 /* Override any gcc2 internal prototype to avoid an error.  */
19340 /* We use char because int might match the return type of a gcc2
19341     builtin and then its argument prototype would still apply.  */
19342 char dbm_open();
19343
19344 int main() {
19345 dbm_open()
19346 ; return 0; }
19347 EOF
19348 if { (eval echo configure:19349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19349   rm -rf conftest*
19350   eval "ac_cv_lib_$ac_lib_var=yes"
19351 else
19352   echo "configure: failed program was:" >&5
19353   cat conftest.$ac_ext >&5
19354   rm -rf conftest*
19355   eval "ac_cv_lib_$ac_lib_var=no"
19356 fi
19357 rm -f conftest*
19358 LIBS="$ac_save_LIBS"
19359
19360 fi
19361 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19362   echo "$ac_t""yes" 1>&6
19363   ol_cv_lib_ndbm=-lndbm
19364 else
19365   echo "$ac_t""no" 1>&6
19366
19367                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
19368 echo "configure:19369: checking for dbm_open in -ldbm" >&5
19369 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
19370 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19371   echo $ac_n "(cached) $ac_c" 1>&6
19372 else
19373   ac_save_LIBS="$LIBS"
19374 LIBS="-ldbm  $LIBS"
19375 cat > conftest.$ac_ext <<EOF
19376 #line 19377 "configure"
19377 #include "confdefs.h"
19378 /* Override any gcc2 internal prototype to avoid an error.  */
19379 /* We use char because int might match the return type of a gcc2
19380     builtin and then its argument prototype would still apply.  */
19381 char dbm_open();
19382
19383 int main() {
19384 dbm_open()
19385 ; return 0; }
19386 EOF
19387 if { (eval echo configure:19388: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19388   rm -rf conftest*
19389   eval "ac_cv_lib_$ac_lib_var=yes"
19390 else
19391   echo "configure: failed program was:" >&5
19392   cat conftest.$ac_ext >&5
19393   rm -rf conftest*
19394   eval "ac_cv_lib_$ac_lib_var=no"
19395 fi
19396 rm -f conftest*
19397 LIBS="$ac_save_LIBS"
19398
19399 fi
19400 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19401   echo "$ac_t""yes" 1>&6
19402   ol_cv_lib_ndbm=-ldbm
19403 else
19404   echo "$ac_t""no" 1>&6
19405 ol_cv_lib_ndbm=no
19406 fi
19407                 
19408 fi
19409
19410         
19411 fi
19412
19413         LIBS="$ol_LIBS"
19414
19415 fi
19416
19417 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
19418
19419
19420  for ac_hdr in ndbm.h
19421 do
19422 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19423 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19424 echo "configure:19425: checking for $ac_hdr" >&5
19425 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19426   echo $ac_n "(cached) $ac_c" 1>&6
19427 else
19428   cat > conftest.$ac_ext <<EOF
19429 #line 19430 "configure"
19430 #include "confdefs.h"
19431 #include <$ac_hdr>
19432 EOF
19433 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19434 { (eval echo configure:19435: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19435 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19436 if test -z "$ac_err"; then
19437   rm -rf conftest*
19438   eval "ac_cv_header_$ac_safe=yes"
19439 else
19440   echo "$ac_err" >&5
19441   echo "configure: failed program was:" >&5
19442   cat conftest.$ac_ext >&5
19443   rm -rf conftest*
19444   eval "ac_cv_header_$ac_safe=no"
19445 fi
19446 rm -f conftest*
19447 fi
19448 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19449   echo "$ac_t""yes" 1>&6
19450     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19451   cat >> confdefs.h <<EOF
19452 #define $ac_tr_hdr 1
19453 EOF
19454  
19455 else
19456   echo "$ac_t""no" 1>&6
19457 fi
19458 done
19459
19460  echo $ac_n "checking for db""... $ac_c" 1>&6
19461 echo "configure:19462: checking for db" >&5
19462 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
19463   echo $ac_n "(cached) $ac_c" 1>&6
19464 else
19465   
19466         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
19467                 ol_cv_ndbm=no
19468         else
19469                 ol_cv_ndbm=yes
19470         fi
19471
19472 fi
19473
19474 echo "$ac_t""$ol_cv_ndbm" 1>&6
19475  if test $ol_cv_ndbm = yes ; then
19476         cat >> confdefs.h <<\EOF
19477 #define HAVE_NDBM 1
19478 EOF
19479
19480  fi
19481
19482
19483         if test $ol_cv_ndbm = yes ; then
19484                 ol_link_ldbm=ndbm
19485                 ol_with_ldbm_api=ndbm
19486
19487                 if test $ol_cv_lib_ndbm != yes ; then
19488                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
19489                 fi
19490         fi
19491 fi
19492
19493 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
19494         echo "configure: warning: could not find suitable LDBM backend" 1>&2
19495         if test $ol_enable_ldbm = yes ; then
19496                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
19497         fi
19498
19499         echo "configure: warning: disabling LDBM" 1>&2
19500         ol_enable_ldbm=no
19501 fi
19502
19503 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
19504         BUILD_LIBS_DYNAMIC=shared
19505         cat >> confdefs.h <<\EOF
19506 #define LDAP_LIBS_DYNAMIC 1
19507 EOF
19508
19509 else
19510         BUILD_LIBS_DYNAMIC=static
19511 fi
19512
19513 if test $ol_enable_wrappers != no ; then
19514         for ac_hdr in tcpd.h
19515 do
19516 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19517 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19518 echo "configure:19519: checking for $ac_hdr" >&5
19519 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19520   echo $ac_n "(cached) $ac_c" 1>&6
19521 else
19522   cat > conftest.$ac_ext <<EOF
19523 #line 19524 "configure"
19524 #include "confdefs.h"
19525 #include <$ac_hdr>
19526 EOF
19527 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19528 { (eval echo configure:19529: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19529 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19530 if test -z "$ac_err"; then
19531   rm -rf conftest*
19532   eval "ac_cv_header_$ac_safe=yes"
19533 else
19534   echo "$ac_err" >&5
19535   echo "configure: failed program was:" >&5
19536   cat conftest.$ac_ext >&5
19537   rm -rf conftest*
19538   eval "ac_cv_header_$ac_safe=no"
19539 fi
19540 rm -f conftest*
19541 fi
19542 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19543   echo "$ac_t""yes" 1>&6
19544     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19545   cat >> confdefs.h <<EOF
19546 #define $ac_tr_hdr 1
19547 EOF
19548  
19549                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19550 echo "configure:19551: checking for TCP wrappers library" >&5
19551                 save_LIBS="$LIBS"
19552                 LIBS="$LIBS -lwrap"
19553                 cat > conftest.$ac_ext <<EOF
19554 #line 19555 "configure"
19555 #include "confdefs.h"
19556
19557 #include <tcpd.h>
19558 int allow_severity = 0;
19559 int deny_severity  = 0;
19560
19561 struct request_info *req;
19562                 
19563 int main() {
19564
19565 hosts_access(req)
19566                 
19567 ; return 0; }
19568 EOF
19569 if { (eval echo configure:19570: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19570   rm -rf conftest*
19571   echo "$ac_t""-lwrap" 1>&6
19572                 have_wrappers=yes
19573                 LIBS="$save_LIBS"
19574 else
19575   echo "configure: failed program was:" >&5
19576   cat conftest.$ac_ext >&5
19577   rm -rf conftest*
19578   
19579                                 LIBS="$LIBS -lnsl"
19580                 cat > conftest.$ac_ext <<EOF
19581 #line 19582 "configure"
19582 #include "confdefs.h"
19583
19584 #include <tcpd.h>
19585 int allow_severity = 0;
19586 int deny_severity  = 0;
19587
19588 struct request_info *req;
19589                 
19590 int main() {
19591
19592 hosts_access(req)
19593                 
19594 ; return 0; }
19595 EOF
19596 if { (eval echo configure:19597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19597   rm -rf conftest*
19598   echo "$ac_t""-lwrap -lnsl" 1>&6
19599                 have_wrappers=yes
19600                 LIBS="$save_LIBS -lnsl"
19601 else
19602   echo "configure: failed program was:" >&5
19603   cat conftest.$ac_ext >&5
19604   rm -rf conftest*
19605   
19606                 echo "$ac_t""no" 1>&6
19607                 have_wrappers=no
19608                 LIBS=$save_LIBS
19609 fi
19610 rm -f conftest*
19611 fi
19612 rm -f conftest*
19613 else
19614   echo "$ac_t""no" 1>&6
19615 have_wrappers=no
19616 fi
19617 done
19618
19619
19620         if test $have_wrappers = yes ; then
19621                 cat >> confdefs.h <<\EOF
19622 #define HAVE_TCPD 1
19623 EOF
19624
19625                 WRAP_LIBS="-lwrap"
19626         elif test $ol_enable_wrappers = yes ; then
19627                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19628         else
19629                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19630                 WRAP_LIBS=""
19631         fi
19632 fi
19633
19634 if test $ol_enable_syslog != no ; then
19635         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19636 echo "configure:19637: checking for openlog" >&5
19637 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19638   echo $ac_n "(cached) $ac_c" 1>&6
19639 else
19640   cat > conftest.$ac_ext <<EOF
19641 #line 19642 "configure"
19642 #include "confdefs.h"
19643 /* System header to define __stub macros and hopefully few prototypes,
19644     which can conflict with char openlog(); below.  */
19645 #include <assert.h>
19646 /* Override any gcc2 internal prototype to avoid an error.  */
19647 /* We use char because int might match the return type of a gcc2
19648     builtin and then its argument prototype would still apply.  */
19649 char openlog();
19650 char (*f)();
19651
19652 int main() {
19653
19654 /* The GNU C library defines this for functions which it implements
19655     to always fail with ENOSYS.  Some functions are actually named
19656     something starting with __ and the normal name is an alias.  */
19657 #if defined (__stub_openlog) || defined (__stub___openlog)
19658 choke me
19659 #else
19660 f = openlog;
19661 #endif
19662
19663 ; return 0; }
19664 EOF
19665 if { (eval echo configure:19666: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19666   rm -rf conftest*
19667   eval "ac_cv_func_openlog=yes"
19668 else
19669   echo "configure: failed program was:" >&5
19670   cat conftest.$ac_ext >&5
19671   rm -rf conftest*
19672   eval "ac_cv_func_openlog=no"
19673 fi
19674 rm -f conftest*
19675 fi
19676
19677 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19678   echo "$ac_t""yes" 1>&6
19679   :
19680 else
19681   echo "$ac_t""no" 1>&6
19682 fi
19683
19684         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19685                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19686         fi
19687         ol_enable_syslog=$ac_cv_func_openlog
19688 fi
19689
19690
19691 ol_link_sql=no
19692 if test $ol_enable_sql != no ; then
19693         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19694 echo "configure:19695: checking for SQLDriverConnect in -liodbc" >&5
19695 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19696 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19697   echo $ac_n "(cached) $ac_c" 1>&6
19698 else
19699   ac_save_LIBS="$LIBS"
19700 LIBS="-liodbc  $LIBS"
19701 cat > conftest.$ac_ext <<EOF
19702 #line 19703 "configure"
19703 #include "confdefs.h"
19704 /* Override any gcc2 internal prototype to avoid an error.  */
19705 /* We use char because int might match the return type of a gcc2
19706     builtin and then its argument prototype would still apply.  */
19707 char SQLDriverConnect();
19708
19709 int main() {
19710 SQLDriverConnect()
19711 ; return 0; }
19712 EOF
19713 if { (eval echo configure:19714: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19714   rm -rf conftest*
19715   eval "ac_cv_lib_$ac_lib_var=yes"
19716 else
19717   echo "configure: failed program was:" >&5
19718   cat conftest.$ac_ext >&5
19719   rm -rf conftest*
19720   eval "ac_cv_lib_$ac_lib_var=no"
19721 fi
19722 rm -f conftest*
19723 LIBS="$ac_save_LIBS"
19724
19725 fi
19726 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19727   echo "$ac_t""yes" 1>&6
19728   have_iodbc=yes
19729 else
19730   echo "$ac_t""no" 1>&6
19731 have_iodbc=no
19732 fi
19733
19734         if test $have_iodbc = yes ; then
19735                 ol_link_sql="-liodbc"
19736         else
19737                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19738 echo "configure:19739: checking for SQLDriverConnect in -lodbc" >&5
19739 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19740 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19741   echo $ac_n "(cached) $ac_c" 1>&6
19742 else
19743   ac_save_LIBS="$LIBS"
19744 LIBS="-lodbc  $LIBS"
19745 cat > conftest.$ac_ext <<EOF
19746 #line 19747 "configure"
19747 #include "confdefs.h"
19748 /* Override any gcc2 internal prototype to avoid an error.  */
19749 /* We use char because int might match the return type of a gcc2
19750     builtin and then its argument prototype would still apply.  */
19751 char SQLDriverConnect();
19752
19753 int main() {
19754 SQLDriverConnect()
19755 ; return 0; }
19756 EOF
19757 if { (eval echo configure:19758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19758   rm -rf conftest*
19759   eval "ac_cv_lib_$ac_lib_var=yes"
19760 else
19761   echo "configure: failed program was:" >&5
19762   cat conftest.$ac_ext >&5
19763   rm -rf conftest*
19764   eval "ac_cv_lib_$ac_lib_var=no"
19765 fi
19766 rm -f conftest*
19767 LIBS="$ac_save_LIBS"
19768
19769 fi
19770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19771   echo "$ac_t""yes" 1>&6
19772   have_odbc=yes
19773 else
19774   echo "$ac_t""no" 1>&6
19775 have_odbc=no
19776 fi
19777
19778                 if test $have_odbc = yes ; then
19779                         ol_link_sql="-lodbc"
19780                 fi
19781         fi
19782
19783         if test $ol_link_sql != no ; then
19784                 SLAPD_SQL_LIBS="$ol_link_sql"
19785
19786         elif test $ol_enable_sql != auto ; then
19787                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19788         fi
19789 fi
19790
19791 ol_link_termcap=no
19792 for ac_hdr in termcap.h ncurses.h
19793 do
19794 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19795 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19796 echo "configure:19797: checking for $ac_hdr" >&5
19797 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19798   echo $ac_n "(cached) $ac_c" 1>&6
19799 else
19800   cat > conftest.$ac_ext <<EOF
19801 #line 19802 "configure"
19802 #include "confdefs.h"
19803 #include <$ac_hdr>
19804 EOF
19805 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19806 { (eval echo configure:19807: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19807 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19808 if test -z "$ac_err"; then
19809   rm -rf conftest*
19810   eval "ac_cv_header_$ac_safe=yes"
19811 else
19812   echo "$ac_err" >&5
19813   echo "configure: failed program was:" >&5
19814   cat conftest.$ac_ext >&5
19815   rm -rf conftest*
19816   eval "ac_cv_header_$ac_safe=no"
19817 fi
19818 rm -f conftest*
19819 fi
19820 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19821   echo "$ac_t""yes" 1>&6
19822     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19823   cat >> confdefs.h <<EOF
19824 #define $ac_tr_hdr 1
19825 EOF
19826  
19827 else
19828   echo "$ac_t""no" 1>&6
19829 fi
19830 done
19831
19832
19833 if test $ol_link_termcap = no ; then
19834         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19835 echo "configure:19836: checking for tputs in -ltermcap" >&5
19836 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19837 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19838   echo $ac_n "(cached) $ac_c" 1>&6
19839 else
19840   ac_save_LIBS="$LIBS"
19841 LIBS="-ltermcap  $LIBS"
19842 cat > conftest.$ac_ext <<EOF
19843 #line 19844 "configure"
19844 #include "confdefs.h"
19845 /* Override any gcc2 internal prototype to avoid an error.  */
19846 /* We use char because int might match the return type of a gcc2
19847     builtin and then its argument prototype would still apply.  */
19848 char tputs();
19849
19850 int main() {
19851 tputs()
19852 ; return 0; }
19853 EOF
19854 if { (eval echo configure:19855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19855   rm -rf conftest*
19856   eval "ac_cv_lib_$ac_lib_var=yes"
19857 else
19858   echo "configure: failed program was:" >&5
19859   cat conftest.$ac_ext >&5
19860   rm -rf conftest*
19861   eval "ac_cv_lib_$ac_lib_var=no"
19862 fi
19863 rm -f conftest*
19864 LIBS="$ac_save_LIBS"
19865
19866 fi
19867 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19868   echo "$ac_t""yes" 1>&6
19869   have_termcap=yes
19870 else
19871   echo "$ac_t""no" 1>&6
19872 have_termcap=no
19873 fi
19874
19875         if test $have_termcap = yes ; then
19876                 cat >> confdefs.h <<\EOF
19877 #define HAVE_TERMCAP 1
19878 EOF
19879
19880                 ol_link_termcap=yes
19881                 TERMCAP_LIBS=-ltermcap
19882         fi
19883 fi
19884
19885 if test $ol_link_termcap = no ; then
19886         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19887 echo "configure:19888: checking for initscr in -lncurses" >&5
19888 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19889 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19890   echo $ac_n "(cached) $ac_c" 1>&6
19891 else
19892   ac_save_LIBS="$LIBS"
19893 LIBS="-lncurses  $LIBS"
19894 cat > conftest.$ac_ext <<EOF
19895 #line 19896 "configure"
19896 #include "confdefs.h"
19897 /* Override any gcc2 internal prototype to avoid an error.  */
19898 /* We use char because int might match the return type of a gcc2
19899     builtin and then its argument prototype would still apply.  */
19900 char initscr();
19901
19902 int main() {
19903 initscr()
19904 ; return 0; }
19905 EOF
19906 if { (eval echo configure:19907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19907   rm -rf conftest*
19908   eval "ac_cv_lib_$ac_lib_var=yes"
19909 else
19910   echo "configure: failed program was:" >&5
19911   cat conftest.$ac_ext >&5
19912   rm -rf conftest*
19913   eval "ac_cv_lib_$ac_lib_var=no"
19914 fi
19915 rm -f conftest*
19916 LIBS="$ac_save_LIBS"
19917
19918 fi
19919 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19920   echo "$ac_t""yes" 1>&6
19921   have_ncurses=yes
19922 else
19923   echo "$ac_t""no" 1>&6
19924 have_ncurses=no
19925 fi
19926
19927         if test $have_ncurses = yes ; then
19928                 cat >> confdefs.h <<\EOF
19929 #define HAVE_NCURSES 1
19930 EOF
19931
19932                 ol_link_termcap=yes
19933                 TERMCAP_LIBS=-lncurses
19934         fi
19935 fi
19936
19937 if test $ol_link_termcap = no ; then
19938         cat >> confdefs.h <<\EOF
19939 #define NO_TERMCAP 1
19940 EOF
19941
19942         TERMCAP_LIBS=
19943 fi
19944
19945 ol_link_sasl=no
19946 ol_link_spasswd=no
19947 if test $ol_with_cyrus_sasl != no ; then
19948         for ac_hdr in sasl/sasl.h sasl.h
19949 do
19950 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19951 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19952 echo "configure:19953: checking for $ac_hdr" >&5
19953 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19954   echo $ac_n "(cached) $ac_c" 1>&6
19955 else
19956   cat > conftest.$ac_ext <<EOF
19957 #line 19958 "configure"
19958 #include "confdefs.h"
19959 #include <$ac_hdr>
19960 EOF
19961 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19962 { (eval echo configure:19963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19963 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19964 if test -z "$ac_err"; then
19965   rm -rf conftest*
19966   eval "ac_cv_header_$ac_safe=yes"
19967 else
19968   echo "$ac_err" >&5
19969   echo "configure: failed program was:" >&5
19970   cat conftest.$ac_ext >&5
19971   rm -rf conftest*
19972   eval "ac_cv_header_$ac_safe=no"
19973 fi
19974 rm -f conftest*
19975 fi
19976 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19977   echo "$ac_t""yes" 1>&6
19978     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19979   cat >> confdefs.h <<EOF
19980 #define $ac_tr_hdr 1
19981 EOF
19982  
19983 else
19984   echo "$ac_t""no" 1>&6
19985 fi
19986 done
19987
19988
19989         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19990                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19991 echo "configure:19992: checking for sasl_client_init in -lsasl2" >&5
19992 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19993 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19994   echo $ac_n "(cached) $ac_c" 1>&6
19995 else
19996   ac_save_LIBS="$LIBS"
19997 LIBS="-lsasl2  $LIBS"
19998 cat > conftest.$ac_ext <<EOF
19999 #line 20000 "configure"
20000 #include "confdefs.h"
20001 /* Override any gcc2 internal prototype to avoid an error.  */
20002 /* We use char because int might match the return type of a gcc2
20003     builtin and then its argument prototype would still apply.  */
20004 char sasl_client_init();
20005
20006 int main() {
20007 sasl_client_init()
20008 ; return 0; }
20009 EOF
20010 if { (eval echo configure:20011: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20011   rm -rf conftest*
20012   eval "ac_cv_lib_$ac_lib_var=yes"
20013 else
20014   echo "configure: failed program was:" >&5
20015   cat conftest.$ac_ext >&5
20016   rm -rf conftest*
20017   eval "ac_cv_lib_$ac_lib_var=no"
20018 fi
20019 rm -f conftest*
20020 LIBS="$ac_save_LIBS"
20021
20022 fi
20023 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20024   echo "$ac_t""yes" 1>&6
20025   ol_link_sasl="-lsasl2"
20026 else
20027   echo "$ac_t""no" 1>&6
20028 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
20029 echo "configure:20030: checking for sasl_client_init in -lsasl" >&5
20030 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
20031 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20032   echo $ac_n "(cached) $ac_c" 1>&6
20033 else
20034   ac_save_LIBS="$LIBS"
20035 LIBS="-lsasl  $LIBS"
20036 cat > conftest.$ac_ext <<EOF
20037 #line 20038 "configure"
20038 #include "confdefs.h"
20039 /* Override any gcc2 internal prototype to avoid an error.  */
20040 /* We use char because int might match the return type of a gcc2
20041     builtin and then its argument prototype would still apply.  */
20042 char sasl_client_init();
20043
20044 int main() {
20045 sasl_client_init()
20046 ; return 0; }
20047 EOF
20048 if { (eval echo configure:20049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20049   rm -rf conftest*
20050   eval "ac_cv_lib_$ac_lib_var=yes"
20051 else
20052   echo "configure: failed program was:" >&5
20053   cat conftest.$ac_ext >&5
20054   rm -rf conftest*
20055   eval "ac_cv_lib_$ac_lib_var=no"
20056 fi
20057 rm -f conftest*
20058 LIBS="$ac_save_LIBS"
20059
20060 fi
20061 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20062   echo "$ac_t""yes" 1>&6
20063   ol_link_sasl="-lsasl"
20064 else
20065   echo "$ac_t""no" 1>&6
20066 fi
20067
20068 fi
20069
20070         fi
20071
20072         if test $ol_link_sasl = no ; then
20073                 if test $ol_with_cyrus_sasl != auto ; then
20074                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
20075                 else
20076                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
20077                         echo "configure: warning: SASL authentication not supported!" 1>&2
20078                         if test $ol_link_tls = no ; then
20079                                 echo "configure: warning: Strong authentication not supported!" 1>&2
20080                         fi
20081                 fi
20082         else
20083                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
20084 echo "configure:20085: checking Cyrus SASL library version" >&5
20085 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
20086   echo $ac_n "(cached) $ac_c" 1>&6
20087 else
20088   
20089         cat > conftest.$ac_ext <<EOF
20090 #line 20091 "configure"
20091 #include "confdefs.h"
20092
20093 #ifdef HAVE_SASL_SASL_H
20094 #include <sasl/sasl.h>
20095 #else
20096 #include <sasl.h>
20097 #endif
20098
20099 /* require 2.1.3 or later */
20100 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
20101         char *__sasl_compat = "1.5.x okay";
20102 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
20103         __sasl_compat "2.2+ or better okay (we guess)";
20104 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
20105         && SASL_VERSION_STEP >=3
20106         __sasl_compat = "2.1.3+ or better okay";
20107 #endif
20108         
20109 EOF
20110 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20111   egrep "__sasl_compat" >/dev/null 2>&1; then
20112   rm -rf conftest*
20113   ol_cv_sasl_compat=yes
20114 else
20115   rm -rf conftest*
20116   ol_cv_sasl_compat=no
20117 fi
20118 rm -f conftest*
20119
20120 fi
20121
20122 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
20123
20124                 if test $ol_cv_sasl_compat = no ; then
20125                         ol_link_sasl=no
20126                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
20127                 fi
20128
20129                 cat >> confdefs.h <<\EOF
20130 #define HAVE_CYRUS_SASL 1
20131 EOF
20132
20133                 SASL_LIBS="$ol_link_sasl"
20134                 if test $ol_enable_spasswd != no ; then
20135                         ol_link_spasswd=yes
20136                 fi
20137         fi
20138
20139 else
20140         echo "configure: warning: SASL authentication not supported!" 1>&2
20141         if test $ol_link_tls = no ; then
20142                 echo "configure: warning: Strong authentication not supported!" 1>&2
20143         fi
20144 fi
20145
20146 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
20147         dev=no
20148         if test -r /dev/urandom ; then
20149                 dev="/dev/urandom";
20150         elif test -r /idev/urandom ; then
20151                 dev="/idev/urandom";
20152         elif test -r /dev/srandom ; then
20153                 dev="/dev/srandom";
20154         elif test -r /dev/random ; then
20155                 dev="/dev/random";
20156         elif test -r /idev/random ; then
20157                 dev="/idev/random";
20158         fi
20159
20160         if test $dev != no ; then
20161                 cat >> confdefs.h <<EOF
20162 #define URANDOM_DEVICE "$dev"
20163 EOF
20164
20165         fi
20166 fi
20167
20168 ol_link_fetch=no
20169 if test $ol_with_fetch != no ; then
20170         ol_LIBS=$LIBS
20171 LIBS="-lfetch -lcom_err $LIBS"
20172 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
20173 echo "configure:20174: checking fetch(3) library" >&5
20174 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
20175   echo $ac_n "(cached) $ac_c" 1>&6
20176 else
20177   
20178         cat > conftest.$ac_ext <<EOF
20179 #line 20180 "configure"
20180 #include "confdefs.h"
20181
20182 #include <sys/param.h>
20183 #include <stdio.h>
20184 #include <fetch.h>
20185 int main() {
20186 struct url *u = fetchParseURL("file:///"); 
20187 ; return 0; }
20188 EOF
20189 if { (eval echo configure:20190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20190   rm -rf conftest*
20191   ol_cv_lib_fetch=yes
20192 else
20193   echo "configure: failed program was:" >&5
20194   cat conftest.$ac_ext >&5
20195   rm -rf conftest*
20196   ol_cv_lib_fetch=no
20197 fi
20198 rm -f conftest*
20199 fi
20200
20201 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
20202 LIBS=$ol_LIBS
20203 if test $ol_cv_lib_fetch != no ; then
20204         ol_link_fetch="-lfetch -lcom_err"
20205         cat >> confdefs.h <<\EOF
20206 #define HAVE_FETCH 1
20207 EOF
20208
20209 fi
20210
20211
20212         if test $ol_cv_lib_fetch != no ; then
20213                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
20214                 ol_link_fetch=freebsd
20215
20216         elif test $ol_with_fetch != auto ; then
20217                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
20218         fi 
20219 fi
20220
20221 ol_link_readline=no
20222 if test $ol_with_readline != no ; then
20223         for ac_hdr in readline/readline.h readline/history.h
20224 do
20225 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20226 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20227 echo "configure:20228: checking for $ac_hdr" >&5
20228 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20229   echo $ac_n "(cached) $ac_c" 1>&6
20230 else
20231   cat > conftest.$ac_ext <<EOF
20232 #line 20233 "configure"
20233 #include "confdefs.h"
20234 #include <$ac_hdr>
20235 EOF
20236 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20237 { (eval echo configure:20238: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20238 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20239 if test -z "$ac_err"; then
20240   rm -rf conftest*
20241   eval "ac_cv_header_$ac_safe=yes"
20242 else
20243   echo "$ac_err" >&5
20244   echo "configure: failed program was:" >&5
20245   cat conftest.$ac_ext >&5
20246   rm -rf conftest*
20247   eval "ac_cv_header_$ac_safe=no"
20248 fi
20249 rm -f conftest*
20250 fi
20251 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20252   echo "$ac_t""yes" 1>&6
20253     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20254   cat >> confdefs.h <<EOF
20255 #define $ac_tr_hdr 1
20256 EOF
20257  
20258 else
20259   echo "$ac_t""no" 1>&6
20260 fi
20261 done
20262
20263
20264         if test $ac_cv_header_readline_readline_h = yes ; then
20265                 save_LIBS="$LIBS"
20266                 LIBS="$TERMCAP_LIBS $LIBS"
20267                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
20268 echo "configure:20269: checking for readline in -lreadline" >&5
20269 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
20270 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20271   echo $ac_n "(cached) $ac_c" 1>&6
20272 else
20273   ac_save_LIBS="$LIBS"
20274 LIBS="-lreadline  $LIBS"
20275 cat > conftest.$ac_ext <<EOF
20276 #line 20277 "configure"
20277 #include "confdefs.h"
20278 /* Override any gcc2 internal prototype to avoid an error.  */
20279 /* We use char because int might match the return type of a gcc2
20280     builtin and then its argument prototype would still apply.  */
20281 char readline();
20282
20283 int main() {
20284 readline()
20285 ; return 0; }
20286 EOF
20287 if { (eval echo configure:20288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20288   rm -rf conftest*
20289   eval "ac_cv_lib_$ac_lib_var=yes"
20290 else
20291   echo "configure: failed program was:" >&5
20292   cat conftest.$ac_ext >&5
20293   rm -rf conftest*
20294   eval "ac_cv_lib_$ac_lib_var=no"
20295 fi
20296 rm -f conftest*
20297 LIBS="$ac_save_LIBS"
20298
20299 fi
20300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20301   echo "$ac_t""yes" 1>&6
20302   have_readline=yes
20303 else
20304   echo "$ac_t""no" 1>&6
20305 have_readline=no
20306 fi
20307
20308                 LIBS="$save_LIBS"
20309                         
20310                 if test $have_readline = yes ; then
20311                         ol_with_readline=found
20312                         ol_link_readline=yes
20313
20314                         READLINE_LIBS="-lreadline"
20315                 fi
20316         fi
20317 fi
20318
20319 if test $ol_link_readline = yes ; then
20320         cat >> confdefs.h <<\EOF
20321 #define HAVE_READLINE 1
20322 EOF
20323
20324 fi
20325
20326
20327 if test $ol_enable_crypt != no ; then
20328         echo $ac_n "checking for crypt""... $ac_c" 1>&6
20329 echo "configure:20330: checking for crypt" >&5
20330 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
20331   echo $ac_n "(cached) $ac_c" 1>&6
20332 else
20333   cat > conftest.$ac_ext <<EOF
20334 #line 20335 "configure"
20335 #include "confdefs.h"
20336 /* System header to define __stub macros and hopefully few prototypes,
20337     which can conflict with char crypt(); below.  */
20338 #include <assert.h>
20339 /* Override any gcc2 internal prototype to avoid an error.  */
20340 /* We use char because int might match the return type of a gcc2
20341     builtin and then its argument prototype would still apply.  */
20342 char crypt();
20343 char (*f)();
20344
20345 int main() {
20346
20347 /* The GNU C library defines this for functions which it implements
20348     to always fail with ENOSYS.  Some functions are actually named
20349     something starting with __ and the normal name is an alias.  */
20350 #if defined (__stub_crypt) || defined (__stub___crypt)
20351 choke me
20352 #else
20353 f = crypt;
20354 #endif
20355
20356 ; return 0; }
20357 EOF
20358 if { (eval echo configure:20359: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20359   rm -rf conftest*
20360   eval "ac_cv_func_crypt=yes"
20361 else
20362   echo "configure: failed program was:" >&5
20363   cat conftest.$ac_ext >&5
20364   rm -rf conftest*
20365   eval "ac_cv_func_crypt=no"
20366 fi
20367 rm -f conftest*
20368 fi
20369
20370 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
20371   echo "$ac_t""yes" 1>&6
20372   have_crypt=yes
20373 else
20374   echo "$ac_t""no" 1>&6
20375
20376                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
20377 echo "configure:20378: checking for crypt in -lcrypt" >&5
20378 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
20379 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20380   echo $ac_n "(cached) $ac_c" 1>&6
20381 else
20382   ac_save_LIBS="$LIBS"
20383 LIBS="-lcrypt  $LIBS"
20384 cat > conftest.$ac_ext <<EOF
20385 #line 20386 "configure"
20386 #include "confdefs.h"
20387 /* Override any gcc2 internal prototype to avoid an error.  */
20388 /* We use char because int might match the return type of a gcc2
20389     builtin and then its argument prototype would still apply.  */
20390 char crypt();
20391
20392 int main() {
20393 crypt()
20394 ; return 0; }
20395 EOF
20396 if { (eval echo configure:20397: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20397   rm -rf conftest*
20398   eval "ac_cv_lib_$ac_lib_var=yes"
20399 else
20400   echo "configure: failed program was:" >&5
20401   cat conftest.$ac_ext >&5
20402   rm -rf conftest*
20403   eval "ac_cv_lib_$ac_lib_var=no"
20404 fi
20405 rm -f conftest*
20406 LIBS="$ac_save_LIBS"
20407
20408 fi
20409 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20410   echo "$ac_t""yes" 1>&6
20411   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
20412                         have_crypt=yes
20413 else
20414   echo "$ac_t""no" 1>&6
20415 have_crypt=no
20416 fi
20417
20418 fi
20419
20420
20421         if test $have_crypt = yes ; then
20422                 cat >> confdefs.h <<\EOF
20423 #define HAVE_CRYPT 1
20424 EOF
20425
20426         else
20427                 echo "configure: warning: could not find crypt" 1>&2
20428                 if test $ol_enable_crypt = yes ; then
20429                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
20430                 fi
20431
20432                 echo "configure: warning: disabling crypt support" 1>&2
20433                 ol_enable_crypt=no
20434         fi
20435 fi
20436
20437 if test $ol_enable_proctitle != no ; then
20438         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
20439 echo "configure:20440: checking for setproctitle" >&5
20440 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
20441   echo $ac_n "(cached) $ac_c" 1>&6
20442 else
20443   cat > conftest.$ac_ext <<EOF
20444 #line 20445 "configure"
20445 #include "confdefs.h"
20446 /* System header to define __stub macros and hopefully few prototypes,
20447     which can conflict with char setproctitle(); below.  */
20448 #include <assert.h>
20449 /* Override any gcc2 internal prototype to avoid an error.  */
20450 /* We use char because int might match the return type of a gcc2
20451     builtin and then its argument prototype would still apply.  */
20452 char setproctitle();
20453 char (*f)();
20454
20455 int main() {
20456
20457 /* The GNU C library defines this for functions which it implements
20458     to always fail with ENOSYS.  Some functions are actually named
20459     something starting with __ and the normal name is an alias.  */
20460 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
20461 choke me
20462 #else
20463 f = setproctitle;
20464 #endif
20465
20466 ; return 0; }
20467 EOF
20468 if { (eval echo configure:20469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20469   rm -rf conftest*
20470   eval "ac_cv_func_setproctitle=yes"
20471 else
20472   echo "configure: failed program was:" >&5
20473   cat conftest.$ac_ext >&5
20474   rm -rf conftest*
20475   eval "ac_cv_func_setproctitle=no"
20476 fi
20477 rm -f conftest*
20478 fi
20479
20480 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20481   echo "$ac_t""yes" 1>&6
20482   have_setproctitle=yes
20483 else
20484   echo "$ac_t""no" 1>&6
20485
20486                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20487 echo "configure:20488: checking for setproctitle in -lutil" >&5
20488 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20489 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20490   echo $ac_n "(cached) $ac_c" 1>&6
20491 else
20492   ac_save_LIBS="$LIBS"
20493 LIBS="-lutil  $LIBS"
20494 cat > conftest.$ac_ext <<EOF
20495 #line 20496 "configure"
20496 #include "confdefs.h"
20497 /* Override any gcc2 internal prototype to avoid an error.  */
20498 /* We use char because int might match the return type of a gcc2
20499     builtin and then its argument prototype would still apply.  */
20500 char setproctitle();
20501
20502 int main() {
20503 setproctitle()
20504 ; return 0; }
20505 EOF
20506 if { (eval echo configure:20507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20507   rm -rf conftest*
20508   eval "ac_cv_lib_$ac_lib_var=yes"
20509 else
20510   echo "configure: failed program was:" >&5
20511   cat conftest.$ac_ext >&5
20512   rm -rf conftest*
20513   eval "ac_cv_lib_$ac_lib_var=no"
20514 fi
20515 rm -f conftest*
20516 LIBS="$ac_save_LIBS"
20517
20518 fi
20519 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20520   echo "$ac_t""yes" 1>&6
20521   have_setproctitle=yes
20522                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20523 else
20524   echo "$ac_t""no" 1>&6
20525 have_setproctitle=no
20526                         LIBOBJS="$LIBOBJS setproctitle.o"
20527                         LIBSRCS="$LIBSRCS setproctitle.c"
20528 fi
20529
20530 fi
20531
20532
20533         if test $have_setproctitle = yes ; then
20534                 cat >> confdefs.h <<\EOF
20535 #define HAVE_SETPROCTITLE 1
20536 EOF
20537
20538         fi
20539 fi
20540
20541 if test $ol_enable_slp != no ; then
20542         for ac_hdr in slp.h 
20543 do
20544 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20545 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20546 echo "configure:20547: checking for $ac_hdr" >&5
20547 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20548   echo $ac_n "(cached) $ac_c" 1>&6
20549 else
20550   cat > conftest.$ac_ext <<EOF
20551 #line 20552 "configure"
20552 #include "confdefs.h"
20553 #include <$ac_hdr>
20554 EOF
20555 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20556 { (eval echo configure:20557: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20557 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20558 if test -z "$ac_err"; then
20559   rm -rf conftest*
20560   eval "ac_cv_header_$ac_safe=yes"
20561 else
20562   echo "$ac_err" >&5
20563   echo "configure: failed program was:" >&5
20564   cat conftest.$ac_ext >&5
20565   rm -rf conftest*
20566   eval "ac_cv_header_$ac_safe=no"
20567 fi
20568 rm -f conftest*
20569 fi
20570 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20571   echo "$ac_t""yes" 1>&6
20572     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20573   cat >> confdefs.h <<EOF
20574 #define $ac_tr_hdr 1
20575 EOF
20576  
20577 else
20578   echo "$ac_t""no" 1>&6
20579 fi
20580 done
20581
20582
20583         if test $ac_cv_header_slp_h = yes ; then
20584                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20585 echo "configure:20586: checking for SLPOpen in -lslp" >&5
20586 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20587 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20588   echo $ac_n "(cached) $ac_c" 1>&6
20589 else
20590   ac_save_LIBS="$LIBS"
20591 LIBS="-lslp  $LIBS"
20592 cat > conftest.$ac_ext <<EOF
20593 #line 20594 "configure"
20594 #include "confdefs.h"
20595 /* Override any gcc2 internal prototype to avoid an error.  */
20596 /* We use char because int might match the return type of a gcc2
20597     builtin and then its argument prototype would still apply.  */
20598 char SLPOpen();
20599
20600 int main() {
20601 SLPOpen()
20602 ; return 0; }
20603 EOF
20604 if { (eval echo configure:20605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20605   rm -rf conftest*
20606   eval "ac_cv_lib_$ac_lib_var=yes"
20607 else
20608   echo "configure: failed program was:" >&5
20609   cat conftest.$ac_ext >&5
20610   rm -rf conftest*
20611   eval "ac_cv_lib_$ac_lib_var=no"
20612 fi
20613 rm -f conftest*
20614 LIBS="$ac_save_LIBS"
20615
20616 fi
20617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20618   echo "$ac_t""yes" 1>&6
20619   have_slp=yes
20620 else
20621   echo "$ac_t""no" 1>&6
20622 have_slp=no
20623 fi
20624
20625                 if test $have_slp = yes ; then
20626                         cat >> confdefs.h <<\EOF
20627 #define HAVE_SLP 1
20628 EOF
20629
20630                         SLAPD_SLP_LIBS=-lslp
20631                 fi
20632
20633         elif test $ol_enable_slp = yes ; then
20634                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20635         fi
20636 fi
20637
20638 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20639 echo "configure:20640: checking for ANSI C header files" >&5
20640 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20641   echo $ac_n "(cached) $ac_c" 1>&6
20642 else
20643   cat > conftest.$ac_ext <<EOF
20644 #line 20645 "configure"
20645 #include "confdefs.h"
20646 #include <stdlib.h>
20647 #include <stdarg.h>
20648 #include <string.h>
20649 #include <float.h>
20650 EOF
20651 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20652 { (eval echo configure:20653: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20653 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20654 if test -z "$ac_err"; then
20655   rm -rf conftest*
20656   ac_cv_header_stdc=yes
20657 else
20658   echo "$ac_err" >&5
20659   echo "configure: failed program was:" >&5
20660   cat conftest.$ac_ext >&5
20661   rm -rf conftest*
20662   ac_cv_header_stdc=no
20663 fi
20664 rm -f conftest*
20665
20666 if test $ac_cv_header_stdc = yes; then
20667   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20668 cat > conftest.$ac_ext <<EOF
20669 #line 20670 "configure"
20670 #include "confdefs.h"
20671 #include <string.h>
20672 EOF
20673 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20674   egrep "memchr" >/dev/null 2>&1; then
20675   :
20676 else
20677   rm -rf conftest*
20678   ac_cv_header_stdc=no
20679 fi
20680 rm -f conftest*
20681
20682 fi
20683
20684 if test $ac_cv_header_stdc = yes; then
20685   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20686 cat > conftest.$ac_ext <<EOF
20687 #line 20688 "configure"
20688 #include "confdefs.h"
20689 #include <stdlib.h>
20690 EOF
20691 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20692   egrep "free" >/dev/null 2>&1; then
20693   :
20694 else
20695   rm -rf conftest*
20696   ac_cv_header_stdc=no
20697 fi
20698 rm -f conftest*
20699
20700 fi
20701
20702 if test $ac_cv_header_stdc = yes; then
20703   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20704 if test "$cross_compiling" = yes; then
20705   :
20706 else
20707   cat > conftest.$ac_ext <<EOF
20708 #line 20709 "configure"
20709 #include "confdefs.h"
20710 #include <ctype.h>
20711 #if ((' ' & 0x0FF) == 0x020)
20712 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20713 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20714 #else
20715 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20716  || ('j' <= (c) && (c) <= 'r') \
20717  || ('s' <= (c) && (c) <= 'z'))
20718 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20719 #endif
20720 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20721 int main () { int i; for (i = 0; i < 256; i++)
20722 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20723 exit (0); }
20724
20725 EOF
20726 if { (eval echo configure:20727: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20727 then
20728   :
20729 else
20730   echo "configure: failed program was:" >&5
20731   cat conftest.$ac_ext >&5
20732   rm -fr conftest*
20733   ac_cv_header_stdc=no
20734 fi
20735 rm -fr conftest*
20736 fi
20737
20738 fi
20739 fi
20740
20741 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20742 if test $ac_cv_header_stdc = yes; then
20743   cat >> confdefs.h <<\EOF
20744 #define STDC_HEADERS 1
20745 EOF
20746
20747 fi
20748
20749 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20750 echo "configure:20751: checking for mode_t" >&5
20751 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20752   echo $ac_n "(cached) $ac_c" 1>&6
20753 else
20754   cat > conftest.$ac_ext <<EOF
20755 #line 20756 "configure"
20756 #include "confdefs.h"
20757 #include <sys/types.h>
20758 #if STDC_HEADERS
20759 #include <stdlib.h>
20760 #include <stddef.h>
20761 #endif
20762
20763 EOF
20764 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20765   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20766   rm -rf conftest*
20767   eval "ac_cv_type_mode_t=yes"
20768 else
20769   rm -rf conftest*
20770   eval "ac_cv_type_mode_t=no"
20771 fi
20772 rm -f conftest*
20773
20774 fi
20775 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20776   echo "$ac_t""yes" 1>&6
20777 else
20778   echo "$ac_t""no" 1>&6
20779   cat >> confdefs.h <<EOF
20780 #define mode_t int
20781 EOF
20782
20783 fi
20784
20785 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20786 echo "configure:20787: checking for off_t" >&5
20787 if eval "test \"\${ac_cv_type_off_t+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 #if STDC_HEADERS
20795 #include <stdlib.h>
20796 #include <stddef.h>
20797 #endif
20798
20799 EOF
20800 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20801   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20802   rm -rf conftest*
20803   eval "ac_cv_type_off_t=yes"
20804 else
20805   rm -rf conftest*
20806   eval "ac_cv_type_off_t=no"
20807 fi
20808 rm -f conftest*
20809
20810 fi
20811 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20812   echo "$ac_t""yes" 1>&6
20813 else
20814   echo "$ac_t""no" 1>&6
20815   cat >> confdefs.h <<EOF
20816 #define off_t long
20817 EOF
20818
20819 fi
20820
20821 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20822 echo "configure:20823: checking for pid_t" >&5
20823 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20824   echo $ac_n "(cached) $ac_c" 1>&6
20825 else
20826   cat > conftest.$ac_ext <<EOF
20827 #line 20828 "configure"
20828 #include "confdefs.h"
20829 #include <sys/types.h>
20830 #if STDC_HEADERS
20831 #include <stdlib.h>
20832 #include <stddef.h>
20833 #endif
20834
20835 EOF
20836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20837   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20838   rm -rf conftest*
20839   eval "ac_cv_type_pid_t=yes"
20840 else
20841   rm -rf conftest*
20842   eval "ac_cv_type_pid_t=no"
20843 fi
20844 rm -f conftest*
20845
20846 fi
20847 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20848   echo "$ac_t""yes" 1>&6
20849 else
20850   echo "$ac_t""no" 1>&6
20851   cat >> confdefs.h <<EOF
20852 #define pid_t int
20853 EOF
20854
20855 fi
20856
20857 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20858 echo "configure:20859: checking for ptrdiff_t" >&5
20859 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20860   echo $ac_n "(cached) $ac_c" 1>&6
20861 else
20862   cat > conftest.$ac_ext <<EOF
20863 #line 20864 "configure"
20864 #include "confdefs.h"
20865 #include <stddef.h>
20866 int main() {
20867 ptrdiff_t p
20868 ; return 0; }
20869 EOF
20870 if { (eval echo configure:20871: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20871   rm -rf conftest*
20872   am_cv_type_ptrdiff_t=yes
20873 else
20874   echo "configure: failed program was:" >&5
20875   cat conftest.$ac_ext >&5
20876   rm -rf conftest*
20877   am_cv_type_ptrdiff_t=no
20878 fi
20879 rm -f conftest*
20880 fi
20881
20882 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20883    if test $am_cv_type_ptrdiff_t = yes; then
20884      cat >> confdefs.h <<\EOF
20885 #define HAVE_PTRDIFF_T 1
20886 EOF
20887
20888    fi
20889
20890 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20891 echo "configure:20892: checking return type of signal handlers" >&5
20892 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20893   echo $ac_n "(cached) $ac_c" 1>&6
20894 else
20895   cat > conftest.$ac_ext <<EOF
20896 #line 20897 "configure"
20897 #include "confdefs.h"
20898 #include <sys/types.h>
20899 #include <signal.h>
20900 #ifdef signal
20901 #undef signal
20902 #endif
20903 #ifdef __cplusplus
20904 extern "C" void (*signal (int, void (*)(int)))(int);
20905 #else
20906 void (*signal ()) ();
20907 #endif
20908
20909 int main() {
20910 int i;
20911 ; return 0; }
20912 EOF
20913 if { (eval echo configure:20914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20914   rm -rf conftest*
20915   ac_cv_type_signal=void
20916 else
20917   echo "configure: failed program was:" >&5
20918   cat conftest.$ac_ext >&5
20919   rm -rf conftest*
20920   ac_cv_type_signal=int
20921 fi
20922 rm -f conftest*
20923 fi
20924
20925 echo "$ac_t""$ac_cv_type_signal" 1>&6
20926 cat >> confdefs.h <<EOF
20927 #define RETSIGTYPE $ac_cv_type_signal
20928 EOF
20929
20930
20931 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20932 echo "configure:20933: checking for size_t" >&5
20933 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20934   echo $ac_n "(cached) $ac_c" 1>&6
20935 else
20936   cat > conftest.$ac_ext <<EOF
20937 #line 20938 "configure"
20938 #include "confdefs.h"
20939 #include <sys/types.h>
20940 #if STDC_HEADERS
20941 #include <stdlib.h>
20942 #include <stddef.h>
20943 #endif
20944
20945 EOF
20946 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20947   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20948   rm -rf conftest*
20949   eval "ac_cv_type_size_t=yes"
20950 else
20951   rm -rf conftest*
20952   eval "ac_cv_type_size_t=no"
20953 fi
20954 rm -f conftest*
20955
20956 fi
20957 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20958   echo "$ac_t""yes" 1>&6
20959 else
20960   echo "$ac_t""no" 1>&6
20961   cat >> confdefs.h <<EOF
20962 #define size_t unsigned
20963 EOF
20964
20965 fi
20966
20967
20968 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20969 echo "configure:20970: checking for ssize_t" >&5
20970 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20971   echo $ac_n "(cached) $ac_c" 1>&6
20972 else
20973   cat > conftest.$ac_ext <<EOF
20974 #line 20975 "configure"
20975 #include "confdefs.h"
20976 #include <sys/types.h>
20977 #if STDC_HEADERS
20978 #include <stdlib.h>
20979 #include <stddef.h>
20980 #endif
20981
20982 EOF
20983 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20984   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20985   rm -rf conftest*
20986   eval "ac_cv_type_ssize_t=yes"
20987 else
20988   rm -rf conftest*
20989   eval "ac_cv_type_ssize_t=no"
20990 fi
20991 rm -f conftest*
20992
20993 fi
20994 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20995   echo "$ac_t""yes" 1>&6
20996 else
20997   echo "$ac_t""no" 1>&6
20998   cat >> confdefs.h <<EOF
20999 #define ssize_t signed int
21000 EOF
21001
21002 fi
21003
21004 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
21005 echo "configure:21006: checking for caddr_t" >&5
21006 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
21007   echo $ac_n "(cached) $ac_c" 1>&6
21008 else
21009   cat > conftest.$ac_ext <<EOF
21010 #line 21011 "configure"
21011 #include "confdefs.h"
21012 #include <sys/types.h>
21013 #if STDC_HEADERS
21014 #include <stdlib.h>
21015 #include <stddef.h>
21016 #endif
21017
21018 EOF
21019 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21020   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
21021   rm -rf conftest*
21022   eval "ac_cv_type_caddr_t=yes"
21023 else
21024   rm -rf conftest*
21025   eval "ac_cv_type_caddr_t=no"
21026 fi
21027 rm -f conftest*
21028
21029 fi
21030 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
21031   echo "$ac_t""yes" 1>&6
21032 else
21033   echo "$ac_t""no" 1>&6
21034   cat >> confdefs.h <<EOF
21035 #define caddr_t char *
21036 EOF
21037
21038 fi
21039
21040
21041 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
21042 echo "configure:21043: checking for socklen_t" >&5
21043 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
21044   echo $ac_n "(cached) $ac_c" 1>&6
21045 else
21046   cat > conftest.$ac_ext <<EOF
21047 #line 21048 "configure"
21048 #include "confdefs.h"
21049
21050 #ifdef HAVE_SYS_TYPES_H
21051 #include <sys/types.h>
21052 #endif
21053 #ifdef HAVE_SYS_SOCKET_H
21054 #include <sys/socket.h>
21055 #endif
21056
21057 int main() {
21058 socklen_t len;
21059 ; return 0; }
21060 EOF
21061 if { (eval echo configure:21062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21062   rm -rf conftest*
21063   ol_cv_type_socklen_t=yes
21064 else
21065   echo "configure: failed program was:" >&5
21066   cat conftest.$ac_ext >&5
21067   rm -rf conftest*
21068   ol_cv_type_socklen_t=no
21069 fi
21070 rm -f conftest*
21071 fi
21072
21073 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
21074   if test $ol_cv_type_socklen_t = no; then
21075     cat >> confdefs.h <<\EOF
21076 #define socklen_t int
21077 EOF
21078
21079   fi
21080  
21081 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
21082 echo "configure:21083: checking for member st_blksize in aggregate type struct stat" >&5
21083 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
21084   echo $ac_n "(cached) $ac_c" 1>&6
21085 else
21086   cat > conftest.$ac_ext <<EOF
21087 #line 21088 "configure"
21088 #include "confdefs.h"
21089 #include <sys/types.h>
21090 #include <sys/stat.h>
21091 int main() {
21092 struct stat foo; foo.st_blksize;
21093 ; return 0; }
21094 EOF
21095 if { (eval echo configure:21096: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21096   rm -rf conftest*
21097   ac_cv_c_struct_member_st_blksize=yes
21098 else
21099   echo "configure: failed program was:" >&5
21100   cat conftest.$ac_ext >&5
21101   rm -rf conftest*
21102   ac_cv_c_struct_member_st_blksize=no
21103 fi
21104 rm -f conftest*
21105 fi
21106
21107 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
21108 st_blksize="$ac_cv_c_struct_member_st_blksize"
21109 if test $ac_cv_c_struct_member_st_blksize = yes; then
21110   cat >> confdefs.h <<\EOF
21111 #define HAVE_ST_BLKSIZE 1
21112 EOF
21113
21114 fi
21115
21116 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
21117 echo "configure:21118: checking whether time.h and sys/time.h may both be included" >&5
21118 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
21119   echo $ac_n "(cached) $ac_c" 1>&6
21120 else
21121   cat > conftest.$ac_ext <<EOF
21122 #line 21123 "configure"
21123 #include "confdefs.h"
21124 #include <sys/types.h>
21125 #include <sys/time.h>
21126 #include <time.h>
21127 int main() {
21128 struct tm *tp;
21129 ; return 0; }
21130 EOF
21131 if { (eval echo configure:21132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21132   rm -rf conftest*
21133   ac_cv_header_time=yes
21134 else
21135   echo "configure: failed program was:" >&5
21136   cat conftest.$ac_ext >&5
21137   rm -rf conftest*
21138   ac_cv_header_time=no
21139 fi
21140 rm -f conftest*
21141 fi
21142
21143 echo "$ac_t""$ac_cv_header_time" 1>&6
21144 if test $ac_cv_header_time = yes; then
21145   cat >> confdefs.h <<\EOF
21146 #define TIME_WITH_SYS_TIME 1
21147 EOF
21148
21149 fi
21150
21151 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
21152 echo "configure:21153: checking whether struct tm is in sys/time.h or time.h" >&5
21153 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
21154   echo $ac_n "(cached) $ac_c" 1>&6
21155 else
21156   cat > conftest.$ac_ext <<EOF
21157 #line 21158 "configure"
21158 #include "confdefs.h"
21159 #include <sys/types.h>
21160 #include <time.h>
21161 int main() {
21162 struct tm *tp; tp->tm_sec;
21163 ; return 0; }
21164 EOF
21165 if { (eval echo configure:21166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21166   rm -rf conftest*
21167   ac_cv_struct_tm=time.h
21168 else
21169   echo "configure: failed program was:" >&5
21170   cat conftest.$ac_ext >&5
21171   rm -rf conftest*
21172   ac_cv_struct_tm=sys/time.h
21173 fi
21174 rm -f conftest*
21175 fi
21176
21177 echo "$ac_t""$ac_cv_struct_tm" 1>&6
21178 if test $ac_cv_struct_tm = sys/time.h; then
21179   cat >> confdefs.h <<\EOF
21180 #define TM_IN_SYS_TIME 1
21181 EOF
21182
21183 fi
21184
21185 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
21186 echo "configure:21187: checking for uid_t in sys/types.h" >&5
21187 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
21188   echo $ac_n "(cached) $ac_c" 1>&6
21189 else
21190   cat > conftest.$ac_ext <<EOF
21191 #line 21192 "configure"
21192 #include "confdefs.h"
21193 #include <sys/types.h>
21194 EOF
21195 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21196   egrep "uid_t" >/dev/null 2>&1; then
21197   rm -rf conftest*
21198   ac_cv_type_uid_t=yes
21199 else
21200   rm -rf conftest*
21201   ac_cv_type_uid_t=no
21202 fi
21203 rm -f conftest*
21204
21205 fi
21206
21207 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
21208 if test $ac_cv_type_uid_t = no; then
21209   cat >> confdefs.h <<\EOF
21210 #define uid_t int
21211 EOF
21212
21213   cat >> confdefs.h <<\EOF
21214 #define gid_t int
21215 EOF
21216
21217 fi
21218
21219 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
21220 echo "configure:21221: checking for sig_atomic_t" >&5
21221 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
21222   echo $ac_n "(cached) $ac_c" 1>&6
21223 else
21224   cat > conftest.$ac_ext <<EOF
21225 #line 21226 "configure"
21226 #include "confdefs.h"
21227 #include <signal.h>
21228 int main() {
21229 sig_atomic_t atomic;
21230 ; return 0; }
21231 EOF
21232 if { (eval echo configure:21233: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21233   rm -rf conftest*
21234   ol_cv_type_sig_atomic_t=yes
21235 else
21236   echo "configure: failed program was:" >&5
21237   cat conftest.$ac_ext >&5
21238   rm -rf conftest*
21239   ol_cv_type_sig_atomic_t=no
21240 fi
21241 rm -f conftest*
21242 fi
21243
21244 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
21245   if test $ol_cv_type_sig_atomic_t = no; then
21246     cat >> confdefs.h <<\EOF
21247 #define sig_atomic_t int
21248 EOF
21249
21250   fi
21251  
21252
21253
21254 # test for pw_gecos in struct passwd
21255 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
21256 echo "configure:21257: checking struct passwd for pw_gecos" >&5
21257 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
21258   echo $ac_n "(cached) $ac_c" 1>&6
21259 else
21260   
21261         cat > conftest.$ac_ext <<EOF
21262 #line 21263 "configure"
21263 #include "confdefs.h"
21264 #include <pwd.h>
21265 int main() {
21266
21267         struct passwd pwd;
21268         pwd.pw_gecos = pwd.pw_name;
21269
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   ol_cv_struct_passwd_pw_gecos=yes
21275 else
21276   echo "configure: failed program was:" >&5
21277   cat conftest.$ac_ext >&5
21278   rm -rf conftest*
21279   ol_cv_struct_passwd_pw_gecos=no
21280 fi
21281 rm -f conftest*
21282 fi
21283
21284 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
21285 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
21286         cat >> confdefs.h <<\EOF
21287 #define HAVE_PW_GECOS 1
21288 EOF
21289
21290 fi
21291
21292 # test for pw_passwd in struct passwd
21293 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
21294 echo "configure:21295: checking struct passwd for pw_passwd" >&5
21295 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
21296   echo $ac_n "(cached) $ac_c" 1>&6
21297 else
21298   
21299         cat > conftest.$ac_ext <<EOF
21300 #line 21301 "configure"
21301 #include "confdefs.h"
21302 #include <pwd.h>
21303 int main() {
21304
21305         struct passwd pwd;
21306         pwd.pw_passwd = pwd.pw_name;
21307
21308 ; return 0; }
21309 EOF
21310 if { (eval echo configure:21311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21311   rm -rf conftest*
21312   ol_cv_struct_passwd_pw_passwd=yes
21313 else
21314   echo "configure: failed program was:" >&5
21315   cat conftest.$ac_ext >&5
21316   rm -rf conftest*
21317   ol_cv_struct_passwd_pw_passwd=no
21318 fi
21319 rm -f conftest*
21320 fi
21321
21322 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
21323 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
21324         cat >> confdefs.h <<\EOF
21325 #define HAVE_PW_PASSWD 1
21326 EOF
21327
21328 fi
21329
21330
21331 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
21332 echo "configure:21333: checking if toupper() requires islower()" >&5
21333 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
21334   echo $ac_n "(cached) $ac_c" 1>&6
21335 else
21336   
21337         if test "$cross_compiling" = yes; then
21338   ol_cv_c_upper_lower=safe
21339 else
21340   cat > conftest.$ac_ext <<EOF
21341 #line 21342 "configure"
21342 #include "confdefs.h"
21343
21344 #include <ctype.h>
21345 main()
21346 {
21347         if ('C' == toupper('C'))
21348                 exit(0);
21349         else
21350                 exit(1);
21351 }
21352 EOF
21353 if { (eval echo configure:21354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21354 then
21355   ol_cv_c_upper_lower=no
21356 else
21357   echo "configure: failed program was:" >&5
21358   cat conftest.$ac_ext >&5
21359   rm -fr conftest*
21360   ol_cv_c_upper_lower=yes
21361 fi
21362 rm -fr conftest*
21363 fi
21364
21365 fi
21366
21367 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
21368 if test $ol_cv_c_upper_lower != no ; then
21369         cat >> confdefs.h <<\EOF
21370 #define C_UPPER_LOWER 1
21371 EOF
21372
21373 fi
21374
21375 echo $ac_n "checking for working const""... $ac_c" 1>&6
21376 echo "configure:21377: checking for working const" >&5
21377 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
21378   echo $ac_n "(cached) $ac_c" 1>&6
21379 else
21380   cat > conftest.$ac_ext <<EOF
21381 #line 21382 "configure"
21382 #include "confdefs.h"
21383
21384 int main() {
21385
21386 /* Ultrix mips cc rejects this.  */
21387 typedef int charset[2]; const charset x;
21388 /* SunOS 4.1.1 cc rejects this.  */
21389 char const *const *ccp;
21390 char **p;
21391 /* NEC SVR4.0.2 mips cc rejects this.  */
21392 struct point {int x, y;};
21393 static struct point const zero = {0,0};
21394 /* AIX XL C 1.02.0.0 rejects this.
21395    It does not let you subtract one const X* pointer from another in an arm
21396    of an if-expression whose if-part is not a constant expression */
21397 const char *g = "string";
21398 ccp = &g + (g ? g-g : 0);
21399 /* HPUX 7.0 cc rejects these. */
21400 ++ccp;
21401 p = (char**) ccp;
21402 ccp = (char const *const *) p;
21403 { /* SCO 3.2v4 cc rejects this.  */
21404   char *t;
21405   char const *s = 0 ? (char *) 0 : (char const *) 0;
21406
21407   *t++ = 0;
21408 }
21409 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
21410   int x[] = {25, 17};
21411   const int *foo = &x[0];
21412   ++foo;
21413 }
21414 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
21415   typedef const int *iptr;
21416   iptr p = 0;
21417   ++p;
21418 }
21419 { /* AIX XL C 1.02.0.0 rejects this saying
21420      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
21421   struct s { int j; const int *ap[3]; };
21422   struct s *b; b->j = 5;
21423 }
21424 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
21425   const int foo = 10;
21426 }
21427
21428 ; return 0; }
21429 EOF
21430 if { (eval echo configure:21431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21431   rm -rf conftest*
21432   ac_cv_c_const=yes
21433 else
21434   echo "configure: failed program was:" >&5
21435   cat conftest.$ac_ext >&5
21436   rm -rf conftest*
21437   ac_cv_c_const=no
21438 fi
21439 rm -f conftest*
21440 fi
21441
21442 echo "$ac_t""$ac_cv_c_const" 1>&6
21443 if test $ac_cv_c_const = no; then
21444   cat >> confdefs.h <<\EOF
21445 #define const 
21446 EOF
21447
21448 fi
21449
21450 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
21451 echo "configure:21452: checking if compiler understands volatile" >&5
21452 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
21453   echo $ac_n "(cached) $ac_c" 1>&6
21454 else
21455   cat > conftest.$ac_ext <<EOF
21456 #line 21457 "configure"
21457 #include "confdefs.h"
21458 int x, y, z;
21459 int main() {
21460 volatile int a; int * volatile b = x ? &y : &z;
21461       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
21462       *b = 0;
21463 ; return 0; }
21464 EOF
21465 if { (eval echo configure:21466: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21466   rm -rf conftest*
21467   ol_cv_c_volatile=yes
21468 else
21469   echo "configure: failed program was:" >&5
21470   cat conftest.$ac_ext >&5
21471   rm -rf conftest*
21472   ol_cv_c_volatile=no
21473 fi
21474 rm -f conftest*
21475 fi
21476
21477 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21478   if test $ol_cv_c_volatile = yes; then
21479     : 
21480   else
21481     cat >> confdefs.h <<\EOF
21482 #define volatile 
21483 EOF
21484
21485   fi
21486  
21487
21488 if test $cross_compiling = yes ; then
21489         cat >> confdefs.h <<\EOF
21490 #define CROSS_COMPILING 1
21491 EOF
21492
21493 else
21494         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21495 echo "configure:21496: checking whether byte ordering is bigendian" >&5
21496 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21497   echo $ac_n "(cached) $ac_c" 1>&6
21498 else
21499   ac_cv_c_bigendian=unknown
21500 # See if sys/param.h defines the BYTE_ORDER macro.
21501 cat > conftest.$ac_ext <<EOF
21502 #line 21503 "configure"
21503 #include "confdefs.h"
21504 #include <sys/types.h>
21505 #include <sys/param.h>
21506 int main() {
21507
21508 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21509  bogus endian macros
21510 #endif
21511 ; return 0; }
21512 EOF
21513 if { (eval echo configure:21514: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21514   rm -rf conftest*
21515   # It does; now see whether it defined to BIG_ENDIAN or not.
21516 cat > conftest.$ac_ext <<EOF
21517 #line 21518 "configure"
21518 #include "confdefs.h"
21519 #include <sys/types.h>
21520 #include <sys/param.h>
21521 int main() {
21522
21523 #if BYTE_ORDER != BIG_ENDIAN
21524  not big endian
21525 #endif
21526 ; return 0; }
21527 EOF
21528 if { (eval echo configure:21529: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21529   rm -rf conftest*
21530   ac_cv_c_bigendian=yes
21531 else
21532   echo "configure: failed program was:" >&5
21533   cat conftest.$ac_ext >&5
21534   rm -rf conftest*
21535   ac_cv_c_bigendian=no
21536 fi
21537 rm -f conftest*
21538 else
21539   echo "configure: failed program was:" >&5
21540   cat conftest.$ac_ext >&5
21541 fi
21542 rm -f conftest*
21543 if test $ac_cv_c_bigendian = unknown; then
21544 if test "$cross_compiling" = yes; then
21545     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21546 else
21547   cat > conftest.$ac_ext <<EOF
21548 #line 21549 "configure"
21549 #include "confdefs.h"
21550 main () {
21551   /* Are we little or big endian?  From Harbison&Steele.  */
21552   union
21553   {
21554     long l;
21555     char c[sizeof (long)];
21556   } u;
21557   u.l = 1;
21558   exit (u.c[sizeof (long) - 1] == 1);
21559 }
21560 EOF
21561 if { (eval echo configure:21562: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21562 then
21563   ac_cv_c_bigendian=no
21564 else
21565   echo "configure: failed program was:" >&5
21566   cat conftest.$ac_ext >&5
21567   rm -fr conftest*
21568   ac_cv_c_bigendian=yes
21569 fi
21570 rm -fr conftest*
21571 fi
21572
21573 fi
21574 fi
21575
21576 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21577 if test $ac_cv_c_bigendian = yes; then
21578   cat >> confdefs.h <<\EOF
21579 #define WORDS_BIGENDIAN 1
21580 EOF
21581
21582 fi
21583
21584 fi
21585
21586 echo $ac_n "checking size of short""... $ac_c" 1>&6
21587 echo "configure:21588: checking size of short" >&5 
21588 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21589   echo $ac_n "(cached) $ac_c" 1>&6
21590 else
21591   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21592   cat > conftest.$ac_ext <<EOF
21593 #line 21594 "configure"
21594 #include "confdefs.h"
21595 #include "confdefs.h" 
21596 #include <sys/types.h> 
21597  
21598
21599 int main() {
21600 switch (0) case 0: case (sizeof (short) == $ac_size):;
21601 ; return 0; }
21602 EOF
21603 if { (eval echo configure:21604: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21604   rm -rf conftest*
21605   ac_cv_sizeof_short=$ac_size
21606 else
21607   echo "configure: failed program was:" >&5
21608   cat conftest.$ac_ext >&5
21609 fi
21610 rm -f conftest* 
21611   if test x$ac_cv_sizeof_short != x ; then break; fi 
21612 done 
21613
21614 fi
21615  
21616 if test x$ac_cv_sizeof_short = x ; then 
21617   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21618 fi 
21619 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21620 cat >> confdefs.h <<EOF
21621 #define SIZEOF_SHORT $ac_cv_sizeof_short
21622 EOF
21623  
21624  
21625 echo $ac_n "checking size of int""... $ac_c" 1>&6
21626 echo "configure:21627: checking size of int" >&5 
21627 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21628   echo $ac_n "(cached) $ac_c" 1>&6
21629 else
21630   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21631   cat > conftest.$ac_ext <<EOF
21632 #line 21633 "configure"
21633 #include "confdefs.h"
21634 #include "confdefs.h" 
21635 #include <sys/types.h> 
21636  
21637
21638 int main() {
21639 switch (0) case 0: case (sizeof (int) == $ac_size):;
21640 ; return 0; }
21641 EOF
21642 if { (eval echo configure:21643: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21643   rm -rf conftest*
21644   ac_cv_sizeof_int=$ac_size
21645 else
21646   echo "configure: failed program was:" >&5
21647   cat conftest.$ac_ext >&5
21648 fi
21649 rm -f conftest* 
21650   if test x$ac_cv_sizeof_int != x ; then break; fi 
21651 done 
21652
21653 fi
21654  
21655 if test x$ac_cv_sizeof_int = x ; then 
21656   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21657 fi 
21658 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21659 cat >> confdefs.h <<EOF
21660 #define SIZEOF_INT $ac_cv_sizeof_int
21661 EOF
21662  
21663  
21664 echo $ac_n "checking size of long""... $ac_c" 1>&6
21665 echo "configure:21666: checking size of long" >&5 
21666 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21667   echo $ac_n "(cached) $ac_c" 1>&6
21668 else
21669   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21670   cat > conftest.$ac_ext <<EOF
21671 #line 21672 "configure"
21672 #include "confdefs.h"
21673 #include "confdefs.h" 
21674 #include <sys/types.h> 
21675  
21676
21677 int main() {
21678 switch (0) case 0: case (sizeof (long) == $ac_size):;
21679 ; return 0; }
21680 EOF
21681 if { (eval echo configure:21682: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21682   rm -rf conftest*
21683   ac_cv_sizeof_long=$ac_size
21684 else
21685   echo "configure: failed program was:" >&5
21686   cat conftest.$ac_ext >&5
21687 fi
21688 rm -f conftest* 
21689   if test x$ac_cv_sizeof_long != x ; then break; fi 
21690 done 
21691
21692 fi
21693  
21694 if test x$ac_cv_sizeof_long = x ; then 
21695   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21696 fi 
21697 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21698 cat >> confdefs.h <<EOF
21699 #define SIZEOF_LONG $ac_cv_sizeof_long
21700 EOF
21701  
21702
21703
21704 if test "$ac_cv_sizeof_int" -lt 4 ; then
21705         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21706
21707         cat >> confdefs.h <<\EOF
21708 #define LBER_INT_T long
21709 EOF
21710
21711 else
21712         cat >> confdefs.h <<\EOF
21713 #define LBER_INT_T int
21714 EOF
21715
21716 fi
21717
21718 cat >> confdefs.h <<\EOF
21719 #define LBER_LEN_T long
21720 EOF
21721
21722 cat >> confdefs.h <<\EOF
21723 #define LBER_SOCKET_T int
21724 EOF
21725
21726 cat >> confdefs.h <<\EOF
21727 #define LBER_TAG_T long
21728 EOF
21729
21730
21731 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21732 echo "configure:21733: checking for 8-bit clean memcmp" >&5
21733 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21734   echo $ac_n "(cached) $ac_c" 1>&6
21735 else
21736   if test "$cross_compiling" = yes; then
21737   ac_cv_func_memcmp_clean=no
21738 else
21739   cat > conftest.$ac_ext <<EOF
21740 #line 21741 "configure"
21741 #include "confdefs.h"
21742
21743 main()
21744 {
21745   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21746   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21747 }
21748
21749 EOF
21750 if { (eval echo configure:21751: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21751 then
21752   ac_cv_func_memcmp_clean=yes
21753 else
21754   echo "configure: failed program was:" >&5
21755   cat conftest.$ac_ext >&5
21756   rm -fr conftest*
21757   ac_cv_func_memcmp_clean=no
21758 fi
21759 rm -fr conftest*
21760 fi
21761
21762 fi
21763
21764 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21765 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21766
21767 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21768 echo "configure:21769: checking for strftime" >&5
21769 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21770   echo $ac_n "(cached) $ac_c" 1>&6
21771 else
21772   cat > conftest.$ac_ext <<EOF
21773 #line 21774 "configure"
21774 #include "confdefs.h"
21775 /* System header to define __stub macros and hopefully few prototypes,
21776     which can conflict with char strftime(); below.  */
21777 #include <assert.h>
21778 /* Override any gcc2 internal prototype to avoid an error.  */
21779 /* We use char because int might match the return type of a gcc2
21780     builtin and then its argument prototype would still apply.  */
21781 char strftime();
21782 char (*f)();
21783
21784 int main() {
21785
21786 /* The GNU C library defines this for functions which it implements
21787     to always fail with ENOSYS.  Some functions are actually named
21788     something starting with __ and the normal name is an alias.  */
21789 #if defined (__stub_strftime) || defined (__stub___strftime)
21790 choke me
21791 #else
21792 f = strftime;
21793 #endif
21794
21795 ; return 0; }
21796 EOF
21797 if { (eval echo configure:21798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21798   rm -rf conftest*
21799   eval "ac_cv_func_strftime=yes"
21800 else
21801   echo "configure: failed program was:" >&5
21802   cat conftest.$ac_ext >&5
21803   rm -rf conftest*
21804   eval "ac_cv_func_strftime=no"
21805 fi
21806 rm -f conftest*
21807 fi
21808
21809 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21810   echo "$ac_t""yes" 1>&6
21811   cat >> confdefs.h <<\EOF
21812 #define HAVE_STRFTIME 1
21813 EOF
21814
21815 else
21816   echo "$ac_t""no" 1>&6
21817 # strftime is in -lintl on SCO UNIX.
21818 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21819 echo "configure:21820: checking for strftime in -lintl" >&5
21820 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21821 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21822   echo $ac_n "(cached) $ac_c" 1>&6
21823 else
21824   ac_save_LIBS="$LIBS"
21825 LIBS="-lintl  $LIBS"
21826 cat > conftest.$ac_ext <<EOF
21827 #line 21828 "configure"
21828 #include "confdefs.h"
21829 /* Override any gcc2 internal prototype to avoid an error.  */
21830 /* We use char because int might match the return type of a gcc2
21831     builtin and then its argument prototype would still apply.  */
21832 char strftime();
21833
21834 int main() {
21835 strftime()
21836 ; return 0; }
21837 EOF
21838 if { (eval echo configure:21839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21839   rm -rf conftest*
21840   eval "ac_cv_lib_$ac_lib_var=yes"
21841 else
21842   echo "configure: failed program was:" >&5
21843   cat conftest.$ac_ext >&5
21844   rm -rf conftest*
21845   eval "ac_cv_lib_$ac_lib_var=no"
21846 fi
21847 rm -f conftest*
21848 LIBS="$ac_save_LIBS"
21849
21850 fi
21851 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21852   echo "$ac_t""yes" 1>&6
21853   cat >> confdefs.h <<\EOF
21854 #define HAVE_STRFTIME 1
21855 EOF
21856
21857 LIBS="-lintl $LIBS"
21858 else
21859   echo "$ac_t""no" 1>&6
21860 fi
21861
21862 fi
21863
21864
21865 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21866 echo "configure:21867: checking for inet_aton()" >&5
21867 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21868   echo $ac_n "(cached) $ac_c" 1>&6
21869 else
21870   cat > conftest.$ac_ext <<EOF
21871 #line 21872 "configure"
21872 #include "confdefs.h"
21873
21874 #ifdef HAVE_SYS_TYPES_H
21875 #       include <sys/types.h>
21876 #endif
21877 #ifdef HAVE_SYS_SOCKET_H
21878 #       include <sys/socket.h>
21879 #       ifdef HAVE_SYS_SELECT_H
21880 #               include <sys/select.h>
21881 #       endif
21882 #       include <netinet/in.h>
21883 #       ifdef HAVE_ARPA_INET_H
21884 #               include <arpa/inet.h>
21885 #       endif
21886 #endif
21887
21888 int main() {
21889 struct in_addr in;
21890 int rc = inet_aton( "255.255.255.255", &in );
21891 ; return 0; }
21892 EOF
21893 if { (eval echo configure:21894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21894   rm -rf conftest*
21895   ol_cv_func_inet_aton=yes
21896 else
21897   echo "configure: failed program was:" >&5
21898   cat conftest.$ac_ext >&5
21899   rm -rf conftest*
21900   ol_cv_func_inet_aton=no
21901 fi
21902 rm -f conftest*
21903 fi
21904
21905 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21906   if test $ol_cv_func_inet_aton != no; then
21907     cat >> confdefs.h <<\EOF
21908 #define HAVE_INET_ATON 1
21909 EOF
21910
21911   fi
21912  
21913
21914 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21915 echo "configure:21916: checking for _spawnlp" >&5
21916 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21917   echo $ac_n "(cached) $ac_c" 1>&6
21918 else
21919   cat > conftest.$ac_ext <<EOF
21920 #line 21921 "configure"
21921 #include "confdefs.h"
21922 /* System header to define __stub macros and hopefully few prototypes,
21923     which can conflict with char _spawnlp(); below.  */
21924 #include <assert.h>
21925 /* Override any gcc2 internal prototype to avoid an error.  */
21926 /* We use char because int might match the return type of a gcc2
21927     builtin and then its argument prototype would still apply.  */
21928 char _spawnlp();
21929 char (*f)();
21930
21931 int main() {
21932
21933 /* The GNU C library defines this for functions which it implements
21934     to always fail with ENOSYS.  Some functions are actually named
21935     something starting with __ and the normal name is an alias.  */
21936 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21937 choke me
21938 #else
21939 f = _spawnlp;
21940 #endif
21941
21942 ; return 0; }
21943 EOF
21944 if { (eval echo configure:21945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21945   rm -rf conftest*
21946   eval "ac_cv_func__spawnlp=yes"
21947 else
21948   echo "configure: failed program was:" >&5
21949   cat conftest.$ac_ext >&5
21950   rm -rf conftest*
21951   eval "ac_cv_func__spawnlp=no"
21952 fi
21953 rm -f conftest*
21954 fi
21955
21956 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21957   echo "$ac_t""yes" 1>&6
21958   cat >> confdefs.h <<\EOF
21959 #define HAVE_SPAWNLP 1
21960 EOF
21961
21962 else
21963   echo "$ac_t""no" 1>&6
21964 fi
21965
21966
21967 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21968 echo "configure:21969: checking for _snprintf" >&5
21969 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21970   echo $ac_n "(cached) $ac_c" 1>&6
21971 else
21972   cat > conftest.$ac_ext <<EOF
21973 #line 21974 "configure"
21974 #include "confdefs.h"
21975 /* System header to define __stub macros and hopefully few prototypes,
21976     which can conflict with char _snprintf(); below.  */
21977 #include <assert.h>
21978 /* Override any gcc2 internal prototype to avoid an error.  */
21979 /* We use char because int might match the return type of a gcc2
21980     builtin and then its argument prototype would still apply.  */
21981 char _snprintf();
21982 char (*f)();
21983
21984 int main() {
21985
21986 /* The GNU C library defines this for functions which it implements
21987     to always fail with ENOSYS.  Some functions are actually named
21988     something starting with __ and the normal name is an alias.  */
21989 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21990 choke me
21991 #else
21992 f = _snprintf;
21993 #endif
21994
21995 ; return 0; }
21996 EOF
21997 if { (eval echo configure:21998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21998   rm -rf conftest*
21999   eval "ac_cv_func__snprintf=yes"
22000 else
22001   echo "configure: failed program was:" >&5
22002   cat conftest.$ac_ext >&5
22003   rm -rf conftest*
22004   eval "ac_cv_func__snprintf=no"
22005 fi
22006 rm -f conftest*
22007 fi
22008
22009 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
22010   echo "$ac_t""yes" 1>&6
22011   ac_cv_func_snprintf=yes
22012         cat >> confdefs.h <<\EOF
22013 #define snprintf _snprintf
22014 EOF
22015
22016
22017 else
22018   echo "$ac_t""no" 1>&6
22019 fi
22020
22021
22022 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
22023 echo "configure:22024: checking for _vsnprintf" >&5
22024 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
22025   echo $ac_n "(cached) $ac_c" 1>&6
22026 else
22027   cat > conftest.$ac_ext <<EOF
22028 #line 22029 "configure"
22029 #include "confdefs.h"
22030 /* System header to define __stub macros and hopefully few prototypes,
22031     which can conflict with char _vsnprintf(); below.  */
22032 #include <assert.h>
22033 /* Override any gcc2 internal prototype to avoid an error.  */
22034 /* We use char because int might match the return type of a gcc2
22035     builtin and then its argument prototype would still apply.  */
22036 char _vsnprintf();
22037 char (*f)();
22038
22039 int main() {
22040
22041 /* The GNU C library defines this for functions which it implements
22042     to always fail with ENOSYS.  Some functions are actually named
22043     something starting with __ and the normal name is an alias.  */
22044 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
22045 choke me
22046 #else
22047 f = _vsnprintf;
22048 #endif
22049
22050 ; return 0; }
22051 EOF
22052 if { (eval echo configure:22053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22053   rm -rf conftest*
22054   eval "ac_cv_func__vsnprintf=yes"
22055 else
22056   echo "configure: failed program was:" >&5
22057   cat conftest.$ac_ext >&5
22058   rm -rf conftest*
22059   eval "ac_cv_func__vsnprintf=no"
22060 fi
22061 rm -f conftest*
22062 fi
22063
22064 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
22065   echo "$ac_t""yes" 1>&6
22066   ac_cv_func_vsnprintf=yes
22067         cat >> confdefs.h <<\EOF
22068 #define vsnprintf _vsnprintf
22069 EOF
22070
22071
22072 else
22073   echo "$ac_t""no" 1>&6
22074 fi
22075
22076
22077 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
22078 echo "configure:22079: checking for vprintf" >&5
22079 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
22080   echo $ac_n "(cached) $ac_c" 1>&6
22081 else
22082   cat > conftest.$ac_ext <<EOF
22083 #line 22084 "configure"
22084 #include "confdefs.h"
22085 /* System header to define __stub macros and hopefully few prototypes,
22086     which can conflict with char vprintf(); below.  */
22087 #include <assert.h>
22088 /* Override any gcc2 internal prototype to avoid an error.  */
22089 /* We use char because int might match the return type of a gcc2
22090     builtin and then its argument prototype would still apply.  */
22091 char vprintf();
22092 char (*f)();
22093
22094 int main() {
22095
22096 /* The GNU C library defines this for functions which it implements
22097     to always fail with ENOSYS.  Some functions are actually named
22098     something starting with __ and the normal name is an alias.  */
22099 #if defined (__stub_vprintf) || defined (__stub___vprintf)
22100 choke me
22101 #else
22102 f = vprintf;
22103 #endif
22104
22105 ; return 0; }
22106 EOF
22107 if { (eval echo configure:22108: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22108   rm -rf conftest*
22109   eval "ac_cv_func_vprintf=yes"
22110 else
22111   echo "configure: failed program was:" >&5
22112   cat conftest.$ac_ext >&5
22113   rm -rf conftest*
22114   eval "ac_cv_func_vprintf=no"
22115 fi
22116 rm -f conftest*
22117 fi
22118
22119 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
22120   echo "$ac_t""yes" 1>&6
22121   cat >> confdefs.h <<\EOF
22122 #define HAVE_VPRINTF 1
22123 EOF
22124
22125 else
22126   echo "$ac_t""no" 1>&6
22127 fi
22128
22129 if test "$ac_cv_func_vprintf" != yes; then
22130 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
22131 echo "configure:22132: checking for _doprnt" >&5
22132 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
22133   echo $ac_n "(cached) $ac_c" 1>&6
22134 else
22135   cat > conftest.$ac_ext <<EOF
22136 #line 22137 "configure"
22137 #include "confdefs.h"
22138 /* System header to define __stub macros and hopefully few prototypes,
22139     which can conflict with char _doprnt(); below.  */
22140 #include <assert.h>
22141 /* Override any gcc2 internal prototype to avoid an error.  */
22142 /* We use char because int might match the return type of a gcc2
22143     builtin and then its argument prototype would still apply.  */
22144 char _doprnt();
22145 char (*f)();
22146
22147 int main() {
22148
22149 /* The GNU C library defines this for functions which it implements
22150     to always fail with ENOSYS.  Some functions are actually named
22151     something starting with __ and the normal name is an alias.  */
22152 #if defined (__stub__doprnt) || defined (__stub____doprnt)
22153 choke me
22154 #else
22155 f = _doprnt;
22156 #endif
22157
22158 ; return 0; }
22159 EOF
22160 if { (eval echo configure:22161: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22161   rm -rf conftest*
22162   eval "ac_cv_func__doprnt=yes"
22163 else
22164   echo "configure: failed program was:" >&5
22165   cat conftest.$ac_ext >&5
22166   rm -rf conftest*
22167   eval "ac_cv_func__doprnt=no"
22168 fi
22169 rm -f conftest*
22170 fi
22171
22172 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
22173   echo "$ac_t""yes" 1>&6
22174   cat >> confdefs.h <<\EOF
22175 #define HAVE_DOPRNT 1
22176 EOF
22177
22178 else
22179   echo "$ac_t""no" 1>&6
22180 fi
22181
22182 fi
22183
22184
22185 if test $ac_cv_func_vprintf = yes ; then
22186                 for ac_func in vsnprintf vsprintf
22187 do
22188 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22189 echo "configure:22190: checking for $ac_func" >&5
22190 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22191   echo $ac_n "(cached) $ac_c" 1>&6
22192 else
22193   cat > conftest.$ac_ext <<EOF
22194 #line 22195 "configure"
22195 #include "confdefs.h"
22196 /* System header to define __stub macros and hopefully few prototypes,
22197     which can conflict with char $ac_func(); below.  */
22198 #include <assert.h>
22199 /* Override any gcc2 internal prototype to avoid an error.  */
22200 /* We use char because int might match the return type of a gcc2
22201     builtin and then its argument prototype would still apply.  */
22202 char $ac_func();
22203 char (*f)();
22204
22205 int main() {
22206
22207 /* The GNU C library defines this for functions which it implements
22208     to always fail with ENOSYS.  Some functions are actually named
22209     something starting with __ and the normal name is an alias.  */
22210 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22211 choke me
22212 #else
22213 f = $ac_func;
22214 #endif
22215
22216 ; return 0; }
22217 EOF
22218 if { (eval echo configure:22219: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22219   rm -rf conftest*
22220   eval "ac_cv_func_$ac_func=yes"
22221 else
22222   echo "configure: failed program was:" >&5
22223   cat conftest.$ac_ext >&5
22224   rm -rf conftest*
22225   eval "ac_cv_func_$ac_func=no"
22226 fi
22227 rm -f conftest*
22228 fi
22229
22230 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22231   echo "$ac_t""yes" 1>&6
22232     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22233   cat >> confdefs.h <<EOF
22234 #define $ac_tr_func 1
22235 EOF
22236  
22237 else
22238   echo "$ac_t""no" 1>&6
22239 fi
22240 done
22241
22242 fi
22243
22244 for ac_func in \
22245         bcopy                   \
22246         closesocket             \
22247         chroot                  \
22248         endgrent                \
22249         endpwent                \
22250         fcntl                   \
22251         flock                   \
22252         getdtablesize   \
22253         getgrgid                \
22254         gethostname             \
22255         getpass                 \
22256         getpassphrase   \
22257         getpwuid                \
22258         getpwnam                \
22259         getspnam                \
22260         gettimeofday    \
22261         initgroups              \
22262         lockf                   \
22263         memcpy                  \
22264         memmove                 \
22265         mkstemp                 \
22266         mktemp                  \
22267         pipe                    \
22268         read                    \
22269         recv                    \
22270         recvfrom                \
22271         recvmsg                 \
22272         setpwfile               \
22273         setgid                  \
22274         setegid                 \
22275         setsid                  \
22276         setuid                  \
22277         seteuid                 \
22278         sigaction               \
22279         signal                  \
22280         sigset                  \
22281         strdup                  \
22282         strerror                \
22283         strpbrk                 \
22284         strrchr                 \
22285         strsep                  \
22286         strstr                  \
22287         strtol                  \
22288         strtoul                 \
22289         strspn                  \
22290         sysconf                 \
22291         usleep                  \
22292         waitpid                 \
22293         wait4                   \
22294         write                   \
22295         send                    \
22296         sendto                  \
22297
22298 do
22299 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22300 echo "configure:22301: checking for $ac_func" >&5
22301 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22302   echo $ac_n "(cached) $ac_c" 1>&6
22303 else
22304   cat > conftest.$ac_ext <<EOF
22305 #line 22306 "configure"
22306 #include "confdefs.h"
22307 /* System header to define __stub macros and hopefully few prototypes,
22308     which can conflict with char $ac_func(); below.  */
22309 #include <assert.h>
22310 /* Override any gcc2 internal prototype to avoid an error.  */
22311 /* We use char because int might match the return type of a gcc2
22312     builtin and then its argument prototype would still apply.  */
22313 char $ac_func();
22314 char (*f)();
22315
22316 int main() {
22317
22318 /* The GNU C library defines this for functions which it implements
22319     to always fail with ENOSYS.  Some functions are actually named
22320     something starting with __ and the normal name is an alias.  */
22321 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22322 choke me
22323 #else
22324 f = $ac_func;
22325 #endif
22326
22327 ; return 0; }
22328 EOF
22329 if { (eval echo configure:22330: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22330   rm -rf conftest*
22331   eval "ac_cv_func_$ac_func=yes"
22332 else
22333   echo "configure: failed program was:" >&5
22334   cat conftest.$ac_ext >&5
22335   rm -rf conftest*
22336   eval "ac_cv_func_$ac_func=no"
22337 fi
22338 rm -f conftest*
22339 fi
22340
22341 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22342   echo "$ac_t""yes" 1>&6
22343     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22344   cat >> confdefs.h <<EOF
22345 #define $ac_tr_func 1
22346 EOF
22347  
22348 else
22349   echo "$ac_t""no" 1>&6
22350 fi
22351 done
22352
22353
22354 for ac_func in getopt
22355 do
22356 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
22357 echo "configure:22358: checking for $ac_func" >&5
22358 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
22359   echo $ac_n "(cached) $ac_c" 1>&6
22360 else
22361   cat > conftest.$ac_ext <<EOF
22362 #line 22363 "configure"
22363 #include "confdefs.h"
22364 /* System header to define __stub macros and hopefully few prototypes,
22365     which can conflict with char $ac_func(); below.  */
22366 #include <assert.h>
22367 /* Override any gcc2 internal prototype to avoid an error.  */
22368 /* We use char because int might match the return type of a gcc2
22369     builtin and then its argument prototype would still apply.  */
22370 char $ac_func();
22371 char (*f)();
22372
22373 int main() {
22374
22375 /* The GNU C library defines this for functions which it implements
22376     to always fail with ENOSYS.  Some functions are actually named
22377     something starting with __ and the normal name is an alias.  */
22378 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
22379 choke me
22380 #else
22381 f = $ac_func;
22382 #endif
22383
22384 ; return 0; }
22385 EOF
22386 if { (eval echo configure:22387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22387   rm -rf conftest*
22388   eval "ac_cv_func_$ac_func=yes"
22389 else
22390   echo "configure: failed program was:" >&5
22391   cat conftest.$ac_ext >&5
22392   rm -rf conftest*
22393   eval "ac_cv_func_$ac_func=no"
22394 fi
22395 rm -f conftest*
22396 fi
22397
22398 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
22399   echo "$ac_t""yes" 1>&6
22400     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
22401   cat >> confdefs.h <<EOF
22402 #define $ac_tr_func 1
22403 EOF
22404  
22405 else
22406   echo "$ac_t""no" 1>&6
22407 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
22408 fi
22409 done
22410
22411
22412
22413 if test "$ac_cv_func_getopt" != yes; then
22414         LIBSRCS="$LIBSRCS getopt.c"
22415 fi
22416
22417 # Check Configuration
22418 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
22419 echo "configure:22420: checking declaration of sys_errlist" >&5
22420 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
22421   echo $ac_n "(cached) $ac_c" 1>&6
22422 else
22423   
22424         cat > conftest.$ac_ext <<EOF
22425 #line 22426 "configure"
22426 #include "confdefs.h"
22427
22428 #include <stdio.h>
22429 #include <sys/types.h>
22430 #include <errno.h>
22431 #ifdef WINNT
22432 #include <stdlib.h>
22433 #endif 
22434 int main() {
22435 char *c = (char *) *sys_errlist
22436 ; return 0; }
22437 EOF
22438 if { (eval echo configure:22439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
22439   rm -rf conftest*
22440   ol_cv_dcl_sys_errlist=yes
22441         ol_cv_have_sys_errlist=yes
22442 else
22443   echo "configure: failed program was:" >&5
22444   cat conftest.$ac_ext >&5
22445   rm -rf conftest*
22446   ol_cv_dcl_sys_errlist=no
22447 fi
22448 rm -f conftest*
22449 fi
22450
22451 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
22452 #
22453 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
22454 if test $ol_cv_dcl_sys_errlist = no ; then
22455         cat >> confdefs.h <<\EOF
22456 #define DECL_SYS_ERRLIST 1
22457 EOF
22458
22459
22460         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
22461 echo "configure:22462: checking existence of sys_errlist" >&5
22462 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
22463   echo $ac_n "(cached) $ac_c" 1>&6
22464 else
22465   
22466                 cat > conftest.$ac_ext <<EOF
22467 #line 22468 "configure"
22468 #include "confdefs.h"
22469 #include <errno.h>
22470 int main() {
22471 char *c = (char *) *sys_errlist
22472 ; return 0; }
22473 EOF
22474 if { (eval echo configure:22475: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22475   rm -rf conftest*
22476   ol_cv_have_sys_errlist=yes
22477 else
22478   echo "configure: failed program was:" >&5
22479   cat conftest.$ac_ext >&5
22480   rm -rf conftest*
22481   ol_cv_have_sys_errlist=no
22482 fi
22483 rm -f conftest*
22484 fi
22485
22486 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22487 fi
22488 if test $ol_cv_have_sys_errlist = yes ; then
22489         cat >> confdefs.h <<\EOF
22490 #define HAVE_SYS_ERRLIST 1
22491 EOF
22492
22493 fi
22494
22495
22496
22497 if test "$ol_enable_debug" != no ; then
22498         cat >> confdefs.h <<\EOF
22499 #define LDAP_DEBUG 1
22500 EOF
22501
22502 fi
22503 if test "$ol_enable_syslog" = yes ; then
22504         cat >> confdefs.h <<\EOF
22505 #define LDAP_SYSLOG 1
22506 EOF
22507
22508 fi
22509 if test "$ol_enable_cache" = no ; then
22510         cat >> confdefs.h <<\EOF
22511 #define LDAP_NOCACHE 1
22512 EOF
22513
22514 fi
22515 if test "$ol_link_kbind" != no ; then
22516         cat >> confdefs.h <<\EOF
22517 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22518 EOF
22519
22520 fi
22521 if test "$ol_enable_proctitle" != no ; then
22522         cat >> confdefs.h <<\EOF
22523 #define LDAP_PROCTITLE 1
22524 EOF
22525
22526 fi
22527 if test "$ol_enable_referrals" != no ; then
22528         cat >> confdefs.h <<\EOF
22529 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22530 EOF
22531
22532 fi
22533 if test "$ol_enable_local" != no; then
22534         cat >> confdefs.h <<\EOF
22535 #define LDAP_PF_LOCAL 1
22536 EOF
22537
22538 fi
22539 if test "$ol_link_ipv6" != no; then
22540         cat >> confdefs.h <<\EOF
22541 #define LDAP_PF_INET6 1
22542 EOF
22543
22544 fi
22545 if test "$ol_enable_cleartext" != no ; then
22546         cat >> confdefs.h <<\EOF
22547 #define SLAPD_CLEARTEXT 1
22548 EOF
22549
22550 fi
22551 if test "$ol_enable_crypt" != no ; then
22552         cat >> confdefs.h <<\EOF
22553 #define SLAPD_CRYPT 1
22554 EOF
22555
22556 fi
22557 if test "$ol_link_kpasswd" != no ; then
22558         cat >> confdefs.h <<\EOF
22559 #define SLAPD_KPASSWD 1
22560 EOF
22561
22562 fi
22563 if test "$ol_link_spasswd" != no ; then
22564         cat >> confdefs.h <<\EOF
22565 #define SLAPD_SPASSWD 1
22566 EOF
22567
22568 fi
22569 if test "$ol_enable_multimaster" != no ; then
22570         cat >> confdefs.h <<\EOF
22571 #define SLAPD_MULTIMASTER 1
22572 EOF
22573
22574 fi
22575 if test "$ol_enable_phonetic" != no ; then
22576         cat >> confdefs.h <<\EOF
22577 #define SLAPD_PHONETIC 1
22578 EOF
22579
22580 fi
22581 if test "$ol_enable_rlookups" != no ; then
22582         cat >> confdefs.h <<\EOF
22583 #define SLAPD_RLOOKUPS 1
22584 EOF
22585
22586 fi
22587 if test "$ol_enable_aci" != no ; then
22588         cat >> confdefs.h <<\EOF
22589 #define SLAPD_ACI_ENABLED 1
22590 EOF
22591
22592 fi
22593
22594 if test "$ol_link_modules" != no ; then
22595         cat >> confdefs.h <<\EOF
22596 #define SLAPD_MODULES 1
22597 EOF
22598
22599         BUILD_SLAPD=yes
22600         SLAPD_MODULES_LDFLAGS="-dlopen self"
22601 fi
22602
22603 if test "$ol_enable_bdb" != no ; then
22604         cat >> confdefs.h <<\EOF
22605 #define SLAPD_BDB 1
22606 EOF
22607
22608         BUILD_SLAPD=yes
22609         BUILD_BDB=yes
22610         if test "$ol_with_bdb_module" != static ; then
22611                 cat >> confdefs.h <<\EOF
22612 #define SLAPD_BDB_DYNAMIC 1
22613 EOF
22614
22615                 BUILD_BDB=mod
22616                 BUILD_BDB_DYNAMIC=shared
22617                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22618         else
22619                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22620         fi
22621 fi
22622
22623 if test "$ol_link_dnssrv" != no ; then
22624         cat >> confdefs.h <<\EOF
22625 #define SLAPD_DNSSRV 1
22626 EOF
22627
22628         BUILD_SLAPD=yes
22629         BUILD_DNSSRV=yes
22630         if test "$ol_with_dnssrv_module" != static ; then
22631                 cat >> confdefs.h <<\EOF
22632 #define SLAPD_DNSSRV_DYNAMIC 1
22633 EOF
22634
22635                 BUILD_DNSSRV=mod
22636                 BUILD_DNSSRV_DYNAMIC=shared
22637                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22638         else
22639                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22640         fi
22641 fi
22642
22643 if test "$ol_enable_ldap" != no ; then
22644         cat >> confdefs.h <<\EOF
22645 #define SLAPD_LDAP 1
22646 EOF
22647
22648         BUILD_SLAPD=yes
22649         BUILD_LDAP=yes
22650         if test "$ol_with_ldap_module" != static ; then
22651                 cat >> confdefs.h <<\EOF
22652 #define SLAPD_LDAP_DYNAMIC 1
22653 EOF
22654
22655                 BUILD_LDAP=mod
22656                 BUILD_LDAP_DYNAMIC=shared
22657                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22658         else
22659                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22660         fi
22661 fi
22662
22663 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22664         cat >> confdefs.h <<\EOF
22665 #define SLAPD_LDBM 1
22666 EOF
22667
22668         BUILD_SLAPD=yes
22669         BUILD_LDBM=yes
22670         LDBM_LIB="-lldbm"
22671         if test "$ol_with_ldbm_module" != static ; then
22672                 cat >> confdefs.h <<\EOF
22673 #define SLAPD_LDBM_DYNAMIC 1
22674 EOF
22675
22676                 BUILD_LDBM=mod
22677                 BUILD_LDBM_DYNAMIC=shared
22678                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22679         else
22680                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22681         fi
22682 fi
22683
22684 if test "$ol_enable_meta" != no ; then
22685         if test "$ol_enable_ldap" = no ; then
22686                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22687         fi
22688         if test "$ol_enable_rewrite" = no ; then
22689                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22690         fi
22691         cat >> confdefs.h <<\EOF
22692 #define SLAPD_META 1
22693 EOF
22694
22695         BUILD_SLAPD=yes
22696         BUILD_META=yes
22697         BUILD_LDAP=yes
22698         BUILD_REWRITE=yes
22699         if test "$ol_with_meta_module" != static ; then
22700                 cat >> confdefs.h <<\EOF
22701 #define SLAPD_META_DYNAMIC 1
22702 EOF
22703
22704                 BUILD_META=mod
22705                 BUILD_META_DYNAMIC=shared
22706                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22707         else
22708                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22709         fi
22710 fi
22711
22712 if test "$ol_enable_monitor" != no ; then
22713         cat >> confdefs.h <<\EOF
22714 #define SLAPD_MONITOR 1
22715 EOF
22716
22717         BUILD_SLAPD=yes
22718         BUILD_MONITOR=yes
22719         if test "$ol_with_monitor_module" != static ; then
22720                 cat >> confdefs.h <<\EOF
22721 #define SLAPD_MONITOR_DYNAMIC 1
22722 EOF
22723
22724                 BUILD_MONITOR=mod
22725                 BUILD_MONITOR_DYNAMIC=shared
22726                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22727         else
22728                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22729         fi
22730 fi
22731
22732 if test "$ol_enable_null" != no ; then
22733         cat >> confdefs.h <<\EOF
22734 #define SLAPD_NULL 1
22735 EOF
22736
22737         BUILD_SLAPD=yes
22738         BUILD_NULL=yes
22739         if test "$ol_with_null_module" != static ; then
22740                 cat >> confdefs.h <<\EOF
22741 #define SLAPD_NULL_DYNAMIC 1
22742 EOF
22743
22744                 BUILD_NULL=mod
22745                 BUILD_NULL_DYNAMIC=shared
22746                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22747         else
22748                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22749         fi
22750 fi
22751
22752 if test "$ol_enable_passwd" != no ; then
22753         cat >> confdefs.h <<\EOF
22754 #define SLAPD_PASSWD 1
22755 EOF
22756
22757         BUILD_SLAPD=yes
22758         BUILD_PASSWD=yes
22759         if test "$ol_with_passwd_module" != static ; then
22760                 cat >> confdefs.h <<\EOF
22761 #define SLAPD_PASSWD_DYNAMIC 1
22762 EOF
22763
22764                 BUILD_PASSWD=mod
22765                 BUILD_PASSWD_DYNAMIC=shared
22766                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22767         else
22768                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22769         fi
22770 fi
22771
22772 if test "$ol_link_perl" != no ; then
22773         cat >> confdefs.h <<\EOF
22774 #define SLAPD_PERL 1
22775 EOF
22776
22777         BUILD_SLAPD=yes
22778         BUILD_PERL=yes
22779         if test "$ol_with_perl_module" != static ; then
22780                 cat >> confdefs.h <<\EOF
22781 #define SLAPD_PERL_DYNAMIC 1
22782 EOF
22783
22784                 BUILD_PERL=mod
22785                 BUILD_PERL_DYNAMIC=shared
22786                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22787         else
22788                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22789         fi
22790 fi
22791
22792 if test "$ol_enable_shell" != no ; then
22793         cat >> confdefs.h <<\EOF
22794 #define SLAPD_SHELL 1
22795 EOF
22796
22797         BUILD_SLAPD=yes
22798         BUILD_SHELL=yes
22799         if test "$ol_with_shell_module" != static ; then
22800                 cat >> confdefs.h <<\EOF
22801 #define SLAPD_SHELL_DYNAMIC 1
22802 EOF
22803
22804                 BUILD_SHELL=mod
22805                 BUILD_SHELL_DYNAMIC=shared
22806                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22807         else
22808                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22809         fi
22810 fi
22811
22812 if test "$ol_link_sql" != no ; then
22813         cat >> confdefs.h <<\EOF
22814 #define SLAPD_SQL 1
22815 EOF
22816
22817         BUILD_SLAPD=yes
22818         BUILD_SQL=yes
22819         if test "$ol_with_sql_module" != static; then
22820                 cat >> confdefs.h <<\EOF
22821 #define SLAPD_SQL_DYNAMIC 1
22822 EOF
22823
22824                 BUILD_SQL=mod
22825                 BUILD_SQL_DYNAMIC=shared
22826                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22827         else
22828                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22829         fi
22830 fi
22831
22832 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22833         $BUILD_SLAPD = yes ; then
22834         BUILD_SLURPD=yes
22835 fi
22836
22837 if test "$ol_enable_rewrite" != no ; then
22838         cat >> confdefs.h <<\EOF
22839 #define ENABLE_REWRITE 1
22840 EOF
22841
22842         BUILD_REWRITE=yes
22843 fi
22844
22845
22846
22847 if test "$ac_cv_mingw32" = yes ; then
22848         PLAT=NT
22849         SLAPD_MODULES_LDFLAGS=
22850 else
22851         PLAT=UNIX
22852 fi
22853
22854
22855
22856
22857
22858
22859   
22860   
22861   
22862   
22863   
22864   
22865   
22866   
22867   
22868   
22869   
22870   
22871   
22872   
22873   
22874   
22875   
22876   
22877   
22878   
22879   
22880   
22881
22882
22883
22884
22885
22886
22887
22888
22889
22890
22891
22892
22893
22894
22895
22896
22897
22898
22899
22900
22901
22902
22903
22904
22905
22906
22907
22908
22909
22910
22911
22912
22913
22914
22915
22916
22917
22918
22919 # Check whether --with-xxinstall or --without-xxinstall was given.
22920 if test "${with_xxinstall+set}" = set; then
22921   withval="$with_xxinstall"
22922   :
22923 fi
22924
22925
22926
22927 trap '' 1 2 15
22928
22929 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22930
22931 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22932 # Let make expand exec_prefix.
22933 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22934
22935 # Any assignment to VPATH causes Sun make to only execute
22936 # the first set of double-colon rules, so remove it if not needed.
22937 # If there is a colon in the path, we need to keep it.
22938 if test "x$srcdir" = x.; then
22939   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22940 fi
22941
22942 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22943
22944 DEFS=-DHAVE_CONFIG_H
22945
22946 # Without the "./", some shells look in PATH for config.status.
22947 : ${CONFIG_STATUS=./config.status}
22948
22949 echo creating $CONFIG_STATUS
22950 rm -f $CONFIG_STATUS
22951 cat > $CONFIG_STATUS <<EOF
22952 #! /bin/sh
22953 # Generated automatically by configure.
22954 # Run this file to recreate the current configuration.
22955 # This directory was configured as follows,
22956 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22957 #
22958 # $0 $ac_configure_args
22959 #
22960 # Compiler output produced by configure, useful for debugging
22961 # configure, is in ./config.log if it exists.
22962
22963 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22964 for ac_option
22965 do
22966   case "\$ac_option" in
22967   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22968     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22969     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22970   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22971     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22972     exit 0 ;;
22973   -help | --help | --hel | --he | --h)
22974     echo "\$ac_cs_usage"; exit 0 ;;
22975   *) echo "\$ac_cs_usage"; exit 1 ;;
22976   esac
22977 done
22978
22979 ac_given_srcdir=$srcdir
22980 ac_given_INSTALL="$INSTALL"
22981
22982 trap 'rm -fr `echo "\
22983 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22984 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22985 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22986 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22987 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22988 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22989 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22990 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22991 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22992 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22993 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22994 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22995 include/Makefile:build/top.mk:include/Makefile.in \
22996 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22997 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22998 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22999 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23000 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23001 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23002 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23003 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23004 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23005 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23006 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23007 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23008 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23009 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23010 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23011 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23012 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23013 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23014 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23015 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23016 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23017 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23018 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23019 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23020 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23021 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23022 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23023 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23024  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
23025 EOF
23026 cat >> $CONFIG_STATUS <<EOF
23027
23028 # Protect against being on the right side of a sed subst in config.status.
23029 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
23030  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
23031 $ac_vpsub
23032 $extrasub
23033 s%@SHELL@%$SHELL%g
23034 s%@CFLAGS@%$CFLAGS%g
23035 s%@CPPFLAGS@%$CPPFLAGS%g
23036 s%@CXXFLAGS@%$CXXFLAGS%g
23037 s%@FFLAGS@%$FFLAGS%g
23038 s%@DEFS@%$DEFS%g
23039 s%@LDFLAGS@%$LDFLAGS%g
23040 s%@LIBS@%$LIBS%g
23041 s%@exec_prefix@%$exec_prefix%g
23042 s%@prefix@%$prefix%g
23043 s%@program_transform_name@%$program_transform_name%g
23044 s%@bindir@%$bindir%g
23045 s%@sbindir@%$sbindir%g
23046 s%@libexecdir@%$libexecdir%g
23047 s%@datadir@%$datadir%g
23048 s%@sysconfdir@%$sysconfdir%g
23049 s%@sharedstatedir@%$sharedstatedir%g
23050 s%@localstatedir@%$localstatedir%g
23051 s%@libdir@%$libdir%g
23052 s%@includedir@%$includedir%g
23053 s%@oldincludedir@%$oldincludedir%g
23054 s%@infodir@%$infodir%g
23055 s%@mandir@%$mandir%g
23056 s%@host@%$host%g
23057 s%@host_alias@%$host_alias%g
23058 s%@host_cpu@%$host_cpu%g
23059 s%@host_vendor@%$host_vendor%g
23060 s%@host_os@%$host_os%g
23061 s%@target@%$target%g
23062 s%@target_alias@%$target_alias%g
23063 s%@target_cpu@%$target_cpu%g
23064 s%@target_vendor@%$target_vendor%g
23065 s%@target_os@%$target_os%g
23066 s%@build@%$build%g
23067 s%@build_alias@%$build_alias%g
23068 s%@build_cpu@%$build_cpu%g
23069 s%@build_vendor@%$build_vendor%g
23070 s%@build_os@%$build_os%g
23071 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
23072 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
23073 s%@INSTALL_DATA@%$INSTALL_DATA%g
23074 s%@PACKAGE@%$PACKAGE%g
23075 s%@VERSION@%$VERSION%g
23076 s%@ACLOCAL@%$ACLOCAL%g
23077 s%@AUTOCONF@%$AUTOCONF%g
23078 s%@AUTOMAKE@%$AUTOMAKE%g
23079 s%@AUTOHEADER@%$AUTOHEADER%g
23080 s%@MAKEINFO@%$MAKEINFO%g
23081 s%@install_sh@%$install_sh%g
23082 s%@AMTAR@%$AMTAR%g
23083 s%@AWK@%$AWK%g
23084 s%@AMTARFLAGS@%$AMTARFLAGS%g
23085 s%@SET_MAKE@%$SET_MAKE%g
23086 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
23087 s%@OPENLDAP_RELEASE_DATE@%$OPENLDAP_RELEASE_DATE%g
23088 s%@top_builddir@%$top_builddir%g
23089 s%@ldap_subdir@%$ldap_subdir%g
23090 s%@CC@%$CC%g
23091 s%@AR@%$AR%g
23092 s%@LN_S@%$LN_S%g
23093 s%@OBJEXT@%$OBJEXT%g
23094 s%@EXEEXT@%$EXEEXT%g
23095 s%@ECHO@%$ECHO%g
23096 s%@RANLIB@%$RANLIB%g
23097 s%@STRIP@%$STRIP%g
23098 s%@DLLTOOL@%$DLLTOOL%g
23099 s%@AS@%$AS%g
23100 s%@OBJDUMP@%$OBJDUMP%g
23101 s%@CPP@%$CPP%g
23102 s%@LIBTOOL@%$LIBTOOL%g
23103 s%@LN_H@%$LN_H%g
23104 s%@SENDMAIL@%$SENDMAIL%g
23105 s%@EDITOR@%$EDITOR%g
23106 s%@PERLBIN@%$PERLBIN%g
23107 s%@OL_MKDEP@%$OL_MKDEP%g
23108 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
23109 s%@LIBOBJS@%$LIBOBJS%g
23110 s%@LIBSRCS@%$LIBSRCS%g
23111 s%@PLAT@%$PLAT%g
23112 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
23113 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
23114 s%@BUILD_BDB@%$BUILD_BDB%g
23115 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
23116 s%@BUILD_LDAP@%$BUILD_LDAP%g
23117 s%@BUILD_LDBM@%$BUILD_LDBM%g
23118 s%@BUILD_META@%$BUILD_META%g
23119 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
23120 s%@BUILD_NULL@%$BUILD_NULL%g
23121 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
23122 s%@BUILD_PERL@%$BUILD_PERL%g
23123 s%@BUILD_SHELL@%$BUILD_SHELL%g
23124 s%@BUILD_SQL@%$BUILD_SQL%g
23125 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
23126 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
23127 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
23128 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
23129 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
23130 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
23131 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
23132 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
23133 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
23134 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
23135 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
23136 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
23137 s%@LDBM_LIB@%$LDBM_LIB%g
23138 s%@LDAP_LIBS@%$LDAP_LIBS%g
23139 s%@LDIF_LIBS@%$LDIF_LIBS%g
23140 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
23141 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
23142 s%@LDBM_LIBS@%$LDBM_LIBS%g
23143 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
23144 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
23145 s%@WRAP_LIBS@%$WRAP_LIBS%g
23146 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
23147 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
23148 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
23149 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
23150 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
23151 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
23152 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
23153 s%@KRB4_LIBS@%$KRB4_LIBS%g
23154 s%@KRB5_LIBS@%$KRB5_LIBS%g
23155 s%@READLINE_LIBS@%$READLINE_LIBS%g
23156 s%@SASL_LIBS@%$SASL_LIBS%g
23157 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
23158 s%@TLS_LIBS@%$TLS_LIBS%g
23159 s%@MODULES_LIBS@%$MODULES_LIBS%g
23160 s%@AUTH_LIBS@%$AUTH_LIBS%g
23161 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
23162 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
23163 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
23164 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
23165
23166 CEOF
23167 EOF
23168
23169 cat >> $CONFIG_STATUS <<\EOF
23170
23171 # Split the substitutions into bite-sized pieces for seds with
23172 # small command number limits, like on Digital OSF/1 and HP-UX.
23173 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
23174 ac_file=1 # Number of current file.
23175 ac_beg=1 # First line for current file.
23176 ac_end=$ac_max_sed_cmds # Line after last line for current file.
23177 ac_more_lines=:
23178 ac_sed_cmds=""
23179 while $ac_more_lines; do
23180   if test $ac_beg -gt 1; then
23181     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
23182   else
23183     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
23184   fi
23185   if test ! -s conftest.s$ac_file; then
23186     ac_more_lines=false
23187     rm -f conftest.s$ac_file
23188   else
23189     if test -z "$ac_sed_cmds"; then
23190       ac_sed_cmds="sed -f conftest.s$ac_file"
23191     else
23192       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
23193     fi
23194     ac_file=`expr $ac_file + 1`
23195     ac_beg=$ac_end
23196     ac_end=`expr $ac_end + $ac_max_sed_cmds`
23197   fi
23198 done
23199 if test -z "$ac_sed_cmds"; then
23200   ac_sed_cmds=cat
23201 fi
23202 EOF
23203
23204 cat >> $CONFIG_STATUS <<EOF
23205
23206 CONFIG_FILES=\${CONFIG_FILES-"\
23207 Makefile:build/top.mk:Makefile.in:build/dir.mk \
23208 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
23209 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
23210 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
23211 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
23212 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
23213 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
23214 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
23215 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
23216 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
23217 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
23218 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
23219 include/Makefile:build/top.mk:include/Makefile.in \
23220 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
23221 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
23222 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23223 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
23224 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
23225 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
23226 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
23227 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
23228 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
23229 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
23230 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
23231 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
23232 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
23233 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
23234 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
23235 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
23236 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
23237 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
23238 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
23239 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
23240 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
23241 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
23242 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
23243 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
23244 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
23245 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
23246 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
23247 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
23248 "}
23249 EOF
23250 cat >> $CONFIG_STATUS <<\EOF
23251 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
23252   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23253   case "$ac_file" in
23254   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23255        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23256   *) ac_file_in="${ac_file}.in" ;;
23257   esac
23258
23259   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
23260
23261   # Remove last slash and all that follows it.  Not all systems have dirname.
23262   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23263   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23264     # The file is in a subdirectory.
23265     test ! -d "$ac_dir" && mkdir "$ac_dir"
23266     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
23267     # A "../" for each directory in $ac_dir_suffix.
23268     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
23269   else
23270     ac_dir_suffix= ac_dots=
23271   fi
23272
23273   case "$ac_given_srcdir" in
23274   .)  srcdir=.
23275       if test -z "$ac_dots"; then top_srcdir=.
23276       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
23277   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
23278   *) # Relative path.
23279     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
23280     top_srcdir="$ac_dots$ac_given_srcdir" ;;
23281   esac
23282
23283   case "$ac_given_INSTALL" in
23284   [/$]*) INSTALL="$ac_given_INSTALL" ;;
23285   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
23286   esac
23287
23288   echo creating "$ac_file"
23289   rm -f "$ac_file"
23290   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
23291   case "$ac_file" in
23292   *[Mm]akefile*) ac_comsub="1i\\
23293 # $configure_input" ;;
23294   *) ac_comsub= ;;
23295   esac
23296
23297   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23298   sed -e "$ac_comsub
23299 s%@configure_input@%$configure_input%g
23300 s%@srcdir@%$srcdir%g
23301 s%@top_srcdir@%$top_srcdir%g
23302 s%@INSTALL@%$INSTALL%g
23303 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
23304 fi; done
23305 rm -f conftest.s*
23306
23307 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
23308 # NAME is the cpp macro being defined and VALUE is the value it is being given.
23309 #
23310 # ac_d sets the value in "#define NAME VALUE" lines.
23311 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
23312 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
23313 ac_dC='\3'
23314 ac_dD='%g'
23315 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
23316 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23317 ac_uB='\([      ]\)%\1#\2define\3'
23318 ac_uC=' '
23319 ac_uD='\4%g'
23320 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
23321 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
23322 ac_eB='$%\1#\2define\3'
23323 ac_eC=' '
23324 ac_eD='%g'
23325
23326 if test "${CONFIG_HEADERS+set}" != set; then
23327 EOF
23328 cat >> $CONFIG_STATUS <<EOF
23329   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
23330 EOF
23331 cat >> $CONFIG_STATUS <<\EOF
23332 fi
23333 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
23334   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
23335   case "$ac_file" in
23336   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
23337        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
23338   *) ac_file_in="${ac_file}.in" ;;
23339   esac
23340
23341   echo creating $ac_file
23342
23343   rm -f conftest.frag conftest.in conftest.out
23344   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
23345   cat $ac_file_inputs > conftest.in
23346
23347 EOF
23348
23349 # Transform confdefs.h into a sed script conftest.vals that substitutes
23350 # the proper values into config.h.in to produce config.h.  And first:
23351 # Protect against being on the right side of a sed subst in config.status.
23352 # Protect against being in an unquoted here document in config.status.
23353 rm -f conftest.vals
23354 cat > conftest.hdr <<\EOF
23355 s/[\\&%]/\\&/g
23356 s%[\\$`]%\\&%g
23357 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
23358 s%ac_d%ac_u%gp
23359 s%ac_u%ac_e%gp
23360 EOF
23361 sed -n -f conftest.hdr confdefs.h > conftest.vals
23362 rm -f conftest.hdr
23363
23364 # This sed command replaces #undef with comments.  This is necessary, for
23365 # example, in the case of _POSIX_SOURCE, which is predefined and required
23366 # on some systems where configure will not decide to define it.
23367 cat >> conftest.vals <<\EOF
23368 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
23369 EOF
23370
23371 # Break up conftest.vals because some shells have a limit on
23372 # the size of here documents, and old seds have small limits too.
23373
23374 rm -f conftest.tail
23375 while :
23376 do
23377   ac_lines=`grep -c . conftest.vals`
23378   # grep -c gives empty output for an empty file on some AIX systems.
23379   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
23380   # Write a limited-size here document to conftest.frag.
23381   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
23382   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
23383   echo 'CEOF
23384   sed -f conftest.frag conftest.in > conftest.out
23385   rm -f conftest.in
23386   mv conftest.out conftest.in
23387 ' >> $CONFIG_STATUS
23388   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
23389   rm -f conftest.vals
23390   mv conftest.tail conftest.vals
23391 done
23392 rm -f conftest.vals
23393
23394 cat >> $CONFIG_STATUS <<\EOF
23395   rm -f conftest.frag conftest.h
23396   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
23397   cat conftest.in >> conftest.h
23398   rm -f conftest.in
23399   if cmp -s $ac_file conftest.h 2>/dev/null; then
23400     echo "$ac_file is unchanged"
23401     rm -f conftest.h
23402   else
23403     # Remove last slash and all that follows it.  Not all systems have dirname.
23404       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
23405       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
23406       # The file is in a subdirectory.
23407       test ! -d "$ac_dir" && mkdir "$ac_dir"
23408     fi
23409     rm -f $ac_file
23410     mv conftest.h $ac_file
23411   fi
23412 fi; done
23413
23414 EOF
23415 cat >> $CONFIG_STATUS <<EOF
23416
23417 EOF
23418 cat >> $CONFIG_STATUS <<\EOF
23419
23420 date > stamp-h
23421 echo Please run \"make depend\" to build dependencies
23422
23423 exit 0
23424 EOF
23425 chmod +x $CONFIG_STATUS
23426 rm -fr confdefs* $ac_clean_files
23427 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
23428