]> git.sur5r.net Git - openldap/blob - configure
Minor astestic changes
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.403 2002/02/10 16:51:30 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-kbind          enable LDAPv2+ Kerberos IV bind (deprecated) [no]"
42 ac_help="$ac_help
43   --enable-ipv6           enable IPv6 support [auto]"
44 ac_help="$ac_help
45   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
46 ac_help="$ac_help
47   --enable-rewrite        enable rewrite [no]"
48 ac_help="$ac_help
49   --enable-x-compile      enable cross compiling [no]"
50 ac_help="$ac_help
51   --with-cyrus-sasl       with Cyrus SASL support [auto]"
52 ac_help="$ac_help
53   --with-fetch            with fetch URL support [auto]"
54 ac_help="$ac_help
55   --with-kerberos         with Kerberos support [auto]"
56 ac_help="$ac_help
57   --with-readline         with readline support [auto]"
58 ac_help="$ac_help
59   --with-threads          with threads [auto]"
60 ac_help="$ac_help
61   --with-tls              with TLS/SSL support [auto]"
62 ac_help="$ac_help
63   --with-yielding-select  with implicitly yielding select [auto]"
64 ac_help="$ac_help
65
66 SLAPD (Standalone LDAP Daemon) Options:"
67 ac_help="$ac_help
68   --enable-slapd          enable building slapd [yes]"
69 ac_help="$ac_help
70     --enable-aci          enable per-object ACIs (experimental) [no]"
71 ac_help="$ac_help
72     --enable-cleartext    enable cleartext passwords [yes]"
73 ac_help="$ac_help
74     --enable-crypt        enable crypt(3) passwords [no]"
75 ac_help="$ac_help
76     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
77 ac_help="$ac_help
78     --enable-kpasswd      enable Kerberos password verification [no]"
79 ac_help="$ac_help
80     --enable-lmpasswd     enable LAN Manager passwords [no]"
81 ac_help="$ac_help
82     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
83 ac_help="$ac_help
84     --enable-modules      enable dynamic module support [no]"
85 ac_help="$ac_help
86     --enable-phonetic     enable phonetic/soundex [no]"
87 ac_help="$ac_help
88     --enable-rlookups     enable reverse lookups [no]"
89 ac_help="$ac_help
90     --enable-slp          enable SLPv2 support [no]"
91 ac_help="$ac_help
92     --enable-wrappers     enable tcp wrapper support [no]"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend [yes]"
95 ac_help="$ac_help
96     --with-bdb-module     module type [static]"
97 ac_help="$ac_help
98     --enable-dnssrv       enable dnssrv backend [no]"
99 ac_help="$ac_help
100     --with-dnssrv-module  module type [static]"
101 ac_help="$ac_help
102     --enable-ldap         enable ldap backend [no]"
103 ac_help="$ac_help
104     --with-ldap-module    module type [static]"
105 ac_help="$ac_help
106     --enable-ldbm         enable ldbm backend [no]"
107 ac_help="$ac_help
108     --with-ldbm-api       with LDBM API [auto]"
109 ac_help="$ac_help
110     --with-ldbm-module    module type [static]"
111 ac_help="$ac_help
112     --with-ldbm-type      use LDBM type [auto]"
113 ac_help="$ac_help
114     --enable-meta         enable metadirectory backend [no]"
115 ac_help="$ac_help
116     --with-meta-module    module type [static]"
117 ac_help="$ac_help
118     --enable-monitor      enable monitor backend [no]"
119 ac_help="$ac_help
120     --with-monitor-module module type [static]"
121 ac_help="$ac_help
122     --enable-passwd       enable passwd backend [no]"
123 ac_help="$ac_help
124     --with-passwd-module  module type [static]"
125 ac_help="$ac_help
126     --enable-perl         enable perl backend [no]"
127 ac_help="$ac_help
128     --with-perl-module    module type [static]"
129 ac_help="$ac_help
130     --enable-shell        enable shell backend [no]"
131 ac_help="$ac_help
132     --with-shell-module   module type [static]"
133 ac_help="$ac_help
134     --enable-sql          enable sql backend [no]"
135 ac_help="$ac_help
136     --with-sql-module     module type [static]"
137 ac_help="$ac_help
138     --enable-tcl          enable tcl backend [no]"
139 ac_help="$ac_help
140     --with-tcl-module     module type [static]"
141 ac_help="$ac_help
142
143 SLURPD (Replication Daemon) Options:"
144 ac_help="$ac_help
145   --enable-slurpd         enable building slurpd [auto]"
146 ac_help="$ac_help
147
148 Library Generation & Linking Options"
149 ac_help="$ac_help
150   --enable-static[=PKGS]  build static libraries [default=yes]"
151 ac_help="$ac_help
152   --enable-shared[=PKGS]  build shared libraries [default=yes]"
153 ac_help="$ac_help
154   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
155 ac_help="$ac_help
156   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
157
158 # Find the correct PATH separator.  Usually this is `:', but
159 # DJGPP uses `;' like DOS.
160 if test "X${PATH_SEPARATOR+set}" != Xset; then
161   UNAME=${UNAME-`uname 2>/dev/null`}
162   case X$UNAME in
163     *-DOS) lt_cv_sys_path_separator=';' ;;
164     *)     lt_cv_sys_path_separator=':' ;;
165   esac
166   PATH_SEPARATOR=$lt_cv_sys_path_separator
167 fi
168
169
170 # Check that we are running under the correct shell.
171 SHELL=${CONFIG_SHELL-/bin/sh}
172
173 case X$ECHO in
174 X*--fallback-echo)
175   # Remove one level of quotation (which was required for Make).
176   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
177   ;;
178 esac
179
180 echo=${ECHO-echo}
181 if test "X$1" = X--no-reexec; then
182   # Discard the --no-reexec flag, and continue.
183   shift
184 elif test "X$1" = X--fallback-echo; then
185   # Avoid inline document here, it may be left over
186   :
187 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
188   # Yippee, $echo works!
189   :
190 else
191   # Restart under the correct shell.
192   exec $SHELL "$0" --no-reexec ${1+"$@"}
193 fi
194
195 if test "X$1" = X--fallback-echo; then
196   # used as fallback echo
197   shift
198   cat <<EOF
199
200 EOF
201   exit 0
202 fi
203
204 # The HP-UX ksh and POSIX shell print the target directory to stdout
205 # if CDPATH is set.
206 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
207
208 if test -z "$ECHO"; then
209 if test "X${echo_test_string+set}" != Xset; then
210 # find a string as large as possible, as long as the shell can cope with it
211   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
212     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
213     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
214        echo_test_string="`eval $cmd`" &&
215        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
216     then
217       break
218     fi
219   done
220 fi
221
222 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
223    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
224    test "X$echo_testing_string" = "X$echo_test_string"; then
225   :
226 else
227   # The Solaris, AIX, and Digital Unix default echo programs unquote
228   # backslashes.  This makes it impossible to quote backslashes using
229   #   echo "$something" | sed 's/\\/\\\\/g'
230   #
231   # So, first we look for a working echo in the user's PATH.
232
233   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
234   for dir in $PATH /usr/ucb; do
235     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
236        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
237        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
238        test "X$echo_testing_string" = "X$echo_test_string"; then
239       echo="$dir/echo"
240       break
241     fi
242   done
243   IFS="$save_ifs"
244
245   if test "X$echo" = Xecho; then
246     # We didn't find a better echo, so look for alternatives.
247     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
248        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
249        test "X$echo_testing_string" = "X$echo_test_string"; then
250       # This shell has a builtin print -r that does the trick.
251       echo='print -r'
252     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
253          test "X$CONFIG_SHELL" != X/bin/ksh; then
254       # If we have ksh, try running configure again with it.
255       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
256       export ORIGINAL_CONFIG_SHELL
257       CONFIG_SHELL=/bin/ksh
258       export CONFIG_SHELL
259       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
260     else
261       # Try using printf.
262       echo='printf %s\n'
263       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
264          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
265          test "X$echo_testing_string" = "X$echo_test_string"; then
266         # Cool, printf works
267         :
268       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
269            test "X$echo_testing_string" = 'X\t' &&
270            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
271            test "X$echo_testing_string" = "X$echo_test_string"; then
272         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
273         export CONFIG_SHELL
274         SHELL="$CONFIG_SHELL"
275         export SHELL
276         echo="$CONFIG_SHELL $0 --fallback-echo"
277       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
278            test "X$echo_testing_string" = 'X\t' &&
279            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
280            test "X$echo_testing_string" = "X$echo_test_string"; then
281         echo="$CONFIG_SHELL $0 --fallback-echo"
282       else
283         # maybe with a smaller string...
284         prev=:
285
286         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
287           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
288           then
289             break
290           fi
291           prev="$cmd"
292         done
293
294         if test "$prev" != 'sed 50q "$0"'; then
295           echo_test_string=`eval $prev`
296           export echo_test_string
297           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
298         else
299           # Oops.  We lost completely, so just stick with echo.
300           echo=echo
301         fi
302       fi
303     fi
304   fi
305 fi
306 fi
307
308 # Copy echo and quote the copy suitably for passing to libtool from
309 # the Makefile, instead of quoting the original, which is used later.
310 ECHO=$echo
311 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
312    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
313 fi
314
315
316 ac_help="$ac_help
317   --disable-libtool-lock  avoid locking (might break parallel builds)"
318 ac_help="$ac_help
319   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
320 ac_help="$ac_help
321
322 See INSTALL file for further details."
323
324 # Initialize some variables set by options.
325 # The variables have the same names as the options, with
326 # dashes changed to underlines.
327 build=NONE
328 cache_file=./config.cache
329 exec_prefix=NONE
330 host=NONE
331 no_create=
332 nonopt=NONE
333 no_recursion=
334 prefix=NONE
335 program_prefix=NONE
336 program_suffix=NONE
337 program_transform_name=s,x,x,
338 silent=
339 site=
340 srcdir=
341 target=NONE
342 verbose=
343 x_includes=NONE
344 x_libraries=NONE
345 bindir='${exec_prefix}/bin'
346 sbindir='${exec_prefix}/sbin'
347 libexecdir='${exec_prefix}/libexec'
348 datadir='${prefix}/share'
349 sysconfdir='${prefix}/etc'
350 sharedstatedir='${prefix}/com'
351 localstatedir='${prefix}/var'
352 libdir='${exec_prefix}/lib'
353 includedir='${prefix}/include'
354 oldincludedir='/usr/include'
355 infodir='${prefix}/info'
356 mandir='${prefix}/man'
357
358 # Initialize some other variables.
359 subdirs=
360 MFLAGS= MAKEFLAGS=
361 SHELL=${CONFIG_SHELL-/bin/sh}
362 # Maximum number of lines to put in a shell here document.
363 ac_max_here_lines=12
364
365 ac_prev=
366 for ac_option
367 do
368
369   # If the previous option needs an argument, assign it.
370   if test -n "$ac_prev"; then
371     eval "$ac_prev=\$ac_option"
372     ac_prev=
373     continue
374   fi
375
376   case "$ac_option" in
377   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
378   *) ac_optarg= ;;
379   esac
380
381   # Accept the important Cygnus configure options, so we can diagnose typos.
382
383   case "$ac_option" in
384
385   -bindir | --bindir | --bindi | --bind | --bin | --bi)
386     ac_prev=bindir ;;
387   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
388     bindir="$ac_optarg" ;;
389
390   -build | --build | --buil | --bui | --bu)
391     ac_prev=build ;;
392   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
393     build="$ac_optarg" ;;
394
395   -cache-file | --cache-file | --cache-fil | --cache-fi \
396   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
397     ac_prev=cache_file ;;
398   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
399   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
400     cache_file="$ac_optarg" ;;
401
402   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
403     ac_prev=datadir ;;
404   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
405   | --da=*)
406     datadir="$ac_optarg" ;;
407
408   -disable-* | --disable-*)
409     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
410     # Reject names that are not valid shell variable names.
411     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
412       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
413     fi
414     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
415     eval "enable_${ac_feature}=no" ;;
416
417   -enable-* | --enable-*)
418     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
419     # Reject names that are not valid shell variable names.
420     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
421       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
422     fi
423     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
424     case "$ac_option" in
425       *=*) ;;
426       *) ac_optarg=yes ;;
427     esac
428     eval "enable_${ac_feature}='$ac_optarg'" ;;
429
430   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
431   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
432   | --exec | --exe | --ex)
433     ac_prev=exec_prefix ;;
434   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
435   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
436   | --exec=* | --exe=* | --ex=*)
437     exec_prefix="$ac_optarg" ;;
438
439   -gas | --gas | --ga | --g)
440     # Obsolete; use --with-gas.
441     with_gas=yes ;;
442
443   -help | --help | --hel | --he)
444     # Omit some internal or obsolete options to make the list less imposing.
445     # This message is too long to be a string in the A/UX 3.1 sh.
446     cat << EOF
447 Usage: configure [options] [host]
448 Options: [defaults in brackets after descriptions]
449 Configuration:
450   --cache-file=FILE       cache test results in FILE
451   --help                  print this message
452   --no-create             do not create output files
453   --quiet, --silent       do not print \`checking...' messages
454   --version               print the version of autoconf that created configure
455 Directory and file names:
456   --prefix=PREFIX         install architecture-independent files in PREFIX
457                           [$ac_default_prefix]
458   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
459                           [same as prefix]
460   --bindir=DIR            user executables in DIR [EPREFIX/bin]
461   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
462   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
463   --datadir=DIR           read-only architecture-independent data in DIR
464                           [PREFIX/share]
465   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
466   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
467                           [PREFIX/com]
468   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
469   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
470   --includedir=DIR        C header files in DIR [PREFIX/include]
471   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
472   --infodir=DIR           info documentation in DIR [PREFIX/info]
473   --mandir=DIR            man documentation in DIR [PREFIX/man]
474   --srcdir=DIR            find the sources in DIR [configure dir or ..]
475   --program-prefix=PREFIX prepend PREFIX to installed program names
476   --program-suffix=SUFFIX append SUFFIX to installed program names
477   --program-transform-name=PROGRAM
478                           run sed PROGRAM on installed program names
479 EOF
480     cat << EOF
481 Host type:
482   --build=BUILD           configure for building on BUILD [BUILD=HOST]
483   --host=HOST             configure for HOST [guessed]
484   --target=TARGET         configure for TARGET [TARGET=HOST]
485 Features and packages:
486   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
487   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
488   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
489   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
490   --x-includes=DIR        X include files are in DIR
491   --x-libraries=DIR       X library files are in DIR
492 EOF
493     if test -n "$ac_help"; then
494       echo "--enable and --with options recognized:$ac_help"
495     fi
496     exit 0 ;;
497
498   -host | --host | --hos | --ho)
499     ac_prev=host ;;
500   -host=* | --host=* | --hos=* | --ho=*)
501     host="$ac_optarg" ;;
502
503   -includedir | --includedir | --includedi | --included | --include \
504   | --includ | --inclu | --incl | --inc)
505     ac_prev=includedir ;;
506   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
507   | --includ=* | --inclu=* | --incl=* | --inc=*)
508     includedir="$ac_optarg" ;;
509
510   -infodir | --infodir | --infodi | --infod | --info | --inf)
511     ac_prev=infodir ;;
512   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
513     infodir="$ac_optarg" ;;
514
515   -libdir | --libdir | --libdi | --libd)
516     ac_prev=libdir ;;
517   -libdir=* | --libdir=* | --libdi=* | --libd=*)
518     libdir="$ac_optarg" ;;
519
520   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
521   | --libexe | --libex | --libe)
522     ac_prev=libexecdir ;;
523   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
524   | --libexe=* | --libex=* | --libe=*)
525     libexecdir="$ac_optarg" ;;
526
527   -localstatedir | --localstatedir | --localstatedi | --localstated \
528   | --localstate | --localstat | --localsta | --localst \
529   | --locals | --local | --loca | --loc | --lo)
530     ac_prev=localstatedir ;;
531   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
532   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
533   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
534     localstatedir="$ac_optarg" ;;
535
536   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
537     ac_prev=mandir ;;
538   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
539     mandir="$ac_optarg" ;;
540
541   -nfp | --nfp | --nf)
542     # Obsolete; use --without-fp.
543     with_fp=no ;;
544
545   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
546   | --no-cr | --no-c)
547     no_create=yes ;;
548
549   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
550   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
551     no_recursion=yes ;;
552
553   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
554   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
555   | --oldin | --oldi | --old | --ol | --o)
556     ac_prev=oldincludedir ;;
557   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
558   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
559   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
560     oldincludedir="$ac_optarg" ;;
561
562   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
563     ac_prev=prefix ;;
564   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
565     prefix="$ac_optarg" ;;
566
567   -program-prefix | --program-prefix | --program-prefi | --program-pref \
568   | --program-pre | --program-pr | --program-p)
569     ac_prev=program_prefix ;;
570   -program-prefix=* | --program-prefix=* | --program-prefi=* \
571   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
572     program_prefix="$ac_optarg" ;;
573
574   -program-suffix | --program-suffix | --program-suffi | --program-suff \
575   | --program-suf | --program-su | --program-s)
576     ac_prev=program_suffix ;;
577   -program-suffix=* | --program-suffix=* | --program-suffi=* \
578   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
579     program_suffix="$ac_optarg" ;;
580
581   -program-transform-name | --program-transform-name \
582   | --program-transform-nam | --program-transform-na \
583   | --program-transform-n | --program-transform- \
584   | --program-transform | --program-transfor \
585   | --program-transfo | --program-transf \
586   | --program-trans | --program-tran \
587   | --progr-tra | --program-tr | --program-t)
588     ac_prev=program_transform_name ;;
589   -program-transform-name=* | --program-transform-name=* \
590   | --program-transform-nam=* | --program-transform-na=* \
591   | --program-transform-n=* | --program-transform-=* \
592   | --program-transform=* | --program-transfor=* \
593   | --program-transfo=* | --program-transf=* \
594   | --program-trans=* | --program-tran=* \
595   | --progr-tra=* | --program-tr=* | --program-t=*)
596     program_transform_name="$ac_optarg" ;;
597
598   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
599   | -silent | --silent | --silen | --sile | --sil)
600     silent=yes ;;
601
602   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
603     ac_prev=sbindir ;;
604   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
605   | --sbi=* | --sb=*)
606     sbindir="$ac_optarg" ;;
607
608   -sharedstatedir | --sharedstatedir | --sharedstatedi \
609   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
610   | --sharedst | --shareds | --shared | --share | --shar \
611   | --sha | --sh)
612     ac_prev=sharedstatedir ;;
613   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
614   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
615   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
616   | --sha=* | --sh=*)
617     sharedstatedir="$ac_optarg" ;;
618
619   -site | --site | --sit)
620     ac_prev=site ;;
621   -site=* | --site=* | --sit=*)
622     site="$ac_optarg" ;;
623
624   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
625     ac_prev=srcdir ;;
626   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
627     srcdir="$ac_optarg" ;;
628
629   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
630   | --syscon | --sysco | --sysc | --sys | --sy)
631     ac_prev=sysconfdir ;;
632   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
633   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
634     sysconfdir="$ac_optarg" ;;
635
636   -target | --target | --targe | --targ | --tar | --ta | --t)
637     ac_prev=target ;;
638   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
639     target="$ac_optarg" ;;
640
641   -v | -verbose | --verbose | --verbos | --verbo | --verb)
642     verbose=yes ;;
643
644   -version | --version | --versio | --versi | --vers)
645     echo "configure generated by autoconf version 2.13.1"
646     exit 0 ;;
647
648   -with-* | --with-*)
649     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
650     # Reject names that are not valid shell variable names.
651     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
652       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
653     fi
654     ac_package=`echo $ac_package| sed 's/-/_/g'`
655     case "$ac_option" in
656       *=*) ;;
657       *) ac_optarg=yes ;;
658     esac
659     eval "with_${ac_package}='$ac_optarg'" ;;
660
661   -without-* | --without-*)
662     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
663     # Reject names that are not valid shell variable names.
664     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
665       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
666     fi
667     ac_package=`echo $ac_package| sed 's/-/_/g'`
668     eval "with_${ac_package}=no" ;;
669
670   --x)
671     # Obsolete; use --with-x.
672     with_x=yes ;;
673
674   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
675   | --x-incl | --x-inc | --x-in | --x-i)
676     ac_prev=x_includes ;;
677   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
678   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
679     x_includes="$ac_optarg" ;;
680
681   -x-libraries | --x-libraries | --x-librarie | --x-librari \
682   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
683     ac_prev=x_libraries ;;
684   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
685   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
686     x_libraries="$ac_optarg" ;;
687
688   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
689     ;;
690
691   *)
692     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
693       echo "configure: warning: $ac_option: invalid host type" 1>&2
694     fi
695     if test "x$nonopt" != xNONE; then
696       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
697     fi
698     nonopt="$ac_option"
699     ;;
700
701   esac
702 done
703
704 if test -n "$ac_prev"; then
705   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
706 fi
707
708 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
709
710 # File descriptor usage:
711 # 0 standard input
712 # 1 file creation
713 # 2 errors and warnings
714 # 3 some systems may open it to /dev/tty
715 # 4 used on the Kubota Titan
716 # 6 checking for... messages and results
717 # 5 compiler messages saved in config.log
718 if test "$silent" = yes; then
719   exec 6>/dev/null
720 else
721   exec 6>&1
722 fi
723 exec 5>./config.log
724
725 echo "\
726 This file contains any messages produced by compilers while
727 running configure, to aid debugging if configure makes a mistake.
728 " 1>&5
729
730 # Strip out --no-create and --no-recursion so they do not pile up.
731 # Also quote any args containing shell metacharacters.
732 ac_configure_args=
733 for ac_arg
734 do
735   case "$ac_arg" in
736   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
737   | --no-cr | --no-c) ;;
738   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
739   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
740   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
741   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
742   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
743   esac
744 done
745
746 # NLS nuisances.
747 # Only set these to C if already set.  These must not be set unconditionally
748 # because not all systems understand e.g. LANG=C (notably SCO).
749 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
750 # Non-C LC_CTYPE values break the ctype check.
751 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
752 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
753 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
754 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
755
756 # confdefs.h avoids OS command line length limits that DEFS can exceed.
757 rm -rf conftest* confdefs.h
758 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
759 echo > confdefs.h
760
761 # A filename unique to this package, relative to the directory that
762 # configure is in, which we can look for to find out if srcdir is correct.
763 ac_unique_file=build/version.sh
764
765 # Find the source files, if location was not specified.
766 if test -z "$srcdir"; then
767   ac_srcdir_defaulted=yes
768   # Try the directory containing this script, then its parent.
769   ac_prog=$0
770   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
771   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
772   srcdir=$ac_confdir
773   if test ! -r $srcdir/$ac_unique_file; then
774     srcdir=..
775   fi
776 else
777   ac_srcdir_defaulted=no
778 fi
779 if test ! -r $srcdir/$ac_unique_file; then
780   if test "$ac_srcdir_defaulted" = yes; then
781     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
782   else
783     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
784   fi
785 fi
786 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
787
788 # Prefer explicitly selected file to automatically selected ones.
789 if test -z "$CONFIG_SITE"; then
790   if test "x$prefix" != xNONE; then
791     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
792   else
793     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
794   fi
795 fi
796 for ac_site_file in $CONFIG_SITE; do
797   if test -r "$ac_site_file"; then
798     echo "loading site script $ac_site_file"
799     . "$ac_site_file"
800   fi
801 done
802
803
804 ac_ext=c
805 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
806 ac_cpp='$CPP $CPPFLAGS'
807 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
808 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
809 cross_compiling=$ac_cv_prog_cc_cross
810
811 ac_exeext=
812 ac_objext=o
813 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
814   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
815   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
816     ac_n= ac_c='
817 ' ac_t='        '
818   else
819     ac_n=-n ac_c= ac_t=
820   fi
821 else
822   ac_n= ac_c='\c' ac_t=
823 fi
824
825
826 # set unset (borrowed from autoconf 2.49c)
827 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
828   ol_unset=unset
829 else
830   ol_unset=false
831 fi
832 # unset CDPATH
833 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
834
835 ac_aux_dir=
836 for ac_dir in build $srcdir/build; do
837   if test -f $ac_dir/install-sh; then
838     ac_aux_dir=$ac_dir
839     ac_install_sh="$ac_aux_dir/install-sh -c"
840     break
841   elif test -f $ac_dir/install.sh; then
842     ac_aux_dir=$ac_dir
843     ac_install_sh="$ac_aux_dir/install.sh -c"
844     break
845   elif test -f $ac_dir/shtool; then
846     ac_aux_dir=$ac_dir
847     ac_install_sh="$ac_aux_dir/shtool install -c"
848     break
849   fi
850 done
851 if test -z "$ac_aux_dir"; then
852   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
853 fi
854 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
855 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
856 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
857
858 eval `$ac_aux_dir/version.sh`
859 if test -z "$OL_STRING"; then
860         { echo "configure: error: could not determine version" 1>&2; exit 1; }
861 fi
862
863 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
864         ac_cv_shtool="$ac_aux_dir/shtool"
865 else
866         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
867 fi
868
869 SHTOOL="$ac_cv_shtool"
870
871
872 TB=`$SHTOOL echo -e %B`
873 TN=`$SHTOOL echo -e %b`
874
875 echo "Configuring $TB$OL_STRING$TN ..."
876
877
878 echo $ac_n "checking host system type""... $ac_c" 1>&6
879 echo "configure:880: checking host system type" >&5
880 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
881
882 # Make sure we can run config.sub.
883   if $ac_config_sub sun4 >/dev/null 2>&1; then :
884     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
885   fi
886
887   ac_cv_host_alias=$host
888   case "$ac_cv_host_alias" in
889   NONE)
890     case $nonopt in
891     NONE)
892       if ac_cv_host_alias=`$ac_config_guess`; then :
893       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
894       fi ;;
895     *) ac_cv_host_alias=$nonopt ;;
896     esac ;;
897   esac
898
899   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
900   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
901   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
902   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
903 else
904   echo $ac_n "(cached) $ac_c" 1>&6
905 fi
906
907 echo "$ac_t""$ac_cv_host" 1>&6
908
909 host=$ac_cv_host
910 host_alias=$ac_cv_host_alias
911 host_cpu=$ac_cv_host_cpu
912 host_vendor=$ac_cv_host_vendor
913 host_os=$ac_cv_host_os
914
915
916
917
918
919 echo $ac_n "checking target system type""... $ac_c" 1>&6
920 echo "configure:921: checking target system type" >&5
921 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
922
923 # Make sure we can run config.sub.
924   if $ac_config_sub sun4 >/dev/null 2>&1; then :
925     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
926   fi
927
928   ac_cv_target_alias=$target
929   case "$ac_cv_target_alias" in
930   NONE)
931     case $nonopt in
932     NONE)
933       ac_cv_target_alias=$host_alias ;;
934
935     *) ac_cv_target_alias=$nonopt ;;
936     esac ;;
937   esac
938
939   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
940   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
941   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
942   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
943 else
944   echo $ac_n "(cached) $ac_c" 1>&6
945 fi
946
947 echo "$ac_t""$ac_cv_target" 1>&6
948
949 target=$ac_cv_target
950 target_alias=$ac_cv_target_alias
951 target_cpu=$ac_cv_target_cpu
952 target_vendor=$ac_cv_target_vendor
953 target_os=$ac_cv_target_os
954
955
956
957
958
959 echo $ac_n "checking build system type""... $ac_c" 1>&6
960 echo "configure:961: checking build system type" >&5
961 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
962
963 # Make sure we can run config.sub.
964   if $ac_config_sub sun4 >/dev/null 2>&1; then :
965     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
966   fi
967
968   ac_cv_build_alias=$build
969   case "$ac_cv_build_alias" in
970   NONE)
971     case $nonopt in
972     NONE)
973       ac_cv_build_alias=$host_alias ;;
974
975     *) ac_cv_build_alias=$nonopt ;;
976     esac ;;
977   esac
978
979   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
980   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
981   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
982   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
983 else
984   echo $ac_n "(cached) $ac_c" 1>&6
985 fi
986
987 echo "$ac_t""$ac_cv_build" 1>&6
988
989 build=$ac_cv_build
990 build_alias=$ac_cv_build_alias
991 build_cpu=$ac_cv_build_cpu
992 build_vendor=$ac_cv_build_vendor
993 build_os=$ac_cv_build_os
994
995
996
997
998
999 # Do some error checking and defaulting for the host and target type.
1000 # The inputs are:
1001 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1002 #
1003 # The rules are:
1004 # 1. You are not allowed to specify --host, --target, and nonopt at the
1005 #    same time.
1006 # 2. Host defaults to nonopt.
1007 # 3. If nonopt is not specified, then host defaults to the current host,
1008 #    as determined by config.guess.
1009 # 4. Target and build default to nonopt.
1010 # 5. If nonopt is not specified, then target and build default to host.
1011
1012 # The aliases save the names the user supplied, while $host etc.
1013 # will get canonicalized.
1014 case $host---$target---$nonopt in
1015 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1016 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1017 esac
1018
1019 test "$host_alias" != "$target_alias" &&
1020   test "$program_prefix$program_suffix$program_transform_name" = \
1021     NONENONEs,x,x, &&
1022   program_prefix=${target_alias}-
1023
1024
1025 # Find a good install program.  We prefer a C program (faster),
1026 # so one script is as good as another.  But avoid the broken or
1027 # incompatible versions:
1028 # SysV /etc/install, /usr/sbin/install
1029 # SunOS /usr/etc/install
1030 # IRIX /sbin/install
1031 # AIX /bin/install
1032 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1033 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1034 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1035 # ./install, which can be erroneously created by make from ./install.sh.
1036 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1037 echo "configure:1038: checking for a BSD compatible install" >&5
1038 if test -z "$INSTALL"; then
1039 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1040   echo $ac_n "(cached) $ac_c" 1>&6
1041 else
1042     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1043   for ac_dir in $PATH; do
1044     # Account for people who put trailing slashes in PATH elements.
1045     case "$ac_dir/" in
1046     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1047     *)
1048       # OSF1 and SCO ODT 3.0 have their own names for install.
1049       # Don't use installbsd from OSF since it installs stuff as root
1050       # by default.
1051       for ac_prog in ginstall scoinst install; do
1052         if test -f $ac_dir/$ac_prog; then
1053           if test $ac_prog = install &&
1054             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1055             # AIX install.  It has an incompatible calling convention.
1056             :
1057           elif test $ac_prog = install &&
1058             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1059             # program-specific install script used by HP pwplus--don't use.
1060             :
1061           else
1062             ac_cv_path_install="$ac_dir/$ac_prog -c"
1063             break 2
1064           fi
1065         fi
1066       done
1067       ;;
1068     esac
1069   done
1070   IFS="$ac_save_IFS"
1071
1072 fi
1073   if test "${ac_cv_path_install+set}" = set; then
1074     INSTALL="$ac_cv_path_install"
1075   else
1076     # As a last resort, use the slow shell script.  We don't cache a
1077     # path for INSTALL within a source directory, because that will
1078     # break other packages using the cache if that directory is
1079     # removed, or if the path is relative.
1080     INSTALL="$ac_install_sh"
1081   fi
1082 fi
1083 echo "$ac_t""$INSTALL" 1>&6
1084
1085 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1086 # It thinks the first close brace ends the variable substitution.
1087 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1088
1089 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1090
1091 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1092
1093 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1094 echo "configure:1095: checking whether build environment is sane" >&5
1095 # Just in case
1096 sleep 1
1097 echo timestamp > conftestfile
1098 # Do `set' in a subshell so we don't clobber the current shell's
1099 # arguments.  Must try -L first in case configure is actually a
1100 # symlink; some systems play weird games with the mod time of symlinks
1101 # (eg FreeBSD returns the mod time of the symlink's containing
1102 # directory).
1103 if (
1104    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1105    if test "$*" = "X"; then
1106       # -L didn't work.
1107       set X `ls -t $srcdir/configure conftestfile`
1108    fi
1109    if test "$*" != "X $srcdir/configure conftestfile" \
1110       && test "$*" != "X conftestfile $srcdir/configure"; then
1111
1112       # If neither matched, then we have a broken ls.  This can happen
1113       # if, for instance, CONFIG_SHELL is bash and it inherits a
1114       # broken ls alias from the environment.  This has actually
1115       # happened.  Such a system could not be considered "sane".
1116       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1117 alias in your environment" 1>&2; exit 1; }
1118    fi
1119
1120    test "$2" = conftestfile
1121    )
1122 then
1123    # Ok.
1124    :
1125 else
1126    { echo "configure: error: newly created file is older than distributed files!
1127 Check your system clock" 1>&2; exit 1; }
1128 fi
1129 rm -f conftest*
1130 echo "$ac_t""yes" 1>&6
1131 if test "$program_transform_name" = s,x,x,; then
1132   program_transform_name=
1133 else
1134   # Double any \ or $.  echo might interpret backslashes.
1135   cat <<\EOF_SED > conftestsed
1136 s,\\,\\\\,g; s,\$,$$,g
1137 EOF_SED
1138   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1139   rm -f conftestsed
1140 fi
1141 test "$program_prefix" != NONE &&
1142   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1143 # Use a double $ so make ignores it.
1144 test "$program_suffix" != NONE &&
1145   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1146
1147 # sed with no file args requires a program.
1148 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1149
1150 for ac_prog in mawk gawk nawk awk
1151 do
1152 # Extract the first word of "$ac_prog", so it can be a program name with args.
1153 set dummy $ac_prog; ac_word=$2
1154 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1155 echo "configure:1156: checking for $ac_word" >&5
1156 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1157   echo $ac_n "(cached) $ac_c" 1>&6
1158 else
1159   if test -n "$AWK"; then
1160   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1161 else
1162   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1163   ac_dummy="$PATH"
1164   for ac_dir in $ac_dummy; do
1165     test -z "$ac_dir" && ac_dir=.
1166     if test -f $ac_dir/$ac_word; then
1167       ac_cv_prog_AWK="$ac_prog"
1168       break
1169     fi
1170   done
1171   IFS="$ac_save_ifs"
1172 fi
1173 fi
1174 AWK="$ac_cv_prog_AWK"
1175 if test -n "$AWK"; then
1176   echo "$ac_t""$AWK" 1>&6
1177 else
1178   echo "$ac_t""no" 1>&6
1179 fi
1180
1181 test -n "$AWK" && break
1182 done
1183
1184 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1185 echo "configure:1186: checking whether ${MAKE-make} sets \${MAKE}" >&5
1186 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1187 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1188   echo $ac_n "(cached) $ac_c" 1>&6
1189 else
1190   cat > conftestmake <<\EOF
1191 all:
1192         @echo 'ac_maketemp="${MAKE}"'
1193 EOF
1194 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1195 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1196 if test -n "$ac_maketemp"; then
1197   eval ac_cv_prog_make_${ac_make}_set=yes
1198 else
1199   eval ac_cv_prog_make_${ac_make}_set=no
1200 fi
1201 rm -f conftestmake
1202 fi
1203 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1204   echo "$ac_t""yes" 1>&6
1205   SET_MAKE=
1206 else
1207   echo "$ac_t""no" 1>&6
1208   SET_MAKE="MAKE=${MAKE-make}"
1209 fi
1210
1211
1212
1213 PACKAGE=$OL_PACKAGE
1214
1215 VERSION=$OL_VERSION
1216
1217 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1218   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1219 fi
1220
1221
1222
1223 missing_dir=`cd $ac_aux_dir && pwd`
1224 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1225 echo "configure:1226: checking for working aclocal" >&5
1226 # Run test in a subshell; some versions of sh will print an error if
1227 # an executable is not found, even if stderr is redirected.
1228 # Redirect stdin to placate older versions of autoconf.  Sigh.
1229 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1230    ACLOCAL=aclocal
1231    echo "$ac_t""found" 1>&6
1232 else
1233    ACLOCAL="$missing_dir/missing aclocal"
1234    echo "$ac_t""missing" 1>&6
1235 fi
1236
1237 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1238 echo "configure:1239: checking for working autoconf" >&5
1239 # Run test in a subshell; some versions of sh will print an error if
1240 # an executable is not found, even if stderr is redirected.
1241 # Redirect stdin to placate older versions of autoconf.  Sigh.
1242 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1243    AUTOCONF=autoconf
1244    echo "$ac_t""found" 1>&6
1245 else
1246    AUTOCONF="$missing_dir/missing autoconf"
1247    echo "$ac_t""missing" 1>&6
1248 fi
1249
1250 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1251 echo "configure:1252: checking for working automake" >&5
1252 # Run test in a subshell; some versions of sh will print an error if
1253 # an executable is not found, even if stderr is redirected.
1254 # Redirect stdin to placate older versions of autoconf.  Sigh.
1255 if (automake --version) < /dev/null > /dev/null 2>&1; then
1256    AUTOMAKE=automake
1257    echo "$ac_t""found" 1>&6
1258 else
1259    AUTOMAKE="$missing_dir/missing automake"
1260    echo "$ac_t""missing" 1>&6
1261 fi
1262
1263 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1264 echo "configure:1265: checking for working autoheader" >&5
1265 # Run test in a subshell; some versions of sh will print an error if
1266 # an executable is not found, even if stderr is redirected.
1267 # Redirect stdin to placate older versions of autoconf.  Sigh.
1268 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1269    AUTOHEADER=autoheader
1270    echo "$ac_t""found" 1>&6
1271 else
1272    AUTOHEADER="$missing_dir/missing autoheader"
1273    echo "$ac_t""missing" 1>&6
1274 fi
1275
1276 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1277 echo "configure:1278: checking for working makeinfo" >&5
1278 # Run test in a subshell; some versions of sh will print an error if
1279 # an executable is not found, even if stderr is redirected.
1280 # Redirect stdin to placate older versions of autoconf.  Sigh.
1281 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1282    MAKEINFO=makeinfo
1283    echo "$ac_t""found" 1>&6
1284 else
1285    MAKEINFO="$missing_dir/missing makeinfo"
1286    echo "$ac_t""missing" 1>&6
1287 fi
1288
1289 install_sh="$missing_dir/install-sh"
1290 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1291
1292 for ac_prog in gnutar gtar tar
1293 do
1294 # Extract the first word of "$ac_prog", so it can be a program name with args.
1295 set dummy $ac_prog; ac_word=$2
1296 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1297 echo "configure:1298: checking for $ac_word" >&5
1298 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1299   echo $ac_n "(cached) $ac_c" 1>&6
1300 else
1301   if test -n "$AMTAR"; then
1302   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1303 else
1304   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1305   ac_dummy="$PATH"
1306   for ac_dir in $ac_dummy; do
1307     test -z "$ac_dir" && ac_dir=.
1308     if test -f $ac_dir/$ac_word; then
1309       ac_cv_prog_AMTAR="$ac_prog"
1310       break
1311     fi
1312   done
1313   IFS="$ac_save_ifs"
1314 fi
1315 fi
1316 AMTAR="$ac_cv_prog_AMTAR"
1317 if test -n "$AMTAR"; then
1318   echo "$ac_t""$AMTAR" 1>&6
1319 else
1320   echo "$ac_t""no" 1>&6
1321 fi
1322
1323 test -n "$AMTAR" && break
1324 done
1325
1326
1327 AMTARFLAGS=
1328 if test -n "$AMTAR"; then
1329   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1330         AMTARFLAGS=o
1331   fi
1332 fi
1333
1334 cat >> confdefs.h <<EOF
1335 #define OPENLDAP_PACKAGE "$PACKAGE"
1336 EOF
1337
1338 cat >> confdefs.h <<EOF
1339 #define OPENLDAP_VERSION "$VERSION"
1340 EOF
1341
1342
1343 cat >> confdefs.h <<EOF
1344 #define LDAP_VENDOR_VERSION $OL_API_INC
1345 EOF
1346
1347 cat >> confdefs.h <<EOF
1348 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1349 EOF
1350
1351 cat >> confdefs.h <<EOF
1352 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1353 EOF
1354
1355 cat >> confdefs.h <<EOF
1356 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1357 EOF
1358
1359
1360 OPENLDAP_LIBVERSION=$OL_API_LIB
1361
1362
1363
1364 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1365 echo "configure:1366: checking configure arguments" >&5
1366
1367
1368 top_builddir=`pwd`
1369
1370 ldap_subdir="/openldap"
1371
1372 # Check whether --with-subdir or --without-subdir was given.
1373 if test "${with_subdir+set}" = set; then
1374   withval="$with_subdir"
1375   case "$withval" in
1376         no) ldap_subdir=""
1377                 ;;
1378         yes)
1379                 ;;
1380         /*|\\*)
1381                 ldap_subdir="$withval"
1382                 ;;
1383         *)
1384                 ldap_subdir="/$withval"
1385                 ;;
1386 esac
1387
1388 fi
1389
1390
1391 # OpenLDAP --enable-debug
1392         # Check whether --enable-debug or --disable-debug was given.
1393 if test "${enable_debug+set}" = set; then
1394   enableval="$enable_debug"
1395   
1396         ol_arg=invalid
1397         for ol_val in auto yes no ; do
1398                 if test "$enableval" = "$ol_val" ; then
1399                         ol_arg="$ol_val"
1400                 fi
1401         done
1402         if test "$ol_arg" = "invalid" ; then
1403                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1404         fi
1405         ol_enable_debug="$ol_arg"
1406
1407 else
1408         ol_enable_debug="yes"
1409 fi
1410 # end --enable-debug
1411 # OpenLDAP --enable-syslog
1412         # Check whether --enable-syslog or --disable-syslog was given.
1413 if test "${enable_syslog+set}" = set; then
1414   enableval="$enable_syslog"
1415   
1416         ol_arg=invalid
1417         for ol_val in auto yes no ; do
1418                 if test "$enableval" = "$ol_val" ; then
1419                         ol_arg="$ol_val"
1420                 fi
1421         done
1422         if test "$ol_arg" = "invalid" ; then
1423                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1424         fi
1425         ol_enable_syslog="$ol_arg"
1426
1427 else
1428         ol_enable_syslog="auto"
1429 fi
1430 # end --enable-syslog
1431 # OpenLDAP --enable-proctitle
1432         # Check whether --enable-proctitle or --disable-proctitle was given.
1433 if test "${enable_proctitle+set}" = set; then
1434   enableval="$enable_proctitle"
1435   
1436         ol_arg=invalid
1437         for ol_val in auto yes no ; do
1438                 if test "$enableval" = "$ol_val" ; then
1439                         ol_arg="$ol_val"
1440                 fi
1441         done
1442         if test "$ol_arg" = "invalid" ; then
1443                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1444         fi
1445         ol_enable_proctitle="$ol_arg"
1446
1447 else
1448         ol_enable_proctitle="yes"
1449 fi
1450 # end --enable-proctitle
1451 # OpenLDAP --enable-cache
1452         # Check whether --enable-cache or --disable-cache was given.
1453 if test "${enable_cache+set}" = set; then
1454   enableval="$enable_cache"
1455   
1456         ol_arg=invalid
1457         for ol_val in auto yes no ; do
1458                 if test "$enableval" = "$ol_val" ; then
1459                         ol_arg="$ol_val"
1460                 fi
1461         done
1462         if test "$ol_arg" = "invalid" ; then
1463                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1464         fi
1465         ol_enable_cache="$ol_arg"
1466
1467 else
1468         ol_enable_cache="no"
1469 fi
1470 # end --enable-cache
1471 # OpenLDAP --enable-referrals
1472         # Check whether --enable-referrals or --disable-referrals was given.
1473 if test "${enable_referrals+set}" = set; then
1474   enableval="$enable_referrals"
1475   
1476         ol_arg=invalid
1477         for ol_val in auto yes no ; do
1478                 if test "$enableval" = "$ol_val" ; then
1479                         ol_arg="$ol_val"
1480                 fi
1481         done
1482         if test "$ol_arg" = "invalid" ; then
1483                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1484         fi
1485         ol_enable_referrals="$ol_arg"
1486
1487 else
1488         ol_enable_referrals="no"
1489 fi
1490 # end --enable-referrals
1491 # OpenLDAP --enable-kbind
1492         # Check whether --enable-kbind or --disable-kbind was given.
1493 if test "${enable_kbind+set}" = set; then
1494   enableval="$enable_kbind"
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-kbind" 1>&2; exit 1; }
1504         fi
1505         ol_enable_kbind="$ol_arg"
1506
1507 else
1508         ol_enable_kbind="no"
1509 fi
1510 # end --enable-kbind
1511 # OpenLDAP --enable-ipv6
1512         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1513 if test "${enable_ipv6+set}" = set; then
1514   enableval="$enable_ipv6"
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-ipv6" 1>&2; exit 1; }
1524         fi
1525         ol_enable_ipv6="$ol_arg"
1526
1527 else
1528         ol_enable_ipv6="auto"
1529 fi
1530 # end --enable-ipv6
1531 # OpenLDAP --enable-local
1532         # Check whether --enable-local or --disable-local was given.
1533 if test "${enable_local+set}" = set; then
1534   enableval="$enable_local"
1535   
1536         ol_arg=invalid
1537         for ol_val in auto 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-local" 1>&2; exit 1; }
1544         fi
1545         ol_enable_local="$ol_arg"
1546
1547 else
1548         ol_enable_local="auto"
1549 fi
1550 # end --enable-local
1551 # OpenLDAP --enable-rewrite
1552         # Check whether --enable-rewrite or --disable-rewrite was given.
1553 if test "${enable_rewrite+set}" = set; then
1554   enableval="$enable_rewrite"
1555   
1556         ol_arg=invalid
1557         for ol_val in auto yes no ; do
1558                 if test "$enableval" = "$ol_val" ; then
1559                         ol_arg="$ol_val"
1560                 fi
1561         done
1562         if test "$ol_arg" = "invalid" ; then
1563                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1564         fi
1565         ol_enable_rewrite="$ol_arg"
1566
1567 else
1568         ol_enable_rewrite="no"
1569 fi
1570 # end --enable-rewrite
1571 # OpenLDAP --enable-x_compile
1572         # Check whether --enable-x_compile or --disable-x_compile was given.
1573 if test "${enable_x_compile+set}" = set; then
1574   enableval="$enable_x_compile"
1575   
1576         ol_arg=invalid
1577         for ol_val in yes no ; do
1578                 if test "$enableval" = "$ol_val" ; then
1579                         ol_arg="$ol_val"
1580                 fi
1581         done
1582         if test "$ol_arg" = "invalid" ; then
1583                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1584         fi
1585         ol_enable_x_compile="$ol_arg"
1586
1587 else
1588         ol_enable_x_compile="no"
1589 fi
1590 # end --enable-x_compile
1591
1592
1593 # OpenLDAP --with-cyrus_sasl
1594         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1595 if test "${with_cyrus_sasl+set}" = set; then
1596   withval="$with_cyrus_sasl"
1597   
1598         ol_arg=invalid
1599         for ol_val in auto yes no  ; do
1600                 if test "$withval" = "$ol_val" ; then
1601                         ol_arg="$ol_val"
1602                 fi
1603         done
1604         if test "$ol_arg" = "invalid" ; then
1605                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1606         fi
1607         ol_with_cyrus_sasl="$ol_arg"
1608
1609 else
1610         ol_with_cyrus_sasl="auto"
1611 fi
1612 # end --with-cyrus_sasl
1613
1614 # OpenLDAP --with-fetch
1615         # Check whether --with-fetch or --without-fetch was given.
1616 if test "${with_fetch+set}" = set; then
1617   withval="$with_fetch"
1618   
1619         ol_arg=invalid
1620         for ol_val in auto yes no  ; do
1621                 if test "$withval" = "$ol_val" ; then
1622                         ol_arg="$ol_val"
1623                 fi
1624         done
1625         if test "$ol_arg" = "invalid" ; then
1626                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1627         fi
1628         ol_with_fetch="$ol_arg"
1629
1630 else
1631         ol_with_fetch="auto"
1632 fi
1633 # end --with-fetch
1634
1635 # OpenLDAP --with-kerberos
1636         # Check whether --with-kerberos or --without-kerberos was given.
1637 if test "${with_kerberos+set}" = set; then
1638   withval="$with_kerberos"
1639   
1640         ol_arg=invalid
1641         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1642                 if test "$withval" = "$ol_val" ; then
1643                         ol_arg="$ol_val"
1644                 fi
1645         done
1646         if test "$ol_arg" = "invalid" ; then
1647                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1648         fi
1649         ol_with_kerberos="$ol_arg"
1650
1651 else
1652         ol_with_kerberos="auto"
1653 fi
1654 # end --with-kerberos
1655
1656 # OpenLDAP --with-readline
1657         # Check whether --with-readline or --without-readline was given.
1658 if test "${with_readline+set}" = set; then
1659   withval="$with_readline"
1660   
1661         ol_arg=invalid
1662         for ol_val in auto yes no  ; do
1663                 if test "$withval" = "$ol_val" ; then
1664                         ol_arg="$ol_val"
1665                 fi
1666         done
1667         if test "$ol_arg" = "invalid" ; then
1668                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1669         fi
1670         ol_with_readline="$ol_arg"
1671
1672 else
1673         ol_with_readline="auto"
1674 fi
1675 # end --with-readline
1676
1677 # OpenLDAP --with-threads
1678         # Check whether --with-threads or --without-threads was given.
1679 if test "${with_threads+set}" = set; then
1680   withval="$with_threads"
1681   
1682         ol_arg=invalid
1683         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1684                 if test "$withval" = "$ol_val" ; then
1685                         ol_arg="$ol_val"
1686                 fi
1687         done
1688         if test "$ol_arg" = "invalid" ; then
1689                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1690         fi
1691         ol_with_threads="$ol_arg"
1692
1693 else
1694         ol_with_threads="auto"
1695 fi
1696 # end --with-threads
1697
1698 # OpenLDAP --with-tls
1699         # Check whether --with-tls or --without-tls was given.
1700 if test "${with_tls+set}" = set; then
1701   withval="$with_tls"
1702   
1703         ol_arg=invalid
1704         for ol_val in auto ssleay openssl yes no  ; do
1705                 if test "$withval" = "$ol_val" ; then
1706                         ol_arg="$ol_val"
1707                 fi
1708         done
1709         if test "$ol_arg" = "invalid" ; then
1710                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1711         fi
1712         ol_with_tls="$ol_arg"
1713
1714 else
1715         ol_with_tls="auto"
1716 fi
1717 # end --with-tls
1718
1719 # OpenLDAP --with-yielding_select
1720         # Check whether --with-yielding_select or --without-yielding_select was given.
1721 if test "${with_yielding_select+set}" = set; then
1722   withval="$with_yielding_select"
1723   
1724         ol_arg=invalid
1725         for ol_val in auto yes no manual  ; do
1726                 if test "$withval" = "$ol_val" ; then
1727                         ol_arg="$ol_val"
1728                 fi
1729         done
1730         if test "$ol_arg" = "invalid" ; then
1731                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1732         fi
1733         ol_with_yielding_select="$ol_arg"
1734
1735 else
1736         ol_with_yielding_select="auto"
1737 fi
1738 # end --with-yielding_select
1739
1740
1741
1742 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1743 if test "${with_xxslapdoptions+set}" = set; then
1744   withval="$with_xxslapdoptions"
1745   :
1746 fi
1747
1748 # OpenLDAP --enable-slapd
1749         # Check whether --enable-slapd or --disable-slapd was given.
1750 if test "${enable_slapd+set}" = set; then
1751   enableval="$enable_slapd"
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-slapd" 1>&2; exit 1; }
1761         fi
1762         ol_enable_slapd="$ol_arg"
1763
1764 else
1765         ol_enable_slapd="yes"
1766 fi
1767 # end --enable-slapd
1768 # OpenLDAP --enable-aci
1769         # Check whether --enable-aci or --disable-aci was given.
1770 if test "${enable_aci+set}" = set; then
1771   enableval="$enable_aci"
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-aci" 1>&2; exit 1; }
1781         fi
1782         ol_enable_aci="$ol_arg"
1783
1784 else
1785         ol_enable_aci="no"
1786 fi
1787 # end --enable-aci
1788 # OpenLDAP --enable-cleartext
1789         # Check whether --enable-cleartext or --disable-cleartext was given.
1790 if test "${enable_cleartext+set}" = set; then
1791   enableval="$enable_cleartext"
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-cleartext" 1>&2; exit 1; }
1801         fi
1802         ol_enable_cleartext="$ol_arg"
1803
1804 else
1805         ol_enable_cleartext="yes"
1806 fi
1807 # end --enable-cleartext
1808 # OpenLDAP --enable-crypt
1809         # Check whether --enable-crypt or --disable-crypt was given.
1810 if test "${enable_crypt+set}" = set; then
1811   enableval="$enable_crypt"
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-crypt" 1>&2; exit 1; }
1821         fi
1822         ol_enable_crypt="$ol_arg"
1823
1824 else
1825         ol_enable_crypt="no"
1826 fi
1827 # end --enable-crypt
1828 # OpenLDAP --enable-dynamic
1829         # Check whether --enable-dynamic or --disable-dynamic was given.
1830 if test "${enable_dynamic+set}" = set; then
1831   enableval="$enable_dynamic"
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-dynamic" 1>&2; exit 1; }
1841         fi
1842         ol_enable_dynamic="$ol_arg"
1843
1844 else
1845         ol_enable_dynamic="no"
1846 fi
1847 # end --enable-dynamic
1848 # OpenLDAP --enable-kpasswd
1849         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1850 if test "${enable_kpasswd+set}" = set; then
1851   enableval="$enable_kpasswd"
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-kpasswd" 1>&2; exit 1; }
1861         fi
1862         ol_enable_kpasswd="$ol_arg"
1863
1864 else
1865         ol_enable_kpasswd="no"
1866 fi
1867 # end --enable-kpasswd
1868 # OpenLDAP --enable-lmpasswd
1869         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1870 if test "${enable_lmpasswd+set}" = set; then
1871   enableval="$enable_lmpasswd"
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-lmpasswd" 1>&2; exit 1; }
1881         fi
1882         ol_enable_lmpasswd="$ol_arg"
1883
1884 else
1885         ol_enable_lmpasswd="no"
1886 fi
1887 # end --enable-lmpasswd
1888 # OpenLDAP --enable-spasswd
1889         # Check whether --enable-spasswd or --disable-spasswd was given.
1890 if test "${enable_spasswd+set}" = set; then
1891   enableval="$enable_spasswd"
1892   
1893         ol_arg=invalid
1894         for ol_val in auto yes no ; do
1895                 if test "$enableval" = "$ol_val" ; then
1896                         ol_arg="$ol_val"
1897                 fi
1898         done
1899         if test "$ol_arg" = "invalid" ; then
1900                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1901         fi
1902         ol_enable_spasswd="$ol_arg"
1903
1904 else
1905         ol_enable_spasswd="no"
1906 fi
1907 # end --enable-spasswd
1908 # OpenLDAP --enable-modules
1909         # Check whether --enable-modules or --disable-modules was given.
1910 if test "${enable_modules+set}" = set; then
1911   enableval="$enable_modules"
1912   
1913         ol_arg=invalid
1914         for ol_val in auto yes no ; do
1915                 if test "$enableval" = "$ol_val" ; then
1916                         ol_arg="$ol_val"
1917                 fi
1918         done
1919         if test "$ol_arg" = "invalid" ; then
1920                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1921         fi
1922         ol_enable_modules="$ol_arg"
1923
1924 else
1925         ol_enable_modules="no"
1926 fi
1927 # end --enable-modules
1928 # OpenLDAP --enable-phonetic
1929         # Check whether --enable-phonetic or --disable-phonetic was given.
1930 if test "${enable_phonetic+set}" = set; then
1931   enableval="$enable_phonetic"
1932   
1933         ol_arg=invalid
1934         for ol_val in auto yes no ; do
1935                 if test "$enableval" = "$ol_val" ; then
1936                         ol_arg="$ol_val"
1937                 fi
1938         done
1939         if test "$ol_arg" = "invalid" ; then
1940                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1941         fi
1942         ol_enable_phonetic="$ol_arg"
1943
1944 else
1945         ol_enable_phonetic="no"
1946 fi
1947 # end --enable-phonetic
1948 # OpenLDAP --enable-rlookups
1949         # Check whether --enable-rlookups or --disable-rlookups was given.
1950 if test "${enable_rlookups+set}" = set; then
1951   enableval="$enable_rlookups"
1952   
1953         ol_arg=invalid
1954         for ol_val in auto yes no ; do
1955                 if test "$enableval" = "$ol_val" ; then
1956                         ol_arg="$ol_val"
1957                 fi
1958         done
1959         if test "$ol_arg" = "invalid" ; then
1960                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1961         fi
1962         ol_enable_rlookups="$ol_arg"
1963
1964 else
1965         ol_enable_rlookups="no"
1966 fi
1967 # end --enable-rlookups
1968 # OpenLDAP --enable-slp
1969         # Check whether --enable-slp or --disable-slp was given.
1970 if test "${enable_slp+set}" = set; then
1971   enableval="$enable_slp"
1972   
1973         ol_arg=invalid
1974         for ol_val in auto yes no ; do
1975                 if test "$enableval" = "$ol_val" ; then
1976                         ol_arg="$ol_val"
1977                 fi
1978         done
1979         if test "$ol_arg" = "invalid" ; then
1980                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1981         fi
1982         ol_enable_slp="$ol_arg"
1983
1984 else
1985         ol_enable_slp="no"
1986 fi
1987 # end --enable-slp
1988 # OpenLDAP --enable-wrappers
1989         # Check whether --enable-wrappers or --disable-wrappers was given.
1990 if test "${enable_wrappers+set}" = set; then
1991   enableval="$enable_wrappers"
1992   
1993         ol_arg=invalid
1994         for ol_val in auto yes no ; do
1995                 if test "$enableval" = "$ol_val" ; then
1996                         ol_arg="$ol_val"
1997                 fi
1998         done
1999         if test "$ol_arg" = "invalid" ; then
2000                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
2001         fi
2002         ol_enable_wrappers="$ol_arg"
2003
2004 else
2005         ol_enable_wrappers="no"
2006 fi
2007 # end --enable-wrappers
2008
2009 # OpenLDAP --enable-bdb
2010         # Check whether --enable-bdb or --disable-bdb was given.
2011 if test "${enable_bdb+set}" = set; then
2012   enableval="$enable_bdb"
2013   
2014         ol_arg=invalid
2015         for ol_val in auto yes no ; do
2016                 if test "$enableval" = "$ol_val" ; then
2017                         ol_arg="$ol_val"
2018                 fi
2019         done
2020         if test "$ol_arg" = "invalid" ; then
2021                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
2022         fi
2023         ol_enable_bdb="$ol_arg"
2024
2025 else
2026         ol_enable_bdb="yes"
2027 fi
2028 # end --enable-bdb
2029 # OpenLDAP --with-bdb_module
2030         # Check whether --with-bdb_module or --without-bdb_module was given.
2031 if test "${with_bdb_module+set}" = set; then
2032   withval="$with_bdb_module"
2033   
2034         ol_arg=invalid
2035         for ol_val in static dynamic ; do
2036                 if test "$withval" = "$ol_val" ; then
2037                         ol_arg="$ol_val"
2038                 fi
2039         done
2040         if test "$ol_arg" = "invalid" ; then
2041                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2042         fi
2043         ol_with_bdb_module="$ol_arg"
2044
2045 else
2046         ol_with_bdb_module="static"
2047 fi
2048 # end --with-bdb_module
2049
2050 # OpenLDAP --enable-dnssrv
2051         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2052 if test "${enable_dnssrv+set}" = set; then
2053   enableval="$enable_dnssrv"
2054   
2055         ol_arg=invalid
2056         for ol_val in auto yes no ; do
2057                 if test "$enableval" = "$ol_val" ; then
2058                         ol_arg="$ol_val"
2059                 fi
2060         done
2061         if test "$ol_arg" = "invalid" ; then
2062                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2063         fi
2064         ol_enable_dnssrv="$ol_arg"
2065
2066 else
2067         ol_enable_dnssrv="no"
2068 fi
2069 # end --enable-dnssrv
2070 # OpenLDAP --with-dnssrv_module
2071         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2072 if test "${with_dnssrv_module+set}" = set; then
2073   withval="$with_dnssrv_module"
2074   
2075         ol_arg=invalid
2076         for ol_val in static dynamic ; do
2077                 if test "$withval" = "$ol_val" ; then
2078                         ol_arg="$ol_val"
2079                 fi
2080         done
2081         if test "$ol_arg" = "invalid" ; then
2082                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2083         fi
2084         ol_with_dnssrv_module="$ol_arg"
2085
2086 else
2087         ol_with_dnssrv_module="static"
2088 fi
2089 # end --with-dnssrv_module
2090
2091 # OpenLDAP --enable-ldap
2092         # Check whether --enable-ldap or --disable-ldap was given.
2093 if test "${enable_ldap+set}" = set; then
2094   enableval="$enable_ldap"
2095   
2096         ol_arg=invalid
2097         for ol_val in auto yes no ; do
2098                 if test "$enableval" = "$ol_val" ; then
2099                         ol_arg="$ol_val"
2100                 fi
2101         done
2102         if test "$ol_arg" = "invalid" ; then
2103                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2104         fi
2105         ol_enable_ldap="$ol_arg"
2106
2107 else
2108         ol_enable_ldap="no"
2109 fi
2110 # end --enable-ldap
2111 # OpenLDAP --with-ldap_module
2112         # Check whether --with-ldap_module or --without-ldap_module was given.
2113 if test "${with_ldap_module+set}" = set; then
2114   withval="$with_ldap_module"
2115   
2116         ol_arg=invalid
2117         for ol_val in static dynamic ; do
2118                 if test "$withval" = "$ol_val" ; then
2119                         ol_arg="$ol_val"
2120                 fi
2121         done
2122         if test "$ol_arg" = "invalid" ; then
2123                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2124         fi
2125         ol_with_ldap_module="$ol_arg"
2126
2127 else
2128         ol_with_ldap_module="static"
2129 fi
2130 # end --with-ldap_module
2131
2132 # OpenLDAP --enable-ldbm
2133         # Check whether --enable-ldbm or --disable-ldbm was given.
2134 if test "${enable_ldbm+set}" = set; then
2135   enableval="$enable_ldbm"
2136   
2137         ol_arg=invalid
2138         for ol_val in auto yes no ; do
2139                 if test "$enableval" = "$ol_val" ; then
2140                         ol_arg="$ol_val"
2141                 fi
2142         done
2143         if test "$ol_arg" = "invalid" ; then
2144                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2145         fi
2146         ol_enable_ldbm="$ol_arg"
2147
2148 else
2149         ol_enable_ldbm="no"
2150 fi
2151 # end --enable-ldbm
2152 # OpenLDAP --with-ldbm_api
2153         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2154 if test "${with_ldbm_api+set}" = set; then
2155   withval="$with_ldbm_api"
2156   
2157         ol_arg=invalid
2158         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2159                 if test "$withval" = "$ol_val" ; then
2160                         ol_arg="$ol_val"
2161                 fi
2162         done
2163         if test "$ol_arg" = "invalid" ; then
2164                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2165         fi
2166         ol_with_ldbm_api="$ol_arg"
2167
2168 else
2169         ol_with_ldbm_api="auto"
2170 fi
2171 # end --with-ldbm_api
2172
2173 # OpenLDAP --with-ldbm_module
2174         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2175 if test "${with_ldbm_module+set}" = set; then
2176   withval="$with_ldbm_module"
2177   
2178         ol_arg=invalid
2179         for ol_val in static dynamic ; do
2180                 if test "$withval" = "$ol_val" ; then
2181                         ol_arg="$ol_val"
2182                 fi
2183         done
2184         if test "$ol_arg" = "invalid" ; then
2185                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2186         fi
2187         ol_with_ldbm_module="$ol_arg"
2188
2189 else
2190         ol_with_ldbm_module="static"
2191 fi
2192 # end --with-ldbm_module
2193
2194 # OpenLDAP --with-ldbm_type
2195         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2196 if test "${with_ldbm_type+set}" = set; then
2197   withval="$with_ldbm_type"
2198   
2199         ol_arg=invalid
2200         for ol_val in auto btree hash ; do
2201                 if test "$withval" = "$ol_val" ; then
2202                         ol_arg="$ol_val"
2203                 fi
2204         done
2205         if test "$ol_arg" = "invalid" ; then
2206                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2207         fi
2208         ol_with_ldbm_type="$ol_arg"
2209
2210 else
2211         ol_with_ldbm_type="auto"
2212 fi
2213 # end --with-ldbm_type
2214
2215 # OpenLDAP --enable-meta
2216         # Check whether --enable-meta or --disable-meta was given.
2217 if test "${enable_meta+set}" = set; then
2218   enableval="$enable_meta"
2219   
2220         ol_arg=invalid
2221         for ol_val in auto yes no ; do
2222                 if test "$enableval" = "$ol_val" ; then
2223                         ol_arg="$ol_val"
2224                 fi
2225         done
2226         if test "$ol_arg" = "invalid" ; then
2227                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2228         fi
2229         ol_enable_meta="$ol_arg"
2230
2231 else
2232         ol_enable_meta="no"
2233 fi
2234 # end --enable-meta
2235 # OpenLDAP --with-meta_module
2236         # Check whether --with-meta_module or --without-meta_module was given.
2237 if test "${with_meta_module+set}" = set; then
2238   withval="$with_meta_module"
2239   
2240         ol_arg=invalid
2241         for ol_val in static dynamic ; do
2242                 if test "$withval" = "$ol_val" ; then
2243                         ol_arg="$ol_val"
2244                 fi
2245         done
2246         if test "$ol_arg" = "invalid" ; then
2247                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2248         fi
2249         ol_with_meta_module="$ol_arg"
2250
2251 else
2252         ol_with_meta_module="static"
2253 fi
2254 # end --with-meta_module
2255
2256 # OpenLDAP --enable-monitor
2257         # Check whether --enable-monitor or --disable-monitor was given.
2258 if test "${enable_monitor+set}" = set; then
2259   enableval="$enable_monitor"
2260   
2261         ol_arg=invalid
2262         for ol_val in auto yes no ; do
2263                 if test "$enableval" = "$ol_val" ; then
2264                         ol_arg="$ol_val"
2265                 fi
2266         done
2267         if test "$ol_arg" = "invalid" ; then
2268                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2269         fi
2270         ol_enable_monitor="$ol_arg"
2271
2272 else
2273         ol_enable_monitor="no"
2274 fi
2275 # end --enable-monitor
2276 # OpenLDAP --with-monitor_module
2277         # Check whether --with-monitor_module or --without-monitor_module was given.
2278 if test "${with_monitor_module+set}" = set; then
2279   withval="$with_monitor_module"
2280   
2281         ol_arg=invalid
2282         for ol_val in static dynamic ; do
2283                 if test "$withval" = "$ol_val" ; then
2284                         ol_arg="$ol_val"
2285                 fi
2286         done
2287         if test "$ol_arg" = "invalid" ; then
2288                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2289         fi
2290         ol_with_monitor_module="$ol_arg"
2291
2292 else
2293         ol_with_monitor_module="static"
2294 fi
2295 # end --with-monitor_module
2296
2297 # OpenLDAP --enable-passwd
2298         # Check whether --enable-passwd or --disable-passwd was given.
2299 if test "${enable_passwd+set}" = set; then
2300   enableval="$enable_passwd"
2301   
2302         ol_arg=invalid
2303         for ol_val in auto yes no ; do
2304                 if test "$enableval" = "$ol_val" ; then
2305                         ol_arg="$ol_val"
2306                 fi
2307         done
2308         if test "$ol_arg" = "invalid" ; then
2309                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2310         fi
2311         ol_enable_passwd="$ol_arg"
2312
2313 else
2314         ol_enable_passwd="no"
2315 fi
2316 # end --enable-passwd
2317 # OpenLDAP --with-passwd_module
2318         # Check whether --with-passwd_module or --without-passwd_module was given.
2319 if test "${with_passwd_module+set}" = set; then
2320   withval="$with_passwd_module"
2321   
2322         ol_arg=invalid
2323         for ol_val in static dynamic ; do
2324                 if test "$withval" = "$ol_val" ; then
2325                         ol_arg="$ol_val"
2326                 fi
2327         done
2328         if test "$ol_arg" = "invalid" ; then
2329                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2330         fi
2331         ol_with_passwd_module="$ol_arg"
2332
2333 else
2334         ol_with_passwd_module="static"
2335 fi
2336 # end --with-passwd_module
2337
2338 # OpenLDAP --enable-perl
2339         # Check whether --enable-perl or --disable-perl was given.
2340 if test "${enable_perl+set}" = set; then
2341   enableval="$enable_perl"
2342   
2343         ol_arg=invalid
2344         for ol_val in auto yes no ; do
2345                 if test "$enableval" = "$ol_val" ; then
2346                         ol_arg="$ol_val"
2347                 fi
2348         done
2349         if test "$ol_arg" = "invalid" ; then
2350                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2351         fi
2352         ol_enable_perl="$ol_arg"
2353
2354 else
2355         ol_enable_perl="no"
2356 fi
2357 # end --enable-perl
2358 # OpenLDAP --with-perl_module
2359         # Check whether --with-perl_module or --without-perl_module was given.
2360 if test "${with_perl_module+set}" = set; then
2361   withval="$with_perl_module"
2362   
2363         ol_arg=invalid
2364         for ol_val in static dynamic ; do
2365                 if test "$withval" = "$ol_val" ; then
2366                         ol_arg="$ol_val"
2367                 fi
2368         done
2369         if test "$ol_arg" = "invalid" ; then
2370                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2371         fi
2372         ol_with_perl_module="$ol_arg"
2373
2374 else
2375         ol_with_perl_module="static"
2376 fi
2377 # end --with-perl_module
2378
2379 # OpenLDAP --enable-shell
2380         # Check whether --enable-shell or --disable-shell was given.
2381 if test "${enable_shell+set}" = set; then
2382   enableval="$enable_shell"
2383   
2384         ol_arg=invalid
2385         for ol_val in auto yes no ; do
2386                 if test "$enableval" = "$ol_val" ; then
2387                         ol_arg="$ol_val"
2388                 fi
2389         done
2390         if test "$ol_arg" = "invalid" ; then
2391                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2392         fi
2393         ol_enable_shell="$ol_arg"
2394
2395 else
2396         ol_enable_shell="no"
2397 fi
2398 # end --enable-shell
2399 # OpenLDAP --with-shell_module
2400         # Check whether --with-shell_module or --without-shell_module was given.
2401 if test "${with_shell_module+set}" = set; then
2402   withval="$with_shell_module"
2403   
2404         ol_arg=invalid
2405         for ol_val in static dynamic ; do
2406                 if test "$withval" = "$ol_val" ; then
2407                         ol_arg="$ol_val"
2408                 fi
2409         done
2410         if test "$ol_arg" = "invalid" ; then
2411                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2412         fi
2413         ol_with_shell_module="$ol_arg"
2414
2415 else
2416         ol_with_shell_module="static"
2417 fi
2418 # end --with-shell_module
2419
2420 # OpenLDAP --enable-sql
2421         # Check whether --enable-sql or --disable-sql was given.
2422 if test "${enable_sql+set}" = set; then
2423   enableval="$enable_sql"
2424   
2425         ol_arg=invalid
2426         for ol_val in auto yes no ; do
2427                 if test "$enableval" = "$ol_val" ; then
2428                         ol_arg="$ol_val"
2429                 fi
2430         done
2431         if test "$ol_arg" = "invalid" ; then
2432                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2433         fi
2434         ol_enable_sql="$ol_arg"
2435
2436 else
2437         ol_enable_sql="no"
2438 fi
2439 # end --enable-sql
2440 # OpenLDAP --with-sql_module
2441         # Check whether --with-sql_module or --without-sql_module was given.
2442 if test "${with_sql_module+set}" = set; then
2443   withval="$with_sql_module"
2444   
2445         ol_arg=invalid
2446         for ol_val in static dynamic ; do
2447                 if test "$withval" = "$ol_val" ; then
2448                         ol_arg="$ol_val"
2449                 fi
2450         done
2451         if test "$ol_arg" = "invalid" ; then
2452                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2453         fi
2454         ol_with_sql_module="$ol_arg"
2455
2456 else
2457         ol_with_sql_module="static"
2458 fi
2459 # end --with-sql_module
2460
2461 # OpenLDAP --enable-tcl
2462         # Check whether --enable-tcl or --disable-tcl was given.
2463 if test "${enable_tcl+set}" = set; then
2464   enableval="$enable_tcl"
2465   
2466         ol_arg=invalid
2467         for ol_val in auto yes no ; do
2468                 if test "$enableval" = "$ol_val" ; then
2469                         ol_arg="$ol_val"
2470                 fi
2471         done
2472         if test "$ol_arg" = "invalid" ; then
2473                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2474         fi
2475         ol_enable_tcl="$ol_arg"
2476
2477 else
2478         ol_enable_tcl="no"
2479 fi
2480 # end --enable-tcl
2481 # OpenLDAP --with-tcl_module
2482         # Check whether --with-tcl_module or --without-tcl_module was given.
2483 if test "${with_tcl_module+set}" = set; then
2484   withval="$with_tcl_module"
2485   
2486         ol_arg=invalid
2487         for ol_val in static dynamic ; do
2488                 if test "$withval" = "$ol_val" ; then
2489                         ol_arg="$ol_val"
2490                 fi
2491         done
2492         if test "$ol_arg" = "invalid" ; then
2493                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2494         fi
2495         ol_with_tcl_module="$ol_arg"
2496
2497 else
2498         ol_with_tcl_module="static"
2499 fi
2500 # end --with-tcl_module
2501
2502
2503 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2504 if test "${with_xxslurpdoptions+set}" = set; then
2505   withval="$with_xxslurpdoptions"
2506   :
2507 fi
2508
2509 # OpenLDAP --enable-slurpd
2510         # Check whether --enable-slurpd or --disable-slurpd was given.
2511 if test "${enable_slurpd+set}" = set; then
2512   enableval="$enable_slurpd"
2513   
2514         ol_arg=invalid
2515         for ol_val in auto yes no ; do
2516                 if test "$enableval" = "$ol_val" ; then
2517                         ol_arg="$ol_val"
2518                 fi
2519         done
2520         if test "$ol_arg" = "invalid" ; then
2521                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2522         fi
2523         ol_enable_slurpd="$ol_arg"
2524
2525 else
2526         ol_enable_slurpd="auto"
2527 fi
2528 # end --enable-slurpd
2529
2530 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2531 if test "${with_xxliboptions+set}" = set; then
2532   withval="$with_xxliboptions"
2533   :
2534 fi
2535
2536 # Check whether --enable-static or --disable-static was given.
2537 if test "${enable_static+set}" = set; then
2538   enableval="$enable_static"
2539   p=${PACKAGE-default}
2540 case $enableval in
2541 yes) enable_static=yes ;;
2542 no) enable_static=no ;;
2543 *)
2544   enable_static=no
2545   # Look at the argument we got.  We use all the common list separators.
2546   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2547   for pkg in $enableval; do
2548     if test "X$pkg" = "X$p"; then
2549       enable_static=yes
2550     fi
2551   done
2552   IFS="$ac_save_ifs"
2553   ;;
2554 esac
2555 else
2556   enable_static=yes
2557 fi
2558
2559 # Check whether --enable-shared or --disable-shared was given.
2560 if test "${enable_shared+set}" = set; then
2561   enableval="$enable_shared"
2562   p=${PACKAGE-default}
2563 case $enableval in
2564 yes) enable_shared=yes ;;
2565 no) enable_shared=no ;;
2566 *)
2567   enable_shared=no
2568   # Look at the argument we got.  We use all the common list separators.
2569   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2570   for pkg in $enableval; do
2571     if test "X$pkg" = "X$p"; then
2572       enable_shared=yes
2573     fi
2574   done
2575   IFS="$ac_save_ifs"
2576   ;;
2577 esac
2578 else
2579   enable_shared=yes
2580 fi
2581
2582
2583
2584 # validate options
2585 if test $ol_enable_slapd = no ; then
2586                 if test $ol_enable_bdb = yes ; then
2587                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2588         fi
2589         if test $ol_enable_dnssrv = yes ; then
2590                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2591         fi
2592         if test $ol_enable_ldap = yes ; then
2593                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2594         fi
2595         if test $ol_enable_ldbm = yes ; then
2596                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2597         fi
2598         if test $ol_enable_meta = yes ; then
2599                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2600         fi
2601         if test $ol_enable_monitor = yes ; then
2602                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2603         fi
2604         if test $ol_enable_passwd = yes ; then
2605                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2606         fi
2607         if test $ol_enable_perl = yes ; then
2608                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2609         fi
2610         if test $ol_enable_shell = yes ; then
2611                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2612         fi
2613         if test $ol_enable_tcl = yes ; then
2614                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2615         fi
2616         if test $ol_enable_sql = yes ; then
2617                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2618         fi
2619         if test $ol_enable_modules = yes ; then
2620                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2621         fi
2622         if test $ol_enable_wrappers = yes ; then
2623                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2624         fi
2625         if test $ol_enable_phonetic = yes ; then
2626                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2627         fi
2628         if test $ol_enable_rlookups = yes ; then
2629                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2630         fi
2631         if test $ol_enable_aci = yes ; then
2632                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2633         fi
2634         if test $ol_with_ldbm_api != auto ; then
2635                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2636         fi
2637         if test $ol_with_ldbm_type != auto ; then
2638                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2639         fi
2640         if test $ol_with_bdb_module != static ; then
2641                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2642         fi
2643         if test $ol_with_dnssrv_module != static ; then
2644                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2645         fi
2646         if test $ol_with_ldap_module != static ; then
2647                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2648         fi
2649         if test $ol_with_ldbm_module != static ; then
2650                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2651         fi
2652         if test $ol_with_meta_module != static ; then
2653                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2654         fi
2655         if test $ol_with_monitor_module != static ; then
2656                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2657         fi
2658         if test $ol_with_passwd_module != static ; then
2659                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2660         fi
2661         if test $ol_with_perl_module != static ; then
2662                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2663         fi
2664         if test $ol_with_shell_module != static ; then
2665                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2666         fi
2667         if test $ol_with_tcl_module != static ; then
2668                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2669         fi
2670         if test $ol_with_sql_module != static ; then
2671                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2672         fi
2673         if test $ol_enable_slurpd = yes ; then
2674                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2675         fi
2676         if test $ol_enable_rewrite = yes ; then
2677                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2678         fi
2679
2680         # force settings to no
2681         ol_enable_bdb=no
2682         ol_enable_dnssrv=no
2683         ol_enable_ldap=no
2684         ol_enable_ldbm=no
2685         ol_enable_meta=no
2686         ol_enable_monitor=no
2687         ol_enable_passwd=no
2688         ol_enable_perl=no
2689         ol_enable_shell=no
2690         ol_enable_tcl=no
2691         ol_enable_sql=no
2692
2693         ol_enable_modules=no
2694         ol_enable_phonetic=no
2695         ol_enable_rlookups=no
2696         ol_enable_aci=no
2697         ol_enable_wrappers=no
2698         ol_enable_dynamic=no
2699
2700         ol_with_ldbm_api=no
2701         ol_with_ldbm_type=no
2702
2703         ol_with_bdb_module=static
2704         ol_with_dnssrv_module=static
2705         ol_with_ldap_module=static
2706         ol_with_ldbm_module=static
2707         ol_with_meta_module=static
2708         ol_with_monitor_module=static
2709         ol_with_passwd_module=static
2710         ol_with_perl_module=static
2711         ol_with_shell_module=static
2712         ol_with_tcl_module=static
2713         ol_with_sql_module=static
2714
2715         ol_enable_slurpd=no
2716
2717         ol_enable_rewrite=no
2718
2719 elif test $ol_enable_ldbm = no ; then
2720         
2721         if test $ol_with_ldbm_api != auto ; then
2722                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2723         fi
2724
2725         if test $ol_with_ldbm_type != auto ; then
2726                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2727         fi
2728
2729         if test $ol_with_ldbm_module != static ; then
2730                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2731         fi
2732
2733         if test $ol_enable_modules != yes -a \
2734                 $ol_enable_bdb = no -a \
2735                 $ol_enable_dnssrv = no -a \
2736                 $ol_enable_ldap = no -a \
2737                 $ol_enable_meta = no -a \
2738                 $ol_enable_monitor = no -a \
2739                 $ol_enable_passwd = no -a \
2740                 $ol_enable_perl = no -a \
2741                 $ol_enable_shell = no -a \
2742                 $ol_enable_sql = no -a \
2743                 $ol_enable_tcl = no ; then
2744
2745                 if test $ol_enable_slapd = yes ; then
2746                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2747                 else
2748                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2749                         ol_enable_slapd=no
2750                 fi
2751         fi
2752
2753         ol_with_ldbm_api=no
2754         ol_with_ldbm_type=no
2755         ol_with_ldbm_module=static
2756
2757         if test $ol_enable_bdb != no ; then
2758                 ol_with_ldbm_api=berkeley
2759         fi
2760
2761 else
2762                 if test $ol_with_ldbm_api = gdbm -a \
2763                 $ol_with_ldbm_type = btree ; then
2764                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2765         fi
2766         if test $ol_with_ldbm_api = mdbm -a \
2767                 $ol_with_ldbm_type = btree ; then
2768                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2769         fi
2770         if test $ol_with_ldbm_api = ndbm -a \
2771                 $ol_with_ldbm_type = btree ; then
2772                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2773         fi
2774
2775         if test $ol_enable_bdb = yes ; then
2776                 if test $ol_with_ldbm_api = auto ; then
2777                         ol_with_ldbm_api=berkeley
2778                 elif test $ol_with_ldbm_api != berkeley ; then
2779                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2780                 fi
2781
2782         elif test $ol_enable_bdb = auto ; then
2783                 if test $ol_with_ldbm_api != berkeley \
2784                         -o $ol_with_ldbm_api != auto ; then
2785                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2786                         ol_enable_bdb=no
2787                 fi
2788         fi
2789 fi
2790
2791 if test $ol_enable_slurpd = yes ; then
2792                 if test $ol_with_threads = no ; then
2793                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2794         fi
2795 fi
2796
2797 if test $ol_enable_lmpasswd = yes ; then
2798         if test $ol_with_tls = no ; then
2799                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2800         fi
2801 fi
2802
2803 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2804         if test $ol_with_kerberos = no ; then
2805                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2806         elif test $ol_with_kerberos = auto ; then
2807                 ol_with_kerberos=yes
2808         fi
2809
2810 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2811         if test $ol_with_kerberos = auto ; then
2812                 ol_with_kerberos=no
2813         elif test $ol_with_kerberos != no ; then
2814                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2815                 ol_with_kerberos=no
2816         fi
2817 fi
2818
2819 if test $ol_enable_spasswd = yes ; then
2820         if test $ol_with_cyrus_sasl = no ; then
2821                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2822         fi
2823         ol_with_cyrus_sasl=yes
2824 fi
2825
2826 echo "$ac_t""done" 1>&6
2827
2828 LDAP_LIBS=
2829 LDIF_LIBS=
2830 LDBM_LIB=
2831 LDBM_LIBS=
2832 LTHREAD_LIBS=
2833 LUTIL_LIBS=
2834
2835 SLAPD_LIBS=
2836 SLURPD_LIBS=
2837
2838 BUILD_SLAPD=no
2839 BUILD_SLURPD=no
2840
2841 BUILD_THREAD=no
2842
2843 BUILD_BDB=no
2844 BUILD_DNSSRV=no
2845 BUILD_LDAP=no
2846 BUILD_LDBM=no
2847 BUILD_META=no
2848 BUILD_MONITOR=no
2849 BUILD_PASSWD=no
2850 BUILD_PERL=no
2851 BUILD_SHELL=no
2852 BUILD_SQL=no
2853 BUILD_TCL=no
2854
2855 BUILD_BDB_DYNAMIC=static
2856 BUILD_DNSSRV_DYNAMIC=static
2857 BUILD_LDAP_DYNAMIC=static
2858 BUILD_LDBM_DYNAMIC=static
2859 BUILD_META_DYNAMIC=static
2860 BUILD_MONITOR_DYNAMIC=static
2861 BUILD_PASSWD_DYNAMIC=static
2862 BUILD_PERL_DYNAMIC=static
2863 BUILD_SHELL_DYNAMIC=static
2864 BUILD_TCL_DYNAMIC=static
2865 BUILD_SQL_DYNAMIC=static
2866
2867 SLAPD_MODULES_LDFLAGS=
2868 SLAPD_MODULES_CPPFLAGS=
2869 SLAPD_MODULES_LIST=
2870
2871 SLAPD_STATIC_BACKENDS=
2872 SLAPD_DYNAMIC_BACKENDS=
2873
2874 SLAPD_PERL_LDFLAGS=
2875 MOD_PERL_LDFLAGS=
2876 PERL_CPPFLAGS=
2877
2878 SLAPD_SQL_LDFLAGS=
2879 SLAPD_SQL_LIBS=
2880 SLAPD_SQL_INCLUDES=
2881
2882 MOD_TCL_LIB=
2883 KRB4_LIBS=
2884 KRB5_LIBS=
2885 READLINE_LIBS=
2886 SASL_LIBS=
2887 TERMCAP_LIBS=
2888 TLS_LIBS=
2889 MODULES_LIBS=
2890 AUTH_LIBS=
2891
2892 SLAPD_SLP_LIBS=
2893
2894
2895 # Find a good install program.  We prefer a C program (faster),
2896 # so one script is as good as another.  But avoid the broken or
2897 # incompatible versions:
2898 # SysV /etc/install, /usr/sbin/install
2899 # SunOS /usr/etc/install
2900 # IRIX /sbin/install
2901 # AIX /bin/install
2902 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2903 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2904 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2905 # ./install, which can be erroneously created by make from ./install.sh.
2906 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2907 echo "configure:2908: checking for a BSD compatible install" >&5
2908 if test -z "$INSTALL"; then
2909 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2910   echo $ac_n "(cached) $ac_c" 1>&6
2911 else
2912     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2913   for ac_dir in $PATH; do
2914     # Account for people who put trailing slashes in PATH elements.
2915     case "$ac_dir/" in
2916     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2917     *)
2918       # OSF1 and SCO ODT 3.0 have their own names for install.
2919       # Don't use installbsd from OSF since it installs stuff as root
2920       # by default.
2921       for ac_prog in ginstall scoinst install; do
2922         if test -f $ac_dir/$ac_prog; then
2923           if test $ac_prog = install &&
2924             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2925             # AIX install.  It has an incompatible calling convention.
2926             :
2927           elif test $ac_prog = install &&
2928             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2929             # program-specific install script used by HP pwplus--don't use.
2930             :
2931           else
2932             ac_cv_path_install="$ac_dir/$ac_prog -c"
2933             break 2
2934           fi
2935         fi
2936       done
2937       ;;
2938     esac
2939   done
2940   IFS="$ac_save_IFS"
2941
2942 fi
2943   if test "${ac_cv_path_install+set}" = set; then
2944     INSTALL="$ac_cv_path_install"
2945   else
2946     # As a last resort, use the slow shell script.  We don't cache a
2947     # path for INSTALL within a source directory, because that will
2948     # break other packages using the cache if that directory is
2949     # removed, or if the path is relative.
2950     INSTALL="$ac_install_sh"
2951   fi
2952 fi
2953 echo "$ac_t""$INSTALL" 1>&6
2954
2955 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2956 # It thinks the first close brace ends the variable substitution.
2957 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2958
2959 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2960
2961 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2962
2963
2964 cat >> confdefs.h <<\EOF
2965 #define HAVE_MKVERSION 1
2966 EOF
2967
2968
2969
2970
2971 ol_aix_threads=no
2972 case "$target" in
2973 *-*-aix*)       if test -z "$CC" ; then
2974                 case "$ol_with_threads" in
2975                 auto | yes |  posix) ol_aix_threads=yes ;;
2976                 esac
2977         fi
2978 ;;
2979 esac
2980
2981 if test $ol_aix_threads = yes ; then
2982         if test -z "${CC}" ; then
2983                 for ac_prog in cc_r xlc_r cc
2984 do
2985 # Extract the first word of "$ac_prog", so it can be a program name with args.
2986 set dummy $ac_prog; ac_word=$2
2987 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
2988 echo "configure:2989: checking for $ac_word" >&5
2989 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
2990   echo $ac_n "(cached) $ac_c" 1>&6
2991 else
2992   if test -n "$CC"; then
2993   ac_cv_prog_CC="$CC" # Let the user override the test.
2994 else
2995   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
2996   ac_dummy="$PATH"
2997   for ac_dir in $ac_dummy; do
2998     test -z "$ac_dir" && ac_dir=.
2999     if test -f $ac_dir/$ac_word; then
3000       ac_cv_prog_CC="$ac_prog"
3001       break
3002     fi
3003   done
3004   IFS="$ac_save_ifs"
3005 fi
3006 fi
3007 CC="$ac_cv_prog_CC"
3008 if test -n "$CC"; then
3009   echo "$ac_t""$CC" 1>&6
3010 else
3011   echo "$ac_t""no" 1>&6
3012 fi
3013
3014 test -n "$CC" && break
3015 done
3016
3017
3018                 if test "$CC" = cc ; then
3019                                                 if test $ol_with_threads != auto ; then
3020                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3021                         else
3022                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3023                         fi
3024                         ol_with_threads=no
3025                 fi
3026         fi
3027
3028         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3029                 ol_with_threads=posix
3030                 ol_cv_pthread_create=yes
3031         fi
3032 fi
3033
3034 if test -z "${CC}"; then
3035         for ac_prog in cc
3036 do
3037 # Extract the first word of "$ac_prog", so it can be a program name with args.
3038 set dummy $ac_prog; ac_word=$2
3039 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3040 echo "configure:3041: checking for $ac_word" >&5
3041 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3042   echo $ac_n "(cached) $ac_c" 1>&6
3043 else
3044   if test -n "$CC"; then
3045   ac_cv_prog_CC="$CC" # Let the user override the test.
3046 else
3047   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3048   ac_dummy="$PATH"
3049   for ac_dir in $ac_dummy; do
3050     test -z "$ac_dir" && ac_dir=.
3051     if test -f $ac_dir/$ac_word; then
3052       ac_cv_prog_CC="$ac_prog"
3053       break
3054     fi
3055   done
3056   IFS="$ac_save_ifs"
3057 fi
3058 fi
3059 CC="$ac_cv_prog_CC"
3060 if test -n "$CC"; then
3061   echo "$ac_t""$CC" 1>&6
3062 else
3063   echo "$ac_t""no" 1>&6
3064 fi
3065
3066 test -n "$CC" && break
3067 done
3068
3069 fi
3070
3071
3072 for ac_prog in ar gar
3073 do
3074 # Extract the first word of "$ac_prog", so it can be a program name with args.
3075 set dummy $ac_prog; ac_word=$2
3076 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3077 echo "configure:3078: checking for $ac_word" >&5
3078 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3079   echo $ac_n "(cached) $ac_c" 1>&6
3080 else
3081   if test -n "$AR"; then
3082   ac_cv_prog_AR="$AR" # Let the user override the test.
3083 else
3084   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3085   ac_dummy="$PATH"
3086   for ac_dir in $ac_dummy; do
3087     test -z "$ac_dir" && ac_dir=.
3088     if test -f $ac_dir/$ac_word; then
3089       ac_cv_prog_AR="$ac_prog"
3090       break
3091     fi
3092   done
3093   IFS="$ac_save_ifs"
3094 fi
3095 fi
3096 AR="$ac_cv_prog_AR"
3097 if test -n "$AR"; then
3098   echo "$ac_t""$AR" 1>&6
3099 else
3100   echo "$ac_t""no" 1>&6
3101 fi
3102
3103 test -n "$AR" && break
3104 done
3105 test -n "$AR" || AR="ar"
3106
3107
3108
3109
3110 # Find the correct PATH separator.  Usually this is `:', but
3111 # DJGPP uses `;' like DOS.
3112 if test "X${PATH_SEPARATOR+set}" != Xset; then
3113   UNAME=${UNAME-`uname 2>/dev/null`}
3114   case X$UNAME in
3115     *-DOS) lt_cv_sys_path_separator=';' ;;
3116     *)     lt_cv_sys_path_separator=':' ;;
3117   esac
3118   PATH_SEPARATOR=$lt_cv_sys_path_separator
3119 fi
3120
3121 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3122 echo "configure:3123: checking for Cygwin environment" >&5
3123 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3124   echo $ac_n "(cached) $ac_c" 1>&6
3125 else
3126   cat > conftest.$ac_ext <<EOF
3127 #line 3128 "configure"
3128 #include "confdefs.h"
3129
3130 int main() {
3131
3132 #ifndef __CYGWIN__
3133 #define __CYGWIN__ __CYGWIN32__
3134 #endif
3135 return __CYGWIN__;
3136 ; return 0; }
3137 EOF
3138 if { (eval echo configure:3139: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3139   rm -rf conftest*
3140   ac_cv_cygwin=yes
3141 else
3142   echo "configure: failed program was:" >&5
3143   cat conftest.$ac_ext >&5
3144   rm -rf conftest*
3145   ac_cv_cygwin=no
3146 fi
3147 rm -f conftest*
3148 fi
3149
3150 echo "$ac_t""$ac_cv_cygwin" 1>&6
3151 CYGWIN=
3152 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3153 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3154 echo "configure:3155: checking for mingw32 environment" >&5
3155 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3156   echo $ac_n "(cached) $ac_c" 1>&6
3157 else
3158   cat > conftest.$ac_ext <<EOF
3159 #line 3160 "configure"
3160 #include "confdefs.h"
3161
3162 int main() {
3163 return __MINGW32__;
3164 ; return 0; }
3165 EOF
3166 if { (eval echo configure:3167: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3167   rm -rf conftest*
3168   ac_cv_mingw32=yes
3169 else
3170   echo "configure: failed program was:" >&5
3171   cat conftest.$ac_ext >&5
3172   rm -rf conftest*
3173   ac_cv_mingw32=no
3174 fi
3175 rm -f conftest*
3176 fi
3177
3178 echo "$ac_t""$ac_cv_mingw32" 1>&6
3179 MINGW32=
3180 test "$ac_cv_mingw32" = yes && MINGW32=yes
3181 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3182 echo "configure:3183: checking for EMX OS/2 environment" >&5
3183 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3184   echo $ac_n "(cached) $ac_c" 1>&6
3185 else
3186   cat > conftest.$ac_ext <<EOF
3187 #line 3188 "configure"
3188 #include "confdefs.h"
3189
3190 int main() {
3191 return __EMX__;
3192 ; return 0; }
3193 EOF
3194 if { (eval echo configure:3195: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3195   rm -rf conftest*
3196   ac_cv_emxos2=yes
3197 else
3198   echo "configure: failed program was:" >&5
3199   cat conftest.$ac_ext >&5
3200   rm -rf conftest*
3201   ac_cv_emxos2=no
3202 fi
3203 rm -f conftest*
3204 fi
3205
3206 echo "$ac_t""$ac_cv_emxos2" 1>&6
3207 EMXOS2=
3208 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3209 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3210 echo "configure:3211: checking how to run the C preprocessor" >&5
3211 # On Suns, sometimes $CPP names a directory.
3212 if test -n "$CPP" && test -d "$CPP"; then
3213   CPP=
3214 fi
3215 if test -z "$CPP"; then
3216 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3217   echo $ac_n "(cached) $ac_c" 1>&6
3218 else
3219     # This must be in double quotes, not single quotes, because CPP may get
3220   # substituted into the Makefile and "${CC-cc}" will confuse make.
3221   CPP="${CC-cc} -E"
3222   # On the NeXT, cc -E runs the code through the compiler's parser,
3223   # not just through cpp.
3224   cat > conftest.$ac_ext <<EOF
3225 #line 3226 "configure"
3226 #include "confdefs.h"
3227 #include <assert.h>
3228 Syntax Error
3229 EOF
3230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3231 { (eval echo configure:3232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3233 if test -z "$ac_err"; then
3234   :
3235 else
3236   echo "$ac_err" >&5
3237   echo "configure: failed program was:" >&5
3238   cat conftest.$ac_ext >&5
3239   rm -rf conftest*
3240   CPP="${CC-cc} -E -traditional-cpp"
3241   cat > conftest.$ac_ext <<EOF
3242 #line 3243 "configure"
3243 #include "confdefs.h"
3244 #include <assert.h>
3245 Syntax Error
3246 EOF
3247 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3248 { (eval echo configure:3249: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3249 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3250 if test -z "$ac_err"; then
3251   :
3252 else
3253   echo "$ac_err" >&5
3254   echo "configure: failed program was:" >&5
3255   cat conftest.$ac_ext >&5
3256   rm -rf conftest*
3257   CPP="${CC-cc} -nologo -E"
3258   cat > conftest.$ac_ext <<EOF
3259 #line 3260 "configure"
3260 #include "confdefs.h"
3261 #include <assert.h>
3262 Syntax Error
3263 EOF
3264 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3265 { (eval echo configure:3266: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3266 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3267 if test -z "$ac_err"; then
3268   :
3269 else
3270   echo "$ac_err" >&5
3271   echo "configure: failed program was:" >&5
3272   cat conftest.$ac_ext >&5
3273   rm -rf conftest*
3274   CPP=/lib/cpp
3275 fi
3276 rm -f conftest*
3277 fi
3278 rm -f conftest*
3279 fi
3280 rm -f conftest*
3281   ac_cv_prog_CPP="$CPP"
3282 fi
3283   CPP="$ac_cv_prog_CPP"
3284 else
3285   ac_cv_prog_CPP="$CPP"
3286 fi
3287 echo "$ac_t""$CPP" 1>&6
3288
3289 # Check whether --enable-fast-install or --disable-fast-install was given.
3290 if test "${enable_fast_install+set}" = set; then
3291   enableval="$enable_fast_install"
3292   p=${PACKAGE-default}
3293 case $enableval in
3294 yes) enable_fast_install=yes ;;
3295 no) enable_fast_install=no ;;
3296 *)
3297   enable_fast_install=no
3298   # Look at the argument we got.  We use all the common list separators.
3299   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3300   for pkg in $enableval; do
3301     if test "X$pkg" = "X$p"; then
3302       enable_fast_install=yes
3303     fi
3304   done
3305   IFS="$ac_save_ifs"
3306   ;;
3307 esac
3308 else
3309   enable_fast_install=yes
3310 fi
3311
3312 # Extract the first word of "gcc", so it can be a program name with args.
3313 set dummy gcc; ac_word=$2
3314 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3315 echo "configure:3316: checking for $ac_word" >&5
3316 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3317   echo $ac_n "(cached) $ac_c" 1>&6
3318 else
3319   if test -n "$CC"; then
3320   ac_cv_prog_CC="$CC" # Let the user override the test.
3321 else
3322   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3323   ac_dummy="$PATH"
3324   for ac_dir in $ac_dummy; do
3325     test -z "$ac_dir" && ac_dir=.
3326     if test -f $ac_dir/$ac_word; then
3327       ac_cv_prog_CC="gcc"
3328       break
3329     fi
3330   done
3331   IFS="$ac_save_ifs"
3332 fi
3333 fi
3334 CC="$ac_cv_prog_CC"
3335 if test -n "$CC"; then
3336   echo "$ac_t""$CC" 1>&6
3337 else
3338   echo "$ac_t""no" 1>&6
3339 fi
3340
3341 if test -z "$CC"; then
3342   # Extract the first word of "cc", so it can be a program name with args.
3343 set dummy cc; ac_word=$2
3344 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3345 echo "configure:3346: checking for $ac_word" >&5
3346 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3347   echo $ac_n "(cached) $ac_c" 1>&6
3348 else
3349   if test -n "$CC"; then
3350   ac_cv_prog_CC="$CC" # Let the user override the test.
3351 else
3352   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3353   ac_prog_rejected=no
3354   ac_dummy="$PATH"
3355   for ac_dir in $ac_dummy; do
3356     test -z "$ac_dir" && ac_dir=.
3357     if test -f $ac_dir/$ac_word; then
3358       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3359         ac_prog_rejected=yes
3360         continue
3361       fi
3362       ac_cv_prog_CC="cc"
3363       break
3364     fi
3365   done
3366   IFS="$ac_save_ifs"
3367 if test $ac_prog_rejected = yes; then
3368   # We found a bogon in the path, so make sure we never use it.
3369   set dummy $ac_cv_prog_CC
3370   shift
3371   if test $# -gt 0; then
3372     # We chose a different compiler from the bogus one.
3373     # However, it has the same basename, so the bogon will be chosen
3374     # first if we set CC to just the basename; use the full file name.
3375     shift
3376     set dummy "$ac_dir/$ac_word" "$@"
3377     shift
3378     ac_cv_prog_CC="$@"
3379   fi
3380 fi
3381 fi
3382 fi
3383 CC="$ac_cv_prog_CC"
3384 if test -n "$CC"; then
3385   echo "$ac_t""$CC" 1>&6
3386 else
3387   echo "$ac_t""no" 1>&6
3388 fi
3389
3390   if test -z "$CC"; then
3391     case "`uname -s`" in
3392     *win32* | *WIN32* | *CYGWIN*)
3393       # Extract the first word of "cl", so it can be a program name with args.
3394 set dummy cl; ac_word=$2
3395 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3396 echo "configure:3397: checking for $ac_word" >&5
3397 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3398   echo $ac_n "(cached) $ac_c" 1>&6
3399 else
3400   if test -n "$CC"; then
3401   ac_cv_prog_CC="$CC" # Let the user override the test.
3402 else
3403   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3404   ac_dummy="$PATH"
3405   for ac_dir in $ac_dummy; do
3406     test -z "$ac_dir" && ac_dir=.
3407     if test -f $ac_dir/$ac_word; then
3408       ac_cv_prog_CC="cl"
3409       break
3410     fi
3411   done
3412   IFS="$ac_save_ifs"
3413 fi
3414 fi
3415 CC="$ac_cv_prog_CC"
3416 if test -n "$CC"; then
3417   echo "$ac_t""$CC" 1>&6
3418 else
3419   echo "$ac_t""no" 1>&6
3420 fi
3421  ;;
3422     esac
3423   fi
3424   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3425 fi
3426
3427 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3428 echo "configure:3429: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3429
3430 ac_ext=c
3431 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3432 ac_cpp='$CPP $CPPFLAGS'
3433 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3434 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3435 cross_compiling=$ac_cv_prog_cc_cross
3436
3437 cat > conftest.$ac_ext << EOF
3438
3439 #line 3440 "configure"
3440 #include "confdefs.h"
3441
3442 main(){return(0);}
3443 EOF
3444 if { (eval echo configure:3445: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3445   ac_cv_prog_cc_works=yes
3446   # If we can't run a trivial program, we are probably using a cross compiler.
3447   if (./conftest; exit) 2>/dev/null; then
3448     ac_cv_prog_cc_cross=no
3449   else
3450     ac_cv_prog_cc_cross=yes
3451   fi
3452 else
3453   echo "configure: failed program was:" >&5
3454   cat conftest.$ac_ext >&5
3455   ac_cv_prog_cc_works=no
3456 fi
3457 rm -fr conftest*
3458 ac_ext=c
3459 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3460 ac_cpp='$CPP $CPPFLAGS'
3461 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3462 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3463 cross_compiling=$ac_cv_prog_cc_cross
3464
3465 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3466 if test $ac_cv_prog_cc_works = no; then
3467   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3468 fi
3469 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3470 echo "configure:3471: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3471 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3472 cross_compiling=$ac_cv_prog_cc_cross
3473
3474 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3475 echo "configure:3476: checking whether we are using GNU C" >&5
3476 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3477   echo $ac_n "(cached) $ac_c" 1>&6
3478 else
3479   cat > conftest.c <<EOF
3480 #ifdef __GNUC__
3481   yes;
3482 #endif
3483 EOF
3484 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3485: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3485   ac_cv_prog_gcc=yes
3486 else
3487   ac_cv_prog_gcc=no
3488 fi
3489 fi
3490
3491 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3492
3493 if test $ac_cv_prog_gcc = yes; then
3494   GCC=yes
3495 else
3496   GCC=
3497 fi
3498
3499 ac_test_CFLAGS="${CFLAGS+set}"
3500 ac_save_CFLAGS="$CFLAGS"
3501 CFLAGS=
3502 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3503 echo "configure:3504: checking whether ${CC-cc} accepts -g" >&5
3504 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3505   echo $ac_n "(cached) $ac_c" 1>&6
3506 else
3507   echo 'void f(){}' > conftest.c
3508 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3509   ac_cv_prog_cc_g=yes
3510 else
3511   ac_cv_prog_cc_g=no
3512 fi
3513 rm -f conftest*
3514
3515 fi
3516
3517 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3518 if test "$ac_test_CFLAGS" = set; then
3519   CFLAGS="$ac_save_CFLAGS"
3520 elif test $ac_cv_prog_cc_g = yes; then
3521   if test "$GCC" = yes; then
3522     CFLAGS="-g -O2"
3523   else
3524     CFLAGS="-g"
3525   fi
3526 else
3527   if test "$GCC" = yes; then
3528     CFLAGS="-O2"
3529   else
3530     CFLAGS=
3531   fi
3532 fi
3533
3534 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3535 if test "${with_gnu_ld+set}" = set; then
3536   withval="$with_gnu_ld"
3537   test "$withval" = no || with_gnu_ld=yes
3538 else
3539   with_gnu_ld=no
3540 fi
3541
3542 ac_prog=ld
3543 if test "$GCC" = yes; then
3544   # Check if gcc -print-prog-name=ld gives a path.
3545   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3546 echo "configure:3547: checking for ld used by GCC" >&5
3547   case $host in
3548   *-*-mingw*)
3549     # gcc leaves a trailing carriage return which upsets mingw
3550     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3551   *)
3552     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3553   esac
3554   case $ac_prog in
3555     # Accept absolute paths.
3556     [\\/]* | [A-Za-z]:[\\/]*)
3557       re_direlt='/[^/][^/]*/\.\./'
3558       # Canonicalize the path of ld
3559       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3560       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3561         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3562       done
3563       test -z "$LD" && LD="$ac_prog"
3564       ;;
3565   "")
3566     # If it fails, then pretend we aren't using GCC.
3567     ac_prog=ld
3568     ;;
3569   *)
3570     # If it is relative, then search for the first ld in PATH.
3571     with_gnu_ld=unknown
3572     ;;
3573   esac
3574 elif test "$with_gnu_ld" = yes; then
3575   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3576 echo "configure:3577: checking for GNU ld" >&5
3577 else
3578   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3579 echo "configure:3580: checking for non-GNU ld" >&5
3580 fi
3581 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3582   echo $ac_n "(cached) $ac_c" 1>&6
3583 else
3584   if test -z "$LD"; then
3585   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3586   for ac_dir in $PATH; do
3587     test -z "$ac_dir" && ac_dir=.
3588     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3589       lt_cv_path_LD="$ac_dir/$ac_prog"
3590       # Check to see if the program is GNU ld.  I'd rather use --version,
3591       # but apparently some GNU ld's only accept -v.
3592       # Break only if it was the GNU/non-GNU ld that we prefer.
3593       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3594         test "$with_gnu_ld" != no && break
3595       else
3596         test "$with_gnu_ld" != yes && break
3597       fi
3598     fi
3599   done
3600   IFS="$ac_save_ifs"
3601 else
3602   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3603 fi
3604 fi
3605
3606 LD="$lt_cv_path_LD"
3607 if test -n "$LD"; then
3608   echo "$ac_t""$LD" 1>&6
3609 else
3610   echo "$ac_t""no" 1>&6
3611 fi
3612 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3613 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3614 echo "configure:3615: checking if the linker ($LD) is GNU ld" >&5
3615 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3616   echo $ac_n "(cached) $ac_c" 1>&6
3617 else
3618   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3619 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3620   lt_cv_prog_gnu_ld=yes
3621 else
3622   lt_cv_prog_gnu_ld=no
3623 fi
3624 fi
3625
3626 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3627 with_gnu_ld=$lt_cv_prog_gnu_ld
3628
3629
3630 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3631 echo "configure:3632: checking for $LD option to reload object files" >&5
3632 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3633   echo $ac_n "(cached) $ac_c" 1>&6
3634 else
3635   lt_cv_ld_reload_flag='-r'
3636 fi
3637
3638 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3639 reload_flag=$lt_cv_ld_reload_flag
3640 test -n "$reload_flag" && reload_flag=" $reload_flag"
3641
3642 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3643 echo "configure:3644: checking for BSD-compatible nm" >&5
3644 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3645   echo $ac_n "(cached) $ac_c" 1>&6
3646 else
3647   if test -n "$NM"; then
3648   # Let the user override the test.
3649   lt_cv_path_NM="$NM"
3650 else
3651   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3652   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3653     test -z "$ac_dir" && ac_dir=.
3654     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3655     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3656       # Check to see if the nm accepts a BSD-compat flag.
3657       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3658       #   nm: unknown option "B" ignored
3659       # Tru64's nm complains that /dev/null is an invalid object file
3660       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3661         lt_cv_path_NM="$tmp_nm -B"
3662         break
3663       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3664         lt_cv_path_NM="$tmp_nm -p"
3665         break
3666       else
3667         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3668         continue # so that we can try to find one that supports BSD flags
3669       fi
3670     fi
3671   done
3672   IFS="$ac_save_ifs"
3673   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3674 fi
3675 fi
3676
3677 NM="$lt_cv_path_NM"
3678 echo "$ac_t""$NM" 1>&6
3679
3680 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3681 echo "configure:3682: checking whether ln -s works" >&5
3682 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3683   echo $ac_n "(cached) $ac_c" 1>&6
3684 else
3685   rm -f conftestdata
3686 if ln -s X conftestdata 2>/dev/null
3687 then
3688   rm -f conftestdata
3689   ac_cv_prog_LN_S="ln -s"
3690 else
3691   ac_cv_prog_LN_S=ln
3692 fi
3693 fi
3694 LN_S="$ac_cv_prog_LN_S"
3695 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3696   echo "$ac_t""yes" 1>&6
3697 else
3698   echo "$ac_t""no" 1>&6
3699 fi
3700
3701 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3702 echo "configure:3703: checking how to recognise dependant libraries" >&5
3703 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3704   echo $ac_n "(cached) $ac_c" 1>&6
3705 else
3706   lt_cv_file_magic_cmd='$MAGIC_CMD'
3707 lt_cv_file_magic_test_file=
3708 lt_cv_deplibs_check_method='unknown'
3709 # Need to set the preceding variable on all platforms that support
3710 # interlibrary dependencies.
3711 # 'none' -- dependencies not supported.
3712 # `unknown' -- same as none, but documents that we really don't know.
3713 # 'pass_all' -- all dependencies passed with no checks.
3714 # 'test_compile' -- check by making test program.
3715 # 'file_magic [[regex]]' -- check by looking for files in library path
3716 # which responds to the $file_magic_cmd with a given egrep regex.
3717 # If you have `file' or equivalent on your system and you're not sure
3718 # whether `pass_all' will *always* work, you probably want this one.
3719
3720 case $host_os in
3721 aix4* | aix5*)
3722   lt_cv_deplibs_check_method=pass_all
3723   ;;
3724
3725 beos*)
3726   lt_cv_deplibs_check_method=pass_all
3727   ;;
3728
3729 bsdi4*)
3730   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3731   lt_cv_file_magic_cmd='/usr/bin/file -L'
3732   lt_cv_file_magic_test_file=/shlib/libc.so
3733   ;;
3734
3735 cygwin* | mingw* | pw32*)
3736   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3737   lt_cv_file_magic_cmd='$OBJDUMP -f'
3738   ;;
3739
3740 darwin* | rhapsody*)
3741   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3742   lt_cv_file_magic_cmd='/usr/bin/file -L'
3743   case "$host_os" in
3744   rhapsody* | darwin1.[012])
3745     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3746     ;;
3747   *) # Darwin 1.3 on
3748     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3749     ;;
3750   esac
3751   ;;
3752
3753 freebsd*)
3754   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3755     case $host_cpu in
3756     i*86 )
3757       # Not sure whether the presence of OpenBSD here was a mistake.
3758       # Let's accept both of them until this is cleared up.
3759       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3760       lt_cv_file_magic_cmd=/usr/bin/file
3761       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3762       ;;
3763     esac
3764   else
3765     lt_cv_deplibs_check_method=pass_all
3766   fi
3767   ;;
3768
3769 gnu*)
3770   lt_cv_deplibs_check_method=pass_all
3771   ;;
3772
3773 hpux10.20*|hpux11*)
3774   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3775   lt_cv_file_magic_cmd=/usr/bin/file
3776   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3777   ;;
3778
3779 irix5* | irix6*)
3780   case $host_os in
3781   irix5*)
3782     # this will be overridden with pass_all, but let us keep it just in case
3783     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3784     ;;
3785   *)
3786     case $LD in
3787     *-32|*"-32 ") libmagic=32-bit;;
3788     *-n32|*"-n32 ") libmagic=N32;;
3789     *-64|*"-64 ") libmagic=64-bit;;
3790     *) libmagic=never-match;;
3791     esac
3792     # this will be overridden with pass_all, but let us keep it just in case
3793     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3794     ;;
3795   esac
3796   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3797   lt_cv_deplibs_check_method=pass_all
3798   ;;
3799
3800 # This must be Linux ELF.
3801 linux-gnu*)
3802   case $host_cpu in
3803   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3804     lt_cv_deplibs_check_method=pass_all ;;
3805   *)
3806     # glibc up to 2.1.1 does not perform some relocations on ARM
3807     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3808   esac
3809   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3810   ;;
3811
3812 netbsd*)
3813   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3814     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3815   else
3816     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3817   fi
3818   ;;
3819
3820 newos6*)
3821   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3822   lt_cv_file_magic_cmd=/usr/bin/file
3823   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3824   ;;
3825
3826 openbsd*)
3827   lt_cv_file_magic_cmd=/usr/bin/file
3828   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3829   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3830     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3831   else
3832     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3833   fi
3834   ;;
3835
3836 osf3* | osf4* | osf5*)
3837   # this will be overridden with pass_all, but let us keep it just in case
3838   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3839   lt_cv_file_magic_test_file=/shlib/libc.so
3840   lt_cv_deplibs_check_method=pass_all
3841   ;;
3842
3843 sco3.2v5*)
3844   lt_cv_deplibs_check_method=pass_all
3845   ;;
3846
3847 solaris*)
3848   lt_cv_deplibs_check_method=pass_all
3849   lt_cv_file_magic_test_file=/lib/libc.so
3850   ;;
3851
3852 sysv5uw[78]* | sysv4*uw2*)
3853   lt_cv_deplibs_check_method=pass_all
3854   ;;
3855
3856 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3857   case $host_vendor in
3858   motorola)
3859     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]'
3860     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3861     ;;
3862   ncr)
3863     lt_cv_deplibs_check_method=pass_all
3864     ;;
3865   sequent)
3866     lt_cv_file_magic_cmd='/bin/file'
3867     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3868     ;;
3869   sni)
3870     lt_cv_file_magic_cmd='/bin/file'
3871     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3872     lt_cv_file_magic_test_file=/lib/libc.so
3873     ;;
3874   esac
3875   ;;
3876 esac
3877
3878 fi
3879
3880 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3881 file_magic_cmd=$lt_cv_file_magic_cmd
3882 deplibs_check_method=$lt_cv_deplibs_check_method
3883
3884 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3885 echo "configure:3886: checking for object suffix" >&5
3886 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3887   echo $ac_n "(cached) $ac_c" 1>&6
3888 else
3889   rm -f conftest*
3890 echo 'int i = 1;' > conftest.$ac_ext
3891 if { (eval echo configure:3892: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3892   for ac_file in conftest.*; do
3893     case $ac_file in
3894     *.c) ;;
3895     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3896     esac
3897   done
3898 else
3899   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3900 fi
3901 rm -f conftest*
3902 fi
3903
3904 echo "$ac_t""$ac_cv_objext" 1>&6
3905 OBJEXT=$ac_cv_objext
3906 ac_objext=$ac_cv_objext
3907
3908
3909
3910
3911 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3912 echo "configure:3913: checking for executable suffix" >&5
3913 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3914   echo $ac_n "(cached) $ac_c" 1>&6
3915 else
3916   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3917   ac_cv_exeext=.exe
3918 else
3919   rm -f conftest*
3920   echo 'int main () { return 0; }' > conftest.$ac_ext
3921   ac_cv_exeext=
3922   if { (eval echo configure:3923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3923     for file in conftest.*; do
3924       case $file in
3925       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3926       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3927       esac
3928     done
3929   else
3930     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3931   fi
3932   rm -f conftest*
3933   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3934 fi
3935 fi
3936
3937 EXEEXT=""
3938 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3939 echo "$ac_t""${ac_cv_exeext}" 1>&6
3940 ac_exeext=$EXEEXT
3941
3942 if test $host != $build; then
3943   ac_tool_prefix=${host_alias}-
3944 else
3945   ac_tool_prefix=
3946 fi
3947
3948
3949
3950
3951 # Check for command to grab the raw symbol name followed by C symbol from nm.
3952 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
3953 echo "configure:3954: checking command to parse $NM output" >&5
3954 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
3955   echo $ac_n "(cached) $ac_c" 1>&6
3956 else
3957   
3958 # These are sane defaults that work on at least a few old systems.
3959 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
3960
3961 # Character class describing NM global symbol codes.
3962 symcode='[BCDEGRST]'
3963
3964 # Regexp to match symbols that can be accessed directly from C.
3965 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
3966
3967 # Transform the above into a raw symbol and a C symbol.
3968 symxfrm='\1 \2\3 \3'
3969
3970 # Transform an extracted symbol line into a proper C declaration
3971 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
3972
3973 # Transform an extracted symbol line into symbol name and symbol address
3974 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'"
3975
3976 # Define system-specific variables.
3977 case $host_os in
3978 aix*)
3979   symcode='[BCDT]'
3980   ;;
3981 cygwin* | mingw* | pw32*)
3982   symcode='[ABCDGISTW]'
3983   ;;
3984 hpux*) # Its linker distinguishes data from code symbols
3985   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
3986   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'"
3987   ;;
3988 irix*)
3989   symcode='[BCDEGRST]'
3990   ;;
3991 solaris* | sysv5*)
3992   symcode='[BDT]'
3993   ;;
3994 sysv4)
3995   symcode='[DFNSTU]'
3996   ;;
3997 esac
3998
3999 # Handle CRLF in mingw tool chain
4000 opt_cr=
4001 case $host_os in
4002 mingw*)
4003   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4004   ;;
4005 esac
4006
4007 # If we're using GNU nm, then use its standard symbol codes.
4008 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4009   symcode='[ABCDGISTW]'
4010 fi
4011
4012 # Try without a prefix undercore, then with it.
4013 for ac_symprfx in "" "_"; do
4014
4015   # Write the raw and C identifiers.
4016 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4017
4018   # Check to see that the pipe works correctly.
4019   pipe_works=no
4020   rm -f conftest*
4021   cat > conftest.$ac_ext <<EOF
4022 #ifdef __cplusplus
4023 extern "C" {
4024 #endif
4025 char nm_test_var;
4026 void nm_test_func(){}
4027 #ifdef __cplusplus
4028 }
4029 #endif
4030 int main(){nm_test_var='a';nm_test_func();return(0);}
4031 EOF
4032
4033   if { (eval echo configure:4034: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4034     # Now try to grab the symbols.
4035     nlist=conftest.nm
4036     if { (eval echo configure:4037: \"$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
4037       # Try sorting and uniquifying the output.
4038       if sort "$nlist" | uniq > "$nlist"T; then
4039         mv -f "$nlist"T "$nlist"
4040       else
4041         rm -f "$nlist"T
4042       fi
4043
4044       # Make sure that we snagged all the symbols we need.
4045       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4046         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4047           cat <<EOF > conftest.$ac_ext
4048 #ifdef __cplusplus
4049 extern "C" {
4050 #endif
4051
4052 EOF
4053           # Now generate the symbol file.
4054           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4055
4056           cat <<EOF >> conftest.$ac_ext
4057 #if defined (__STDC__) && __STDC__
4058 # define lt_ptr void *
4059 #else
4060 # define lt_ptr char *
4061 # define const
4062 #endif
4063
4064 /* The mapping between symbol names and symbols. */
4065 const struct {
4066   const char *name;
4067   lt_ptr address;
4068 }
4069 lt_preloaded_symbols[] =
4070 {
4071 EOF
4072           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4073           cat <<\EOF >> conftest.$ac_ext
4074   {0, (lt_ptr) 0}
4075 };
4076
4077 #ifdef __cplusplus
4078 }
4079 #endif
4080 EOF
4081           # Now try linking the two files.
4082           mv conftest.$ac_objext conftstm.$ac_objext
4083           save_LIBS="$LIBS"
4084           save_CFLAGS="$CFLAGS"
4085           LIBS="conftstm.$ac_objext"
4086           CFLAGS="$CFLAGS$no_builtin_flag"
4087           if { (eval echo configure:4088: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4088             pipe_works=yes
4089           fi
4090           LIBS="$save_LIBS"
4091           CFLAGS="$save_CFLAGS"
4092         else
4093           echo "cannot find nm_test_func in $nlist" >&5
4094         fi
4095       else
4096         echo "cannot find nm_test_var in $nlist" >&5
4097       fi
4098     else
4099       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4100     fi
4101   else
4102     echo "$progname: failed program was:" >&5
4103     cat conftest.$ac_ext >&5
4104   fi
4105   rm -f conftest* conftst*
4106
4107   # Do not use the global_symbol_pipe unless it works.
4108   if test "$pipe_works" = yes; then
4109     break
4110   else
4111     lt_cv_sys_global_symbol_pipe=
4112   fi
4113 done
4114
4115 fi
4116
4117 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4118 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4119   global_symbol_to_cdecl=
4120   global_symbol_to_c_name_address=
4121 else
4122   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4123   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4124 fi
4125 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4126 then
4127   echo "$ac_t""failed" 1>&6
4128 else
4129   echo "$ac_t""ok" 1>&6
4130 fi
4131
4132 for ac_hdr in dlfcn.h
4133 do
4134 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4135 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4136 echo "configure:4137: checking for $ac_hdr" >&5
4137 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4138   echo $ac_n "(cached) $ac_c" 1>&6
4139 else
4140   cat > conftest.$ac_ext <<EOF
4141 #line 4142 "configure"
4142 #include "confdefs.h"
4143 #include <$ac_hdr>
4144 EOF
4145 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4146 { (eval echo configure:4147: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4147 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4148 if test -z "$ac_err"; then
4149   rm -rf conftest*
4150   eval "ac_cv_header_$ac_safe=yes"
4151 else
4152   echo "$ac_err" >&5
4153   echo "configure: failed program was:" >&5
4154   cat conftest.$ac_ext >&5
4155   rm -rf conftest*
4156   eval "ac_cv_header_$ac_safe=no"
4157 fi
4158 rm -f conftest*
4159 fi
4160 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4161   echo "$ac_t""yes" 1>&6
4162     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4163   cat >> confdefs.h <<EOF
4164 #define $ac_tr_hdr 1
4165 EOF
4166  
4167 else
4168   echo "$ac_t""no" 1>&6
4169 fi
4170 done
4171
4172
4173
4174
4175
4176 # Only perform the check for file, if the check method requires it
4177 case $deplibs_check_method in
4178 file_magic*)
4179   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4180     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4181 echo "configure:4182: checking for ${ac_tool_prefix}file" >&5
4182 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4183   echo $ac_n "(cached) $ac_c" 1>&6
4184 else
4185   case $MAGIC_CMD in
4186   /*)
4187   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4188   ;;
4189   ?:/*)
4190   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4191   ;;
4192   *)
4193   ac_save_MAGIC_CMD="$MAGIC_CMD"
4194   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4195   ac_dummy="/usr/bin:$PATH"
4196   for ac_dir in $ac_dummy; do
4197     test -z "$ac_dir" && ac_dir=.
4198     if test -f $ac_dir/${ac_tool_prefix}file; then
4199       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4200       if test -n "$file_magic_test_file"; then
4201         case $deplibs_check_method in
4202         "file_magic "*)
4203           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4204           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4205           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4206             egrep "$file_magic_regex" > /dev/null; then
4207             :
4208           else
4209             cat <<EOF 1>&2
4210
4211 *** Warning: the command libtool uses to detect shared libraries,
4212 *** $file_magic_cmd, produces output that libtool cannot recognize.
4213 *** The result is that libtool may fail to recognize shared libraries
4214 *** as such.  This will affect the creation of libtool libraries that
4215 *** depend on shared libraries, but programs linked with such libtool
4216 *** libraries will work regardless of this problem.  Nevertheless, you
4217 *** may want to report the problem to your system manager and/or to
4218 *** bug-libtool@gnu.org
4219
4220 EOF
4221           fi ;;
4222         esac
4223       fi
4224       break
4225     fi
4226   done
4227   IFS="$ac_save_ifs"
4228   MAGIC_CMD="$ac_save_MAGIC_CMD"
4229   ;;
4230 esac
4231 fi
4232
4233 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4234 if test -n "$MAGIC_CMD"; then
4235   echo "$ac_t""$MAGIC_CMD" 1>&6
4236 else
4237   echo "$ac_t""no" 1>&6
4238 fi
4239
4240 if test -z "$lt_cv_path_MAGIC_CMD"; then
4241   if test -n "$ac_tool_prefix"; then
4242     echo $ac_n "checking for file""... $ac_c" 1>&6
4243 echo "configure:4244: checking for file" >&5
4244 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4245   echo $ac_n "(cached) $ac_c" 1>&6
4246 else
4247   case $MAGIC_CMD in
4248   /*)
4249   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4250   ;;
4251   ?:/*)
4252   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4253   ;;
4254   *)
4255   ac_save_MAGIC_CMD="$MAGIC_CMD"
4256   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4257   ac_dummy="/usr/bin:$PATH"
4258   for ac_dir in $ac_dummy; do
4259     test -z "$ac_dir" && ac_dir=.
4260     if test -f $ac_dir/file; then
4261       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4262       if test -n "$file_magic_test_file"; then
4263         case $deplibs_check_method in
4264         "file_magic "*)
4265           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4266           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4267           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4268             egrep "$file_magic_regex" > /dev/null; then
4269             :
4270           else
4271             cat <<EOF 1>&2
4272
4273 *** Warning: the command libtool uses to detect shared libraries,
4274 *** $file_magic_cmd, produces output that libtool cannot recognize.
4275 *** The result is that libtool may fail to recognize shared libraries
4276 *** as such.  This will affect the creation of libtool libraries that
4277 *** depend on shared libraries, but programs linked with such libtool
4278 *** libraries will work regardless of this problem.  Nevertheless, you
4279 *** may want to report the problem to your system manager and/or to
4280 *** bug-libtool@gnu.org
4281
4282 EOF
4283           fi ;;
4284         esac
4285       fi
4286       break
4287     fi
4288   done
4289   IFS="$ac_save_ifs"
4290   MAGIC_CMD="$ac_save_MAGIC_CMD"
4291   ;;
4292 esac
4293 fi
4294
4295 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4296 if test -n "$MAGIC_CMD"; then
4297   echo "$ac_t""$MAGIC_CMD" 1>&6
4298 else
4299   echo "$ac_t""no" 1>&6
4300 fi
4301
4302   else
4303     MAGIC_CMD=:
4304   fi
4305 fi
4306
4307   fi
4308   ;;
4309 esac
4310
4311 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4312 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4313 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4314 echo "configure:4315: checking for $ac_word" >&5
4315 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4316   echo $ac_n "(cached) $ac_c" 1>&6
4317 else
4318   if test -n "$RANLIB"; then
4319   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4320 else
4321   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4322   ac_dummy="$PATH"
4323   for ac_dir in $ac_dummy; do
4324     test -z "$ac_dir" && ac_dir=.
4325     if test -f $ac_dir/$ac_word; then
4326       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4327       break
4328     fi
4329   done
4330   IFS="$ac_save_ifs"
4331 fi
4332 fi
4333 RANLIB="$ac_cv_prog_RANLIB"
4334 if test -n "$RANLIB"; then
4335   echo "$ac_t""$RANLIB" 1>&6
4336 else
4337   echo "$ac_t""no" 1>&6
4338 fi
4339
4340
4341 if test -z "$ac_cv_prog_RANLIB"; then
4342 if test -n "$ac_tool_prefix"; then
4343   # Extract the first word of "ranlib", so it can be a program name with args.
4344 set dummy ranlib; ac_word=$2
4345 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4346 echo "configure:4347: checking for $ac_word" >&5
4347 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4348   echo $ac_n "(cached) $ac_c" 1>&6
4349 else
4350   if test -n "$RANLIB"; then
4351   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4352 else
4353   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4354   ac_dummy="$PATH"
4355   for ac_dir in $ac_dummy; do
4356     test -z "$ac_dir" && ac_dir=.
4357     if test -f $ac_dir/$ac_word; then
4358       ac_cv_prog_RANLIB="ranlib"
4359       break
4360     fi
4361   done
4362   IFS="$ac_save_ifs"
4363   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4364 fi
4365 fi
4366 RANLIB="$ac_cv_prog_RANLIB"
4367 if test -n "$RANLIB"; then
4368   echo "$ac_t""$RANLIB" 1>&6
4369 else
4370   echo "$ac_t""no" 1>&6
4371 fi
4372
4373 else
4374   RANLIB=":"
4375 fi
4376 fi
4377
4378 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4379 set dummy ${ac_tool_prefix}strip; ac_word=$2
4380 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4381 echo "configure:4382: checking for $ac_word" >&5
4382 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4383   echo $ac_n "(cached) $ac_c" 1>&6
4384 else
4385   if test -n "$STRIP"; then
4386   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4387 else
4388   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4389   ac_dummy="$PATH"
4390   for ac_dir in $ac_dummy; do
4391     test -z "$ac_dir" && ac_dir=.
4392     if test -f $ac_dir/$ac_word; then
4393       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4394       break
4395     fi
4396   done
4397   IFS="$ac_save_ifs"
4398 fi
4399 fi
4400 STRIP="$ac_cv_prog_STRIP"
4401 if test -n "$STRIP"; then
4402   echo "$ac_t""$STRIP" 1>&6
4403 else
4404   echo "$ac_t""no" 1>&6
4405 fi
4406
4407
4408 if test -z "$ac_cv_prog_STRIP"; then
4409 if test -n "$ac_tool_prefix"; then
4410   # Extract the first word of "strip", so it can be a program name with args.
4411 set dummy strip; ac_word=$2
4412 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4413 echo "configure:4414: checking for $ac_word" >&5
4414 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4415   echo $ac_n "(cached) $ac_c" 1>&6
4416 else
4417   if test -n "$STRIP"; then
4418   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4419 else
4420   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4421   ac_dummy="$PATH"
4422   for ac_dir in $ac_dummy; do
4423     test -z "$ac_dir" && ac_dir=.
4424     if test -f $ac_dir/$ac_word; then
4425       ac_cv_prog_STRIP="strip"
4426       break
4427     fi
4428   done
4429   IFS="$ac_save_ifs"
4430   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4431 fi
4432 fi
4433 STRIP="$ac_cv_prog_STRIP"
4434 if test -n "$STRIP"; then
4435   echo "$ac_t""$STRIP" 1>&6
4436 else
4437   echo "$ac_t""no" 1>&6
4438 fi
4439
4440 else
4441   STRIP=":"
4442 fi
4443 fi
4444
4445
4446 enable_dlopen=yes
4447 enable_win32_dll=yes
4448
4449 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4450 if test "${enable_libtool_lock+set}" = set; then
4451   enableval="$enable_libtool_lock"
4452   :
4453 fi
4454
4455 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4456
4457 # Some flags need to be propagated to the compiler or linker for good
4458 # libtool support.
4459 case $host in
4460 *-*-irix6*)
4461   # Find out which ABI we are using.
4462   echo '#line 4463 "configure"' > conftest.$ac_ext
4463   if { (eval echo configure:4464: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4464     case `/usr/bin/file conftest.$ac_objext` in
4465     *32-bit*)
4466       LD="${LD-ld} -32"
4467       ;;
4468     *N32*)
4469       LD="${LD-ld} -n32"
4470       ;;
4471     *64-bit*)
4472       LD="${LD-ld} -64"
4473       ;;
4474     esac
4475   fi
4476   rm -rf conftest*
4477   ;;
4478
4479 *-*-sco3.2v5*)
4480   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4481   SAVE_CFLAGS="$CFLAGS"
4482   CFLAGS="$CFLAGS -belf"
4483   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4484 echo "configure:4485: checking whether the C compiler needs -belf" >&5
4485 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4486   echo $ac_n "(cached) $ac_c" 1>&6
4487 else
4488   
4489      ac_ext=c
4490 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4491 ac_cpp='$CPP $CPPFLAGS'
4492 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4493 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4494 cross_compiling=$ac_cv_prog_cc_cross
4495
4496      cat > conftest.$ac_ext <<EOF
4497 #line 4498 "configure"
4498 #include "confdefs.h"
4499
4500 int main() {
4501
4502 ; return 0; }
4503 EOF
4504 if { (eval echo configure:4505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4505   rm -rf conftest*
4506   lt_cv_cc_needs_belf=yes
4507 else
4508   echo "configure: failed program was:" >&5
4509   cat conftest.$ac_ext >&5
4510   rm -rf conftest*
4511   lt_cv_cc_needs_belf=no
4512 fi
4513 rm -f conftest*
4514      ac_ext=c
4515 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4516 ac_cpp='$CPP $CPPFLAGS'
4517 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4518 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4519 cross_compiling=$ac_cv_prog_cc_cross
4520
4521 fi
4522
4523 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4524   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4525     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4526     CFLAGS="$SAVE_CFLAGS"
4527   fi
4528   ;;
4529
4530 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4531   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4532 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4533 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4534 echo "configure:4535: checking for $ac_word" >&5
4535 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4536   echo $ac_n "(cached) $ac_c" 1>&6
4537 else
4538   if test -n "$DLLTOOL"; then
4539   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4540 else
4541   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4542   ac_dummy="$PATH"
4543   for ac_dir in $ac_dummy; do
4544     test -z "$ac_dir" && ac_dir=.
4545     if test -f $ac_dir/$ac_word; then
4546       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4547       break
4548     fi
4549   done
4550   IFS="$ac_save_ifs"
4551 fi
4552 fi
4553 DLLTOOL="$ac_cv_prog_DLLTOOL"
4554 if test -n "$DLLTOOL"; then
4555   echo "$ac_t""$DLLTOOL" 1>&6
4556 else
4557   echo "$ac_t""no" 1>&6
4558 fi
4559
4560
4561 if test -z "$ac_cv_prog_DLLTOOL"; then
4562 if test -n "$ac_tool_prefix"; then
4563   # Extract the first word of "dlltool", so it can be a program name with args.
4564 set dummy dlltool; ac_word=$2
4565 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4566 echo "configure:4567: checking for $ac_word" >&5
4567 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4568   echo $ac_n "(cached) $ac_c" 1>&6
4569 else
4570   if test -n "$DLLTOOL"; then
4571   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4572 else
4573   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4574   ac_dummy="$PATH"
4575   for ac_dir in $ac_dummy; do
4576     test -z "$ac_dir" && ac_dir=.
4577     if test -f $ac_dir/$ac_word; then
4578       ac_cv_prog_DLLTOOL="dlltool"
4579       break
4580     fi
4581   done
4582   IFS="$ac_save_ifs"
4583   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4584 fi
4585 fi
4586 DLLTOOL="$ac_cv_prog_DLLTOOL"
4587 if test -n "$DLLTOOL"; then
4588   echo "$ac_t""$DLLTOOL" 1>&6
4589 else
4590   echo "$ac_t""no" 1>&6
4591 fi
4592
4593 else
4594   DLLTOOL="false"
4595 fi
4596 fi
4597
4598   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4599 set dummy ${ac_tool_prefix}as; ac_word=$2
4600 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4601 echo "configure:4602: checking for $ac_word" >&5
4602 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4603   echo $ac_n "(cached) $ac_c" 1>&6
4604 else
4605   if test -n "$AS"; then
4606   ac_cv_prog_AS="$AS" # Let the user override the test.
4607 else
4608   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4609   ac_dummy="$PATH"
4610   for ac_dir in $ac_dummy; do
4611     test -z "$ac_dir" && ac_dir=.
4612     if test -f $ac_dir/$ac_word; then
4613       ac_cv_prog_AS="${ac_tool_prefix}as"
4614       break
4615     fi
4616   done
4617   IFS="$ac_save_ifs"
4618 fi
4619 fi
4620 AS="$ac_cv_prog_AS"
4621 if test -n "$AS"; then
4622   echo "$ac_t""$AS" 1>&6
4623 else
4624   echo "$ac_t""no" 1>&6
4625 fi
4626
4627
4628 if test -z "$ac_cv_prog_AS"; then
4629 if test -n "$ac_tool_prefix"; then
4630   # Extract the first word of "as", so it can be a program name with args.
4631 set dummy as; ac_word=$2
4632 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4633 echo "configure:4634: checking for $ac_word" >&5
4634 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4635   echo $ac_n "(cached) $ac_c" 1>&6
4636 else
4637   if test -n "$AS"; then
4638   ac_cv_prog_AS="$AS" # Let the user override the test.
4639 else
4640   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4641   ac_dummy="$PATH"
4642   for ac_dir in $ac_dummy; do
4643     test -z "$ac_dir" && ac_dir=.
4644     if test -f $ac_dir/$ac_word; then
4645       ac_cv_prog_AS="as"
4646       break
4647     fi
4648   done
4649   IFS="$ac_save_ifs"
4650   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4651 fi
4652 fi
4653 AS="$ac_cv_prog_AS"
4654 if test -n "$AS"; then
4655   echo "$ac_t""$AS" 1>&6
4656 else
4657   echo "$ac_t""no" 1>&6
4658 fi
4659
4660 else
4661   AS="false"
4662 fi
4663 fi
4664
4665   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4666 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4667 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4668 echo "configure:4669: checking for $ac_word" >&5
4669 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4670   echo $ac_n "(cached) $ac_c" 1>&6
4671 else
4672   if test -n "$OBJDUMP"; then
4673   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4674 else
4675   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4676   ac_dummy="$PATH"
4677   for ac_dir in $ac_dummy; do
4678     test -z "$ac_dir" && ac_dir=.
4679     if test -f $ac_dir/$ac_word; then
4680       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4681       break
4682     fi
4683   done
4684   IFS="$ac_save_ifs"
4685 fi
4686 fi
4687 OBJDUMP="$ac_cv_prog_OBJDUMP"
4688 if test -n "$OBJDUMP"; then
4689   echo "$ac_t""$OBJDUMP" 1>&6
4690 else
4691   echo "$ac_t""no" 1>&6
4692 fi
4693
4694
4695 if test -z "$ac_cv_prog_OBJDUMP"; then
4696 if test -n "$ac_tool_prefix"; then
4697   # Extract the first word of "objdump", so it can be a program name with args.
4698 set dummy objdump; ac_word=$2
4699 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4700 echo "configure:4701: checking for $ac_word" >&5
4701 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4702   echo $ac_n "(cached) $ac_c" 1>&6
4703 else
4704   if test -n "$OBJDUMP"; then
4705   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4706 else
4707   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4708   ac_dummy="$PATH"
4709   for ac_dir in $ac_dummy; do
4710     test -z "$ac_dir" && ac_dir=.
4711     if test -f $ac_dir/$ac_word; then
4712       ac_cv_prog_OBJDUMP="objdump"
4713       break
4714     fi
4715   done
4716   IFS="$ac_save_ifs"
4717   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4718 fi
4719 fi
4720 OBJDUMP="$ac_cv_prog_OBJDUMP"
4721 if test -n "$OBJDUMP"; then
4722   echo "$ac_t""$OBJDUMP" 1>&6
4723 else
4724   echo "$ac_t""no" 1>&6
4725 fi
4726
4727 else
4728   OBJDUMP="false"
4729 fi
4730 fi
4731
4732
4733   # recent cygwin and mingw systems supply a stub DllMain which the user
4734   # can override, but on older systems we have to supply one
4735   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4736 echo "configure:4737: checking if libtool should supply DllMain function" >&5
4737 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4738   echo $ac_n "(cached) $ac_c" 1>&6
4739 else
4740   cat > conftest.$ac_ext <<EOF
4741 #line 4742 "configure"
4742 #include "confdefs.h"
4743
4744 int main() {
4745 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4746       DllMain (0, 0, 0);
4747 ; return 0; }
4748 EOF
4749 if { (eval echo configure:4750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4750   rm -rf conftest*
4751   lt_cv_need_dllmain=no
4752 else
4753   echo "configure: failed program was:" >&5
4754   cat conftest.$ac_ext >&5
4755   rm -rf conftest*
4756   lt_cv_need_dllmain=yes
4757 fi
4758 rm -f conftest*
4759 fi
4760
4761 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4762
4763   case $host/$CC in
4764   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4765     # old mingw systems require "-dll" to link a DLL, while more recent ones
4766     # require "-mdll"
4767     SAVE_CFLAGS="$CFLAGS"
4768     CFLAGS="$CFLAGS -mdll"
4769     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4770 echo "configure:4771: checking how to link DLLs" >&5
4771 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4772   echo $ac_n "(cached) $ac_c" 1>&6
4773 else
4774   cat > conftest.$ac_ext <<EOF
4775 #line 4776 "configure"
4776 #include "confdefs.h"
4777
4778 int main() {
4779
4780 ; return 0; }
4781 EOF
4782 if { (eval echo configure:4783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4783   rm -rf conftest*
4784   lt_cv_cc_dll_switch=-mdll
4785 else
4786   echo "configure: failed program was:" >&5
4787   cat conftest.$ac_ext >&5
4788   rm -rf conftest*
4789   lt_cv_cc_dll_switch=-dll
4790 fi
4791 rm -f conftest*
4792 fi
4793
4794 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4795     CFLAGS="$SAVE_CFLAGS" ;;
4796   *-*-cygwin* | *-*-pw32*)
4797     # cygwin systems need to pass --dll to the linker, and not link
4798     # crt.o which will require a WinMain@16 definition.
4799     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4800   esac
4801   ;;
4802   
4803 esac
4804
4805 # Sed substitution that helps us do robust quoting.  It backslashifies
4806 # metacharacters that are still active within double-quoted strings.
4807 Xsed='sed -e s/^X//'
4808 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4809
4810 # Same as above, but do not quote variable references.
4811 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4812
4813 # Sed substitution to delay expansion of an escaped shell variable in a
4814 # double_quote_subst'ed string.
4815 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4816
4817 # Constants:
4818 rm="rm -f"
4819
4820 # Global variables:
4821 default_ofile=libtool
4822 can_build_shared=yes
4823
4824 # All known linkers require a `.a' archive for static linking (except M$VC,
4825 # which needs '.lib').
4826 libext=a
4827 ltmain="$ac_aux_dir/ltmain.sh"
4828 ofile="$default_ofile"
4829 with_gnu_ld="$lt_cv_prog_gnu_ld"
4830 need_locks="$enable_libtool_lock"
4831
4832 old_CC="$CC"
4833 old_CFLAGS="$CFLAGS"
4834
4835 # Set sane defaults for various variables
4836 test -z "$AR" && AR=ar
4837 test -z "$AR_FLAGS" && AR_FLAGS=cru
4838 test -z "$AS" && AS=as
4839 test -z "$CC" && CC=cc
4840 test -z "$DLLTOOL" && DLLTOOL=dlltool
4841 test -z "$LD" && LD=ld
4842 test -z "$LN_S" && LN_S="ln -s"
4843 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4844 test -z "$NM" && NM=nm
4845 test -z "$OBJDUMP" && OBJDUMP=objdump
4846 test -z "$RANLIB" && RANLIB=:
4847 test -z "$STRIP" && STRIP=:
4848 test -z "$ac_objext" && ac_objext=o
4849
4850 if test x"$host" != x"$build"; then
4851   ac_tool_prefix=${host_alias}-
4852 else
4853   ac_tool_prefix=
4854 fi
4855
4856 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4857 case $host_os in
4858 linux-gnu*) ;;
4859 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4860 esac
4861
4862 case $host_os in
4863 aix3*)
4864   # AIX sometimes has problems with the GCC collect2 program.  For some
4865   # reason, if we set the COLLECT_NAMES environment variable, the problems
4866   # vanish in a puff of smoke.
4867   if test "X${COLLECT_NAMES+set}" != Xset; then
4868     COLLECT_NAMES=
4869     export COLLECT_NAMES
4870   fi
4871   ;;
4872 esac
4873
4874 # Determine commands to create old-style static archives.
4875 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4876 old_postinstall_cmds='chmod 644 $oldlib'
4877 old_postuninstall_cmds=
4878
4879 if test -n "$RANLIB"; then
4880   case $host_os in
4881   openbsd*)
4882     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4883     ;;
4884   *)
4885     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4886     ;;
4887   esac
4888   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4889 fi
4890
4891 # Allow CC to be a program name with arguments.
4892 set dummy $CC
4893 compiler="$2"
4894
4895 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4896 echo "configure:4897: checking for objdir" >&5
4897 rm -f .libs 2>/dev/null
4898 mkdir .libs 2>/dev/null
4899 if test -d .libs; then
4900   objdir=.libs
4901 else
4902   # MS-DOS does not allow filenames that begin with a dot.
4903   objdir=_libs
4904 fi
4905 rmdir .libs 2>/dev/null
4906 echo "$ac_t""$objdir" 1>&6
4907
4908
4909 # Check whether --with-pic or --without-pic was given.
4910 if test "${with_pic+set}" = set; then
4911   withval="$with_pic"
4912   pic_mode="$withval"
4913 else
4914   pic_mode=default
4915 fi
4916
4917 test -z "$pic_mode" && pic_mode=default
4918
4919 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4920 # in isolation, and that seeing it set (from the cache) indicates that
4921 # the associated values are set (in the cache) correctly too.
4922 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4923 echo "configure:4924: checking for $compiler option to produce PIC" >&5
4924 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4925   echo $ac_n "(cached) $ac_c" 1>&6
4926 else
4927    lt_cv_prog_cc_pic=
4928   lt_cv_prog_cc_shlib=
4929   lt_cv_prog_cc_wl=
4930   lt_cv_prog_cc_static=
4931   lt_cv_prog_cc_no_builtin=
4932   lt_cv_prog_cc_can_build_shared=$can_build_shared
4933
4934   if test "$GCC" = yes; then
4935     lt_cv_prog_cc_wl='-Wl,'
4936     lt_cv_prog_cc_static='-static'
4937
4938     case $host_os in
4939     aix*)
4940       # Below there is a dirty hack to force normal static linking with -ldl
4941       # The problem is because libdl dynamically linked with both libc and
4942       # libC (AIX C++ library), which obviously doesn't included in libraries
4943       # list by gcc. This cause undefined symbols with -static flags.
4944       # This hack allows C programs to be linked with "-static -ldl", but
4945       # not sure about C++ programs.
4946       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
4947       ;;
4948     amigaos*)
4949       # FIXME: we need at least 68020 code to build shared libraries, but
4950       # adding the `-m68020' flag to GCC prevents building anything better,
4951       # like `-m68040'.
4952       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
4953       ;;
4954     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
4955       # PIC is the default for these OSes.
4956       ;;
4957     darwin* | rhapsody*)
4958       # PIC is the default on this platform
4959       # Common symbols not allowed in MH_DYLIB files
4960       lt_cv_prog_cc_pic='-fno-common'
4961       ;;
4962     cygwin* | mingw* | pw32* | os2*)
4963       # This hack is so that the source file can tell whether it is being
4964       # built for inclusion in a dll (and should export symbols for example).
4965       lt_cv_prog_cc_pic='-DDLL_EXPORT'
4966       ;;
4967     sysv4*MP*)
4968       if test -d /usr/nec; then
4969          lt_cv_prog_cc_pic=-Kconform_pic
4970       fi
4971       ;;
4972     *)
4973       lt_cv_prog_cc_pic='-fPIC'
4974       ;;
4975     esac
4976   else
4977     # PORTME Check for PIC flags for the system compiler.
4978     case $host_os in
4979     aix3* | aix4* | aix5*)
4980       lt_cv_prog_cc_wl='-Wl,'
4981       # All AIX code is PIC.
4982       if test "$host_cpu" = ia64; then
4983         # AIX 5 now supports IA64 processor
4984         lt_cv_prog_cc_static='-Bstatic'
4985       else
4986         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
4987       fi
4988       ;;
4989
4990     hpux9* | hpux10* | hpux11*)
4991       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
4992       lt_cv_prog_cc_wl='-Wl,'
4993       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
4994       lt_cv_prog_cc_pic='+Z'
4995       ;;
4996
4997     irix5* | irix6*)
4998       lt_cv_prog_cc_wl='-Wl,'
4999       lt_cv_prog_cc_static='-non_shared'
5000       # PIC (with -KPIC) is the default.
5001       ;;
5002
5003     cygwin* | mingw* | pw32* | os2*)
5004       # This hack is so that the source file can tell whether it is being
5005       # built for inclusion in a dll (and should export symbols for example).
5006       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5007       ;;
5008
5009     newsos6)
5010       lt_cv_prog_cc_pic='-KPIC'
5011       lt_cv_prog_cc_static='-Bstatic'
5012       ;;
5013
5014     osf3* | osf4* | osf5*)
5015       # All OSF/1 code is PIC.
5016       lt_cv_prog_cc_wl='-Wl,'
5017       lt_cv_prog_cc_static='-non_shared'
5018       ;;
5019
5020     sco3.2v5*)
5021       lt_cv_prog_cc_pic='-Kpic'
5022       lt_cv_prog_cc_static='-dn'
5023       lt_cv_prog_cc_shlib='-belf'
5024       ;;
5025
5026     solaris*)
5027       lt_cv_prog_cc_pic='-KPIC'
5028       lt_cv_prog_cc_static='-Bstatic'
5029       lt_cv_prog_cc_wl='-Wl,'
5030       ;;
5031
5032     sunos4*)
5033       lt_cv_prog_cc_pic='-PIC'
5034       lt_cv_prog_cc_static='-Bstatic'
5035       lt_cv_prog_cc_wl='-Qoption ld '
5036       ;;
5037
5038     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5039       lt_cv_prog_cc_pic='-KPIC'
5040       lt_cv_prog_cc_static='-Bstatic'
5041       if test "x$host_vendor" = xsni; then
5042         lt_cv_prog_cc_wl='-LD'
5043       else
5044         lt_cv_prog_cc_wl='-Wl,'
5045       fi
5046       ;;
5047
5048     uts4*)
5049       lt_cv_prog_cc_pic='-pic'
5050       lt_cv_prog_cc_static='-Bstatic'
5051       ;;
5052
5053     sysv4*MP*)
5054       if test -d /usr/nec ;then
5055         lt_cv_prog_cc_pic='-Kconform_pic'
5056         lt_cv_prog_cc_static='-Bstatic'
5057       fi
5058       ;;
5059
5060     *)
5061       lt_cv_prog_cc_can_build_shared=no
5062       ;;
5063     esac
5064   fi
5065
5066 fi
5067
5068 if test -z "$lt_cv_prog_cc_pic"; then
5069   echo "$ac_t""none" 1>&6
5070 else
5071   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5072
5073   # Check to make sure the pic_flag actually works.
5074   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5075 echo "configure:5076: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5076   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5077   echo $ac_n "(cached) $ac_c" 1>&6
5078 else
5079       save_CFLAGS="$CFLAGS"
5080     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5081     cat > conftest.$ac_ext <<EOF
5082 #line 5083 "configure"
5083 #include "confdefs.h"
5084
5085 int main() {
5086
5087 ; return 0; }
5088 EOF
5089 if { (eval echo configure:5090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5090   rm -rf conftest*
5091         case $host_os in
5092       hpux9* | hpux10* | hpux11*)
5093         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5094         # they create non-PIC objects.  So, if there were any warnings, we
5095         # assume that PIC is not supported.
5096         if test -s conftest.err; then
5097           lt_cv_prog_cc_pic_works=no
5098         else
5099           lt_cv_prog_cc_pic_works=yes
5100         fi
5101         ;;
5102       *)
5103         lt_cv_prog_cc_pic_works=yes
5104         ;;
5105       esac
5106     
5107 else
5108   echo "configure: failed program was:" >&5
5109   cat conftest.$ac_ext >&5
5110   rm -rf conftest*
5111         lt_cv_prog_cc_pic_works=no
5112     
5113 fi
5114 rm -f conftest*
5115     CFLAGS="$save_CFLAGS"
5116   
5117 fi
5118
5119
5120   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5121     lt_cv_prog_cc_pic=
5122     lt_cv_prog_cc_can_build_shared=no
5123   else
5124     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5125   fi
5126
5127   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5128 fi
5129
5130 # Check for any special shared library compilation flags.
5131 if test -n "$lt_cv_prog_cc_shlib"; then
5132   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5133   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5134   else
5135    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5136     lt_cv_prog_cc_can_build_shared=no
5137   fi
5138 fi
5139
5140 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5141 echo "configure:5142: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5142 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5143   echo $ac_n "(cached) $ac_c" 1>&6
5144 else
5145     lt_cv_prog_cc_static_works=no
5146   save_LDFLAGS="$LDFLAGS"
5147   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5148   cat > conftest.$ac_ext <<EOF
5149 #line 5150 "configure"
5150 #include "confdefs.h"
5151
5152 int main() {
5153
5154 ; return 0; }
5155 EOF
5156 if { (eval echo configure:5157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5157   rm -rf conftest*
5158   lt_cv_prog_cc_static_works=yes
5159 else
5160   echo "configure: failed program was:" >&5
5161   cat conftest.$ac_ext >&5
5162 fi
5163 rm -f conftest*
5164   LDFLAGS="$save_LDFLAGS"
5165
5166 fi
5167
5168
5169 # Belt *and* braces to stop my trousers falling down:
5170 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5171 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5172
5173 pic_flag="$lt_cv_prog_cc_pic"
5174 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5175 wl="$lt_cv_prog_cc_wl"
5176 link_static_flag="$lt_cv_prog_cc_static"
5177 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5178 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5179
5180
5181 # Check to see if options -o and -c are simultaneously supported by compiler
5182 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5183 echo "configure:5184: checking if $compiler supports -c -o file.$ac_objext" >&5
5184 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5185   echo $ac_n "(cached) $ac_c" 1>&6
5186 else
5187   
5188 $rm -r conftest 2>/dev/null
5189 mkdir conftest
5190 cd conftest
5191 echo "int some_variable = 0;" > conftest.$ac_ext
5192 mkdir out
5193 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5194 # that will create temporary files in the current directory regardless of
5195 # the output directory.  Thus, making CWD read-only will cause this test
5196 # to fail, enabling locking or at least warning the user not to do parallel
5197 # builds.
5198 chmod -w .
5199 save_CFLAGS="$CFLAGS"
5200 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5201 compiler_c_o=no
5202 if { (eval echo configure:5203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5203   # The compiler can only warn and ignore the option if not recognized
5204   # So say no if there are warnings
5205   if test -s out/conftest.err; then
5206     lt_cv_compiler_c_o=no
5207   else
5208     lt_cv_compiler_c_o=yes
5209   fi
5210 else
5211   # Append any errors to the config.log.
5212   cat out/conftest.err 1>&5
5213   lt_cv_compiler_c_o=no
5214 fi
5215 CFLAGS="$save_CFLAGS"
5216 chmod u+w .
5217 $rm conftest* out/*
5218 rmdir out
5219 cd ..
5220 rmdir conftest
5221 $rm -r conftest 2>/dev/null
5222
5223 fi
5224
5225 compiler_c_o=$lt_cv_compiler_c_o
5226 echo "$ac_t""$compiler_c_o" 1>&6
5227
5228 if test x"$compiler_c_o" = x"yes"; then
5229   # Check to see if we can write to a .lo
5230   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5231 echo "configure:5232: checking if $compiler supports -c -o file.lo" >&5
5232   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5233   echo $ac_n "(cached) $ac_c" 1>&6
5234 else
5235   
5236   lt_cv_compiler_o_lo=no
5237   save_CFLAGS="$CFLAGS"
5238   CFLAGS="$CFLAGS -c -o conftest.lo"
5239   save_objext="$ac_objext"
5240   ac_objext=lo
5241   cat > conftest.$ac_ext <<EOF
5242 #line 5243 "configure"
5243 #include "confdefs.h"
5244
5245 int main() {
5246 int some_variable = 0;
5247 ; return 0; }
5248 EOF
5249 if { (eval echo configure:5250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5250   rm -rf conftest*
5251       # The compiler can only warn and ignore the option if not recognized
5252     # So say no if there are warnings
5253     if test -s conftest.err; then
5254       lt_cv_compiler_o_lo=no
5255     else
5256       lt_cv_compiler_o_lo=yes
5257     fi
5258   
5259 else
5260   echo "configure: failed program was:" >&5
5261   cat conftest.$ac_ext >&5
5262 fi
5263 rm -f conftest*
5264   ac_objext="$save_objext"
5265   CFLAGS="$save_CFLAGS"
5266   
5267 fi
5268
5269   compiler_o_lo=$lt_cv_compiler_o_lo
5270   echo "$ac_t""$compiler_o_lo" 1>&6
5271 else
5272   compiler_o_lo=no
5273 fi
5274
5275 # Check to see if we can do hard links to lock some files if needed
5276 hard_links="nottested"
5277 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5278   # do not overwrite the value of need_locks provided by the user
5279   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5280 echo "configure:5281: checking if we can lock with hard links" >&5
5281   hard_links=yes
5282   $rm conftest*
5283   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5284   touch conftest.a
5285   ln conftest.a conftest.b 2>&5 || hard_links=no
5286   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5287   echo "$ac_t""$hard_links" 1>&6
5288   if test "$hard_links" = no; then
5289     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5290     need_locks=warn
5291   fi
5292 else
5293   need_locks=no
5294 fi
5295
5296 if test "$GCC" = yes; then
5297   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5298   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5299 echo "configure:5300: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5300   echo "int some_variable = 0;" > conftest.$ac_ext
5301   save_CFLAGS="$CFLAGS"
5302   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5303   compiler_rtti_exceptions=no
5304   cat > conftest.$ac_ext <<EOF
5305 #line 5306 "configure"
5306 #include "confdefs.h"
5307
5308 int main() {
5309 int some_variable = 0;
5310 ; return 0; }
5311 EOF
5312 if { (eval echo configure:5313: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5313   rm -rf conftest*
5314       # The compiler can only warn and ignore the option if not recognized
5315     # So say no if there are warnings
5316     if test -s conftest.err; then
5317       compiler_rtti_exceptions=no
5318     else
5319       compiler_rtti_exceptions=yes
5320     fi
5321   
5322 else
5323   echo "configure: failed program was:" >&5
5324   cat conftest.$ac_ext >&5
5325 fi
5326 rm -f conftest*
5327   CFLAGS="$save_CFLAGS"
5328   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5329
5330   if test "$compiler_rtti_exceptions" = "yes"; then
5331     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5332   else
5333     no_builtin_flag=' -fno-builtin'
5334   fi
5335 fi
5336
5337 # See if the linker supports building shared libraries.
5338 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5339 echo "configure:5340: checking whether the linker ($LD) supports shared libraries" >&5
5340
5341 allow_undefined_flag=
5342 no_undefined_flag=
5343 need_lib_prefix=unknown
5344 need_version=unknown
5345 # when you set need_version to no, make sure it does not cause -set_version
5346 # flags to be left without arguments
5347 archive_cmds=
5348 archive_expsym_cmds=
5349 old_archive_from_new_cmds=
5350 old_archive_from_expsyms_cmds=
5351 export_dynamic_flag_spec=
5352 whole_archive_flag_spec=
5353 thread_safe_flag_spec=
5354 hardcode_into_libs=no
5355 hardcode_libdir_flag_spec=
5356 hardcode_libdir_separator=
5357 hardcode_direct=no
5358 hardcode_minus_L=no
5359 hardcode_shlibpath_var=unsupported
5360 runpath_var=
5361 link_all_deplibs=unknown
5362 always_export_symbols=no
5363 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5364 # include_expsyms should be a list of space-separated symbols to be *always*
5365 # included in the symbol list
5366 include_expsyms=
5367 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5368 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5369 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5370 # as well as any symbol that contains `d'.
5371 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5372 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5373 # platforms (ab)use it in PIC code, but their linkers get confused if
5374 # the symbol is explicitly referenced.  Since portable code cannot
5375 # rely on this symbol name, it's probably fine to never include it in
5376 # preloaded symbol tables.
5377 extract_expsyms_cmds=
5378
5379 case $host_os in
5380 cygwin* | mingw* | pw32*)
5381   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5382   # When not using gcc, we currently assume that we are using
5383   # Microsoft Visual C++.
5384   if test "$GCC" != yes; then
5385     with_gnu_ld=no
5386   fi
5387   ;;
5388 openbsd*)
5389   with_gnu_ld=no
5390   ;;
5391 esac
5392
5393 ld_shlibs=yes
5394 if test "$with_gnu_ld" = yes; then
5395   # If archive_cmds runs LD, not CC, wlarc should be empty
5396   wlarc='${wl}'
5397
5398   # See if GNU ld supports shared libraries.
5399   case $host_os in
5400   aix3* | aix4* | aix5*)
5401     # On AIX, the GNU linker is very broken
5402     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5403     ld_shlibs=no
5404     cat <<EOF 1>&2
5405
5406 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5407 *** to be unable to reliably create shared libraries on AIX.
5408 *** Therefore, libtool is disabling shared libraries support.  If you
5409 *** really care for shared libraries, you may want to modify your PATH
5410 *** so that a non-GNU linker is found, and then restart.
5411
5412 EOF
5413     ;;
5414
5415   amigaos*)
5416     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)'
5417     hardcode_libdir_flag_spec='-L$libdir'
5418     hardcode_minus_L=yes
5419
5420     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5421     # that the semantics of dynamic libraries on AmigaOS, at least up
5422     # to version 4, is to share data among multiple programs linked
5423     # with the same dynamic library.  Since this doesn't match the
5424     # behavior of shared libraries on other platforms, we can use
5425     # them.
5426     ld_shlibs=no
5427     ;;
5428
5429   beos*)
5430     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5431       allow_undefined_flag=unsupported
5432       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5433       # support --undefined.  This deserves some investigation.  FIXME
5434       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5435     else
5436       ld_shlibs=no
5437     fi
5438     ;;
5439
5440   cygwin* | mingw* | pw32*)
5441     # hardcode_libdir_flag_spec is actually meaningless, as there is
5442     # no search path for DLLs.
5443     hardcode_libdir_flag_spec='-L$libdir'
5444     allow_undefined_flag=unsupported
5445     always_export_symbols=yes
5446
5447     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5448       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5449       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5450       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5451       else $CC -o impgen impgen.c ; fi)~
5452       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5453
5454     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5455
5456     # cygwin and mingw dlls have different entry points and sets of symbols
5457     # to exclude.
5458     # FIXME: what about values for MSVC?
5459     dll_entry=__cygwin_dll_entry@12
5460     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5461     case $host_os in
5462     mingw*)
5463       # mingw values
5464       dll_entry=_DllMainCRTStartup@12
5465       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5466       ;;
5467     esac
5468
5469     # mingw and cygwin differ, and it's simplest to just exclude the union
5470     # of the two symbol sets.
5471     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5472
5473     # recent cygwin and mingw systems supply a stub DllMain which the user
5474     # can override, but on older systems we have to supply one (in ltdll.c)
5475     if test "x$lt_cv_need_dllmain" = "xyes"; then
5476       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5477       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~
5478         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5479     else
5480       ltdll_obj=
5481       ltdll_cmds=
5482     fi
5483
5484     # Extract the symbol export list from an `--export-all' def file,
5485     # then regenerate the def file from the symbol export list, so that
5486     # the compiled dll only exports the symbol export list.
5487     # Be careful not to strip the DATA tag left be newer dlltools.
5488     export_symbols_cmds="$ltdll_cmds"'
5489       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5490       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5491
5492     # If the export-symbols file already is a .def file (1st line
5493     # is EXPORTS), use it as is.
5494     # If DATA tags from a recent dlltool are present, honour them!
5495     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5496         cp $export_symbols $output_objdir/$soname-def;
5497       else
5498         echo EXPORTS > $output_objdir/$soname-def;
5499         _lt_hint=1;
5500         cat $export_symbols | while read symbol; do
5501          set dummy \$symbol;
5502          case \$# in
5503            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5504            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5505          esac;
5506          _lt_hint=`expr 1 + \$_lt_hint`;
5507         done;
5508       fi~
5509       '"$ltdll_cmds"'
5510       $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~
5511       $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~
5512       $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~
5513       $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~
5514       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5515     ;;
5516
5517   netbsd*)
5518     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5519       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5520       wlarc=
5521     else
5522       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5523       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5524     fi
5525     ;;
5526
5527   solaris* | sysv5*)
5528     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5529       ld_shlibs=no
5530       cat <<EOF 1>&2
5531
5532 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5533 *** create shared libraries on Solaris systems.  Therefore, libtool
5534 *** is disabling shared libraries support.  We urge you to upgrade GNU
5535 *** binutils to release 2.9.1 or newer.  Another option is to modify
5536 *** your PATH or compiler configuration so that the native linker is
5537 *** used, and then restart.
5538
5539 EOF
5540     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5541       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5542       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5543     else
5544       ld_shlibs=no
5545     fi
5546     ;;
5547
5548   sunos4*)
5549     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5550     wlarc=
5551     hardcode_direct=yes
5552     hardcode_shlibpath_var=no
5553     ;;
5554
5555   *)
5556     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5557       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5558       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5559     else
5560       ld_shlibs=no
5561     fi
5562     ;;
5563   esac
5564
5565   if test "$ld_shlibs" = yes; then
5566     runpath_var=LD_RUN_PATH
5567     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5568     export_dynamic_flag_spec='${wl}--export-dynamic'
5569     case $host_os in
5570     cygwin* | mingw* | pw32*)
5571       # dlltool doesn't understand --whole-archive et. al.
5572       whole_archive_flag_spec=
5573       ;;
5574     *)
5575       # ancient GNU ld didn't support --whole-archive et. al.
5576       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5577         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5578       else
5579         whole_archive_flag_spec=
5580       fi
5581       ;;
5582     esac
5583   fi
5584 else
5585   # PORTME fill in a description of your system's linker (not GNU ld)
5586   case $host_os in
5587   aix3*)
5588     allow_undefined_flag=unsupported
5589     always_export_symbols=yes
5590     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'
5591     # Note: this linker hardcodes the directories in LIBPATH if there
5592     # are no directories specified by -L.
5593     hardcode_minus_L=yes
5594     if test "$GCC" = yes && test -z "$link_static_flag"; then
5595       # Neither direct hardcoding nor static linking is supported with a
5596       # broken collect2.
5597       hardcode_direct=unsupported
5598     fi
5599     ;;
5600
5601   aix4* | aix5*)
5602     if test "$host_cpu" = ia64; then
5603       # On IA64, the linker does run time linking by default, so we don't
5604       # have to do anything special.
5605       aix_use_runtimelinking=no
5606       exp_sym_flag='-Bexport'
5607       no_entry_flag=""
5608     else
5609       aix_use_runtimelinking=no
5610
5611       # Test if we are trying to use run time linking or normal
5612       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5613       # need to do runtime linking.
5614       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5615         for ld_flag in $LDFLAGS; do
5616           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5617             aix_use_runtimelinking=yes
5618             break
5619           fi
5620         done
5621       esac
5622
5623       exp_sym_flag='-bexport'
5624       no_entry_flag='-bnoentry'
5625     fi
5626
5627     # When large executables or shared objects are built, AIX ld can
5628     # have problems creating the table of contents.  If linking a library
5629     # or program results in "error TOC overflow" add -mminimal-toc to
5630     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5631     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5632
5633     hardcode_direct=yes
5634     archive_cmds=''
5635     hardcode_libdir_separator=':'
5636     if test "$GCC" = yes; then
5637       case $host_os in aix4.[012]|aix4.[012].*)
5638         collect2name=`${CC} -print-prog-name=collect2`
5639         if test -f "$collect2name" && \
5640           strings "$collect2name" | grep resolve_lib_name >/dev/null
5641         then
5642           # We have reworked collect2
5643           hardcode_direct=yes
5644         else
5645           # We have old collect2
5646           hardcode_direct=unsupported
5647           # It fails to find uninstalled libraries when the uninstalled
5648           # path is not listed in the libpath.  Setting hardcode_minus_L
5649           # to unsupported forces relinking
5650           hardcode_minus_L=yes
5651           hardcode_libdir_flag_spec='-L$libdir'
5652           hardcode_libdir_separator=
5653         fi
5654       esac
5655
5656       shared_flag='-shared'
5657     else
5658       # not using gcc
5659       if test "$host_cpu" = ia64; then
5660         shared_flag='${wl}-G'
5661       else
5662         if test "$aix_use_runtimelinking" = yes; then
5663           shared_flag='${wl}-G'
5664         else
5665           shared_flag='${wl}-bM:SRE'
5666         fi
5667       fi
5668     fi
5669
5670     # It seems that -bexpall can do strange things, so it is better to
5671     # generate a list of symbols to export.
5672     always_export_symbols=yes
5673     if test "$aix_use_runtimelinking" = yes; then
5674       # Warning - without using the other runtime loading flags (-brtl),
5675       # -berok will link without error, but may produce a broken library.
5676       allow_undefined_flag='-berok'
5677       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5678       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"
5679     else
5680       if test "$host_cpu" = ia64; then
5681         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5682         allow_undefined_flag="-z nodefs"
5683         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"
5684       else
5685         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5686         # Warning - without using the other run time loading flags,
5687         # -berok will link without error, but may produce a broken library.
5688         allow_undefined_flag='${wl}-berok'
5689         # This is a bit strange, but is similar to how AIX traditionally builds
5690         # it's shared libraries.
5691         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'
5692       fi
5693     fi
5694     ;;
5695
5696   amigaos*)
5697     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)'
5698     hardcode_libdir_flag_spec='-L$libdir'
5699     hardcode_minus_L=yes
5700     # see comment about different semantics on the GNU ld section
5701     ld_shlibs=no
5702     ;;
5703
5704   cygwin* | mingw* | pw32*)
5705     # When not using gcc, we currently assume that we are using
5706     # Microsoft Visual C++.
5707     # hardcode_libdir_flag_spec is actually meaningless, as there is
5708     # no search path for DLLs.
5709     hardcode_libdir_flag_spec=' '
5710     allow_undefined_flag=unsupported
5711     # Tell ltmain to make .lib files, not .a files.
5712     libext=lib
5713     # FIXME: Setting linknames here is a bad hack.
5714     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5715     # The linker will automatically build a .lib file if we build a DLL.
5716     old_archive_from_new_cmds='true'
5717     # FIXME: Should let the user specify the lib program.
5718     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5719     fix_srcfile_path='`cygpath -w "$srcfile"`'
5720     ;;
5721
5722   darwin* | rhapsody*)
5723     case "$host_os" in
5724     rhapsody* | darwin1.[012])
5725       allow_undefined_flag='-undefined suppress'
5726       ;;
5727     *) # Darwin 1.3 on
5728       allow_undefined_flag='-flat_namespace -undefined suppress'
5729       ;;
5730     esac
5731     # FIXME: Relying on posixy $() will cause problems for
5732     #        cross-compilation, but unfortunately the echo tests do not
5733     #        yet detect zsh echo's removal of \ escapes.
5734     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'
5735     # We need to add '_' to the symbols in $export_symbols first
5736     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5737     hardcode_direct=yes
5738     hardcode_shlibpath_var=no
5739     whole_archive_flag_spec='-all_load $convenience'
5740     ;;
5741
5742   freebsd1*)
5743     ld_shlibs=no
5744     ;;
5745
5746   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5747   # support.  Future versions do this automatically, but an explicit c++rt0.o
5748   # does not break anything, and helps significantly (at the cost of a little
5749   # extra space).
5750   freebsd2.2*)
5751     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5752     hardcode_libdir_flag_spec='-R$libdir'
5753     hardcode_direct=yes
5754     hardcode_shlibpath_var=no
5755     ;;
5756
5757   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5758   freebsd2*)
5759     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5760     hardcode_direct=yes
5761     hardcode_minus_L=yes
5762     hardcode_shlibpath_var=no
5763     ;;
5764
5765   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5766   freebsd*)
5767     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5768     hardcode_libdir_flag_spec='-R$libdir'
5769     hardcode_direct=yes
5770     hardcode_shlibpath_var=no
5771     ;;
5772
5773   hpux9* | hpux10* | hpux11*)
5774     case $host_os in
5775     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' ;;
5776     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5777     esac
5778     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5779     hardcode_libdir_separator=:
5780     hardcode_direct=yes
5781     hardcode_minus_L=yes # Not in the search PATH, but as the default
5782                          # location of the library.
5783     export_dynamic_flag_spec='${wl}-E'
5784     ;;
5785
5786   irix5* | irix6*)
5787     if test "$GCC" = yes; then
5788       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'
5789     else
5790       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'
5791     fi
5792     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5793     hardcode_libdir_separator=:
5794     link_all_deplibs=yes
5795     ;;
5796
5797   netbsd*)
5798     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5799       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5800     else
5801       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5802     fi
5803     hardcode_libdir_flag_spec='-R$libdir'
5804     hardcode_direct=yes
5805     hardcode_shlibpath_var=no
5806     ;;
5807
5808   newsos6)
5809     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5810     hardcode_direct=yes
5811     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5812     hardcode_libdir_separator=:
5813     hardcode_shlibpath_var=no
5814     ;;
5815
5816   openbsd*)
5817     hardcode_direct=yes
5818     hardcode_shlibpath_var=no
5819     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5820       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5821       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5822       export_dynamic_flag_spec='${wl}-E'
5823     else
5824       case "$host_os" in
5825       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5826         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5827         hardcode_libdir_flag_spec='-R$libdir'
5828         ;;
5829       *)
5830         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5831         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5832         ;;
5833       esac
5834     fi
5835     ;;
5836
5837   os2*)
5838     hardcode_libdir_flag_spec='-L$libdir'
5839     hardcode_minus_L=yes
5840     allow_undefined_flag=unsupported
5841     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'
5842     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5843     ;;
5844
5845   osf3*)
5846     if test "$GCC" = yes; then
5847       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5848       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'
5849     else
5850       allow_undefined_flag=' -expect_unresolved \*'
5851       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'
5852     fi
5853     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5854     hardcode_libdir_separator=:
5855     ;;
5856
5857   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5858     if test "$GCC" = yes; then
5859       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5860       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'
5861       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5862     else
5863       allow_undefined_flag=' -expect_unresolved \*'
5864       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'
5865       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5866       $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'
5867
5868       #Both c and cxx compiler support -rpath directly
5869       hardcode_libdir_flag_spec='-rpath $libdir'
5870     fi
5871     hardcode_libdir_separator=:
5872     ;;
5873
5874   sco3.2v5*)
5875     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5876     hardcode_shlibpath_var=no
5877     runpath_var=LD_RUN_PATH
5878     hardcode_runpath_var=yes
5879     export_dynamic_flag_spec='${wl}-Bexport'
5880     ;;
5881
5882   solaris*)
5883     # gcc --version < 3.0 without binutils cannot create self contained
5884     # shared libraries reliably, requiring libgcc.a to resolve some of
5885     # the object symbols generated in some cases.  Libraries that use
5886     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5887     # a copy of libgcc.a into every shared library to guarantee resolving
5888     # such symbols causes other problems:  According to Tim Van Holder
5889     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5890     # (to the application) exception stack for one thing.
5891     no_undefined_flag=' -z defs'
5892     if test "$GCC" = yes; then
5893       case `$CC --version 2>/dev/null` in
5894       [12].*)
5895         cat <<EOF 1>&2
5896
5897 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5898 *** create self contained shared libraries on Solaris systems, without
5899 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5900 *** -no-undefined support, which will at least allow you to build shared
5901 *** libraries.  However, you may find that when you link such libraries
5902 *** into an application without using GCC, you have to manually add
5903 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5904 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5905 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5906
5907 EOF
5908         no_undefined_flag=
5909         ;;
5910       esac
5911     fi
5912     # $CC -shared without GNU ld will not create a library from C++
5913     # object files and a static libstdc++, better avoid it by now
5914     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5915     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5916                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5917     hardcode_libdir_flag_spec='-R$libdir'
5918     hardcode_shlibpath_var=no
5919     case $host_os in
5920     solaris2.[0-5] | solaris2.[0-5].*) ;;
5921     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5922       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5923     esac
5924     link_all_deplibs=yes
5925     ;;
5926
5927   sunos4*)
5928     if test "x$host_vendor" = xsequent; then
5929       # Use $CC to link under sequent, because it throws in some extra .o
5930       # files that make .init and .fini sections work.
5931       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5932     else
5933       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5934     fi
5935     hardcode_libdir_flag_spec='-L$libdir'
5936     hardcode_direct=yes
5937     hardcode_minus_L=yes
5938     hardcode_shlibpath_var=no
5939     ;;
5940
5941   sysv4)
5942     if test "x$host_vendor" = xsno; then
5943       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5944       hardcode_direct=yes # is this really true???
5945     else
5946       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5947       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
5948     fi
5949     runpath_var='LD_RUN_PATH'
5950     hardcode_shlibpath_var=no
5951     ;;
5952
5953   sysv4.3*)
5954     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5955     hardcode_shlibpath_var=no
5956     export_dynamic_flag_spec='-Bexport'
5957     ;;
5958
5959   sysv5*)
5960     no_undefined_flag=' -z text'
5961     # $CC -shared without GNU ld will not create a library from C++
5962     # object files and a static libstdc++, better avoid it by now
5963     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5964     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5965                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5966     hardcode_libdir_flag_spec=
5967     hardcode_shlibpath_var=no
5968     runpath_var='LD_RUN_PATH'
5969     ;;
5970
5971   uts4*)
5972     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5973     hardcode_libdir_flag_spec='-L$libdir'
5974     hardcode_shlibpath_var=no
5975     ;;
5976
5977   dgux*)
5978     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5979     hardcode_libdir_flag_spec='-L$libdir'
5980     hardcode_shlibpath_var=no
5981     ;;
5982
5983   sysv4*MP*)
5984     if test -d /usr/nec; then
5985       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5986       hardcode_shlibpath_var=no
5987       runpath_var=LD_RUN_PATH
5988       hardcode_runpath_var=yes
5989       ld_shlibs=yes
5990     fi
5991     ;;
5992
5993   sysv4.2uw2*)
5994     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
5995     hardcode_direct=yes
5996     hardcode_minus_L=no
5997     hardcode_shlibpath_var=no
5998     hardcode_runpath_var=yes
5999     runpath_var=LD_RUN_PATH
6000     ;;
6001
6002   sysv5uw7* | unixware7*)
6003     no_undefined_flag='${wl}-z ${wl}text'
6004     if test "$GCC" = yes; then
6005       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6006     else
6007       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6008     fi
6009     runpath_var='LD_RUN_PATH'
6010     hardcode_shlibpath_var=no
6011     ;;
6012
6013   *)
6014     ld_shlibs=no
6015     ;;
6016   esac
6017 fi
6018 echo "$ac_t""$ld_shlibs" 1>&6
6019 test "$ld_shlibs" = no && can_build_shared=no
6020
6021 # Check hardcoding attributes.
6022 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6023 echo "configure:6024: checking how to hardcode library paths into programs" >&5
6024 hardcode_action=
6025 if test -n "$hardcode_libdir_flag_spec" || \
6026    test -n "$runpath_var"; then
6027
6028   # We can hardcode non-existant directories.
6029   if test "$hardcode_direct" != no &&
6030      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6031      # have to relink, otherwise we might link with an installed library
6032      # when we should be linking with a yet-to-be-installed one
6033      ## test "$hardcode_shlibpath_var" != no &&
6034      test "$hardcode_minus_L" != no; then
6035     # Linking always hardcodes the temporary library directory.
6036     hardcode_action=relink
6037   else
6038     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6039     hardcode_action=immediate
6040   fi
6041 else
6042   # We cannot hardcode anything, or else we can only hardcode existing
6043   # directories.
6044   hardcode_action=unsupported
6045 fi
6046 echo "$ac_t""$hardcode_action" 1>&6
6047
6048 striplib=
6049 old_striplib=
6050 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6051 echo "configure:6052: checking whether stripping libraries is possible" >&5
6052 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6053   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6054   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6055   echo "$ac_t""yes" 1>&6
6056 else
6057   echo "$ac_t""no" 1>&6
6058 fi
6059
6060 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6061 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6062
6063 # PORTME Fill in your ld.so characteristics
6064 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6065 echo "configure:6066: checking dynamic linker characteristics" >&5
6066 library_names_spec=
6067 libname_spec='lib$name'
6068 soname_spec=
6069 postinstall_cmds=
6070 postuninstall_cmds=
6071 finish_cmds=
6072 finish_eval=
6073 shlibpath_var=
6074 shlibpath_overrides_runpath=unknown
6075 version_type=none
6076 dynamic_linker="$host_os ld.so"
6077 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6078 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6079
6080 case $host_os in
6081 aix3*)
6082   version_type=linux
6083   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6084   shlibpath_var=LIBPATH
6085
6086   # AIX has no versioning support, so we append a major version to the name.
6087   soname_spec='${libname}${release}.so$major'
6088   ;;
6089
6090 aix4* | aix5*)
6091   version_type=linux
6092   if test "$host_cpu" = ia64; then
6093     # AIX 5 supports IA64
6094     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6095     shlibpath_var=LD_LIBRARY_PATH
6096   else
6097     # With GCC up to 2.95.x, collect2 would create an import file
6098     # for dependence libraries.  The import file would start with
6099     # the line `#! .'.  This would cause the generated library to
6100     # depend on `.', always an invalid library.  This was fixed in
6101     # development snapshots of GCC prior to 3.0.
6102     case $host_os in
6103       aix4 | aix4.[01] | aix4.[01].*)
6104         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6105              echo ' yes '
6106              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6107           :
6108         else
6109           can_build_shared=no
6110         fi
6111         ;;
6112     esac
6113     # AIX (on Power*) has no versioning support, so currently we can
6114     # not hardcode correct soname into executable. Probably we can
6115     # add versioning support to collect2, so additional links can
6116     # be useful in future.
6117     if test "$aix_use_runtimelinking" = yes; then
6118       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6119       # instead of lib<name>.a to let people know that these are not
6120       # typical AIX shared libraries.
6121       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6122     else
6123       # We preserve .a as extension for shared libraries through AIX4.2
6124       # and later when we are not doing run time linking.
6125       library_names_spec='${libname}${release}.a $libname.a'
6126       soname_spec='${libname}${release}.so$major'
6127     fi
6128     shlibpath_var=LIBPATH
6129   fi
6130   ;;
6131
6132 amigaos*)
6133   library_names_spec='$libname.ixlibrary $libname.a'
6134   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6135   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'
6136   ;;
6137
6138 beos*)
6139   library_names_spec='${libname}.so'
6140   dynamic_linker="$host_os ld.so"
6141   shlibpath_var=LIBRARY_PATH
6142   ;;
6143
6144 bsdi4*)
6145   version_type=linux
6146   need_version=no
6147   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6148   soname_spec='${libname}${release}.so$major'
6149   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6150   shlibpath_var=LD_LIBRARY_PATH
6151   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6152   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6153   export_dynamic_flag_spec=-rdynamic
6154   # the default ld.so.conf also contains /usr/contrib/lib and
6155   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6156   # libtool to hard-code these into programs
6157   ;;
6158
6159 cygwin* | mingw* | pw32*)
6160   version_type=windows
6161   need_version=no
6162   need_lib_prefix=no
6163   case $GCC,$host_os in
6164   yes,cygwin*)
6165     library_names_spec='$libname.dll.a'
6166     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6167     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6168       dldir=$destdir/`dirname \$dlpath`~
6169       test -d \$dldir || mkdir -p \$dldir~
6170       $install_prog .libs/$dlname \$dldir/$dlname'
6171     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6172       dlpath=$dir/\$dldll~
6173        $rm \$dlpath'
6174     ;;
6175   yes,mingw*)
6176     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6177     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6178     ;;
6179   yes,pw32*)
6180     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6181     ;;
6182   *)
6183     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6184     ;;
6185   esac
6186   dynamic_linker='Win32 ld.exe'
6187   # FIXME: first we should search . and the directory the executable is in
6188   shlibpath_var=PATH
6189   ;;
6190
6191 darwin* | rhapsody*)
6192   dynamic_linker="$host_os dyld"
6193   version_type=darwin
6194   need_lib_prefix=no
6195   need_version=no
6196   # FIXME: Relying on posixy $() will cause problems for
6197   #        cross-compilation, but unfortunately the echo tests do not
6198   #        yet detect zsh echo's removal of \ escapes.
6199   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)'
6200   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6201   shlibpath_overrides_runpath=yes
6202   shlibpath_var=DYLD_LIBRARY_PATH
6203   ;;
6204
6205 freebsd1*)
6206   dynamic_linker=no
6207   ;;
6208
6209 freebsd*)
6210   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6211   version_type=freebsd-$objformat
6212   case $version_type in
6213     freebsd-elf*)
6214       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6215       need_version=no
6216       need_lib_prefix=no
6217       ;;
6218     freebsd-*)
6219       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6220       need_version=yes
6221       ;;
6222   esac
6223   shlibpath_var=LD_LIBRARY_PATH
6224   case $host_os in
6225   freebsd2*)
6226     shlibpath_overrides_runpath=yes
6227     ;;
6228   *)
6229     shlibpath_overrides_runpath=no
6230     hardcode_into_libs=yes
6231     ;;
6232   esac
6233   ;;
6234
6235 gnu*)
6236   version_type=linux
6237   need_lib_prefix=no
6238   need_version=no
6239   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6240   soname_spec='${libname}${release}.so$major'
6241   shlibpath_var=LD_LIBRARY_PATH
6242   hardcode_into_libs=yes
6243   ;;
6244
6245 hpux9* | hpux10* | hpux11*)
6246   # Give a soname corresponding to the major version so that dld.sl refuses to
6247   # link against other versions.
6248   dynamic_linker="$host_os dld.sl"
6249   version_type=sunos
6250   need_lib_prefix=no
6251   need_version=no
6252   shlibpath_var=SHLIB_PATH
6253   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6254   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6255   soname_spec='${libname}${release}.sl$major'
6256   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6257   postinstall_cmds='chmod 555 $lib'
6258   ;;
6259
6260 irix5* | irix6*)
6261   version_type=irix
6262   need_lib_prefix=no
6263   need_version=no
6264   soname_spec='${libname}${release}.so$major'
6265   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6266   case $host_os in
6267   irix5*)
6268     libsuff= shlibsuff=
6269     ;;
6270   *)
6271     case $LD in # libtool.m4 will add one of these switches to LD
6272     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6273     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6274     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6275     *) libsuff= shlibsuff= libmagic=never-match;;
6276     esac
6277     ;;
6278   esac
6279   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6280   shlibpath_overrides_runpath=no
6281   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6282   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6283   ;;
6284
6285 # No shared lib support for Linux oldld, aout, or coff.
6286 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6287   dynamic_linker=no
6288   ;;
6289
6290 # This must be Linux ELF.
6291 linux-gnu*)
6292   version_type=linux
6293   need_lib_prefix=no
6294   need_version=no
6295   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6296   soname_spec='${libname}${release}.so$major'
6297   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6298   shlibpath_var=LD_LIBRARY_PATH
6299   shlibpath_overrides_runpath=no
6300   # This implies no fast_install, which is unacceptable.
6301   # Some rework will be needed to allow for fast_install
6302   # before this can be enabled.
6303   hardcode_into_libs=yes
6304
6305   # We used to test for /lib/ld.so.1 and disable shared libraries on
6306   # powerpc, because MkLinux only supported shared libraries with the
6307   # GNU dynamic linker.  Since this was broken with cross compilers,
6308   # most powerpc-linux boxes support dynamic linking these days and
6309   # people can always --disable-shared, the test was removed, and we
6310   # assume the GNU/Linux dynamic linker is in use.
6311   dynamic_linker='GNU/Linux ld.so'
6312   ;;
6313
6314 netbsd*)
6315   version_type=sunos
6316   need_lib_prefix=no
6317   need_version=no
6318   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6319     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6320     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6321     dynamic_linker='NetBSD (a.out) ld.so'
6322   else
6323     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6324     soname_spec='${libname}${release}.so$major'
6325     dynamic_linker='NetBSD ld.elf_so'
6326   fi
6327   shlibpath_var=LD_LIBRARY_PATH
6328   shlibpath_overrides_runpath=yes
6329   hardcode_into_libs=yes
6330   ;;
6331
6332 newsos6)
6333   version_type=linux
6334   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6335   shlibpath_var=LD_LIBRARY_PATH
6336   shlibpath_overrides_runpath=yes
6337   ;;
6338
6339 openbsd*)
6340   version_type=sunos
6341   need_lib_prefix=no
6342   need_version=no
6343   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6344     case "$host_os" in
6345     openbsd2.[89] | openbsd2.[89].*)
6346       shlibpath_overrides_runpath=no
6347       ;;
6348     *)
6349       shlibpath_overrides_runpath=yes
6350       ;;
6351     esac
6352   else
6353     shlibpath_overrides_runpath=yes
6354   fi
6355   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6356   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6357   shlibpath_var=LD_LIBRARY_PATH
6358   ;;
6359
6360 os2*)
6361   libname_spec='$name'
6362   need_lib_prefix=no
6363   library_names_spec='$libname.dll $libname.a'
6364   dynamic_linker='OS/2 ld.exe'
6365   shlibpath_var=LIBPATH
6366   ;;
6367
6368 osf3* | osf4* | osf5*)
6369   version_type=osf
6370   need_version=no
6371   soname_spec='${libname}${release}.so'
6372   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6373   shlibpath_var=LD_LIBRARY_PATH
6374   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6375   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6376   ;;
6377
6378 sco3.2v5*)
6379   version_type=osf
6380   soname_spec='${libname}${release}.so$major'
6381   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6382   shlibpath_var=LD_LIBRARY_PATH
6383   ;;
6384
6385 solaris*)
6386   version_type=linux
6387   need_lib_prefix=no
6388   need_version=no
6389   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6390   soname_spec='${libname}${release}.so$major'
6391   shlibpath_var=LD_LIBRARY_PATH
6392   shlibpath_overrides_runpath=yes
6393   hardcode_into_libs=yes
6394   # ldd complains unless libraries are executable
6395   postinstall_cmds='chmod +x $lib'
6396   ;;
6397
6398 sunos4*)
6399   version_type=sunos
6400   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6401   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6402   shlibpath_var=LD_LIBRARY_PATH
6403   shlibpath_overrides_runpath=yes
6404   if test "$with_gnu_ld" = yes; then
6405     need_lib_prefix=no
6406   fi
6407   need_version=yes
6408   ;;
6409
6410 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6411   version_type=linux
6412   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6413   soname_spec='${libname}${release}.so$major'
6414   shlibpath_var=LD_LIBRARY_PATH
6415   case $host_vendor in
6416     sni)
6417       shlibpath_overrides_runpath=no
6418       ;;
6419     motorola)
6420       need_lib_prefix=no
6421       need_version=no
6422       shlibpath_overrides_runpath=no
6423       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6424       ;;
6425   esac
6426   ;;
6427
6428 uts4*)
6429   version_type=linux
6430   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6431   soname_spec='${libname}${release}.so$major'
6432   shlibpath_var=LD_LIBRARY_PATH
6433   ;;
6434
6435 dgux*)
6436   version_type=linux
6437   need_lib_prefix=no
6438   need_version=no
6439   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6440   soname_spec='${libname}${release}.so$major'
6441   shlibpath_var=LD_LIBRARY_PATH
6442   ;;
6443
6444 sysv4*MP*)
6445   if test -d /usr/nec ;then
6446     version_type=linux
6447     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6448     soname_spec='$libname.so.$major'
6449     shlibpath_var=LD_LIBRARY_PATH
6450   fi
6451   ;;
6452
6453 *)
6454   dynamic_linker=no
6455   ;;
6456 esac
6457 echo "$ac_t""$dynamic_linker" 1>&6
6458 test "$dynamic_linker" = no && can_build_shared=no
6459
6460 # Report the final consequences.
6461 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6462 echo "configure:6463: checking if libtool supports shared libraries" >&5
6463 echo "$ac_t""$can_build_shared" 1>&6
6464
6465 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6466 echo "configure:6467: checking whether to build shared libraries" >&5
6467 test "$can_build_shared" = "no" && enable_shared=no
6468
6469 # On AIX, shared libraries and static libraries use the same namespace, and
6470 # are all built from PIC.
6471 case "$host_os" in
6472 aix3*)
6473   test "$enable_shared" = yes && enable_static=no
6474   if test -n "$RANLIB"; then
6475     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6476     postinstall_cmds='$RANLIB $lib'
6477   fi
6478   ;;
6479
6480 aix4*)
6481   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6482     test "$enable_shared" = yes && enable_static=no
6483   fi
6484   ;;
6485 esac
6486 echo "$ac_t""$enable_shared" 1>&6
6487
6488 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6489 echo "configure:6490: checking whether to build static libraries" >&5
6490 # Make sure either enable_shared or enable_static is yes.
6491 test "$enable_shared" = yes || enable_static=yes
6492 echo "$ac_t""$enable_static" 1>&6
6493
6494 if test "$hardcode_action" = relink; then
6495   # Fast installation is not supported
6496   enable_fast_install=no
6497 elif test "$shlibpath_overrides_runpath" = yes ||
6498      test "$enable_shared" = no; then
6499   # Fast installation is not necessary
6500   enable_fast_install=needless
6501 fi
6502
6503 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6504 if test "$GCC" = yes; then
6505   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6506 fi
6507
6508 if test "x$enable_dlopen" != xyes; then
6509   enable_dlopen=unknown
6510   enable_dlopen_self=unknown
6511   enable_dlopen_self_static=unknown
6512 else
6513   lt_cv_dlopen=no
6514   lt_cv_dlopen_libs=
6515
6516   case $host_os in
6517   beos*)
6518     lt_cv_dlopen="load_add_on"
6519     lt_cv_dlopen_libs=
6520     lt_cv_dlopen_self=yes
6521     ;;
6522
6523   cygwin* | mingw* | pw32*)
6524     lt_cv_dlopen="LoadLibrary"
6525     lt_cv_dlopen_libs=
6526    ;;
6527
6528   *)
6529     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6530 echo "configure:6531: checking for shl_load" >&5
6531 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6532   echo $ac_n "(cached) $ac_c" 1>&6
6533 else
6534   cat > conftest.$ac_ext <<EOF
6535 #line 6536 "configure"
6536 #include "confdefs.h"
6537 /* System header to define __stub macros and hopefully few prototypes,
6538     which can conflict with char shl_load(); below.  */
6539 #include <assert.h>
6540 /* Override any gcc2 internal prototype to avoid an error.  */
6541 /* We use char because int might match the return type of a gcc2
6542     builtin and then its argument prototype would still apply.  */
6543 char shl_load();
6544 char (*f)();
6545
6546 int main() {
6547
6548 /* The GNU C library defines this for functions which it implements
6549     to always fail with ENOSYS.  Some functions are actually named
6550     something starting with __ and the normal name is an alias.  */
6551 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6552 choke me
6553 #else
6554 f = shl_load;
6555 #endif
6556
6557 ; return 0; }
6558 EOF
6559 if { (eval echo configure:6560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6560   rm -rf conftest*
6561   eval "ac_cv_func_shl_load=yes"
6562 else
6563   echo "configure: failed program was:" >&5
6564   cat conftest.$ac_ext >&5
6565   rm -rf conftest*
6566   eval "ac_cv_func_shl_load=no"
6567 fi
6568 rm -f conftest*
6569 fi
6570
6571 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6572   echo "$ac_t""yes" 1>&6
6573   lt_cv_dlopen="shl_load"
6574 else
6575   echo "$ac_t""no" 1>&6
6576 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6577 echo "configure:6578: checking for shl_load in -ldld" >&5
6578 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6579 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6580   echo $ac_n "(cached) $ac_c" 1>&6
6581 else
6582   ac_save_LIBS="$LIBS"
6583 LIBS="-ldld  $LIBS"
6584 cat > conftest.$ac_ext <<EOF
6585 #line 6586 "configure"
6586 #include "confdefs.h"
6587 /* Override any gcc2 internal prototype to avoid an error.  */
6588 /* We use char because int might match the return type of a gcc2
6589     builtin and then its argument prototype would still apply.  */
6590 char shl_load();
6591
6592 int main() {
6593 shl_load()
6594 ; return 0; }
6595 EOF
6596 if { (eval echo configure:6597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6597   rm -rf conftest*
6598   eval "ac_cv_lib_$ac_lib_var=yes"
6599 else
6600   echo "configure: failed program was:" >&5
6601   cat conftest.$ac_ext >&5
6602   rm -rf conftest*
6603   eval "ac_cv_lib_$ac_lib_var=no"
6604 fi
6605 rm -f conftest*
6606 LIBS="$ac_save_LIBS"
6607
6608 fi
6609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6610   echo "$ac_t""yes" 1>&6
6611   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6612 else
6613   echo "$ac_t""no" 1>&6
6614 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6615 echo "configure:6616: checking for dlopen" >&5
6616 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6617   echo $ac_n "(cached) $ac_c" 1>&6
6618 else
6619   cat > conftest.$ac_ext <<EOF
6620 #line 6621 "configure"
6621 #include "confdefs.h"
6622 /* System header to define __stub macros and hopefully few prototypes,
6623     which can conflict with char dlopen(); below.  */
6624 #include <assert.h>
6625 /* Override any gcc2 internal prototype to avoid an error.  */
6626 /* We use char because int might match the return type of a gcc2
6627     builtin and then its argument prototype would still apply.  */
6628 char dlopen();
6629 char (*f)();
6630
6631 int main() {
6632
6633 /* The GNU C library defines this for functions which it implements
6634     to always fail with ENOSYS.  Some functions are actually named
6635     something starting with __ and the normal name is an alias.  */
6636 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6637 choke me
6638 #else
6639 f = dlopen;
6640 #endif
6641
6642 ; return 0; }
6643 EOF
6644 if { (eval echo configure:6645: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6645   rm -rf conftest*
6646   eval "ac_cv_func_dlopen=yes"
6647 else
6648   echo "configure: failed program was:" >&5
6649   cat conftest.$ac_ext >&5
6650   rm -rf conftest*
6651   eval "ac_cv_func_dlopen=no"
6652 fi
6653 rm -f conftest*
6654 fi
6655
6656 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6657   echo "$ac_t""yes" 1>&6
6658   lt_cv_dlopen="dlopen"
6659 else
6660   echo "$ac_t""no" 1>&6
6661 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6662 echo "configure:6663: checking for dlopen in -ldl" >&5
6663 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6664 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6665   echo $ac_n "(cached) $ac_c" 1>&6
6666 else
6667   ac_save_LIBS="$LIBS"
6668 LIBS="-ldl  $LIBS"
6669 cat > conftest.$ac_ext <<EOF
6670 #line 6671 "configure"
6671 #include "confdefs.h"
6672 /* Override any gcc2 internal prototype to avoid an error.  */
6673 /* We use char because int might match the return type of a gcc2
6674     builtin and then its argument prototype would still apply.  */
6675 char dlopen();
6676
6677 int main() {
6678 dlopen()
6679 ; return 0; }
6680 EOF
6681 if { (eval echo configure:6682: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6682   rm -rf conftest*
6683   eval "ac_cv_lib_$ac_lib_var=yes"
6684 else
6685   echo "configure: failed program was:" >&5
6686   cat conftest.$ac_ext >&5
6687   rm -rf conftest*
6688   eval "ac_cv_lib_$ac_lib_var=no"
6689 fi
6690 rm -f conftest*
6691 LIBS="$ac_save_LIBS"
6692
6693 fi
6694 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6695   echo "$ac_t""yes" 1>&6
6696   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6697 else
6698   echo "$ac_t""no" 1>&6
6699 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6700 echo "configure:6701: checking for dlopen in -lsvld" >&5
6701 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6702 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6703   echo $ac_n "(cached) $ac_c" 1>&6
6704 else
6705   ac_save_LIBS="$LIBS"
6706 LIBS="-lsvld  $LIBS"
6707 cat > conftest.$ac_ext <<EOF
6708 #line 6709 "configure"
6709 #include "confdefs.h"
6710 /* Override any gcc2 internal prototype to avoid an error.  */
6711 /* We use char because int might match the return type of a gcc2
6712     builtin and then its argument prototype would still apply.  */
6713 char dlopen();
6714
6715 int main() {
6716 dlopen()
6717 ; return 0; }
6718 EOF
6719 if { (eval echo configure:6720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6720   rm -rf conftest*
6721   eval "ac_cv_lib_$ac_lib_var=yes"
6722 else
6723   echo "configure: failed program was:" >&5
6724   cat conftest.$ac_ext >&5
6725   rm -rf conftest*
6726   eval "ac_cv_lib_$ac_lib_var=no"
6727 fi
6728 rm -f conftest*
6729 LIBS="$ac_save_LIBS"
6730
6731 fi
6732 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6733   echo "$ac_t""yes" 1>&6
6734   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6735 else
6736   echo "$ac_t""no" 1>&6
6737 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6738 echo "configure:6739: checking for dld_link in -ldld" >&5
6739 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6740 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6741   echo $ac_n "(cached) $ac_c" 1>&6
6742 else
6743   ac_save_LIBS="$LIBS"
6744 LIBS="-ldld  $LIBS"
6745 cat > conftest.$ac_ext <<EOF
6746 #line 6747 "configure"
6747 #include "confdefs.h"
6748 /* Override any gcc2 internal prototype to avoid an error.  */
6749 /* We use char because int might match the return type of a gcc2
6750     builtin and then its argument prototype would still apply.  */
6751 char dld_link();
6752
6753 int main() {
6754 dld_link()
6755 ; return 0; }
6756 EOF
6757 if { (eval echo configure:6758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6758   rm -rf conftest*
6759   eval "ac_cv_lib_$ac_lib_var=yes"
6760 else
6761   echo "configure: failed program was:" >&5
6762   cat conftest.$ac_ext >&5
6763   rm -rf conftest*
6764   eval "ac_cv_lib_$ac_lib_var=no"
6765 fi
6766 rm -f conftest*
6767 LIBS="$ac_save_LIBS"
6768
6769 fi
6770 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6771   echo "$ac_t""yes" 1>&6
6772   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6773 else
6774   echo "$ac_t""no" 1>&6
6775 fi
6776
6777               
6778 fi
6779
6780             
6781 fi
6782
6783           
6784 fi
6785
6786         
6787 fi
6788
6789       
6790 fi
6791
6792     ;;
6793   esac
6794
6795   if test "x$lt_cv_dlopen" != xno; then
6796     enable_dlopen=yes
6797   else
6798     enable_dlopen=no
6799   fi
6800
6801   case $lt_cv_dlopen in
6802   dlopen)
6803     save_CPPFLAGS="$CPPFLAGS"
6804         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6805
6806     save_LDFLAGS="$LDFLAGS"
6807     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6808
6809     save_LIBS="$LIBS"
6810     LIBS="$lt_cv_dlopen_libs $LIBS"
6811
6812     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6813 echo "configure:6814: checking whether a program can dlopen itself" >&5
6814 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6815   echo $ac_n "(cached) $ac_c" 1>&6
6816 else
6817           if test "$cross_compiling" = yes; then :
6818   lt_cv_dlopen_self=cross
6819 else
6820     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6821   lt_status=$lt_dlunknown
6822   cat > conftest.$ac_ext <<EOF
6823 #line 6824 "configure"
6824 #include "confdefs.h"
6825
6826 #if HAVE_DLFCN_H
6827 #include <dlfcn.h>
6828 #endif
6829
6830 #include <stdio.h>
6831
6832 #ifdef RTLD_GLOBAL
6833 #  define LT_DLGLOBAL           RTLD_GLOBAL
6834 #else
6835 #  ifdef DL_GLOBAL
6836 #    define LT_DLGLOBAL         DL_GLOBAL
6837 #  else
6838 #    define LT_DLGLOBAL         0
6839 #  endif
6840 #endif
6841
6842 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6843    find out it does not work in some platform. */
6844 #ifndef LT_DLLAZY_OR_NOW
6845 #  ifdef RTLD_LAZY
6846 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6847 #  else
6848 #    ifdef DL_LAZY
6849 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6850 #    else
6851 #      ifdef RTLD_NOW
6852 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6853 #      else
6854 #        ifdef DL_NOW
6855 #          define LT_DLLAZY_OR_NOW      DL_NOW
6856 #        else
6857 #          define LT_DLLAZY_OR_NOW      0
6858 #        endif
6859 #      endif
6860 #    endif
6861 #  endif
6862 #endif
6863
6864 #ifdef __cplusplus
6865 extern "C" void exit (int);
6866 #endif
6867
6868 void fnord() { int i=42;}
6869 int main ()
6870 {
6871   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6872   int status = $lt_dlunknown;
6873
6874   if (self)
6875     {
6876       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6877       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6878       /* dlclose (self); */
6879     }
6880
6881     exit (status);
6882 }
6883 EOF
6884   if { (eval echo configure:6885: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6885     (./conftest; exit; ) 2>/dev/null
6886     lt_status=$?
6887     case x$lt_status in
6888       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6889       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6890       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6891     esac
6892   else :
6893     # compilation failed
6894     lt_cv_dlopen_self=no
6895   fi
6896 fi
6897 rm -fr conftest*
6898
6899     
6900 fi
6901
6902 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6903
6904     if test "x$lt_cv_dlopen_self" = xyes; then
6905       LDFLAGS="$LDFLAGS $link_static_flag"
6906       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6907 echo "configure:6908: checking whether a statically linked program can dlopen itself" >&5
6908 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6909   echo $ac_n "(cached) $ac_c" 1>&6
6910 else
6911           if test "$cross_compiling" = yes; then :
6912   lt_cv_dlopen_self_static=cross
6913 else
6914     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6915   lt_status=$lt_dlunknown
6916   cat > conftest.$ac_ext <<EOF
6917 #line 6918 "configure"
6918 #include "confdefs.h"
6919
6920 #if HAVE_DLFCN_H
6921 #include <dlfcn.h>
6922 #endif
6923
6924 #include <stdio.h>
6925
6926 #ifdef RTLD_GLOBAL
6927 #  define LT_DLGLOBAL           RTLD_GLOBAL
6928 #else
6929 #  ifdef DL_GLOBAL
6930 #    define LT_DLGLOBAL         DL_GLOBAL
6931 #  else
6932 #    define LT_DLGLOBAL         0
6933 #  endif
6934 #endif
6935
6936 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6937    find out it does not work in some platform. */
6938 #ifndef LT_DLLAZY_OR_NOW
6939 #  ifdef RTLD_LAZY
6940 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6941 #  else
6942 #    ifdef DL_LAZY
6943 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6944 #    else
6945 #      ifdef RTLD_NOW
6946 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6947 #      else
6948 #        ifdef DL_NOW
6949 #          define LT_DLLAZY_OR_NOW      DL_NOW
6950 #        else
6951 #          define LT_DLLAZY_OR_NOW      0
6952 #        endif
6953 #      endif
6954 #    endif
6955 #  endif
6956 #endif
6957
6958 #ifdef __cplusplus
6959 extern "C" void exit (int);
6960 #endif
6961
6962 void fnord() { int i=42;}
6963 int main ()
6964 {
6965   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6966   int status = $lt_dlunknown;
6967
6968   if (self)
6969     {
6970       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6971       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6972       /* dlclose (self); */
6973     }
6974
6975     exit (status);
6976 }
6977 EOF
6978   if { (eval echo configure:6979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6979     (./conftest; exit; ) 2>/dev/null
6980     lt_status=$?
6981     case x$lt_status in
6982       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
6983       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
6984       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
6985     esac
6986   else :
6987     # compilation failed
6988     lt_cv_dlopen_self_static=no
6989   fi
6990 fi
6991 rm -fr conftest*
6992
6993       
6994 fi
6995
6996 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
6997     fi
6998
6999     CPPFLAGS="$save_CPPFLAGS"
7000     LDFLAGS="$save_LDFLAGS"
7001     LIBS="$save_LIBS"
7002     ;;
7003   esac
7004
7005   case $lt_cv_dlopen_self in
7006   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7007   *) enable_dlopen_self=unknown ;;
7008   esac
7009
7010   case $lt_cv_dlopen_self_static in
7011   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7012   *) enable_dlopen_self_static=unknown ;;
7013   esac
7014 fi
7015
7016
7017 if test "$enable_shared" = yes && test "$GCC" = yes; then
7018   case $archive_cmds in
7019   *'~'*)
7020     # FIXME: we may have to deal with multi-command sequences.
7021     ;;
7022   '$CC '*)
7023     # Test whether the compiler implicitly links with -lc since on some
7024     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7025     # to ld, don't add -lc before -lgcc.
7026     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7027 echo "configure:7028: checking whether -lc should be explicitly linked in" >&5
7028     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7029   echo $ac_n "(cached) $ac_c" 1>&6
7030 else
7031   $rm conftest*
7032     echo 'static int dummy;' > conftest.$ac_ext
7033
7034     if { (eval echo configure:7035: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7035       soname=conftest
7036       lib=conftest
7037       libobjs=conftest.$ac_objext
7038       deplibs=
7039       wl=$lt_cv_prog_cc_wl
7040       compiler_flags=-v
7041       linker_flags=-v
7042       verstring=
7043       output_objdir=.
7044       libname=conftest
7045       save_allow_undefined_flag=$allow_undefined_flag
7046       allow_undefined_flag=
7047       if { (eval echo configure:7048: \"$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; }
7048       then
7049         lt_cv_archive_cmds_need_lc=no
7050       else
7051         lt_cv_archive_cmds_need_lc=yes
7052       fi
7053       allow_undefined_flag=$save_allow_undefined_flag
7054     else
7055       cat conftest.err 1>&5
7056     fi
7057 fi
7058
7059     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7060     ;;
7061   esac
7062 fi
7063 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7064
7065 # The second clause should only fire when bootstrapping the
7066 # libtool distribution, otherwise you forgot to ship ltmain.sh
7067 # with your package, and you will get complaints that there are
7068 # no rules to generate ltmain.sh.
7069 if test -f "$ltmain"; then
7070   :
7071 else
7072   # If there is no Makefile yet, we rely on a make rule to execute
7073   # `config.status --recheck' to rerun these tests and create the
7074   # libtool script then.
7075   test -f Makefile && make "$ltmain"
7076 fi
7077
7078 if test -f "$ltmain"; then
7079   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7080   $rm -f "${ofile}T"
7081
7082   echo creating $ofile
7083
7084   # Now quote all the things that may contain metacharacters while being
7085   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7086   # variables and quote the copies for generation of the libtool script.
7087   for var in echo old_CC old_CFLAGS \
7088     AR AR_FLAGS CC LD LN_S NM SHELL \
7089     reload_flag reload_cmds wl \
7090     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7091     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7092     library_names_spec soname_spec \
7093     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7094     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7095     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7096     old_striplib striplib file_magic_cmd export_symbols_cmds \
7097     deplibs_check_method allow_undefined_flag no_undefined_flag \
7098     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7099     global_symbol_to_c_name_address \
7100     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7101     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7102     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7103
7104     case $var in
7105     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7106     old_postinstall_cmds | old_postuninstall_cmds | \
7107     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7108     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7109     postinstall_cmds | postuninstall_cmds | \
7110     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7111       # Double-quote double-evaled strings.
7112       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7113       ;;
7114     *)
7115       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7116       ;;
7117     esac
7118   done
7119
7120   cat <<__EOF__ > "${ofile}T"
7121 #! $SHELL
7122
7123 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7124 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7125 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7126 #
7127 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7128 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7129 #
7130 # This program is free software; you can redistribute it and/or modify
7131 # it under the terms of the GNU General Public License as published by
7132 # the Free Software Foundation; either version 2 of the License, or
7133 # (at your option) any later version.
7134 #
7135 # This program is distributed in the hope that it will be useful, but
7136 # WITHOUT ANY WARRANTY; without even the implied warranty of
7137 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7138 # General Public License for more details.
7139 #
7140 # You should have received a copy of the GNU General Public License
7141 # along with this program; if not, write to the Free Software
7142 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7143 #
7144 # As a special exception to the GNU General Public License, if you
7145 # distribute this file as part of a program that contains a
7146 # configuration script generated by Autoconf, you may include it under
7147 # the same distribution terms that you use for the rest of that program.
7148
7149 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7150 Xsed="sed -e s/^X//"
7151
7152 # The HP-UX ksh and POSIX shell print the target directory to stdout
7153 # if CDPATH is set.
7154 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7155
7156 # ### BEGIN LIBTOOL CONFIG
7157
7158 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7159
7160 # Shell to use when invoking shell scripts.
7161 SHELL=$lt_SHELL
7162
7163 # Whether or not to build shared libraries.
7164 build_libtool_libs=$enable_shared
7165
7166 # Whether or not to build static libraries.
7167 build_old_libs=$enable_static
7168
7169 # Whether or not to add -lc for building shared libraries.
7170 build_libtool_need_lc=$need_lc
7171
7172 # Whether or not to optimize for fast installation.
7173 fast_install=$enable_fast_install
7174
7175 # The host system.
7176 host_alias=$host_alias
7177 host=$host
7178
7179 # An echo program that does not interpret backslashes.
7180 echo=$lt_echo
7181
7182 # The archiver.
7183 AR=$lt_AR
7184 AR_FLAGS=$lt_AR_FLAGS
7185
7186 # The default C compiler.
7187 CC=$lt_CC
7188
7189 # Is the compiler the GNU C compiler?
7190 with_gcc=$GCC
7191
7192 # The linker used to build libraries.
7193 LD=$lt_LD
7194
7195 # Whether we need hard or soft links.
7196 LN_S=$lt_LN_S
7197
7198 # A BSD-compatible nm program.
7199 NM=$lt_NM
7200
7201 # A symbol stripping program
7202 STRIP=$STRIP
7203
7204 # Used to examine libraries when file_magic_cmd begins "file"
7205 MAGIC_CMD=$MAGIC_CMD
7206
7207 # Used on cygwin: DLL creation program.
7208 DLLTOOL="$DLLTOOL"
7209
7210 # Used on cygwin: object dumper.
7211 OBJDUMP="$OBJDUMP"
7212
7213 # Used on cygwin: assembler.
7214 AS="$AS"
7215
7216 # The name of the directory that contains temporary libtool files.
7217 objdir=$objdir
7218
7219 # How to create reloadable object files.
7220 reload_flag=$lt_reload_flag
7221 reload_cmds=$lt_reload_cmds
7222
7223 # How to pass a linker flag through the compiler.
7224 wl=$lt_wl
7225
7226 # Object file suffix (normally "o").
7227 objext="$ac_objext"
7228
7229 # Old archive suffix (normally "a").
7230 libext="$libext"
7231
7232 # Executable file suffix (normally "").
7233 exeext="$exeext"
7234
7235 # Additional compiler flags for building library objects.
7236 pic_flag=$lt_pic_flag
7237 pic_mode=$pic_mode
7238
7239 # Does compiler simultaneously support -c and -o options?
7240 compiler_c_o=$lt_compiler_c_o
7241
7242 # Can we write directly to a .lo ?
7243 compiler_o_lo=$lt_compiler_o_lo
7244
7245 # Must we lock files when doing compilation ?
7246 need_locks=$lt_need_locks
7247
7248 # Do we need the lib prefix for modules?
7249 need_lib_prefix=$need_lib_prefix
7250
7251 # Do we need a version for libraries?
7252 need_version=$need_version
7253
7254 # Whether dlopen is supported.
7255 dlopen_support=$enable_dlopen
7256
7257 # Whether dlopen of programs is supported.
7258 dlopen_self=$enable_dlopen_self
7259
7260 # Whether dlopen of statically linked programs is supported.
7261 dlopen_self_static=$enable_dlopen_self_static
7262
7263 # Compiler flag to prevent dynamic linking.
7264 link_static_flag=$lt_link_static_flag
7265
7266 # Compiler flag to turn off builtin functions.
7267 no_builtin_flag=$lt_no_builtin_flag
7268
7269 # Compiler flag to allow reflexive dlopens.
7270 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7271
7272 # Compiler flag to generate shared objects directly from archives.
7273 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7274
7275 # Compiler flag to generate thread-safe objects.
7276 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7277
7278 # Library versioning type.
7279 version_type=$version_type
7280
7281 # Format of library name prefix.
7282 libname_spec=$lt_libname_spec
7283
7284 # List of archive names.  First name is the real one, the rest are links.
7285 # The last name is the one that the linker finds with -lNAME.
7286 library_names_spec=$lt_library_names_spec
7287
7288 # The coded name of the library, if different from the real name.
7289 soname_spec=$lt_soname_spec
7290
7291 # Commands used to build and install an old-style archive.
7292 RANLIB=$lt_RANLIB
7293 old_archive_cmds=$lt_old_archive_cmds
7294 old_postinstall_cmds=$lt_old_postinstall_cmds
7295 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7296
7297 # Create an old-style archive from a shared archive.
7298 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7299
7300 # Create a temporary old-style archive to link instead of a shared archive.
7301 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7302
7303 # Commands used to build and install a shared archive.
7304 archive_cmds=$lt_archive_cmds
7305 archive_expsym_cmds=$lt_archive_expsym_cmds
7306 postinstall_cmds=$lt_postinstall_cmds
7307 postuninstall_cmds=$lt_postuninstall_cmds
7308
7309 # Commands to strip libraries.
7310 old_striplib=$lt_old_striplib
7311 striplib=$lt_striplib
7312
7313 # Method to check whether dependent libraries are shared objects.
7314 deplibs_check_method=$lt_deplibs_check_method
7315
7316 # Command to use when deplibs_check_method == file_magic.
7317 file_magic_cmd=$lt_file_magic_cmd
7318
7319 # Flag that allows shared libraries with undefined symbols to be built.
7320 allow_undefined_flag=$lt_allow_undefined_flag
7321
7322 # Flag that forces no undefined symbols.
7323 no_undefined_flag=$lt_no_undefined_flag
7324
7325 # Commands used to finish a libtool library installation in a directory.
7326 finish_cmds=$lt_finish_cmds
7327
7328 # Same as above, but a single script fragment to be evaled but not shown.
7329 finish_eval=$lt_finish_eval
7330
7331 # Take the output of nm and produce a listing of raw symbols and C names.
7332 global_symbol_pipe=$lt_global_symbol_pipe
7333
7334 # Transform the output of nm in a proper C declaration
7335 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7336
7337 # Transform the output of nm in a C name address pair
7338 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7339
7340 # This is the shared library runtime path variable.
7341 runpath_var=$runpath_var
7342
7343 # This is the shared library path variable.
7344 shlibpath_var=$shlibpath_var
7345
7346 # Is shlibpath searched before the hard-coded library search path?
7347 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7348
7349 # How to hardcode a shared library path into an executable.
7350 hardcode_action=$hardcode_action
7351
7352 # Whether we should hardcode library paths into libraries.
7353 hardcode_into_libs=$hardcode_into_libs
7354
7355 # Flag to hardcode \$libdir into a binary during linking.
7356 # This must work even if \$libdir does not exist.
7357 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7358
7359 # Whether we need a single -rpath flag with a separated argument.
7360 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7361
7362 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7363 # resulting binary.
7364 hardcode_direct=$hardcode_direct
7365
7366 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7367 # resulting binary.
7368 hardcode_minus_L=$hardcode_minus_L
7369
7370 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7371 # the resulting binary.
7372 hardcode_shlibpath_var=$hardcode_shlibpath_var
7373
7374 # Variables whose values should be saved in libtool wrapper scripts and
7375 # restored at relink time.
7376 variables_saved_for_relink="$variables_saved_for_relink"
7377
7378 # Whether libtool must link a program against all its dependency libraries.
7379 link_all_deplibs=$link_all_deplibs
7380
7381 # Compile-time system search path for libraries
7382 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7383
7384 # Run-time system search path for libraries
7385 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7386
7387 # Fix the shell variable \$srcfile for the compiler.
7388 fix_srcfile_path="$fix_srcfile_path"
7389
7390 # Set to yes if exported symbols are required.
7391 always_export_symbols=$always_export_symbols
7392
7393 # The commands to list exported symbols.
7394 export_symbols_cmds=$lt_export_symbols_cmds
7395
7396 # The commands to extract the exported symbol list from a shared archive.
7397 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7398
7399 # Symbols that should not be listed in the preloaded symbols.
7400 exclude_expsyms=$lt_exclude_expsyms
7401
7402 # Symbols that must always be exported.
7403 include_expsyms=$lt_include_expsyms
7404
7405 # ### END LIBTOOL CONFIG
7406
7407 __EOF__
7408
7409   case $host_os in
7410   aix3*)
7411     cat <<\EOF >> "${ofile}T"
7412
7413 # AIX sometimes has problems with the GCC collect2 program.  For some
7414 # reason, if we set the COLLECT_NAMES environment variable, the problems
7415 # vanish in a puff of smoke.
7416 if test "X${COLLECT_NAMES+set}" != Xset; then
7417   COLLECT_NAMES=
7418   export COLLECT_NAMES
7419 fi
7420 EOF
7421     ;;
7422   esac
7423
7424   case $host_os in
7425   cygwin* | mingw* | pw32* | os2*)
7426     cat <<'EOF' >> "${ofile}T"
7427       # This is a source program that is used to create dlls on Windows
7428       # Don't remove nor modify the starting and closing comments
7429 # /* ltdll.c starts here */
7430 # #define WIN32_LEAN_AND_MEAN
7431 # #include <windows.h>
7432 # #undef WIN32_LEAN_AND_MEAN
7433 # #include <stdio.h>
7434 #
7435 # #ifndef __CYGWIN__
7436 # #  ifdef __CYGWIN32__
7437 # #    define __CYGWIN__ __CYGWIN32__
7438 # #  endif
7439 # #endif
7440 #
7441 # #ifdef __cplusplus
7442 # extern "C" {
7443 # #endif
7444 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7445 # #ifdef __cplusplus
7446 # }
7447 # #endif
7448 #
7449 # #ifdef __CYGWIN__
7450 # #include <cygwin/cygwin_dll.h>
7451 # DECLARE_CYGWIN_DLL( DllMain );
7452 # #endif
7453 # HINSTANCE __hDllInstance_base;
7454 #
7455 # BOOL APIENTRY
7456 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7457 # {
7458 #   __hDllInstance_base = hInst;
7459 #   return TRUE;
7460 # }
7461 # /* ltdll.c ends here */
7462         # This is a source program that is used to create import libraries
7463         # on Windows for dlls which lack them. Don't remove nor modify the
7464         # starting and closing comments
7465 # /* impgen.c starts here */
7466 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7467 #
7468 #  This file is part of GNU libtool.
7469 #
7470 #  This program is free software; you can redistribute it and/or modify
7471 #  it under the terms of the GNU General Public License as published by
7472 #  the Free Software Foundation; either version 2 of the License, or
7473 #  (at your option) any later version.
7474 #
7475 #  This program is distributed in the hope that it will be useful,
7476 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7477 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7478 #  GNU General Public License for more details.
7479 #
7480 #  You should have received a copy of the GNU General Public License
7481 #  along with this program; if not, write to the Free Software
7482 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7483 #  */
7484 #
7485 # #include <stdio.h>            /* for printf() */
7486 # #include <unistd.h>           /* for open(), lseek(), read() */
7487 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7488 # #include <string.h>           /* for strdup() */
7489 #
7490 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7491 # #ifndef O_BINARY
7492 # #define O_BINARY 0
7493 # #endif
7494 #
7495 # static unsigned int
7496 # pe_get16 (fd, offset)
7497 #      int fd;
7498 #      int offset;
7499 # {
7500 #   unsigned char b[2];
7501 #   lseek (fd, offset, SEEK_SET);
7502 #   read (fd, b, 2);
7503 #   return b[0] + (b[1]<<8);
7504 # }
7505 #
7506 # static unsigned int
7507 # pe_get32 (fd, offset)
7508 #     int fd;
7509 #     int offset;
7510 # {
7511 #   unsigned char b[4];
7512 #   lseek (fd, offset, SEEK_SET);
7513 #   read (fd, b, 4);
7514 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7515 # }
7516 #
7517 # static unsigned int
7518 # pe_as32 (ptr)
7519 #      void *ptr;
7520 # {
7521 #   unsigned char *b = ptr;
7522 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7523 # }
7524 #
7525 # int
7526 # main (argc, argv)
7527 #     int argc;
7528 #     char *argv[];
7529 # {
7530 #     int dll;
7531 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7532 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7533 #     unsigned long name_rvas, nexp;
7534 #     unsigned char *expdata, *erva;
7535 #     char *filename, *dll_name;
7536 #
7537 #     filename = argv[1];
7538 #
7539 #     dll = open(filename, O_RDONLY|O_BINARY);
7540 #     if (dll < 1)
7541 #       return 1;
7542 #
7543 #     dll_name = filename;
7544 #
7545 #     for (i=0; filename[i]; i++)
7546 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7547 #           dll_name = filename + i +1;
7548 #
7549 #     pe_header_offset = pe_get32 (dll, 0x3c);
7550 #     opthdr_ofs = pe_header_offset + 4 + 20;
7551 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7552 #
7553 #     if (num_entries < 1) /* no exports */
7554 #       return 1;
7555 #
7556 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7557 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7558 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7559 #     secptr = (pe_header_offset + 4 + 20 +
7560 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7561 #
7562 #     expptr = 0;
7563 #     for (i = 0; i < nsections; i++)
7564 #     {
7565 #       char sname[8];
7566 #       unsigned long secptr1 = secptr + 40 * i;
7567 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7568 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7569 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7570 #       lseek(dll, secptr1, SEEK_SET);
7571 #       read(dll, sname, 8);
7572 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7573 #       {
7574 #           expptr = fptr + (export_rva - vaddr);
7575 #           if (export_rva + export_size > vaddr + vsize)
7576 #               export_size = vsize - (export_rva - vaddr);
7577 #           break;
7578 #       }
7579 #     }
7580 #
7581 #     expdata = (unsigned char*)malloc(export_size);
7582 #     lseek (dll, expptr, SEEK_SET);
7583 #     read (dll, expdata, export_size);
7584 #     erva = expdata - export_rva;
7585 #
7586 #     nexp = pe_as32 (expdata+24);
7587 #     name_rvas = pe_as32 (expdata+32);
7588 #
7589 #     printf ("EXPORTS\n");
7590 #     for (i = 0; i<nexp; i++)
7591 #     {
7592 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7593 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7594 #     }
7595 #
7596 #     return 0;
7597 # }
7598 # /* impgen.c ends here */
7599
7600 EOF
7601     ;;
7602   esac
7603
7604   # We use sed instead of cat because bash on DJGPP gets confused if
7605   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7606   # text mode, it properly converts lines to CR/LF.  This bash problem
7607   # is reportedly fixed, but why not run on old versions too?
7608   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7609
7610   mv -f "${ofile}T" "$ofile" || \
7611     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7612   chmod +x "$ofile"
7613 fi
7614
7615
7616
7617
7618
7619 # This can be used to rebuild libtool when needed
7620 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7621
7622 # Always use our own libtool.
7623 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7624
7625 # Prevent multiple expansion
7626
7627
7628
7629 for ac_prog in mawk gawk nawk awk
7630 do
7631 # Extract the first word of "$ac_prog", so it can be a program name with args.
7632 set dummy $ac_prog; ac_word=$2
7633 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7634 echo "configure:7635: checking for $ac_word" >&5
7635 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7636   echo $ac_n "(cached) $ac_c" 1>&6
7637 else
7638   if test -n "$AWK"; then
7639   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7640 else
7641   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7642   ac_dummy="$PATH"
7643   for ac_dir in $ac_dummy; do
7644     test -z "$ac_dir" && ac_dir=.
7645     if test -f $ac_dir/$ac_word; then
7646       ac_cv_prog_AWK="$ac_prog"
7647       break
7648     fi
7649   done
7650   IFS="$ac_save_ifs"
7651 fi
7652 fi
7653 AWK="$ac_cv_prog_AWK"
7654 if test -n "$AWK"; then
7655   echo "$ac_t""$AWK" 1>&6
7656 else
7657   echo "$ac_t""no" 1>&6
7658 fi
7659
7660 test -n "$AWK" && break
7661 done
7662
7663
7664 # Extract the first word of "sendmail", so it can be a program name with args.
7665 set dummy sendmail; ac_word=$2
7666 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7667 echo "configure:7668: checking for $ac_word" >&5
7668 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7669   echo $ac_n "(cached) $ac_c" 1>&6
7670 else
7671   case "$SENDMAIL" in
7672   /*)
7673   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7674   ;;
7675   ?:/*)
7676   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7677   ;;
7678   *)
7679   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7680   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7681   for ac_dir in $ac_dummy; do 
7682     test -z "$ac_dir" && ac_dir=.
7683     if test -f $ac_dir/$ac_word; then
7684       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7685       break
7686     fi
7687   done
7688   IFS="$ac_save_ifs"
7689   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7690   ;;
7691 esac
7692 fi
7693 SENDMAIL="$ac_cv_path_SENDMAIL"
7694 if test -n "$SENDMAIL"; then
7695   echo "$ac_t""$SENDMAIL" 1>&6
7696 else
7697   echo "$ac_t""no" 1>&6
7698 fi
7699
7700 # Extract the first word of "vi", so it can be a program name with args.
7701 set dummy vi; ac_word=$2
7702 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7703 echo "configure:7704: checking for $ac_word" >&5
7704 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7705   echo $ac_n "(cached) $ac_c" 1>&6
7706 else
7707   case "$EDITOR" in
7708   /*)
7709   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7710   ;;
7711   ?:/*)
7712   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7713   ;;
7714   *)
7715   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7716   ac_dummy="$PATH:/usr/ucb"
7717   for ac_dir in $ac_dummy; do 
7718     test -z "$ac_dir" && ac_dir=.
7719     if test -f $ac_dir/$ac_word; then
7720       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7721       break
7722     fi
7723   done
7724   IFS="$ac_save_ifs"
7725   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7726   ;;
7727 esac
7728 fi
7729 EDITOR="$ac_cv_path_EDITOR"
7730 if test -n "$EDITOR"; then
7731   echo "$ac_t""$EDITOR" 1>&6
7732 else
7733   echo "$ac_t""no" 1>&6
7734 fi
7735
7736 # Extract the first word of "finger", so it can be a program name with args.
7737 set dummy finger; ac_word=$2
7738 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7739 echo "configure:7740: checking for $ac_word" >&5
7740 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
7741   echo $ac_n "(cached) $ac_c" 1>&6
7742 else
7743   case "$FINGER" in
7744   /*)
7745   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
7746   ;;
7747   ?:/*)
7748   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
7749   ;;
7750   *)
7751   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7752   ac_dummy="$PATH:/usr/ucb"
7753   for ac_dir in $ac_dummy; do 
7754     test -z "$ac_dir" && ac_dir=.
7755     if test -f $ac_dir/$ac_word; then
7756       ac_cv_path_FINGER="$ac_dir/$ac_word"
7757       break
7758     fi
7759   done
7760   IFS="$ac_save_ifs"
7761   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
7762   ;;
7763 esac
7764 fi
7765 FINGER="$ac_cv_path_FINGER"
7766 if test -n "$FINGER"; then
7767   echo "$ac_t""$FINGER" 1>&6
7768 else
7769   echo "$ac_t""no" 1>&6
7770 fi
7771
7772
7773 ol_link_perl=no
7774 if test $ol_enable_perl != no ; then
7775         # Extract the first word of "perl", so it can be a program name with args.
7776 set dummy perl; ac_word=$2
7777 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7778 echo "configure:7779: checking for $ac_word" >&5
7779 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7780   echo $ac_n "(cached) $ac_c" 1>&6
7781 else
7782   case "$PERLBIN" in
7783   /*)
7784   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7785   ;;
7786   ?:/*)
7787   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7788   ;;
7789   *)
7790   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7791   ac_dummy="$PATH"
7792   for ac_dir in $ac_dummy; do 
7793     test -z "$ac_dir" && ac_dir=.
7794     if test -f $ac_dir/$ac_word; then
7795       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7796       break
7797     fi
7798   done
7799   IFS="$ac_save_ifs"
7800   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7801   ;;
7802 esac
7803 fi
7804 PERLBIN="$ac_cv_path_PERLBIN"
7805 if test -n "$PERLBIN"; then
7806   echo "$ac_t""$PERLBIN" 1>&6
7807 else
7808   echo "$ac_t""no" 1>&6
7809 fi
7810
7811
7812         if test "no$PERLBIN" = "no" ; then
7813                 if test $ol_enable_perl = yes ; then
7814                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7815                 fi
7816
7817         else
7818                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7819                 if test x"$ol_with_perl_module" = "xstatic" ; then
7820                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7821                 else
7822                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7823                 fi
7824                                 ol_link_perl=yes
7825         fi
7826 fi
7827
7828 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7829 echo "configure:7830: checking how to run the C preprocessor" >&5
7830 # On Suns, sometimes $CPP names a directory.
7831 if test -n "$CPP" && test -d "$CPP"; then
7832   CPP=
7833 fi
7834 if test -z "$CPP"; then
7835 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7836   echo $ac_n "(cached) $ac_c" 1>&6
7837 else
7838     # This must be in double quotes, not single quotes, because CPP may get
7839   # substituted into the Makefile and "${CC-cc}" will confuse make.
7840   CPP="${CC-cc} -E"
7841   # On the NeXT, cc -E runs the code through the compiler's parser,
7842   # not just through cpp.
7843   cat > conftest.$ac_ext <<EOF
7844 #line 7845 "configure"
7845 #include "confdefs.h"
7846 #include <assert.h>
7847 Syntax Error
7848 EOF
7849 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7850 { (eval echo configure:7851: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7851 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7852 if test -z "$ac_err"; then
7853   :
7854 else
7855   echo "$ac_err" >&5
7856   echo "configure: failed program was:" >&5
7857   cat conftest.$ac_ext >&5
7858   rm -rf conftest*
7859   CPP="${CC-cc} -E -traditional-cpp"
7860   cat > conftest.$ac_ext <<EOF
7861 #line 7862 "configure"
7862 #include "confdefs.h"
7863 #include <assert.h>
7864 Syntax Error
7865 EOF
7866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7867 { (eval echo configure:7868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7869 if test -z "$ac_err"; then
7870   :
7871 else
7872   echo "$ac_err" >&5
7873   echo "configure: failed program was:" >&5
7874   cat conftest.$ac_ext >&5
7875   rm -rf conftest*
7876   CPP="${CC-cc} -nologo -E"
7877   cat > conftest.$ac_ext <<EOF
7878 #line 7879 "configure"
7879 #include "confdefs.h"
7880 #include <assert.h>
7881 Syntax Error
7882 EOF
7883 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7884 { (eval echo configure:7885: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7885 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7886 if test -z "$ac_err"; then
7887   :
7888 else
7889   echo "$ac_err" >&5
7890   echo "configure: failed program was:" >&5
7891   cat conftest.$ac_ext >&5
7892   rm -rf conftest*
7893   CPP=/lib/cpp
7894 fi
7895 rm -f conftest*
7896 fi
7897 rm -f conftest*
7898 fi
7899 rm -f conftest*
7900   ac_cv_prog_CPP="$CPP"
7901 fi
7902   CPP="$ac_cv_prog_CPP"
7903 else
7904   ac_cv_prog_CPP="$CPP"
7905 fi
7906 echo "$ac_t""$CPP" 1>&6
7907
7908
7909 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7910         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7911
7912 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7913         echo "configure: warning: programs compiled here do run here..." 1>&2
7914         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7915
7916 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7917         echo "configure: warning: programs compiled here do not run here..." 1>&2
7918         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7919 fi
7920
7921
7922 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7923 echo "configure:7924: checking for Cygwin environment" >&5
7924 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7925   echo $ac_n "(cached) $ac_c" 1>&6
7926 else
7927   cat > conftest.$ac_ext <<EOF
7928 #line 7929 "configure"
7929 #include "confdefs.h"
7930
7931 int main() {
7932
7933 #ifndef __CYGWIN__
7934 #define __CYGWIN__ __CYGWIN32__
7935 #endif
7936 return __CYGWIN__;
7937 ; return 0; }
7938 EOF
7939 if { (eval echo configure:7940: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7940   rm -rf conftest*
7941   ac_cv_cygwin=yes
7942 else
7943   echo "configure: failed program was:" >&5
7944   cat conftest.$ac_ext >&5
7945   rm -rf conftest*
7946   ac_cv_cygwin=no
7947 fi
7948 rm -f conftest*
7949 fi
7950
7951 echo "$ac_t""$ac_cv_cygwin" 1>&6
7952 CYGWIN=
7953 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7954 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
7955 echo "configure:7956: checking for mingw32 environment" >&5
7956 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
7957   echo $ac_n "(cached) $ac_c" 1>&6
7958 else
7959   cat > conftest.$ac_ext <<EOF
7960 #line 7961 "configure"
7961 #include "confdefs.h"
7962
7963 int main() {
7964 return __MINGW32__;
7965 ; return 0; }
7966 EOF
7967 if { (eval echo configure:7968: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7968   rm -rf conftest*
7969   ac_cv_mingw32=yes
7970 else
7971   echo "configure: failed program was:" >&5
7972   cat conftest.$ac_ext >&5
7973   rm -rf conftest*
7974   ac_cv_mingw32=no
7975 fi
7976 rm -f conftest*
7977 fi
7978
7979 echo "$ac_t""$ac_cv_mingw32" 1>&6
7980 MINGW32=
7981 test "$ac_cv_mingw32" = yes && MINGW32=yes
7982
7983
7984
7985 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
7986 echo "configure:7987: checking for executable suffix" >&5
7987 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
7988   echo $ac_n "(cached) $ac_c" 1>&6
7989 else
7990   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
7991   ac_cv_exeext=.exe
7992 else
7993   rm -f conftest*
7994   echo 'int main () { return 0; }' > conftest.$ac_ext
7995   ac_cv_exeext=
7996   if { (eval echo configure:7997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
7997     for file in conftest.*; do
7998       case $file in
7999       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8000       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8001       esac
8002     done
8003   else
8004     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8005   fi
8006   rm -f conftest*
8007   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8008 fi
8009 fi
8010
8011 EXEEXT=""
8012 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8013 echo "$ac_t""${ac_cv_exeext}" 1>&6
8014 ac_exeext=$EXEEXT
8015
8016 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8017 echo "configure:8018: checking for object suffix" >&5
8018 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8019   echo $ac_n "(cached) $ac_c" 1>&6
8020 else
8021   rm -f conftest*
8022 echo 'int i = 1;' > conftest.$ac_ext
8023 if { (eval echo configure:8024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8024   for ac_file in conftest.*; do
8025     case $ac_file in
8026     *.c) ;;
8027     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8028     esac
8029   done
8030 else
8031   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8032 fi
8033 rm -f conftest*
8034 fi
8035
8036 echo "$ac_t""$ac_cv_objext" 1>&6
8037 OBJEXT=$ac_cv_objext
8038 ac_objext=$ac_cv_objext
8039
8040
8041 cat >> confdefs.h <<EOF
8042 #define EXEEXT "${EXEEXT}"
8043 EOF
8044
8045
8046 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8047 echo "configure:8048: checking for be_app in -lbe" >&5
8048 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8049 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8050   echo $ac_n "(cached) $ac_c" 1>&6
8051 else
8052   ac_save_LIBS="$LIBS"
8053 LIBS="-lbe -lroot -lnet $LIBS"
8054 cat > conftest.$ac_ext <<EOF
8055 #line 8056 "configure"
8056 #include "confdefs.h"
8057 /* Override any gcc2 internal prototype to avoid an error.  */
8058 /* We use char because int might match the return type of a gcc2
8059     builtin and then its argument prototype would still apply.  */
8060 char be_app();
8061
8062 int main() {
8063 be_app()
8064 ; return 0; }
8065 EOF
8066 if { (eval echo configure:8067: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8067   rm -rf conftest*
8068   eval "ac_cv_lib_$ac_lib_var=yes"
8069 else
8070   echo "configure: failed program was:" >&5
8071   cat conftest.$ac_ext >&5
8072   rm -rf conftest*
8073   eval "ac_cv_lib_$ac_lib_var=no"
8074 fi
8075 rm -f conftest*
8076 LIBS="$ac_save_LIBS"
8077
8078 fi
8079 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8080   echo "$ac_t""yes" 1>&6
8081   LIBS="$LIBS -lbe -lroot -lnet"
8082 else
8083   echo "$ac_t""no" 1>&6
8084 :
8085 fi
8086
8087
8088
8089
8090
8091 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8092 echo "configure:8093: checking for ${CC-cc} option to accept ANSI C" >&5
8093 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8094   echo $ac_n "(cached) $ac_c" 1>&6
8095 else
8096   am_cv_prog_cc_stdc=no
8097 ac_save_CC="$CC"
8098 # Don't try gcc -ansi; that turns off useful extensions and
8099 # breaks some systems' header files.
8100 # AIX                   -qlanglvl=ansi
8101 # Ultrix and OSF/1      -std1
8102 # HP-UX 10.20 and later -Ae
8103 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8104 # SVR4                  -Xc -D__EXTENSIONS__
8105 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8106 do
8107   CC="$ac_save_CC $ac_arg"
8108   cat > conftest.$ac_ext <<EOF
8109 #line 8110 "configure"
8110 #include "confdefs.h"
8111 #include <stdarg.h>
8112 #include <stdio.h>
8113 #include <sys/types.h>
8114 #include <sys/stat.h>
8115 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8116 struct buf { int x; };
8117 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8118 static char *e (p, i)
8119      char **p;
8120      int i;
8121 {
8122   return p[i];
8123 }
8124 static char *f (char * (*g) (char **, int), char **p, ...)
8125 {
8126   char *s;
8127   va_list v;
8128   va_start (v,p);
8129   s = g (p, va_arg (v,int));
8130   va_end (v);
8131   return s;
8132 }
8133 int test (int i, double x);
8134 struct s1 {int (*f) (int a);};
8135 struct s2 {int (*f) (double a);};
8136 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8137 int argc;
8138 char **argv;
8139
8140 int main() {
8141
8142 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8143
8144 ; return 0; }
8145 EOF
8146 if { (eval echo configure:8147: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8147   rm -rf conftest*
8148   am_cv_prog_cc_stdc="$ac_arg"; break
8149 else
8150   echo "configure: failed program was:" >&5
8151   cat conftest.$ac_ext >&5
8152 fi
8153 rm -f conftest*
8154 done
8155 CC="$ac_save_CC"
8156
8157 fi
8158
8159 if test -z "$am_cv_prog_cc_stdc"; then
8160   echo "$ac_t""none needed" 1>&6
8161 else
8162   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8163 fi
8164 case "x$am_cv_prog_cc_stdc" in
8165   x|xno) ;;
8166   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8167 esac
8168
8169 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8170         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8171 fi
8172
8173 # test for make depend flag
8174 OL_MKDEP=
8175 OL_MKDEP_FLAGS=
8176 if test -z "${MKDEP}"; then
8177         OL_MKDEP="${CC-cc}"
8178         if test -z "${MKDEP_FLAGS}"; then
8179                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8180 echo "configure:8181: checking for ${OL_MKDEP} depend flag" >&5
8181 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8182   echo $ac_n "(cached) $ac_c" 1>&6
8183 else
8184   
8185                         ol_cv_mkdep=no
8186                         for flag in "-M" "-xM"; do
8187                                 cat > conftest.c <<EOF
8188  noCode;
8189 EOF
8190                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8191: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8191                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8192                                 then
8193                                         if test ! -f conftest."${ac_object}" ; then
8194                                                 ol_cv_mkdep=$flag
8195                                                 OL_MKDEP_FLAGS="$flag"
8196                                                 break
8197                                         fi
8198                                 fi
8199                         done
8200                         rm -f conftest*
8201                 
8202 fi
8203
8204 echo "$ac_t""$ol_cv_mkdep" 1>&6
8205         else
8206                 cc_cv_mkdep=yes
8207                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8208         fi
8209 else
8210         cc_cv_mkdep=yes
8211         OL_MKDEP="${MKDEP}"
8212         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8213 fi
8214
8215
8216
8217 if test "${ol_cv_mkdep}" = no ; then
8218         # this will soon become an error
8219         echo "configure: warning: do not know how to generate dependencies" 1>&2
8220 fi
8221
8222 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8223 echo "configure:8224: checking for afopen in -ls" >&5
8224 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8225 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8226   echo $ac_n "(cached) $ac_c" 1>&6
8227 else
8228   ac_save_LIBS="$LIBS"
8229 LIBS="-ls  $LIBS"
8230 cat > conftest.$ac_ext <<EOF
8231 #line 8232 "configure"
8232 #include "confdefs.h"
8233 /* Override any gcc2 internal prototype to avoid an error.  */
8234 /* We use char because int might match the return type of a gcc2
8235     builtin and then its argument prototype would still apply.  */
8236 char afopen();
8237
8238 int main() {
8239 afopen()
8240 ; return 0; }
8241 EOF
8242 if { (eval echo configure:8243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8243   rm -rf conftest*
8244   eval "ac_cv_lib_$ac_lib_var=yes"
8245 else
8246   echo "configure: failed program was:" >&5
8247   cat conftest.$ac_ext >&5
8248   rm -rf conftest*
8249   eval "ac_cv_lib_$ac_lib_var=no"
8250 fi
8251 rm -f conftest*
8252 LIBS="$ac_save_LIBS"
8253
8254 fi
8255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8256   echo "$ac_t""yes" 1>&6
8257   
8258         AUTH_LIBS=-ls
8259         cat >> confdefs.h <<\EOF
8260 #define HAVE_AIX_SECURITY 1
8261 EOF
8262
8263
8264 else
8265   echo "$ac_t""no" 1>&6
8266 fi
8267
8268
8269
8270 ol_link_modules=no
8271 if test $ol_enable_modules != no ; then
8272         for ac_hdr in ltdl.h
8273 do
8274 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8275 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8276 echo "configure:8277: checking for $ac_hdr" >&5
8277 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8278   echo $ac_n "(cached) $ac_c" 1>&6
8279 else
8280   cat > conftest.$ac_ext <<EOF
8281 #line 8282 "configure"
8282 #include "confdefs.h"
8283 #include <$ac_hdr>
8284 EOF
8285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8286 { (eval echo configure:8287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8288 if test -z "$ac_err"; then
8289   rm -rf conftest*
8290   eval "ac_cv_header_$ac_safe=yes"
8291 else
8292   echo "$ac_err" >&5
8293   echo "configure: failed program was:" >&5
8294   cat conftest.$ac_ext >&5
8295   rm -rf conftest*
8296   eval "ac_cv_header_$ac_safe=no"
8297 fi
8298 rm -f conftest*
8299 fi
8300 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8301   echo "$ac_t""yes" 1>&6
8302     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8303   cat >> confdefs.h <<EOF
8304 #define $ac_tr_hdr 1
8305 EOF
8306  
8307 else
8308   echo "$ac_t""no" 1>&6
8309 fi
8310 done
8311
8312
8313         if test $ac_cv_header_ltdl_h = no ; then
8314                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8315         fi
8316
8317         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8318 echo "configure:8319: checking for lt_dlinit in -lltdl" >&5
8319 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8320 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8321   echo $ac_n "(cached) $ac_c" 1>&6
8322 else
8323   ac_save_LIBS="$LIBS"
8324 LIBS="-lltdl  $LIBS"
8325 cat > conftest.$ac_ext <<EOF
8326 #line 8327 "configure"
8327 #include "confdefs.h"
8328 /* Override any gcc2 internal prototype to avoid an error.  */
8329 /* We use char because int might match the return type of a gcc2
8330     builtin and then its argument prototype would still apply.  */
8331 char lt_dlinit();
8332
8333 int main() {
8334 lt_dlinit()
8335 ; return 0; }
8336 EOF
8337 if { (eval echo configure:8338: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8338   rm -rf conftest*
8339   eval "ac_cv_lib_$ac_lib_var=yes"
8340 else
8341   echo "configure: failed program was:" >&5
8342   cat conftest.$ac_ext >&5
8343   rm -rf conftest*
8344   eval "ac_cv_lib_$ac_lib_var=no"
8345 fi
8346 rm -f conftest*
8347 LIBS="$ac_save_LIBS"
8348
8349 fi
8350 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8351   echo "$ac_t""yes" 1>&6
8352   
8353                 MODULES_LIBS=-lltdl
8354                 cat >> confdefs.h <<\EOF
8355 #define HAVE_LIBLTDL 1
8356 EOF
8357
8358         
8359 else
8360   echo "$ac_t""no" 1>&6
8361 fi
8362
8363
8364         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8365                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8366         fi
8367         ol_link_modules=yes
8368 else
8369         ol_with_bdb_module=static
8370         ol_with_dnssrv_module=static
8371         ol_with_ldap_module=static
8372         ol_with_ldbm_module=static
8373         ol_with_meta_module=static
8374         ol_with_monitor_module=static
8375         ol_with_passwd_module=static
8376         ol_with_perl_module=static
8377         ol_with_shell_module=static
8378         ol_with_tcl_module=static
8379         ol_with_sql_module=static
8380 fi
8381
8382 # test for EBCDIC
8383 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8384 echo "configure:8385: checking for EBCDIC" >&5
8385 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8386   echo $ac_n "(cached) $ac_c" 1>&6
8387 else
8388   
8389         cat > conftest.$ac_ext <<EOF
8390 #line 8391 "configure"
8391 #include "confdefs.h"
8392
8393 #if !('M' == 0xd4)
8394 #include <__ASCII__/generate_error.h>
8395 #endif
8396
8397 EOF
8398 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8399 { (eval echo configure:8400: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8400 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8401 if test -z "$ac_err"; then
8402   rm -rf conftest*
8403   ol_cv_cpp_ebcdic=yes
8404 else
8405   echo "$ac_err" >&5
8406   echo "configure: failed program was:" >&5
8407   cat conftest.$ac_ext >&5
8408   rm -rf conftest*
8409   ol_cv_cpp_ebcdic=no
8410 fi
8411 rm -f conftest*
8412 fi
8413
8414 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8415 if test $ol_cv_cpp_ebcdic = yes ; then
8416         cat >> confdefs.h <<\EOF
8417 #define HAVE_EBCDIC 1
8418 EOF
8419
8420 fi
8421
8422 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8423 echo "configure:8424: checking for ANSI C header files" >&5
8424 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8425   echo $ac_n "(cached) $ac_c" 1>&6
8426 else
8427   cat > conftest.$ac_ext <<EOF
8428 #line 8429 "configure"
8429 #include "confdefs.h"
8430 #include <stdlib.h>
8431 #include <stdarg.h>
8432 #include <string.h>
8433 #include <float.h>
8434 EOF
8435 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8436 { (eval echo configure:8437: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8437 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8438 if test -z "$ac_err"; then
8439   rm -rf conftest*
8440   ol_cv_header_stdc=yes
8441 else
8442   echo "$ac_err" >&5
8443   echo "configure: failed program was:" >&5
8444   cat conftest.$ac_ext >&5
8445   rm -rf conftest*
8446   ol_cv_header_stdc=no
8447 fi
8448 rm -f conftest*
8449
8450 if test $ol_cv_header_stdc = yes; then
8451   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8452 cat > conftest.$ac_ext <<EOF
8453 #line 8454 "configure"
8454 #include "confdefs.h"
8455 #include <string.h>
8456 EOF
8457 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8458   egrep "memchr" >/dev/null 2>&1; then
8459   :
8460 else
8461   rm -rf conftest*
8462   ol_cv_header_stdc=no
8463 fi
8464 rm -f conftest*
8465
8466 fi
8467
8468 if test $ol_cv_header_stdc = yes; then
8469   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8470 cat > conftest.$ac_ext <<EOF
8471 #line 8472 "configure"
8472 #include "confdefs.h"
8473 #include <stdlib.h>
8474 EOF
8475 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8476   egrep "free" >/dev/null 2>&1; then
8477   :
8478 else
8479   rm -rf conftest*
8480   ol_cv_header_stdc=no
8481 fi
8482 rm -f conftest*
8483
8484 fi
8485
8486 if test $ol_cv_header_stdc = yes; then
8487   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8488 if test "$cross_compiling" = yes; then
8489   :
8490 else
8491   cat > conftest.$ac_ext <<EOF
8492 #line 8493 "configure"
8493 #include "confdefs.h"
8494 #include <ctype.h>
8495 #ifndef HAVE_EBCDIC
8496 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8497 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8498 #else
8499 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8500                 || ('j' <= (c) && (c) <= 'r') \
8501                 || ('s' <= (c) && (c) <= 'z'))
8502 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8503 #endif
8504 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8505 int main () { int i; for (i = 0; i < 256; i++)
8506 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8507 exit (0); }
8508
8509 EOF
8510 if { (eval echo configure:8511: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8511 then
8512   :
8513 else
8514   echo "configure: failed program was:" >&5
8515   cat conftest.$ac_ext >&5
8516   rm -fr conftest*
8517   ol_cv_header_stdc=no
8518 fi
8519 rm -fr conftest*
8520 fi
8521
8522 fi
8523 fi
8524
8525 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8526 if test $ol_cv_header_stdc = yes; then
8527   cat >> confdefs.h <<\EOF
8528 #define STDC_HEADERS 1
8529 EOF
8530
8531 fi
8532 ac_cv_header_stdc=disable
8533
8534
8535 if test $ol_cv_header_stdc != yes; then
8536         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8537 fi
8538
8539 ac_header_dirent=no
8540 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8541 do
8542 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8543 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8544 echo "configure:8545: checking for $ac_hdr that defines DIR" >&5
8545 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8546   echo $ac_n "(cached) $ac_c" 1>&6
8547 else
8548   cat > conftest.$ac_ext <<EOF
8549 #line 8550 "configure"
8550 #include "confdefs.h"
8551 #include <sys/types.h>
8552 #include <$ac_hdr>
8553 int main() {
8554 DIR *dirp = 0;
8555 ; return 0; }
8556 EOF
8557 if { (eval echo configure:8558: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8558   rm -rf conftest*
8559   eval "ac_cv_header_dirent_$ac_safe=yes"
8560 else
8561   echo "configure: failed program was:" >&5
8562   cat conftest.$ac_ext >&5
8563   rm -rf conftest*
8564   eval "ac_cv_header_dirent_$ac_safe=no"
8565 fi
8566 rm -f conftest*
8567 fi
8568 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8569   echo "$ac_t""yes" 1>&6
8570     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8571   cat >> confdefs.h <<EOF
8572 #define $ac_tr_hdr 1
8573 EOF
8574  ac_header_dirent=$ac_hdr; break
8575 else
8576   echo "$ac_t""no" 1>&6
8577 fi
8578 done
8579 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8580 if test $ac_header_dirent = dirent.h; then
8581 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8582 echo "configure:8583: checking for opendir in -ldir" >&5
8583 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8584 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8585   echo $ac_n "(cached) $ac_c" 1>&6
8586 else
8587   ac_save_LIBS="$LIBS"
8588 LIBS="-ldir  $LIBS"
8589 cat > conftest.$ac_ext <<EOF
8590 #line 8591 "configure"
8591 #include "confdefs.h"
8592 /* Override any gcc2 internal prototype to avoid an error.  */
8593 /* We use char because int might match the return type of a gcc2
8594     builtin and then its argument prototype would still apply.  */
8595 char opendir();
8596
8597 int main() {
8598 opendir()
8599 ; return 0; }
8600 EOF
8601 if { (eval echo configure:8602: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8602   rm -rf conftest*
8603   eval "ac_cv_lib_$ac_lib_var=yes"
8604 else
8605   echo "configure: failed program was:" >&5
8606   cat conftest.$ac_ext >&5
8607   rm -rf conftest*
8608   eval "ac_cv_lib_$ac_lib_var=no"
8609 fi
8610 rm -f conftest*
8611 LIBS="$ac_save_LIBS"
8612
8613 fi
8614 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8615   echo "$ac_t""yes" 1>&6
8616   LIBS="$LIBS -ldir"
8617 else
8618   echo "$ac_t""no" 1>&6
8619 fi
8620
8621 else
8622 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8623 echo "configure:8624: checking for opendir in -lx" >&5
8624 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8625 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8626   echo $ac_n "(cached) $ac_c" 1>&6
8627 else
8628   ac_save_LIBS="$LIBS"
8629 LIBS="-lx  $LIBS"
8630 cat > conftest.$ac_ext <<EOF
8631 #line 8632 "configure"
8632 #include "confdefs.h"
8633 /* Override any gcc2 internal prototype to avoid an error.  */
8634 /* We use char because int might match the return type of a gcc2
8635     builtin and then its argument prototype would still apply.  */
8636 char opendir();
8637
8638 int main() {
8639 opendir()
8640 ; return 0; }
8641 EOF
8642 if { (eval echo configure:8643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8643   rm -rf conftest*
8644   eval "ac_cv_lib_$ac_lib_var=yes"
8645 else
8646   echo "configure: failed program was:" >&5
8647   cat conftest.$ac_ext >&5
8648   rm -rf conftest*
8649   eval "ac_cv_lib_$ac_lib_var=no"
8650 fi
8651 rm -f conftest*
8652 LIBS="$ac_save_LIBS"
8653
8654 fi
8655 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8656   echo "$ac_t""yes" 1>&6
8657   LIBS="$LIBS -lx"
8658 else
8659   echo "$ac_t""no" 1>&6
8660 fi
8661
8662 fi
8663
8664 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8665 echo "configure:8666: checking for sys/wait.h that is POSIX.1 compatible" >&5
8666 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8667   echo $ac_n "(cached) $ac_c" 1>&6
8668 else
8669   cat > conftest.$ac_ext <<EOF
8670 #line 8671 "configure"
8671 #include "confdefs.h"
8672 #include <sys/types.h>
8673 #include <sys/wait.h>
8674 #ifndef WEXITSTATUS
8675 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8676 #endif
8677 #ifndef WIFEXITED
8678 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8679 #endif
8680 int main() {
8681 int s;
8682 wait (&s);
8683 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8684 ; return 0; }
8685 EOF
8686 if { (eval echo configure:8687: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8687   rm -rf conftest*
8688   ac_cv_header_sys_wait_h=yes
8689 else
8690   echo "configure: failed program was:" >&5
8691   cat conftest.$ac_ext >&5
8692   rm -rf conftest*
8693   ac_cv_header_sys_wait_h=no
8694 fi
8695 rm -f conftest*
8696 fi
8697
8698 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8699 if test $ac_cv_header_sys_wait_h = yes; then
8700   cat >> confdefs.h <<\EOF
8701 #define HAVE_SYS_WAIT_H 1
8702 EOF
8703
8704 fi
8705
8706 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8707 echo "configure:8708: checking POSIX termios" >&5
8708 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8709   echo $ac_n "(cached) $ac_c" 1>&6
8710 else
8711   cat > conftest.$ac_ext <<EOF
8712 #line 8713 "configure"
8713 #include "confdefs.h"
8714 #include <sys/types.h>
8715 #include <unistd.h>
8716 #include <termios.h>
8717 int main() {
8718 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8719    tcgetattr(0, 0);
8720 ; return 0; }
8721 EOF
8722 if { (eval echo configure:8723: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8723   rm -rf conftest*
8724   am_cv_sys_posix_termios=yes
8725 else
8726   echo "configure: failed program was:" >&5
8727   cat conftest.$ac_ext >&5
8728   rm -rf conftest*
8729   am_cv_sys_posix_termios=no
8730 fi
8731 rm -f conftest*
8732 fi
8733
8734 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8735
8736
8737  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8738 echo "configure:8739: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8739 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8740   echo $ac_n "(cached) $ac_c" 1>&6
8741 else
8742   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8743
8744   gwinsz_in_termios_h=no
8745   if test $am_cv_sys_posix_termios = yes; then
8746     cat > conftest.$ac_ext <<EOF
8747 #line 8748 "configure"
8748 #include "confdefs.h"
8749 #include <sys/types.h>
8750 #     include <termios.h>
8751 #     ifdef TIOCGWINSZ
8752         yes
8753 #     endif
8754     
8755 EOF
8756 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8757   egrep "yes" >/dev/null 2>&1; then
8758   rm -rf conftest*
8759   gwinsz_in_termios_h=yes
8760 fi
8761 rm -f conftest*
8762
8763   fi
8764
8765   if test $gwinsz_in_termios_h = no; then
8766     cat > conftest.$ac_ext <<EOF
8767 #line 8768 "configure"
8768 #include "confdefs.h"
8769 #include <sys/types.h>
8770 #     include <sys/ioctl.h>
8771 #     ifdef TIOCGWINSZ
8772         yes
8773 #     endif
8774     
8775 EOF
8776 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8777   egrep "yes" >/dev/null 2>&1; then
8778   rm -rf conftest*
8779   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8780 fi
8781 rm -f conftest*
8782
8783   fi
8784   
8785 fi
8786
8787 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8788   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8789     cat >> confdefs.h <<\EOF
8790 #define GWINSZ_IN_SYS_IOCTL 1
8791 EOF
8792
8793   fi
8794
8795 if test $am_cv_sys_posix_termios = yes ; then
8796         cat >> confdefs.h <<\EOF
8797 #define HAVE_POSIX_TERMIOS 1
8798 EOF
8799
8800 fi
8801
8802 for ac_hdr in \
8803         arpa/inet.h             \
8804         arpa/nameser.h  \
8805         assert.h                \
8806         conio.h                 \
8807         crypt.h                 \
8808         direct.h                \
8809         errno.h                 \
8810         fcntl.h                 \
8811         filio.h                 \
8812         getopt.h                \
8813         grp.h                   \
8814         io.h                    \
8815         libutil.h               \
8816         limits.h                \
8817         locale.h                \
8818         netinet/tcp.h   \
8819         malloc.h                \
8820         memory.h                \
8821         psap.h                  \
8822         pwd.h                   \
8823         process.h               \
8824         resolv.h                \
8825         sgtty.h                 \
8826         shadow.h                \
8827         stddef.h                \
8828         string.h                \
8829         strings.h               \
8830         sysexits.h              \
8831         sys/file.h              \
8832         sys/filio.h             \
8833         sys/errno.h             \
8834         sys/ioctl.h             \
8835         sys/param.h             \
8836         sys/resource.h  \
8837         sys/select.h    \
8838         sys/socket.h    \
8839         sys/syslog.h    \
8840         sys/time.h              \
8841         sys/types.h             \
8842         syslog.h                \
8843         termios.h               \
8844         unistd.h                \
8845         winsock.h               \
8846         winsock2.h              \
8847
8848 do
8849 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8850 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8851 echo "configure:8852: checking for $ac_hdr" >&5
8852 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8853   echo $ac_n "(cached) $ac_c" 1>&6
8854 else
8855   cat > conftest.$ac_ext <<EOF
8856 #line 8857 "configure"
8857 #include "confdefs.h"
8858 #include <$ac_hdr>
8859 EOF
8860 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8861 { (eval echo configure:8862: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8862 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8863 if test -z "$ac_err"; then
8864   rm -rf conftest*
8865   eval "ac_cv_header_$ac_safe=yes"
8866 else
8867   echo "$ac_err" >&5
8868   echo "configure: failed program was:" >&5
8869   cat conftest.$ac_ext >&5
8870   rm -rf conftest*
8871   eval "ac_cv_header_$ac_safe=no"
8872 fi
8873 rm -f conftest*
8874 fi
8875 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8876   echo "$ac_t""yes" 1>&6
8877     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8878   cat >> confdefs.h <<EOF
8879 #define $ac_tr_hdr 1
8880 EOF
8881  
8882 else
8883   echo "$ac_t""no" 1>&6
8884 fi
8885 done
8886
8887
8888
8889
8890 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8891 echo "configure:8892: checking for dlopen" >&5
8892 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8893   echo $ac_n "(cached) $ac_c" 1>&6
8894 else
8895   cat > conftest.$ac_ext <<EOF
8896 #line 8897 "configure"
8897 #include "confdefs.h"
8898 /* System header to define __stub macros and hopefully few prototypes,
8899     which can conflict with char dlopen(); below.  */
8900 #include <assert.h>
8901 /* Override any gcc2 internal prototype to avoid an error.  */
8902 /* We use char because int might match the return type of a gcc2
8903     builtin and then its argument prototype would still apply.  */
8904 char dlopen();
8905 char (*f)();
8906
8907 int main() {
8908
8909 /* The GNU C library defines this for functions which it implements
8910     to always fail with ENOSYS.  Some functions are actually named
8911     something starting with __ and the normal name is an alias.  */
8912 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8913 choke me
8914 #else
8915 f = dlopen;
8916 #endif
8917
8918 ; return 0; }
8919 EOF
8920 if { (eval echo configure:8921: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8921   rm -rf conftest*
8922   eval "ac_cv_func_dlopen=yes"
8923 else
8924   echo "configure: failed program was:" >&5
8925   cat conftest.$ac_ext >&5
8926   rm -rf conftest*
8927   eval "ac_cv_func_dlopen=no"
8928 fi
8929 rm -f conftest*
8930 fi
8931
8932 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8933   echo "$ac_t""yes" 1>&6
8934   :
8935 else
8936   echo "$ac_t""no" 1>&6
8937 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8938 echo "configure:8939: checking for dlopen in -ldl" >&5
8939 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8940 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8941   echo $ac_n "(cached) $ac_c" 1>&6
8942 else
8943   ac_save_LIBS="$LIBS"
8944 LIBS="-ldl  $LIBS"
8945 cat > conftest.$ac_ext <<EOF
8946 #line 8947 "configure"
8947 #include "confdefs.h"
8948 /* Override any gcc2 internal prototype to avoid an error.  */
8949 /* We use char because int might match the return type of a gcc2
8950     builtin and then its argument prototype would still apply.  */
8951 char dlopen();
8952
8953 int main() {
8954 dlopen()
8955 ; return 0; }
8956 EOF
8957 if { (eval echo configure:8958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8958   rm -rf conftest*
8959   eval "ac_cv_lib_$ac_lib_var=yes"
8960 else
8961   echo "configure: failed program was:" >&5
8962   cat conftest.$ac_ext >&5
8963   rm -rf conftest*
8964   eval "ac_cv_lib_$ac_lib_var=no"
8965 fi
8966 rm -f conftest*
8967 LIBS="$ac_save_LIBS"
8968
8969 fi
8970 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8971   echo "$ac_t""yes" 1>&6
8972     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
8973     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
8974   cat >> confdefs.h <<EOF
8975 #define $ac_tr_lib 1
8976 EOF
8977
8978   LIBS="-ldl $LIBS"
8979
8980 else
8981   echo "$ac_t""no" 1>&6
8982 fi
8983
8984 fi
8985
8986
8987 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
8988 echo "configure:8989: checking for sigset in -lV3" >&5
8989 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
8990 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8991   echo $ac_n "(cached) $ac_c" 1>&6
8992 else
8993   ac_save_LIBS="$LIBS"
8994 LIBS="-lV3  $LIBS"
8995 cat > conftest.$ac_ext <<EOF
8996 #line 8997 "configure"
8997 #include "confdefs.h"
8998 /* Override any gcc2 internal prototype to avoid an error.  */
8999 /* We use char because int might match the return type of a gcc2
9000     builtin and then its argument prototype would still apply.  */
9001 char sigset();
9002
9003 int main() {
9004 sigset()
9005 ; return 0; }
9006 EOF
9007 if { (eval echo configure:9008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9008   rm -rf conftest*
9009   eval "ac_cv_lib_$ac_lib_var=yes"
9010 else
9011   echo "configure: failed program was:" >&5
9012   cat conftest.$ac_ext >&5
9013   rm -rf conftest*
9014   eval "ac_cv_lib_$ac_lib_var=no"
9015 fi
9016 rm -f conftest*
9017 LIBS="$ac_save_LIBS"
9018
9019 fi
9020 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9021   echo "$ac_t""yes" 1>&6
9022     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9023     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9024   cat >> confdefs.h <<EOF
9025 #define $ac_tr_lib 1
9026 EOF
9027
9028   LIBS="-lV3 $LIBS"
9029
9030 else
9031   echo "$ac_t""no" 1>&6
9032 fi
9033
9034
9035 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9036 echo "configure:9037: checking for winsock" >&5
9037 save_LIBS="$LIBS"
9038 for curlib in ws2_32 wsock32; do
9039         LIBS="$LIBS -l$curlib"
9040         cat > conftest.$ac_ext <<EOF
9041 #line 9042 "configure"
9042 #include "confdefs.h"
9043
9044                         char socket@12();
9045                         char select@20();
9046                         char closesocket@4();
9047                         char gethostname@8();
9048                         
9049 int main() {
9050
9051                         socket@12();
9052                         select@20();
9053                         closesocket@4();
9054                         gethostname@8();
9055                         
9056 ; return 0; }
9057 EOF
9058 if { (eval echo configure:9059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9059   rm -rf conftest*
9060   have_winsock=yes
9061 else
9062   echo "configure: failed program was:" >&5
9063   cat conftest.$ac_ext >&5
9064   rm -rf conftest*
9065   have_winsock=no
9066 fi
9067 rm -f conftest*
9068
9069         if test $have_winsock = yes; then
9070                 cat >> confdefs.h <<\EOF
9071 #define HAVE_WINSOCK 1
9072 EOF
9073
9074                 ac_cv_func_socket=yes
9075                 ac_cv_func_select=yes
9076                 ac_cv_func_closesocket=yes
9077                 ac_cv_func_gethostname=yes
9078                 if test $curlib = ws2_32; then
9079                         have_winsock=winsock2
9080                         cat >> confdefs.h <<\EOF
9081 #define HAVE_WINSOCK2 1
9082 EOF
9083
9084                 fi
9085                 break
9086         fi
9087         LIBS="$save_LIBS"
9088 done
9089 echo "$ac_t""$have_winsock" 1>&6
9090
9091
9092 echo $ac_n "checking for socket""... $ac_c" 1>&6
9093 echo "configure:9094: checking for socket" >&5
9094 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9095   echo $ac_n "(cached) $ac_c" 1>&6
9096 else
9097   cat > conftest.$ac_ext <<EOF
9098 #line 9099 "configure"
9099 #include "confdefs.h"
9100 /* System header to define __stub macros and hopefully few prototypes,
9101     which can conflict with char socket(); below.  */
9102 #include <assert.h>
9103 /* Override any gcc2 internal prototype to avoid an error.  */
9104 /* We use char because int might match the return type of a gcc2
9105     builtin and then its argument prototype would still apply.  */
9106 char socket();
9107 char (*f)();
9108
9109 int main() {
9110
9111 /* The GNU C library defines this for functions which it implements
9112     to always fail with ENOSYS.  Some functions are actually named
9113     something starting with __ and the normal name is an alias.  */
9114 #if defined (__stub_socket) || defined (__stub___socket)
9115 choke me
9116 #else
9117 f = socket;
9118 #endif
9119
9120 ; return 0; }
9121 EOF
9122 if { (eval echo configure:9123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9123   rm -rf conftest*
9124   eval "ac_cv_func_socket=yes"
9125 else
9126   echo "configure: failed program was:" >&5
9127   cat conftest.$ac_ext >&5
9128   rm -rf conftest*
9129   eval "ac_cv_func_socket=no"
9130 fi
9131 rm -f conftest*
9132 fi
9133
9134 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9135   echo "$ac_t""yes" 1>&6
9136   :
9137 else
9138   echo "$ac_t""no" 1>&6
9139         
9140         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9141 echo "configure:9142: checking for main in -lsocket" >&5
9142 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9143 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9144   echo $ac_n "(cached) $ac_c" 1>&6
9145 else
9146   ac_save_LIBS="$LIBS"
9147 LIBS="-lsocket  $LIBS"
9148 cat > conftest.$ac_ext <<EOF
9149 #line 9150 "configure"
9150 #include "confdefs.h"
9151
9152 int main() {
9153 main()
9154 ; return 0; }
9155 EOF
9156 if { (eval echo configure:9157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9157   rm -rf conftest*
9158   eval "ac_cv_lib_$ac_lib_var=yes"
9159 else
9160   echo "configure: failed program was:" >&5
9161   cat conftest.$ac_ext >&5
9162   rm -rf conftest*
9163   eval "ac_cv_lib_$ac_lib_var=no"
9164 fi
9165 rm -f conftest*
9166 LIBS="$ac_save_LIBS"
9167
9168 fi
9169 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9170   echo "$ac_t""yes" 1>&6
9171     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9172     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9173   cat >> confdefs.h <<EOF
9174 #define $ac_tr_lib 1
9175 EOF
9176
9177   LIBS="-lsocket $LIBS"
9178
9179 else
9180   echo "$ac_t""no" 1>&6
9181 fi
9182
9183         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9184 echo "configure:9185: checking for main in -lnet" >&5
9185 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9186 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9187   echo $ac_n "(cached) $ac_c" 1>&6
9188 else
9189   ac_save_LIBS="$LIBS"
9190 LIBS="-lnet  $LIBS"
9191 cat > conftest.$ac_ext <<EOF
9192 #line 9193 "configure"
9193 #include "confdefs.h"
9194
9195 int main() {
9196 main()
9197 ; return 0; }
9198 EOF
9199 if { (eval echo configure:9200: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9200   rm -rf conftest*
9201   eval "ac_cv_lib_$ac_lib_var=yes"
9202 else
9203   echo "configure: failed program was:" >&5
9204   cat conftest.$ac_ext >&5
9205   rm -rf conftest*
9206   eval "ac_cv_lib_$ac_lib_var=no"
9207 fi
9208 rm -f conftest*
9209 LIBS="$ac_save_LIBS"
9210
9211 fi
9212 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9213   echo "$ac_t""yes" 1>&6
9214     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9215     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9216   cat >> confdefs.h <<EOF
9217 #define $ac_tr_lib 1
9218 EOF
9219
9220   LIBS="-lnet $LIBS"
9221
9222 else
9223   echo "$ac_t""no" 1>&6
9224 fi
9225
9226         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9227 echo "configure:9228: checking for main in -lnsl_s" >&5
9228 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9229 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9230   echo $ac_n "(cached) $ac_c" 1>&6
9231 else
9232   ac_save_LIBS="$LIBS"
9233 LIBS="-lnsl_s  $LIBS"
9234 cat > conftest.$ac_ext <<EOF
9235 #line 9236 "configure"
9236 #include "confdefs.h"
9237
9238 int main() {
9239 main()
9240 ; return 0; }
9241 EOF
9242 if { (eval echo configure:9243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9243   rm -rf conftest*
9244   eval "ac_cv_lib_$ac_lib_var=yes"
9245 else
9246   echo "configure: failed program was:" >&5
9247   cat conftest.$ac_ext >&5
9248   rm -rf conftest*
9249   eval "ac_cv_lib_$ac_lib_var=no"
9250 fi
9251 rm -f conftest*
9252 LIBS="$ac_save_LIBS"
9253
9254 fi
9255 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9256   echo "$ac_t""yes" 1>&6
9257     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9258     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9259   cat >> confdefs.h <<EOF
9260 #define $ac_tr_lib 1
9261 EOF
9262
9263   LIBS="-lnsl_s $LIBS"
9264
9265 else
9266   echo "$ac_t""no" 1>&6
9267 fi
9268
9269         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9270 echo "configure:9271: checking for main in -lnsl" >&5
9271 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9272 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9273   echo $ac_n "(cached) $ac_c" 1>&6
9274 else
9275   ac_save_LIBS="$LIBS"
9276 LIBS="-lnsl  $LIBS"
9277 cat > conftest.$ac_ext <<EOF
9278 #line 9279 "configure"
9279 #include "confdefs.h"
9280
9281 int main() {
9282 main()
9283 ; return 0; }
9284 EOF
9285 if { (eval echo configure:9286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9286   rm -rf conftest*
9287   eval "ac_cv_lib_$ac_lib_var=yes"
9288 else
9289   echo "configure: failed program was:" >&5
9290   cat conftest.$ac_ext >&5
9291   rm -rf conftest*
9292   eval "ac_cv_lib_$ac_lib_var=no"
9293 fi
9294 rm -f conftest*
9295 LIBS="$ac_save_LIBS"
9296
9297 fi
9298 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9299   echo "$ac_t""yes" 1>&6
9300     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9301     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9302   cat >> confdefs.h <<EOF
9303 #define $ac_tr_lib 1
9304 EOF
9305
9306   LIBS="-lnsl $LIBS"
9307
9308 else
9309   echo "$ac_t""no" 1>&6
9310 fi
9311
9312         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9313 echo "configure:9314: checking for socket in -linet" >&5
9314 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9315 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9316   echo $ac_n "(cached) $ac_c" 1>&6
9317 else
9318   ac_save_LIBS="$LIBS"
9319 LIBS="-linet  $LIBS"
9320 cat > conftest.$ac_ext <<EOF
9321 #line 9322 "configure"
9322 #include "confdefs.h"
9323 /* Override any gcc2 internal prototype to avoid an error.  */
9324 /* We use char because int might match the return type of a gcc2
9325     builtin and then its argument prototype would still apply.  */
9326 char socket();
9327
9328 int main() {
9329 socket()
9330 ; return 0; }
9331 EOF
9332 if { (eval echo configure:9333: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9333   rm -rf conftest*
9334   eval "ac_cv_lib_$ac_lib_var=yes"
9335 else
9336   echo "configure: failed program was:" >&5
9337   cat conftest.$ac_ext >&5
9338   rm -rf conftest*
9339   eval "ac_cv_lib_$ac_lib_var=no"
9340 fi
9341 rm -f conftest*
9342 LIBS="$ac_save_LIBS"
9343
9344 fi
9345 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9346   echo "$ac_t""yes" 1>&6
9347     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9348     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9349   cat >> confdefs.h <<EOF
9350 #define $ac_tr_lib 1
9351 EOF
9352
9353   LIBS="-linet $LIBS"
9354
9355 else
9356   echo "$ac_t""no" 1>&6
9357 fi
9358
9359         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9360 echo "configure:9361: checking for main in -lgen" >&5
9361 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9362 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9363   echo $ac_n "(cached) $ac_c" 1>&6
9364 else
9365   ac_save_LIBS="$LIBS"
9366 LIBS="-lgen  $LIBS"
9367 cat > conftest.$ac_ext <<EOF
9368 #line 9369 "configure"
9369 #include "confdefs.h"
9370
9371 int main() {
9372 main()
9373 ; return 0; }
9374 EOF
9375 if { (eval echo configure:9376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9376   rm -rf conftest*
9377   eval "ac_cv_lib_$ac_lib_var=yes"
9378 else
9379   echo "configure: failed program was:" >&5
9380   cat conftest.$ac_ext >&5
9381   rm -rf conftest*
9382   eval "ac_cv_lib_$ac_lib_var=no"
9383 fi
9384 rm -f conftest*
9385 LIBS="$ac_save_LIBS"
9386
9387 fi
9388 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9389   echo "$ac_t""yes" 1>&6
9390     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9391     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9392   cat >> confdefs.h <<EOF
9393 #define $ac_tr_lib 1
9394 EOF
9395
9396   LIBS="-lgen $LIBS"
9397
9398 else
9399   echo "$ac_t""no" 1>&6
9400 fi
9401
9402
9403 fi
9404
9405
9406 echo $ac_n "checking for select""... $ac_c" 1>&6
9407 echo "configure:9408: checking for select" >&5
9408 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9409   echo $ac_n "(cached) $ac_c" 1>&6
9410 else
9411   cat > conftest.$ac_ext <<EOF
9412 #line 9413 "configure"
9413 #include "confdefs.h"
9414 /* System header to define __stub macros and hopefully few prototypes,
9415     which can conflict with char select(); below.  */
9416 #include <assert.h>
9417 /* Override any gcc2 internal prototype to avoid an error.  */
9418 /* We use char because int might match the return type of a gcc2
9419     builtin and then its argument prototype would still apply.  */
9420 char select();
9421 char (*f)();
9422
9423 int main() {
9424
9425 /* The GNU C library defines this for functions which it implements
9426     to always fail with ENOSYS.  Some functions are actually named
9427     something starting with __ and the normal name is an alias.  */
9428 #if defined (__stub_select) || defined (__stub___select)
9429 choke me
9430 #else
9431 f = select;
9432 #endif
9433
9434 ; return 0; }
9435 EOF
9436 if { (eval echo configure:9437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9437   rm -rf conftest*
9438   eval "ac_cv_func_select=yes"
9439 else
9440   echo "configure: failed program was:" >&5
9441   cat conftest.$ac_ext >&5
9442   rm -rf conftest*
9443   eval "ac_cv_func_select=no"
9444 fi
9445 rm -f conftest*
9446 fi
9447
9448 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9449   echo "$ac_t""yes" 1>&6
9450   :
9451 else
9452   echo "$ac_t""no" 1>&6
9453 { echo "configure: error: select() required." 1>&2; exit 1; }
9454 fi
9455
9456
9457 if test "${ac_cv_header_winsock_h}" != yes; then
9458                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9459 echo "configure:9460: checking types of arguments for select()" >&5
9460  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9461   echo $ac_n "(cached) $ac_c" 1>&6
9462 else
9463    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9464   echo $ac_n "(cached) $ac_c" 1>&6
9465 else
9466     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9467   echo $ac_n "(cached) $ac_c" 1>&6
9468 else
9469      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9470      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9471       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9472        cat > conftest.$ac_ext <<EOF
9473 #line 9474 "configure"
9474 #include "confdefs.h"
9475 #ifdef HAVE_SYS_TYPES_H
9476 #include <sys/types.h>
9477 #endif
9478 #ifdef HAVE_SYS_TIME_H
9479 #include <sys/time.h>
9480 #endif
9481 #ifdef HAVE_SYS_SELECT_H
9482 #include <sys/select.h>
9483 #endif
9484 #ifdef HAVE_SYS_SOCKET_H
9485 #include <sys/socket.h>
9486 #endif
9487 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);
9488 int main() {
9489
9490 ; return 0; }
9491 EOF
9492 if { (eval echo configure:9493: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9493   rm -rf conftest*
9494           ac_not_found=no ; break 3
9495 else
9496   echo "configure: failed program was:" >&5
9497   cat conftest.$ac_ext >&5
9498   rm -rf conftest*
9499   ac_not_found=yes
9500 fi
9501 rm -f conftest*
9502       done
9503      done
9504     done
9505    
9506 fi
9507   
9508 fi
9509  
9510 fi
9511  if test "$ac_not_found" = yes; then
9512   ac_cv_func_select_arg1=int 
9513   ac_cv_func_select_arg234='int *' 
9514   ac_cv_func_select_arg5='struct timeval *'
9515  fi
9516  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9517  cat >> confdefs.h <<EOF
9518 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9519 EOF
9520
9521  cat >> confdefs.h <<EOF
9522 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9523 EOF
9524
9525  cat >> confdefs.h <<EOF
9526 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9527 EOF
9528
9529
9530 fi
9531
9532
9533 for ac_hdr in regex.h 
9534 do
9535 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9536 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9537 echo "configure:9538: checking for $ac_hdr" >&5
9538 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9539   echo $ac_n "(cached) $ac_c" 1>&6
9540 else
9541   cat > conftest.$ac_ext <<EOF
9542 #line 9543 "configure"
9543 #include "confdefs.h"
9544 #include <$ac_hdr>
9545 EOF
9546 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9547 { (eval echo configure:9548: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9548 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9549 if test -z "$ac_err"; then
9550   rm -rf conftest*
9551   eval "ac_cv_header_$ac_safe=yes"
9552 else
9553   echo "$ac_err" >&5
9554   echo "configure: failed program was:" >&5
9555   cat conftest.$ac_ext >&5
9556   rm -rf conftest*
9557   eval "ac_cv_header_$ac_safe=no"
9558 fi
9559 rm -f conftest*
9560 fi
9561 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9562   echo "$ac_t""yes" 1>&6
9563     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9564   cat >> confdefs.h <<EOF
9565 #define $ac_tr_hdr 1
9566 EOF
9567  
9568 else
9569   echo "$ac_t""no" 1>&6
9570 fi
9571 done
9572
9573 if test "$ac_cv_header_regex_h" != yes ; then
9574         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9575 fi
9576
9577 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9578 echo "configure:9579: checking for library containing regfree" >&5
9579 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9580   echo $ac_n "(cached) $ac_c" 1>&6
9581 else
9582   ac_func_search_save_LIBS="$LIBS"
9583 ac_cv_search_regfree="no"
9584 cat > conftest.$ac_ext <<EOF
9585 #line 9586 "configure"
9586 #include "confdefs.h"
9587 /* Override any gcc2 internal prototype to avoid an error.  */
9588 /* We use char because int might match the return type of a gcc2
9589     builtin and then its argument prototype would still apply.  */
9590 char regfree();
9591
9592 int main() {
9593 regfree()
9594 ; return 0; }
9595 EOF
9596 if { (eval echo configure:9597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9597   rm -rf conftest*
9598   ac_cv_search_regfree="none required"
9599 else
9600   echo "configure: failed program was:" >&5
9601   cat conftest.$ac_ext >&5
9602 fi
9603 rm -f conftest*
9604 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9605 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9606 cat > conftest.$ac_ext <<EOF
9607 #line 9608 "configure"
9608 #include "confdefs.h"
9609 /* Override any gcc2 internal prototype to avoid an error.  */
9610 /* We use char because int might match the return type of a gcc2
9611     builtin and then its argument prototype would still apply.  */
9612 char regfree();
9613
9614 int main() {
9615 regfree()
9616 ; return 0; }
9617 EOF
9618 if { (eval echo configure:9619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9619   rm -rf conftest*
9620   ac_cv_search_regfree="-l$ac_lib"
9621 break
9622 else
9623   echo "configure: failed program was:" >&5
9624   cat conftest.$ac_ext >&5
9625 fi
9626 rm -f conftest*
9627 done
9628 LIBS="$ac_func_search_save_LIBS"
9629 fi
9630
9631 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9632 if test "$ac_cv_search_regfree" != "no"; then
9633   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9634   :
9635 else :
9636   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9637 fi
9638
9639
9640 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9641 echo "configure:9642: checking for compatible POSIX regex" >&5
9642 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9643   echo $ac_n "(cached) $ac_c" 1>&6
9644 else
9645   
9646         if test "$cross_compiling" = yes; then
9647   ol_cv_c_posix_regex=cross
9648 else
9649   cat > conftest.$ac_ext <<EOF
9650 #line 9651 "configure"
9651 #include "confdefs.h"
9652
9653 #include <sys/types.h>
9654 #include <regex.h>
9655 static char *pattern, *string;
9656 main()
9657 {
9658         int rc;
9659         regex_t re;
9660
9661         pattern = "^A";
9662
9663         if(regcomp(&re, pattern, 0)) {
9664                 return -1;
9665         }
9666         
9667         string = "ALL MATCH";
9668         
9669         rc = regexec(&re, string, 0, (void*)0, 0);
9670
9671         regfree(&re);
9672
9673         return rc;
9674 }
9675 EOF
9676 if { (eval echo configure:9677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9677 then
9678   ol_cv_c_posix_regex=yes
9679 else
9680   echo "configure: failed program was:" >&5
9681   cat conftest.$ac_ext >&5
9682   rm -fr conftest*
9683   ol_cv_c_posix_regex=no
9684 fi
9685 rm -fr conftest*
9686 fi
9687
9688 fi
9689
9690 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9691
9692 if test "$ol_cv_c_posix_regex" = no ; then
9693         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9694 fi
9695
9696 echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9697 echo "configure:9698: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9698 save_LIBS="$LIBS"
9699 LIBS="$LIBS -lrpcrt4"
9700 cat > conftest.$ac_ext <<EOF
9701 #line 9702 "configure"
9702 #include "confdefs.h"
9703
9704                 char UuidCreate@4();
9705                 char UuidToStringA@8();
9706                 
9707 int main() {
9708
9709                 UuidCreate@4();
9710                 UuidToStringA@8();
9711                 
9712 ; return 0; }
9713 EOF
9714 if { (eval echo configure:9715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9715   rm -rf conftest*
9716   need_rpcrt=yes
9717 else
9718   echo "configure: failed program was:" >&5
9719   cat conftest.$ac_ext >&5
9720   rm -rf conftest*
9721   need_rpcrt=no
9722 fi
9723 rm -f conftest*
9724 if test $need_rpcrt = yes; then
9725         SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9726 fi
9727 LIBS="$save_LIBS"
9728 echo "$ac_t""$need_rpcrt" 1>&6
9729
9730 ol_link_dnssrv=no
9731 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9732 echo "configure:9733: checking for res_query" >&5
9733 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9734   echo $ac_n "(cached) $ac_c" 1>&6
9735 else
9736   cat > conftest.$ac_ext <<EOF
9737 #line 9738 "configure"
9738 #include "confdefs.h"
9739 /* System header to define __stub macros and hopefully few prototypes,
9740     which can conflict with char res_query(); below.  */
9741 #include <assert.h>
9742 /* Override any gcc2 internal prototype to avoid an error.  */
9743 /* We use char because int might match the return type of a gcc2
9744     builtin and then its argument prototype would still apply.  */
9745 char res_query();
9746 char (*f)();
9747
9748 int main() {
9749
9750 /* The GNU C library defines this for functions which it implements
9751     to always fail with ENOSYS.  Some functions are actually named
9752     something starting with __ and the normal name is an alias.  */
9753 #if defined (__stub_res_query) || defined (__stub___res_query)
9754 choke me
9755 #else
9756 f = res_query;
9757 #endif
9758
9759 ; return 0; }
9760 EOF
9761 if { (eval echo configure:9762: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9762   rm -rf conftest*
9763   eval "ac_cv_func_res_query=yes"
9764 else
9765   echo "configure: failed program was:" >&5
9766   cat conftest.$ac_ext >&5
9767   rm -rf conftest*
9768   eval "ac_cv_func_res_query=no"
9769 fi
9770 rm -f conftest*
9771 fi
9772
9773 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9774   echo "$ac_t""yes" 1>&6
9775   :
9776 else
9777   echo "$ac_t""no" 1>&6
9778 fi
9779
9780 if test $ac_cv_func_res_query = no ; then 
9781         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9782 echo "configure:9783: checking for __res_query" >&5
9783 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9784   echo $ac_n "(cached) $ac_c" 1>&6
9785 else
9786   cat > conftest.$ac_ext <<EOF
9787 #line 9788 "configure"
9788 #include "confdefs.h"
9789 /* System header to define __stub macros and hopefully few prototypes,
9790     which can conflict with char __res_query(); below.  */
9791 #include <assert.h>
9792 /* Override any gcc2 internal prototype to avoid an error.  */
9793 /* We use char because int might match the return type of a gcc2
9794     builtin and then its argument prototype would still apply.  */
9795 char __res_query();
9796 char (*f)();
9797
9798 int main() {
9799
9800 /* The GNU C library defines this for functions which it implements
9801     to always fail with ENOSYS.  Some functions are actually named
9802     something starting with __ and the normal name is an alias.  */
9803 #if defined (__stub___res_query) || defined (__stub_____res_query)
9804 choke me
9805 #else
9806 f = __res_query;
9807 #endif
9808
9809 ; return 0; }
9810 EOF
9811 if { (eval echo configure:9812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9812   rm -rf conftest*
9813   eval "ac_cv_func___res_query=yes"
9814 else
9815   echo "configure: failed program was:" >&5
9816   cat conftest.$ac_ext >&5
9817   rm -rf conftest*
9818   eval "ac_cv_func___res_query=no"
9819 fi
9820 rm -f conftest*
9821 fi
9822
9823 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9824   echo "$ac_t""yes" 1>&6
9825   :
9826 else
9827   echo "$ac_t""no" 1>&6
9828 fi
9829
9830         ac_cv_func_res_query=$ac_cv_func___res_query
9831 fi
9832
9833 if test $ac_cv_func_res_query = no ; then 
9834         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9835 echo "configure:9836: checking for res_query in -lbind" >&5
9836 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9837 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9838   echo $ac_n "(cached) $ac_c" 1>&6
9839 else
9840   ac_save_LIBS="$LIBS"
9841 LIBS="-lbind  $LIBS"
9842 cat > conftest.$ac_ext <<EOF
9843 #line 9844 "configure"
9844 #include "confdefs.h"
9845 /* Override any gcc2 internal prototype to avoid an error.  */
9846 /* We use char because int might match the return type of a gcc2
9847     builtin and then its argument prototype would still apply.  */
9848 char res_query();
9849
9850 int main() {
9851 res_query()
9852 ; return 0; }
9853 EOF
9854 if { (eval echo configure:9855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9855   rm -rf conftest*
9856   eval "ac_cv_lib_$ac_lib_var=yes"
9857 else
9858   echo "configure: failed program was:" >&5
9859   cat conftest.$ac_ext >&5
9860   rm -rf conftest*
9861   eval "ac_cv_lib_$ac_lib_var=no"
9862 fi
9863 rm -f conftest*
9864 LIBS="$ac_save_LIBS"
9865
9866 fi
9867 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9868   echo "$ac_t""yes" 1>&6
9869     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9870     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9871   cat >> confdefs.h <<EOF
9872 #define $ac_tr_lib 1
9873 EOF
9874
9875   LIBS="-lbind $LIBS"
9876
9877 else
9878   echo "$ac_t""no" 1>&6
9879 fi
9880
9881         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9882 fi
9883
9884 if test $ac_cv_func_res_query = no ; then 
9885         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9886 echo "configure:9887: checking for __res_query in -lbind" >&5
9887 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9888 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9889   echo $ac_n "(cached) $ac_c" 1>&6
9890 else
9891   ac_save_LIBS="$LIBS"
9892 LIBS="-lbind  $LIBS"
9893 cat > conftest.$ac_ext <<EOF
9894 #line 9895 "configure"
9895 #include "confdefs.h"
9896 /* Override any gcc2 internal prototype to avoid an error.  */
9897 /* We use char because int might match the return type of a gcc2
9898     builtin and then its argument prototype would still apply.  */
9899 char __res_query();
9900
9901 int main() {
9902 __res_query()
9903 ; return 0; }
9904 EOF
9905 if { (eval echo configure:9906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9906   rm -rf conftest*
9907   eval "ac_cv_lib_$ac_lib_var=yes"
9908 else
9909   echo "configure: failed program was:" >&5
9910   cat conftest.$ac_ext >&5
9911   rm -rf conftest*
9912   eval "ac_cv_lib_$ac_lib_var=no"
9913 fi
9914 rm -f conftest*
9915 LIBS="$ac_save_LIBS"
9916
9917 fi
9918 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9919   echo "$ac_t""yes" 1>&6
9920     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9921     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9922   cat >> confdefs.h <<EOF
9923 #define $ac_tr_lib 1
9924 EOF
9925
9926   LIBS="-lbind $LIBS"
9927
9928 else
9929   echo "$ac_t""no" 1>&6
9930 fi
9931
9932         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
9933 fi
9934
9935 if test $ac_cv_func_res_query = no ; then 
9936         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
9937 echo "configure:9938: checking for res_query in -lresolv" >&5
9938 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
9939 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9940   echo $ac_n "(cached) $ac_c" 1>&6
9941 else
9942   ac_save_LIBS="$LIBS"
9943 LIBS="-lresolv  $LIBS"
9944 cat > conftest.$ac_ext <<EOF
9945 #line 9946 "configure"
9946 #include "confdefs.h"
9947 /* Override any gcc2 internal prototype to avoid an error.  */
9948 /* We use char because int might match the return type of a gcc2
9949     builtin and then its argument prototype would still apply.  */
9950 char res_query();
9951
9952 int main() {
9953 res_query()
9954 ; return 0; }
9955 EOF
9956 if { (eval echo configure:9957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9957   rm -rf conftest*
9958   eval "ac_cv_lib_$ac_lib_var=yes"
9959 else
9960   echo "configure: failed program was:" >&5
9961   cat conftest.$ac_ext >&5
9962   rm -rf conftest*
9963   eval "ac_cv_lib_$ac_lib_var=no"
9964 fi
9965 rm -f conftest*
9966 LIBS="$ac_save_LIBS"
9967
9968 fi
9969 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9970   echo "$ac_t""yes" 1>&6
9971     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9972     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9973   cat >> confdefs.h <<EOF
9974 #define $ac_tr_lib 1
9975 EOF
9976
9977   LIBS="-lresolv $LIBS"
9978
9979 else
9980   echo "$ac_t""no" 1>&6
9981 fi
9982
9983         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
9984 fi
9985
9986 if test $ac_cv_func_res_query = no ; then 
9987         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
9988 echo "configure:9989: checking for __res_query in -lresolv" >&5
9989 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
9990 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9991   echo $ac_n "(cached) $ac_c" 1>&6
9992 else
9993   ac_save_LIBS="$LIBS"
9994 LIBS="-lresolv  $LIBS"
9995 cat > conftest.$ac_ext <<EOF
9996 #line 9997 "configure"
9997 #include "confdefs.h"
9998 /* Override any gcc2 internal prototype to avoid an error.  */
9999 /* We use char because int might match the return type of a gcc2
10000     builtin and then its argument prototype would still apply.  */
10001 char __res_query();
10002
10003 int main() {
10004 __res_query()
10005 ; return 0; }
10006 EOF
10007 if { (eval echo configure:10008: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10008   rm -rf conftest*
10009   eval "ac_cv_lib_$ac_lib_var=yes"
10010 else
10011   echo "configure: failed program was:" >&5
10012   cat conftest.$ac_ext >&5
10013   rm -rf conftest*
10014   eval "ac_cv_lib_$ac_lib_var=no"
10015 fi
10016 rm -f conftest*
10017 LIBS="$ac_save_LIBS"
10018
10019 fi
10020 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10021   echo "$ac_t""yes" 1>&6
10022     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10023     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10024   cat >> confdefs.h <<EOF
10025 #define $ac_tr_lib 1
10026 EOF
10027
10028   LIBS="-lresolv $LIBS"
10029
10030 else
10031   echo "$ac_t""no" 1>&6
10032 fi
10033
10034         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10035 fi
10036
10037 if test "$ac_cv_func_res_query" = yes ; then
10038         cat >> confdefs.h <<\EOF
10039 #define HAVE_RES_QUERY 1
10040 EOF
10041
10042
10043         if test $ol_enable_dnssrv != no ; then
10044                 ol_link_dnssrv=yes
10045         fi
10046 fi
10047
10048 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10049         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10050 fi
10051
10052 for ac_func in getaddrinfo gai_strerror inet_ntop 
10053 do
10054 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10055 echo "configure:10056: checking for $ac_func" >&5
10056 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10057   echo $ac_n "(cached) $ac_c" 1>&6
10058 else
10059   cat > conftest.$ac_ext <<EOF
10060 #line 10061 "configure"
10061 #include "confdefs.h"
10062 /* System header to define __stub macros and hopefully few prototypes,
10063     which can conflict with char $ac_func(); below.  */
10064 #include <assert.h>
10065 /* Override any gcc2 internal prototype to avoid an error.  */
10066 /* We use char because int might match the return type of a gcc2
10067     builtin and then its argument prototype would still apply.  */
10068 char $ac_func();
10069 char (*f)();
10070
10071 int main() {
10072
10073 /* The GNU C library defines this for functions which it implements
10074     to always fail with ENOSYS.  Some functions are actually named
10075     something starting with __ and the normal name is an alias.  */
10076 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10077 choke me
10078 #else
10079 f = $ac_func;
10080 #endif
10081
10082 ; return 0; }
10083 EOF
10084 if { (eval echo configure:10085: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10085   rm -rf conftest*
10086   eval "ac_cv_func_$ac_func=yes"
10087 else
10088   echo "configure: failed program was:" >&5
10089   cat conftest.$ac_ext >&5
10090   rm -rf conftest*
10091   eval "ac_cv_func_$ac_func=no"
10092 fi
10093 rm -f conftest*
10094 fi
10095
10096 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10097   echo "$ac_t""yes" 1>&6
10098     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10099   cat >> confdefs.h <<EOF
10100 #define $ac_tr_func 1
10101 EOF
10102  
10103 else
10104   echo "$ac_t""no" 1>&6
10105 fi
10106 done
10107
10108
10109 ol_link_ipv6=no
10110 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10111         if test $ol_enable_ipv6 = yes ; then
10112                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10113         fi
10114 elif test $ol_enable_ipv6 != no ; then
10115         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10116 echo "configure:10117: checking INET6_ADDRSTRLEN" >&5
10117 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10118   echo $ac_n "(cached) $ac_c" 1>&6
10119 else
10120   
10121                 cat > conftest.$ac_ext <<EOF
10122 #line 10123 "configure"
10123 #include "confdefs.h"
10124
10125 #                       include <netinet/in.h>
10126 #                       ifdef INET6_ADDRSTRLEN
10127                                 __has_inet6_addrstrlen__;
10128 #                       endif
10129                 
10130 EOF
10131 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10132   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10133   rm -rf conftest*
10134   ol_cv_inet6_addrstrlen=yes
10135 else
10136   rm -rf conftest*
10137   ol_cv_inet6_addrstrlen=no
10138 fi
10139 rm -f conftest*
10140
10141 fi
10142
10143 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10144
10145         if test $ol_cv_inet6_addrstrlen = yes ; then
10146                 ol_link_ipv6=yes
10147         elif test $ol_enable_ipv6 = yes ; then
10148                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10149         fi
10150 fi
10151
10152 if test $ol_enable_local != no ; then
10153         for ac_hdr in sys/un.h 
10154 do
10155 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10156 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10157 echo "configure:10158: checking for $ac_hdr" >&5
10158 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10159   echo $ac_n "(cached) $ac_c" 1>&6
10160 else
10161   cat > conftest.$ac_ext <<EOF
10162 #line 10163 "configure"
10163 #include "confdefs.h"
10164 #include <$ac_hdr>
10165 EOF
10166 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10167 { (eval echo configure:10168: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10168 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10169 if test -z "$ac_err"; then
10170   rm -rf conftest*
10171   eval "ac_cv_header_$ac_safe=yes"
10172 else
10173   echo "$ac_err" >&5
10174   echo "configure: failed program was:" >&5
10175   cat conftest.$ac_ext >&5
10176   rm -rf conftest*
10177   eval "ac_cv_header_$ac_safe=no"
10178 fi
10179 rm -f conftest*
10180 fi
10181 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10182   echo "$ac_t""yes" 1>&6
10183     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10184   cat >> confdefs.h <<EOF
10185 #define $ac_tr_hdr 1
10186 EOF
10187  
10188 else
10189   echo "$ac_t""no" 1>&6
10190 fi
10191 done
10192
10193
10194         if test $ol_enable_local = auto ; then
10195                 ol_enable_local=$ac_cv_header_sys_un_h
10196         elif test $ac_cv_header_sys_un_h = no ; then
10197                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10198         fi
10199 fi
10200
10201 ol_link_kbind=no
10202 ol_link_kpasswd=no
10203 ol_link_krb5=no
10204 ol_link_krb4=no
10205
10206 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10207         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10208         -o $ol_with_kerberos = k425 ; then
10209
10210         for ac_hdr in krb5.h
10211 do
10212 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10213 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10214 echo "configure:10215: checking for $ac_hdr" >&5
10215 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10216   echo $ac_n "(cached) $ac_c" 1>&6
10217 else
10218   cat > conftest.$ac_ext <<EOF
10219 #line 10220 "configure"
10220 #include "confdefs.h"
10221 #include <$ac_hdr>
10222 EOF
10223 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10224 { (eval echo configure:10225: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10225 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10226 if test -z "$ac_err"; then
10227   rm -rf conftest*
10228   eval "ac_cv_header_$ac_safe=yes"
10229 else
10230   echo "$ac_err" >&5
10231   echo "configure: failed program was:" >&5
10232   cat conftest.$ac_ext >&5
10233   rm -rf conftest*
10234   eval "ac_cv_header_$ac_safe=no"
10235 fi
10236 rm -f conftest*
10237 fi
10238 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10239   echo "$ac_t""yes" 1>&6
10240     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10241   cat >> confdefs.h <<EOF
10242 #define $ac_tr_hdr 1
10243 EOF
10244  
10245 else
10246   echo "$ac_t""no" 1>&6
10247 fi
10248 done
10249
10250
10251         if test $ac_cv_header_krb5_h = yes ; then
10252                                 for ac_hdr in heim_err.h
10253 do
10254 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10255 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10256 echo "configure:10257: checking for $ac_hdr" >&5
10257 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10258   echo $ac_n "(cached) $ac_c" 1>&6
10259 else
10260   cat > conftest.$ac_ext <<EOF
10261 #line 10262 "configure"
10262 #include "confdefs.h"
10263 #include <$ac_hdr>
10264 EOF
10265 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10266 { (eval echo configure:10267: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10267 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10268 if test -z "$ac_err"; then
10269   rm -rf conftest*
10270   eval "ac_cv_header_$ac_safe=yes"
10271 else
10272   echo "$ac_err" >&5
10273   echo "configure: failed program was:" >&5
10274   cat conftest.$ac_ext >&5
10275   rm -rf conftest*
10276   eval "ac_cv_header_$ac_safe=no"
10277 fi
10278 rm -f conftest*
10279 fi
10280 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10281   echo "$ac_t""yes" 1>&6
10282     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10283   cat >> confdefs.h <<EOF
10284 #define $ac_tr_hdr 1
10285 EOF
10286  
10287 else
10288   echo "$ac_t""no" 1>&6
10289 fi
10290 done
10291
10292                 if test $ac_cv_header_heim_err_h = yes ; then
10293                         krb5_impl=heimdal
10294                 else
10295                         krb5_impl=mit
10296                 fi
10297
10298                 if test $krb5_impl = mit; then
10299                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10300 echo "configure:10301: checking for main in -lk5crypto" >&5
10301 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10302 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10303   echo $ac_n "(cached) $ac_c" 1>&6
10304 else
10305   ac_save_LIBS="$LIBS"
10306 LIBS="-lk5crypto  $LIBS"
10307 cat > conftest.$ac_ext <<EOF
10308 #line 10309 "configure"
10309 #include "confdefs.h"
10310
10311 int main() {
10312 main()
10313 ; return 0; }
10314 EOF
10315 if { (eval echo configure:10316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10316   rm -rf conftest*
10317   eval "ac_cv_lib_$ac_lib_var=yes"
10318 else
10319   echo "configure: failed program was:" >&5
10320   cat conftest.$ac_ext >&5
10321   rm -rf conftest*
10322   eval "ac_cv_lib_$ac_lib_var=no"
10323 fi
10324 rm -f conftest*
10325 LIBS="$ac_save_LIBS"
10326
10327 fi
10328 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10329   echo "$ac_t""yes" 1>&6
10330   krb5crypto=k5crypto
10331 else
10332   echo "$ac_t""no" 1>&6
10333 krb5crypto=crypto
10334 fi
10335
10336
10337                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10338 echo "configure:10339: checking for main in -lkrb5" >&5
10339 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10340 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10341   echo $ac_n "(cached) $ac_c" 1>&6
10342 else
10343   ac_save_LIBS="$LIBS"
10344 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10345 cat > conftest.$ac_ext <<EOF
10346 #line 10347 "configure"
10347 #include "confdefs.h"
10348
10349 int main() {
10350 main()
10351 ; return 0; }
10352 EOF
10353 if { (eval echo configure:10354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10354   rm -rf conftest*
10355   eval "ac_cv_lib_$ac_lib_var=yes"
10356 else
10357   echo "configure: failed program was:" >&5
10358   cat conftest.$ac_ext >&5
10359   rm -rf conftest*
10360   eval "ac_cv_lib_$ac_lib_var=no"
10361 fi
10362 rm -f conftest*
10363 LIBS="$ac_save_LIBS"
10364
10365 fi
10366 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10367   echo "$ac_t""yes" 1>&6
10368   have_krb5=yes
10369                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10370 else
10371   echo "$ac_t""no" 1>&6
10372 have_krb5=no
10373 fi
10374
10375
10376                 elif test $krb5_impl = heimdal; then
10377                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10378 echo "configure:10379: checking for main in -lkrb5" >&5
10379 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10380 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10381   echo $ac_n "(cached) $ac_c" 1>&6
10382 else
10383   ac_save_LIBS="$LIBS"
10384 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
10385 cat > conftest.$ac_ext <<EOF
10386 #line 10387 "configure"
10387 #include "confdefs.h"
10388
10389 int main() {
10390 main()
10391 ; return 0; }
10392 EOF
10393 if { (eval echo configure:10394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10394   rm -rf conftest*
10395   eval "ac_cv_lib_$ac_lib_var=yes"
10396 else
10397   echo "configure: failed program was:" >&5
10398   cat conftest.$ac_ext >&5
10399   rm -rf conftest*
10400   eval "ac_cv_lib_$ac_lib_var=no"
10401 fi
10402 rm -f conftest*
10403 LIBS="$ac_save_LIBS"
10404
10405 fi
10406 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10407   echo "$ac_t""yes" 1>&6
10408   have_krb5=yes
10409                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
10410 else
10411   echo "$ac_t""no" 1>&6
10412 have_krb5=no
10413 fi
10414
10415
10416                         cat >> confdefs.h <<\EOF
10417 #define HAVE_HEIMDAL_KERBEROS 1
10418 EOF
10419
10420
10421                 else
10422                         have_krb5=no
10423                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10424                 fi
10425
10426                 if test $have_krb5 = yes ; then
10427                         ol_link_krb5=yes
10428
10429                         cat >> confdefs.h <<\EOF
10430 #define HAVE_KRB5 1
10431 EOF
10432
10433
10434                         if test $ol_enable_kpasswd != no ; then
10435                                 ol_link_kpasswd=yes;
10436                         fi
10437
10438                         if test $ol_with_kerberos = k5only ; then
10439                                 ol_with_kerberos=found
10440                         fi
10441
10442                 elif test $ol_with_kerberos != auto ; then
10443                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10444                 fi
10445
10446         fi
10447 fi
10448
10449 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10450         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10451
10452         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10453 do
10454 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10455 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10456 echo "configure:10457: checking for $ac_hdr" >&5
10457 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10458   echo $ac_n "(cached) $ac_c" 1>&6
10459 else
10460   cat > conftest.$ac_ext <<EOF
10461 #line 10462 "configure"
10462 #include "confdefs.h"
10463 #include <$ac_hdr>
10464 EOF
10465 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10466 { (eval echo configure:10467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10467 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10468 if test -z "$ac_err"; then
10469   rm -rf conftest*
10470   eval "ac_cv_header_$ac_safe=yes"
10471 else
10472   echo "$ac_err" >&5
10473   echo "configure: failed program was:" >&5
10474   cat conftest.$ac_ext >&5
10475   rm -rf conftest*
10476   eval "ac_cv_header_$ac_safe=no"
10477 fi
10478 rm -f conftest*
10479 fi
10480 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10481   echo "$ac_t""yes" 1>&6
10482     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10483   cat >> confdefs.h <<EOF
10484 #define $ac_tr_hdr 1
10485 EOF
10486  
10487 else
10488   echo "$ac_t""no" 1>&6
10489 fi
10490 done
10491
10492
10493         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10494                 if test $krb5_impl = mit; then
10495                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10496 echo "configure:10497: checking for main in -lkrb4" >&5
10497 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10498 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10499   echo $ac_n "(cached) $ac_c" 1>&6
10500 else
10501   ac_save_LIBS="$LIBS"
10502 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10503 cat > conftest.$ac_ext <<EOF
10504 #line 10505 "configure"
10505 #include "confdefs.h"
10506
10507 int main() {
10508 main()
10509 ; return 0; }
10510 EOF
10511 if { (eval echo configure:10512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10512   rm -rf conftest*
10513   eval "ac_cv_lib_$ac_lib_var=yes"
10514 else
10515   echo "configure: failed program was:" >&5
10516   cat conftest.$ac_ext >&5
10517   rm -rf conftest*
10518   eval "ac_cv_lib_$ac_lib_var=no"
10519 fi
10520 rm -f conftest*
10521 LIBS="$ac_save_LIBS"
10522
10523 fi
10524 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10525   echo "$ac_t""yes" 1>&6
10526   have_k425=yes
10527                                 KRB4_LIBS="-lkrb4 -ldes425"
10528 else
10529   echo "$ac_t""no" 1>&6
10530 have_k425=no
10531 fi
10532
10533
10534                 elif test $krb5_impl = heimdal; then
10535                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10536 echo "configure:10537: checking for main in -lkrb4" >&5
10537 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10538 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10539   echo $ac_n "(cached) $ac_c" 1>&6
10540 else
10541   ac_save_LIBS="$LIBS"
10542 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
10543 cat > conftest.$ac_ext <<EOF
10544 #line 10545 "configure"
10545 #include "confdefs.h"
10546
10547 int main() {
10548 main()
10549 ; return 0; }
10550 EOF
10551 if { (eval echo configure:10552: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10552   rm -rf conftest*
10553   eval "ac_cv_lib_$ac_lib_var=yes"
10554 else
10555   echo "configure: failed program was:" >&5
10556   cat conftest.$ac_ext >&5
10557   rm -rf conftest*
10558   eval "ac_cv_lib_$ac_lib_var=no"
10559 fi
10560 rm -f conftest*
10561 LIBS="$ac_save_LIBS"
10562
10563 fi
10564 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10565   echo "$ac_t""yes" 1>&6
10566   have_k425=yes
10567                                 KRB4_LIBS="-lkrb4"
10568 else
10569   echo "$ac_t""no" 1>&6
10570 have_k425=no
10571 fi
10572
10573
10574                 else
10575                         have_425=no
10576                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10577                 fi
10578
10579                 if test $have_k425 = yes ; then
10580                         ol_with_kerberos=found
10581                         ol_link_krb4=yes
10582
10583                         cat >> confdefs.h <<\EOF
10584 #define HAVE_KRB425 1
10585 EOF
10586
10587                         cat >> confdefs.h <<\EOF
10588 #define HAVE_KRB4 1
10589 EOF
10590
10591
10592                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10593 echo "configure:10594: checking for des_debug in Kerberos libraries" >&5
10594 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10595   echo $ac_n "(cached) $ac_c" 1>&6
10596 else
10597   
10598                                                                 save_LIBS="$LIBS"
10599                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10600                                 cat > conftest.$ac_ext <<EOF
10601 #line 10602 "configure"
10602 #include "confdefs.h"
10603
10604 #include <kerberosIV/krb.h>
10605 #include <kerberosIV/des.h>
10606 extern int des_debug;
10607
10608 int main() {
10609
10610 des_debug = 1;
10611
10612 ; return 0; }
10613 EOF
10614 if { (eval echo configure:10615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10615   rm -rf conftest*
10616   ol_cv_var_des_debug=yes
10617 else
10618   echo "configure: failed program was:" >&5
10619   cat conftest.$ac_ext >&5
10620   rm -rf conftest*
10621   ol_cv_var_des_debug=no
10622 fi
10623 rm -f conftest*
10624                                                                 LIBS="$save_LIBS"
10625                         
10626 fi
10627
10628 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10629
10630                         if test $ol_cv_var_des_debug = yes ; then
10631                                 cat >> confdefs.h <<\EOF
10632 #define HAVE_DES_DEBUG 1
10633 EOF
10634
10635                         fi
10636
10637                         LIBS="$save_LIBS"
10638                 fi
10639         fi
10640 fi
10641
10642 if test $ol_link_krb5 = yes ; then
10643         ol_with_kerberos=found
10644 fi
10645
10646 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10647         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10648
10649         for ac_hdr in krb.h des.h krb-archaeology.h 
10650 do
10651 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10652 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10653 echo "configure:10654: checking for $ac_hdr" >&5
10654 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10655   echo $ac_n "(cached) $ac_c" 1>&6
10656 else
10657   cat > conftest.$ac_ext <<EOF
10658 #line 10659 "configure"
10659 #include "confdefs.h"
10660 #include <$ac_hdr>
10661 EOF
10662 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10663 { (eval echo configure:10664: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10664 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10665 if test -z "$ac_err"; then
10666   rm -rf conftest*
10667   eval "ac_cv_header_$ac_safe=yes"
10668 else
10669   echo "$ac_err" >&5
10670   echo "configure: failed program was:" >&5
10671   cat conftest.$ac_ext >&5
10672   rm -rf conftest*
10673   eval "ac_cv_header_$ac_safe=no"
10674 fi
10675 rm -f conftest*
10676 fi
10677 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10678   echo "$ac_t""yes" 1>&6
10679     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10680   cat >> confdefs.h <<EOF
10681 #define $ac_tr_hdr 1
10682 EOF
10683  
10684 else
10685   echo "$ac_t""no" 1>&6
10686 fi
10687 done
10688
10689
10690         if test $ac_cv_header_krb_h = yes ; then
10691                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10692 echo "configure:10693: checking for main in -lkrb" >&5
10693 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10694 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10695   echo $ac_n "(cached) $ac_c" 1>&6
10696 else
10697   ac_save_LIBS="$LIBS"
10698 LIBS="-lkrb -ldes $LIBS"
10699 cat > conftest.$ac_ext <<EOF
10700 #line 10701 "configure"
10701 #include "confdefs.h"
10702
10703 int main() {
10704 main()
10705 ; return 0; }
10706 EOF
10707 if { (eval echo configure:10708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10708   rm -rf conftest*
10709   eval "ac_cv_lib_$ac_lib_var=yes"
10710 else
10711   echo "configure: failed program was:" >&5
10712   cat conftest.$ac_ext >&5
10713   rm -rf conftest*
10714   eval "ac_cv_lib_$ac_lib_var=no"
10715 fi
10716 rm -f conftest*
10717 LIBS="$ac_save_LIBS"
10718
10719 fi
10720 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10721   echo "$ac_t""yes" 1>&6
10722   have_k4=yes
10723 else
10724   echo "$ac_t""no" 1>&6
10725 have_k4=no
10726 fi
10727
10728
10729                 if test $have_k4 = yes ; then
10730                         ol_with_kerberos=found
10731                         ol_link_krb4=yes
10732
10733                         cat >> confdefs.h <<\EOF
10734 #define HAVE_KRB4 1
10735 EOF
10736
10737
10738                         KRB4_LIBS="-lkrb -ldes"
10739
10740                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10741                                 cat >> confdefs.h <<\EOF
10742 #define HAVE_KTH_KERBEROS 1
10743 EOF
10744
10745                         fi
10746                 fi
10747         fi
10748 fi
10749
10750 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10751         ol_link_kpasswd=yes
10752 fi
10753
10754 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10755         ol_link_kbind=yes
10756
10757 elif test $ol_enable_kbind = yes ; then
10758         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10759 fi
10760
10761 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10762         cat >> confdefs.h <<\EOF
10763 #define HAVE_KERBEROS 1
10764 EOF
10765
10766
10767 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10768         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10769 fi
10770
10771 ol_link_tls=no
10772 if test $ol_with_tls != no ; then
10773         for ac_hdr in openssl/ssl.h ssl.h
10774 do
10775 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10776 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10777 echo "configure:10778: checking for $ac_hdr" >&5
10778 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10779   echo $ac_n "(cached) $ac_c" 1>&6
10780 else
10781   cat > conftest.$ac_ext <<EOF
10782 #line 10783 "configure"
10783 #include "confdefs.h"
10784 #include <$ac_hdr>
10785 EOF
10786 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10787 { (eval echo configure:10788: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10788 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10789 if test -z "$ac_err"; then
10790   rm -rf conftest*
10791   eval "ac_cv_header_$ac_safe=yes"
10792 else
10793   echo "$ac_err" >&5
10794   echo "configure: failed program was:" >&5
10795   cat conftest.$ac_ext >&5
10796   rm -rf conftest*
10797   eval "ac_cv_header_$ac_safe=no"
10798 fi
10799 rm -f conftest*
10800 fi
10801 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10802   echo "$ac_t""yes" 1>&6
10803     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10804   cat >> confdefs.h <<EOF
10805 #define $ac_tr_hdr 1
10806 EOF
10807  
10808 else
10809   echo "$ac_t""no" 1>&6
10810 fi
10811 done
10812
10813         
10814         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
10815                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10816 echo "configure:10817: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10817 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10818 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10819   echo $ac_n "(cached) $ac_c" 1>&6
10820 else
10821   ac_save_LIBS="$LIBS"
10822 LIBS="-lssl -lcrypto $LIBS"
10823 cat > conftest.$ac_ext <<EOF
10824 #line 10825 "configure"
10825 #include "confdefs.h"
10826 /* Override any gcc2 internal prototype to avoid an error.  */
10827 /* We use char because int might match the return type of a gcc2
10828     builtin and then its argument prototype would still apply.  */
10829 char SSLeay_add_ssl_algorithms();
10830
10831 int main() {
10832 SSLeay_add_ssl_algorithms()
10833 ; return 0; }
10834 EOF
10835 if { (eval echo configure:10836: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10836   rm -rf conftest*
10837   eval "ac_cv_lib_$ac_lib_var=yes"
10838 else
10839   echo "configure: failed program was:" >&5
10840   cat conftest.$ac_ext >&5
10841   rm -rf conftest*
10842   eval "ac_cv_lib_$ac_lib_var=no"
10843 fi
10844 rm -f conftest*
10845 LIBS="$ac_save_LIBS"
10846
10847 fi
10848 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10849   echo "$ac_t""yes" 1>&6
10850   have_ssleay=yes
10851                         need_rsaref=no
10852 else
10853   echo "$ac_t""no" 1>&6
10854 have_ssleay=no
10855 fi
10856
10857                         
10858                 if test $have_ssleay = no ; then
10859                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
10860 echo "configure:10861: checking for SSL_library_init in -lssl" >&5
10861 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
10862 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10863   echo $ac_n "(cached) $ac_c" 1>&6
10864 else
10865   ac_save_LIBS="$LIBS"
10866 LIBS="-lssl -lcrypto $LIBS"
10867 cat > conftest.$ac_ext <<EOF
10868 #line 10869 "configure"
10869 #include "confdefs.h"
10870 /* Override any gcc2 internal prototype to avoid an error.  */
10871 /* We use char because int might match the return type of a gcc2
10872     builtin and then its argument prototype would still apply.  */
10873 char SSL_library_init();
10874
10875 int main() {
10876 SSL_library_init()
10877 ; return 0; }
10878 EOF
10879 if { (eval echo configure:10880: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10880   rm -rf conftest*
10881   eval "ac_cv_lib_$ac_lib_var=yes"
10882 else
10883   echo "configure: failed program was:" >&5
10884   cat conftest.$ac_ext >&5
10885   rm -rf conftest*
10886   eval "ac_cv_lib_$ac_lib_var=no"
10887 fi
10888 rm -f conftest*
10889 LIBS="$ac_save_LIBS"
10890
10891 fi
10892 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10893   echo "$ac_t""yes" 1>&6
10894   have_ssleay=yes
10895                                 need_rsaref=no
10896 else
10897   echo "$ac_t""no" 1>&6
10898 have_ssleay=no
10899 fi
10900
10901                 fi
10902
10903                 if test $have_ssleay = no ; then
10904                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
10905 echo "configure:10906: checking for ssl3_accept in -lssl" >&5
10906 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
10907 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10908   echo $ac_n "(cached) $ac_c" 1>&6
10909 else
10910   ac_save_LIBS="$LIBS"
10911 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
10912 cat > conftest.$ac_ext <<EOF
10913 #line 10914 "configure"
10914 #include "confdefs.h"
10915 /* Override any gcc2 internal prototype to avoid an error.  */
10916 /* We use char because int might match the return type of a gcc2
10917     builtin and then its argument prototype would still apply.  */
10918 char ssl3_accept();
10919
10920 int main() {
10921 ssl3_accept()
10922 ; return 0; }
10923 EOF
10924 if { (eval echo configure:10925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10925   rm -rf conftest*
10926   eval "ac_cv_lib_$ac_lib_var=yes"
10927 else
10928   echo "configure: failed program was:" >&5
10929   cat conftest.$ac_ext >&5
10930   rm -rf conftest*
10931   eval "ac_cv_lib_$ac_lib_var=no"
10932 fi
10933 rm -f conftest*
10934 LIBS="$ac_save_LIBS"
10935
10936 fi
10937 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10938   echo "$ac_t""yes" 1>&6
10939   have_ssleay=yes
10940                                 need_rsaref=yes
10941 else
10942   echo "$ac_t""no" 1>&6
10943 have_ssleay=no
10944 fi
10945
10946                 fi
10947
10948                 if test $have_ssleay = yes ; then
10949                         ol_with_tls=found
10950                         ol_link_tls=yes
10951
10952                         cat >> confdefs.h <<\EOF
10953 #define HAVE_SSLEAY 1
10954 EOF
10955
10956
10957                         if test $need_rsaref = yes; then
10958                                 cat >> confdefs.h <<\EOF
10959 #define HAVE_RSAREF 1
10960 EOF
10961
10962
10963                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
10964                         else
10965                                 TLS_LIBS="-lssl -lcrypto"
10966                         fi
10967                 fi
10968         fi
10969
10970 else
10971         echo "configure: warning: TLS privacy protection not supported!" 1>&2
10972 fi
10973
10974 if test $ol_link_tls = yes ; then
10975         cat >> confdefs.h <<\EOF
10976 #define HAVE_TLS 1
10977 EOF
10978
10979
10980 elif test $ol_with_tls = auto ; then
10981         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
10982         echo "configure: warning: TLS privacy protection not supported!" 1>&2
10983
10984 elif test $ol_with_tls != no ; then
10985         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
10986 fi
10987
10988 if test $ol_enable_lmpasswd != no; then
10989         if test $ol_link_tls != yes ; then
10990                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
10991         fi
10992
10993         cat >> confdefs.h <<\EOF
10994 #define SLAPD_LMHASH 1
10995 EOF
10996
10997 fi
10998
10999 for ac_func in \
11000         ctime_r                 \
11001         gethostbyname_r gethostbyaddr_r \
11002
11003 do
11004 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11005 echo "configure:11006: checking for $ac_func" >&5
11006 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11007   echo $ac_n "(cached) $ac_c" 1>&6
11008 else
11009   cat > conftest.$ac_ext <<EOF
11010 #line 11011 "configure"
11011 #include "confdefs.h"
11012 /* System header to define __stub macros and hopefully few prototypes,
11013     which can conflict with char $ac_func(); below.  */
11014 #include <assert.h>
11015 /* Override any gcc2 internal prototype to avoid an error.  */
11016 /* We use char because int might match the return type of a gcc2
11017     builtin and then its argument prototype would still apply.  */
11018 char $ac_func();
11019 char (*f)();
11020
11021 int main() {
11022
11023 /* The GNU C library defines this for functions which it implements
11024     to always fail with ENOSYS.  Some functions are actually named
11025     something starting with __ and the normal name is an alias.  */
11026 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11027 choke me
11028 #else
11029 f = $ac_func;
11030 #endif
11031
11032 ; return 0; }
11033 EOF
11034 if { (eval echo configure:11035: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11035   rm -rf conftest*
11036   eval "ac_cv_func_$ac_func=yes"
11037 else
11038   echo "configure: failed program was:" >&5
11039   cat conftest.$ac_ext >&5
11040   rm -rf conftest*
11041   eval "ac_cv_func_$ac_func=no"
11042 fi
11043 rm -f conftest*
11044 fi
11045
11046 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11047   echo "$ac_t""yes" 1>&6
11048     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11049   cat >> confdefs.h <<EOF
11050 #define $ac_tr_func 1
11051 EOF
11052  
11053 else
11054   echo "$ac_t""no" 1>&6
11055 fi
11056 done
11057
11058
11059 if test "$ac_cv_func_ctime_r" = no ; then
11060         ol_cv_func_ctime_r_nargs=0
11061 else
11062         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11063 echo "configure:11064: checking number of arguments of ctime_r" >&5
11064 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11065   echo $ac_n "(cached) $ac_c" 1>&6
11066 else
11067   cat > conftest.$ac_ext <<EOF
11068 #line 11069 "configure"
11069 #include "confdefs.h"
11070 #include <time.h>
11071 int main() {
11072 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11073 ; return 0; }
11074 EOF
11075 if { (eval echo configure:11076: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11076   rm -rf conftest*
11077   ol_cv_func_ctime_r_nargs3=yes
11078 else
11079   echo "configure: failed program was:" >&5
11080   cat conftest.$ac_ext >&5
11081   rm -rf conftest*
11082   ol_cv_func_ctime_r_nargs3=no
11083 fi
11084 rm -f conftest*
11085
11086         cat > conftest.$ac_ext <<EOF
11087 #line 11088 "configure"
11088 #include "confdefs.h"
11089 #include <time.h>
11090 int main() {
11091 time_t ti; char *buffer; ctime_r(&ti,buffer);
11092 ; return 0; }
11093 EOF
11094 if { (eval echo configure:11095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11095   rm -rf conftest*
11096   ol_cv_func_ctime_r_nargs2=yes
11097 else
11098   echo "configure: failed program was:" >&5
11099   cat conftest.$ac_ext >&5
11100   rm -rf conftest*
11101   ol_cv_func_ctime_r_nargs2=no
11102 fi
11103 rm -f conftest*
11104
11105         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11106                 $ol_cv_func_ctime_r_nargs2 = no ; then
11107
11108                 ol_cv_func_ctime_r_nargs=3
11109
11110         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11111                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11112
11113                 ol_cv_func_ctime_r_nargs=2
11114
11115         else
11116                 ol_cv_func_ctime_r_nargs=0
11117         fi
11118   
11119 fi
11120
11121 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11122
11123   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11124         cat >> confdefs.h <<EOF
11125 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11126 EOF
11127
11128   fi
11129
11130 fi
11131
11132 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11133         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11134 echo "configure:11135: checking number of arguments of gethostbyname_r" >&5
11135 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11136   echo $ac_n "(cached) $ac_c" 1>&6
11137 else
11138   cat > conftest.$ac_ext <<EOF
11139 #line 11140 "configure"
11140 #include "confdefs.h"
11141 #include <sys/types.h>
11142 #include <sys/socket.h>
11143 #include <netinet/in.h>
11144 #include <netdb.h>
11145 #define BUFSIZE (sizeof(struct hostent)+10)
11146 int main() {
11147 struct hostent hent; char buffer[BUFSIZE];
11148                 int bufsize=BUFSIZE;int h_errno;
11149                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11150                         buffer, bufsize, &h_errno);
11151 ; return 0; }
11152 EOF
11153 if { (eval echo configure:11154: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11154   rm -rf conftest*
11155   ol_cv_func_gethostbyname_r_nargs5=yes
11156 else
11157   echo "configure: failed program was:" >&5
11158   cat conftest.$ac_ext >&5
11159   rm -rf conftest*
11160   ol_cv_func_gethostbyname_r_nargs5=no
11161 fi
11162 rm -f conftest*
11163
11164         cat > conftest.$ac_ext <<EOF
11165 #line 11166 "configure"
11166 #include "confdefs.h"
11167 #include <sys/types.h>
11168 #include <sys/socket.h>
11169 #include <netinet/in.h>
11170 #include <netdb.h>
11171 #define BUFSIZE (sizeof(struct hostent)+10)
11172 int main() {
11173 struct hostent hent;struct hostent *rhent;
11174                 char buffer[BUFSIZE];
11175                 int bufsize=BUFSIZE;int h_errno;
11176                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11177                         &rhent, &h_errno);
11178 ; return 0; }
11179 EOF
11180 if { (eval echo configure:11181: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11181   rm -rf conftest*
11182   ol_cv_func_gethostbyname_r_nargs6=yes
11183 else
11184   echo "configure: failed program was:" >&5
11185   cat conftest.$ac_ext >&5
11186   rm -rf conftest*
11187   ol_cv_func_gethostbyname_r_nargs6=no
11188 fi
11189 rm -f conftest*
11190
11191         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11192                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11193
11194                 ol_cv_func_gethostbyname_r_nargs=5
11195
11196         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11197                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11198
11199                 ol_cv_func_gethostbyname_r_nargs=6
11200
11201         else
11202                 ol_cv_func_gethostbyname_r_nargs=0
11203         fi
11204   
11205 fi
11206
11207 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11208   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11209         cat >> confdefs.h <<EOF
11210 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11211 EOF
11212
11213   fi
11214
11215 else
11216         ol_cv_func_gethostbyname_r_nargs=0
11217 fi
11218  
11219 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11220         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11221 echo "configure:11222: checking number of arguments of gethostbyaddr_r" >&5
11222 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11223   echo $ac_n "(cached) $ac_c" 1>&6
11224 else
11225   cat > conftest.$ac_ext <<EOF
11226 #line 11227 "configure"
11227 #include "confdefs.h"
11228 #include <sys/types.h>
11229 #include <sys/socket.h>
11230 #include <netinet/in.h>
11231 #include <netdb.h>
11232 #define BUFSIZE (sizeof(struct hostent)+10)
11233 int main() {
11234 struct hostent hent; char buffer[BUFSIZE]; 
11235             struct in_addr add;
11236             size_t alen=sizeof(struct in_addr);
11237             int bufsize=BUFSIZE;int h_errno;
11238                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11239                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11240 ; return 0; }
11241 EOF
11242 if { (eval echo configure:11243: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11243   rm -rf conftest*
11244   ol_cv_func_gethostbyaddr_r_nargs7=yes
11245 else
11246   echo "configure: failed program was:" >&5
11247   cat conftest.$ac_ext >&5
11248   rm -rf conftest*
11249   ol_cv_func_gethostbyaddr_r_nargs7=no
11250 fi
11251 rm -f conftest*
11252
11253         cat > conftest.$ac_ext <<EOF
11254 #line 11255 "configure"
11255 #include "confdefs.h"
11256 #include <sys/types.h>
11257 #include <sys/socket.h>
11258 #include <netinet/in.h>
11259 #include <netdb.h>
11260 #define BUFSIZE (sizeof(struct hostent)+10)
11261 int main() {
11262 struct hostent hent;
11263                 struct hostent *rhent; char buffer[BUFSIZE]; 
11264                 struct in_addr add;
11265                 size_t alen=sizeof(struct in_addr);
11266                 int bufsize=BUFSIZE;int h_errno;
11267                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11268                         alen, AF_INET, &hent, buffer, bufsize, 
11269                         &rhent, &h_errno);
11270 ; return 0; }
11271 EOF
11272 if { (eval echo configure:11273: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11273   rm -rf conftest*
11274   ol_cv_func_gethostbyaddr_r_nargs8=yes
11275 else
11276   echo "configure: failed program was:" >&5
11277   cat conftest.$ac_ext >&5
11278   rm -rf conftest*
11279   ol_cv_func_gethostbyaddr_r_nargs8=no
11280 fi
11281 rm -f conftest*
11282
11283         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11284                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11285
11286                 ol_cv_func_gethostbyaddr_r_nargs=7
11287
11288         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11289                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11290
11291                 ol_cv_func_gethostbyaddr_r_nargs=8
11292
11293         else
11294                 ol_cv_func_gethostbyaddr_r_nargs=0
11295         fi
11296   
11297 fi
11298
11299 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11300   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11301     cat >> confdefs.h <<EOF
11302 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11303 EOF
11304
11305   fi
11306
11307 else
11308         ol_cv_func_gethostbyaddr_r_nargs=0
11309 fi
11310
11311 if test "$ac_cv_func_ctime_r" = yes \
11312         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11313         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11314         -a "$ac_cv_func_gethostbyname_r" = yes \
11315         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11316         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11317         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11318         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11319         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11320         ; then
11321  
11322         cat >> confdefs.h <<\EOF
11323 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11324 EOF
11325
11326 fi
11327
11328 ol_link_threads=no
11329
11330 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11331         -o $ol_with_threads = nt ; then
11332
11333         
11334         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11335 echo "configure:11336: checking for _beginthread" >&5
11336 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11337   echo $ac_n "(cached) $ac_c" 1>&6
11338 else
11339   cat > conftest.$ac_ext <<EOF
11340 #line 11341 "configure"
11341 #include "confdefs.h"
11342 /* System header to define __stub macros and hopefully few prototypes,
11343     which can conflict with char _beginthread(); below.  */
11344 #include <assert.h>
11345 /* Override any gcc2 internal prototype to avoid an error.  */
11346 /* We use char because int might match the return type of a gcc2
11347     builtin and then its argument prototype would still apply.  */
11348 char _beginthread();
11349 char (*f)();
11350
11351 int main() {
11352
11353 /* The GNU C library defines this for functions which it implements
11354     to always fail with ENOSYS.  Some functions are actually named
11355     something starting with __ and the normal name is an alias.  */
11356 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11357 choke me
11358 #else
11359 f = _beginthread;
11360 #endif
11361
11362 ; return 0; }
11363 EOF
11364 if { (eval echo configure:11365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11365   rm -rf conftest*
11366   eval "ac_cv_func__beginthread=yes"
11367 else
11368   echo "configure: failed program was:" >&5
11369   cat conftest.$ac_ext >&5
11370   rm -rf conftest*
11371   eval "ac_cv_func__beginthread=no"
11372 fi
11373 rm -f conftest*
11374 fi
11375
11376 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11377   echo "$ac_t""yes" 1>&6
11378   :
11379 else
11380   echo "$ac_t""no" 1>&6
11381 fi
11382
11383
11384         if test $ac_cv_func__beginthread = yes ; then
11385                 cat >> confdefs.h <<\EOF
11386 #define HAVE_NT_THREADS 1
11387 EOF
11388
11389                 ol_cv_nt_threads=yes
11390         fi
11391
11392
11393         if test "$ol_cv_nt_threads" = yes ; then
11394                 ol_link_threads=nt
11395                 ol_with_threads=found
11396                 ol_with_yielding_select=yes
11397
11398                 cat >> confdefs.h <<\EOF
11399 #define HAVE_NT_SERVICE_MANAGER 1
11400 EOF
11401
11402                 cat >> confdefs.h <<\EOF
11403 #define HAVE_NT_EVENT_LOG 1
11404 EOF
11405
11406         fi
11407
11408         if test $ol_with_threads = nt ; then
11409                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11410         fi
11411 fi
11412
11413 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11414         -o $ol_with_threads = posix ; then
11415
11416         for ac_hdr in pthread.h
11417 do
11418 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11419 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11420 echo "configure:11421: checking for $ac_hdr" >&5
11421 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11422   echo $ac_n "(cached) $ac_c" 1>&6
11423 else
11424   cat > conftest.$ac_ext <<EOF
11425 #line 11426 "configure"
11426 #include "confdefs.h"
11427 #include <$ac_hdr>
11428 EOF
11429 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11430 { (eval echo configure:11431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11431 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11432 if test -z "$ac_err"; then
11433   rm -rf conftest*
11434   eval "ac_cv_header_$ac_safe=yes"
11435 else
11436   echo "$ac_err" >&5
11437   echo "configure: failed program was:" >&5
11438   cat conftest.$ac_ext >&5
11439   rm -rf conftest*
11440   eval "ac_cv_header_$ac_safe=no"
11441 fi
11442 rm -f conftest*
11443 fi
11444 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11445   echo "$ac_t""yes" 1>&6
11446     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11447   cat >> confdefs.h <<EOF
11448 #define $ac_tr_hdr 1
11449 EOF
11450  
11451 else
11452   echo "$ac_t""no" 1>&6
11453 fi
11454 done
11455
11456
11457         if test $ac_cv_header_pthread_h = yes ; then
11458                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11459 echo "configure:11460: checking POSIX thread version" >&5
11460 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11461   echo $ac_n "(cached) $ac_c" 1>&6
11462 else
11463   
11464         cat > conftest.$ac_ext <<EOF
11465 #line 11466 "configure"
11466 #include "confdefs.h"
11467
11468 #               include <pthread.h>
11469                 /* this check could be improved */
11470 #               ifdef PTHREAD_ONCE_INIT
11471                         pthread_version_final;
11472 #               endif
11473         
11474 EOF
11475 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11476   egrep "pthread_version_final" >/dev/null 2>&1; then
11477   rm -rf conftest*
11478   ol_pthread_final=yes
11479 else
11480   rm -rf conftest*
11481   ol_pthread_final=no
11482 fi
11483 rm -f conftest*
11484
11485
11486         cat > conftest.$ac_ext <<EOF
11487 #line 11488 "configure"
11488 #include "confdefs.h"
11489
11490 #               include <pthread.h>
11491                 /* this check could be improved */
11492 #               ifdef pthread_once_init
11493                         pthread_version_draft4;
11494 #               endif
11495         
11496 EOF
11497 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11498   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11499   rm -rf conftest*
11500   ol_pthread_draft4=yes
11501 else
11502   rm -rf conftest*
11503   ol_pthread_draft4=no
11504 fi
11505 rm -f conftest*
11506
11507
11508         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11509                 ol_cv_pthread_version=final
11510         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11511                 ol_cv_pthread_version=draft4
11512         else
11513                 ol_cv_pthread_version=unknown
11514         fi
11515
11516 fi
11517
11518 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11519
11520
11521                 if test $ol_cv_pthread_version = final ; then
11522                         cat >> confdefs.h <<\EOF
11523 #define HAVE_PTHREADS_FINAL 1
11524 EOF
11525
11526                 elif test $ol_cv_pthread_version = draft4 ; then
11527                         cat >> confdefs.h <<\EOF
11528 #define HAVE_PTHREADS_D4 1
11529 EOF
11530
11531                 else
11532                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11533                 fi
11534
11535                 # consider threads found
11536                 ol_with_threads=found
11537
11538                 
11539         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11540 echo "configure:11541: checking for LinuxThreads pthread.h" >&5
11541 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11542   echo $ac_n "(cached) $ac_c" 1>&6
11543 else
11544   cat > conftest.$ac_ext <<EOF
11545 #line 11546 "configure"
11546 #include "confdefs.h"
11547 #include <pthread.h>
11548 EOF
11549 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11550   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11551   rm -rf conftest*
11552   ol_cv_header_linux_threads=yes
11553 else
11554   rm -rf conftest*
11555   ol_cv_header_linux_threads=no
11556 fi
11557 rm -f conftest*
11558
11559                 
11560 fi
11561
11562 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11563         if test $ol_cv_header_linux_threads = yes; then
11564                 cat >> confdefs.h <<\EOF
11565 #define HAVE_LINUX_THREADS 1
11566 EOF
11567
11568         fi
11569
11570                 
11571         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11572 echo "configure:11573: checking for GNU Pth pthread.h" >&5
11573 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11574   echo $ac_n "(cached) $ac_c" 1>&6
11575 else
11576   cat > conftest.$ac_ext <<EOF
11577 #line 11578 "configure"
11578 #include "confdefs.h"
11579 #include <pthread.h>
11580 #ifdef _POSIX_THREAD_IS_GNU_PTH
11581         __gnu_pth__;
11582 #endif
11583
11584 EOF
11585 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11586   egrep "__gnu_pth__" >/dev/null 2>&1; then
11587   rm -rf conftest*
11588   ol_cv_header_gnu_pth_pthread_h=yes
11589 else
11590   rm -rf conftest*
11591   ol_cv_header_gnu_pth_pthread_h=no
11592 fi
11593 rm -f conftest*
11594
11595                 
11596 fi
11597
11598 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11599
11600
11601                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11602                         for ac_hdr in sched.h
11603 do
11604 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11605 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11606 echo "configure:11607: checking for $ac_hdr" >&5
11607 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11608   echo $ac_n "(cached) $ac_c" 1>&6
11609 else
11610   cat > conftest.$ac_ext <<EOF
11611 #line 11612 "configure"
11612 #include "confdefs.h"
11613 #include <$ac_hdr>
11614 EOF
11615 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11616 { (eval echo configure:11617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11617 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11618 if test -z "$ac_err"; then
11619   rm -rf conftest*
11620   eval "ac_cv_header_$ac_safe=yes"
11621 else
11622   echo "$ac_err" >&5
11623   echo "configure: failed program was:" >&5
11624   cat conftest.$ac_ext >&5
11625   rm -rf conftest*
11626   eval "ac_cv_header_$ac_safe=no"
11627 fi
11628 rm -f conftest*
11629 fi
11630 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11631   echo "$ac_t""yes" 1>&6
11632     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11633   cat >> confdefs.h <<EOF
11634 #define $ac_tr_hdr 1
11635 EOF
11636  
11637 else
11638   echo "$ac_t""no" 1>&6
11639 fi
11640 done
11641
11642                 fi
11643
11644                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11645                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11646 echo "configure:11647: checking for pthread_create in default libraries" >&5
11647 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11648   echo $ac_n "(cached) $ac_c" 1>&6
11649 else
11650   
11651                 if test "$cross_compiling" = yes; then
11652   cat > conftest.$ac_ext <<EOF
11653 #line 11654 "configure"
11654 #include "confdefs.h"
11655 /* pthread test headers */
11656 #include <pthread.h>
11657 #ifndef NULL
11658 #define NULL (void*)0
11659 #endif
11660
11661 static void *task(p)
11662         void *p;
11663 {
11664         return (void *) (p == NULL);
11665 }
11666
11667 int main() {
11668
11669         /* pthread test function */
11670         pthread_t t;
11671         int status;
11672         int detach = 1;
11673
11674 #ifdef HAVE_PTHREADS_FINAL
11675         /* Final pthreads */
11676         pthread_attr_t attr;
11677
11678         status = pthread_attr_init(&attr);
11679         if( status ) return status;
11680
11681 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11682         if( !detach ) {
11683 #if defined( PTHREAD_CREATE_JOINABLE )
11684                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11685 #else
11686                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11687 #endif
11688
11689 #ifdef PTHREAD_CREATE_DETACHED
11690         } else {
11691                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11692 #endif
11693         }
11694         if( status ) return status;
11695 #endif
11696
11697         status = pthread_create( &t, &attr, task, NULL );
11698         if( status ) return status;
11699
11700 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11701         if( detach ) {
11702                 /* give thread a chance to complete */
11703                 /* it should remain joinable and hence detachable */
11704                 sleep( 1 );
11705
11706                 status = pthread_detach( t );
11707                 if( status ) return status;
11708         }
11709 #endif
11710
11711 #else
11712         /* Draft 4 pthreads */
11713         status = pthread_create( &t, pthread_attr_default, task, NULL );
11714         if( status ) return status;
11715
11716         if( detach ) {
11717                 /* give thread a chance to complete */
11718                 /* it should remain joinable and hence detachable */
11719                 sleep( 1 );
11720
11721                 status = pthread_detach( &t );
11722                 if( status ) return status;
11723         }
11724 #endif
11725
11726 #ifdef HAVE_LINUX_THREADS
11727         pthread_kill_other_threads_np();
11728 #endif
11729
11730         return 0;
11731
11732 ; return 0; }
11733 EOF
11734 if { (eval echo configure:11735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11735   rm -rf conftest*
11736   ol_cv_pthread_create=yes
11737 else
11738   echo "configure: failed program was:" >&5
11739   cat conftest.$ac_ext >&5
11740   rm -rf conftest*
11741   ol_cv_pthread_create=no
11742 fi
11743 rm -f conftest*
11744 else
11745   cat > conftest.$ac_ext <<EOF
11746 #line 11747 "configure"
11747 #include "confdefs.h"
11748 /* pthread test headers */
11749 #include <pthread.h>
11750 #ifndef NULL
11751 #define NULL (void*)0
11752 #endif
11753
11754 static void *task(p)
11755         void *p;
11756 {
11757         return (void *) (p == NULL);
11758 }
11759
11760
11761 int main(argc, argv)
11762         int argc;
11763         char **argv;
11764 {
11765
11766         /* pthread test function */
11767         pthread_t t;
11768         int status;
11769         int detach = 1;
11770
11771 #ifdef HAVE_PTHREADS_FINAL
11772         /* Final pthreads */
11773         pthread_attr_t attr;
11774
11775         status = pthread_attr_init(&attr);
11776         if( status ) return status;
11777
11778 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11779         if( !detach ) {
11780 #if defined( PTHREAD_CREATE_JOINABLE )
11781                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11782 #else
11783                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11784 #endif
11785
11786 #ifdef PTHREAD_CREATE_DETACHED
11787         } else {
11788                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11789 #endif
11790         }
11791         if( status ) return status;
11792 #endif
11793
11794         status = pthread_create( &t, &attr, task, NULL );
11795         if( status ) return status;
11796
11797 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11798         if( detach ) {
11799                 /* give thread a chance to complete */
11800                 /* it should remain joinable and hence detachable */
11801                 sleep( 1 );
11802
11803                 status = pthread_detach( t );
11804                 if( status ) return status;
11805         }
11806 #endif
11807
11808 #else
11809         /* Draft 4 pthreads */
11810         status = pthread_create( &t, pthread_attr_default, task, NULL );
11811         if( status ) return status;
11812
11813         if( detach ) {
11814                 /* give thread a chance to complete */
11815                 /* it should remain joinable and hence detachable */
11816                 sleep( 1 );
11817
11818                 status = pthread_detach( &t );
11819                 if( status ) return status;
11820         }
11821 #endif
11822
11823 #ifdef HAVE_LINUX_THREADS
11824         pthread_kill_other_threads_np();
11825 #endif
11826
11827         return 0;
11828
11829 }
11830
11831 EOF
11832 if { (eval echo configure:11833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11833 then
11834   ol_cv_pthread_create=yes
11835 else
11836   echo "configure: failed program was:" >&5
11837   cat conftest.$ac_ext >&5
11838   rm -fr conftest*
11839   ol_cv_pthread_create=no
11840 fi
11841 rm -fr conftest*
11842 fi
11843
11844 fi
11845
11846 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11847
11848                 if test $ol_cv_pthread_create != no ; then
11849                         ol_link_threads=posix
11850                         ol_link_pthreads=""
11851                 fi
11852                 
11853                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11854 if test "$ol_link_threads" = no ; then
11855         # try -kthread
11856         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11857 echo "configure:11858: checking for pthread link with -kthread" >&5
11858 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11859   echo $ac_n "(cached) $ac_c" 1>&6
11860 else
11861   
11862                 # save the flags
11863                 ol_LIBS="$LIBS"
11864                 LIBS="-kthread $LIBS"
11865
11866                 if test "$cross_compiling" = yes; then
11867   cat > conftest.$ac_ext <<EOF
11868 #line 11869 "configure"
11869 #include "confdefs.h"
11870 /* pthread test headers */
11871 #include <pthread.h>
11872 #ifndef NULL
11873 #define NULL (void*)0
11874 #endif
11875
11876 static void *task(p)
11877         void *p;
11878 {
11879         return (void *) (p == NULL);
11880 }
11881
11882 int main() {
11883
11884         /* pthread test function */
11885         pthread_t t;
11886         int status;
11887         int detach = 1;
11888
11889 #ifdef HAVE_PTHREADS_FINAL
11890         /* Final pthreads */
11891         pthread_attr_t attr;
11892
11893         status = pthread_attr_init(&attr);
11894         if( status ) return status;
11895
11896 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11897         if( !detach ) {
11898 #if defined( PTHREAD_CREATE_JOINABLE )
11899                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11900 #else
11901                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11902 #endif
11903
11904 #ifdef PTHREAD_CREATE_DETACHED
11905         } else {
11906                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11907 #endif
11908         }
11909         if( status ) return status;
11910 #endif
11911
11912         status = pthread_create( &t, &attr, task, NULL );
11913         if( status ) return status;
11914
11915 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11916         if( detach ) {
11917                 /* give thread a chance to complete */
11918                 /* it should remain joinable and hence detachable */
11919                 sleep( 1 );
11920
11921                 status = pthread_detach( t );
11922                 if( status ) return status;
11923         }
11924 #endif
11925
11926 #else
11927         /* Draft 4 pthreads */
11928         status = pthread_create( &t, pthread_attr_default, task, NULL );
11929         if( status ) return status;
11930
11931         if( detach ) {
11932                 /* give thread a chance to complete */
11933                 /* it should remain joinable and hence detachable */
11934                 sleep( 1 );
11935
11936                 status = pthread_detach( &t );
11937                 if( status ) return status;
11938         }
11939 #endif
11940
11941 #ifdef HAVE_LINUX_THREADS
11942         pthread_kill_other_threads_np();
11943 #endif
11944
11945         return 0;
11946
11947 ; return 0; }
11948 EOF
11949 if { (eval echo configure:11950: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11950   rm -rf conftest*
11951   ol_cv_pthread_kthread=yes
11952 else
11953   echo "configure: failed program was:" >&5
11954   cat conftest.$ac_ext >&5
11955   rm -rf conftest*
11956   ol_cv_pthread_kthread=no
11957 fi
11958 rm -f conftest*
11959 else
11960   cat > conftest.$ac_ext <<EOF
11961 #line 11962 "configure"
11962 #include "confdefs.h"
11963 /* pthread test headers */
11964 #include <pthread.h>
11965 #ifndef NULL
11966 #define NULL (void*)0
11967 #endif
11968
11969 static void *task(p)
11970         void *p;
11971 {
11972         return (void *) (p == NULL);
11973 }
11974
11975
11976 int main(argc, argv)
11977         int argc;
11978         char **argv;
11979 {
11980
11981         /* pthread test function */
11982         pthread_t t;
11983         int status;
11984         int detach = 1;
11985
11986 #ifdef HAVE_PTHREADS_FINAL
11987         /* Final pthreads */
11988         pthread_attr_t attr;
11989
11990         status = pthread_attr_init(&attr);
11991         if( status ) return status;
11992
11993 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11994         if( !detach ) {
11995 #if defined( PTHREAD_CREATE_JOINABLE )
11996                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11997 #else
11998                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11999 #endif
12000
12001 #ifdef PTHREAD_CREATE_DETACHED
12002         } else {
12003                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12004 #endif
12005         }
12006         if( status ) return status;
12007 #endif
12008
12009         status = pthread_create( &t, &attr, task, NULL );
12010         if( status ) return status;
12011
12012 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12013         if( detach ) {
12014                 /* give thread a chance to complete */
12015                 /* it should remain joinable and hence detachable */
12016                 sleep( 1 );
12017
12018                 status = pthread_detach( t );
12019                 if( status ) return status;
12020         }
12021 #endif
12022
12023 #else
12024         /* Draft 4 pthreads */
12025         status = pthread_create( &t, pthread_attr_default, task, NULL );
12026         if( status ) return status;
12027
12028         if( detach ) {
12029                 /* give thread a chance to complete */
12030                 /* it should remain joinable and hence detachable */
12031                 sleep( 1 );
12032
12033                 status = pthread_detach( &t );
12034                 if( status ) return status;
12035         }
12036 #endif
12037
12038 #ifdef HAVE_LINUX_THREADS
12039         pthread_kill_other_threads_np();
12040 #endif
12041
12042         return 0;
12043
12044 }
12045
12046 EOF
12047 if { (eval echo configure:12048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12048 then
12049   ol_cv_pthread_kthread=yes
12050 else
12051   echo "configure: failed program was:" >&5
12052   cat conftest.$ac_ext >&5
12053   rm -fr conftest*
12054   ol_cv_pthread_kthread=no
12055 fi
12056 rm -fr conftest*
12057 fi
12058
12059
12060                 # restore the LIBS
12061                 LIBS="$ol_LIBS"
12062         
12063 fi
12064
12065 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12066
12067         if test $ol_cv_pthread_kthread = yes ; then
12068                 ol_link_pthreads="-kthread"
12069                 ol_link_threads=posix
12070         fi
12071 fi
12072
12073                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12074 if test "$ol_link_threads" = no ; then
12075         # try -pthread
12076         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12077 echo "configure:12078: checking for pthread link with -pthread" >&5
12078 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12079   echo $ac_n "(cached) $ac_c" 1>&6
12080 else
12081   
12082                 # save the flags
12083                 ol_LIBS="$LIBS"
12084                 LIBS="-pthread $LIBS"
12085
12086                 if test "$cross_compiling" = yes; then
12087   cat > conftest.$ac_ext <<EOF
12088 #line 12089 "configure"
12089 #include "confdefs.h"
12090 /* pthread test headers */
12091 #include <pthread.h>
12092 #ifndef NULL
12093 #define NULL (void*)0
12094 #endif
12095
12096 static void *task(p)
12097         void *p;
12098 {
12099         return (void *) (p == NULL);
12100 }
12101
12102 int main() {
12103
12104         /* pthread test function */
12105         pthread_t t;
12106         int status;
12107         int detach = 1;
12108
12109 #ifdef HAVE_PTHREADS_FINAL
12110         /* Final pthreads */
12111         pthread_attr_t attr;
12112
12113         status = pthread_attr_init(&attr);
12114         if( status ) return status;
12115
12116 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12117         if( !detach ) {
12118 #if defined( PTHREAD_CREATE_JOINABLE )
12119                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12120 #else
12121                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12122 #endif
12123
12124 #ifdef PTHREAD_CREATE_DETACHED
12125         } else {
12126                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12127 #endif
12128         }
12129         if( status ) return status;
12130 #endif
12131
12132         status = pthread_create( &t, &attr, task, NULL );
12133         if( status ) return status;
12134
12135 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12136         if( detach ) {
12137                 /* give thread a chance to complete */
12138                 /* it should remain joinable and hence detachable */
12139                 sleep( 1 );
12140
12141                 status = pthread_detach( t );
12142                 if( status ) return status;
12143         }
12144 #endif
12145
12146 #else
12147         /* Draft 4 pthreads */
12148         status = pthread_create( &t, pthread_attr_default, task, NULL );
12149         if( status ) return status;
12150
12151         if( detach ) {
12152                 /* give thread a chance to complete */
12153                 /* it should remain joinable and hence detachable */
12154                 sleep( 1 );
12155
12156                 status = pthread_detach( &t );
12157                 if( status ) return status;
12158         }
12159 #endif
12160
12161 #ifdef HAVE_LINUX_THREADS
12162         pthread_kill_other_threads_np();
12163 #endif
12164
12165         return 0;
12166
12167 ; return 0; }
12168 EOF
12169 if { (eval echo configure:12170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12170   rm -rf conftest*
12171   ol_cv_pthread_pthread=yes
12172 else
12173   echo "configure: failed program was:" >&5
12174   cat conftest.$ac_ext >&5
12175   rm -rf conftest*
12176   ol_cv_pthread_pthread=no
12177 fi
12178 rm -f conftest*
12179 else
12180   cat > conftest.$ac_ext <<EOF
12181 #line 12182 "configure"
12182 #include "confdefs.h"
12183 /* pthread test headers */
12184 #include <pthread.h>
12185 #ifndef NULL
12186 #define NULL (void*)0
12187 #endif
12188
12189 static void *task(p)
12190         void *p;
12191 {
12192         return (void *) (p == NULL);
12193 }
12194
12195
12196 int main(argc, argv)
12197         int argc;
12198         char **argv;
12199 {
12200
12201         /* pthread test function */
12202         pthread_t t;
12203         int status;
12204         int detach = 1;
12205
12206 #ifdef HAVE_PTHREADS_FINAL
12207         /* Final pthreads */
12208         pthread_attr_t attr;
12209
12210         status = pthread_attr_init(&attr);
12211         if( status ) return status;
12212
12213 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12214         if( !detach ) {
12215 #if defined( PTHREAD_CREATE_JOINABLE )
12216                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12217 #else
12218                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12219 #endif
12220
12221 #ifdef PTHREAD_CREATE_DETACHED
12222         } else {
12223                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12224 #endif
12225         }
12226         if( status ) return status;
12227 #endif
12228
12229         status = pthread_create( &t, &attr, task, NULL );
12230         if( status ) return status;
12231
12232 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12233         if( detach ) {
12234                 /* give thread a chance to complete */
12235                 /* it should remain joinable and hence detachable */
12236                 sleep( 1 );
12237
12238                 status = pthread_detach( t );
12239                 if( status ) return status;
12240         }
12241 #endif
12242
12243 #else
12244         /* Draft 4 pthreads */
12245         status = pthread_create( &t, pthread_attr_default, task, NULL );
12246         if( status ) return status;
12247
12248         if( detach ) {
12249                 /* give thread a chance to complete */
12250                 /* it should remain joinable and hence detachable */
12251                 sleep( 1 );
12252
12253                 status = pthread_detach( &t );
12254                 if( status ) return status;
12255         }
12256 #endif
12257
12258 #ifdef HAVE_LINUX_THREADS
12259         pthread_kill_other_threads_np();
12260 #endif
12261
12262         return 0;
12263
12264 }
12265
12266 EOF
12267 if { (eval echo configure:12268: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12268 then
12269   ol_cv_pthread_pthread=yes
12270 else
12271   echo "configure: failed program was:" >&5
12272   cat conftest.$ac_ext >&5
12273   rm -fr conftest*
12274   ol_cv_pthread_pthread=no
12275 fi
12276 rm -fr conftest*
12277 fi
12278
12279
12280                 # restore the LIBS
12281                 LIBS="$ol_LIBS"
12282         
12283 fi
12284
12285 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12286
12287         if test $ol_cv_pthread_pthread = yes ; then
12288                 ol_link_pthreads="-pthread"
12289                 ol_link_threads=posix
12290         fi
12291 fi
12292
12293                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12294 if test "$ol_link_threads" = no ; then
12295         # try -pthreads
12296         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12297 echo "configure:12298: checking for pthread link with -pthreads" >&5
12298 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12299   echo $ac_n "(cached) $ac_c" 1>&6
12300 else
12301   
12302                 # save the flags
12303                 ol_LIBS="$LIBS"
12304                 LIBS="-pthreads $LIBS"
12305
12306                 if test "$cross_compiling" = yes; then
12307   cat > conftest.$ac_ext <<EOF
12308 #line 12309 "configure"
12309 #include "confdefs.h"
12310 /* pthread test headers */
12311 #include <pthread.h>
12312 #ifndef NULL
12313 #define NULL (void*)0
12314 #endif
12315
12316 static void *task(p)
12317         void *p;
12318 {
12319         return (void *) (p == NULL);
12320 }
12321
12322 int main() {
12323
12324         /* pthread test function */
12325         pthread_t t;
12326         int status;
12327         int detach = 1;
12328
12329 #ifdef HAVE_PTHREADS_FINAL
12330         /* Final pthreads */
12331         pthread_attr_t attr;
12332
12333         status = pthread_attr_init(&attr);
12334         if( status ) return status;
12335
12336 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12337         if( !detach ) {
12338 #if defined( PTHREAD_CREATE_JOINABLE )
12339                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12340 #else
12341                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12342 #endif
12343
12344 #ifdef PTHREAD_CREATE_DETACHED
12345         } else {
12346                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12347 #endif
12348         }
12349         if( status ) return status;
12350 #endif
12351
12352         status = pthread_create( &t, &attr, task, NULL );
12353         if( status ) return status;
12354
12355 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12356         if( detach ) {
12357                 /* give thread a chance to complete */
12358                 /* it should remain joinable and hence detachable */
12359                 sleep( 1 );
12360
12361                 status = pthread_detach( t );
12362                 if( status ) return status;
12363         }
12364 #endif
12365
12366 #else
12367         /* Draft 4 pthreads */
12368         status = pthread_create( &t, pthread_attr_default, task, NULL );
12369         if( status ) return status;
12370
12371         if( detach ) {
12372                 /* give thread a chance to complete */
12373                 /* it should remain joinable and hence detachable */
12374                 sleep( 1 );
12375
12376                 status = pthread_detach( &t );
12377                 if( status ) return status;
12378         }
12379 #endif
12380
12381 #ifdef HAVE_LINUX_THREADS
12382         pthread_kill_other_threads_np();
12383 #endif
12384
12385         return 0;
12386
12387 ; return 0; }
12388 EOF
12389 if { (eval echo configure:12390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12390   rm -rf conftest*
12391   ol_cv_pthread_pthreads=yes
12392 else
12393   echo "configure: failed program was:" >&5
12394   cat conftest.$ac_ext >&5
12395   rm -rf conftest*
12396   ol_cv_pthread_pthreads=no
12397 fi
12398 rm -f conftest*
12399 else
12400   cat > conftest.$ac_ext <<EOF
12401 #line 12402 "configure"
12402 #include "confdefs.h"
12403 /* pthread test headers */
12404 #include <pthread.h>
12405 #ifndef NULL
12406 #define NULL (void*)0
12407 #endif
12408
12409 static void *task(p)
12410         void *p;
12411 {
12412         return (void *) (p == NULL);
12413 }
12414
12415
12416 int main(argc, argv)
12417         int argc;
12418         char **argv;
12419 {
12420
12421         /* pthread test function */
12422         pthread_t t;
12423         int status;
12424         int detach = 1;
12425
12426 #ifdef HAVE_PTHREADS_FINAL
12427         /* Final pthreads */
12428         pthread_attr_t attr;
12429
12430         status = pthread_attr_init(&attr);
12431         if( status ) return status;
12432
12433 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12434         if( !detach ) {
12435 #if defined( PTHREAD_CREATE_JOINABLE )
12436                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12437 #else
12438                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12439 #endif
12440
12441 #ifdef PTHREAD_CREATE_DETACHED
12442         } else {
12443                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12444 #endif
12445         }
12446         if( status ) return status;
12447 #endif
12448
12449         status = pthread_create( &t, &attr, task, NULL );
12450         if( status ) return status;
12451
12452 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12453         if( detach ) {
12454                 /* give thread a chance to complete */
12455                 /* it should remain joinable and hence detachable */
12456                 sleep( 1 );
12457
12458                 status = pthread_detach( t );
12459                 if( status ) return status;
12460         }
12461 #endif
12462
12463 #else
12464         /* Draft 4 pthreads */
12465         status = pthread_create( &t, pthread_attr_default, task, NULL );
12466         if( status ) return status;
12467
12468         if( detach ) {
12469                 /* give thread a chance to complete */
12470                 /* it should remain joinable and hence detachable */
12471                 sleep( 1 );
12472
12473                 status = pthread_detach( &t );
12474                 if( status ) return status;
12475         }
12476 #endif
12477
12478 #ifdef HAVE_LINUX_THREADS
12479         pthread_kill_other_threads_np();
12480 #endif
12481
12482         return 0;
12483
12484 }
12485
12486 EOF
12487 if { (eval echo configure:12488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12488 then
12489   ol_cv_pthread_pthreads=yes
12490 else
12491   echo "configure: failed program was:" >&5
12492   cat conftest.$ac_ext >&5
12493   rm -fr conftest*
12494   ol_cv_pthread_pthreads=no
12495 fi
12496 rm -fr conftest*
12497 fi
12498
12499
12500                 # restore the LIBS
12501                 LIBS="$ol_LIBS"
12502         
12503 fi
12504
12505 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12506
12507         if test $ol_cv_pthread_pthreads = yes ; then
12508                 ol_link_pthreads="-pthreads"
12509                 ol_link_threads=posix
12510         fi
12511 fi
12512
12513                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12514 if test "$ol_link_threads" = no ; then
12515         # try -mthreads
12516         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12517 echo "configure:12518: checking for pthread link with -mthreads" >&5
12518 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12519   echo $ac_n "(cached) $ac_c" 1>&6
12520 else
12521   
12522                 # save the flags
12523                 ol_LIBS="$LIBS"
12524                 LIBS="-mthreads $LIBS"
12525
12526                 if test "$cross_compiling" = yes; then
12527   cat > conftest.$ac_ext <<EOF
12528 #line 12529 "configure"
12529 #include "confdefs.h"
12530 /* pthread test headers */
12531 #include <pthread.h>
12532 #ifndef NULL
12533 #define NULL (void*)0
12534 #endif
12535
12536 static void *task(p)
12537         void *p;
12538 {
12539         return (void *) (p == NULL);
12540 }
12541
12542 int main() {
12543
12544         /* pthread test function */
12545         pthread_t t;
12546         int status;
12547         int detach = 1;
12548
12549 #ifdef HAVE_PTHREADS_FINAL
12550         /* Final pthreads */
12551         pthread_attr_t attr;
12552
12553         status = pthread_attr_init(&attr);
12554         if( status ) return status;
12555
12556 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12557         if( !detach ) {
12558 #if defined( PTHREAD_CREATE_JOINABLE )
12559                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12560 #else
12561                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12562 #endif
12563
12564 #ifdef PTHREAD_CREATE_DETACHED
12565         } else {
12566                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12567 #endif
12568         }
12569         if( status ) return status;
12570 #endif
12571
12572         status = pthread_create( &t, &attr, task, NULL );
12573         if( status ) return status;
12574
12575 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12576         if( detach ) {
12577                 /* give thread a chance to complete */
12578                 /* it should remain joinable and hence detachable */
12579                 sleep( 1 );
12580
12581                 status = pthread_detach( t );
12582                 if( status ) return status;
12583         }
12584 #endif
12585
12586 #else
12587         /* Draft 4 pthreads */
12588         status = pthread_create( &t, pthread_attr_default, task, NULL );
12589         if( status ) return status;
12590
12591         if( detach ) {
12592                 /* give thread a chance to complete */
12593                 /* it should remain joinable and hence detachable */
12594                 sleep( 1 );
12595
12596                 status = pthread_detach( &t );
12597                 if( status ) return status;
12598         }
12599 #endif
12600
12601 #ifdef HAVE_LINUX_THREADS
12602         pthread_kill_other_threads_np();
12603 #endif
12604
12605         return 0;
12606
12607 ; return 0; }
12608 EOF
12609 if { (eval echo configure:12610: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12610   rm -rf conftest*
12611   ol_cv_pthread_mthreads=yes
12612 else
12613   echo "configure: failed program was:" >&5
12614   cat conftest.$ac_ext >&5
12615   rm -rf conftest*
12616   ol_cv_pthread_mthreads=no
12617 fi
12618 rm -f conftest*
12619 else
12620   cat > conftest.$ac_ext <<EOF
12621 #line 12622 "configure"
12622 #include "confdefs.h"
12623 /* pthread test headers */
12624 #include <pthread.h>
12625 #ifndef NULL
12626 #define NULL (void*)0
12627 #endif
12628
12629 static void *task(p)
12630         void *p;
12631 {
12632         return (void *) (p == NULL);
12633 }
12634
12635
12636 int main(argc, argv)
12637         int argc;
12638         char **argv;
12639 {
12640
12641         /* pthread test function */
12642         pthread_t t;
12643         int status;
12644         int detach = 1;
12645
12646 #ifdef HAVE_PTHREADS_FINAL
12647         /* Final pthreads */
12648         pthread_attr_t attr;
12649
12650         status = pthread_attr_init(&attr);
12651         if( status ) return status;
12652
12653 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12654         if( !detach ) {
12655 #if defined( PTHREAD_CREATE_JOINABLE )
12656                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12657 #else
12658                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12659 #endif
12660
12661 #ifdef PTHREAD_CREATE_DETACHED
12662         } else {
12663                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12664 #endif
12665         }
12666         if( status ) return status;
12667 #endif
12668
12669         status = pthread_create( &t, &attr, task, NULL );
12670         if( status ) return status;
12671
12672 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12673         if( detach ) {
12674                 /* give thread a chance to complete */
12675                 /* it should remain joinable and hence detachable */
12676                 sleep( 1 );
12677
12678                 status = pthread_detach( t );
12679                 if( status ) return status;
12680         }
12681 #endif
12682
12683 #else
12684         /* Draft 4 pthreads */
12685         status = pthread_create( &t, pthread_attr_default, task, NULL );
12686         if( status ) return status;
12687
12688         if( detach ) {
12689                 /* give thread a chance to complete */
12690                 /* it should remain joinable and hence detachable */
12691                 sleep( 1 );
12692
12693                 status = pthread_detach( &t );
12694                 if( status ) return status;
12695         }
12696 #endif
12697
12698 #ifdef HAVE_LINUX_THREADS
12699         pthread_kill_other_threads_np();
12700 #endif
12701
12702         return 0;
12703
12704 }
12705
12706 EOF
12707 if { (eval echo configure:12708: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12708 then
12709   ol_cv_pthread_mthreads=yes
12710 else
12711   echo "configure: failed program was:" >&5
12712   cat conftest.$ac_ext >&5
12713   rm -fr conftest*
12714   ol_cv_pthread_mthreads=no
12715 fi
12716 rm -fr conftest*
12717 fi
12718
12719
12720                 # restore the LIBS
12721                 LIBS="$ol_LIBS"
12722         
12723 fi
12724
12725 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12726
12727         if test $ol_cv_pthread_mthreads = yes ; then
12728                 ol_link_pthreads="-mthreads"
12729                 ol_link_threads=posix
12730         fi
12731 fi
12732
12733                 # Pthread try link: -thread (ol_cv_pthread_thread)
12734 if test "$ol_link_threads" = no ; then
12735         # try -thread
12736         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12737 echo "configure:12738: checking for pthread link with -thread" >&5
12738 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12739   echo $ac_n "(cached) $ac_c" 1>&6
12740 else
12741   
12742                 # save the flags
12743                 ol_LIBS="$LIBS"
12744                 LIBS="-thread $LIBS"
12745
12746                 if test "$cross_compiling" = yes; then
12747   cat > conftest.$ac_ext <<EOF
12748 #line 12749 "configure"
12749 #include "confdefs.h"
12750 /* pthread test headers */
12751 #include <pthread.h>
12752 #ifndef NULL
12753 #define NULL (void*)0
12754 #endif
12755
12756 static void *task(p)
12757         void *p;
12758 {
12759         return (void *) (p == NULL);
12760 }
12761
12762 int main() {
12763
12764         /* pthread test function */
12765         pthread_t t;
12766         int status;
12767         int detach = 1;
12768
12769 #ifdef HAVE_PTHREADS_FINAL
12770         /* Final pthreads */
12771         pthread_attr_t attr;
12772
12773         status = pthread_attr_init(&attr);
12774         if( status ) return status;
12775
12776 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12777         if( !detach ) {
12778 #if defined( PTHREAD_CREATE_JOINABLE )
12779                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12780 #else
12781                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12782 #endif
12783
12784 #ifdef PTHREAD_CREATE_DETACHED
12785         } else {
12786                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12787 #endif
12788         }
12789         if( status ) return status;
12790 #endif
12791
12792         status = pthread_create( &t, &attr, task, NULL );
12793         if( status ) return status;
12794
12795 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12796         if( detach ) {
12797                 /* give thread a chance to complete */
12798                 /* it should remain joinable and hence detachable */
12799                 sleep( 1 );
12800
12801                 status = pthread_detach( t );
12802                 if( status ) return status;
12803         }
12804 #endif
12805
12806 #else
12807         /* Draft 4 pthreads */
12808         status = pthread_create( &t, pthread_attr_default, task, NULL );
12809         if( status ) return status;
12810
12811         if( detach ) {
12812                 /* give thread a chance to complete */
12813                 /* it should remain joinable and hence detachable */
12814                 sleep( 1 );
12815
12816                 status = pthread_detach( &t );
12817                 if( status ) return status;
12818         }
12819 #endif
12820
12821 #ifdef HAVE_LINUX_THREADS
12822         pthread_kill_other_threads_np();
12823 #endif
12824
12825         return 0;
12826
12827 ; return 0; }
12828 EOF
12829 if { (eval echo configure:12830: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12830   rm -rf conftest*
12831   ol_cv_pthread_thread=yes
12832 else
12833   echo "configure: failed program was:" >&5
12834   cat conftest.$ac_ext >&5
12835   rm -rf conftest*
12836   ol_cv_pthread_thread=no
12837 fi
12838 rm -f conftest*
12839 else
12840   cat > conftest.$ac_ext <<EOF
12841 #line 12842 "configure"
12842 #include "confdefs.h"
12843 /* pthread test headers */
12844 #include <pthread.h>
12845 #ifndef NULL
12846 #define NULL (void*)0
12847 #endif
12848
12849 static void *task(p)
12850         void *p;
12851 {
12852         return (void *) (p == NULL);
12853 }
12854
12855
12856 int main(argc, argv)
12857         int argc;
12858         char **argv;
12859 {
12860
12861         /* pthread test function */
12862         pthread_t t;
12863         int status;
12864         int detach = 1;
12865
12866 #ifdef HAVE_PTHREADS_FINAL
12867         /* Final pthreads */
12868         pthread_attr_t attr;
12869
12870         status = pthread_attr_init(&attr);
12871         if( status ) return status;
12872
12873 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12874         if( !detach ) {
12875 #if defined( PTHREAD_CREATE_JOINABLE )
12876                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12877 #else
12878                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12879 #endif
12880
12881 #ifdef PTHREAD_CREATE_DETACHED
12882         } else {
12883                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12884 #endif
12885         }
12886         if( status ) return status;
12887 #endif
12888
12889         status = pthread_create( &t, &attr, task, NULL );
12890         if( status ) return status;
12891
12892 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12893         if( detach ) {
12894                 /* give thread a chance to complete */
12895                 /* it should remain joinable and hence detachable */
12896                 sleep( 1 );
12897
12898                 status = pthread_detach( t );
12899                 if( status ) return status;
12900         }
12901 #endif
12902
12903 #else
12904         /* Draft 4 pthreads */
12905         status = pthread_create( &t, pthread_attr_default, task, NULL );
12906         if( status ) return status;
12907
12908         if( detach ) {
12909                 /* give thread a chance to complete */
12910                 /* it should remain joinable and hence detachable */
12911                 sleep( 1 );
12912
12913                 status = pthread_detach( &t );
12914                 if( status ) return status;
12915         }
12916 #endif
12917
12918 #ifdef HAVE_LINUX_THREADS
12919         pthread_kill_other_threads_np();
12920 #endif
12921
12922         return 0;
12923
12924 }
12925
12926 EOF
12927 if { (eval echo configure:12928: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12928 then
12929   ol_cv_pthread_thread=yes
12930 else
12931   echo "configure: failed program was:" >&5
12932   cat conftest.$ac_ext >&5
12933   rm -fr conftest*
12934   ol_cv_pthread_thread=no
12935 fi
12936 rm -fr conftest*
12937 fi
12938
12939
12940                 # restore the LIBS
12941                 LIBS="$ol_LIBS"
12942         
12943 fi
12944
12945 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12946
12947         if test $ol_cv_pthread_thread = yes ; then
12948                 ol_link_pthreads="-thread"
12949                 ol_link_threads=posix
12950         fi
12951 fi
12952
12953
12954                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
12955 if test "$ol_link_threads" = no ; then
12956         # try -lpthread -lmach -lexc -lc_r
12957         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
12958 echo "configure:12959: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
12959 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
12960   echo $ac_n "(cached) $ac_c" 1>&6
12961 else
12962   
12963                 # save the flags
12964                 ol_LIBS="$LIBS"
12965                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
12966
12967                 if test "$cross_compiling" = yes; then
12968   cat > conftest.$ac_ext <<EOF
12969 #line 12970 "configure"
12970 #include "confdefs.h"
12971 /* pthread test headers */
12972 #include <pthread.h>
12973 #ifndef NULL
12974 #define NULL (void*)0
12975 #endif
12976
12977 static void *task(p)
12978         void *p;
12979 {
12980         return (void *) (p == NULL);
12981 }
12982
12983 int main() {
12984
12985         /* pthread test function */
12986         pthread_t t;
12987         int status;
12988         int detach = 1;
12989
12990 #ifdef HAVE_PTHREADS_FINAL
12991         /* Final pthreads */
12992         pthread_attr_t attr;
12993
12994         status = pthread_attr_init(&attr);
12995         if( status ) return status;
12996
12997 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12998         if( !detach ) {
12999 #if defined( PTHREAD_CREATE_JOINABLE )
13000                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13001 #else
13002                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13003 #endif
13004
13005 #ifdef PTHREAD_CREATE_DETACHED
13006         } else {
13007                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13008 #endif
13009         }
13010         if( status ) return status;
13011 #endif
13012
13013         status = pthread_create( &t, &attr, task, NULL );
13014         if( status ) return status;
13015
13016 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13017         if( detach ) {
13018                 /* give thread a chance to complete */
13019                 /* it should remain joinable and hence detachable */
13020                 sleep( 1 );
13021
13022                 status = pthread_detach( t );
13023                 if( status ) return status;
13024         }
13025 #endif
13026
13027 #else
13028         /* Draft 4 pthreads */
13029         status = pthread_create( &t, pthread_attr_default, task, NULL );
13030         if( status ) return status;
13031
13032         if( detach ) {
13033                 /* give thread a chance to complete */
13034                 /* it should remain joinable and hence detachable */
13035                 sleep( 1 );
13036
13037                 status = pthread_detach( &t );
13038                 if( status ) return status;
13039         }
13040 #endif
13041
13042 #ifdef HAVE_LINUX_THREADS
13043         pthread_kill_other_threads_np();
13044 #endif
13045
13046         return 0;
13047
13048 ; return 0; }
13049 EOF
13050 if { (eval echo configure:13051: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13051   rm -rf conftest*
13052   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13053 else
13054   echo "configure: failed program was:" >&5
13055   cat conftest.$ac_ext >&5
13056   rm -rf conftest*
13057   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13058 fi
13059 rm -f conftest*
13060 else
13061   cat > conftest.$ac_ext <<EOF
13062 #line 13063 "configure"
13063 #include "confdefs.h"
13064 /* pthread test headers */
13065 #include <pthread.h>
13066 #ifndef NULL
13067 #define NULL (void*)0
13068 #endif
13069
13070 static void *task(p)
13071         void *p;
13072 {
13073         return (void *) (p == NULL);
13074 }
13075
13076
13077 int main(argc, argv)
13078         int argc;
13079         char **argv;
13080 {
13081
13082         /* pthread test function */
13083         pthread_t t;
13084         int status;
13085         int detach = 1;
13086
13087 #ifdef HAVE_PTHREADS_FINAL
13088         /* Final pthreads */
13089         pthread_attr_t attr;
13090
13091         status = pthread_attr_init(&attr);
13092         if( status ) return status;
13093
13094 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13095         if( !detach ) {
13096 #if defined( PTHREAD_CREATE_JOINABLE )
13097                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13098 #else
13099                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13100 #endif
13101
13102 #ifdef PTHREAD_CREATE_DETACHED
13103         } else {
13104                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13105 #endif
13106         }
13107         if( status ) return status;
13108 #endif
13109
13110         status = pthread_create( &t, &attr, task, NULL );
13111         if( status ) return status;
13112
13113 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13114         if( detach ) {
13115                 /* give thread a chance to complete */
13116                 /* it should remain joinable and hence detachable */
13117                 sleep( 1 );
13118
13119                 status = pthread_detach( t );
13120                 if( status ) return status;
13121         }
13122 #endif
13123
13124 #else
13125         /* Draft 4 pthreads */
13126         status = pthread_create( &t, pthread_attr_default, task, NULL );
13127         if( status ) return status;
13128
13129         if( detach ) {
13130                 /* give thread a chance to complete */
13131                 /* it should remain joinable and hence detachable */
13132                 sleep( 1 );
13133
13134                 status = pthread_detach( &t );
13135                 if( status ) return status;
13136         }
13137 #endif
13138
13139 #ifdef HAVE_LINUX_THREADS
13140         pthread_kill_other_threads_np();
13141 #endif
13142
13143         return 0;
13144
13145 }
13146
13147 EOF
13148 if { (eval echo configure:13149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13149 then
13150   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13151 else
13152   echo "configure: failed program was:" >&5
13153   cat conftest.$ac_ext >&5
13154   rm -fr conftest*
13155   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13156 fi
13157 rm -fr conftest*
13158 fi
13159
13160
13161                 # restore the LIBS
13162                 LIBS="$ol_LIBS"
13163         
13164 fi
13165
13166 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13167
13168         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13169                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13170                 ol_link_threads=posix
13171         fi
13172 fi
13173
13174                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13175 if test "$ol_link_threads" = no ; then
13176         # try -lpthread -lmach -lexc
13177         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13178 echo "configure:13179: checking for pthread link with -lpthread -lmach -lexc" >&5
13179 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13180   echo $ac_n "(cached) $ac_c" 1>&6
13181 else
13182   
13183                 # save the flags
13184                 ol_LIBS="$LIBS"
13185                 LIBS="-lpthread -lmach -lexc $LIBS"
13186
13187                 if test "$cross_compiling" = yes; then
13188   cat > conftest.$ac_ext <<EOF
13189 #line 13190 "configure"
13190 #include "confdefs.h"
13191 /* pthread test headers */
13192 #include <pthread.h>
13193 #ifndef NULL
13194 #define NULL (void*)0
13195 #endif
13196
13197 static void *task(p)
13198         void *p;
13199 {
13200         return (void *) (p == NULL);
13201 }
13202
13203 int main() {
13204
13205         /* pthread test function */
13206         pthread_t t;
13207         int status;
13208         int detach = 1;
13209
13210 #ifdef HAVE_PTHREADS_FINAL
13211         /* Final pthreads */
13212         pthread_attr_t attr;
13213
13214         status = pthread_attr_init(&attr);
13215         if( status ) return status;
13216
13217 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13218         if( !detach ) {
13219 #if defined( PTHREAD_CREATE_JOINABLE )
13220                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13221 #else
13222                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13223 #endif
13224
13225 #ifdef PTHREAD_CREATE_DETACHED
13226         } else {
13227                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13228 #endif
13229         }
13230         if( status ) return status;
13231 #endif
13232
13233         status = pthread_create( &t, &attr, task, NULL );
13234         if( status ) return status;
13235
13236 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13237         if( detach ) {
13238                 /* give thread a chance to complete */
13239                 /* it should remain joinable and hence detachable */
13240                 sleep( 1 );
13241
13242                 status = pthread_detach( t );
13243                 if( status ) return status;
13244         }
13245 #endif
13246
13247 #else
13248         /* Draft 4 pthreads */
13249         status = pthread_create( &t, pthread_attr_default, task, NULL );
13250         if( status ) return status;
13251
13252         if( detach ) {
13253                 /* give thread a chance to complete */
13254                 /* it should remain joinable and hence detachable */
13255                 sleep( 1 );
13256
13257                 status = pthread_detach( &t );
13258                 if( status ) return status;
13259         }
13260 #endif
13261
13262 #ifdef HAVE_LINUX_THREADS
13263         pthread_kill_other_threads_np();
13264 #endif
13265
13266         return 0;
13267
13268 ; return 0; }
13269 EOF
13270 if { (eval echo configure:13271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13271   rm -rf conftest*
13272   ol_cv_pthread_lpthread_lmach_lexc=yes
13273 else
13274   echo "configure: failed program was:" >&5
13275   cat conftest.$ac_ext >&5
13276   rm -rf conftest*
13277   ol_cv_pthread_lpthread_lmach_lexc=no
13278 fi
13279 rm -f conftest*
13280 else
13281   cat > conftest.$ac_ext <<EOF
13282 #line 13283 "configure"
13283 #include "confdefs.h"
13284 /* pthread test headers */
13285 #include <pthread.h>
13286 #ifndef NULL
13287 #define NULL (void*)0
13288 #endif
13289
13290 static void *task(p)
13291         void *p;
13292 {
13293         return (void *) (p == NULL);
13294 }
13295
13296
13297 int main(argc, argv)
13298         int argc;
13299         char **argv;
13300 {
13301
13302         /* pthread test function */
13303         pthread_t t;
13304         int status;
13305         int detach = 1;
13306
13307 #ifdef HAVE_PTHREADS_FINAL
13308         /* Final pthreads */
13309         pthread_attr_t attr;
13310
13311         status = pthread_attr_init(&attr);
13312         if( status ) return status;
13313
13314 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13315         if( !detach ) {
13316 #if defined( PTHREAD_CREATE_JOINABLE )
13317                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13318 #else
13319                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13320 #endif
13321
13322 #ifdef PTHREAD_CREATE_DETACHED
13323         } else {
13324                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13325 #endif
13326         }
13327         if( status ) return status;
13328 #endif
13329
13330         status = pthread_create( &t, &attr, task, NULL );
13331         if( status ) return status;
13332
13333 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13334         if( detach ) {
13335                 /* give thread a chance to complete */
13336                 /* it should remain joinable and hence detachable */
13337                 sleep( 1 );
13338
13339                 status = pthread_detach( t );
13340                 if( status ) return status;
13341         }
13342 #endif
13343
13344 #else
13345         /* Draft 4 pthreads */
13346         status = pthread_create( &t, pthread_attr_default, task, NULL );
13347         if( status ) return status;
13348
13349         if( detach ) {
13350                 /* give thread a chance to complete */
13351                 /* it should remain joinable and hence detachable */
13352                 sleep( 1 );
13353
13354                 status = pthread_detach( &t );
13355                 if( status ) return status;
13356         }
13357 #endif
13358
13359 #ifdef HAVE_LINUX_THREADS
13360         pthread_kill_other_threads_np();
13361 #endif
13362
13363         return 0;
13364
13365 }
13366
13367 EOF
13368 if { (eval echo configure:13369: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13369 then
13370   ol_cv_pthread_lpthread_lmach_lexc=yes
13371 else
13372   echo "configure: failed program was:" >&5
13373   cat conftest.$ac_ext >&5
13374   rm -fr conftest*
13375   ol_cv_pthread_lpthread_lmach_lexc=no
13376 fi
13377 rm -fr conftest*
13378 fi
13379
13380
13381                 # restore the LIBS
13382                 LIBS="$ol_LIBS"
13383         
13384 fi
13385
13386 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13387
13388         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13389                 ol_link_pthreads="-lpthread -lmach -lexc"
13390                 ol_link_threads=posix
13391         fi
13392 fi
13393
13394
13395                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13396 if test "$ol_link_threads" = no ; then
13397         # try -lpthread -Wl,-woff,85
13398         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13399 echo "configure:13400: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13400 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13401   echo $ac_n "(cached) $ac_c" 1>&6
13402 else
13403   
13404                 # save the flags
13405                 ol_LIBS="$LIBS"
13406                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13407
13408                 if test "$cross_compiling" = yes; then
13409   cat > conftest.$ac_ext <<EOF
13410 #line 13411 "configure"
13411 #include "confdefs.h"
13412 /* pthread test headers */
13413 #include <pthread.h>
13414 #ifndef NULL
13415 #define NULL (void*)0
13416 #endif
13417
13418 static void *task(p)
13419         void *p;
13420 {
13421         return (void *) (p == NULL);
13422 }
13423
13424 int main() {
13425
13426         /* pthread test function */
13427         pthread_t t;
13428         int status;
13429         int detach = 1;
13430
13431 #ifdef HAVE_PTHREADS_FINAL
13432         /* Final pthreads */
13433         pthread_attr_t attr;
13434
13435         status = pthread_attr_init(&attr);
13436         if( status ) return status;
13437
13438 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13439         if( !detach ) {
13440 #if defined( PTHREAD_CREATE_JOINABLE )
13441                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13442 #else
13443                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13444 #endif
13445
13446 #ifdef PTHREAD_CREATE_DETACHED
13447         } else {
13448                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13449 #endif
13450         }
13451         if( status ) return status;
13452 #endif
13453
13454         status = pthread_create( &t, &attr, task, NULL );
13455         if( status ) return status;
13456
13457 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13458         if( detach ) {
13459                 /* give thread a chance to complete */
13460                 /* it should remain joinable and hence detachable */
13461                 sleep( 1 );
13462
13463                 status = pthread_detach( t );
13464                 if( status ) return status;
13465         }
13466 #endif
13467
13468 #else
13469         /* Draft 4 pthreads */
13470         status = pthread_create( &t, pthread_attr_default, task, NULL );
13471         if( status ) return status;
13472
13473         if( detach ) {
13474                 /* give thread a chance to complete */
13475                 /* it should remain joinable and hence detachable */
13476                 sleep( 1 );
13477
13478                 status = pthread_detach( &t );
13479                 if( status ) return status;
13480         }
13481 #endif
13482
13483 #ifdef HAVE_LINUX_THREADS
13484         pthread_kill_other_threads_np();
13485 #endif
13486
13487         return 0;
13488
13489 ; return 0; }
13490 EOF
13491 if { (eval echo configure:13492: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13492   rm -rf conftest*
13493   ol_cv_pthread_lib_lpthread_woff=yes
13494 else
13495   echo "configure: failed program was:" >&5
13496   cat conftest.$ac_ext >&5
13497   rm -rf conftest*
13498   ol_cv_pthread_lib_lpthread_woff=no
13499 fi
13500 rm -f conftest*
13501 else
13502   cat > conftest.$ac_ext <<EOF
13503 #line 13504 "configure"
13504 #include "confdefs.h"
13505 /* pthread test headers */
13506 #include <pthread.h>
13507 #ifndef NULL
13508 #define NULL (void*)0
13509 #endif
13510
13511 static void *task(p)
13512         void *p;
13513 {
13514         return (void *) (p == NULL);
13515 }
13516
13517
13518 int main(argc, argv)
13519         int argc;
13520         char **argv;
13521 {
13522
13523         /* pthread test function */
13524         pthread_t t;
13525         int status;
13526         int detach = 1;
13527
13528 #ifdef HAVE_PTHREADS_FINAL
13529         /* Final pthreads */
13530         pthread_attr_t attr;
13531
13532         status = pthread_attr_init(&attr);
13533         if( status ) return status;
13534
13535 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13536         if( !detach ) {
13537 #if defined( PTHREAD_CREATE_JOINABLE )
13538                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13539 #else
13540                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13541 #endif
13542
13543 #ifdef PTHREAD_CREATE_DETACHED
13544         } else {
13545                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13546 #endif
13547         }
13548         if( status ) return status;
13549 #endif
13550
13551         status = pthread_create( &t, &attr, task, NULL );
13552         if( status ) return status;
13553
13554 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13555         if( detach ) {
13556                 /* give thread a chance to complete */
13557                 /* it should remain joinable and hence detachable */
13558                 sleep( 1 );
13559
13560                 status = pthread_detach( t );
13561                 if( status ) return status;
13562         }
13563 #endif
13564
13565 #else
13566         /* Draft 4 pthreads */
13567         status = pthread_create( &t, pthread_attr_default, task, NULL );
13568         if( status ) return status;
13569
13570         if( detach ) {
13571                 /* give thread a chance to complete */
13572                 /* it should remain joinable and hence detachable */
13573                 sleep( 1 );
13574
13575                 status = pthread_detach( &t );
13576                 if( status ) return status;
13577         }
13578 #endif
13579
13580 #ifdef HAVE_LINUX_THREADS
13581         pthread_kill_other_threads_np();
13582 #endif
13583
13584         return 0;
13585
13586 }
13587
13588 EOF
13589 if { (eval echo configure:13590: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13590 then
13591   ol_cv_pthread_lib_lpthread_woff=yes
13592 else
13593   echo "configure: failed program was:" >&5
13594   cat conftest.$ac_ext >&5
13595   rm -fr conftest*
13596   ol_cv_pthread_lib_lpthread_woff=no
13597 fi
13598 rm -fr conftest*
13599 fi
13600
13601
13602                 # restore the LIBS
13603                 LIBS="$ol_LIBS"
13604         
13605 fi
13606
13607 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13608
13609         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13610                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13611                 ol_link_threads=posix
13612         fi
13613 fi
13614
13615
13616                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13617 if test "$ol_link_threads" = no ; then
13618         # try -lpthread
13619         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13620 echo "configure:13621: checking for pthread link with -lpthread" >&5
13621 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13622   echo $ac_n "(cached) $ac_c" 1>&6
13623 else
13624   
13625                 # save the flags
13626                 ol_LIBS="$LIBS"
13627                 LIBS="-lpthread $LIBS"
13628
13629                 if test "$cross_compiling" = yes; then
13630   cat > conftest.$ac_ext <<EOF
13631 #line 13632 "configure"
13632 #include "confdefs.h"
13633 /* pthread test headers */
13634 #include <pthread.h>
13635 #ifndef NULL
13636 #define NULL (void*)0
13637 #endif
13638
13639 static void *task(p)
13640         void *p;
13641 {
13642         return (void *) (p == NULL);
13643 }
13644
13645 int main() {
13646
13647         /* pthread test function */
13648         pthread_t t;
13649         int status;
13650         int detach = 1;
13651
13652 #ifdef HAVE_PTHREADS_FINAL
13653         /* Final pthreads */
13654         pthread_attr_t attr;
13655
13656         status = pthread_attr_init(&attr);
13657         if( status ) return status;
13658
13659 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13660         if( !detach ) {
13661 #if defined( PTHREAD_CREATE_JOINABLE )
13662                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13663 #else
13664                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13665 #endif
13666
13667 #ifdef PTHREAD_CREATE_DETACHED
13668         } else {
13669                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13670 #endif
13671         }
13672         if( status ) return status;
13673 #endif
13674
13675         status = pthread_create( &t, &attr, task, NULL );
13676         if( status ) return status;
13677
13678 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13679         if( detach ) {
13680                 /* give thread a chance to complete */
13681                 /* it should remain joinable and hence detachable */
13682                 sleep( 1 );
13683
13684                 status = pthread_detach( t );
13685                 if( status ) return status;
13686         }
13687 #endif
13688
13689 #else
13690         /* Draft 4 pthreads */
13691         status = pthread_create( &t, pthread_attr_default, task, NULL );
13692         if( status ) return status;
13693
13694         if( detach ) {
13695                 /* give thread a chance to complete */
13696                 /* it should remain joinable and hence detachable */
13697                 sleep( 1 );
13698
13699                 status = pthread_detach( &t );
13700                 if( status ) return status;
13701         }
13702 #endif
13703
13704 #ifdef HAVE_LINUX_THREADS
13705         pthread_kill_other_threads_np();
13706 #endif
13707
13708         return 0;
13709
13710 ; return 0; }
13711 EOF
13712 if { (eval echo configure:13713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13713   rm -rf conftest*
13714   ol_cv_pthread_lpthread=yes
13715 else
13716   echo "configure: failed program was:" >&5
13717   cat conftest.$ac_ext >&5
13718   rm -rf conftest*
13719   ol_cv_pthread_lpthread=no
13720 fi
13721 rm -f conftest*
13722 else
13723   cat > conftest.$ac_ext <<EOF
13724 #line 13725 "configure"
13725 #include "confdefs.h"
13726 /* pthread test headers */
13727 #include <pthread.h>
13728 #ifndef NULL
13729 #define NULL (void*)0
13730 #endif
13731
13732 static void *task(p)
13733         void *p;
13734 {
13735         return (void *) (p == NULL);
13736 }
13737
13738
13739 int main(argc, argv)
13740         int argc;
13741         char **argv;
13742 {
13743
13744         /* pthread test function */
13745         pthread_t t;
13746         int status;
13747         int detach = 1;
13748
13749 #ifdef HAVE_PTHREADS_FINAL
13750         /* Final pthreads */
13751         pthread_attr_t attr;
13752
13753         status = pthread_attr_init(&attr);
13754         if( status ) return status;
13755
13756 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13757         if( !detach ) {
13758 #if defined( PTHREAD_CREATE_JOINABLE )
13759                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13760 #else
13761                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13762 #endif
13763
13764 #ifdef PTHREAD_CREATE_DETACHED
13765         } else {
13766                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13767 #endif
13768         }
13769         if( status ) return status;
13770 #endif
13771
13772         status = pthread_create( &t, &attr, task, NULL );
13773         if( status ) return status;
13774
13775 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13776         if( detach ) {
13777                 /* give thread a chance to complete */
13778                 /* it should remain joinable and hence detachable */
13779                 sleep( 1 );
13780
13781                 status = pthread_detach( t );
13782                 if( status ) return status;
13783         }
13784 #endif
13785
13786 #else
13787         /* Draft 4 pthreads */
13788         status = pthread_create( &t, pthread_attr_default, task, NULL );
13789         if( status ) return status;
13790
13791         if( detach ) {
13792                 /* give thread a chance to complete */
13793                 /* it should remain joinable and hence detachable */
13794                 sleep( 1 );
13795
13796                 status = pthread_detach( &t );
13797                 if( status ) return status;
13798         }
13799 #endif
13800
13801 #ifdef HAVE_LINUX_THREADS
13802         pthread_kill_other_threads_np();
13803 #endif
13804
13805         return 0;
13806
13807 }
13808
13809 EOF
13810 if { (eval echo configure:13811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13811 then
13812   ol_cv_pthread_lpthread=yes
13813 else
13814   echo "configure: failed program was:" >&5
13815   cat conftest.$ac_ext >&5
13816   rm -fr conftest*
13817   ol_cv_pthread_lpthread=no
13818 fi
13819 rm -fr conftest*
13820 fi
13821
13822
13823                 # restore the LIBS
13824                 LIBS="$ol_LIBS"
13825         
13826 fi
13827
13828 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13829
13830         if test $ol_cv_pthread_lpthread = yes ; then
13831                 ol_link_pthreads="-lpthread"
13832                 ol_link_threads=posix
13833         fi
13834 fi
13835
13836                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13837 if test "$ol_link_threads" = no ; then
13838         # try -lc_r
13839         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13840 echo "configure:13841: checking for pthread link with -lc_r" >&5
13841 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13842   echo $ac_n "(cached) $ac_c" 1>&6
13843 else
13844   
13845                 # save the flags
13846                 ol_LIBS="$LIBS"
13847                 LIBS="-lc_r $LIBS"
13848
13849                 if test "$cross_compiling" = yes; then
13850   cat > conftest.$ac_ext <<EOF
13851 #line 13852 "configure"
13852 #include "confdefs.h"
13853 /* pthread test headers */
13854 #include <pthread.h>
13855 #ifndef NULL
13856 #define NULL (void*)0
13857 #endif
13858
13859 static void *task(p)
13860         void *p;
13861 {
13862         return (void *) (p == NULL);
13863 }
13864
13865 int main() {
13866
13867         /* pthread test function */
13868         pthread_t t;
13869         int status;
13870         int detach = 1;
13871
13872 #ifdef HAVE_PTHREADS_FINAL
13873         /* Final pthreads */
13874         pthread_attr_t attr;
13875
13876         status = pthread_attr_init(&attr);
13877         if( status ) return status;
13878
13879 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13880         if( !detach ) {
13881 #if defined( PTHREAD_CREATE_JOINABLE )
13882                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13883 #else
13884                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13885 #endif
13886
13887 #ifdef PTHREAD_CREATE_DETACHED
13888         } else {
13889                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13890 #endif
13891         }
13892         if( status ) return status;
13893 #endif
13894
13895         status = pthread_create( &t, &attr, task, NULL );
13896         if( status ) return status;
13897
13898 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13899         if( detach ) {
13900                 /* give thread a chance to complete */
13901                 /* it should remain joinable and hence detachable */
13902                 sleep( 1 );
13903
13904                 status = pthread_detach( t );
13905                 if( status ) return status;
13906         }
13907 #endif
13908
13909 #else
13910         /* Draft 4 pthreads */
13911         status = pthread_create( &t, pthread_attr_default, task, NULL );
13912         if( status ) return status;
13913
13914         if( detach ) {
13915                 /* give thread a chance to complete */
13916                 /* it should remain joinable and hence detachable */
13917                 sleep( 1 );
13918
13919                 status = pthread_detach( &t );
13920                 if( status ) return status;
13921         }
13922 #endif
13923
13924 #ifdef HAVE_LINUX_THREADS
13925         pthread_kill_other_threads_np();
13926 #endif
13927
13928         return 0;
13929
13930 ; return 0; }
13931 EOF
13932 if { (eval echo configure:13933: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13933   rm -rf conftest*
13934   ol_cv_pthread_lc_r=yes
13935 else
13936   echo "configure: failed program was:" >&5
13937   cat conftest.$ac_ext >&5
13938   rm -rf conftest*
13939   ol_cv_pthread_lc_r=no
13940 fi
13941 rm -f conftest*
13942 else
13943   cat > conftest.$ac_ext <<EOF
13944 #line 13945 "configure"
13945 #include "confdefs.h"
13946 /* pthread test headers */
13947 #include <pthread.h>
13948 #ifndef NULL
13949 #define NULL (void*)0
13950 #endif
13951
13952 static void *task(p)
13953         void *p;
13954 {
13955         return (void *) (p == NULL);
13956 }
13957
13958
13959 int main(argc, argv)
13960         int argc;
13961         char **argv;
13962 {
13963
13964         /* pthread test function */
13965         pthread_t t;
13966         int status;
13967         int detach = 1;
13968
13969 #ifdef HAVE_PTHREADS_FINAL
13970         /* Final pthreads */
13971         pthread_attr_t attr;
13972
13973         status = pthread_attr_init(&attr);
13974         if( status ) return status;
13975
13976 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13977         if( !detach ) {
13978 #if defined( PTHREAD_CREATE_JOINABLE )
13979                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13980 #else
13981                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13982 #endif
13983
13984 #ifdef PTHREAD_CREATE_DETACHED
13985         } else {
13986                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13987 #endif
13988         }
13989         if( status ) return status;
13990 #endif
13991
13992         status = pthread_create( &t, &attr, task, NULL );
13993         if( status ) return status;
13994
13995 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13996         if( detach ) {
13997                 /* give thread a chance to complete */
13998                 /* it should remain joinable and hence detachable */
13999                 sleep( 1 );
14000
14001                 status = pthread_detach( t );
14002                 if( status ) return status;
14003         }
14004 #endif
14005
14006 #else
14007         /* Draft 4 pthreads */
14008         status = pthread_create( &t, pthread_attr_default, task, NULL );
14009         if( status ) return status;
14010
14011         if( detach ) {
14012                 /* give thread a chance to complete */
14013                 /* it should remain joinable and hence detachable */
14014                 sleep( 1 );
14015
14016                 status = pthread_detach( &t );
14017                 if( status ) return status;
14018         }
14019 #endif
14020
14021 #ifdef HAVE_LINUX_THREADS
14022         pthread_kill_other_threads_np();
14023 #endif
14024
14025         return 0;
14026
14027 }
14028
14029 EOF
14030 if { (eval echo configure:14031: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14031 then
14032   ol_cv_pthread_lc_r=yes
14033 else
14034   echo "configure: failed program was:" >&5
14035   cat conftest.$ac_ext >&5
14036   rm -fr conftest*
14037   ol_cv_pthread_lc_r=no
14038 fi
14039 rm -fr conftest*
14040 fi
14041
14042
14043                 # restore the LIBS
14044                 LIBS="$ol_LIBS"
14045         
14046 fi
14047
14048 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14049
14050         if test $ol_cv_pthread_lc_r = yes ; then
14051                 ol_link_pthreads="-lc_r"
14052                 ol_link_threads=posix
14053         fi
14054 fi
14055
14056
14057                 # Pthread try link: -threads (ol_cv_pthread_threads)
14058 if test "$ol_link_threads" = no ; then
14059         # try -threads
14060         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14061 echo "configure:14062: checking for pthread link with -threads" >&5
14062 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14063   echo $ac_n "(cached) $ac_c" 1>&6
14064 else
14065   
14066                 # save the flags
14067                 ol_LIBS="$LIBS"
14068                 LIBS="-threads $LIBS"
14069
14070                 if test "$cross_compiling" = yes; then
14071   cat > conftest.$ac_ext <<EOF
14072 #line 14073 "configure"
14073 #include "confdefs.h"
14074 /* pthread test headers */
14075 #include <pthread.h>
14076 #ifndef NULL
14077 #define NULL (void*)0
14078 #endif
14079
14080 static void *task(p)
14081         void *p;
14082 {
14083         return (void *) (p == NULL);
14084 }
14085
14086 int main() {
14087
14088         /* pthread test function */
14089         pthread_t t;
14090         int status;
14091         int detach = 1;
14092
14093 #ifdef HAVE_PTHREADS_FINAL
14094         /* Final pthreads */
14095         pthread_attr_t attr;
14096
14097         status = pthread_attr_init(&attr);
14098         if( status ) return status;
14099
14100 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14101         if( !detach ) {
14102 #if defined( PTHREAD_CREATE_JOINABLE )
14103                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14104 #else
14105                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14106 #endif
14107
14108 #ifdef PTHREAD_CREATE_DETACHED
14109         } else {
14110                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14111 #endif
14112         }
14113         if( status ) return status;
14114 #endif
14115
14116         status = pthread_create( &t, &attr, task, NULL );
14117         if( status ) return status;
14118
14119 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14120         if( detach ) {
14121                 /* give thread a chance to complete */
14122                 /* it should remain joinable and hence detachable */
14123                 sleep( 1 );
14124
14125                 status = pthread_detach( t );
14126                 if( status ) return status;
14127         }
14128 #endif
14129
14130 #else
14131         /* Draft 4 pthreads */
14132         status = pthread_create( &t, pthread_attr_default, task, NULL );
14133         if( status ) return status;
14134
14135         if( detach ) {
14136                 /* give thread a chance to complete */
14137                 /* it should remain joinable and hence detachable */
14138                 sleep( 1 );
14139
14140                 status = pthread_detach( &t );
14141                 if( status ) return status;
14142         }
14143 #endif
14144
14145 #ifdef HAVE_LINUX_THREADS
14146         pthread_kill_other_threads_np();
14147 #endif
14148
14149         return 0;
14150
14151 ; return 0; }
14152 EOF
14153 if { (eval echo configure:14154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14154   rm -rf conftest*
14155   ol_cv_pthread_threads=yes
14156 else
14157   echo "configure: failed program was:" >&5
14158   cat conftest.$ac_ext >&5
14159   rm -rf conftest*
14160   ol_cv_pthread_threads=no
14161 fi
14162 rm -f conftest*
14163 else
14164   cat > conftest.$ac_ext <<EOF
14165 #line 14166 "configure"
14166 #include "confdefs.h"
14167 /* pthread test headers */
14168 #include <pthread.h>
14169 #ifndef NULL
14170 #define NULL (void*)0
14171 #endif
14172
14173 static void *task(p)
14174         void *p;
14175 {
14176         return (void *) (p == NULL);
14177 }
14178
14179
14180 int main(argc, argv)
14181         int argc;
14182         char **argv;
14183 {
14184
14185         /* pthread test function */
14186         pthread_t t;
14187         int status;
14188         int detach = 1;
14189
14190 #ifdef HAVE_PTHREADS_FINAL
14191         /* Final pthreads */
14192         pthread_attr_t attr;
14193
14194         status = pthread_attr_init(&attr);
14195         if( status ) return status;
14196
14197 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14198         if( !detach ) {
14199 #if defined( PTHREAD_CREATE_JOINABLE )
14200                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14201 #else
14202                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14203 #endif
14204
14205 #ifdef PTHREAD_CREATE_DETACHED
14206         } else {
14207                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14208 #endif
14209         }
14210         if( status ) return status;
14211 #endif
14212
14213         status = pthread_create( &t, &attr, task, NULL );
14214         if( status ) return status;
14215
14216 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14217         if( detach ) {
14218                 /* give thread a chance to complete */
14219                 /* it should remain joinable and hence detachable */
14220                 sleep( 1 );
14221
14222                 status = pthread_detach( t );
14223                 if( status ) return status;
14224         }
14225 #endif
14226
14227 #else
14228         /* Draft 4 pthreads */
14229         status = pthread_create( &t, pthread_attr_default, task, NULL );
14230         if( status ) return status;
14231
14232         if( detach ) {
14233                 /* give thread a chance to complete */
14234                 /* it should remain joinable and hence detachable */
14235                 sleep( 1 );
14236
14237                 status = pthread_detach( &t );
14238                 if( status ) return status;
14239         }
14240 #endif
14241
14242 #ifdef HAVE_LINUX_THREADS
14243         pthread_kill_other_threads_np();
14244 #endif
14245
14246         return 0;
14247
14248 }
14249
14250 EOF
14251 if { (eval echo configure:14252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14252 then
14253   ol_cv_pthread_threads=yes
14254 else
14255   echo "configure: failed program was:" >&5
14256   cat conftest.$ac_ext >&5
14257   rm -fr conftest*
14258   ol_cv_pthread_threads=no
14259 fi
14260 rm -fr conftest*
14261 fi
14262
14263
14264                 # restore the LIBS
14265                 LIBS="$ol_LIBS"
14266         
14267 fi
14268
14269 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14270
14271         if test $ol_cv_pthread_threads = yes ; then
14272                 ol_link_pthreads="-threads"
14273                 ol_link_threads=posix
14274         fi
14275 fi
14276
14277
14278                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14279 if test "$ol_link_threads" = no ; then
14280         # try -lpthreads -lmach -lexc -lc_r
14281         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14282 echo "configure:14283: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14283 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14284   echo $ac_n "(cached) $ac_c" 1>&6
14285 else
14286   
14287                 # save the flags
14288                 ol_LIBS="$LIBS"
14289                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14290
14291                 if test "$cross_compiling" = yes; then
14292   cat > conftest.$ac_ext <<EOF
14293 #line 14294 "configure"
14294 #include "confdefs.h"
14295 /* pthread test headers */
14296 #include <pthread.h>
14297 #ifndef NULL
14298 #define NULL (void*)0
14299 #endif
14300
14301 static void *task(p)
14302         void *p;
14303 {
14304         return (void *) (p == NULL);
14305 }
14306
14307 int main() {
14308
14309         /* pthread test function */
14310         pthread_t t;
14311         int status;
14312         int detach = 1;
14313
14314 #ifdef HAVE_PTHREADS_FINAL
14315         /* Final pthreads */
14316         pthread_attr_t attr;
14317
14318         status = pthread_attr_init(&attr);
14319         if( status ) return status;
14320
14321 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14322         if( !detach ) {
14323 #if defined( PTHREAD_CREATE_JOINABLE )
14324                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14325 #else
14326                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14327 #endif
14328
14329 #ifdef PTHREAD_CREATE_DETACHED
14330         } else {
14331                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14332 #endif
14333         }
14334         if( status ) return status;
14335 #endif
14336
14337         status = pthread_create( &t, &attr, task, NULL );
14338         if( status ) return status;
14339
14340 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14341         if( detach ) {
14342                 /* give thread a chance to complete */
14343                 /* it should remain joinable and hence detachable */
14344                 sleep( 1 );
14345
14346                 status = pthread_detach( t );
14347                 if( status ) return status;
14348         }
14349 #endif
14350
14351 #else
14352         /* Draft 4 pthreads */
14353         status = pthread_create( &t, pthread_attr_default, task, NULL );
14354         if( status ) return status;
14355
14356         if( detach ) {
14357                 /* give thread a chance to complete */
14358                 /* it should remain joinable and hence detachable */
14359                 sleep( 1 );
14360
14361                 status = pthread_detach( &t );
14362                 if( status ) return status;
14363         }
14364 #endif
14365
14366 #ifdef HAVE_LINUX_THREADS
14367         pthread_kill_other_threads_np();
14368 #endif
14369
14370         return 0;
14371
14372 ; return 0; }
14373 EOF
14374 if { (eval echo configure:14375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14375   rm -rf conftest*
14376   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14377 else
14378   echo "configure: failed program was:" >&5
14379   cat conftest.$ac_ext >&5
14380   rm -rf conftest*
14381   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14382 fi
14383 rm -f conftest*
14384 else
14385   cat > conftest.$ac_ext <<EOF
14386 #line 14387 "configure"
14387 #include "confdefs.h"
14388 /* pthread test headers */
14389 #include <pthread.h>
14390 #ifndef NULL
14391 #define NULL (void*)0
14392 #endif
14393
14394 static void *task(p)
14395         void *p;
14396 {
14397         return (void *) (p == NULL);
14398 }
14399
14400
14401 int main(argc, argv)
14402         int argc;
14403         char **argv;
14404 {
14405
14406         /* pthread test function */
14407         pthread_t t;
14408         int status;
14409         int detach = 1;
14410
14411 #ifdef HAVE_PTHREADS_FINAL
14412         /* Final pthreads */
14413         pthread_attr_t attr;
14414
14415         status = pthread_attr_init(&attr);
14416         if( status ) return status;
14417
14418 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14419         if( !detach ) {
14420 #if defined( PTHREAD_CREATE_JOINABLE )
14421                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14422 #else
14423                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14424 #endif
14425
14426 #ifdef PTHREAD_CREATE_DETACHED
14427         } else {
14428                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14429 #endif
14430         }
14431         if( status ) return status;
14432 #endif
14433
14434         status = pthread_create( &t, &attr, task, NULL );
14435         if( status ) return status;
14436
14437 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14438         if( detach ) {
14439                 /* give thread a chance to complete */
14440                 /* it should remain joinable and hence detachable */
14441                 sleep( 1 );
14442
14443                 status = pthread_detach( t );
14444                 if( status ) return status;
14445         }
14446 #endif
14447
14448 #else
14449         /* Draft 4 pthreads */
14450         status = pthread_create( &t, pthread_attr_default, task, NULL );
14451         if( status ) return status;
14452
14453         if( detach ) {
14454                 /* give thread a chance to complete */
14455                 /* it should remain joinable and hence detachable */
14456                 sleep( 1 );
14457
14458                 status = pthread_detach( &t );
14459                 if( status ) return status;
14460         }
14461 #endif
14462
14463 #ifdef HAVE_LINUX_THREADS
14464         pthread_kill_other_threads_np();
14465 #endif
14466
14467         return 0;
14468
14469 }
14470
14471 EOF
14472 if { (eval echo configure:14473: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14473 then
14474   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14475 else
14476   echo "configure: failed program was:" >&5
14477   cat conftest.$ac_ext >&5
14478   rm -fr conftest*
14479   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14480 fi
14481 rm -fr conftest*
14482 fi
14483
14484
14485                 # restore the LIBS
14486                 LIBS="$ol_LIBS"
14487         
14488 fi
14489
14490 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14491
14492         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14493                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14494                 ol_link_threads=posix
14495         fi
14496 fi
14497
14498                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14499 if test "$ol_link_threads" = no ; then
14500         # try -lpthreads -lmach -lexc
14501         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14502 echo "configure:14503: checking for pthread link with -lpthreads -lmach -lexc" >&5
14503 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14504   echo $ac_n "(cached) $ac_c" 1>&6
14505 else
14506   
14507                 # save the flags
14508                 ol_LIBS="$LIBS"
14509                 LIBS="-lpthreads -lmach -lexc $LIBS"
14510
14511                 if test "$cross_compiling" = yes; then
14512   cat > conftest.$ac_ext <<EOF
14513 #line 14514 "configure"
14514 #include "confdefs.h"
14515 /* pthread test headers */
14516 #include <pthread.h>
14517 #ifndef NULL
14518 #define NULL (void*)0
14519 #endif
14520
14521 static void *task(p)
14522         void *p;
14523 {
14524         return (void *) (p == NULL);
14525 }
14526
14527 int main() {
14528
14529         /* pthread test function */
14530         pthread_t t;
14531         int status;
14532         int detach = 1;
14533
14534 #ifdef HAVE_PTHREADS_FINAL
14535         /* Final pthreads */
14536         pthread_attr_t attr;
14537
14538         status = pthread_attr_init(&attr);
14539         if( status ) return status;
14540
14541 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14542         if( !detach ) {
14543 #if defined( PTHREAD_CREATE_JOINABLE )
14544                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14545 #else
14546                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14547 #endif
14548
14549 #ifdef PTHREAD_CREATE_DETACHED
14550         } else {
14551                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14552 #endif
14553         }
14554         if( status ) return status;
14555 #endif
14556
14557         status = pthread_create( &t, &attr, task, NULL );
14558         if( status ) return status;
14559
14560 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14561         if( detach ) {
14562                 /* give thread a chance to complete */
14563                 /* it should remain joinable and hence detachable */
14564                 sleep( 1 );
14565
14566                 status = pthread_detach( t );
14567                 if( status ) return status;
14568         }
14569 #endif
14570
14571 #else
14572         /* Draft 4 pthreads */
14573         status = pthread_create( &t, pthread_attr_default, task, NULL );
14574         if( status ) return status;
14575
14576         if( detach ) {
14577                 /* give thread a chance to complete */
14578                 /* it should remain joinable and hence detachable */
14579                 sleep( 1 );
14580
14581                 status = pthread_detach( &t );
14582                 if( status ) return status;
14583         }
14584 #endif
14585
14586 #ifdef HAVE_LINUX_THREADS
14587         pthread_kill_other_threads_np();
14588 #endif
14589
14590         return 0;
14591
14592 ; return 0; }
14593 EOF
14594 if { (eval echo configure:14595: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14595   rm -rf conftest*
14596   ol_cv_pthread_lpthreads_lmach_lexc=yes
14597 else
14598   echo "configure: failed program was:" >&5
14599   cat conftest.$ac_ext >&5
14600   rm -rf conftest*
14601   ol_cv_pthread_lpthreads_lmach_lexc=no
14602 fi
14603 rm -f conftest*
14604 else
14605   cat > conftest.$ac_ext <<EOF
14606 #line 14607 "configure"
14607 #include "confdefs.h"
14608 /* pthread test headers */
14609 #include <pthread.h>
14610 #ifndef NULL
14611 #define NULL (void*)0
14612 #endif
14613
14614 static void *task(p)
14615         void *p;
14616 {
14617         return (void *) (p == NULL);
14618 }
14619
14620
14621 int main(argc, argv)
14622         int argc;
14623         char **argv;
14624 {
14625
14626         /* pthread test function */
14627         pthread_t t;
14628         int status;
14629         int detach = 1;
14630
14631 #ifdef HAVE_PTHREADS_FINAL
14632         /* Final pthreads */
14633         pthread_attr_t attr;
14634
14635         status = pthread_attr_init(&attr);
14636         if( status ) return status;
14637
14638 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14639         if( !detach ) {
14640 #if defined( PTHREAD_CREATE_JOINABLE )
14641                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14642 #else
14643                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14644 #endif
14645
14646 #ifdef PTHREAD_CREATE_DETACHED
14647         } else {
14648                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14649 #endif
14650         }
14651         if( status ) return status;
14652 #endif
14653
14654         status = pthread_create( &t, &attr, task, NULL );
14655         if( status ) return status;
14656
14657 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14658         if( detach ) {
14659                 /* give thread a chance to complete */
14660                 /* it should remain joinable and hence detachable */
14661                 sleep( 1 );
14662
14663                 status = pthread_detach( t );
14664                 if( status ) return status;
14665         }
14666 #endif
14667
14668 #else
14669         /* Draft 4 pthreads */
14670         status = pthread_create( &t, pthread_attr_default, task, NULL );
14671         if( status ) return status;
14672
14673         if( detach ) {
14674                 /* give thread a chance to complete */
14675                 /* it should remain joinable and hence detachable */
14676                 sleep( 1 );
14677
14678                 status = pthread_detach( &t );
14679                 if( status ) return status;
14680         }
14681 #endif
14682
14683 #ifdef HAVE_LINUX_THREADS
14684         pthread_kill_other_threads_np();
14685 #endif
14686
14687         return 0;
14688
14689 }
14690
14691 EOF
14692 if { (eval echo configure:14693: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14693 then
14694   ol_cv_pthread_lpthreads_lmach_lexc=yes
14695 else
14696   echo "configure: failed program was:" >&5
14697   cat conftest.$ac_ext >&5
14698   rm -fr conftest*
14699   ol_cv_pthread_lpthreads_lmach_lexc=no
14700 fi
14701 rm -fr conftest*
14702 fi
14703
14704
14705                 # restore the LIBS
14706                 LIBS="$ol_LIBS"
14707         
14708 fi
14709
14710 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14711
14712         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14713                 ol_link_pthreads="-lpthreads -lmach -lexc"
14714                 ol_link_threads=posix
14715         fi
14716 fi
14717
14718                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14719 if test "$ol_link_threads" = no ; then
14720         # try -lpthreads -lexc
14721         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14722 echo "configure:14723: checking for pthread link with -lpthreads -lexc" >&5
14723 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14724   echo $ac_n "(cached) $ac_c" 1>&6
14725 else
14726   
14727                 # save the flags
14728                 ol_LIBS="$LIBS"
14729                 LIBS="-lpthreads -lexc $LIBS"
14730
14731                 if test "$cross_compiling" = yes; then
14732   cat > conftest.$ac_ext <<EOF
14733 #line 14734 "configure"
14734 #include "confdefs.h"
14735 /* pthread test headers */
14736 #include <pthread.h>
14737 #ifndef NULL
14738 #define NULL (void*)0
14739 #endif
14740
14741 static void *task(p)
14742         void *p;
14743 {
14744         return (void *) (p == NULL);
14745 }
14746
14747 int main() {
14748
14749         /* pthread test function */
14750         pthread_t t;
14751         int status;
14752         int detach = 1;
14753
14754 #ifdef HAVE_PTHREADS_FINAL
14755         /* Final pthreads */
14756         pthread_attr_t attr;
14757
14758         status = pthread_attr_init(&attr);
14759         if( status ) return status;
14760
14761 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14762         if( !detach ) {
14763 #if defined( PTHREAD_CREATE_JOINABLE )
14764                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14765 #else
14766                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14767 #endif
14768
14769 #ifdef PTHREAD_CREATE_DETACHED
14770         } else {
14771                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14772 #endif
14773         }
14774         if( status ) return status;
14775 #endif
14776
14777         status = pthread_create( &t, &attr, task, NULL );
14778         if( status ) return status;
14779
14780 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14781         if( detach ) {
14782                 /* give thread a chance to complete */
14783                 /* it should remain joinable and hence detachable */
14784                 sleep( 1 );
14785
14786                 status = pthread_detach( t );
14787                 if( status ) return status;
14788         }
14789 #endif
14790
14791 #else
14792         /* Draft 4 pthreads */
14793         status = pthread_create( &t, pthread_attr_default, task, NULL );
14794         if( status ) return status;
14795
14796         if( detach ) {
14797                 /* give thread a chance to complete */
14798                 /* it should remain joinable and hence detachable */
14799                 sleep( 1 );
14800
14801                 status = pthread_detach( &t );
14802                 if( status ) return status;
14803         }
14804 #endif
14805
14806 #ifdef HAVE_LINUX_THREADS
14807         pthread_kill_other_threads_np();
14808 #endif
14809
14810         return 0;
14811
14812 ; return 0; }
14813 EOF
14814 if { (eval echo configure:14815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14815   rm -rf conftest*
14816   ol_cv_pthread_lpthreads_lexc=yes
14817 else
14818   echo "configure: failed program was:" >&5
14819   cat conftest.$ac_ext >&5
14820   rm -rf conftest*
14821   ol_cv_pthread_lpthreads_lexc=no
14822 fi
14823 rm -f conftest*
14824 else
14825   cat > conftest.$ac_ext <<EOF
14826 #line 14827 "configure"
14827 #include "confdefs.h"
14828 /* pthread test headers */
14829 #include <pthread.h>
14830 #ifndef NULL
14831 #define NULL (void*)0
14832 #endif
14833
14834 static void *task(p)
14835         void *p;
14836 {
14837         return (void *) (p == NULL);
14838 }
14839
14840
14841 int main(argc, argv)
14842         int argc;
14843         char **argv;
14844 {
14845
14846         /* pthread test function */
14847         pthread_t t;
14848         int status;
14849         int detach = 1;
14850
14851 #ifdef HAVE_PTHREADS_FINAL
14852         /* Final pthreads */
14853         pthread_attr_t attr;
14854
14855         status = pthread_attr_init(&attr);
14856         if( status ) return status;
14857
14858 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14859         if( !detach ) {
14860 #if defined( PTHREAD_CREATE_JOINABLE )
14861                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14862 #else
14863                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14864 #endif
14865
14866 #ifdef PTHREAD_CREATE_DETACHED
14867         } else {
14868                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14869 #endif
14870         }
14871         if( status ) return status;
14872 #endif
14873
14874         status = pthread_create( &t, &attr, task, NULL );
14875         if( status ) return status;
14876
14877 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14878         if( detach ) {
14879                 /* give thread a chance to complete */
14880                 /* it should remain joinable and hence detachable */
14881                 sleep( 1 );
14882
14883                 status = pthread_detach( t );
14884                 if( status ) return status;
14885         }
14886 #endif
14887
14888 #else
14889         /* Draft 4 pthreads */
14890         status = pthread_create( &t, pthread_attr_default, task, NULL );
14891         if( status ) return status;
14892
14893         if( detach ) {
14894                 /* give thread a chance to complete */
14895                 /* it should remain joinable and hence detachable */
14896                 sleep( 1 );
14897
14898                 status = pthread_detach( &t );
14899                 if( status ) return status;
14900         }
14901 #endif
14902
14903 #ifdef HAVE_LINUX_THREADS
14904         pthread_kill_other_threads_np();
14905 #endif
14906
14907         return 0;
14908
14909 }
14910
14911 EOF
14912 if { (eval echo configure:14913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14913 then
14914   ol_cv_pthread_lpthreads_lexc=yes
14915 else
14916   echo "configure: failed program was:" >&5
14917   cat conftest.$ac_ext >&5
14918   rm -fr conftest*
14919   ol_cv_pthread_lpthreads_lexc=no
14920 fi
14921 rm -fr conftest*
14922 fi
14923
14924
14925                 # restore the LIBS
14926                 LIBS="$ol_LIBS"
14927         
14928 fi
14929
14930 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14931
14932         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14933                 ol_link_pthreads="-lpthreads -lexc"
14934                 ol_link_threads=posix
14935         fi
14936 fi
14937
14938
14939                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14940 if test "$ol_link_threads" = no ; then
14941         # try -lpthreads
14942         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14943 echo "configure:14944: checking for pthread link with -lpthreads" >&5
14944 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14945   echo $ac_n "(cached) $ac_c" 1>&6
14946 else
14947   
14948                 # save the flags
14949                 ol_LIBS="$LIBS"
14950                 LIBS="-lpthreads $LIBS"
14951
14952                 if test "$cross_compiling" = yes; then
14953   cat > conftest.$ac_ext <<EOF
14954 #line 14955 "configure"
14955 #include "confdefs.h"
14956 /* pthread test headers */
14957 #include <pthread.h>
14958 #ifndef NULL
14959 #define NULL (void*)0
14960 #endif
14961
14962 static void *task(p)
14963         void *p;
14964 {
14965         return (void *) (p == NULL);
14966 }
14967
14968 int main() {
14969
14970         /* pthread test function */
14971         pthread_t t;
14972         int status;
14973         int detach = 1;
14974
14975 #ifdef HAVE_PTHREADS_FINAL
14976         /* Final pthreads */
14977         pthread_attr_t attr;
14978
14979         status = pthread_attr_init(&attr);
14980         if( status ) return status;
14981
14982 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14983         if( !detach ) {
14984 #if defined( PTHREAD_CREATE_JOINABLE )
14985                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14986 #else
14987                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14988 #endif
14989
14990 #ifdef PTHREAD_CREATE_DETACHED
14991         } else {
14992                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14993 #endif
14994         }
14995         if( status ) return status;
14996 #endif
14997
14998         status = pthread_create( &t, &attr, task, NULL );
14999         if( status ) return status;
15000
15001 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15002         if( detach ) {
15003                 /* give thread a chance to complete */
15004                 /* it should remain joinable and hence detachable */
15005                 sleep( 1 );
15006
15007                 status = pthread_detach( t );
15008                 if( status ) return status;
15009         }
15010 #endif
15011
15012 #else
15013         /* Draft 4 pthreads */
15014         status = pthread_create( &t, pthread_attr_default, task, NULL );
15015         if( status ) return status;
15016
15017         if( detach ) {
15018                 /* give thread a chance to complete */
15019                 /* it should remain joinable and hence detachable */
15020                 sleep( 1 );
15021
15022                 status = pthread_detach( &t );
15023                 if( status ) return status;
15024         }
15025 #endif
15026
15027 #ifdef HAVE_LINUX_THREADS
15028         pthread_kill_other_threads_np();
15029 #endif
15030
15031         return 0;
15032
15033 ; return 0; }
15034 EOF
15035 if { (eval echo configure:15036: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15036   rm -rf conftest*
15037   ol_cv_pthread_lib_lpthreads=yes
15038 else
15039   echo "configure: failed program was:" >&5
15040   cat conftest.$ac_ext >&5
15041   rm -rf conftest*
15042   ol_cv_pthread_lib_lpthreads=no
15043 fi
15044 rm -f conftest*
15045 else
15046   cat > conftest.$ac_ext <<EOF
15047 #line 15048 "configure"
15048 #include "confdefs.h"
15049 /* pthread test headers */
15050 #include <pthread.h>
15051 #ifndef NULL
15052 #define NULL (void*)0
15053 #endif
15054
15055 static void *task(p)
15056         void *p;
15057 {
15058         return (void *) (p == NULL);
15059 }
15060
15061
15062 int main(argc, argv)
15063         int argc;
15064         char **argv;
15065 {
15066
15067         /* pthread test function */
15068         pthread_t t;
15069         int status;
15070         int detach = 1;
15071
15072 #ifdef HAVE_PTHREADS_FINAL
15073         /* Final pthreads */
15074         pthread_attr_t attr;
15075
15076         status = pthread_attr_init(&attr);
15077         if( status ) return status;
15078
15079 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15080         if( !detach ) {
15081 #if defined( PTHREAD_CREATE_JOINABLE )
15082                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15083 #else
15084                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15085 #endif
15086
15087 #ifdef PTHREAD_CREATE_DETACHED
15088         } else {
15089                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15090 #endif
15091         }
15092         if( status ) return status;
15093 #endif
15094
15095         status = pthread_create( &t, &attr, task, NULL );
15096         if( status ) return status;
15097
15098 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15099         if( detach ) {
15100                 /* give thread a chance to complete */
15101                 /* it should remain joinable and hence detachable */
15102                 sleep( 1 );
15103
15104                 status = pthread_detach( t );
15105                 if( status ) return status;
15106         }
15107 #endif
15108
15109 #else
15110         /* Draft 4 pthreads */
15111         status = pthread_create( &t, pthread_attr_default, task, NULL );
15112         if( status ) return status;
15113
15114         if( detach ) {
15115                 /* give thread a chance to complete */
15116                 /* it should remain joinable and hence detachable */
15117                 sleep( 1 );
15118
15119                 status = pthread_detach( &t );
15120                 if( status ) return status;
15121         }
15122 #endif
15123
15124 #ifdef HAVE_LINUX_THREADS
15125         pthread_kill_other_threads_np();
15126 #endif
15127
15128         return 0;
15129
15130 }
15131
15132 EOF
15133 if { (eval echo configure:15134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15134 then
15135   ol_cv_pthread_lib_lpthreads=yes
15136 else
15137   echo "configure: failed program was:" >&5
15138   cat conftest.$ac_ext >&5
15139   rm -fr conftest*
15140   ol_cv_pthread_lib_lpthreads=no
15141 fi
15142 rm -fr conftest*
15143 fi
15144
15145
15146                 # restore the LIBS
15147                 LIBS="$ol_LIBS"
15148         
15149 fi
15150
15151 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15152
15153         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15154                 ol_link_pthreads="-lpthreads"
15155                 ol_link_threads=posix
15156         fi
15157 fi
15158
15159
15160                 if test $ol_link_threads != no ; then
15161                         cat >> confdefs.h <<\EOF
15162 #define HAVE_PTHREADS 1
15163 EOF
15164
15165
15166                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15167
15168                                                 save_CPPFLAGS="$CPPFLAGS"
15169                         save_LIBS="$LIBS"
15170                         LIBS="$LTHREAD_LIBS $LIBS"
15171
15172                                                                                                 for ac_func in sched_yield pthread_yield
15173 do
15174 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15175 echo "configure:15176: checking for $ac_func" >&5
15176 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15177   echo $ac_n "(cached) $ac_c" 1>&6
15178 else
15179   cat > conftest.$ac_ext <<EOF
15180 #line 15181 "configure"
15181 #include "confdefs.h"
15182 /* System header to define __stub macros and hopefully few prototypes,
15183     which can conflict with char $ac_func(); below.  */
15184 #include <assert.h>
15185 /* Override any gcc2 internal prototype to avoid an error.  */
15186 /* We use char because int might match the return type of a gcc2
15187     builtin and then its argument prototype would still apply.  */
15188 char $ac_func();
15189 char (*f)();
15190
15191 int main() {
15192
15193 /* The GNU C library defines this for functions which it implements
15194     to always fail with ENOSYS.  Some functions are actually named
15195     something starting with __ and the normal name is an alias.  */
15196 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15197 choke me
15198 #else
15199 f = $ac_func;
15200 #endif
15201
15202 ; return 0; }
15203 EOF
15204 if { (eval echo configure:15205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15205   rm -rf conftest*
15206   eval "ac_cv_func_$ac_func=yes"
15207 else
15208   echo "configure: failed program was:" >&5
15209   cat conftest.$ac_ext >&5
15210   rm -rf conftest*
15211   eval "ac_cv_func_$ac_func=no"
15212 fi
15213 rm -f conftest*
15214 fi
15215
15216 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15217   echo "$ac_t""yes" 1>&6
15218     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15219   cat >> confdefs.h <<EOF
15220 #define $ac_tr_func 1
15221 EOF
15222  
15223 else
15224   echo "$ac_t""no" 1>&6
15225 fi
15226 done
15227
15228
15229                         if test $ac_cv_func_sched_yield = no -a \
15230                                 $ac_cv_func_pthread_yield = no ; then
15231                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15232 echo "configure:15233: checking for sched_yield in -lrt" >&5
15233 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15234 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15235   echo $ac_n "(cached) $ac_c" 1>&6
15236 else
15237   ac_save_LIBS="$LIBS"
15238 LIBS="-lrt  $LIBS"
15239 cat > conftest.$ac_ext <<EOF
15240 #line 15241 "configure"
15241 #include "confdefs.h"
15242 /* Override any gcc2 internal prototype to avoid an error.  */
15243 /* We use char because int might match the return type of a gcc2
15244     builtin and then its argument prototype would still apply.  */
15245 char sched_yield();
15246
15247 int main() {
15248 sched_yield()
15249 ; return 0; }
15250 EOF
15251 if { (eval echo configure:15252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15252   rm -rf conftest*
15253   eval "ac_cv_lib_$ac_lib_var=yes"
15254 else
15255   echo "configure: failed program was:" >&5
15256   cat conftest.$ac_ext >&5
15257   rm -rf conftest*
15258   eval "ac_cv_lib_$ac_lib_var=no"
15259 fi
15260 rm -f conftest*
15261 LIBS="$ac_save_LIBS"
15262
15263 fi
15264 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15265   echo "$ac_t""yes" 1>&6
15266   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15267                                         cat >> confdefs.h <<\EOF
15268 #define HAVE_SCHED_YIELD 1
15269 EOF
15270
15271                                         ac_cv_func_sched_yield=yes
15272 else
15273   echo "$ac_t""no" 1>&6
15274 ac_cv_func_sched_yield=no
15275 fi
15276
15277                         fi
15278                         if test $ac_cv_func_sched_yield = no -a \
15279                                 $ac_cv_func_pthread_yield = no ; then
15280                                                                                                 for ac_func in thr_yield
15281 do
15282 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15283 echo "configure:15284: checking for $ac_func" >&5
15284 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15285   echo $ac_n "(cached) $ac_c" 1>&6
15286 else
15287   cat > conftest.$ac_ext <<EOF
15288 #line 15289 "configure"
15289 #include "confdefs.h"
15290 /* System header to define __stub macros and hopefully few prototypes,
15291     which can conflict with char $ac_func(); below.  */
15292 #include <assert.h>
15293 /* Override any gcc2 internal prototype to avoid an error.  */
15294 /* We use char because int might match the return type of a gcc2
15295     builtin and then its argument prototype would still apply.  */
15296 char $ac_func();
15297 char (*f)();
15298
15299 int main() {
15300
15301 /* The GNU C library defines this for functions which it implements
15302     to always fail with ENOSYS.  Some functions are actually named
15303     something starting with __ and the normal name is an alias.  */
15304 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15305 choke me
15306 #else
15307 f = $ac_func;
15308 #endif
15309
15310 ; return 0; }
15311 EOF
15312 if { (eval echo configure:15313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15313   rm -rf conftest*
15314   eval "ac_cv_func_$ac_func=yes"
15315 else
15316   echo "configure: failed program was:" >&5
15317   cat conftest.$ac_ext >&5
15318   rm -rf conftest*
15319   eval "ac_cv_func_$ac_func=no"
15320 fi
15321 rm -f conftest*
15322 fi
15323
15324 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15325   echo "$ac_t""yes" 1>&6
15326     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15327   cat >> confdefs.h <<EOF
15328 #define $ac_tr_func 1
15329 EOF
15330  
15331 else
15332   echo "$ac_t""no" 1>&6
15333 fi
15334 done
15335
15336                         fi
15337                         if test $ac_cv_func_sched_yield = no -a \
15338                                 $ac_cv_func_pthread_yield = no -a \
15339                                 "$ac_cv_func_thr_yield" = no ; then
15340                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15341                         fi
15342
15343                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15344 do
15345 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15346 echo "configure:15347: checking for $ac_func" >&5
15347 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15348   echo $ac_n "(cached) $ac_c" 1>&6
15349 else
15350   cat > conftest.$ac_ext <<EOF
15351 #line 15352 "configure"
15352 #include "confdefs.h"
15353 /* System header to define __stub macros and hopefully few prototypes,
15354     which can conflict with char $ac_func(); below.  */
15355 #include <assert.h>
15356 /* Override any gcc2 internal prototype to avoid an error.  */
15357 /* We use char because int might match the return type of a gcc2
15358     builtin and then its argument prototype would still apply.  */
15359 char $ac_func();
15360 char (*f)();
15361
15362 int main() {
15363
15364 /* The GNU C library defines this for functions which it implements
15365     to always fail with ENOSYS.  Some functions are actually named
15366     something starting with __ and the normal name is an alias.  */
15367 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15368 choke me
15369 #else
15370 f = $ac_func;
15371 #endif
15372
15373 ; return 0; }
15374 EOF
15375 if { (eval echo configure:15376: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15376   rm -rf conftest*
15377   eval "ac_cv_func_$ac_func=yes"
15378 else
15379   echo "configure: failed program was:" >&5
15380   cat conftest.$ac_ext >&5
15381   rm -rf conftest*
15382   eval "ac_cv_func_$ac_func=no"
15383 fi
15384 rm -f conftest*
15385 fi
15386
15387 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15388   echo "$ac_t""yes" 1>&6
15389     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15390   cat >> confdefs.h <<EOF
15391 #define $ac_tr_func 1
15392 EOF
15393  
15394 else
15395   echo "$ac_t""no" 1>&6
15396 fi
15397 done
15398
15399
15400                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15401 echo "configure:15402: checking for pthread_detach with <pthread.h>" >&5
15402 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15403   echo $ac_n "(cached) $ac_c" 1>&6
15404 else
15405   
15406                                                                 cat > conftest.$ac_ext <<EOF
15407 #line 15408 "configure"
15408 #include "confdefs.h"
15409
15410 #include <pthread.h>
15411 #ifndef NULL
15412 #define NULL (void*)0
15413 #endif
15414
15415 int main() {
15416 pthread_detach(NULL);
15417 ; return 0; }
15418 EOF
15419 if { (eval echo configure:15420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15420   rm -rf conftest*
15421   ol_cv_func_pthread_detach=yes
15422 else
15423   echo "configure: failed program was:" >&5
15424   cat conftest.$ac_ext >&5
15425   rm -rf conftest*
15426   ol_cv_func_pthread_detach=no
15427 fi
15428 rm -f conftest*
15429                         
15430 fi
15431
15432 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15433
15434                         if test $ol_cv_func_pthread_detach = no ; then
15435                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15436                         fi
15437
15438                         cat >> confdefs.h <<\EOF
15439 #define HAVE_PTHREAD_DETACH 1
15440 EOF
15441
15442
15443                                                 for ac_func in \
15444                                 pthread_setconcurrency \
15445                                 pthread_getconcurrency \
15446                                 thr_setconcurrency \
15447                                 thr_getconcurrency \
15448                         
15449 do
15450 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15451 echo "configure:15452: checking for $ac_func" >&5
15452 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15453   echo $ac_n "(cached) $ac_c" 1>&6
15454 else
15455   cat > conftest.$ac_ext <<EOF
15456 #line 15457 "configure"
15457 #include "confdefs.h"
15458 /* System header to define __stub macros and hopefully few prototypes,
15459     which can conflict with char $ac_func(); below.  */
15460 #include <assert.h>
15461 /* Override any gcc2 internal prototype to avoid an error.  */
15462 /* We use char because int might match the return type of a gcc2
15463     builtin and then its argument prototype would still apply.  */
15464 char $ac_func();
15465 char (*f)();
15466
15467 int main() {
15468
15469 /* The GNU C library defines this for functions which it implements
15470     to always fail with ENOSYS.  Some functions are actually named
15471     something starting with __ and the normal name is an alias.  */
15472 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15473 choke me
15474 #else
15475 f = $ac_func;
15476 #endif
15477
15478 ; return 0; }
15479 EOF
15480 if { (eval echo configure:15481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15481   rm -rf conftest*
15482   eval "ac_cv_func_$ac_func=yes"
15483 else
15484   echo "configure: failed program was:" >&5
15485   cat conftest.$ac_ext >&5
15486   rm -rf conftest*
15487   eval "ac_cv_func_$ac_func=no"
15488 fi
15489 rm -f conftest*
15490 fi
15491
15492 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15493   echo "$ac_t""yes" 1>&6
15494     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15495   cat >> confdefs.h <<EOF
15496 #define $ac_tr_func 1
15497 EOF
15498  
15499 else
15500   echo "$ac_t""no" 1>&6
15501 fi
15502 done
15503
15504
15505                         
15506         for ac_func in pthread_kill_other_threads_np
15507 do
15508 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15509 echo "configure:15510: checking for $ac_func" >&5
15510 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15511   echo $ac_n "(cached) $ac_c" 1>&6
15512 else
15513   cat > conftest.$ac_ext <<EOF
15514 #line 15515 "configure"
15515 #include "confdefs.h"
15516 /* System header to define __stub macros and hopefully few prototypes,
15517     which can conflict with char $ac_func(); below.  */
15518 #include <assert.h>
15519 /* Override any gcc2 internal prototype to avoid an error.  */
15520 /* We use char because int might match the return type of a gcc2
15521     builtin and then its argument prototype would still apply.  */
15522 char $ac_func();
15523 char (*f)();
15524
15525 int main() {
15526
15527 /* The GNU C library defines this for functions which it implements
15528     to always fail with ENOSYS.  Some functions are actually named
15529     something starting with __ and the normal name is an alias.  */
15530 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15531 choke me
15532 #else
15533 f = $ac_func;
15534 #endif
15535
15536 ; return 0; }
15537 EOF
15538 if { (eval echo configure:15539: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15539   rm -rf conftest*
15540   eval "ac_cv_func_$ac_func=yes"
15541 else
15542   echo "configure: failed program was:" >&5
15543   cat conftest.$ac_ext >&5
15544   rm -rf conftest*
15545   eval "ac_cv_func_$ac_func=no"
15546 fi
15547 rm -f conftest*
15548 fi
15549
15550 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15551   echo "$ac_t""yes" 1>&6
15552     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15553   cat >> confdefs.h <<EOF
15554 #define $ac_tr_func 1
15555 EOF
15556  
15557 else
15558   echo "$ac_t""no" 1>&6
15559 fi
15560 done
15561
15562         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15563 echo "configure:15564: checking for LinuxThreads implementation" >&5
15564 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15565   echo $ac_n "(cached) $ac_c" 1>&6
15566 else
15567   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15568 fi
15569
15570 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15571
15572                         
15573         
15574         
15575         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15576 echo "configure:15577: checking for LinuxThreads consistency" >&5
15577 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15578   echo $ac_n "(cached) $ac_c" 1>&6
15579 else
15580   
15581                 if test $ol_cv_header_linux_threads = yes -a \
15582                         $ol_cv_sys_linux_threads = yes; then
15583                         ol_cv_linux_threads=yes
15584                 elif test $ol_cv_header_linux_threads = no -a \
15585                         $ol_cv_sys_linux_threads = no; then
15586                         ol_cv_linux_threads=no
15587                 else
15588                         ol_cv_linux_threads=error
15589                 fi
15590         
15591 fi
15592
15593 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15594
15595
15596                         if test $ol_cv_linux_threads = error; then
15597                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15598                         fi
15599
15600                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15601 echo "configure:15602: checking if pthread_create() works" >&5
15602 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15603   echo $ac_n "(cached) $ac_c" 1>&6
15604 else
15605   
15606                         if test "$cross_compiling" = yes; then
15607                                 ol_cv_pthread_create_works=yes
15608 else
15609   cat > conftest.$ac_ext <<EOF
15610 #line 15611 "configure"
15611 #include "confdefs.h"
15612 /* pthread test headers */
15613 #include <pthread.h>
15614 #ifndef NULL
15615 #define NULL (void*)0
15616 #endif
15617
15618 static void *task(p)
15619         void *p;
15620 {
15621         return (void *) (p == NULL);
15622 }
15623
15624
15625 int main(argc, argv)
15626         int argc;
15627         char **argv;
15628 {
15629
15630         /* pthread test function */
15631         pthread_t t;
15632         int status;
15633         int detach = 1;
15634
15635 #ifdef HAVE_PTHREADS_FINAL
15636         /* Final pthreads */
15637         pthread_attr_t attr;
15638
15639         status = pthread_attr_init(&attr);
15640         if( status ) return status;
15641
15642 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15643         if( !detach ) {
15644 #if defined( PTHREAD_CREATE_JOINABLE )
15645                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15646 #else
15647                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15648 #endif
15649
15650 #ifdef PTHREAD_CREATE_DETACHED
15651         } else {
15652                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15653 #endif
15654         }
15655         if( status ) return status;
15656 #endif
15657
15658         status = pthread_create( &t, &attr, task, NULL );
15659         if( status ) return status;
15660
15661 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15662         if( detach ) {
15663                 /* give thread a chance to complete */
15664                 /* it should remain joinable and hence detachable */
15665                 sleep( 1 );
15666
15667                 status = pthread_detach( t );
15668                 if( status ) return status;
15669         }
15670 #endif
15671
15672 #else
15673         /* Draft 4 pthreads */
15674         status = pthread_create( &t, pthread_attr_default, task, NULL );
15675         if( status ) return status;
15676
15677         if( detach ) {
15678                 /* give thread a chance to complete */
15679                 /* it should remain joinable and hence detachable */
15680                 sleep( 1 );
15681
15682                 status = pthread_detach( &t );
15683                 if( status ) return status;
15684         }
15685 #endif
15686
15687 #ifdef HAVE_LINUX_THREADS
15688         pthread_kill_other_threads_np();
15689 #endif
15690
15691         return 0;
15692
15693 }
15694
15695 EOF
15696 if { (eval echo configure:15697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15697 then
15698   ol_cv_pthread_create_works=yes
15699 else
15700   echo "configure: failed program was:" >&5
15701   cat conftest.$ac_ext >&5
15702   rm -fr conftest*
15703   ol_cv_pthread_create_works=no
15704 fi
15705 rm -fr conftest*
15706 fi
15707
15708 fi
15709
15710 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15711
15712                         if test $ol_cv_pthread_create_works = no ; then
15713                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15714                         fi
15715
15716                                                 if test $ol_with_yielding_select = auto ; then
15717                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15718 echo "configure:15719: checking if select yields when using pthreads" >&5
15719 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15720   echo $ac_n "(cached) $ac_c" 1>&6
15721 else
15722   
15723                                 if test "$cross_compiling" = yes; then
15724   ol_cv_pthread_select_yields=cross
15725 else
15726   cat > conftest.$ac_ext <<EOF
15727 #line 15728 "configure"
15728 #include "confdefs.h"
15729
15730 #include <sys/types.h>
15731 #include <sys/time.h>
15732 #include <unistd.h>
15733 #include <pthread.h>
15734 #ifndef NULL
15735 #define NULL (void*) 0
15736 #endif
15737
15738 static int fildes[2];
15739
15740 static void *task(p)
15741         void *p;
15742 {
15743         int i;
15744         struct timeval tv;
15745
15746         fd_set rfds;
15747
15748         tv.tv_sec=10;
15749         tv.tv_usec=0;
15750
15751         FD_ZERO(&rfds);
15752         FD_SET(fildes[0], &rfds);
15753
15754         /* we're not interested in any fds */
15755         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15756
15757         if(i < 0) {
15758                 perror("select");
15759                 exit(10);
15760         }
15761
15762         exit(0); /* if we exit here, the select blocked the whole process */
15763 }
15764
15765 int main(argc, argv)
15766         int argc;
15767         char **argv;
15768 {
15769         pthread_t t;
15770
15771         /* create a pipe to select */
15772         if(pipe(&fildes[0])) {
15773                 perror("select");
15774                 exit(1);
15775         }
15776
15777 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15778         (void) pthread_setconcurrency(2);
15779 #else
15780 #ifdef HAVE_THR_SETCONCURRENCY
15781         /* Set Solaris LWP concurrency to 2 */
15782         thr_setconcurrency(2);
15783 #endif
15784 #endif
15785
15786 #if HAVE_PTHREADS_D4
15787         pthread_create(&t, pthread_attr_default, task, NULL);
15788 #else
15789         pthread_create(&t, NULL, task, NULL);
15790 #endif
15791
15792 #if HAVE_SCHED_YIELD
15793         sched_yield();  /* make sure task runs first */
15794 #else
15795 #ifdef HAVE_PTHREAD_YIELD
15796         pthread_yield();        /* make sure task runs first */
15797 #endif
15798 #endif
15799
15800         exit(2);
15801 }
15802 EOF
15803 if { (eval echo configure:15804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15804 then
15805   ol_cv_pthread_select_yields=no
15806 else
15807   echo "configure: failed program was:" >&5
15808   cat conftest.$ac_ext >&5
15809   rm -fr conftest*
15810   ol_cv_pthread_select_yields=yes
15811 fi
15812 rm -fr conftest*
15813 fi
15814
15815 fi
15816
15817 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15818
15819                                 if test $ol_cv_pthread_select_yields = cross ; then
15820                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15821                                 fi
15822
15823                                 if test $ol_cv_pthread_select_yields = yes ; then
15824                                         ol_with_yielding_select=yes
15825                                 fi
15826                         fi
15827
15828                                                 CPPFLAGS="$save_CPPFLAGS"
15829                         LIBS="$save_LIBS"
15830                 else
15831                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15832                 fi
15833         fi
15834
15835         if test $ol_with_threads = posix ; then
15836                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15837         fi
15838 fi
15839
15840 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15841         -o $ol_with_threads = mach ; then
15842
15843                 for ac_hdr in mach/cthreads.h cthreads.h
15844 do
15845 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15846 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15847 echo "configure:15848: checking for $ac_hdr" >&5
15848 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15849   echo $ac_n "(cached) $ac_c" 1>&6
15850 else
15851   cat > conftest.$ac_ext <<EOF
15852 #line 15853 "configure"
15853 #include "confdefs.h"
15854 #include <$ac_hdr>
15855 EOF
15856 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15857 { (eval echo configure:15858: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15858 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15859 if test -z "$ac_err"; then
15860   rm -rf conftest*
15861   eval "ac_cv_header_$ac_safe=yes"
15862 else
15863   echo "$ac_err" >&5
15864   echo "configure: failed program was:" >&5
15865   cat conftest.$ac_ext >&5
15866   rm -rf conftest*
15867   eval "ac_cv_header_$ac_safe=no"
15868 fi
15869 rm -f conftest*
15870 fi
15871 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15872   echo "$ac_t""yes" 1>&6
15873     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15874   cat >> confdefs.h <<EOF
15875 #define $ac_tr_hdr 1
15876 EOF
15877  
15878 else
15879   echo "$ac_t""no" 1>&6
15880 fi
15881 done
15882
15883         if test $ac_cv_header_mach_cthreads_h = yes ; then
15884                 ol_with_threads=found
15885
15886                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15887 echo "configure:15888: checking for cthread_fork" >&5
15888 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15889   echo $ac_n "(cached) $ac_c" 1>&6
15890 else
15891   cat > conftest.$ac_ext <<EOF
15892 #line 15893 "configure"
15893 #include "confdefs.h"
15894 /* System header to define __stub macros and hopefully few prototypes,
15895     which can conflict with char cthread_fork(); below.  */
15896 #include <assert.h>
15897 /* Override any gcc2 internal prototype to avoid an error.  */
15898 /* We use char because int might match the return type of a gcc2
15899     builtin and then its argument prototype would still apply.  */
15900 char cthread_fork();
15901 char (*f)();
15902
15903 int main() {
15904
15905 /* The GNU C library defines this for functions which it implements
15906     to always fail with ENOSYS.  Some functions are actually named
15907     something starting with __ and the normal name is an alias.  */
15908 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15909 choke me
15910 #else
15911 f = cthread_fork;
15912 #endif
15913
15914 ; return 0; }
15915 EOF
15916 if { (eval echo configure:15917: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15917   rm -rf conftest*
15918   eval "ac_cv_func_cthread_fork=yes"
15919 else
15920   echo "configure: failed program was:" >&5
15921   cat conftest.$ac_ext >&5
15922   rm -rf conftest*
15923   eval "ac_cv_func_cthread_fork=no"
15924 fi
15925 rm -f conftest*
15926 fi
15927
15928 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15929   echo "$ac_t""yes" 1>&6
15930   ol_link_threads=yes
15931 else
15932   echo "$ac_t""no" 1>&6
15933 fi
15934
15935
15936                 if test $ol_link_threads = no ; then
15937                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15938 echo "configure:15939: checking for cthread_fork with -all_load" >&5
15939 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15940   echo $ac_n "(cached) $ac_c" 1>&6
15941 else
15942   
15943                                                                 save_LIBS="$LIBS"
15944                                 LIBS="-all_load $LIBS"
15945                                 cat > conftest.$ac_ext <<EOF
15946 #line 15947 "configure"
15947 #include "confdefs.h"
15948 #include <mach/cthreads.h>
15949 int main() {
15950
15951                                         cthread_fork((void *)0, (void *)0);
15952                                         
15953 ; return 0; }
15954 EOF
15955 if { (eval echo configure:15956: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15956   rm -rf conftest*
15957   ol_cv_cthread_all_load=yes
15958 else
15959   echo "configure: failed program was:" >&5
15960   cat conftest.$ac_ext >&5
15961   rm -rf conftest*
15962   ol_cv_cthread_all_load=no
15963 fi
15964 rm -f conftest*
15965                                                                 LIBS="$save_LIBS"
15966                         
15967 fi
15968
15969 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
15970
15971                         if test $ol_cv_cthread_all_load = yes ; then
15972                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
15973                                 ol_link_threads=mach
15974                                 ol_with_threads=found
15975                         fi
15976                 fi
15977
15978         elif test $ac_cv_header_cthreads_h = yes ; then
15979                                 
15980                 ol_with_threads=found
15981  
15982                                 save_LIBS="$LIBS"
15983                 LIBS="$LIBS -lthreads"
15984                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15985 echo "configure:15986: checking for cthread_fork" >&5
15986 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15987   echo $ac_n "(cached) $ac_c" 1>&6
15988 else
15989   cat > conftest.$ac_ext <<EOF
15990 #line 15991 "configure"
15991 #include "confdefs.h"
15992 /* System header to define __stub macros and hopefully few prototypes,
15993     which can conflict with char cthread_fork(); below.  */
15994 #include <assert.h>
15995 /* Override any gcc2 internal prototype to avoid an error.  */
15996 /* We use char because int might match the return type of a gcc2
15997     builtin and then its argument prototype would still apply.  */
15998 char cthread_fork();
15999 char (*f)();
16000
16001 int main() {
16002
16003 /* The GNU C library defines this for functions which it implements
16004     to always fail with ENOSYS.  Some functions are actually named
16005     something starting with __ and the normal name is an alias.  */
16006 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16007 choke me
16008 #else
16009 f = cthread_fork;
16010 #endif
16011
16012 ; return 0; }
16013 EOF
16014 if { (eval echo configure:16015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16015   rm -rf conftest*
16016   eval "ac_cv_func_cthread_fork=yes"
16017 else
16018   echo "configure: failed program was:" >&5
16019   cat conftest.$ac_ext >&5
16020   rm -rf conftest*
16021   eval "ac_cv_func_cthread_fork=no"
16022 fi
16023 rm -f conftest*
16024 fi
16025
16026 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16027   echo "$ac_t""yes" 1>&6
16028   ol_link_threads=yes
16029 else
16030   echo "$ac_t""no" 1>&6
16031 fi
16032
16033                 LIBS="$save_LIBS"
16034
16035                 if test $ol_link_threads = yes ; then
16036                         LTHREAD_LIBS="-lthreads"
16037                         ol_link_threads=mach
16038                         ol_with_threads=found
16039                 else
16040                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16041                 fi
16042
16043         elif test $ol_with_threads = mach ; then
16044                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16045         fi
16046
16047         if test $ol_link_threads = mach ; then
16048                 cat >> confdefs.h <<\EOF
16049 #define HAVE_MACH_CTHREADS 1
16050 EOF
16051
16052         elif test $ol_with_threads = found ; then
16053                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16054         fi
16055 fi
16056
16057 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16058         -o $ol_with_threads = pth ; then
16059
16060         for ac_hdr in pth.h
16061 do
16062 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16063 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16064 echo "configure:16065: checking for $ac_hdr" >&5
16065 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16066   echo $ac_n "(cached) $ac_c" 1>&6
16067 else
16068   cat > conftest.$ac_ext <<EOF
16069 #line 16070 "configure"
16070 #include "confdefs.h"
16071 #include <$ac_hdr>
16072 EOF
16073 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16074 { (eval echo configure:16075: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16075 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16076 if test -z "$ac_err"; then
16077   rm -rf conftest*
16078   eval "ac_cv_header_$ac_safe=yes"
16079 else
16080   echo "$ac_err" >&5
16081   echo "configure: failed program was:" >&5
16082   cat conftest.$ac_ext >&5
16083   rm -rf conftest*
16084   eval "ac_cv_header_$ac_safe=no"
16085 fi
16086 rm -f conftest*
16087 fi
16088 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16089   echo "$ac_t""yes" 1>&6
16090     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16091   cat >> confdefs.h <<EOF
16092 #define $ac_tr_hdr 1
16093 EOF
16094  
16095 else
16096   echo "$ac_t""no" 1>&6
16097 fi
16098 done
16099
16100
16101         if test $ac_cv_header_pth_h = yes ; then
16102                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16103 echo "configure:16104: checking for pth_version in -lpth" >&5
16104 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16105 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16106   echo $ac_n "(cached) $ac_c" 1>&6
16107 else
16108   ac_save_LIBS="$LIBS"
16109 LIBS="-lpth  $LIBS"
16110 cat > conftest.$ac_ext <<EOF
16111 #line 16112 "configure"
16112 #include "confdefs.h"
16113 /* Override any gcc2 internal prototype to avoid an error.  */
16114 /* We use char because int might match the return type of a gcc2
16115     builtin and then its argument prototype would still apply.  */
16116 char pth_version();
16117
16118 int main() {
16119 pth_version()
16120 ; return 0; }
16121 EOF
16122 if { (eval echo configure:16123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16123   rm -rf conftest*
16124   eval "ac_cv_lib_$ac_lib_var=yes"
16125 else
16126   echo "configure: failed program was:" >&5
16127   cat conftest.$ac_ext >&5
16128   rm -rf conftest*
16129   eval "ac_cv_lib_$ac_lib_var=no"
16130 fi
16131 rm -f conftest*
16132 LIBS="$ac_save_LIBS"
16133
16134 fi
16135 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16136   echo "$ac_t""yes" 1>&6
16137   have_pth=yes
16138 else
16139   echo "$ac_t""no" 1>&6
16140 have_pth=no
16141 fi
16142
16143
16144                 if test $have_pth = yes ; then
16145                         cat >> confdefs.h <<\EOF
16146 #define HAVE_GNU_PTH 1
16147 EOF
16148
16149                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16150                         ol_link_threads=pth
16151                         ol_with_threads=found
16152
16153                         if test $ol_with_yielding_select = auto ; then
16154                                 ol_with_yielding_select=yes
16155                         fi
16156                 fi
16157         fi
16158 fi
16159
16160 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16161         -o $ol_with_threads = lwp ; then
16162
16163                 for ac_hdr in thread.h synch.h
16164 do
16165 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16166 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16167 echo "configure:16168: checking for $ac_hdr" >&5
16168 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16169   echo $ac_n "(cached) $ac_c" 1>&6
16170 else
16171   cat > conftest.$ac_ext <<EOF
16172 #line 16173 "configure"
16173 #include "confdefs.h"
16174 #include <$ac_hdr>
16175 EOF
16176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16177 { (eval echo configure:16178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16179 if test -z "$ac_err"; then
16180   rm -rf conftest*
16181   eval "ac_cv_header_$ac_safe=yes"
16182 else
16183   echo "$ac_err" >&5
16184   echo "configure: failed program was:" >&5
16185   cat conftest.$ac_ext >&5
16186   rm -rf conftest*
16187   eval "ac_cv_header_$ac_safe=no"
16188 fi
16189 rm -f conftest*
16190 fi
16191 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16192   echo "$ac_t""yes" 1>&6
16193     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16194   cat >> confdefs.h <<EOF
16195 #define $ac_tr_hdr 1
16196 EOF
16197  
16198 else
16199   echo "$ac_t""no" 1>&6
16200 fi
16201 done
16202
16203         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16204                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16205 echo "configure:16206: checking for thr_create in -lthread" >&5
16206 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16207 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16208   echo $ac_n "(cached) $ac_c" 1>&6
16209 else
16210   ac_save_LIBS="$LIBS"
16211 LIBS="-lthread  $LIBS"
16212 cat > conftest.$ac_ext <<EOF
16213 #line 16214 "configure"
16214 #include "confdefs.h"
16215 /* Override any gcc2 internal prototype to avoid an error.  */
16216 /* We use char because int might match the return type of a gcc2
16217     builtin and then its argument prototype would still apply.  */
16218 char thr_create();
16219
16220 int main() {
16221 thr_create()
16222 ; return 0; }
16223 EOF
16224 if { (eval echo configure:16225: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16225   rm -rf conftest*
16226   eval "ac_cv_lib_$ac_lib_var=yes"
16227 else
16228   echo "configure: failed program was:" >&5
16229   cat conftest.$ac_ext >&5
16230   rm -rf conftest*
16231   eval "ac_cv_lib_$ac_lib_var=no"
16232 fi
16233 rm -f conftest*
16234 LIBS="$ac_save_LIBS"
16235
16236 fi
16237 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16238   echo "$ac_t""yes" 1>&6
16239   have_thr=yes
16240 else
16241   echo "$ac_t""no" 1>&6
16242 have_thr=no
16243 fi
16244
16245
16246                 if test $have_thr = yes ; then
16247                         cat >> confdefs.h <<\EOF
16248 #define HAVE_THR 1
16249 EOF
16250
16251                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16252                         ol_link_threads=thr
16253
16254                         if test $ol_with_yielding_select = auto ; then
16255                                 ol_with_yielding_select=yes
16256                         fi
16257
16258                                                 for ac_func in \
16259                                 thr_setconcurrency \
16260                                 thr_getconcurrency \
16261                         
16262 do
16263 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16264 echo "configure:16265: checking for $ac_func" >&5
16265 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16266   echo $ac_n "(cached) $ac_c" 1>&6
16267 else
16268   cat > conftest.$ac_ext <<EOF
16269 #line 16270 "configure"
16270 #include "confdefs.h"
16271 /* System header to define __stub macros and hopefully few prototypes,
16272     which can conflict with char $ac_func(); below.  */
16273 #include <assert.h>
16274 /* Override any gcc2 internal prototype to avoid an error.  */
16275 /* We use char because int might match the return type of a gcc2
16276     builtin and then its argument prototype would still apply.  */
16277 char $ac_func();
16278 char (*f)();
16279
16280 int main() {
16281
16282 /* The GNU C library defines this for functions which it implements
16283     to always fail with ENOSYS.  Some functions are actually named
16284     something starting with __ and the normal name is an alias.  */
16285 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16286 choke me
16287 #else
16288 f = $ac_func;
16289 #endif
16290
16291 ; return 0; }
16292 EOF
16293 if { (eval echo configure:16294: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16294   rm -rf conftest*
16295   eval "ac_cv_func_$ac_func=yes"
16296 else
16297   echo "configure: failed program was:" >&5
16298   cat conftest.$ac_ext >&5
16299   rm -rf conftest*
16300   eval "ac_cv_func_$ac_func=no"
16301 fi
16302 rm -f conftest*
16303 fi
16304
16305 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16306   echo "$ac_t""yes" 1>&6
16307     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16308   cat >> confdefs.h <<EOF
16309 #define $ac_tr_func 1
16310 EOF
16311  
16312 else
16313   echo "$ac_t""no" 1>&6
16314 fi
16315 done
16316
16317                 fi
16318         fi
16319
16320                 for ac_hdr in lwp/lwp.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_lwp_lwp_h = yes ; then
16361                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16362 echo "configure:16363: checking for lwp_create in -llwp" >&5
16363 ac_lib_var=`echo lwp'_'lwp_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="-llwp  $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 lwp_create();
16376
16377 int main() {
16378 lwp_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_lwp=yes
16397 else
16398   echo "$ac_t""no" 1>&6
16399 have_lwp=no
16400 fi
16401
16402
16403                 if test $have_lwp = yes ; then
16404                         cat >> confdefs.h <<\EOF
16405 #define HAVE_LWP 1
16406 EOF
16407
16408                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16409                         ol_link_threads=lwp
16410
16411                         if test $ol_with_yielding_select = auto ; then
16412                                 ol_with_yielding_select=no
16413                         fi
16414                 fi
16415         fi
16416 fi
16417
16418 if test $ol_with_yielding_select = yes ; then
16419         cat >> confdefs.h <<\EOF
16420 #define HAVE_YIELDING_SELECT 1
16421 EOF
16422
16423 fi
16424
16425 if test $ol_with_threads = manual ; then
16426                 ol_link_threads=yes
16427
16428         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16429
16430         for ac_hdr in pthread.h sched.h
16431 do
16432 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16433 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16434 echo "configure:16435: checking for $ac_hdr" >&5
16435 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16436   echo $ac_n "(cached) $ac_c" 1>&6
16437 else
16438   cat > conftest.$ac_ext <<EOF
16439 #line 16440 "configure"
16440 #include "confdefs.h"
16441 #include <$ac_hdr>
16442 EOF
16443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16444 { (eval echo configure:16445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16445 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16446 if test -z "$ac_err"; then
16447   rm -rf conftest*
16448   eval "ac_cv_header_$ac_safe=yes"
16449 else
16450   echo "$ac_err" >&5
16451   echo "configure: failed program was:" >&5
16452   cat conftest.$ac_ext >&5
16453   rm -rf conftest*
16454   eval "ac_cv_header_$ac_safe=no"
16455 fi
16456 rm -f conftest*
16457 fi
16458 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16459   echo "$ac_t""yes" 1>&6
16460     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16461   cat >> confdefs.h <<EOF
16462 #define $ac_tr_hdr 1
16463 EOF
16464  
16465 else
16466   echo "$ac_t""no" 1>&6
16467 fi
16468 done
16469
16470         for ac_func in sched_yield pthread_yield
16471 do
16472 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16473 echo "configure:16474: checking for $ac_func" >&5
16474 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16475   echo $ac_n "(cached) $ac_c" 1>&6
16476 else
16477   cat > conftest.$ac_ext <<EOF
16478 #line 16479 "configure"
16479 #include "confdefs.h"
16480 /* System header to define __stub macros and hopefully few prototypes,
16481     which can conflict with char $ac_func(); below.  */
16482 #include <assert.h>
16483 /* Override any gcc2 internal prototype to avoid an error.  */
16484 /* We use char because int might match the return type of a gcc2
16485     builtin and then its argument prototype would still apply.  */
16486 char $ac_func();
16487 char (*f)();
16488
16489 int main() {
16490
16491 /* The GNU C library defines this for functions which it implements
16492     to always fail with ENOSYS.  Some functions are actually named
16493     something starting with __ and the normal name is an alias.  */
16494 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16495 choke me
16496 #else
16497 f = $ac_func;
16498 #endif
16499
16500 ; return 0; }
16501 EOF
16502 if { (eval echo configure:16503: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16503   rm -rf conftest*
16504   eval "ac_cv_func_$ac_func=yes"
16505 else
16506   echo "configure: failed program was:" >&5
16507   cat conftest.$ac_ext >&5
16508   rm -rf conftest*
16509   eval "ac_cv_func_$ac_func=no"
16510 fi
16511 rm -f conftest*
16512 fi
16513
16514 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16515   echo "$ac_t""yes" 1>&6
16516     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16517   cat >> confdefs.h <<EOF
16518 #define $ac_tr_func 1
16519 EOF
16520  
16521 else
16522   echo "$ac_t""no" 1>&6
16523 fi
16524 done
16525
16526         
16527         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16528 echo "configure:16529: checking for LinuxThreads pthread.h" >&5
16529 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16530   echo $ac_n "(cached) $ac_c" 1>&6
16531 else
16532   cat > conftest.$ac_ext <<EOF
16533 #line 16534 "configure"
16534 #include "confdefs.h"
16535 #include <pthread.h>
16536 EOF
16537 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16538   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16539   rm -rf conftest*
16540   ol_cv_header_linux_threads=yes
16541 else
16542   rm -rf conftest*
16543   ol_cv_header_linux_threads=no
16544 fi
16545 rm -f conftest*
16546
16547                 
16548 fi
16549
16550 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16551         if test $ol_cv_header_linux_threads = yes; then
16552                 cat >> confdefs.h <<\EOF
16553 #define HAVE_LINUX_THREADS 1
16554 EOF
16555
16556         fi
16557
16558
16559         for ac_hdr in mach/cthreads.h
16560 do
16561 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16562 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16563 echo "configure:16564: checking for $ac_hdr" >&5
16564 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16565   echo $ac_n "(cached) $ac_c" 1>&6
16566 else
16567   cat > conftest.$ac_ext <<EOF
16568 #line 16569 "configure"
16569 #include "confdefs.h"
16570 #include <$ac_hdr>
16571 EOF
16572 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16573 { (eval echo configure:16574: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16574 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16575 if test -z "$ac_err"; then
16576   rm -rf conftest*
16577   eval "ac_cv_header_$ac_safe=yes"
16578 else
16579   echo "$ac_err" >&5
16580   echo "configure: failed program was:" >&5
16581   cat conftest.$ac_ext >&5
16582   rm -rf conftest*
16583   eval "ac_cv_header_$ac_safe=no"
16584 fi
16585 rm -f conftest*
16586 fi
16587 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16588   echo "$ac_t""yes" 1>&6
16589     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16590   cat >> confdefs.h <<EOF
16591 #define $ac_tr_hdr 1
16592 EOF
16593  
16594 else
16595   echo "$ac_t""no" 1>&6
16596 fi
16597 done
16598
16599         for ac_hdr in lwp/lwp.h
16600 do
16601 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16602 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16603 echo "configure:16604: checking for $ac_hdr" >&5
16604 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16605   echo $ac_n "(cached) $ac_c" 1>&6
16606 else
16607   cat > conftest.$ac_ext <<EOF
16608 #line 16609 "configure"
16609 #include "confdefs.h"
16610 #include <$ac_hdr>
16611 EOF
16612 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16613 { (eval echo configure:16614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16614 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16615 if test -z "$ac_err"; then
16616   rm -rf conftest*
16617   eval "ac_cv_header_$ac_safe=yes"
16618 else
16619   echo "$ac_err" >&5
16620   echo "configure: failed program was:" >&5
16621   cat conftest.$ac_ext >&5
16622   rm -rf conftest*
16623   eval "ac_cv_header_$ac_safe=no"
16624 fi
16625 rm -f conftest*
16626 fi
16627 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16628   echo "$ac_t""yes" 1>&6
16629     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16630   cat >> confdefs.h <<EOF
16631 #define $ac_tr_hdr 1
16632 EOF
16633  
16634 else
16635   echo "$ac_t""no" 1>&6
16636 fi
16637 done
16638
16639         for ac_hdr in thread.h synch.h
16640 do
16641 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16642 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16643 echo "configure:16644: checking for $ac_hdr" >&5
16644 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16645   echo $ac_n "(cached) $ac_c" 1>&6
16646 else
16647   cat > conftest.$ac_ext <<EOF
16648 #line 16649 "configure"
16649 #include "confdefs.h"
16650 #include <$ac_hdr>
16651 EOF
16652 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16653 { (eval echo configure:16654: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16654 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16655 if test -z "$ac_err"; then
16656   rm -rf conftest*
16657   eval "ac_cv_header_$ac_safe=yes"
16658 else
16659   echo "$ac_err" >&5
16660   echo "configure: failed program was:" >&5
16661   cat conftest.$ac_ext >&5
16662   rm -rf conftest*
16663   eval "ac_cv_header_$ac_safe=no"
16664 fi
16665 rm -f conftest*
16666 fi
16667 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16668   echo "$ac_t""yes" 1>&6
16669     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16670   cat >> confdefs.h <<EOF
16671 #define $ac_tr_hdr 1
16672 EOF
16673  
16674 else
16675   echo "$ac_t""no" 1>&6
16676 fi
16677 done
16678
16679 fi
16680
16681 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16682                         cat >> confdefs.h <<\EOF
16683 #define REENTRANT 1
16684 EOF
16685
16686         cat >> confdefs.h <<\EOF
16687 #define _REENTRANT 1
16688 EOF
16689
16690         cat >> confdefs.h <<\EOF
16691 #define THREAD_SAFE 1
16692 EOF
16693
16694         cat >> confdefs.h <<\EOF
16695 #define _THREAD_SAFE 1
16696 EOF
16697
16698         cat >> confdefs.h <<\EOF
16699 #define THREADSAFE 1
16700 EOF
16701
16702         cat >> confdefs.h <<\EOF
16703 #define _THREADSAFE 1
16704 EOF
16705
16706         cat >> confdefs.h <<\EOF
16707 #define _SGI_MP_SOURCE 1
16708 EOF
16709
16710
16711                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16712 echo "configure:16713: checking for thread specific errno" >&5
16713 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16714   echo $ac_n "(cached) $ac_c" 1>&6
16715 else
16716   
16717                 cat > conftest.$ac_ext <<EOF
16718 #line 16719 "configure"
16719 #include "confdefs.h"
16720 #include <errno.h>
16721 int main() {
16722 errno = 0;
16723 ; return 0; }
16724 EOF
16725 if { (eval echo configure:16726: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16726   rm -rf conftest*
16727   ol_cv_errno_thread_specific=yes
16728 else
16729   echo "configure: failed program was:" >&5
16730   cat conftest.$ac_ext >&5
16731   rm -rf conftest*
16732   ol_cv_errno_thread_specific=no
16733 fi
16734 rm -f conftest*
16735         
16736 fi
16737
16738 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16739
16740                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16741 echo "configure:16742: checking for thread specific h_errno" >&5
16742 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16743   echo $ac_n "(cached) $ac_c" 1>&6
16744 else
16745   
16746                 cat > conftest.$ac_ext <<EOF
16747 #line 16748 "configure"
16748 #include "confdefs.h"
16749 #include <netdb.h>
16750 int main() {
16751 h_errno = 0;
16752 ; return 0; }
16753 EOF
16754 if { (eval echo configure:16755: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16755   rm -rf conftest*
16756   ol_cv_h_errno_thread_specific=yes
16757 else
16758   echo "configure: failed program was:" >&5
16759   cat conftest.$ac_ext >&5
16760   rm -rf conftest*
16761   ol_cv_h_errno_thread_specific=no
16762 fi
16763 rm -f conftest*
16764         
16765 fi
16766
16767 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16768
16769         if test $ol_cv_errno_thread_specific != yes \
16770                 -o $ol_cv_h_errno_thread_specific != yes ; then
16771                 LIBS="$LTHREAD_LIBS $LIBS"
16772                 LTHREAD_LIBS=""
16773         fi
16774
16775 fi  
16776
16777 if test $ol_link_threads = no ; then
16778         if test $ol_with_threads = yes ; then
16779                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16780         fi
16781
16782         if test $ol_with_threads = auto ; then
16783                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16784                 ol_with_threads=no
16785         fi
16786
16787         cat >> confdefs.h <<\EOF
16788 #define NO_THREADS 1
16789 EOF
16790
16791         LTHREAD_LIBS=""
16792 fi
16793
16794 if test $ol_link_threads != no ; then
16795         cat >> confdefs.h <<\EOF
16796 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16797 EOF
16798
16799 fi
16800
16801 ol_link_ldbm=no 
16802
16803 if test $ol_with_ldbm_api = auto \
16804         -o $ol_with_ldbm_api = berkeley \
16805         -o $ol_with_ldbm_api = bcompat ; then
16806
16807         if test $ol_with_ldbm_api = bcompat; then \
16808                 for ac_hdr in db_185.h db.h
16809 do
16810 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16811 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16812 echo "configure:16813: checking for $ac_hdr" >&5
16813 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16814   echo $ac_n "(cached) $ac_c" 1>&6
16815 else
16816   cat > conftest.$ac_ext <<EOF
16817 #line 16818 "configure"
16818 #include "confdefs.h"
16819 #include <$ac_hdr>
16820 EOF
16821 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16822 { (eval echo configure:16823: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16823 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16824 if test -z "$ac_err"; then
16825   rm -rf conftest*
16826   eval "ac_cv_header_$ac_safe=yes"
16827 else
16828   echo "$ac_err" >&5
16829   echo "configure: failed program was:" >&5
16830   cat conftest.$ac_ext >&5
16831   rm -rf conftest*
16832   eval "ac_cv_header_$ac_safe=no"
16833 fi
16834 rm -f conftest*
16835 fi
16836 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16837   echo "$ac_t""yes" 1>&6
16838     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16839   cat >> confdefs.h <<EOF
16840 #define $ac_tr_hdr 1
16841 EOF
16842  
16843 else
16844   echo "$ac_t""no" 1>&6
16845 fi
16846 done
16847
16848 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16849         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16850 echo "configure:16851: checking if Berkeley DB header compatibility" >&5
16851 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16852   echo $ac_n "(cached) $ac_c" 1>&6
16853 else
16854   
16855                 cat > conftest.$ac_ext <<EOF
16856 #line 16857 "configure"
16857 #include "confdefs.h"
16858
16859 #if HAVE_DB_185_H
16860 #       include <db_185.h>
16861 #else
16862 #       include <db.h>
16863 #endif
16864
16865  /* this check could be improved */
16866 #ifndef DB_VERSION_MAJOR
16867 #       define DB_VERSION_MAJOR 1
16868 #endif
16869
16870 #if DB_VERSION_MAJOR == 1 
16871         __db_version_1
16872 #endif
16873
16874 EOF
16875 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16876   egrep "__db_version_1" >/dev/null 2>&1; then
16877   rm -rf conftest*
16878   ol_cv_header_db1=yes
16879 else
16880   rm -rf conftest*
16881   ol_cv_header_db1=no
16882 fi
16883 rm -f conftest*
16884
16885 fi
16886
16887 echo "$ac_t""$ol_cv_header_db1" 1>&6
16888
16889         if test $ol_cv_header_db1 = yes ; then
16890                 ol_cv_lib_db=no
16891 if test $ol_cv_lib_db = no ; then
16892         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16893 echo "configure:16894: checking for Berkeley DB link (default)" >&5
16894 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16895   echo $ac_n "(cached) $ac_c" 1>&6
16896 else
16897   
16898         ol_DB_LIB=
16899         ol_LIBS=$LIBS
16900         LIBS="$ol_DB_LIB $LIBS"
16901
16902         cat > conftest.$ac_ext <<EOF
16903 #line 16904 "configure"
16904 #include "confdefs.h"
16905
16906 #ifdef HAVE_DB_185_H
16907 # include <db_185.h>
16908 #else
16909 # include <db.h>
16910 #endif
16911
16912 #ifndef DB_VERSION_MAJOR
16913 # define DB_VERSION_MAJOR 1
16914 #endif
16915
16916 #ifndef NULL
16917 #define NULL ((void*)0)
16918 #endif
16919
16920 int main() {
16921
16922 #if DB_VERSION_MAJOR > 1
16923         {
16924                 char *version;
16925                 int major, minor, patch;
16926
16927                 version = db_version( &major, &minor, &patch );
16928
16929                 if( major != DB_VERSION_MAJOR ||
16930                         minor < DB_VERSION_MINOR )
16931                 {
16932                         printf("Berkeley DB version mismatch\n"
16933                                 "\texpected: %s\n\tgot: %s\n",
16934                                 DB_VERSION_STRING, version);
16935                         return 1;
16936                 }
16937         }
16938 #endif
16939
16940 #if DB_VERSION_MAJOR > 2
16941         db_env_create( NULL, 0 );
16942 #elif DB_VERSION_MAJOR > 1
16943         db_appexit( NULL );
16944 #else
16945         (void) dbopen( NULL, 0, 0, 0, NULL);
16946 #endif
16947
16948 ; return 0; }
16949 EOF
16950 if { (eval echo configure:16951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16951   rm -rf conftest*
16952   ol_cv_db_none=yes
16953 else
16954   echo "configure: failed program was:" >&5
16955   cat conftest.$ac_ext >&5
16956   rm -rf conftest*
16957   ol_cv_db_none=no
16958 fi
16959 rm -f conftest*
16960
16961         LIBS="$ol_LIBS"
16962
16963 fi
16964
16965 echo "$ac_t""$ol_cv_db_none" 1>&6
16966
16967         if test $ol_cv_db_none = yes ; then
16968                 ol_cv_lib_db=yes
16969         fi
16970 fi
16971
16972 if test $ol_cv_lib_db = no ; then
16973         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
16974 echo "configure:16975: checking for Berkeley DB link (-ldb)" >&5
16975 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
16976   echo $ac_n "(cached) $ac_c" 1>&6
16977 else
16978   
16979         ol_DB_LIB=-ldb
16980         ol_LIBS=$LIBS
16981         LIBS="$ol_DB_LIB $LIBS"
16982
16983         cat > conftest.$ac_ext <<EOF
16984 #line 16985 "configure"
16985 #include "confdefs.h"
16986
16987 #ifdef HAVE_DB_185_H
16988 # include <db_185.h>
16989 #else
16990 # include <db.h>
16991 #endif
16992
16993 #ifndef DB_VERSION_MAJOR
16994 # define DB_VERSION_MAJOR 1
16995 #endif
16996
16997 #ifndef NULL
16998 #define NULL ((void*)0)
16999 #endif
17000
17001 int main() {
17002
17003 #if DB_VERSION_MAJOR > 1
17004         {
17005                 char *version;
17006                 int major, minor, patch;
17007
17008                 version = db_version( &major, &minor, &patch );
17009
17010                 if( major != DB_VERSION_MAJOR ||
17011                         minor < DB_VERSION_MINOR )
17012                 {
17013                         printf("Berkeley DB version mismatch\n"
17014                                 "\texpected: %s\n\tgot: %s\n",
17015                                 DB_VERSION_STRING, version);
17016                         return 1;
17017                 }
17018         }
17019 #endif
17020
17021 #if DB_VERSION_MAJOR > 2
17022         db_env_create( NULL, 0 );
17023 #elif DB_VERSION_MAJOR > 1
17024         db_appexit( NULL );
17025 #else
17026         (void) dbopen( NULL, 0, 0, 0, NULL);
17027 #endif
17028
17029 ; return 0; }
17030 EOF
17031 if { (eval echo configure:17032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17032   rm -rf conftest*
17033   ol_cv_db_db=yes
17034 else
17035   echo "configure: failed program was:" >&5
17036   cat conftest.$ac_ext >&5
17037   rm -rf conftest*
17038   ol_cv_db_db=no
17039 fi
17040 rm -f conftest*
17041
17042         LIBS="$ol_LIBS"
17043
17044 fi
17045
17046 echo "$ac_t""$ol_cv_db_db" 1>&6
17047
17048         if test $ol_cv_db_db = yes ; then
17049                 ol_cv_lib_db=-ldb
17050         fi
17051 fi
17052
17053 if test $ol_cv_lib_db = no ; then
17054         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17055 echo "configure:17056: checking for Berkeley DB link (-ldb4)" >&5
17056 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17057   echo $ac_n "(cached) $ac_c" 1>&6
17058 else
17059   
17060         ol_DB_LIB=-ldb4
17061         ol_LIBS=$LIBS
17062         LIBS="$ol_DB_LIB $LIBS"
17063
17064         cat > conftest.$ac_ext <<EOF
17065 #line 17066 "configure"
17066 #include "confdefs.h"
17067
17068 #ifdef HAVE_DB_185_H
17069 # include <db_185.h>
17070 #else
17071 # include <db.h>
17072 #endif
17073
17074 #ifndef DB_VERSION_MAJOR
17075 # define DB_VERSION_MAJOR 1
17076 #endif
17077
17078 #ifndef NULL
17079 #define NULL ((void*)0)
17080 #endif
17081
17082 int main() {
17083
17084 #if DB_VERSION_MAJOR > 1
17085         {
17086                 char *version;
17087                 int major, minor, patch;
17088
17089                 version = db_version( &major, &minor, &patch );
17090
17091                 if( major != DB_VERSION_MAJOR ||
17092                         minor < DB_VERSION_MINOR )
17093                 {
17094                         printf("Berkeley DB version mismatch\n"
17095                                 "\texpected: %s\n\tgot: %s\n",
17096                                 DB_VERSION_STRING, version);
17097                         return 1;
17098                 }
17099         }
17100 #endif
17101
17102 #if DB_VERSION_MAJOR > 2
17103         db_env_create( NULL, 0 );
17104 #elif DB_VERSION_MAJOR > 1
17105         db_appexit( NULL );
17106 #else
17107         (void) dbopen( NULL, 0, 0, 0, NULL);
17108 #endif
17109
17110 ; return 0; }
17111 EOF
17112 if { (eval echo configure:17113: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17113   rm -rf conftest*
17114   ol_cv_db_db4=yes
17115 else
17116   echo "configure: failed program was:" >&5
17117   cat conftest.$ac_ext >&5
17118   rm -rf conftest*
17119   ol_cv_db_db4=no
17120 fi
17121 rm -f conftest*
17122
17123         LIBS="$ol_LIBS"
17124
17125 fi
17126
17127 echo "$ac_t""$ol_cv_db_db4" 1>&6
17128
17129         if test $ol_cv_db_db4 = yes ; then
17130                 ol_cv_lib_db=-ldb4
17131         fi
17132 fi
17133
17134 if test $ol_cv_lib_db = no ; then
17135         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17136 echo "configure:17137: checking for Berkeley DB link (-ldb3)" >&5
17137 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17138   echo $ac_n "(cached) $ac_c" 1>&6
17139 else
17140   
17141         ol_DB_LIB=-ldb3
17142         ol_LIBS=$LIBS
17143         LIBS="$ol_DB_LIB $LIBS"
17144
17145         cat > conftest.$ac_ext <<EOF
17146 #line 17147 "configure"
17147 #include "confdefs.h"
17148
17149 #ifdef HAVE_DB_185_H
17150 # include <db_185.h>
17151 #else
17152 # include <db.h>
17153 #endif
17154
17155 #ifndef DB_VERSION_MAJOR
17156 # define DB_VERSION_MAJOR 1
17157 #endif
17158
17159 #ifndef NULL
17160 #define NULL ((void*)0)
17161 #endif
17162
17163 int main() {
17164
17165 #if DB_VERSION_MAJOR > 1
17166         {
17167                 char *version;
17168                 int major, minor, patch;
17169
17170                 version = db_version( &major, &minor, &patch );
17171
17172                 if( major != DB_VERSION_MAJOR ||
17173                         minor < DB_VERSION_MINOR )
17174                 {
17175                         printf("Berkeley DB version mismatch\n"
17176                                 "\texpected: %s\n\tgot: %s\n",
17177                                 DB_VERSION_STRING, version);
17178                         return 1;
17179                 }
17180         }
17181 #endif
17182
17183 #if DB_VERSION_MAJOR > 2
17184         db_env_create( NULL, 0 );
17185 #elif DB_VERSION_MAJOR > 1
17186         db_appexit( NULL );
17187 #else
17188         (void) dbopen( NULL, 0, 0, 0, NULL);
17189 #endif
17190
17191 ; return 0; }
17192 EOF
17193 if { (eval echo configure:17194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17194   rm -rf conftest*
17195   ol_cv_db_db3=yes
17196 else
17197   echo "configure: failed program was:" >&5
17198   cat conftest.$ac_ext >&5
17199   rm -rf conftest*
17200   ol_cv_db_db3=no
17201 fi
17202 rm -f conftest*
17203
17204         LIBS="$ol_LIBS"
17205
17206 fi
17207
17208 echo "$ac_t""$ol_cv_db_db3" 1>&6
17209
17210         if test $ol_cv_db_db3 = yes ; then
17211                 ol_cv_lib_db=-ldb3
17212         fi
17213 fi
17214
17215 if test $ol_cv_lib_db = no ; then
17216         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17217 echo "configure:17218: checking for Berkeley DB link (-ldb2)" >&5
17218 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17219   echo $ac_n "(cached) $ac_c" 1>&6
17220 else
17221   
17222         ol_DB_LIB=-ldb2
17223         ol_LIBS=$LIBS
17224         LIBS="$ol_DB_LIB $LIBS"
17225
17226         cat > conftest.$ac_ext <<EOF
17227 #line 17228 "configure"
17228 #include "confdefs.h"
17229
17230 #ifdef HAVE_DB_185_H
17231 # include <db_185.h>
17232 #else
17233 # include <db.h>
17234 #endif
17235
17236 #ifndef DB_VERSION_MAJOR
17237 # define DB_VERSION_MAJOR 1
17238 #endif
17239
17240 #ifndef NULL
17241 #define NULL ((void*)0)
17242 #endif
17243
17244 int main() {
17245
17246 #if DB_VERSION_MAJOR > 1
17247         {
17248                 char *version;
17249                 int major, minor, patch;
17250
17251                 version = db_version( &major, &minor, &patch );
17252
17253                 if( major != DB_VERSION_MAJOR ||
17254                         minor < DB_VERSION_MINOR )
17255                 {
17256                         printf("Berkeley DB version mismatch\n"
17257                                 "\texpected: %s\n\tgot: %s\n",
17258                                 DB_VERSION_STRING, version);
17259                         return 1;
17260                 }
17261         }
17262 #endif
17263
17264 #if DB_VERSION_MAJOR > 2
17265         db_env_create( NULL, 0 );
17266 #elif DB_VERSION_MAJOR > 1
17267         db_appexit( NULL );
17268 #else
17269         (void) dbopen( NULL, 0, 0, 0, NULL);
17270 #endif
17271
17272 ; return 0; }
17273 EOF
17274 if { (eval echo configure:17275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17275   rm -rf conftest*
17276   ol_cv_db_db2=yes
17277 else
17278   echo "configure: failed program was:" >&5
17279   cat conftest.$ac_ext >&5
17280   rm -rf conftest*
17281   ol_cv_db_db2=no
17282 fi
17283 rm -f conftest*
17284
17285         LIBS="$ol_LIBS"
17286
17287 fi
17288
17289 echo "$ac_t""$ol_cv_db_db2" 1>&6
17290
17291         if test $ol_cv_db_db2 = yes ; then
17292                 ol_cv_lib_db=-ldb2
17293         fi
17294 fi
17295
17296 if test $ol_cv_lib_db = no ; then
17297         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17298 echo "configure:17299: checking for Berkeley DB link (-ldb1)" >&5
17299 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17300   echo $ac_n "(cached) $ac_c" 1>&6
17301 else
17302   
17303         ol_DB_LIB=-ldb1
17304         ol_LIBS=$LIBS
17305         LIBS="$ol_DB_LIB $LIBS"
17306
17307         cat > conftest.$ac_ext <<EOF
17308 #line 17309 "configure"
17309 #include "confdefs.h"
17310
17311 #ifdef HAVE_DB_185_H
17312 # include <db_185.h>
17313 #else
17314 # include <db.h>
17315 #endif
17316
17317 #ifndef DB_VERSION_MAJOR
17318 # define DB_VERSION_MAJOR 1
17319 #endif
17320
17321 #ifndef NULL
17322 #define NULL ((void*)0)
17323 #endif
17324
17325 int main() {
17326
17327 #if DB_VERSION_MAJOR > 1
17328         {
17329                 char *version;
17330                 int major, minor, patch;
17331
17332                 version = db_version( &major, &minor, &patch );
17333
17334                 if( major != DB_VERSION_MAJOR ||
17335                         minor < DB_VERSION_MINOR )
17336                 {
17337                         printf("Berkeley DB version mismatch\n"
17338                                 "\texpected: %s\n\tgot: %s\n",
17339                                 DB_VERSION_STRING, version);
17340                         return 1;
17341                 }
17342         }
17343 #endif
17344
17345 #if DB_VERSION_MAJOR > 2
17346         db_env_create( NULL, 0 );
17347 #elif DB_VERSION_MAJOR > 1
17348         db_appexit( NULL );
17349 #else
17350         (void) dbopen( NULL, 0, 0, 0, NULL);
17351 #endif
17352
17353 ; return 0; }
17354 EOF
17355 if { (eval echo configure:17356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17356   rm -rf conftest*
17357   ol_cv_db_db1=yes
17358 else
17359   echo "configure: failed program was:" >&5
17360   cat conftest.$ac_ext >&5
17361   rm -rf conftest*
17362   ol_cv_db_db1=no
17363 fi
17364 rm -f conftest*
17365
17366         LIBS="$ol_LIBS"
17367
17368 fi
17369
17370 echo "$ac_t""$ol_cv_db_db1" 1>&6
17371
17372         if test $ol_cv_db_db1 = yes ; then
17373                 ol_cv_lib_db=-ldb1
17374         fi
17375 fi
17376
17377
17378                 if test "$ol_cv_lib_db" != no ; then
17379                         ol_cv_berkeley_db=yes
17380                 fi
17381         fi
17382 fi
17383
17384         else
17385                 ol_cv_berkeley_db=no
17386 for ac_hdr in db.h
17387 do
17388 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17389 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17390 echo "configure:17391: checking for $ac_hdr" >&5
17391 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17392   echo $ac_n "(cached) $ac_c" 1>&6
17393 else
17394   cat > conftest.$ac_ext <<EOF
17395 #line 17396 "configure"
17396 #include "confdefs.h"
17397 #include <$ac_hdr>
17398 EOF
17399 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17400 { (eval echo configure:17401: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17401 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17402 if test -z "$ac_err"; then
17403   rm -rf conftest*
17404   eval "ac_cv_header_$ac_safe=yes"
17405 else
17406   echo "$ac_err" >&5
17407   echo "configure: failed program was:" >&5
17408   cat conftest.$ac_ext >&5
17409   rm -rf conftest*
17410   eval "ac_cv_header_$ac_safe=no"
17411 fi
17412 rm -f conftest*
17413 fi
17414 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17415   echo "$ac_t""yes" 1>&6
17416     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17417   cat >> confdefs.h <<EOF
17418 #define $ac_tr_hdr 1
17419 EOF
17420  
17421 else
17422   echo "$ac_t""no" 1>&6
17423 fi
17424 done
17425
17426 if test $ac_cv_header_db_h = yes; then
17427         ol_cv_lib_db=no
17428 if test $ol_cv_lib_db = no ; then
17429         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17430 echo "configure:17431: checking for Berkeley DB link (default)" >&5
17431 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17432   echo $ac_n "(cached) $ac_c" 1>&6
17433 else
17434   
17435         ol_DB_LIB=
17436         ol_LIBS=$LIBS
17437         LIBS="$ol_DB_LIB $LIBS"
17438
17439         cat > conftest.$ac_ext <<EOF
17440 #line 17441 "configure"
17441 #include "confdefs.h"
17442
17443 #ifdef HAVE_DB_185_H
17444 # include <db_185.h>
17445 #else
17446 # include <db.h>
17447 #endif
17448
17449 #ifndef DB_VERSION_MAJOR
17450 # define DB_VERSION_MAJOR 1
17451 #endif
17452
17453 #ifndef NULL
17454 #define NULL ((void*)0)
17455 #endif
17456
17457 int main() {
17458
17459 #if DB_VERSION_MAJOR > 1
17460         {
17461                 char *version;
17462                 int major, minor, patch;
17463
17464                 version = db_version( &major, &minor, &patch );
17465
17466                 if( major != DB_VERSION_MAJOR ||
17467                         minor < DB_VERSION_MINOR )
17468                 {
17469                         printf("Berkeley DB version mismatch\n"
17470                                 "\texpected: %s\n\tgot: %s\n",
17471                                 DB_VERSION_STRING, version);
17472                         return 1;
17473                 }
17474         }
17475 #endif
17476
17477 #if DB_VERSION_MAJOR > 2
17478         db_env_create( NULL, 0 );
17479 #elif DB_VERSION_MAJOR > 1
17480         db_appexit( NULL );
17481 #else
17482         (void) dbopen( NULL, 0, 0, 0, NULL);
17483 #endif
17484
17485 ; return 0; }
17486 EOF
17487 if { (eval echo configure:17488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17488   rm -rf conftest*
17489   ol_cv_db_none=yes
17490 else
17491   echo "configure: failed program was:" >&5
17492   cat conftest.$ac_ext >&5
17493   rm -rf conftest*
17494   ol_cv_db_none=no
17495 fi
17496 rm -f conftest*
17497
17498         LIBS="$ol_LIBS"
17499
17500 fi
17501
17502 echo "$ac_t""$ol_cv_db_none" 1>&6
17503
17504         if test $ol_cv_db_none = yes ; then
17505                 ol_cv_lib_db=yes
17506         fi
17507 fi
17508
17509 if test $ol_cv_lib_db = no ; then
17510         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17511 echo "configure:17512: checking for Berkeley DB link (-ldb)" >&5
17512 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17513   echo $ac_n "(cached) $ac_c" 1>&6
17514 else
17515   
17516         ol_DB_LIB=-ldb
17517         ol_LIBS=$LIBS
17518         LIBS="$ol_DB_LIB $LIBS"
17519
17520         cat > conftest.$ac_ext <<EOF
17521 #line 17522 "configure"
17522 #include "confdefs.h"
17523
17524 #ifdef HAVE_DB_185_H
17525 # include <db_185.h>
17526 #else
17527 # include <db.h>
17528 #endif
17529
17530 #ifndef DB_VERSION_MAJOR
17531 # define DB_VERSION_MAJOR 1
17532 #endif
17533
17534 #ifndef NULL
17535 #define NULL ((void*)0)
17536 #endif
17537
17538 int main() {
17539
17540 #if DB_VERSION_MAJOR > 1
17541         {
17542                 char *version;
17543                 int major, minor, patch;
17544
17545                 version = db_version( &major, &minor, &patch );
17546
17547                 if( major != DB_VERSION_MAJOR ||
17548                         minor < DB_VERSION_MINOR )
17549                 {
17550                         printf("Berkeley DB version mismatch\n"
17551                                 "\texpected: %s\n\tgot: %s\n",
17552                                 DB_VERSION_STRING, version);
17553                         return 1;
17554                 }
17555         }
17556 #endif
17557
17558 #if DB_VERSION_MAJOR > 2
17559         db_env_create( NULL, 0 );
17560 #elif DB_VERSION_MAJOR > 1
17561         db_appexit( NULL );
17562 #else
17563         (void) dbopen( NULL, 0, 0, 0, NULL);
17564 #endif
17565
17566 ; return 0; }
17567 EOF
17568 if { (eval echo configure:17569: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17569   rm -rf conftest*
17570   ol_cv_db_db=yes
17571 else
17572   echo "configure: failed program was:" >&5
17573   cat conftest.$ac_ext >&5
17574   rm -rf conftest*
17575   ol_cv_db_db=no
17576 fi
17577 rm -f conftest*
17578
17579         LIBS="$ol_LIBS"
17580
17581 fi
17582
17583 echo "$ac_t""$ol_cv_db_db" 1>&6
17584
17585         if test $ol_cv_db_db = yes ; then
17586                 ol_cv_lib_db=-ldb
17587         fi
17588 fi
17589
17590 if test $ol_cv_lib_db = no ; then
17591         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17592 echo "configure:17593: checking for Berkeley DB link (-ldb4)" >&5
17593 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17594   echo $ac_n "(cached) $ac_c" 1>&6
17595 else
17596   
17597         ol_DB_LIB=-ldb4
17598         ol_LIBS=$LIBS
17599         LIBS="$ol_DB_LIB $LIBS"
17600
17601         cat > conftest.$ac_ext <<EOF
17602 #line 17603 "configure"
17603 #include "confdefs.h"
17604
17605 #ifdef HAVE_DB_185_H
17606 # include <db_185.h>
17607 #else
17608 # include <db.h>
17609 #endif
17610
17611 #ifndef DB_VERSION_MAJOR
17612 # define DB_VERSION_MAJOR 1
17613 #endif
17614
17615 #ifndef NULL
17616 #define NULL ((void*)0)
17617 #endif
17618
17619 int main() {
17620
17621 #if DB_VERSION_MAJOR > 1
17622         {
17623                 char *version;
17624                 int major, minor, patch;
17625
17626                 version = db_version( &major, &minor, &patch );
17627
17628                 if( major != DB_VERSION_MAJOR ||
17629                         minor < DB_VERSION_MINOR )
17630                 {
17631                         printf("Berkeley DB version mismatch\n"
17632                                 "\texpected: %s\n\tgot: %s\n",
17633                                 DB_VERSION_STRING, version);
17634                         return 1;
17635                 }
17636         }
17637 #endif
17638
17639 #if DB_VERSION_MAJOR > 2
17640         db_env_create( NULL, 0 );
17641 #elif DB_VERSION_MAJOR > 1
17642         db_appexit( NULL );
17643 #else
17644         (void) dbopen( NULL, 0, 0, 0, NULL);
17645 #endif
17646
17647 ; return 0; }
17648 EOF
17649 if { (eval echo configure:17650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17650   rm -rf conftest*
17651   ol_cv_db_db4=yes
17652 else
17653   echo "configure: failed program was:" >&5
17654   cat conftest.$ac_ext >&5
17655   rm -rf conftest*
17656   ol_cv_db_db4=no
17657 fi
17658 rm -f conftest*
17659
17660         LIBS="$ol_LIBS"
17661
17662 fi
17663
17664 echo "$ac_t""$ol_cv_db_db4" 1>&6
17665
17666         if test $ol_cv_db_db4 = yes ; then
17667                 ol_cv_lib_db=-ldb4
17668         fi
17669 fi
17670
17671 if test $ol_cv_lib_db = no ; then
17672         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17673 echo "configure:17674: checking for Berkeley DB link (-ldb3)" >&5
17674 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17675   echo $ac_n "(cached) $ac_c" 1>&6
17676 else
17677   
17678         ol_DB_LIB=-ldb3
17679         ol_LIBS=$LIBS
17680         LIBS="$ol_DB_LIB $LIBS"
17681
17682         cat > conftest.$ac_ext <<EOF
17683 #line 17684 "configure"
17684 #include "confdefs.h"
17685
17686 #ifdef HAVE_DB_185_H
17687 # include <db_185.h>
17688 #else
17689 # include <db.h>
17690 #endif
17691
17692 #ifndef DB_VERSION_MAJOR
17693 # define DB_VERSION_MAJOR 1
17694 #endif
17695
17696 #ifndef NULL
17697 #define NULL ((void*)0)
17698 #endif
17699
17700 int main() {
17701
17702 #if DB_VERSION_MAJOR > 1
17703         {
17704                 char *version;
17705                 int major, minor, patch;
17706
17707                 version = db_version( &major, &minor, &patch );
17708
17709                 if( major != DB_VERSION_MAJOR ||
17710                         minor < DB_VERSION_MINOR )
17711                 {
17712                         printf("Berkeley DB version mismatch\n"
17713                                 "\texpected: %s\n\tgot: %s\n",
17714                                 DB_VERSION_STRING, version);
17715                         return 1;
17716                 }
17717         }
17718 #endif
17719
17720 #if DB_VERSION_MAJOR > 2
17721         db_env_create( NULL, 0 );
17722 #elif DB_VERSION_MAJOR > 1
17723         db_appexit( NULL );
17724 #else
17725         (void) dbopen( NULL, 0, 0, 0, NULL);
17726 #endif
17727
17728 ; return 0; }
17729 EOF
17730 if { (eval echo configure:17731: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17731   rm -rf conftest*
17732   ol_cv_db_db3=yes
17733 else
17734   echo "configure: failed program was:" >&5
17735   cat conftest.$ac_ext >&5
17736   rm -rf conftest*
17737   ol_cv_db_db3=no
17738 fi
17739 rm -f conftest*
17740
17741         LIBS="$ol_LIBS"
17742
17743 fi
17744
17745 echo "$ac_t""$ol_cv_db_db3" 1>&6
17746
17747         if test $ol_cv_db_db3 = yes ; then
17748                 ol_cv_lib_db=-ldb3
17749         fi
17750 fi
17751
17752 if test $ol_cv_lib_db = no ; then
17753         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17754 echo "configure:17755: checking for Berkeley DB link (-ldb2)" >&5
17755 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17756   echo $ac_n "(cached) $ac_c" 1>&6
17757 else
17758   
17759         ol_DB_LIB=-ldb2
17760         ol_LIBS=$LIBS
17761         LIBS="$ol_DB_LIB $LIBS"
17762
17763         cat > conftest.$ac_ext <<EOF
17764 #line 17765 "configure"
17765 #include "confdefs.h"
17766
17767 #ifdef HAVE_DB_185_H
17768 # include <db_185.h>
17769 #else
17770 # include <db.h>
17771 #endif
17772
17773 #ifndef DB_VERSION_MAJOR
17774 # define DB_VERSION_MAJOR 1
17775 #endif
17776
17777 #ifndef NULL
17778 #define NULL ((void*)0)
17779 #endif
17780
17781 int main() {
17782
17783 #if DB_VERSION_MAJOR > 1
17784         {
17785                 char *version;
17786                 int major, minor, patch;
17787
17788                 version = db_version( &major, &minor, &patch );
17789
17790                 if( major != DB_VERSION_MAJOR ||
17791                         minor < DB_VERSION_MINOR )
17792                 {
17793                         printf("Berkeley DB version mismatch\n"
17794                                 "\texpected: %s\n\tgot: %s\n",
17795                                 DB_VERSION_STRING, version);
17796                         return 1;
17797                 }
17798         }
17799 #endif
17800
17801 #if DB_VERSION_MAJOR > 2
17802         db_env_create( NULL, 0 );
17803 #elif DB_VERSION_MAJOR > 1
17804         db_appexit( NULL );
17805 #else
17806         (void) dbopen( NULL, 0, 0, 0, NULL);
17807 #endif
17808
17809 ; return 0; }
17810 EOF
17811 if { (eval echo configure:17812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17812   rm -rf conftest*
17813   ol_cv_db_db2=yes
17814 else
17815   echo "configure: failed program was:" >&5
17816   cat conftest.$ac_ext >&5
17817   rm -rf conftest*
17818   ol_cv_db_db2=no
17819 fi
17820 rm -f conftest*
17821
17822         LIBS="$ol_LIBS"
17823
17824 fi
17825
17826 echo "$ac_t""$ol_cv_db_db2" 1>&6
17827
17828         if test $ol_cv_db_db2 = yes ; then
17829                 ol_cv_lib_db=-ldb2
17830         fi
17831 fi
17832
17833 if test $ol_cv_lib_db = no ; then
17834         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17835 echo "configure:17836: checking for Berkeley DB link (-ldb1)" >&5
17836 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17837   echo $ac_n "(cached) $ac_c" 1>&6
17838 else
17839   
17840         ol_DB_LIB=-ldb1
17841         ol_LIBS=$LIBS
17842         LIBS="$ol_DB_LIB $LIBS"
17843
17844         cat > conftest.$ac_ext <<EOF
17845 #line 17846 "configure"
17846 #include "confdefs.h"
17847
17848 #ifdef HAVE_DB_185_H
17849 # include <db_185.h>
17850 #else
17851 # include <db.h>
17852 #endif
17853
17854 #ifndef DB_VERSION_MAJOR
17855 # define DB_VERSION_MAJOR 1
17856 #endif
17857
17858 #ifndef NULL
17859 #define NULL ((void*)0)
17860 #endif
17861
17862 int main() {
17863
17864 #if DB_VERSION_MAJOR > 1
17865         {
17866                 char *version;
17867                 int major, minor, patch;
17868
17869                 version = db_version( &major, &minor, &patch );
17870
17871                 if( major != DB_VERSION_MAJOR ||
17872                         minor < DB_VERSION_MINOR )
17873                 {
17874                         printf("Berkeley DB version mismatch\n"
17875                                 "\texpected: %s\n\tgot: %s\n",
17876                                 DB_VERSION_STRING, version);
17877                         return 1;
17878                 }
17879         }
17880 #endif
17881
17882 #if DB_VERSION_MAJOR > 2
17883         db_env_create( NULL, 0 );
17884 #elif DB_VERSION_MAJOR > 1
17885         db_appexit( NULL );
17886 #else
17887         (void) dbopen( NULL, 0, 0, 0, NULL);
17888 #endif
17889
17890 ; return 0; }
17891 EOF
17892 if { (eval echo configure:17893: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17893   rm -rf conftest*
17894   ol_cv_db_db1=yes
17895 else
17896   echo "configure: failed program was:" >&5
17897   cat conftest.$ac_ext >&5
17898   rm -rf conftest*
17899   ol_cv_db_db1=no
17900 fi
17901 rm -f conftest*
17902
17903         LIBS="$ol_LIBS"
17904
17905 fi
17906
17907 echo "$ac_t""$ol_cv_db_db1" 1>&6
17908
17909         if test $ol_cv_db_db1 = yes ; then
17910                 ol_cv_lib_db=-ldb1
17911         fi
17912 fi
17913
17914
17915         if test "$ol_cv_lib_db" != no ; then
17916                 ol_cv_berkeley_db=yes
17917                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
17918 echo "configure:17919: checking for Berkeley DB thread support" >&5
17919 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
17920   echo $ac_n "(cached) $ac_c" 1>&6
17921 else
17922   
17923         ol_LIBS="$LIBS"
17924         if test $ol_cv_lib_db != yes ; then
17925                 LIBS="$ol_cv_lib_db"
17926         fi
17927
17928         if test "$cross_compiling" = yes; then
17929   ol_cv_berkeley_db_thread=cross
17930 else
17931   cat > conftest.$ac_ext <<EOF
17932 #line 17933 "configure"
17933 #include "confdefs.h"
17934
17935 #ifdef HAVE_DB_185_H
17936         choke me;
17937 #else
17938 #include <db.h>
17939 #endif
17940 #ifndef NULL
17941 #define NULL ((void *)0)
17942 #endif
17943 main()
17944 {
17945         int rc;
17946         u_int32_t flags = DB_CREATE |
17947 #ifdef DB_PRIVATE
17948                 DB_PRIVATE |
17949 #endif
17950                 DB_THREAD;
17951
17952 #if DB_VERSION_MAJOR > 2
17953         DB_ENV *env = NULL;
17954
17955         rc = db_env_create( &env, 0 );
17956
17957         flags |= DB_INIT_MPOOL;
17958 #ifdef DB_MPOOL_PRIVATE
17959         flags |= DB_MPOOL_PRIVATE;
17960 #endif
17961
17962         if( rc ) {
17963                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
17964                 return rc;
17965         }
17966
17967 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
17968         rc = env->open( env, NULL, flags, 0 );
17969 #else
17970         rc = env->open( env, NULL, NULL, flags, 0 );
17971 #endif
17972
17973         if ( rc == 0 ) {
17974                 rc = env->close( env, 0 );
17975         }
17976
17977         if( rc ) {
17978                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
17979                 return rc;
17980         }
17981
17982 #else
17983         DB_ENV env;
17984         memset( &env, '\0', sizeof(env) );
17985
17986         rc = db_appinit( NULL, NULL, &env, flags );
17987
17988         if( rc == 0 ) {
17989                 db_appexit( &env );
17990         }
17991
17992         unlink("__db_mpool.share");
17993         unlink("__db_lock.share");
17994 #endif
17995
17996         return rc;
17997 }
17998 EOF
17999 if { (eval echo configure:18000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18000 then
18001   ol_cv_berkeley_db_thread=yes
18002 else
18003   echo "configure: failed program was:" >&5
18004   cat conftest.$ac_ext >&5
18005   rm -fr conftest*
18006   ol_cv_berkeley_db_thread=no
18007 fi
18008 rm -fr conftest*
18009 fi
18010
18011
18012         LIBS="$ol_LIBS"
18013
18014         if test $ol_cv_berkeley_db_thread != no ; then
18015                 cat >> confdefs.h <<\EOF
18016 #define HAVE_BERKELEY_DB_THREAD 1
18017 EOF
18018
18019         fi
18020
18021 fi
18022
18023 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18024         fi
18025 fi
18026
18027         fi
18028
18029         if test $ol_cv_berkeley_db != no ; then
18030                 cat >> confdefs.h <<\EOF
18031 #define HAVE_BERKELEY_DB 1
18032 EOF
18033
18034
18035                 ol_link_ldbm=berkeley
18036                 ol_with_ldbm_api=berkeley
18037
18038                 if test $ol_with_ldbm_type = hash ; then
18039                         cat >> confdefs.h <<\EOF
18040 #define LDBM_USE_DBHASH 1
18041 EOF
18042
18043                 else
18044                         cat >> confdefs.h <<\EOF
18045 #define LDBM_USE_DBBTREE 1
18046 EOF
18047
18048                 fi
18049
18050                                                 if test $ol_cv_lib_db != yes ; then
18051                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18052                 fi
18053         fi
18054 fi
18055
18056 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18057         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18058 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18059         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18060 echo "configure:18061: checking Berkeley DB version for BDB backend" >&5
18061 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18062   echo $ac_n "(cached) $ac_c" 1>&6
18063 else
18064   
18065         cat > conftest.$ac_ext <<EOF
18066 #line 18067 "configure"
18067 #include "confdefs.h"
18068
18069 #include <db.h>
18070
18071  /* this check could be improved */
18072 #ifndef DB_VERSION_MAJOR
18073 #       define DB_VERSION_MAJOR 1
18074 #endif
18075
18076 /* require 4.0 or later */
18077 #if DB_VERSION_MAJOR >= 4 
18078         __db_version_compat
18079 #endif
18080         
18081 EOF
18082 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18083   egrep "__db_version_compat" >/dev/null 2>&1; then
18084   rm -rf conftest*
18085   ol_cv_bdb_compat=yes
18086 else
18087   rm -rf conftest*
18088   ol_cv_bdb_compat=no
18089 fi
18090 rm -f conftest*
18091
18092 fi
18093
18094 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18095
18096
18097         if test $ol_cv_bdb_compat = yes ; then
18098                 ol_enable_bdb=yes
18099         elif test $ol_enable_bdb = yes ; then
18100                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18101         else
18102                 ol_enable_bdb=no
18103         fi
18104 fi
18105
18106 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18107         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18108         ol_with_ldbm_api=none
18109 fi
18110
18111 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18112         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18113 echo "configure:18114: checking for MDBM library" >&5
18114 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18115   echo $ac_n "(cached) $ac_c" 1>&6
18116 else
18117         ol_LIBS="$LIBS"
18118         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18119 echo "configure:18120: checking for mdbm_set_chain" >&5
18120 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18121   echo $ac_n "(cached) $ac_c" 1>&6
18122 else
18123   cat > conftest.$ac_ext <<EOF
18124 #line 18125 "configure"
18125 #include "confdefs.h"
18126 /* System header to define __stub macros and hopefully few prototypes,
18127     which can conflict with char mdbm_set_chain(); below.  */
18128 #include <assert.h>
18129 /* Override any gcc2 internal prototype to avoid an error.  */
18130 /* We use char because int might match the return type of a gcc2
18131     builtin and then its argument prototype would still apply.  */
18132 char mdbm_set_chain();
18133 char (*f)();
18134
18135 int main() {
18136
18137 /* The GNU C library defines this for functions which it implements
18138     to always fail with ENOSYS.  Some functions are actually named
18139     something starting with __ and the normal name is an alias.  */
18140 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18141 choke me
18142 #else
18143 f = mdbm_set_chain;
18144 #endif
18145
18146 ; return 0; }
18147 EOF
18148 if { (eval echo configure:18149: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18149   rm -rf conftest*
18150   eval "ac_cv_func_mdbm_set_chain=yes"
18151 else
18152   echo "configure: failed program was:" >&5
18153   cat conftest.$ac_ext >&5
18154   rm -rf conftest*
18155   eval "ac_cv_func_mdbm_set_chain=no"
18156 fi
18157 rm -f conftest*
18158 fi
18159
18160 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18161   echo "$ac_t""yes" 1>&6
18162   ol_cv_lib_mdbm=yes
18163 else
18164   echo "$ac_t""no" 1>&6
18165
18166                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18167 echo "configure:18168: checking for mdbm_set_chain in -lmdbm" >&5
18168 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18169 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18170   echo $ac_n "(cached) $ac_c" 1>&6
18171 else
18172   ac_save_LIBS="$LIBS"
18173 LIBS="-lmdbm  $LIBS"
18174 cat > conftest.$ac_ext <<EOF
18175 #line 18176 "configure"
18176 #include "confdefs.h"
18177 /* Override any gcc2 internal prototype to avoid an error.  */
18178 /* We use char because int might match the return type of a gcc2
18179     builtin and then its argument prototype would still apply.  */
18180 char mdbm_set_chain();
18181
18182 int main() {
18183 mdbm_set_chain()
18184 ; return 0; }
18185 EOF
18186 if { (eval echo configure:18187: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18187   rm -rf conftest*
18188   eval "ac_cv_lib_$ac_lib_var=yes"
18189 else
18190   echo "configure: failed program was:" >&5
18191   cat conftest.$ac_ext >&5
18192   rm -rf conftest*
18193   eval "ac_cv_lib_$ac_lib_var=no"
18194 fi
18195 rm -f conftest*
18196 LIBS="$ac_save_LIBS"
18197
18198 fi
18199 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18200   echo "$ac_t""yes" 1>&6
18201   ol_cv_lib_mdbm=-lmdbm
18202 else
18203   echo "$ac_t""no" 1>&6
18204 ol_cv_lib_mdbm=no
18205 fi
18206
18207         
18208 fi
18209
18210         LIBS="$ol_LIBS"
18211
18212 fi
18213
18214 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18215
18216
18217  for ac_hdr in mdbm.h
18218 do
18219 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18220 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18221 echo "configure:18222: checking for $ac_hdr" >&5
18222 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18223   echo $ac_n "(cached) $ac_c" 1>&6
18224 else
18225   cat > conftest.$ac_ext <<EOF
18226 #line 18227 "configure"
18227 #include "confdefs.h"
18228 #include <$ac_hdr>
18229 EOF
18230 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18231 { (eval echo configure:18232: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18232 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18233 if test -z "$ac_err"; then
18234   rm -rf conftest*
18235   eval "ac_cv_header_$ac_safe=yes"
18236 else
18237   echo "$ac_err" >&5
18238   echo "configure: failed program was:" >&5
18239   cat conftest.$ac_ext >&5
18240   rm -rf conftest*
18241   eval "ac_cv_header_$ac_safe=no"
18242 fi
18243 rm -f conftest*
18244 fi
18245 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18246   echo "$ac_t""yes" 1>&6
18247     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18248   cat >> confdefs.h <<EOF
18249 #define $ac_tr_hdr 1
18250 EOF
18251  
18252 else
18253   echo "$ac_t""no" 1>&6
18254 fi
18255 done
18256
18257  echo $ac_n "checking for db""... $ac_c" 1>&6
18258 echo "configure:18259: checking for db" >&5
18259 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18260   echo $ac_n "(cached) $ac_c" 1>&6
18261 else
18262   
18263         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18264                 ol_cv_mdbm=no
18265         else
18266                 ol_cv_mdbm=yes
18267         fi
18268
18269 fi
18270
18271 echo "$ac_t""$ol_cv_mdbm" 1>&6
18272  if test $ol_cv_mdbm = yes ; then
18273         cat >> confdefs.h <<\EOF
18274 #define HAVE_MDBM 1
18275 EOF
18276
18277  fi
18278
18279
18280         if test $ol_cv_mdbm = yes ; then
18281                 ol_link_ldbm=mdbm
18282                 ol_with_ldbm_api=mdbm
18283                 if test $ol_cv_lib_mdbm != yes ; then
18284                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18285                 fi
18286         fi
18287 fi
18288
18289 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18290         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18291 echo "configure:18292: checking for GDBM library" >&5
18292 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18293   echo $ac_n "(cached) $ac_c" 1>&6
18294 else
18295         ol_LIBS="$LIBS"
18296         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18297 echo "configure:18298: checking for gdbm_open" >&5
18298 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18299   echo $ac_n "(cached) $ac_c" 1>&6
18300 else
18301   cat > conftest.$ac_ext <<EOF
18302 #line 18303 "configure"
18303 #include "confdefs.h"
18304 /* System header to define __stub macros and hopefully few prototypes,
18305     which can conflict with char gdbm_open(); below.  */
18306 #include <assert.h>
18307 /* Override any gcc2 internal prototype to avoid an error.  */
18308 /* We use char because int might match the return type of a gcc2
18309     builtin and then its argument prototype would still apply.  */
18310 char gdbm_open();
18311 char (*f)();
18312
18313 int main() {
18314
18315 /* The GNU C library defines this for functions which it implements
18316     to always fail with ENOSYS.  Some functions are actually named
18317     something starting with __ and the normal name is an alias.  */
18318 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18319 choke me
18320 #else
18321 f = gdbm_open;
18322 #endif
18323
18324 ; return 0; }
18325 EOF
18326 if { (eval echo configure:18327: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18327   rm -rf conftest*
18328   eval "ac_cv_func_gdbm_open=yes"
18329 else
18330   echo "configure: failed program was:" >&5
18331   cat conftest.$ac_ext >&5
18332   rm -rf conftest*
18333   eval "ac_cv_func_gdbm_open=no"
18334 fi
18335 rm -f conftest*
18336 fi
18337
18338 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18339   echo "$ac_t""yes" 1>&6
18340   ol_cv_lib_gdbm=yes
18341 else
18342   echo "$ac_t""no" 1>&6
18343
18344                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18345 echo "configure:18346: checking for gdbm_open in -lgdbm" >&5
18346 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18347 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18348   echo $ac_n "(cached) $ac_c" 1>&6
18349 else
18350   ac_save_LIBS="$LIBS"
18351 LIBS="-lgdbm  $LIBS"
18352 cat > conftest.$ac_ext <<EOF
18353 #line 18354 "configure"
18354 #include "confdefs.h"
18355 /* Override any gcc2 internal prototype to avoid an error.  */
18356 /* We use char because int might match the return type of a gcc2
18357     builtin and then its argument prototype would still apply.  */
18358 char gdbm_open();
18359
18360 int main() {
18361 gdbm_open()
18362 ; return 0; }
18363 EOF
18364 if { (eval echo configure:18365: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18365   rm -rf conftest*
18366   eval "ac_cv_lib_$ac_lib_var=yes"
18367 else
18368   echo "configure: failed program was:" >&5
18369   cat conftest.$ac_ext >&5
18370   rm -rf conftest*
18371   eval "ac_cv_lib_$ac_lib_var=no"
18372 fi
18373 rm -f conftest*
18374 LIBS="$ac_save_LIBS"
18375
18376 fi
18377 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18378   echo "$ac_t""yes" 1>&6
18379   ol_cv_lib_gdbm=-lgdbm
18380 else
18381   echo "$ac_t""no" 1>&6
18382 ol_cv_lib_gdbm=no
18383 fi
18384
18385         
18386 fi
18387
18388         LIBS="$ol_LIBS"
18389
18390 fi
18391
18392 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18393
18394
18395  for ac_hdr in gdbm.h
18396 do
18397 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18398 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18399 echo "configure:18400: checking for $ac_hdr" >&5
18400 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18401   echo $ac_n "(cached) $ac_c" 1>&6
18402 else
18403   cat > conftest.$ac_ext <<EOF
18404 #line 18405 "configure"
18405 #include "confdefs.h"
18406 #include <$ac_hdr>
18407 EOF
18408 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18409 { (eval echo configure:18410: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18410 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18411 if test -z "$ac_err"; then
18412   rm -rf conftest*
18413   eval "ac_cv_header_$ac_safe=yes"
18414 else
18415   echo "$ac_err" >&5
18416   echo "configure: failed program was:" >&5
18417   cat conftest.$ac_ext >&5
18418   rm -rf conftest*
18419   eval "ac_cv_header_$ac_safe=no"
18420 fi
18421 rm -f conftest*
18422 fi
18423 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18424   echo "$ac_t""yes" 1>&6
18425     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18426   cat >> confdefs.h <<EOF
18427 #define $ac_tr_hdr 1
18428 EOF
18429  
18430 else
18431   echo "$ac_t""no" 1>&6
18432 fi
18433 done
18434
18435  echo $ac_n "checking for db""... $ac_c" 1>&6
18436 echo "configure:18437: checking for db" >&5
18437 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18438   echo $ac_n "(cached) $ac_c" 1>&6
18439 else
18440   
18441         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18442                 ol_cv_gdbm=no
18443         else
18444                 ol_cv_gdbm=yes
18445         fi
18446
18447 fi
18448
18449 echo "$ac_t""$ol_cv_gdbm" 1>&6
18450  if test $ol_cv_gdbm = yes ; then
18451         cat >> confdefs.h <<\EOF
18452 #define HAVE_GDBM 1
18453 EOF
18454
18455  fi
18456
18457
18458         if test $ol_cv_gdbm = yes ; then
18459                 ol_link_ldbm=gdbm
18460                 ol_with_ldbm_api=gdbm
18461
18462                 if test $ol_cv_lib_gdbm != yes ; then
18463                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18464                 fi
18465         fi
18466 fi
18467
18468 if test $ol_with_ldbm_api = ndbm ; then
18469         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18470 echo "configure:18471: checking for NDBM library" >&5
18471 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18472   echo $ac_n "(cached) $ac_c" 1>&6
18473 else
18474         ol_LIBS="$LIBS"
18475         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18476 echo "configure:18477: checking for dbm_open" >&5
18477 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18478   echo $ac_n "(cached) $ac_c" 1>&6
18479 else
18480   cat > conftest.$ac_ext <<EOF
18481 #line 18482 "configure"
18482 #include "confdefs.h"
18483 /* System header to define __stub macros and hopefully few prototypes,
18484     which can conflict with char dbm_open(); below.  */
18485 #include <assert.h>
18486 /* Override any gcc2 internal prototype to avoid an error.  */
18487 /* We use char because int might match the return type of a gcc2
18488     builtin and then its argument prototype would still apply.  */
18489 char dbm_open();
18490 char (*f)();
18491
18492 int main() {
18493
18494 /* The GNU C library defines this for functions which it implements
18495     to always fail with ENOSYS.  Some functions are actually named
18496     something starting with __ and the normal name is an alias.  */
18497 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18498 choke me
18499 #else
18500 f = dbm_open;
18501 #endif
18502
18503 ; return 0; }
18504 EOF
18505 if { (eval echo configure:18506: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18506   rm -rf conftest*
18507   eval "ac_cv_func_dbm_open=yes"
18508 else
18509   echo "configure: failed program was:" >&5
18510   cat conftest.$ac_ext >&5
18511   rm -rf conftest*
18512   eval "ac_cv_func_dbm_open=no"
18513 fi
18514 rm -f conftest*
18515 fi
18516
18517 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18518   echo "$ac_t""yes" 1>&6
18519   ol_cv_lib_ndbm=yes
18520 else
18521   echo "$ac_t""no" 1>&6
18522
18523                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18524 echo "configure:18525: checking for dbm_open in -lndbm" >&5
18525 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18526 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18527   echo $ac_n "(cached) $ac_c" 1>&6
18528 else
18529   ac_save_LIBS="$LIBS"
18530 LIBS="-lndbm  $LIBS"
18531 cat > conftest.$ac_ext <<EOF
18532 #line 18533 "configure"
18533 #include "confdefs.h"
18534 /* Override any gcc2 internal prototype to avoid an error.  */
18535 /* We use char because int might match the return type of a gcc2
18536     builtin and then its argument prototype would still apply.  */
18537 char dbm_open();
18538
18539 int main() {
18540 dbm_open()
18541 ; return 0; }
18542 EOF
18543 if { (eval echo configure:18544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18544   rm -rf conftest*
18545   eval "ac_cv_lib_$ac_lib_var=yes"
18546 else
18547   echo "configure: failed program was:" >&5
18548   cat conftest.$ac_ext >&5
18549   rm -rf conftest*
18550   eval "ac_cv_lib_$ac_lib_var=no"
18551 fi
18552 rm -f conftest*
18553 LIBS="$ac_save_LIBS"
18554
18555 fi
18556 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18557   echo "$ac_t""yes" 1>&6
18558   ol_cv_lib_ndbm=-lndbm
18559 else
18560   echo "$ac_t""no" 1>&6
18561
18562                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18563 echo "configure:18564: checking for dbm_open in -ldbm" >&5
18564 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18565 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18566   echo $ac_n "(cached) $ac_c" 1>&6
18567 else
18568   ac_save_LIBS="$LIBS"
18569 LIBS="-ldbm  $LIBS"
18570 cat > conftest.$ac_ext <<EOF
18571 #line 18572 "configure"
18572 #include "confdefs.h"
18573 /* Override any gcc2 internal prototype to avoid an error.  */
18574 /* We use char because int might match the return type of a gcc2
18575     builtin and then its argument prototype would still apply.  */
18576 char dbm_open();
18577
18578 int main() {
18579 dbm_open()
18580 ; return 0; }
18581 EOF
18582 if { (eval echo configure:18583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18583   rm -rf conftest*
18584   eval "ac_cv_lib_$ac_lib_var=yes"
18585 else
18586   echo "configure: failed program was:" >&5
18587   cat conftest.$ac_ext >&5
18588   rm -rf conftest*
18589   eval "ac_cv_lib_$ac_lib_var=no"
18590 fi
18591 rm -f conftest*
18592 LIBS="$ac_save_LIBS"
18593
18594 fi
18595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18596   echo "$ac_t""yes" 1>&6
18597   ol_cv_lib_ndbm=-ldbm
18598 else
18599   echo "$ac_t""no" 1>&6
18600 ol_cv_lib_ndbm=no
18601 fi
18602                 
18603 fi
18604
18605         
18606 fi
18607
18608         LIBS="$ol_LIBS"
18609
18610 fi
18611
18612 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
18613
18614
18615  for ac_hdr in ndbm.h
18616 do
18617 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18618 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18619 echo "configure:18620: checking for $ac_hdr" >&5
18620 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18621   echo $ac_n "(cached) $ac_c" 1>&6
18622 else
18623   cat > conftest.$ac_ext <<EOF
18624 #line 18625 "configure"
18625 #include "confdefs.h"
18626 #include <$ac_hdr>
18627 EOF
18628 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18629 { (eval echo configure:18630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18630 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18631 if test -z "$ac_err"; then
18632   rm -rf conftest*
18633   eval "ac_cv_header_$ac_safe=yes"
18634 else
18635   echo "$ac_err" >&5
18636   echo "configure: failed program was:" >&5
18637   cat conftest.$ac_ext >&5
18638   rm -rf conftest*
18639   eval "ac_cv_header_$ac_safe=no"
18640 fi
18641 rm -f conftest*
18642 fi
18643 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18644   echo "$ac_t""yes" 1>&6
18645     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18646   cat >> confdefs.h <<EOF
18647 #define $ac_tr_hdr 1
18648 EOF
18649  
18650 else
18651   echo "$ac_t""no" 1>&6
18652 fi
18653 done
18654
18655  echo $ac_n "checking for db""... $ac_c" 1>&6
18656 echo "configure:18657: checking for db" >&5
18657 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
18658   echo $ac_n "(cached) $ac_c" 1>&6
18659 else
18660   
18661         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
18662                 ol_cv_ndbm=no
18663         else
18664                 ol_cv_ndbm=yes
18665         fi
18666
18667 fi
18668
18669 echo "$ac_t""$ol_cv_ndbm" 1>&6
18670  if test $ol_cv_ndbm = yes ; then
18671         cat >> confdefs.h <<\EOF
18672 #define HAVE_NDBM 1
18673 EOF
18674
18675  fi
18676
18677
18678         if test $ol_cv_ndbm = yes ; then
18679                 ol_link_ldbm=ndbm
18680                 ol_with_ldbm_api=ndbm
18681
18682                 if test $ol_cv_lib_ndbm != yes ; then
18683                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
18684                 fi
18685         fi
18686 fi
18687
18688 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
18689         echo "configure: warning: could not find suitable LDBM backend" 1>&2
18690         if test $ol_enable_ldbm = yes ; then
18691                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
18692         fi
18693
18694         echo "configure: warning: disabling LDBM" 1>&2
18695         ol_enable_ldbm=no
18696 fi
18697
18698 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
18699         BUILD_LIBS_DYNAMIC=shared
18700         cat >> confdefs.h <<\EOF
18701 #define LDAP_LIBS_DYNAMIC 1
18702 EOF
18703
18704 else
18705         BUILD_LIBS_DYNAMIC=static
18706 fi
18707
18708 if test $ol_enable_wrappers != no ; then
18709         for ac_hdr in tcpd.h
18710 do
18711 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18712 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18713 echo "configure:18714: checking for $ac_hdr" >&5
18714 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18715   echo $ac_n "(cached) $ac_c" 1>&6
18716 else
18717   cat > conftest.$ac_ext <<EOF
18718 #line 18719 "configure"
18719 #include "confdefs.h"
18720 #include <$ac_hdr>
18721 EOF
18722 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18723 { (eval echo configure:18724: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18724 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18725 if test -z "$ac_err"; then
18726   rm -rf conftest*
18727   eval "ac_cv_header_$ac_safe=yes"
18728 else
18729   echo "$ac_err" >&5
18730   echo "configure: failed program was:" >&5
18731   cat conftest.$ac_ext >&5
18732   rm -rf conftest*
18733   eval "ac_cv_header_$ac_safe=no"
18734 fi
18735 rm -f conftest*
18736 fi
18737 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18738   echo "$ac_t""yes" 1>&6
18739     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18740   cat >> confdefs.h <<EOF
18741 #define $ac_tr_hdr 1
18742 EOF
18743  
18744                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
18745 echo "configure:18746: checking for TCP wrappers library" >&5
18746                 save_LIBS="$LIBS"
18747                 LIBS="$LIBS -lwrap"
18748                 cat > conftest.$ac_ext <<EOF
18749 #line 18750 "configure"
18750 #include "confdefs.h"
18751
18752 #include <tcpd.h>
18753 int allow_severity = 0;
18754 int deny_severity  = 0;
18755
18756 struct request_info *req;
18757                 
18758 int main() {
18759
18760 hosts_access(req)
18761                 
18762 ; return 0; }
18763 EOF
18764 if { (eval echo configure:18765: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18765   rm -rf conftest*
18766   echo "$ac_t""-lwrap" 1>&6
18767                 have_wrappers=yes
18768                 LIBS="$save_LIBS"
18769 else
18770   echo "configure: failed program was:" >&5
18771   cat conftest.$ac_ext >&5
18772   rm -rf conftest*
18773   
18774                                 LIBS="$LIBS -lnsl"
18775                 cat > conftest.$ac_ext <<EOF
18776 #line 18777 "configure"
18777 #include "confdefs.h"
18778
18779 #include <tcpd.h>
18780 int allow_severity = 0;
18781 int deny_severity  = 0;
18782
18783 struct request_info *req;
18784                 
18785 int main() {
18786
18787 hosts_access(req)
18788                 
18789 ; return 0; }
18790 EOF
18791 if { (eval echo configure:18792: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18792   rm -rf conftest*
18793   echo "$ac_t""-lwrap -lnsl" 1>&6
18794                 have_wrappers=yes
18795                 LIBS="$save_LIBS -lnsl"
18796 else
18797   echo "configure: failed program was:" >&5
18798   cat conftest.$ac_ext >&5
18799   rm -rf conftest*
18800   
18801                 echo "$ac_t""no" 1>&6
18802                 have_wrappers=no
18803                 LIBS=$save_LIBS
18804 fi
18805 rm -f conftest*
18806 fi
18807 rm -f conftest*
18808 else
18809   echo "$ac_t""no" 1>&6
18810 have_wrappers=no
18811 fi
18812 done
18813
18814
18815         if test $have_wrappers = yes ; then
18816                 cat >> confdefs.h <<\EOF
18817 #define HAVE_TCPD 1
18818 EOF
18819
18820                 WRAP_LIBS="-lwrap"
18821         elif test $ol_enable_wrappers = yes ; then
18822                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
18823         else
18824                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
18825                 WRAP_LIBS=""
18826         fi
18827 fi
18828
18829 if test $ol_enable_syslog != no ; then
18830         echo $ac_n "checking for openlog""... $ac_c" 1>&6
18831 echo "configure:18832: checking for openlog" >&5
18832 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
18833   echo $ac_n "(cached) $ac_c" 1>&6
18834 else
18835   cat > conftest.$ac_ext <<EOF
18836 #line 18837 "configure"
18837 #include "confdefs.h"
18838 /* System header to define __stub macros and hopefully few prototypes,
18839     which can conflict with char openlog(); below.  */
18840 #include <assert.h>
18841 /* Override any gcc2 internal prototype to avoid an error.  */
18842 /* We use char because int might match the return type of a gcc2
18843     builtin and then its argument prototype would still apply.  */
18844 char openlog();
18845 char (*f)();
18846
18847 int main() {
18848
18849 /* The GNU C library defines this for functions which it implements
18850     to always fail with ENOSYS.  Some functions are actually named
18851     something starting with __ and the normal name is an alias.  */
18852 #if defined (__stub_openlog) || defined (__stub___openlog)
18853 choke me
18854 #else
18855 f = openlog;
18856 #endif
18857
18858 ; return 0; }
18859 EOF
18860 if { (eval echo configure:18861: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18861   rm -rf conftest*
18862   eval "ac_cv_func_openlog=yes"
18863 else
18864   echo "configure: failed program was:" >&5
18865   cat conftest.$ac_ext >&5
18866   rm -rf conftest*
18867   eval "ac_cv_func_openlog=no"
18868 fi
18869 rm -f conftest*
18870 fi
18871
18872 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
18873   echo "$ac_t""yes" 1>&6
18874   :
18875 else
18876   echo "$ac_t""no" 1>&6
18877 fi
18878
18879         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
18880                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
18881         fi
18882         ol_enable_syslog=$ac_cv_func_openlog
18883 fi
18884
18885
18886 ol_link_sql=no
18887 if test $ol_enable_sql != no ; then
18888         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
18889 echo "configure:18890: checking for SQLDriverConnect in -liodbc" >&5
18890 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
18891 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18892   echo $ac_n "(cached) $ac_c" 1>&6
18893 else
18894   ac_save_LIBS="$LIBS"
18895 LIBS="-liodbc  $LIBS"
18896 cat > conftest.$ac_ext <<EOF
18897 #line 18898 "configure"
18898 #include "confdefs.h"
18899 /* Override any gcc2 internal prototype to avoid an error.  */
18900 /* We use char because int might match the return type of a gcc2
18901     builtin and then its argument prototype would still apply.  */
18902 char SQLDriverConnect();
18903
18904 int main() {
18905 SQLDriverConnect()
18906 ; return 0; }
18907 EOF
18908 if { (eval echo configure:18909: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18909   rm -rf conftest*
18910   eval "ac_cv_lib_$ac_lib_var=yes"
18911 else
18912   echo "configure: failed program was:" >&5
18913   cat conftest.$ac_ext >&5
18914   rm -rf conftest*
18915   eval "ac_cv_lib_$ac_lib_var=no"
18916 fi
18917 rm -f conftest*
18918 LIBS="$ac_save_LIBS"
18919
18920 fi
18921 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18922   echo "$ac_t""yes" 1>&6
18923   have_iodbc=yes
18924 else
18925   echo "$ac_t""no" 1>&6
18926 have_iodbc=no
18927 fi
18928
18929         if test $have_iodbc = yes ; then
18930                 ol_link_sql="-liodbc"
18931         else
18932                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
18933 echo "configure:18934: checking for SQLDriverConnect in -lodbc" >&5
18934 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
18935 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18936   echo $ac_n "(cached) $ac_c" 1>&6
18937 else
18938   ac_save_LIBS="$LIBS"
18939 LIBS="-lodbc  $LIBS"
18940 cat > conftest.$ac_ext <<EOF
18941 #line 18942 "configure"
18942 #include "confdefs.h"
18943 /* Override any gcc2 internal prototype to avoid an error.  */
18944 /* We use char because int might match the return type of a gcc2
18945     builtin and then its argument prototype would still apply.  */
18946 char SQLDriverConnect();
18947
18948 int main() {
18949 SQLDriverConnect()
18950 ; return 0; }
18951 EOF
18952 if { (eval echo configure:18953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18953   rm -rf conftest*
18954   eval "ac_cv_lib_$ac_lib_var=yes"
18955 else
18956   echo "configure: failed program was:" >&5
18957   cat conftest.$ac_ext >&5
18958   rm -rf conftest*
18959   eval "ac_cv_lib_$ac_lib_var=no"
18960 fi
18961 rm -f conftest*
18962 LIBS="$ac_save_LIBS"
18963
18964 fi
18965 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18966   echo "$ac_t""yes" 1>&6
18967   have_odbc=yes
18968 else
18969   echo "$ac_t""no" 1>&6
18970 have_odbc=no
18971 fi
18972
18973                 if test $have_odbc = yes ; then
18974                         ol_link_sql="-lodbc"
18975                 fi
18976         fi
18977
18978         if test $ol_link_sql != no ; then
18979                 SLAPD_SQL_LIBS="$ol_link_sql"
18980
18981         elif test $ol_enable_sql != auto ; then
18982                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
18983         fi
18984 fi
18985
18986 if test $ol_enable_tcl != no ; then
18987         for ac_hdr in tcl.h
18988 do
18989 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18990 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18991 echo "configure:18992: checking for $ac_hdr" >&5
18992 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18993   echo $ac_n "(cached) $ac_c" 1>&6
18994 else
18995   cat > conftest.$ac_ext <<EOF
18996 #line 18997 "configure"
18997 #include "confdefs.h"
18998 #include <$ac_hdr>
18999 EOF
19000 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19001 { (eval echo configure:19002: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19002 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19003 if test -z "$ac_err"; then
19004   rm -rf conftest*
19005   eval "ac_cv_header_$ac_safe=yes"
19006 else
19007   echo "$ac_err" >&5
19008   echo "configure: failed program was:" >&5
19009   cat conftest.$ac_ext >&5
19010   rm -rf conftest*
19011   eval "ac_cv_header_$ac_safe=no"
19012 fi
19013 rm -f conftest*
19014 fi
19015 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19016   echo "$ac_t""yes" 1>&6
19017     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19018   cat >> confdefs.h <<EOF
19019 #define $ac_tr_hdr 1
19020 EOF
19021  
19022 else
19023   echo "$ac_t""no" 1>&6
19024 fi
19025 done
19026
19027
19028         if test $ac_cv_header_tcl_h != yes ; then
19029                 have_tcl=no
19030         else
19031                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19032                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19033 echo "configure:19034: checking for main in -l$lib" >&5
19034 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19035 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19036   echo $ac_n "(cached) $ac_c" 1>&6
19037 else
19038   ac_save_LIBS="$LIBS"
19039 LIBS="-l$lib  $LIBS"
19040 cat > conftest.$ac_ext <<EOF
19041 #line 19042 "configure"
19042 #include "confdefs.h"
19043
19044 int main() {
19045 main()
19046 ; return 0; }
19047 EOF
19048 if { (eval echo configure:19049: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19049   rm -rf conftest*
19050   eval "ac_cv_lib_$ac_lib_var=yes"
19051 else
19052   echo "configure: failed program was:" >&5
19053   cat conftest.$ac_ext >&5
19054   rm -rf conftest*
19055   eval "ac_cv_lib_$ac_lib_var=no"
19056 fi
19057 rm -f conftest*
19058 LIBS="$ac_save_LIBS"
19059
19060 fi
19061 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19062   echo "$ac_t""yes" 1>&6
19063   have_tcl=yes
19064                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19065                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19066                            else
19067                                         MOD_TCL_LIB="-l${lib}"
19068                            fi;break
19069 else
19070   echo "$ac_t""no" 1>&6
19071 have_tcl=no
19072 fi
19073
19074                 done
19075         fi
19076
19077         if test $have_tcl != yes ; then
19078                 echo "configure: warning: could not find -ltcl" 1>&2
19079                 if test $ol_enable_tcl = yes ; then
19080                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19081                 fi
19082
19083                 ol_enable_tcl=no
19084         fi
19085 fi
19086
19087 ol_link_termcap=no
19088 for ac_hdr in termcap.h ncurses.h
19089 do
19090 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19091 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19092 echo "configure:19093: checking for $ac_hdr" >&5
19093 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19094   echo $ac_n "(cached) $ac_c" 1>&6
19095 else
19096   cat > conftest.$ac_ext <<EOF
19097 #line 19098 "configure"
19098 #include "confdefs.h"
19099 #include <$ac_hdr>
19100 EOF
19101 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19102 { (eval echo configure:19103: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19103 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19104 if test -z "$ac_err"; then
19105   rm -rf conftest*
19106   eval "ac_cv_header_$ac_safe=yes"
19107 else
19108   echo "$ac_err" >&5
19109   echo "configure: failed program was:" >&5
19110   cat conftest.$ac_ext >&5
19111   rm -rf conftest*
19112   eval "ac_cv_header_$ac_safe=no"
19113 fi
19114 rm -f conftest*
19115 fi
19116 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19117   echo "$ac_t""yes" 1>&6
19118     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19119   cat >> confdefs.h <<EOF
19120 #define $ac_tr_hdr 1
19121 EOF
19122  
19123 else
19124   echo "$ac_t""no" 1>&6
19125 fi
19126 done
19127
19128
19129 if test $ol_link_termcap = no ; then
19130         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19131 echo "configure:19132: checking for tputs in -ltermcap" >&5
19132 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19133 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19134   echo $ac_n "(cached) $ac_c" 1>&6
19135 else
19136   ac_save_LIBS="$LIBS"
19137 LIBS="-ltermcap  $LIBS"
19138 cat > conftest.$ac_ext <<EOF
19139 #line 19140 "configure"
19140 #include "confdefs.h"
19141 /* Override any gcc2 internal prototype to avoid an error.  */
19142 /* We use char because int might match the return type of a gcc2
19143     builtin and then its argument prototype would still apply.  */
19144 char tputs();
19145
19146 int main() {
19147 tputs()
19148 ; return 0; }
19149 EOF
19150 if { (eval echo configure:19151: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19151   rm -rf conftest*
19152   eval "ac_cv_lib_$ac_lib_var=yes"
19153 else
19154   echo "configure: failed program was:" >&5
19155   cat conftest.$ac_ext >&5
19156   rm -rf conftest*
19157   eval "ac_cv_lib_$ac_lib_var=no"
19158 fi
19159 rm -f conftest*
19160 LIBS="$ac_save_LIBS"
19161
19162 fi
19163 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19164   echo "$ac_t""yes" 1>&6
19165   have_termcap=yes
19166 else
19167   echo "$ac_t""no" 1>&6
19168 have_termcap=no
19169 fi
19170
19171         if test $have_termcap = yes ; then
19172                 cat >> confdefs.h <<\EOF
19173 #define HAVE_TERMCAP 1
19174 EOF
19175
19176                 ol_link_termcap=yes
19177                 TERMCAP_LIBS=-ltermcap
19178         fi
19179 fi
19180
19181 if test $ol_link_termcap = no ; then
19182         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19183 echo "configure:19184: checking for initscr in -lncurses" >&5
19184 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19185 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19186   echo $ac_n "(cached) $ac_c" 1>&6
19187 else
19188   ac_save_LIBS="$LIBS"
19189 LIBS="-lncurses  $LIBS"
19190 cat > conftest.$ac_ext <<EOF
19191 #line 19192 "configure"
19192 #include "confdefs.h"
19193 /* Override any gcc2 internal prototype to avoid an error.  */
19194 /* We use char because int might match the return type of a gcc2
19195     builtin and then its argument prototype would still apply.  */
19196 char initscr();
19197
19198 int main() {
19199 initscr()
19200 ; return 0; }
19201 EOF
19202 if { (eval echo configure:19203: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19203   rm -rf conftest*
19204   eval "ac_cv_lib_$ac_lib_var=yes"
19205 else
19206   echo "configure: failed program was:" >&5
19207   cat conftest.$ac_ext >&5
19208   rm -rf conftest*
19209   eval "ac_cv_lib_$ac_lib_var=no"
19210 fi
19211 rm -f conftest*
19212 LIBS="$ac_save_LIBS"
19213
19214 fi
19215 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19216   echo "$ac_t""yes" 1>&6
19217   have_ncurses=yes
19218 else
19219   echo "$ac_t""no" 1>&6
19220 have_ncurses=no
19221 fi
19222
19223         if test $have_ncurses = yes ; then
19224                 cat >> confdefs.h <<\EOF
19225 #define HAVE_NCURSES 1
19226 EOF
19227
19228                 ol_link_termcap=yes
19229                 TERMCAP_LIBS=-lncurses
19230         fi
19231 fi
19232
19233 if test $ol_link_termcap = no ; then
19234         cat >> confdefs.h <<\EOF
19235 #define NO_TERMCAP 1
19236 EOF
19237
19238         TERMCAP_LIBS=
19239 fi
19240
19241 ol_link_sasl=no
19242 ol_link_spasswd=no
19243 if test $ol_with_cyrus_sasl != no ; then
19244         for ac_hdr in sasl.h
19245 do
19246 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19247 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19248 echo "configure:19249: checking for $ac_hdr" >&5
19249 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19250   echo $ac_n "(cached) $ac_c" 1>&6
19251 else
19252   cat > conftest.$ac_ext <<EOF
19253 #line 19254 "configure"
19254 #include "confdefs.h"
19255 #include <$ac_hdr>
19256 EOF
19257 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19258 { (eval echo configure:19259: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19259 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19260 if test -z "$ac_err"; then
19261   rm -rf conftest*
19262   eval "ac_cv_header_$ac_safe=yes"
19263 else
19264   echo "$ac_err" >&5
19265   echo "configure: failed program was:" >&5
19266   cat conftest.$ac_ext >&5
19267   rm -rf conftest*
19268   eval "ac_cv_header_$ac_safe=no"
19269 fi
19270 rm -f conftest*
19271 fi
19272 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19273   echo "$ac_t""yes" 1>&6
19274     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19275   cat >> confdefs.h <<EOF
19276 #define $ac_tr_hdr 1
19277 EOF
19278  
19279 else
19280   echo "$ac_t""no" 1>&6
19281 fi
19282 done
19283
19284
19285         if test $ac_cv_header_sasl_h ; then
19286                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19287 echo "configure:19288: checking for sasl_client_init in -lsasl2" >&5
19288 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19289 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19290   echo $ac_n "(cached) $ac_c" 1>&6
19291 else
19292   ac_save_LIBS="$LIBS"
19293 LIBS="-lsasl2  $LIBS"
19294 cat > conftest.$ac_ext <<EOF
19295 #line 19296 "configure"
19296 #include "confdefs.h"
19297 /* Override any gcc2 internal prototype to avoid an error.  */
19298 /* We use char because int might match the return type of a gcc2
19299     builtin and then its argument prototype would still apply.  */
19300 char sasl_client_init();
19301
19302 int main() {
19303 sasl_client_init()
19304 ; return 0; }
19305 EOF
19306 if { (eval echo configure:19307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19307   rm -rf conftest*
19308   eval "ac_cv_lib_$ac_lib_var=yes"
19309 else
19310   echo "configure: failed program was:" >&5
19311   cat conftest.$ac_ext >&5
19312   rm -rf conftest*
19313   eval "ac_cv_lib_$ac_lib_var=no"
19314 fi
19315 rm -f conftest*
19316 LIBS="$ac_save_LIBS"
19317
19318 fi
19319 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19320   echo "$ac_t""yes" 1>&6
19321   ol_link_sasl="-lsasl2"
19322 else
19323   echo "$ac_t""no" 1>&6
19324 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19325 echo "configure:19326: checking for sasl_client_init in -lsasl" >&5
19326 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19327 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19328   echo $ac_n "(cached) $ac_c" 1>&6
19329 else
19330   ac_save_LIBS="$LIBS"
19331 LIBS="-lsasl  $LIBS"
19332 cat > conftest.$ac_ext <<EOF
19333 #line 19334 "configure"
19334 #include "confdefs.h"
19335 /* Override any gcc2 internal prototype to avoid an error.  */
19336 /* We use char because int might match the return type of a gcc2
19337     builtin and then its argument prototype would still apply.  */
19338 char sasl_client_init();
19339
19340 int main() {
19341 sasl_client_init()
19342 ; return 0; }
19343 EOF
19344 if { (eval echo configure:19345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19345   rm -rf conftest*
19346   eval "ac_cv_lib_$ac_lib_var=yes"
19347 else
19348   echo "configure: failed program was:" >&5
19349   cat conftest.$ac_ext >&5
19350   rm -rf conftest*
19351   eval "ac_cv_lib_$ac_lib_var=no"
19352 fi
19353 rm -f conftest*
19354 LIBS="$ac_save_LIBS"
19355
19356 fi
19357 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19358   echo "$ac_t""yes" 1>&6
19359   ol_link_sasl="-lsasl"
19360 else
19361   echo "$ac_t""no" 1>&6
19362 fi
19363
19364 fi
19365
19366         fi
19367
19368         if test $ol_link_sasl = no ; then
19369                 if test $ol_with_cyrus_sasl != auto ; then
19370                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19371                 else
19372                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19373                         echo "configure: warning: SASL authentication not supported!" 1>&2
19374                         if test $ol_link_tls = no ; then
19375                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19376                         fi
19377                 fi
19378         else
19379                 cat >> confdefs.h <<\EOF
19380 #define HAVE_CYRUS_SASL 1
19381 EOF
19382
19383                 SASL_LIBS="$ol_link_sasl"
19384                 if test $ol_enable_spasswd != no ; then
19385                         ol_link_spasswd=yes
19386                 fi
19387         fi
19388
19389 else
19390         echo "configure: warning: SASL authentication not supported!" 1>&2
19391         if test $ol_link_tls = no ; then
19392                 echo "configure: warning: Strong authentication not supported!" 1>&2
19393         fi
19394 fi
19395
19396 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19397         dev=no
19398         if test -r /dev/urandom ; then
19399                 dev="/dev/urandom";
19400         elif test -r /idev/urandom ; then
19401                 dev="/idev/urandom";
19402         elif test -r /dev/srandom ; then
19403                 dev="/dev/srandom";
19404         elif test -r /dev/random ; then
19405                 dev="/dev/random";
19406         elif test -r /idev/random ; then
19407                 dev="/idev/random";
19408         fi
19409
19410         if test $dev != no ; then
19411                 cat >> confdefs.h <<EOF
19412 #define URANDOM_DEVICE "$dev"
19413 EOF
19414
19415         fi
19416 fi
19417
19418 ol_link_fetch=no
19419 if test $ol_with_fetch != no ; then
19420         ol_LIBS=$LIBS
19421 LIBS="-lfetch -lcom_err $LIBS"
19422 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19423 echo "configure:19424: checking fetch(3) library" >&5
19424 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19425   echo $ac_n "(cached) $ac_c" 1>&6
19426 else
19427   
19428         cat > conftest.$ac_ext <<EOF
19429 #line 19430 "configure"
19430 #include "confdefs.h"
19431
19432 #include <sys/param.h>
19433 #include <stdio.h>
19434 #include <fetch.h>
19435 int main() {
19436 struct url *u = fetchParseURL("file:///"); 
19437 ; return 0; }
19438 EOF
19439 if { (eval echo configure:19440: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19440   rm -rf conftest*
19441   ol_cv_lib_fetch=yes
19442 else
19443   echo "configure: failed program was:" >&5
19444   cat conftest.$ac_ext >&5
19445   rm -rf conftest*
19446   ol_cv_lib_fetch=no
19447 fi
19448 rm -f conftest*
19449 fi
19450
19451 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19452 LIBS=$ol_LIBS
19453 if test $ol_cv_lib_fetch != no ; then
19454         ol_link_fetch="-lfetch -lcom_err"
19455         cat >> confdefs.h <<\EOF
19456 #define HAVE_FETCH 1
19457 EOF
19458
19459 fi
19460
19461
19462         if test $ol_cv_lib_fetch != no ; then
19463                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19464                 ol_link_fetch=freebsd
19465
19466         elif test $ol_with_fetch != auto ; then
19467                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19468         fi 
19469 fi
19470
19471 ol_link_readline=no
19472 if test $ol_with_readline != no ; then
19473         for ac_hdr in readline/readline.h readline/history.h
19474 do
19475 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19476 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19477 echo "configure:19478: checking for $ac_hdr" >&5
19478 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19479   echo $ac_n "(cached) $ac_c" 1>&6
19480 else
19481   cat > conftest.$ac_ext <<EOF
19482 #line 19483 "configure"
19483 #include "confdefs.h"
19484 #include <$ac_hdr>
19485 EOF
19486 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19487 { (eval echo configure:19488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19488 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19489 if test -z "$ac_err"; then
19490   rm -rf conftest*
19491   eval "ac_cv_header_$ac_safe=yes"
19492 else
19493   echo "$ac_err" >&5
19494   echo "configure: failed program was:" >&5
19495   cat conftest.$ac_ext >&5
19496   rm -rf conftest*
19497   eval "ac_cv_header_$ac_safe=no"
19498 fi
19499 rm -f conftest*
19500 fi
19501 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19502   echo "$ac_t""yes" 1>&6
19503     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19504   cat >> confdefs.h <<EOF
19505 #define $ac_tr_hdr 1
19506 EOF
19507  
19508 else
19509   echo "$ac_t""no" 1>&6
19510 fi
19511 done
19512
19513
19514         if test $ac_cv_header_readline_readline_h = yes ; then
19515                 save_LIBS="$LIBS"
19516                 LIBS="$TERMCAP_LIBS $LIBS"
19517                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
19518 echo "configure:19519: checking for readline in -lreadline" >&5
19519 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
19520 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19521   echo $ac_n "(cached) $ac_c" 1>&6
19522 else
19523   ac_save_LIBS="$LIBS"
19524 LIBS="-lreadline  $LIBS"
19525 cat > conftest.$ac_ext <<EOF
19526 #line 19527 "configure"
19527 #include "confdefs.h"
19528 /* Override any gcc2 internal prototype to avoid an error.  */
19529 /* We use char because int might match the return type of a gcc2
19530     builtin and then its argument prototype would still apply.  */
19531 char readline();
19532
19533 int main() {
19534 readline()
19535 ; return 0; }
19536 EOF
19537 if { (eval echo configure:19538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19538   rm -rf conftest*
19539   eval "ac_cv_lib_$ac_lib_var=yes"
19540 else
19541   echo "configure: failed program was:" >&5
19542   cat conftest.$ac_ext >&5
19543   rm -rf conftest*
19544   eval "ac_cv_lib_$ac_lib_var=no"
19545 fi
19546 rm -f conftest*
19547 LIBS="$ac_save_LIBS"
19548
19549 fi
19550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19551   echo "$ac_t""yes" 1>&6
19552   have_readline=yes
19553 else
19554   echo "$ac_t""no" 1>&6
19555 have_readline=no
19556 fi
19557
19558                 LIBS="$save_LIBS"
19559                         
19560                 if test $have_readline = yes ; then
19561                         ol_with_readline=found
19562                         ol_link_readline=yes
19563
19564                         READLINE_LIBS="-lreadline"
19565                 fi
19566         fi
19567 fi
19568
19569 if test $ol_link_readline = yes ; then
19570         cat >> confdefs.h <<\EOF
19571 #define HAVE_READLINE 1
19572 EOF
19573
19574 fi
19575
19576
19577 if test $ol_enable_crypt != no ; then
19578         echo $ac_n "checking for crypt""... $ac_c" 1>&6
19579 echo "configure:19580: checking for crypt" >&5
19580 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
19581   echo $ac_n "(cached) $ac_c" 1>&6
19582 else
19583   cat > conftest.$ac_ext <<EOF
19584 #line 19585 "configure"
19585 #include "confdefs.h"
19586 /* System header to define __stub macros and hopefully few prototypes,
19587     which can conflict with char crypt(); below.  */
19588 #include <assert.h>
19589 /* Override any gcc2 internal prototype to avoid an error.  */
19590 /* We use char because int might match the return type of a gcc2
19591     builtin and then its argument prototype would still apply.  */
19592 char crypt();
19593 char (*f)();
19594
19595 int main() {
19596
19597 /* The GNU C library defines this for functions which it implements
19598     to always fail with ENOSYS.  Some functions are actually named
19599     something starting with __ and the normal name is an alias.  */
19600 #if defined (__stub_crypt) || defined (__stub___crypt)
19601 choke me
19602 #else
19603 f = crypt;
19604 #endif
19605
19606 ; return 0; }
19607 EOF
19608 if { (eval echo configure:19609: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19609   rm -rf conftest*
19610   eval "ac_cv_func_crypt=yes"
19611 else
19612   echo "configure: failed program was:" >&5
19613   cat conftest.$ac_ext >&5
19614   rm -rf conftest*
19615   eval "ac_cv_func_crypt=no"
19616 fi
19617 rm -f conftest*
19618 fi
19619
19620 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
19621   echo "$ac_t""yes" 1>&6
19622   have_crypt=yes
19623 else
19624   echo "$ac_t""no" 1>&6
19625
19626                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
19627 echo "configure:19628: checking for crypt in -lcrypt" >&5
19628 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
19629 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19630   echo $ac_n "(cached) $ac_c" 1>&6
19631 else
19632   ac_save_LIBS="$LIBS"
19633 LIBS="-lcrypt  $LIBS"
19634 cat > conftest.$ac_ext <<EOF
19635 #line 19636 "configure"
19636 #include "confdefs.h"
19637 /* Override any gcc2 internal prototype to avoid an error.  */
19638 /* We use char because int might match the return type of a gcc2
19639     builtin and then its argument prototype would still apply.  */
19640 char crypt();
19641
19642 int main() {
19643 crypt()
19644 ; return 0; }
19645 EOF
19646 if { (eval echo configure:19647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19647   rm -rf conftest*
19648   eval "ac_cv_lib_$ac_lib_var=yes"
19649 else
19650   echo "configure: failed program was:" >&5
19651   cat conftest.$ac_ext >&5
19652   rm -rf conftest*
19653   eval "ac_cv_lib_$ac_lib_var=no"
19654 fi
19655 rm -f conftest*
19656 LIBS="$ac_save_LIBS"
19657
19658 fi
19659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19660   echo "$ac_t""yes" 1>&6
19661   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
19662                         have_crypt=yes
19663 else
19664   echo "$ac_t""no" 1>&6
19665 have_crypt=no
19666 fi
19667
19668 fi
19669
19670
19671         if test $have_crypt = yes ; then
19672                 cat >> confdefs.h <<\EOF
19673 #define HAVE_CRYPT 1
19674 EOF
19675
19676         else
19677                 echo "configure: warning: could not find crypt" 1>&2
19678                 if test $ol_enable_crypt = yes ; then
19679                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
19680                 fi
19681
19682                 echo "configure: warning: disabling crypt support" 1>&2
19683                 ol_enable_crypt=no
19684         fi
19685 fi
19686
19687 if test $ol_enable_proctitle != no ; then
19688         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
19689 echo "configure:19690: checking for setproctitle" >&5
19690 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
19691   echo $ac_n "(cached) $ac_c" 1>&6
19692 else
19693   cat > conftest.$ac_ext <<EOF
19694 #line 19695 "configure"
19695 #include "confdefs.h"
19696 /* System header to define __stub macros and hopefully few prototypes,
19697     which can conflict with char setproctitle(); below.  */
19698 #include <assert.h>
19699 /* Override any gcc2 internal prototype to avoid an error.  */
19700 /* We use char because int might match the return type of a gcc2
19701     builtin and then its argument prototype would still apply.  */
19702 char setproctitle();
19703 char (*f)();
19704
19705 int main() {
19706
19707 /* The GNU C library defines this for functions which it implements
19708     to always fail with ENOSYS.  Some functions are actually named
19709     something starting with __ and the normal name is an alias.  */
19710 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
19711 choke me
19712 #else
19713 f = setproctitle;
19714 #endif
19715
19716 ; return 0; }
19717 EOF
19718 if { (eval echo configure:19719: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19719   rm -rf conftest*
19720   eval "ac_cv_func_setproctitle=yes"
19721 else
19722   echo "configure: failed program was:" >&5
19723   cat conftest.$ac_ext >&5
19724   rm -rf conftest*
19725   eval "ac_cv_func_setproctitle=no"
19726 fi
19727 rm -f conftest*
19728 fi
19729
19730 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
19731   echo "$ac_t""yes" 1>&6
19732   have_setproctitle=yes
19733 else
19734   echo "$ac_t""no" 1>&6
19735
19736                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
19737 echo "configure:19738: checking for setproctitle in -lutil" >&5
19738 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
19739 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19740   echo $ac_n "(cached) $ac_c" 1>&6
19741 else
19742   ac_save_LIBS="$LIBS"
19743 LIBS="-lutil  $LIBS"
19744 cat > conftest.$ac_ext <<EOF
19745 #line 19746 "configure"
19746 #include "confdefs.h"
19747 /* Override any gcc2 internal prototype to avoid an error.  */
19748 /* We use char because int might match the return type of a gcc2
19749     builtin and then its argument prototype would still apply.  */
19750 char setproctitle();
19751
19752 int main() {
19753 setproctitle()
19754 ; return 0; }
19755 EOF
19756 if { (eval echo configure:19757: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19757   rm -rf conftest*
19758   eval "ac_cv_lib_$ac_lib_var=yes"
19759 else
19760   echo "configure: failed program was:" >&5
19761   cat conftest.$ac_ext >&5
19762   rm -rf conftest*
19763   eval "ac_cv_lib_$ac_lib_var=no"
19764 fi
19765 rm -f conftest*
19766 LIBS="$ac_save_LIBS"
19767
19768 fi
19769 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19770   echo "$ac_t""yes" 1>&6
19771   have_setproctitle=yes
19772                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
19773 else
19774   echo "$ac_t""no" 1>&6
19775 have_setproctitle=no
19776                         LIBOBJS="$LIBOBJS setproctitle.o"
19777                         LIBSRCS="$LIBSRCS setproctitle.c"
19778 fi
19779
19780 fi
19781
19782
19783         if test $have_setproctitle = yes ; then
19784                 cat >> confdefs.h <<\EOF
19785 #define HAVE_SETPROCTITLE 1
19786 EOF
19787
19788         fi
19789 fi
19790
19791 if test $ol_enable_slp != no ; then
19792         for ac_hdr in slp.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 $ac_cv_header_slp_h = yes ; then
19834                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
19835 echo "configure:19836: checking for SLPOpen in -lslp" >&5
19836 ac_lib_var=`echo slp'_'SLPOpen | 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="-lslp  $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 SLPOpen();
19849
19850 int main() {
19851 SLPOpen()
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_slp=yes
19870 else
19871   echo "$ac_t""no" 1>&6
19872 have_slp=no
19873 fi
19874
19875                 if test $have_slp = yes ; then
19876                         cat >> confdefs.h <<\EOF
19877 #define HAVE_SLP 1
19878 EOF
19879
19880                         SLAPD_SLP_LIBS=-lslp
19881                 fi
19882
19883         elif test $ol_enable_slp = yes ; then
19884                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
19885         fi
19886 fi
19887
19888 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
19889 echo "configure:19890: checking for ANSI C header files" >&5
19890 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
19891   echo $ac_n "(cached) $ac_c" 1>&6
19892 else
19893   cat > conftest.$ac_ext <<EOF
19894 #line 19895 "configure"
19895 #include "confdefs.h"
19896 #include <stdlib.h>
19897 #include <stdarg.h>
19898 #include <string.h>
19899 #include <float.h>
19900 EOF
19901 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19902 { (eval echo configure:19903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19903 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19904 if test -z "$ac_err"; then
19905   rm -rf conftest*
19906   ac_cv_header_stdc=yes
19907 else
19908   echo "$ac_err" >&5
19909   echo "configure: failed program was:" >&5
19910   cat conftest.$ac_ext >&5
19911   rm -rf conftest*
19912   ac_cv_header_stdc=no
19913 fi
19914 rm -f conftest*
19915
19916 if test $ac_cv_header_stdc = yes; then
19917   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
19918 cat > conftest.$ac_ext <<EOF
19919 #line 19920 "configure"
19920 #include "confdefs.h"
19921 #include <string.h>
19922 EOF
19923 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19924   egrep "memchr" >/dev/null 2>&1; then
19925   :
19926 else
19927   rm -rf conftest*
19928   ac_cv_header_stdc=no
19929 fi
19930 rm -f conftest*
19931
19932 fi
19933
19934 if test $ac_cv_header_stdc = yes; then
19935   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
19936 cat > conftest.$ac_ext <<EOF
19937 #line 19938 "configure"
19938 #include "confdefs.h"
19939 #include <stdlib.h>
19940 EOF
19941 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19942   egrep "free" >/dev/null 2>&1; then
19943   :
19944 else
19945   rm -rf conftest*
19946   ac_cv_header_stdc=no
19947 fi
19948 rm -f conftest*
19949
19950 fi
19951
19952 if test $ac_cv_header_stdc = yes; then
19953   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
19954 if test "$cross_compiling" = yes; then
19955   :
19956 else
19957   cat > conftest.$ac_ext <<EOF
19958 #line 19959 "configure"
19959 #include "confdefs.h"
19960 #include <ctype.h>
19961 #if ((' ' & 0x0FF) == 0x020)
19962 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
19963 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
19964 #else
19965 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
19966  || ('j' <= (c) && (c) <= 'r') \
19967  || ('s' <= (c) && (c) <= 'z'))
19968 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
19969 #endif
19970 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
19971 int main () { int i; for (i = 0; i < 256; i++)
19972 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
19973 exit (0); }
19974
19975 EOF
19976 if { (eval echo configure:19977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
19977 then
19978   :
19979 else
19980   echo "configure: failed program was:" >&5
19981   cat conftest.$ac_ext >&5
19982   rm -fr conftest*
19983   ac_cv_header_stdc=no
19984 fi
19985 rm -fr conftest*
19986 fi
19987
19988 fi
19989 fi
19990
19991 echo "$ac_t""$ac_cv_header_stdc" 1>&6
19992 if test $ac_cv_header_stdc = yes; then
19993   cat >> confdefs.h <<\EOF
19994 #define STDC_HEADERS 1
19995 EOF
19996
19997 fi
19998
19999 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20000 echo "configure:20001: checking for mode_t" >&5
20001 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20002   echo $ac_n "(cached) $ac_c" 1>&6
20003 else
20004   cat > conftest.$ac_ext <<EOF
20005 #line 20006 "configure"
20006 #include "confdefs.h"
20007 #include <sys/types.h>
20008 #if STDC_HEADERS
20009 #include <stdlib.h>
20010 #include <stddef.h>
20011 #endif
20012
20013 EOF
20014 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20015   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20016   rm -rf conftest*
20017   eval "ac_cv_type_mode_t=yes"
20018 else
20019   rm -rf conftest*
20020   eval "ac_cv_type_mode_t=no"
20021 fi
20022 rm -f conftest*
20023
20024 fi
20025 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20026   echo "$ac_t""yes" 1>&6
20027 else
20028   echo "$ac_t""no" 1>&6
20029   cat >> confdefs.h <<EOF
20030 #define mode_t int
20031 EOF
20032
20033 fi
20034
20035 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20036 echo "configure:20037: checking for off_t" >&5
20037 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20038   echo $ac_n "(cached) $ac_c" 1>&6
20039 else
20040   cat > conftest.$ac_ext <<EOF
20041 #line 20042 "configure"
20042 #include "confdefs.h"
20043 #include <sys/types.h>
20044 #if STDC_HEADERS
20045 #include <stdlib.h>
20046 #include <stddef.h>
20047 #endif
20048
20049 EOF
20050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20051   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20052   rm -rf conftest*
20053   eval "ac_cv_type_off_t=yes"
20054 else
20055   rm -rf conftest*
20056   eval "ac_cv_type_off_t=no"
20057 fi
20058 rm -f conftest*
20059
20060 fi
20061 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20062   echo "$ac_t""yes" 1>&6
20063 else
20064   echo "$ac_t""no" 1>&6
20065   cat >> confdefs.h <<EOF
20066 #define off_t long
20067 EOF
20068
20069 fi
20070
20071 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20072 echo "configure:20073: checking for pid_t" >&5
20073 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20074   echo $ac_n "(cached) $ac_c" 1>&6
20075 else
20076   cat > conftest.$ac_ext <<EOF
20077 #line 20078 "configure"
20078 #include "confdefs.h"
20079 #include <sys/types.h>
20080 #if STDC_HEADERS
20081 #include <stdlib.h>
20082 #include <stddef.h>
20083 #endif
20084
20085 EOF
20086 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20087   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20088   rm -rf conftest*
20089   eval "ac_cv_type_pid_t=yes"
20090 else
20091   rm -rf conftest*
20092   eval "ac_cv_type_pid_t=no"
20093 fi
20094 rm -f conftest*
20095
20096 fi
20097 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20098   echo "$ac_t""yes" 1>&6
20099 else
20100   echo "$ac_t""no" 1>&6
20101   cat >> confdefs.h <<EOF
20102 #define pid_t int
20103 EOF
20104
20105 fi
20106
20107 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20108 echo "configure:20109: checking for ptrdiff_t" >&5
20109 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20110   echo $ac_n "(cached) $ac_c" 1>&6
20111 else
20112   cat > conftest.$ac_ext <<EOF
20113 #line 20114 "configure"
20114 #include "confdefs.h"
20115 #include <stddef.h>
20116 int main() {
20117 ptrdiff_t p
20118 ; return 0; }
20119 EOF
20120 if { (eval echo configure:20121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20121   rm -rf conftest*
20122   am_cv_type_ptrdiff_t=yes
20123 else
20124   echo "configure: failed program was:" >&5
20125   cat conftest.$ac_ext >&5
20126   rm -rf conftest*
20127   am_cv_type_ptrdiff_t=no
20128 fi
20129 rm -f conftest*
20130 fi
20131
20132 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20133    if test $am_cv_type_ptrdiff_t = yes; then
20134      cat >> confdefs.h <<\EOF
20135 #define HAVE_PTRDIFF_T 1
20136 EOF
20137
20138    fi
20139
20140 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20141 echo "configure:20142: checking return type of signal handlers" >&5
20142 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20143   echo $ac_n "(cached) $ac_c" 1>&6
20144 else
20145   cat > conftest.$ac_ext <<EOF
20146 #line 20147 "configure"
20147 #include "confdefs.h"
20148 #include <sys/types.h>
20149 #include <signal.h>
20150 #ifdef signal
20151 #undef signal
20152 #endif
20153 #ifdef __cplusplus
20154 extern "C" void (*signal (int, void (*)(int)))(int);
20155 #else
20156 void (*signal ()) ();
20157 #endif
20158
20159 int main() {
20160 int i;
20161 ; return 0; }
20162 EOF
20163 if { (eval echo configure:20164: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20164   rm -rf conftest*
20165   ac_cv_type_signal=void
20166 else
20167   echo "configure: failed program was:" >&5
20168   cat conftest.$ac_ext >&5
20169   rm -rf conftest*
20170   ac_cv_type_signal=int
20171 fi
20172 rm -f conftest*
20173 fi
20174
20175 echo "$ac_t""$ac_cv_type_signal" 1>&6
20176 cat >> confdefs.h <<EOF
20177 #define RETSIGTYPE $ac_cv_type_signal
20178 EOF
20179
20180
20181 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20182 echo "configure:20183: checking for size_t" >&5
20183 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20184   echo $ac_n "(cached) $ac_c" 1>&6
20185 else
20186   cat > conftest.$ac_ext <<EOF
20187 #line 20188 "configure"
20188 #include "confdefs.h"
20189 #include <sys/types.h>
20190 #if STDC_HEADERS
20191 #include <stdlib.h>
20192 #include <stddef.h>
20193 #endif
20194
20195 EOF
20196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20197   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20198   rm -rf conftest*
20199   eval "ac_cv_type_size_t=yes"
20200 else
20201   rm -rf conftest*
20202   eval "ac_cv_type_size_t=no"
20203 fi
20204 rm -f conftest*
20205
20206 fi
20207 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20208   echo "$ac_t""yes" 1>&6
20209 else
20210   echo "$ac_t""no" 1>&6
20211   cat >> confdefs.h <<EOF
20212 #define size_t unsigned
20213 EOF
20214
20215 fi
20216
20217
20218 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20219 echo "configure:20220: checking for ssize_t" >&5
20220 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20221   echo $ac_n "(cached) $ac_c" 1>&6
20222 else
20223   cat > conftest.$ac_ext <<EOF
20224 #line 20225 "configure"
20225 #include "confdefs.h"
20226 #include <sys/types.h>
20227 #if STDC_HEADERS
20228 #include <stdlib.h>
20229 #include <stddef.h>
20230 #endif
20231
20232 EOF
20233 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20234   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20235   rm -rf conftest*
20236   eval "ac_cv_type_ssize_t=yes"
20237 else
20238   rm -rf conftest*
20239   eval "ac_cv_type_ssize_t=no"
20240 fi
20241 rm -f conftest*
20242
20243 fi
20244 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20245   echo "$ac_t""yes" 1>&6
20246 else
20247   echo "$ac_t""no" 1>&6
20248   cat >> confdefs.h <<EOF
20249 #define ssize_t signed int
20250 EOF
20251
20252 fi
20253
20254 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20255 echo "configure:20256: checking for caddr_t" >&5
20256 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20257   echo $ac_n "(cached) $ac_c" 1>&6
20258 else
20259   cat > conftest.$ac_ext <<EOF
20260 #line 20261 "configure"
20261 #include "confdefs.h"
20262 #include <sys/types.h>
20263 #if STDC_HEADERS
20264 #include <stdlib.h>
20265 #include <stddef.h>
20266 #endif
20267
20268 EOF
20269 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20270   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20271   rm -rf conftest*
20272   eval "ac_cv_type_caddr_t=yes"
20273 else
20274   rm -rf conftest*
20275   eval "ac_cv_type_caddr_t=no"
20276 fi
20277 rm -f conftest*
20278
20279 fi
20280 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20281   echo "$ac_t""yes" 1>&6
20282 else
20283   echo "$ac_t""no" 1>&6
20284   cat >> confdefs.h <<EOF
20285 #define caddr_t char *
20286 EOF
20287
20288 fi
20289
20290
20291 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20292 echo "configure:20293: checking for socklen_t" >&5
20293 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20294   echo $ac_n "(cached) $ac_c" 1>&6
20295 else
20296   cat > conftest.$ac_ext <<EOF
20297 #line 20298 "configure"
20298 #include "confdefs.h"
20299
20300 #ifdef HAVE_SYS_TYPES_H
20301 #include <sys/types.h>
20302 #endif
20303 #ifdef HAVE_SYS_SOCKET_H
20304 #include <sys/socket.h>
20305 #endif
20306
20307 int main() {
20308 socklen_t len;
20309 ; return 0; }
20310 EOF
20311 if { (eval echo configure:20312: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20312   rm -rf conftest*
20313   ol_cv_type_socklen_t=yes
20314 else
20315   echo "configure: failed program was:" >&5
20316   cat conftest.$ac_ext >&5
20317   rm -rf conftest*
20318   ol_cv_type_socklen_t=no
20319 fi
20320 rm -f conftest*
20321 fi
20322
20323 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20324   if test $ol_cv_type_socklen_t = no; then
20325     cat >> confdefs.h <<\EOF
20326 #define socklen_t int
20327 EOF
20328
20329   fi
20330  
20331 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20332 echo "configure:20333: checking for member st_blksize in aggregate type struct stat" >&5
20333 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20334   echo $ac_n "(cached) $ac_c" 1>&6
20335 else
20336   cat > conftest.$ac_ext <<EOF
20337 #line 20338 "configure"
20338 #include "confdefs.h"
20339 #include <sys/types.h>
20340 #include <sys/stat.h>
20341 int main() {
20342 struct stat foo; foo.st_blksize;
20343 ; return 0; }
20344 EOF
20345 if { (eval echo configure:20346: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20346   rm -rf conftest*
20347   ac_cv_c_struct_member_st_blksize=yes
20348 else
20349   echo "configure: failed program was:" >&5
20350   cat conftest.$ac_ext >&5
20351   rm -rf conftest*
20352   ac_cv_c_struct_member_st_blksize=no
20353 fi
20354 rm -f conftest*
20355 fi
20356
20357 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20358 st_blksize="$ac_cv_c_struct_member_st_blksize"
20359 if test $ac_cv_c_struct_member_st_blksize = yes; then
20360   cat >> confdefs.h <<\EOF
20361 #define HAVE_ST_BLKSIZE 1
20362 EOF
20363
20364 fi
20365
20366 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20367 echo "configure:20368: checking whether time.h and sys/time.h may both be included" >&5
20368 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20369   echo $ac_n "(cached) $ac_c" 1>&6
20370 else
20371   cat > conftest.$ac_ext <<EOF
20372 #line 20373 "configure"
20373 #include "confdefs.h"
20374 #include <sys/types.h>
20375 #include <sys/time.h>
20376 #include <time.h>
20377 int main() {
20378 struct tm *tp;
20379 ; return 0; }
20380 EOF
20381 if { (eval echo configure:20382: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20382   rm -rf conftest*
20383   ac_cv_header_time=yes
20384 else
20385   echo "configure: failed program was:" >&5
20386   cat conftest.$ac_ext >&5
20387   rm -rf conftest*
20388   ac_cv_header_time=no
20389 fi
20390 rm -f conftest*
20391 fi
20392
20393 echo "$ac_t""$ac_cv_header_time" 1>&6
20394 if test $ac_cv_header_time = yes; then
20395   cat >> confdefs.h <<\EOF
20396 #define TIME_WITH_SYS_TIME 1
20397 EOF
20398
20399 fi
20400
20401 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20402 echo "configure:20403: checking whether struct tm is in sys/time.h or time.h" >&5
20403 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20404   echo $ac_n "(cached) $ac_c" 1>&6
20405 else
20406   cat > conftest.$ac_ext <<EOF
20407 #line 20408 "configure"
20408 #include "confdefs.h"
20409 #include <sys/types.h>
20410 #include <time.h>
20411 int main() {
20412 struct tm *tp; tp->tm_sec;
20413 ; return 0; }
20414 EOF
20415 if { (eval echo configure:20416: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20416   rm -rf conftest*
20417   ac_cv_struct_tm=time.h
20418 else
20419   echo "configure: failed program was:" >&5
20420   cat conftest.$ac_ext >&5
20421   rm -rf conftest*
20422   ac_cv_struct_tm=sys/time.h
20423 fi
20424 rm -f conftest*
20425 fi
20426
20427 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20428 if test $ac_cv_struct_tm = sys/time.h; then
20429   cat >> confdefs.h <<\EOF
20430 #define TM_IN_SYS_TIME 1
20431 EOF
20432
20433 fi
20434
20435 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20436 echo "configure:20437: checking for uid_t in sys/types.h" >&5
20437 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
20438   echo $ac_n "(cached) $ac_c" 1>&6
20439 else
20440   cat > conftest.$ac_ext <<EOF
20441 #line 20442 "configure"
20442 #include "confdefs.h"
20443 #include <sys/types.h>
20444 EOF
20445 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20446   egrep "uid_t" >/dev/null 2>&1; then
20447   rm -rf conftest*
20448   ac_cv_type_uid_t=yes
20449 else
20450   rm -rf conftest*
20451   ac_cv_type_uid_t=no
20452 fi
20453 rm -f conftest*
20454
20455 fi
20456
20457 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20458 if test $ac_cv_type_uid_t = no; then
20459   cat >> confdefs.h <<\EOF
20460 #define uid_t int
20461 EOF
20462
20463   cat >> confdefs.h <<\EOF
20464 #define gid_t int
20465 EOF
20466
20467 fi
20468
20469 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20470 echo "configure:20471: checking for sig_atomic_t" >&5
20471 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20472   echo $ac_n "(cached) $ac_c" 1>&6
20473 else
20474   cat > conftest.$ac_ext <<EOF
20475 #line 20476 "configure"
20476 #include "confdefs.h"
20477 #include <signal.h>
20478 int main() {
20479 sig_atomic_t atomic;
20480 ; return 0; }
20481 EOF
20482 if { (eval echo configure:20483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20483   rm -rf conftest*
20484   ol_cv_type_sig_atomic_t=yes
20485 else
20486   echo "configure: failed program was:" >&5
20487   cat conftest.$ac_ext >&5
20488   rm -rf conftest*
20489   ol_cv_type_sig_atomic_t=no
20490 fi
20491 rm -f conftest*
20492 fi
20493
20494 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20495   if test $ol_cv_type_sig_atomic_t = no; then
20496     cat >> confdefs.h <<\EOF
20497 #define sig_atomic_t int
20498 EOF
20499
20500   fi
20501  
20502
20503
20504 # test for pw_gecos in struct passwd
20505 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
20506 echo "configure:20507: checking struct passwd for pw_gecos" >&5
20507 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
20508   echo $ac_n "(cached) $ac_c" 1>&6
20509 else
20510   
20511         cat > conftest.$ac_ext <<EOF
20512 #line 20513 "configure"
20513 #include "confdefs.h"
20514 #include <pwd.h>
20515 int main() {
20516
20517         struct passwd pwd;
20518         pwd.pw_gecos = pwd.pw_name;
20519
20520 ; return 0; }
20521 EOF
20522 if { (eval echo configure:20523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20523   rm -rf conftest*
20524   ol_cv_struct_passwd_pw_gecos=yes
20525 else
20526   echo "configure: failed program was:" >&5
20527   cat conftest.$ac_ext >&5
20528   rm -rf conftest*
20529   ol_cv_struct_passwd_pw_gecos=no
20530 fi
20531 rm -f conftest*
20532 fi
20533
20534 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
20535 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
20536         cat >> confdefs.h <<\EOF
20537 #define HAVE_PW_GECOS 1
20538 EOF
20539
20540 fi
20541
20542 # test for pw_passwd in struct passwd
20543 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
20544 echo "configure:20545: checking struct passwd for pw_passwd" >&5
20545 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
20546   echo $ac_n "(cached) $ac_c" 1>&6
20547 else
20548   
20549         cat > conftest.$ac_ext <<EOF
20550 #line 20551 "configure"
20551 #include "confdefs.h"
20552 #include <pwd.h>
20553 int main() {
20554
20555         struct passwd pwd;
20556         pwd.pw_passwd = pwd.pw_name;
20557
20558 ; return 0; }
20559 EOF
20560 if { (eval echo configure:20561: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20561   rm -rf conftest*
20562   ol_cv_struct_passwd_pw_passwd=yes
20563 else
20564   echo "configure: failed program was:" >&5
20565   cat conftest.$ac_ext >&5
20566   rm -rf conftest*
20567   ol_cv_struct_passwd_pw_passwd=no
20568 fi
20569 rm -f conftest*
20570 fi
20571
20572 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
20573 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
20574         cat >> confdefs.h <<\EOF
20575 #define HAVE_PW_PASSWD 1
20576 EOF
20577
20578 fi
20579
20580
20581 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
20582 echo "configure:20583: checking if toupper() requires islower()" >&5
20583 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
20584   echo $ac_n "(cached) $ac_c" 1>&6
20585 else
20586   
20587         if test "$cross_compiling" = yes; then
20588   ol_cv_c_upper_lower=safe
20589 else
20590   cat > conftest.$ac_ext <<EOF
20591 #line 20592 "configure"
20592 #include "confdefs.h"
20593
20594 #include <ctype.h>
20595 main()
20596 {
20597         if ('C' == toupper('C'))
20598                 exit(0);
20599         else
20600                 exit(1);
20601 }
20602 EOF
20603 if { (eval echo configure:20604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20604 then
20605   ol_cv_c_upper_lower=no
20606 else
20607   echo "configure: failed program was:" >&5
20608   cat conftest.$ac_ext >&5
20609   rm -fr conftest*
20610   ol_cv_c_upper_lower=yes
20611 fi
20612 rm -fr conftest*
20613 fi
20614
20615 fi
20616
20617 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
20618 if test $ol_cv_c_upper_lower != no ; then
20619         cat >> confdefs.h <<\EOF
20620 #define C_UPPER_LOWER 1
20621 EOF
20622
20623 fi
20624
20625 echo $ac_n "checking for working const""... $ac_c" 1>&6
20626 echo "configure:20627: checking for working const" >&5
20627 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
20628   echo $ac_n "(cached) $ac_c" 1>&6
20629 else
20630   cat > conftest.$ac_ext <<EOF
20631 #line 20632 "configure"
20632 #include "confdefs.h"
20633
20634 int main() {
20635
20636 /* Ultrix mips cc rejects this.  */
20637 typedef int charset[2]; const charset x;
20638 /* SunOS 4.1.1 cc rejects this.  */
20639 char const *const *ccp;
20640 char **p;
20641 /* NEC SVR4.0.2 mips cc rejects this.  */
20642 struct point {int x, y;};
20643 static struct point const zero = {0,0};
20644 /* AIX XL C 1.02.0.0 rejects this.
20645    It does not let you subtract one const X* pointer from another in an arm
20646    of an if-expression whose if-part is not a constant expression */
20647 const char *g = "string";
20648 ccp = &g + (g ? g-g : 0);
20649 /* HPUX 7.0 cc rejects these. */
20650 ++ccp;
20651 p = (char**) ccp;
20652 ccp = (char const *const *) p;
20653 { /* SCO 3.2v4 cc rejects this.  */
20654   char *t;
20655   char const *s = 0 ? (char *) 0 : (char const *) 0;
20656
20657   *t++ = 0;
20658 }
20659 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20660   int x[] = {25, 17};
20661   const int *foo = &x[0];
20662   ++foo;
20663 }
20664 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20665   typedef const int *iptr;
20666   iptr p = 0;
20667   ++p;
20668 }
20669 { /* AIX XL C 1.02.0.0 rejects this saying
20670      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20671   struct s { int j; const int *ap[3]; };
20672   struct s *b; b->j = 5;
20673 }
20674 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20675   const int foo = 10;
20676 }
20677
20678 ; return 0; }
20679 EOF
20680 if { (eval echo configure:20681: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20681   rm -rf conftest*
20682   ac_cv_c_const=yes
20683 else
20684   echo "configure: failed program was:" >&5
20685   cat conftest.$ac_ext >&5
20686   rm -rf conftest*
20687   ac_cv_c_const=no
20688 fi
20689 rm -f conftest*
20690 fi
20691
20692 echo "$ac_t""$ac_cv_c_const" 1>&6
20693 if test $ac_cv_c_const = no; then
20694   cat >> confdefs.h <<\EOF
20695 #define const 
20696 EOF
20697
20698 fi
20699
20700 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
20701 echo "configure:20702: checking if compiler understands volatile" >&5
20702 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
20703   echo $ac_n "(cached) $ac_c" 1>&6
20704 else
20705   cat > conftest.$ac_ext <<EOF
20706 #line 20707 "configure"
20707 #include "confdefs.h"
20708 int x, y, z;
20709 int main() {
20710 volatile int a; int * volatile b = x ? &y : &z;
20711       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
20712       *b = 0;
20713 ; return 0; }
20714 EOF
20715 if { (eval echo configure:20716: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20716   rm -rf conftest*
20717   ol_cv_c_volatile=yes
20718 else
20719   echo "configure: failed program was:" >&5
20720   cat conftest.$ac_ext >&5
20721   rm -rf conftest*
20722   ol_cv_c_volatile=no
20723 fi
20724 rm -f conftest*
20725 fi
20726
20727 echo "$ac_t""$ol_cv_c_volatile" 1>&6
20728   if test $ol_cv_c_volatile = yes; then
20729     : 
20730   else
20731     cat >> confdefs.h <<\EOF
20732 #define volatile 
20733 EOF
20734
20735   fi
20736  
20737
20738 if test $cross_compiling = yes ; then
20739         cat >> confdefs.h <<\EOF
20740 #define CROSS_COMPILING 1
20741 EOF
20742
20743 else
20744         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
20745 echo "configure:20746: checking whether byte ordering is bigendian" >&5
20746 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
20747   echo $ac_n "(cached) $ac_c" 1>&6
20748 else
20749   ac_cv_c_bigendian=unknown
20750 # See if sys/param.h defines the BYTE_ORDER macro.
20751 cat > conftest.$ac_ext <<EOF
20752 #line 20753 "configure"
20753 #include "confdefs.h"
20754 #include <sys/types.h>
20755 #include <sys/param.h>
20756 int main() {
20757
20758 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
20759  bogus endian macros
20760 #endif
20761 ; return 0; }
20762 EOF
20763 if { (eval echo configure:20764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20764   rm -rf conftest*
20765   # It does; now see whether it defined to BIG_ENDIAN or not.
20766 cat > conftest.$ac_ext <<EOF
20767 #line 20768 "configure"
20768 #include "confdefs.h"
20769 #include <sys/types.h>
20770 #include <sys/param.h>
20771 int main() {
20772
20773 #if BYTE_ORDER != BIG_ENDIAN
20774  not big endian
20775 #endif
20776 ; return 0; }
20777 EOF
20778 if { (eval echo configure:20779: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20779   rm -rf conftest*
20780   ac_cv_c_bigendian=yes
20781 else
20782   echo "configure: failed program was:" >&5
20783   cat conftest.$ac_ext >&5
20784   rm -rf conftest*
20785   ac_cv_c_bigendian=no
20786 fi
20787 rm -f conftest*
20788 else
20789   echo "configure: failed program was:" >&5
20790   cat conftest.$ac_ext >&5
20791 fi
20792 rm -f conftest*
20793 if test $ac_cv_c_bigendian = unknown; then
20794 if test "$cross_compiling" = yes; then
20795     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
20796 else
20797   cat > conftest.$ac_ext <<EOF
20798 #line 20799 "configure"
20799 #include "confdefs.h"
20800 main () {
20801   /* Are we little or big endian?  From Harbison&Steele.  */
20802   union
20803   {
20804     long l;
20805     char c[sizeof (long)];
20806   } u;
20807   u.l = 1;
20808   exit (u.c[sizeof (long) - 1] == 1);
20809 }
20810 EOF
20811 if { (eval echo configure:20812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20812 then
20813   ac_cv_c_bigendian=no
20814 else
20815   echo "configure: failed program was:" >&5
20816   cat conftest.$ac_ext >&5
20817   rm -fr conftest*
20818   ac_cv_c_bigendian=yes
20819 fi
20820 rm -fr conftest*
20821 fi
20822
20823 fi
20824 fi
20825
20826 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
20827 if test $ac_cv_c_bigendian = yes; then
20828   cat >> confdefs.h <<\EOF
20829 #define WORDS_BIGENDIAN 1
20830 EOF
20831
20832 fi
20833
20834 fi
20835
20836 echo $ac_n "checking size of short""... $ac_c" 1>&6
20837 echo "configure:20838: checking size of short" >&5 
20838 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
20839   echo $ac_n "(cached) $ac_c" 1>&6
20840 else
20841   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20842   cat > conftest.$ac_ext <<EOF
20843 #line 20844 "configure"
20844 #include "confdefs.h"
20845 #include "confdefs.h" 
20846 #include <sys/types.h> 
20847  
20848
20849 int main() {
20850 switch (0) case 0: case (sizeof (short) == $ac_size):;
20851 ; return 0; }
20852 EOF
20853 if { (eval echo configure:20854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20854   rm -rf conftest*
20855   ac_cv_sizeof_short=$ac_size
20856 else
20857   echo "configure: failed program was:" >&5
20858   cat conftest.$ac_ext >&5
20859 fi
20860 rm -f conftest* 
20861   if test x$ac_cv_sizeof_short != x ; then break; fi 
20862 done 
20863
20864 fi
20865  
20866 if test x$ac_cv_sizeof_short = x ; then 
20867   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
20868 fi 
20869 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
20870 cat >> confdefs.h <<EOF
20871 #define SIZEOF_SHORT $ac_cv_sizeof_short
20872 EOF
20873  
20874  
20875 echo $ac_n "checking size of int""... $ac_c" 1>&6
20876 echo "configure:20877: checking size of int" >&5 
20877 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
20878   echo $ac_n "(cached) $ac_c" 1>&6
20879 else
20880   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20881   cat > conftest.$ac_ext <<EOF
20882 #line 20883 "configure"
20883 #include "confdefs.h"
20884 #include "confdefs.h" 
20885 #include <sys/types.h> 
20886  
20887
20888 int main() {
20889 switch (0) case 0: case (sizeof (int) == $ac_size):;
20890 ; return 0; }
20891 EOF
20892 if { (eval echo configure:20893: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20893   rm -rf conftest*
20894   ac_cv_sizeof_int=$ac_size
20895 else
20896   echo "configure: failed program was:" >&5
20897   cat conftest.$ac_ext >&5
20898 fi
20899 rm -f conftest* 
20900   if test x$ac_cv_sizeof_int != x ; then break; fi 
20901 done 
20902
20903 fi
20904  
20905 if test x$ac_cv_sizeof_int = x ; then 
20906   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
20907 fi 
20908 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
20909 cat >> confdefs.h <<EOF
20910 #define SIZEOF_INT $ac_cv_sizeof_int
20911 EOF
20912  
20913  
20914 echo $ac_n "checking size of long""... $ac_c" 1>&6
20915 echo "configure:20916: checking size of long" >&5 
20916 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
20917   echo $ac_n "(cached) $ac_c" 1>&6
20918 else
20919   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20920   cat > conftest.$ac_ext <<EOF
20921 #line 20922 "configure"
20922 #include "confdefs.h"
20923 #include "confdefs.h" 
20924 #include <sys/types.h> 
20925  
20926
20927 int main() {
20928 switch (0) case 0: case (sizeof (long) == $ac_size):;
20929 ; return 0; }
20930 EOF
20931 if { (eval echo configure:20932: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20932   rm -rf conftest*
20933   ac_cv_sizeof_long=$ac_size
20934 else
20935   echo "configure: failed program was:" >&5
20936   cat conftest.$ac_ext >&5
20937 fi
20938 rm -f conftest* 
20939   if test x$ac_cv_sizeof_long != x ; then break; fi 
20940 done 
20941
20942 fi
20943  
20944 if test x$ac_cv_sizeof_long = x ; then 
20945   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
20946 fi 
20947 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
20948 cat >> confdefs.h <<EOF
20949 #define SIZEOF_LONG $ac_cv_sizeof_long
20950 EOF
20951  
20952
20953
20954 if test "$ac_cv_sizeof_int" -lt 4 ; then
20955         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
20956
20957         cat >> confdefs.h <<\EOF
20958 #define LBER_INT_T long
20959 EOF
20960
20961 else
20962         cat >> confdefs.h <<\EOF
20963 #define LBER_INT_T int
20964 EOF
20965
20966 fi
20967
20968 cat >> confdefs.h <<\EOF
20969 #define LBER_LEN_T long
20970 EOF
20971
20972 cat >> confdefs.h <<\EOF
20973 #define LBER_SOCKET_T int
20974 EOF
20975
20976 cat >> confdefs.h <<\EOF
20977 #define LBER_TAG_T long
20978 EOF
20979
20980
20981 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
20982 echo "configure:20983: checking for 8-bit clean memcmp" >&5
20983 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
20984   echo $ac_n "(cached) $ac_c" 1>&6
20985 else
20986   if test "$cross_compiling" = yes; then
20987   ac_cv_func_memcmp_clean=no
20988 else
20989   cat > conftest.$ac_ext <<EOF
20990 #line 20991 "configure"
20991 #include "confdefs.h"
20992
20993 main()
20994 {
20995   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
20996   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
20997 }
20998
20999 EOF
21000 if { (eval echo configure:21001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21001 then
21002   ac_cv_func_memcmp_clean=yes
21003 else
21004   echo "configure: failed program was:" >&5
21005   cat conftest.$ac_ext >&5
21006   rm -fr conftest*
21007   ac_cv_func_memcmp_clean=no
21008 fi
21009 rm -fr conftest*
21010 fi
21011
21012 fi
21013
21014 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21015 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21016
21017 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21018 echo "configure:21019: checking for strftime" >&5
21019 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21020   echo $ac_n "(cached) $ac_c" 1>&6
21021 else
21022   cat > conftest.$ac_ext <<EOF
21023 #line 21024 "configure"
21024 #include "confdefs.h"
21025 /* System header to define __stub macros and hopefully few prototypes,
21026     which can conflict with char strftime(); below.  */
21027 #include <assert.h>
21028 /* Override any gcc2 internal prototype to avoid an error.  */
21029 /* We use char because int might match the return type of a gcc2
21030     builtin and then its argument prototype would still apply.  */
21031 char strftime();
21032 char (*f)();
21033
21034 int main() {
21035
21036 /* The GNU C library defines this for functions which it implements
21037     to always fail with ENOSYS.  Some functions are actually named
21038     something starting with __ and the normal name is an alias.  */
21039 #if defined (__stub_strftime) || defined (__stub___strftime)
21040 choke me
21041 #else
21042 f = strftime;
21043 #endif
21044
21045 ; return 0; }
21046 EOF
21047 if { (eval echo configure:21048: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21048   rm -rf conftest*
21049   eval "ac_cv_func_strftime=yes"
21050 else
21051   echo "configure: failed program was:" >&5
21052   cat conftest.$ac_ext >&5
21053   rm -rf conftest*
21054   eval "ac_cv_func_strftime=no"
21055 fi
21056 rm -f conftest*
21057 fi
21058
21059 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21060   echo "$ac_t""yes" 1>&6
21061   cat >> confdefs.h <<\EOF
21062 #define HAVE_STRFTIME 1
21063 EOF
21064
21065 else
21066   echo "$ac_t""no" 1>&6
21067 # strftime is in -lintl on SCO UNIX.
21068 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21069 echo "configure:21070: checking for strftime in -lintl" >&5
21070 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21071 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21072   echo $ac_n "(cached) $ac_c" 1>&6
21073 else
21074   ac_save_LIBS="$LIBS"
21075 LIBS="-lintl  $LIBS"
21076 cat > conftest.$ac_ext <<EOF
21077 #line 21078 "configure"
21078 #include "confdefs.h"
21079 /* Override any gcc2 internal prototype to avoid an error.  */
21080 /* We use char because int might match the return type of a gcc2
21081     builtin and then its argument prototype would still apply.  */
21082 char strftime();
21083
21084 int main() {
21085 strftime()
21086 ; return 0; }
21087 EOF
21088 if { (eval echo configure:21089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21089   rm -rf conftest*
21090   eval "ac_cv_lib_$ac_lib_var=yes"
21091 else
21092   echo "configure: failed program was:" >&5
21093   cat conftest.$ac_ext >&5
21094   rm -rf conftest*
21095   eval "ac_cv_lib_$ac_lib_var=no"
21096 fi
21097 rm -f conftest*
21098 LIBS="$ac_save_LIBS"
21099
21100 fi
21101 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21102   echo "$ac_t""yes" 1>&6
21103   cat >> confdefs.h <<\EOF
21104 #define HAVE_STRFTIME 1
21105 EOF
21106
21107 LIBS="-lintl $LIBS"
21108 else
21109   echo "$ac_t""no" 1>&6
21110 fi
21111
21112 fi
21113
21114
21115 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21116 echo "configure:21117: checking for inet_aton()" >&5
21117 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21118   echo $ac_n "(cached) $ac_c" 1>&6
21119 else
21120   cat > conftest.$ac_ext <<EOF
21121 #line 21122 "configure"
21122 #include "confdefs.h"
21123
21124 #ifdef HAVE_SYS_TYPES_H
21125 #       include <sys/types.h>
21126 #endif
21127 #ifdef HAVE_SYS_SOCKET_H
21128 #       include <sys/socket.h>
21129 #       ifdef HAVE_SYS_SELECT_H
21130 #               include <sys/select.h>
21131 #       endif
21132 #       include <netinet/in.h>
21133 #       ifdef HAVE_ARPA_INET_H
21134 #               include <arpa/inet.h>
21135 #       endif
21136 #endif
21137
21138 int main() {
21139 struct in_addr in;
21140 int rc = inet_aton( "255.255.255.255", &in );
21141 ; return 0; }
21142 EOF
21143 if { (eval echo configure:21144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21144   rm -rf conftest*
21145   ol_cv_func_inet_aton=yes
21146 else
21147   echo "configure: failed program was:" >&5
21148   cat conftest.$ac_ext >&5
21149   rm -rf conftest*
21150   ol_cv_func_inet_aton=no
21151 fi
21152 rm -f conftest*
21153 fi
21154
21155 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21156   if test $ol_cv_func_inet_aton != no; then
21157     cat >> confdefs.h <<\EOF
21158 #define HAVE_INET_ATON 1
21159 EOF
21160
21161   fi
21162  
21163
21164 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21165 echo "configure:21166: checking for _spawnlp" >&5
21166 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21167   echo $ac_n "(cached) $ac_c" 1>&6
21168 else
21169   cat > conftest.$ac_ext <<EOF
21170 #line 21171 "configure"
21171 #include "confdefs.h"
21172 /* System header to define __stub macros and hopefully few prototypes,
21173     which can conflict with char _spawnlp(); below.  */
21174 #include <assert.h>
21175 /* Override any gcc2 internal prototype to avoid an error.  */
21176 /* We use char because int might match the return type of a gcc2
21177     builtin and then its argument prototype would still apply.  */
21178 char _spawnlp();
21179 char (*f)();
21180
21181 int main() {
21182
21183 /* The GNU C library defines this for functions which it implements
21184     to always fail with ENOSYS.  Some functions are actually named
21185     something starting with __ and the normal name is an alias.  */
21186 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21187 choke me
21188 #else
21189 f = _spawnlp;
21190 #endif
21191
21192 ; return 0; }
21193 EOF
21194 if { (eval echo configure:21195: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21195   rm -rf conftest*
21196   eval "ac_cv_func__spawnlp=yes"
21197 else
21198   echo "configure: failed program was:" >&5
21199   cat conftest.$ac_ext >&5
21200   rm -rf conftest*
21201   eval "ac_cv_func__spawnlp=no"
21202 fi
21203 rm -f conftest*
21204 fi
21205
21206 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21207   echo "$ac_t""yes" 1>&6
21208   cat >> confdefs.h <<\EOF
21209 #define HAVE_SPAWNLP 1
21210 EOF
21211
21212 else
21213   echo "$ac_t""no" 1>&6
21214 fi
21215
21216
21217 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21218 echo "configure:21219: checking for _snprintf" >&5
21219 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21220   echo $ac_n "(cached) $ac_c" 1>&6
21221 else
21222   cat > conftest.$ac_ext <<EOF
21223 #line 21224 "configure"
21224 #include "confdefs.h"
21225 /* System header to define __stub macros and hopefully few prototypes,
21226     which can conflict with char _snprintf(); below.  */
21227 #include <assert.h>
21228 /* Override any gcc2 internal prototype to avoid an error.  */
21229 /* We use char because int might match the return type of a gcc2
21230     builtin and then its argument prototype would still apply.  */
21231 char _snprintf();
21232 char (*f)();
21233
21234 int main() {
21235
21236 /* The GNU C library defines this for functions which it implements
21237     to always fail with ENOSYS.  Some functions are actually named
21238     something starting with __ and the normal name is an alias.  */
21239 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21240 choke me
21241 #else
21242 f = _snprintf;
21243 #endif
21244
21245 ; return 0; }
21246 EOF
21247 if { (eval echo configure:21248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21248   rm -rf conftest*
21249   eval "ac_cv_func__snprintf=yes"
21250 else
21251   echo "configure: failed program was:" >&5
21252   cat conftest.$ac_ext >&5
21253   rm -rf conftest*
21254   eval "ac_cv_func__snprintf=no"
21255 fi
21256 rm -f conftest*
21257 fi
21258
21259 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21260   echo "$ac_t""yes" 1>&6
21261   ac_cv_func_snprintf=yes
21262         cat >> confdefs.h <<\EOF
21263 #define snprintf _snprintf
21264 EOF
21265
21266
21267 else
21268   echo "$ac_t""no" 1>&6
21269 fi
21270
21271
21272 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21273 echo "configure:21274: checking for _vsnprintf" >&5
21274 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21275   echo $ac_n "(cached) $ac_c" 1>&6
21276 else
21277   cat > conftest.$ac_ext <<EOF
21278 #line 21279 "configure"
21279 #include "confdefs.h"
21280 /* System header to define __stub macros and hopefully few prototypes,
21281     which can conflict with char _vsnprintf(); below.  */
21282 #include <assert.h>
21283 /* Override any gcc2 internal prototype to avoid an error.  */
21284 /* We use char because int might match the return type of a gcc2
21285     builtin and then its argument prototype would still apply.  */
21286 char _vsnprintf();
21287 char (*f)();
21288
21289 int main() {
21290
21291 /* The GNU C library defines this for functions which it implements
21292     to always fail with ENOSYS.  Some functions are actually named
21293     something starting with __ and the normal name is an alias.  */
21294 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21295 choke me
21296 #else
21297 f = _vsnprintf;
21298 #endif
21299
21300 ; return 0; }
21301 EOF
21302 if { (eval echo configure:21303: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21303   rm -rf conftest*
21304   eval "ac_cv_func__vsnprintf=yes"
21305 else
21306   echo "configure: failed program was:" >&5
21307   cat conftest.$ac_ext >&5
21308   rm -rf conftest*
21309   eval "ac_cv_func__vsnprintf=no"
21310 fi
21311 rm -f conftest*
21312 fi
21313
21314 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21315   echo "$ac_t""yes" 1>&6
21316   ac_cv_func_vsnprintf=yes
21317         cat >> confdefs.h <<\EOF
21318 #define vsnprintf _vsnprintf
21319 EOF
21320
21321
21322 else
21323   echo "$ac_t""no" 1>&6
21324 fi
21325
21326
21327 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21328 echo "configure:21329: checking for vprintf" >&5
21329 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21330   echo $ac_n "(cached) $ac_c" 1>&6
21331 else
21332   cat > conftest.$ac_ext <<EOF
21333 #line 21334 "configure"
21334 #include "confdefs.h"
21335 /* System header to define __stub macros and hopefully few prototypes,
21336     which can conflict with char vprintf(); below.  */
21337 #include <assert.h>
21338 /* Override any gcc2 internal prototype to avoid an error.  */
21339 /* We use char because int might match the return type of a gcc2
21340     builtin and then its argument prototype would still apply.  */
21341 char vprintf();
21342 char (*f)();
21343
21344 int main() {
21345
21346 /* The GNU C library defines this for functions which it implements
21347     to always fail with ENOSYS.  Some functions are actually named
21348     something starting with __ and the normal name is an alias.  */
21349 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21350 choke me
21351 #else
21352 f = vprintf;
21353 #endif
21354
21355 ; return 0; }
21356 EOF
21357 if { (eval echo configure:21358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21358   rm -rf conftest*
21359   eval "ac_cv_func_vprintf=yes"
21360 else
21361   echo "configure: failed program was:" >&5
21362   cat conftest.$ac_ext >&5
21363   rm -rf conftest*
21364   eval "ac_cv_func_vprintf=no"
21365 fi
21366 rm -f conftest*
21367 fi
21368
21369 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21370   echo "$ac_t""yes" 1>&6
21371   cat >> confdefs.h <<\EOF
21372 #define HAVE_VPRINTF 1
21373 EOF
21374
21375 else
21376   echo "$ac_t""no" 1>&6
21377 fi
21378
21379 if test "$ac_cv_func_vprintf" != yes; then
21380 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21381 echo "configure:21382: checking for _doprnt" >&5
21382 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21383   echo $ac_n "(cached) $ac_c" 1>&6
21384 else
21385   cat > conftest.$ac_ext <<EOF
21386 #line 21387 "configure"
21387 #include "confdefs.h"
21388 /* System header to define __stub macros and hopefully few prototypes,
21389     which can conflict with char _doprnt(); below.  */
21390 #include <assert.h>
21391 /* Override any gcc2 internal prototype to avoid an error.  */
21392 /* We use char because int might match the return type of a gcc2
21393     builtin and then its argument prototype would still apply.  */
21394 char _doprnt();
21395 char (*f)();
21396
21397 int main() {
21398
21399 /* The GNU C library defines this for functions which it implements
21400     to always fail with ENOSYS.  Some functions are actually named
21401     something starting with __ and the normal name is an alias.  */
21402 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21403 choke me
21404 #else
21405 f = _doprnt;
21406 #endif
21407
21408 ; return 0; }
21409 EOF
21410 if { (eval echo configure:21411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21411   rm -rf conftest*
21412   eval "ac_cv_func__doprnt=yes"
21413 else
21414   echo "configure: failed program was:" >&5
21415   cat conftest.$ac_ext >&5
21416   rm -rf conftest*
21417   eval "ac_cv_func__doprnt=no"
21418 fi
21419 rm -f conftest*
21420 fi
21421
21422 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21423   echo "$ac_t""yes" 1>&6
21424   cat >> confdefs.h <<\EOF
21425 #define HAVE_DOPRNT 1
21426 EOF
21427
21428 else
21429   echo "$ac_t""no" 1>&6
21430 fi
21431
21432 fi
21433
21434
21435 if test $ac_cv_func_vprintf = yes ; then
21436                 for ac_func in vsnprintf vsprintf
21437 do
21438 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21439 echo "configure:21440: checking for $ac_func" >&5
21440 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21441   echo $ac_n "(cached) $ac_c" 1>&6
21442 else
21443   cat > conftest.$ac_ext <<EOF
21444 #line 21445 "configure"
21445 #include "confdefs.h"
21446 /* System header to define __stub macros and hopefully few prototypes,
21447     which can conflict with char $ac_func(); below.  */
21448 #include <assert.h>
21449 /* Override any gcc2 internal prototype to avoid an error.  */
21450 /* We use char because int might match the return type of a gcc2
21451     builtin and then its argument prototype would still apply.  */
21452 char $ac_func();
21453 char (*f)();
21454
21455 int main() {
21456
21457 /* The GNU C library defines this for functions which it implements
21458     to always fail with ENOSYS.  Some functions are actually named
21459     something starting with __ and the normal name is an alias.  */
21460 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21461 choke me
21462 #else
21463 f = $ac_func;
21464 #endif
21465
21466 ; return 0; }
21467 EOF
21468 if { (eval echo configure:21469: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21469   rm -rf conftest*
21470   eval "ac_cv_func_$ac_func=yes"
21471 else
21472   echo "configure: failed program was:" >&5
21473   cat conftest.$ac_ext >&5
21474   rm -rf conftest*
21475   eval "ac_cv_func_$ac_func=no"
21476 fi
21477 rm -f conftest*
21478 fi
21479
21480 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21481   echo "$ac_t""yes" 1>&6
21482     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21483   cat >> confdefs.h <<EOF
21484 #define $ac_tr_func 1
21485 EOF
21486  
21487 else
21488   echo "$ac_t""no" 1>&6
21489 fi
21490 done
21491
21492 fi
21493
21494 for ac_func in \
21495         bcopy                   \
21496         closesocket             \
21497         chroot                  \
21498         endgrent                \
21499         endpwent                \
21500         fcntl                   \
21501         flock                   \
21502         getdtablesize   \
21503         getgrgid                \
21504         gethostname             \
21505         getpass                 \
21506         getpassphrase   \
21507         getpwuid                \
21508         getpwnam                \
21509         getspnam                \
21510         gettimeofday    \
21511         initgroups              \
21512         lockf                   \
21513         memcpy                  \
21514         memmove                 \
21515         mkstemp                 \
21516         mktemp                  \
21517         pipe                    \
21518         read                    \
21519         recv                    \
21520         recvfrom                \
21521         setpwfile               \
21522         setgid                  \
21523         setegid                 \
21524         setsid                  \
21525         setuid                  \
21526         seteuid                 \
21527         sigaction               \
21528         signal                  \
21529         sigset                  \
21530         strdup                  \
21531         strerror                \
21532         strpbrk                 \
21533         strrchr                 \
21534         strsep                  \
21535         strstr                  \
21536         strtol                  \
21537         strtoul                 \
21538         strspn                  \
21539         sysconf                 \
21540         usleep                  \
21541         waitpid                 \
21542         wait4                   \
21543         write                   \
21544         send                    \
21545         sendto                  \
21546
21547 do
21548 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21549 echo "configure:21550: checking for $ac_func" >&5
21550 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21551   echo $ac_n "(cached) $ac_c" 1>&6
21552 else
21553   cat > conftest.$ac_ext <<EOF
21554 #line 21555 "configure"
21555 #include "confdefs.h"
21556 /* System header to define __stub macros and hopefully few prototypes,
21557     which can conflict with char $ac_func(); below.  */
21558 #include <assert.h>
21559 /* Override any gcc2 internal prototype to avoid an error.  */
21560 /* We use char because int might match the return type of a gcc2
21561     builtin and then its argument prototype would still apply.  */
21562 char $ac_func();
21563 char (*f)();
21564
21565 int main() {
21566
21567 /* The GNU C library defines this for functions which it implements
21568     to always fail with ENOSYS.  Some functions are actually named
21569     something starting with __ and the normal name is an alias.  */
21570 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21571 choke me
21572 #else
21573 f = $ac_func;
21574 #endif
21575
21576 ; return 0; }
21577 EOF
21578 if { (eval echo configure:21579: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21579   rm -rf conftest*
21580   eval "ac_cv_func_$ac_func=yes"
21581 else
21582   echo "configure: failed program was:" >&5
21583   cat conftest.$ac_ext >&5
21584   rm -rf conftest*
21585   eval "ac_cv_func_$ac_func=no"
21586 fi
21587 rm -f conftest*
21588 fi
21589
21590 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21591   echo "$ac_t""yes" 1>&6
21592     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21593   cat >> confdefs.h <<EOF
21594 #define $ac_tr_func 1
21595 EOF
21596  
21597 else
21598   echo "$ac_t""no" 1>&6
21599 fi
21600 done
21601
21602
21603 for ac_func in getopt
21604 do
21605 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21606 echo "configure:21607: checking for $ac_func" >&5
21607 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21608   echo $ac_n "(cached) $ac_c" 1>&6
21609 else
21610   cat > conftest.$ac_ext <<EOF
21611 #line 21612 "configure"
21612 #include "confdefs.h"
21613 /* System header to define __stub macros and hopefully few prototypes,
21614     which can conflict with char $ac_func(); below.  */
21615 #include <assert.h>
21616 /* Override any gcc2 internal prototype to avoid an error.  */
21617 /* We use char because int might match the return type of a gcc2
21618     builtin and then its argument prototype would still apply.  */
21619 char $ac_func();
21620 char (*f)();
21621
21622 int main() {
21623
21624 /* The GNU C library defines this for functions which it implements
21625     to always fail with ENOSYS.  Some functions are actually named
21626     something starting with __ and the normal name is an alias.  */
21627 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21628 choke me
21629 #else
21630 f = $ac_func;
21631 #endif
21632
21633 ; return 0; }
21634 EOF
21635 if { (eval echo configure:21636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21636   rm -rf conftest*
21637   eval "ac_cv_func_$ac_func=yes"
21638 else
21639   echo "configure: failed program was:" >&5
21640   cat conftest.$ac_ext >&5
21641   rm -rf conftest*
21642   eval "ac_cv_func_$ac_func=no"
21643 fi
21644 rm -f conftest*
21645 fi
21646
21647 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21648   echo "$ac_t""yes" 1>&6
21649     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21650   cat >> confdefs.h <<EOF
21651 #define $ac_tr_func 1
21652 EOF
21653  
21654 else
21655   echo "$ac_t""no" 1>&6
21656 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
21657 fi
21658 done
21659
21660
21661
21662 if test "$ac_cv_func_getopt" != yes; then
21663         LIBSRCS="$LIBSRCS getopt.c"
21664 fi
21665
21666 # Check Configuration
21667 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
21668 echo "configure:21669: checking declaration of sys_errlist" >&5
21669 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
21670   echo $ac_n "(cached) $ac_c" 1>&6
21671 else
21672   
21673         cat > conftest.$ac_ext <<EOF
21674 #line 21675 "configure"
21675 #include "confdefs.h"
21676
21677 #include <stdio.h>
21678 #include <sys/types.h>
21679 #include <errno.h>
21680 #ifdef WINNT
21681 #include <stdlib.h>
21682 #endif 
21683 int main() {
21684 char *c = (char *) *sys_errlist
21685 ; return 0; }
21686 EOF
21687 if { (eval echo configure:21688: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21688   rm -rf conftest*
21689   ol_cv_dcl_sys_errlist=yes
21690         ol_cv_have_sys_errlist=yes
21691 else
21692   echo "configure: failed program was:" >&5
21693   cat conftest.$ac_ext >&5
21694   rm -rf conftest*
21695   ol_cv_dcl_sys_errlist=no
21696 fi
21697 rm -f conftest*
21698 fi
21699
21700 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
21701 #
21702 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
21703 if test $ol_cv_dcl_sys_errlist = no ; then
21704         cat >> confdefs.h <<\EOF
21705 #define DECL_SYS_ERRLIST 1
21706 EOF
21707
21708
21709         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
21710 echo "configure:21711: checking existence of sys_errlist" >&5
21711 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
21712   echo $ac_n "(cached) $ac_c" 1>&6
21713 else
21714   
21715                 cat > conftest.$ac_ext <<EOF
21716 #line 21717 "configure"
21717 #include "confdefs.h"
21718 #include <errno.h>
21719 int main() {
21720 char *c = (char *) *sys_errlist
21721 ; return 0; }
21722 EOF
21723 if { (eval echo configure:21724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21724   rm -rf conftest*
21725   ol_cv_have_sys_errlist=yes
21726 else
21727   echo "configure: failed program was:" >&5
21728   cat conftest.$ac_ext >&5
21729   rm -rf conftest*
21730   ol_cv_have_sys_errlist=no
21731 fi
21732 rm -f conftest*
21733 fi
21734
21735 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
21736 fi
21737 if test $ol_cv_have_sys_errlist = yes ; then
21738         cat >> confdefs.h <<\EOF
21739 #define HAVE_SYS_ERRLIST 1
21740 EOF
21741
21742 fi
21743
21744
21745
21746 if test "$ol_enable_debug" != no ; then
21747         cat >> confdefs.h <<\EOF
21748 #define LDAP_DEBUG 1
21749 EOF
21750
21751 fi
21752 if test "$ol_enable_syslog" = yes ; then
21753         cat >> confdefs.h <<\EOF
21754 #define LDAP_SYSLOG 1
21755 EOF
21756
21757 fi
21758 if test "$ol_enable_cache" = no ; then
21759         cat >> confdefs.h <<\EOF
21760 #define LDAP_NOCACHE 1
21761 EOF
21762
21763 fi
21764 if test "$ol_link_kbind" != no ; then
21765         cat >> confdefs.h <<\EOF
21766 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
21767 EOF
21768
21769 fi
21770 if test "$ol_enable_proctitle" != no ; then
21771         cat >> confdefs.h <<\EOF
21772 #define LDAP_PROCTITLE 1
21773 EOF
21774
21775 fi
21776 if test "$ol_enable_referrals" != no ; then
21777         cat >> confdefs.h <<\EOF
21778 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
21779 EOF
21780
21781 fi
21782 if test "$ol_enable_local" != no; then
21783         cat >> confdefs.h <<\EOF
21784 #define LDAP_PF_LOCAL 1
21785 EOF
21786
21787 fi
21788 if test "$ol_link_ipv6" != no; then
21789         cat >> confdefs.h <<\EOF
21790 #define LDAP_PF_INET6 1
21791 EOF
21792
21793 fi
21794 if test "$ol_enable_cleartext" != no ; then
21795         cat >> confdefs.h <<\EOF
21796 #define SLAPD_CLEARTEXT 1
21797 EOF
21798
21799 fi
21800 if test "$ol_enable_crypt" != no ; then
21801         cat >> confdefs.h <<\EOF
21802 #define SLAPD_CRYPT 1
21803 EOF
21804
21805 fi
21806 if test "$ol_link_kpasswd" != no ; then
21807         cat >> confdefs.h <<\EOF
21808 #define SLAPD_KPASSWD 1
21809 EOF
21810
21811 fi
21812 if test "$ol_link_spasswd" != no ; then
21813         cat >> confdefs.h <<\EOF
21814 #define SLAPD_SPASSWD 1
21815 EOF
21816
21817 fi
21818 if test "$ol_enable_phonetic" != no ; then
21819         cat >> confdefs.h <<\EOF
21820 #define SLAPD_PHONETIC 1
21821 EOF
21822
21823 fi
21824 if test "$ol_enable_rlookups" != no ; then
21825         cat >> confdefs.h <<\EOF
21826 #define SLAPD_RLOOKUPS 1
21827 EOF
21828
21829 fi
21830 if test "$ol_enable_aci" != no ; then
21831         cat >> confdefs.h <<\EOF
21832 #define SLAPD_ACI_ENABLED 1
21833 EOF
21834
21835 fi
21836
21837 if test "$ol_link_modules" != no ; then
21838         cat >> confdefs.h <<\EOF
21839 #define SLAPD_MODULES 1
21840 EOF
21841
21842         BUILD_SLAPD=yes
21843         SLAPD_MODULES_LDFLAGS="-dlopen self"
21844 fi
21845
21846 if test "$ol_enable_bdb" != no ; then
21847         cat >> confdefs.h <<\EOF
21848 #define SLAPD_BDB 1
21849 EOF
21850
21851         BUILD_SLAPD=yes
21852         BUILD_BDB=yes
21853         if test "$ol_with_bdb_module" != static ; then
21854                 cat >> confdefs.h <<\EOF
21855 #define SLAPD_BDB_DYNAMIC 1
21856 EOF
21857
21858                 BUILD_BDB=mod
21859                 BUILD_BDB_DYNAMIC=shared
21860                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
21861                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
21862         else
21863                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
21864         fi
21865 fi
21866
21867 if test "$ol_link_dnssrv" != no ; then
21868         cat >> confdefs.h <<\EOF
21869 #define SLAPD_DNSSRV 1
21870 EOF
21871
21872         BUILD_SLAPD=yes
21873         BUILD_DNSSRV=yes
21874         if test "$ol_with_dnssrv_module" != static ; then
21875                 cat >> confdefs.h <<\EOF
21876 #define SLAPD_DNSSRV_DYNAMIC 1
21877 EOF
21878
21879                 BUILD_DNSSRV=mod
21880                 BUILD_DNSSRV_DYNAMIC=shared
21881                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
21882                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
21883         else
21884                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
21885         fi
21886 fi
21887
21888 if test "$ol_enable_ldap" != no ; then
21889         cat >> confdefs.h <<\EOF
21890 #define SLAPD_LDAP 1
21891 EOF
21892
21893         BUILD_SLAPD=yes
21894         BUILD_LDAP=yes
21895         if test "$ol_with_ldap_module" != static ; then
21896                 cat >> confdefs.h <<\EOF
21897 #define SLAPD_LDAP_DYNAMIC 1
21898 EOF
21899
21900                 BUILD_LDAP=mod
21901                 BUILD_LDAP_DYNAMIC=shared
21902                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
21903                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
21904         else
21905                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
21906         fi
21907 fi
21908
21909 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
21910         cat >> confdefs.h <<\EOF
21911 #define SLAPD_LDBM 1
21912 EOF
21913
21914         BUILD_SLAPD=yes
21915         BUILD_LDBM=yes
21916         LDBM_LIB="-lldbm"
21917         if test "$ol_with_ldbm_module" != static ; then
21918                 cat >> confdefs.h <<\EOF
21919 #define SLAPD_LDBM_DYNAMIC 1
21920 EOF
21921
21922                 BUILD_LDBM=mod
21923                 BUILD_LDBM_DYNAMIC=shared
21924                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
21925                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
21926         else
21927                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
21928         fi
21929 fi
21930
21931 if test "$ol_enable_meta" != no ; then
21932         if test "$ol_enable_ldap" = no ; then
21933                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
21934         fi
21935         if test "$ol_enable_rewrite" = no ; then
21936                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
21937         fi
21938         cat >> confdefs.h <<\EOF
21939 #define SLAPD_META 1
21940 EOF
21941
21942         BUILD_SLAPD=yes
21943         BUILD_META=yes
21944         if test "$ol_with_meta_module" != static ; then
21945                 cat >> confdefs.h <<\EOF
21946 #define SLAPD_META_DYNAMIC 1
21947 EOF
21948
21949                 BUILD_META=mod
21950                 BUILD_META_DYNAMIC=shared
21951                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
21952                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
21953         else
21954                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
21955         fi
21956 fi
21957
21958 if test "$ol_enable_monitor" != no ; then
21959         cat >> confdefs.h <<\EOF
21960 #define SLAPD_MONITOR 1
21961 EOF
21962
21963         BUILD_SLAPD=yes
21964         BUILD_MONITOR=yes
21965         if test "$ol_with_monitor_module" != static ; then
21966                 cat >> confdefs.h <<\EOF
21967 #define SLAPD_MONITOR_DYNAMIC 1
21968 EOF
21969
21970                 BUILD_MONITOR=mod
21971                 BUILD_MONITOR_DYNAMIC=shared
21972                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la"
21973                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
21974         else
21975                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
21976         fi
21977 fi
21978
21979 if test "$ol_enable_passwd" != no ; then
21980         cat >> confdefs.h <<\EOF
21981 #define SLAPD_PASSWD 1
21982 EOF
21983
21984         BUILD_SLAPD=yes
21985         BUILD_PASSWD=yes
21986         if test "$ol_with_passwd_module" != static ; then
21987                 cat >> confdefs.h <<\EOF
21988 #define SLAPD_PASSWD_DYNAMIC 1
21989 EOF
21990
21991                 BUILD_PASSWD=mod
21992                 BUILD_PASSWD_DYNAMIC=shared
21993                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
21994                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
21995         else
21996                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
21997         fi
21998 fi
21999
22000 if test "$ol_link_perl" != no ; then
22001         cat >> confdefs.h <<\EOF
22002 #define SLAPD_PERL 1
22003 EOF
22004
22005         BUILD_SLAPD=yes
22006         BUILD_PERL=yes
22007         if test "$ol_with_perl_module" != static ; then
22008                 cat >> confdefs.h <<\EOF
22009 #define SLAPD_PERL_DYNAMIC 1
22010 EOF
22011
22012                 BUILD_PERL=mod
22013                 BUILD_PERL_DYNAMIC=shared
22014                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
22015                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22016         else
22017                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22018         fi
22019 fi
22020
22021 if test "$ol_enable_shell" != no ; then
22022         cat >> confdefs.h <<\EOF
22023 #define SLAPD_SHELL 1
22024 EOF
22025
22026         BUILD_SLAPD=yes
22027         BUILD_SHELL=yes
22028         if test "$ol_with_shell_module" != static ; then
22029                 cat >> confdefs.h <<\EOF
22030 #define SLAPD_SHELL_DYNAMIC 1
22031 EOF
22032
22033                 BUILD_SHELL=mod
22034                 BUILD_SHELL_DYNAMIC=shared
22035                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
22036                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22037         else
22038                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22039         fi
22040 fi
22041
22042 if test "$ol_enable_tcl" != no ; then
22043         cat >> confdefs.h <<\EOF
22044 #define SLAPD_TCL 1
22045 EOF
22046
22047         BUILD_SLAPD=yes
22048         BUILD_TCL=yes
22049         if test "$ol_with_tcl_module" != static; then
22050                 cat >> confdefs.h <<\EOF
22051 #define SLAPD_TCL_DYNAMIC 1
22052 EOF
22053
22054                 BUILD_TCL=mod
22055                 BUILD_TCL_DYNAMIC=shared
22056                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
22057                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
22058         else
22059                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
22060         fi
22061 fi
22062
22063 if test "$ol_link_sql" != no ; then
22064         cat >> confdefs.h <<\EOF
22065 #define SLAPD_SQL 1
22066 EOF
22067
22068         BUILD_SLAPD=yes
22069         BUILD_SQL=yes
22070         if test "$ol_with_sql_module" != static; then
22071                 cat >> confdefs.h <<\EOF
22072 #define SLAPD_SQL_DYNAMIC 1
22073 EOF
22074
22075                 BUILD_SQL=mod
22076                 BUILD_SQL_DYNAMIC=shared
22077                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
22078                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22079         else
22080                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22081         fi
22082 fi
22083
22084 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22085         $BUILD_SLAPD = yes ; then
22086         BUILD_SLURPD=yes
22087 fi
22088
22089 if test "$ol_enable_rewrite" != no ; then
22090         cat >> confdefs.h <<\EOF
22091 #define ENABLE_REWRITE 1
22092 EOF
22093
22094         BUILD_REWRITE=yes
22095         SLAPD_LIBS="$SLAPD_LIBS -lrewrite"
22096 fi
22097
22098
22099
22100 if test "$ac_cv_mingw32" = yes ; then
22101         PLAT=NT
22102         SLAPD_MODULES_LDFLAGS=
22103         SLAPD_MODULES_LIST=
22104 else
22105         PLAT=UNIX
22106 fi
22107
22108
22109
22110
22111
22112
22113   
22114   
22115   
22116   
22117   
22118   
22119   
22120   
22121   
22122   
22123   
22124   
22125   
22126   
22127   
22128   
22129   
22130   
22131   
22132   
22133   
22134   
22135
22136
22137
22138
22139
22140
22141
22142
22143
22144
22145
22146
22147
22148
22149
22150
22151
22152
22153
22154
22155
22156
22157
22158
22159
22160
22161
22162
22163
22164
22165
22166
22167
22168
22169
22170
22171
22172
22173
22174
22175 # Check whether --with-xxinstall or --without-xxinstall was given.
22176 if test "${with_xxinstall+set}" = set; then
22177   withval="$with_xxinstall"
22178   :
22179 fi
22180
22181
22182
22183 trap '' 1 2 15
22184
22185 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22186
22187 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22188 # Let make expand exec_prefix.
22189 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22190
22191 # Any assignment to VPATH causes Sun make to only execute
22192 # the first set of double-colon rules, so remove it if not needed.
22193 # If there is a colon in the path, we need to keep it.
22194 if test "x$srcdir" = x.; then
22195   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22196 fi
22197
22198 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22199
22200 DEFS=-DHAVE_CONFIG_H
22201
22202 # Without the "./", some shells look in PATH for config.status.
22203 : ${CONFIG_STATUS=./config.status}
22204
22205 echo creating $CONFIG_STATUS
22206 rm -f $CONFIG_STATUS
22207 cat > $CONFIG_STATUS <<EOF
22208 #! /bin/sh
22209 # Generated automatically by configure.
22210 # Run this file to recreate the current configuration.
22211 # This directory was configured as follows,
22212 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22213 #
22214 # $0 $ac_configure_args
22215 #
22216 # Compiler output produced by configure, useful for debugging
22217 # configure, is in ./config.log if it exists.
22218
22219 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22220 for ac_option
22221 do
22222   case "\$ac_option" in
22223   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22224     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22225     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22226   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22227     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22228     exit 0 ;;
22229   -help | --help | --hel | --he | --h)
22230     echo "\$ac_cs_usage"; exit 0 ;;
22231   *) echo "\$ac_cs_usage"; exit 1 ;;
22232   esac
22233 done
22234
22235 ac_given_srcdir=$srcdir
22236 ac_given_INSTALL="$INSTALL"
22237
22238 trap 'rm -fr `echo "\
22239 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22240 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22241 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22242 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22243 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22244 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22245 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22246 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22247 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
22248 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22249 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22250 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22251 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22252 include/Makefile:build/top.mk:include/Makefile.in \
22253 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22254 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22255 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22256 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22257 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22258 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22259 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22260 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22261 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22262 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22263 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22264 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22265 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22266 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22267 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22268 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22269 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22270 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22271 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22272 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22273 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22274 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22275 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22276 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22277 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22278 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22279 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22280 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22281  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22282 EOF
22283 cat >> $CONFIG_STATUS <<EOF
22284
22285 # Protect against being on the right side of a sed subst in config.status.
22286 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22287  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22288 $ac_vpsub
22289 $extrasub
22290 s%@SHELL@%$SHELL%g
22291 s%@CFLAGS@%$CFLAGS%g
22292 s%@CPPFLAGS@%$CPPFLAGS%g
22293 s%@CXXFLAGS@%$CXXFLAGS%g
22294 s%@FFLAGS@%$FFLAGS%g
22295 s%@DEFS@%$DEFS%g
22296 s%@LDFLAGS@%$LDFLAGS%g
22297 s%@LIBS@%$LIBS%g
22298 s%@exec_prefix@%$exec_prefix%g
22299 s%@prefix@%$prefix%g
22300 s%@program_transform_name@%$program_transform_name%g
22301 s%@bindir@%$bindir%g
22302 s%@sbindir@%$sbindir%g
22303 s%@libexecdir@%$libexecdir%g
22304 s%@datadir@%$datadir%g
22305 s%@sysconfdir@%$sysconfdir%g
22306 s%@sharedstatedir@%$sharedstatedir%g
22307 s%@localstatedir@%$localstatedir%g
22308 s%@libdir@%$libdir%g
22309 s%@includedir@%$includedir%g
22310 s%@oldincludedir@%$oldincludedir%g
22311 s%@infodir@%$infodir%g
22312 s%@mandir@%$mandir%g
22313 s%@SHTOOL@%$SHTOOL%g
22314 s%@host@%$host%g
22315 s%@host_alias@%$host_alias%g
22316 s%@host_cpu@%$host_cpu%g
22317 s%@host_vendor@%$host_vendor%g
22318 s%@host_os@%$host_os%g
22319 s%@target@%$target%g
22320 s%@target_alias@%$target_alias%g
22321 s%@target_cpu@%$target_cpu%g
22322 s%@target_vendor@%$target_vendor%g
22323 s%@target_os@%$target_os%g
22324 s%@build@%$build%g
22325 s%@build_alias@%$build_alias%g
22326 s%@build_cpu@%$build_cpu%g
22327 s%@build_vendor@%$build_vendor%g
22328 s%@build_os@%$build_os%g
22329 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22330 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22331 s%@INSTALL_DATA@%$INSTALL_DATA%g
22332 s%@PACKAGE@%$PACKAGE%g
22333 s%@VERSION@%$VERSION%g
22334 s%@ACLOCAL@%$ACLOCAL%g
22335 s%@AUTOCONF@%$AUTOCONF%g
22336 s%@AUTOMAKE@%$AUTOMAKE%g
22337 s%@AUTOHEADER@%$AUTOHEADER%g
22338 s%@MAKEINFO@%$MAKEINFO%g
22339 s%@install_sh@%$install_sh%g
22340 s%@AMTAR@%$AMTAR%g
22341 s%@AWK@%$AWK%g
22342 s%@AMTARFLAGS@%$AMTARFLAGS%g
22343 s%@SET_MAKE@%$SET_MAKE%g
22344 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22345 s%@top_builddir@%$top_builddir%g
22346 s%@ldap_subdir@%$ldap_subdir%g
22347 s%@CC@%$CC%g
22348 s%@AR@%$AR%g
22349 s%@LN_S@%$LN_S%g
22350 s%@OBJEXT@%$OBJEXT%g
22351 s%@EXEEXT@%$EXEEXT%g
22352 s%@ECHO@%$ECHO%g
22353 s%@RANLIB@%$RANLIB%g
22354 s%@STRIP@%$STRIP%g
22355 s%@DLLTOOL@%$DLLTOOL%g
22356 s%@AS@%$AS%g
22357 s%@OBJDUMP@%$OBJDUMP%g
22358 s%@CPP@%$CPP%g
22359 s%@LIBTOOL@%$LIBTOOL%g
22360 s%@SENDMAIL@%$SENDMAIL%g
22361 s%@EDITOR@%$EDITOR%g
22362 s%@FINGER@%$FINGER%g
22363 s%@PERLBIN@%$PERLBIN%g
22364 s%@OL_MKDEP@%$OL_MKDEP%g
22365 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22366 s%@LIBOBJS@%$LIBOBJS%g
22367 s%@LIBSRCS@%$LIBSRCS%g
22368 s%@PLAT@%$PLAT%g
22369 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22370 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22371 s%@BUILD_BDB@%$BUILD_BDB%g
22372 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22373 s%@BUILD_LDAP@%$BUILD_LDAP%g
22374 s%@BUILD_LDBM@%$BUILD_LDBM%g
22375 s%@BUILD_META@%$BUILD_META%g
22376 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
22377 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
22378 s%@BUILD_PERL@%$BUILD_PERL%g
22379 s%@BUILD_SHELL@%$BUILD_SHELL%g
22380 s%@BUILD_SQL@%$BUILD_SQL%g
22381 s%@BUILD_TCL@%$BUILD_TCL%g
22382 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
22383 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
22384 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
22385 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
22386 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
22387 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
22388 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
22389 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
22390 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
22391 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
22392 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
22393 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
22394 s%@LDBM_LIB@%$LDBM_LIB%g
22395 s%@LDAP_LIBS@%$LDAP_LIBS%g
22396 s%@LDIF_LIBS@%$LDIF_LIBS%g
22397 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
22398 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
22399 s%@LDBM_LIBS@%$LDBM_LIBS%g
22400 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
22401 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
22402 s%@WRAP_LIBS@%$WRAP_LIBS%g
22403 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
22404 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
22405 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
22406 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
22407 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
22408 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
22409 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
22410 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
22411 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
22412 s%@KRB4_LIBS@%$KRB4_LIBS%g
22413 s%@KRB5_LIBS@%$KRB5_LIBS%g
22414 s%@READLINE_LIBS@%$READLINE_LIBS%g
22415 s%@SASL_LIBS@%$SASL_LIBS%g
22416 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
22417 s%@TLS_LIBS@%$TLS_LIBS%g
22418 s%@MODULES_LIBS@%$MODULES_LIBS%g
22419 s%@AUTH_LIBS@%$AUTH_LIBS%g
22420 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
22421 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
22422 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
22423 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
22424
22425 CEOF
22426 EOF
22427
22428 cat >> $CONFIG_STATUS <<\EOF
22429
22430 # Split the substitutions into bite-sized pieces for seds with
22431 # small command number limits, like on Digital OSF/1 and HP-UX.
22432 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
22433 ac_file=1 # Number of current file.
22434 ac_beg=1 # First line for current file.
22435 ac_end=$ac_max_sed_cmds # Line after last line for current file.
22436 ac_more_lines=:
22437 ac_sed_cmds=""
22438 while $ac_more_lines; do
22439   if test $ac_beg -gt 1; then
22440     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
22441   else
22442     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
22443   fi
22444   if test ! -s conftest.s$ac_file; then
22445     ac_more_lines=false
22446     rm -f conftest.s$ac_file
22447   else
22448     if test -z "$ac_sed_cmds"; then
22449       ac_sed_cmds="sed -f conftest.s$ac_file"
22450     else
22451       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
22452     fi
22453     ac_file=`expr $ac_file + 1`
22454     ac_beg=$ac_end
22455     ac_end=`expr $ac_end + $ac_max_sed_cmds`
22456   fi
22457 done
22458 if test -z "$ac_sed_cmds"; then
22459   ac_sed_cmds=cat
22460 fi
22461 EOF
22462
22463 cat >> $CONFIG_STATUS <<EOF
22464
22465 CONFIG_FILES=\${CONFIG_FILES-"\
22466 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22467 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22468 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22469 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22470 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22471 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22472 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22473 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22474 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
22475 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22476 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22477 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22478 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22479 include/Makefile:build/top.mk:include/Makefile.in \
22480 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22481 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22482 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22483 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22484 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22485 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22486 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22487 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22488 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22489 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22490 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22491 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22492 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22493 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22494 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22495 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22496 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22497 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22498 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22499 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22500 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22501 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22502 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22503 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22504 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22505 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22506 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22507 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22508 "}
22509 EOF
22510 cat >> $CONFIG_STATUS <<\EOF
22511 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
22512   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22513   case "$ac_file" in
22514   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22515        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22516   *) ac_file_in="${ac_file}.in" ;;
22517   esac
22518
22519   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
22520
22521   # Remove last slash and all that follows it.  Not all systems have dirname.
22522   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22523   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22524     # The file is in a subdirectory.
22525     test ! -d "$ac_dir" && mkdir "$ac_dir"
22526     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
22527     # A "../" for each directory in $ac_dir_suffix.
22528     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
22529   else
22530     ac_dir_suffix= ac_dots=
22531   fi
22532
22533   case "$ac_given_srcdir" in
22534   .)  srcdir=.
22535       if test -z "$ac_dots"; then top_srcdir=.
22536       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
22537   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
22538   *) # Relative path.
22539     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
22540     top_srcdir="$ac_dots$ac_given_srcdir" ;;
22541   esac
22542
22543   case "$ac_given_INSTALL" in
22544   [/$]*) INSTALL="$ac_given_INSTALL" ;;
22545   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
22546   esac
22547
22548   echo creating "$ac_file"
22549   rm -f "$ac_file"
22550   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
22551   case "$ac_file" in
22552   *[Mm]akefile*) ac_comsub="1i\\
22553 # $configure_input" ;;
22554   *) ac_comsub= ;;
22555   esac
22556
22557   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22558   sed -e "$ac_comsub
22559 s%@configure_input@%$configure_input%g
22560 s%@srcdir@%$srcdir%g
22561 s%@top_srcdir@%$top_srcdir%g
22562 s%@INSTALL@%$INSTALL%g
22563 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
22564 fi; done
22565 rm -f conftest.s*
22566
22567 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22568 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22569 #
22570 # ac_d sets the value in "#define NAME VALUE" lines.
22571 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22572 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
22573 ac_dC='\3'
22574 ac_dD='%g'
22575 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22576 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22577 ac_uB='\([      ]\)%\1#\2define\3'
22578 ac_uC=' '
22579 ac_uD='\4%g'
22580 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22581 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22582 ac_eB='$%\1#\2define\3'
22583 ac_eC=' '
22584 ac_eD='%g'
22585
22586 if test "${CONFIG_HEADERS+set}" != set; then
22587 EOF
22588 cat >> $CONFIG_STATUS <<EOF
22589   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
22590 EOF
22591 cat >> $CONFIG_STATUS <<\EOF
22592 fi
22593 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
22594   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22595   case "$ac_file" in
22596   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22597        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22598   *) ac_file_in="${ac_file}.in" ;;
22599   esac
22600
22601   echo creating $ac_file
22602
22603   rm -f conftest.frag conftest.in conftest.out
22604   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22605   cat $ac_file_inputs > conftest.in
22606
22607 EOF
22608
22609 # Transform confdefs.h into a sed script conftest.vals that substitutes
22610 # the proper values into config.h.in to produce config.h.  And first:
22611 # Protect against being on the right side of a sed subst in config.status.
22612 # Protect against being in an unquoted here document in config.status.
22613 rm -f conftest.vals
22614 cat > conftest.hdr <<\EOF
22615 s/[\\&%]/\\&/g
22616 s%[\\$`]%\\&%g
22617 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
22618 s%ac_d%ac_u%gp
22619 s%ac_u%ac_e%gp
22620 EOF
22621 sed -n -f conftest.hdr confdefs.h > conftest.vals
22622 rm -f conftest.hdr
22623
22624 # This sed command replaces #undef with comments.  This is necessary, for
22625 # example, in the case of _POSIX_SOURCE, which is predefined and required
22626 # on some systems where configure will not decide to define it.
22627 cat >> conftest.vals <<\EOF
22628 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
22629 EOF
22630
22631 # Break up conftest.vals because some shells have a limit on
22632 # the size of here documents, and old seds have small limits too.
22633
22634 rm -f conftest.tail
22635 while :
22636 do
22637   ac_lines=`grep -c . conftest.vals`
22638   # grep -c gives empty output for an empty file on some AIX systems.
22639   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
22640   # Write a limited-size here document to conftest.frag.
22641   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
22642   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
22643   echo 'CEOF
22644   sed -f conftest.frag conftest.in > conftest.out
22645   rm -f conftest.in
22646   mv conftest.out conftest.in
22647 ' >> $CONFIG_STATUS
22648   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22649   rm -f conftest.vals
22650   mv conftest.tail conftest.vals
22651 done
22652 rm -f conftest.vals
22653
22654 cat >> $CONFIG_STATUS <<\EOF
22655   rm -f conftest.frag conftest.h
22656   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
22657   cat conftest.in >> conftest.h
22658   rm -f conftest.in
22659   if cmp -s $ac_file conftest.h 2>/dev/null; then
22660     echo "$ac_file is unchanged"
22661     rm -f conftest.h
22662   else
22663     # Remove last slash and all that follows it.  Not all systems have dirname.
22664       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22665       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22666       # The file is in a subdirectory.
22667       test ! -d "$ac_dir" && mkdir "$ac_dir"
22668     fi
22669     rm -f $ac_file
22670     mv conftest.h $ac_file
22671   fi
22672 fi; done
22673
22674 EOF
22675 cat >> $CONFIG_STATUS <<EOF
22676
22677 EOF
22678 cat >> $CONFIG_STATUS <<\EOF
22679
22680 date > stamp-h
22681 echo Please run \"make depend\" to build dependencies
22682
22683 exit 0
22684 EOF
22685 chmod +x $CONFIG_STATUS
22686 rm -fr confdefs* $ac_clean_files
22687 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
22688