]> git.sur5r.net Git - openldap/blob - configure
No need to AC_SUBST(SHTOOL)
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.404 2002/02/10 23:28:22 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 # test for ln hardlink support
7664 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7665 echo "configure:7666: checking whether ln works" >&5
7666 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7667   echo $ac_n "(cached) $ac_c" 1>&6
7668 else
7669   rm -f conftest.src conftest.dst
7670 echo "conftest" > conftest.src
7671 if ln conftest.src conftest.dst 2>/dev/null
7672 then
7673   ol_cv_prog_LN_H="ln"
7674 else
7675   ol_cv_prog_LN_H="cp"
7676 fi
7677 rm -f conftest.src conftest.dst
7678
7679 fi
7680 LN_H="$ol_cv_prog_LN_H"
7681 if test "$ol_cv_prog_LN_H" = "ln"; then
7682         echo "$ac_t""yes" 1>&6
7683 else
7684         echo "$ac_t""no" 1>&6
7685 fi
7686
7687 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7688 echo "configure:7689: checking whether ln -s works" >&5
7689 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7690   echo $ac_n "(cached) $ac_c" 1>&6
7691 else
7692   rm -f conftestdata
7693 if ln -s X conftestdata 2>/dev/null
7694 then
7695   rm -f conftestdata
7696   ac_cv_prog_LN_S="ln -s"
7697 else
7698   ac_cv_prog_LN_S=ln
7699 fi
7700 fi
7701 LN_S="$ac_cv_prog_LN_S"
7702 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7703   echo "$ac_t""yes" 1>&6
7704 else
7705   echo "$ac_t""no" 1>&6
7706 fi
7707
7708
7709 # Extract the first word of "sendmail", so it can be a program name with args.
7710 set dummy sendmail; ac_word=$2
7711 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7712 echo "configure:7713: checking for $ac_word" >&5
7713 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7714   echo $ac_n "(cached) $ac_c" 1>&6
7715 else
7716   case "$SENDMAIL" in
7717   /*)
7718   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7719   ;;
7720   ?:/*)
7721   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7722   ;;
7723   *)
7724   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7725   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7726   for ac_dir in $ac_dummy; do 
7727     test -z "$ac_dir" && ac_dir=.
7728     if test -f $ac_dir/$ac_word; then
7729       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7730       break
7731     fi
7732   done
7733   IFS="$ac_save_ifs"
7734   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7735   ;;
7736 esac
7737 fi
7738 SENDMAIL="$ac_cv_path_SENDMAIL"
7739 if test -n "$SENDMAIL"; then
7740   echo "$ac_t""$SENDMAIL" 1>&6
7741 else
7742   echo "$ac_t""no" 1>&6
7743 fi
7744
7745 # Extract the first word of "vi", so it can be a program name with args.
7746 set dummy vi; ac_word=$2
7747 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7748 echo "configure:7749: checking for $ac_word" >&5
7749 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7750   echo $ac_n "(cached) $ac_c" 1>&6
7751 else
7752   case "$EDITOR" in
7753   /*)
7754   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7755   ;;
7756   ?:/*)
7757   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7758   ;;
7759   *)
7760   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7761   ac_dummy="$PATH:/usr/ucb"
7762   for ac_dir in $ac_dummy; do 
7763     test -z "$ac_dir" && ac_dir=.
7764     if test -f $ac_dir/$ac_word; then
7765       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7766       break
7767     fi
7768   done
7769   IFS="$ac_save_ifs"
7770   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7771   ;;
7772 esac
7773 fi
7774 EDITOR="$ac_cv_path_EDITOR"
7775 if test -n "$EDITOR"; then
7776   echo "$ac_t""$EDITOR" 1>&6
7777 else
7778   echo "$ac_t""no" 1>&6
7779 fi
7780
7781 # Extract the first word of "finger", so it can be a program name with args.
7782 set dummy finger; ac_word=$2
7783 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7784 echo "configure:7785: checking for $ac_word" >&5
7785 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
7786   echo $ac_n "(cached) $ac_c" 1>&6
7787 else
7788   case "$FINGER" in
7789   /*)
7790   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
7791   ;;
7792   ?:/*)
7793   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
7794   ;;
7795   *)
7796   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7797   ac_dummy="$PATH:/usr/ucb"
7798   for ac_dir in $ac_dummy; do 
7799     test -z "$ac_dir" && ac_dir=.
7800     if test -f $ac_dir/$ac_word; then
7801       ac_cv_path_FINGER="$ac_dir/$ac_word"
7802       break
7803     fi
7804   done
7805   IFS="$ac_save_ifs"
7806   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
7807   ;;
7808 esac
7809 fi
7810 FINGER="$ac_cv_path_FINGER"
7811 if test -n "$FINGER"; then
7812   echo "$ac_t""$FINGER" 1>&6
7813 else
7814   echo "$ac_t""no" 1>&6
7815 fi
7816
7817
7818 ol_link_perl=no
7819 if test $ol_enable_perl != no ; then
7820         # Extract the first word of "perl", so it can be a program name with args.
7821 set dummy perl; ac_word=$2
7822 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7823 echo "configure:7824: checking for $ac_word" >&5
7824 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7825   echo $ac_n "(cached) $ac_c" 1>&6
7826 else
7827   case "$PERLBIN" in
7828   /*)
7829   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7830   ;;
7831   ?:/*)
7832   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7833   ;;
7834   *)
7835   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7836   ac_dummy="$PATH"
7837   for ac_dir in $ac_dummy; do 
7838     test -z "$ac_dir" && ac_dir=.
7839     if test -f $ac_dir/$ac_word; then
7840       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7841       break
7842     fi
7843   done
7844   IFS="$ac_save_ifs"
7845   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7846   ;;
7847 esac
7848 fi
7849 PERLBIN="$ac_cv_path_PERLBIN"
7850 if test -n "$PERLBIN"; then
7851   echo "$ac_t""$PERLBIN" 1>&6
7852 else
7853   echo "$ac_t""no" 1>&6
7854 fi
7855
7856
7857         if test "no$PERLBIN" = "no" ; then
7858                 if test $ol_enable_perl = yes ; then
7859                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7860                 fi
7861
7862         else
7863                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7864                 if test x"$ol_with_perl_module" = "xstatic" ; then
7865                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7866                 else
7867                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7868                 fi
7869                                 ol_link_perl=yes
7870         fi
7871 fi
7872
7873 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7874 echo "configure:7875: checking how to run the C preprocessor" >&5
7875 # On Suns, sometimes $CPP names a directory.
7876 if test -n "$CPP" && test -d "$CPP"; then
7877   CPP=
7878 fi
7879 if test -z "$CPP"; then
7880 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7881   echo $ac_n "(cached) $ac_c" 1>&6
7882 else
7883     # This must be in double quotes, not single quotes, because CPP may get
7884   # substituted into the Makefile and "${CC-cc}" will confuse make.
7885   CPP="${CC-cc} -E"
7886   # On the NeXT, cc -E runs the code through the compiler's parser,
7887   # not just through cpp.
7888   cat > conftest.$ac_ext <<EOF
7889 #line 7890 "configure"
7890 #include "confdefs.h"
7891 #include <assert.h>
7892 Syntax Error
7893 EOF
7894 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7895 { (eval echo configure:7896: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7896 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7897 if test -z "$ac_err"; then
7898   :
7899 else
7900   echo "$ac_err" >&5
7901   echo "configure: failed program was:" >&5
7902   cat conftest.$ac_ext >&5
7903   rm -rf conftest*
7904   CPP="${CC-cc} -E -traditional-cpp"
7905   cat > conftest.$ac_ext <<EOF
7906 #line 7907 "configure"
7907 #include "confdefs.h"
7908 #include <assert.h>
7909 Syntax Error
7910 EOF
7911 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7912 { (eval echo configure:7913: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7913 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7914 if test -z "$ac_err"; then
7915   :
7916 else
7917   echo "$ac_err" >&5
7918   echo "configure: failed program was:" >&5
7919   cat conftest.$ac_ext >&5
7920   rm -rf conftest*
7921   CPP="${CC-cc} -nologo -E"
7922   cat > conftest.$ac_ext <<EOF
7923 #line 7924 "configure"
7924 #include "confdefs.h"
7925 #include <assert.h>
7926 Syntax Error
7927 EOF
7928 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7929 { (eval echo configure:7930: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7930 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7931 if test -z "$ac_err"; then
7932   :
7933 else
7934   echo "$ac_err" >&5
7935   echo "configure: failed program was:" >&5
7936   cat conftest.$ac_ext >&5
7937   rm -rf conftest*
7938   CPP=/lib/cpp
7939 fi
7940 rm -f conftest*
7941 fi
7942 rm -f conftest*
7943 fi
7944 rm -f conftest*
7945   ac_cv_prog_CPP="$CPP"
7946 fi
7947   CPP="$ac_cv_prog_CPP"
7948 else
7949   ac_cv_prog_CPP="$CPP"
7950 fi
7951 echo "$ac_t""$CPP" 1>&6
7952
7953
7954 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7955         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7956
7957 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7958         echo "configure: warning: programs compiled here do run here..." 1>&2
7959         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7960
7961 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7962         echo "configure: warning: programs compiled here do not run here..." 1>&2
7963         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7964 fi
7965
7966
7967 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7968 echo "configure:7969: checking for Cygwin environment" >&5
7969 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7970   echo $ac_n "(cached) $ac_c" 1>&6
7971 else
7972   cat > conftest.$ac_ext <<EOF
7973 #line 7974 "configure"
7974 #include "confdefs.h"
7975
7976 int main() {
7977
7978 #ifndef __CYGWIN__
7979 #define __CYGWIN__ __CYGWIN32__
7980 #endif
7981 return __CYGWIN__;
7982 ; return 0; }
7983 EOF
7984 if { (eval echo configure:7985: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7985   rm -rf conftest*
7986   ac_cv_cygwin=yes
7987 else
7988   echo "configure: failed program was:" >&5
7989   cat conftest.$ac_ext >&5
7990   rm -rf conftest*
7991   ac_cv_cygwin=no
7992 fi
7993 rm -f conftest*
7994 fi
7995
7996 echo "$ac_t""$ac_cv_cygwin" 1>&6
7997 CYGWIN=
7998 test "$ac_cv_cygwin" = yes && CYGWIN=yes
7999 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8000 echo "configure:8001: checking for mingw32 environment" >&5
8001 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8002   echo $ac_n "(cached) $ac_c" 1>&6
8003 else
8004   cat > conftest.$ac_ext <<EOF
8005 #line 8006 "configure"
8006 #include "confdefs.h"
8007
8008 int main() {
8009 return __MINGW32__;
8010 ; return 0; }
8011 EOF
8012 if { (eval echo configure:8013: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8013   rm -rf conftest*
8014   ac_cv_mingw32=yes
8015 else
8016   echo "configure: failed program was:" >&5
8017   cat conftest.$ac_ext >&5
8018   rm -rf conftest*
8019   ac_cv_mingw32=no
8020 fi
8021 rm -f conftest*
8022 fi
8023
8024 echo "$ac_t""$ac_cv_mingw32" 1>&6
8025 MINGW32=
8026 test "$ac_cv_mingw32" = yes && MINGW32=yes
8027
8028
8029
8030 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8031 echo "configure:8032: checking for executable suffix" >&5
8032 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8033   echo $ac_n "(cached) $ac_c" 1>&6
8034 else
8035   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8036   ac_cv_exeext=.exe
8037 else
8038   rm -f conftest*
8039   echo 'int main () { return 0; }' > conftest.$ac_ext
8040   ac_cv_exeext=
8041   if { (eval echo configure:8042: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8042     for file in conftest.*; do
8043       case $file in
8044       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8045       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8046       esac
8047     done
8048   else
8049     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8050   fi
8051   rm -f conftest*
8052   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8053 fi
8054 fi
8055
8056 EXEEXT=""
8057 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8058 echo "$ac_t""${ac_cv_exeext}" 1>&6
8059 ac_exeext=$EXEEXT
8060
8061 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8062 echo "configure:8063: checking for object suffix" >&5
8063 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8064   echo $ac_n "(cached) $ac_c" 1>&6
8065 else
8066   rm -f conftest*
8067 echo 'int i = 1;' > conftest.$ac_ext
8068 if { (eval echo configure:8069: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8069   for ac_file in conftest.*; do
8070     case $ac_file in
8071     *.c) ;;
8072     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8073     esac
8074   done
8075 else
8076   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8077 fi
8078 rm -f conftest*
8079 fi
8080
8081 echo "$ac_t""$ac_cv_objext" 1>&6
8082 OBJEXT=$ac_cv_objext
8083 ac_objext=$ac_cv_objext
8084
8085
8086 cat >> confdefs.h <<EOF
8087 #define EXEEXT "${EXEEXT}"
8088 EOF
8089
8090
8091 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8092 echo "configure:8093: checking for be_app in -lbe" >&5
8093 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8094 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8095   echo $ac_n "(cached) $ac_c" 1>&6
8096 else
8097   ac_save_LIBS="$LIBS"
8098 LIBS="-lbe -lroot -lnet $LIBS"
8099 cat > conftest.$ac_ext <<EOF
8100 #line 8101 "configure"
8101 #include "confdefs.h"
8102 /* Override any gcc2 internal prototype to avoid an error.  */
8103 /* We use char because int might match the return type of a gcc2
8104     builtin and then its argument prototype would still apply.  */
8105 char be_app();
8106
8107 int main() {
8108 be_app()
8109 ; return 0; }
8110 EOF
8111 if { (eval echo configure:8112: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8112   rm -rf conftest*
8113   eval "ac_cv_lib_$ac_lib_var=yes"
8114 else
8115   echo "configure: failed program was:" >&5
8116   cat conftest.$ac_ext >&5
8117   rm -rf conftest*
8118   eval "ac_cv_lib_$ac_lib_var=no"
8119 fi
8120 rm -f conftest*
8121 LIBS="$ac_save_LIBS"
8122
8123 fi
8124 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8125   echo "$ac_t""yes" 1>&6
8126   LIBS="$LIBS -lbe -lroot -lnet"
8127 else
8128   echo "$ac_t""no" 1>&6
8129 :
8130 fi
8131
8132
8133
8134
8135
8136 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8137 echo "configure:8138: checking for ${CC-cc} option to accept ANSI C" >&5
8138 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8139   echo $ac_n "(cached) $ac_c" 1>&6
8140 else
8141   am_cv_prog_cc_stdc=no
8142 ac_save_CC="$CC"
8143 # Don't try gcc -ansi; that turns off useful extensions and
8144 # breaks some systems' header files.
8145 # AIX                   -qlanglvl=ansi
8146 # Ultrix and OSF/1      -std1
8147 # HP-UX 10.20 and later -Ae
8148 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8149 # SVR4                  -Xc -D__EXTENSIONS__
8150 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8151 do
8152   CC="$ac_save_CC $ac_arg"
8153   cat > conftest.$ac_ext <<EOF
8154 #line 8155 "configure"
8155 #include "confdefs.h"
8156 #include <stdarg.h>
8157 #include <stdio.h>
8158 #include <sys/types.h>
8159 #include <sys/stat.h>
8160 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8161 struct buf { int x; };
8162 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8163 static char *e (p, i)
8164      char **p;
8165      int i;
8166 {
8167   return p[i];
8168 }
8169 static char *f (char * (*g) (char **, int), char **p, ...)
8170 {
8171   char *s;
8172   va_list v;
8173   va_start (v,p);
8174   s = g (p, va_arg (v,int));
8175   va_end (v);
8176   return s;
8177 }
8178 int test (int i, double x);
8179 struct s1 {int (*f) (int a);};
8180 struct s2 {int (*f) (double a);};
8181 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8182 int argc;
8183 char **argv;
8184
8185 int main() {
8186
8187 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8188
8189 ; return 0; }
8190 EOF
8191 if { (eval echo configure:8192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8192   rm -rf conftest*
8193   am_cv_prog_cc_stdc="$ac_arg"; break
8194 else
8195   echo "configure: failed program was:" >&5
8196   cat conftest.$ac_ext >&5
8197 fi
8198 rm -f conftest*
8199 done
8200 CC="$ac_save_CC"
8201
8202 fi
8203
8204 if test -z "$am_cv_prog_cc_stdc"; then
8205   echo "$ac_t""none needed" 1>&6
8206 else
8207   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8208 fi
8209 case "x$am_cv_prog_cc_stdc" in
8210   x|xno) ;;
8211   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8212 esac
8213
8214 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8215         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8216 fi
8217
8218 # test for make depend flag
8219 OL_MKDEP=
8220 OL_MKDEP_FLAGS=
8221 if test -z "${MKDEP}"; then
8222         OL_MKDEP="${CC-cc}"
8223         if test -z "${MKDEP_FLAGS}"; then
8224                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8225 echo "configure:8226: checking for ${OL_MKDEP} depend flag" >&5
8226 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8227   echo $ac_n "(cached) $ac_c" 1>&6
8228 else
8229   
8230                         ol_cv_mkdep=no
8231                         for flag in "-M" "-xM"; do
8232                                 cat > conftest.c <<EOF
8233  noCode;
8234 EOF
8235                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8236: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8236                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8237                                 then
8238                                         if test ! -f conftest."${ac_object}" ; then
8239                                                 ol_cv_mkdep=$flag
8240                                                 OL_MKDEP_FLAGS="$flag"
8241                                                 break
8242                                         fi
8243                                 fi
8244                         done
8245                         rm -f conftest*
8246                 
8247 fi
8248
8249 echo "$ac_t""$ol_cv_mkdep" 1>&6
8250         else
8251                 cc_cv_mkdep=yes
8252                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8253         fi
8254 else
8255         cc_cv_mkdep=yes
8256         OL_MKDEP="${MKDEP}"
8257         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8258 fi
8259
8260
8261
8262 if test "${ol_cv_mkdep}" = no ; then
8263         # this will soon become an error
8264         echo "configure: warning: do not know how to generate dependencies" 1>&2
8265 fi
8266
8267 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8268 echo "configure:8269: checking for afopen in -ls" >&5
8269 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8270 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8271   echo $ac_n "(cached) $ac_c" 1>&6
8272 else
8273   ac_save_LIBS="$LIBS"
8274 LIBS="-ls  $LIBS"
8275 cat > conftest.$ac_ext <<EOF
8276 #line 8277 "configure"
8277 #include "confdefs.h"
8278 /* Override any gcc2 internal prototype to avoid an error.  */
8279 /* We use char because int might match the return type of a gcc2
8280     builtin and then its argument prototype would still apply.  */
8281 char afopen();
8282
8283 int main() {
8284 afopen()
8285 ; return 0; }
8286 EOF
8287 if { (eval echo configure:8288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8288   rm -rf conftest*
8289   eval "ac_cv_lib_$ac_lib_var=yes"
8290 else
8291   echo "configure: failed program was:" >&5
8292   cat conftest.$ac_ext >&5
8293   rm -rf conftest*
8294   eval "ac_cv_lib_$ac_lib_var=no"
8295 fi
8296 rm -f conftest*
8297 LIBS="$ac_save_LIBS"
8298
8299 fi
8300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8301   echo "$ac_t""yes" 1>&6
8302   
8303         AUTH_LIBS=-ls
8304         cat >> confdefs.h <<\EOF
8305 #define HAVE_AIX_SECURITY 1
8306 EOF
8307
8308
8309 else
8310   echo "$ac_t""no" 1>&6
8311 fi
8312
8313
8314
8315 ol_link_modules=no
8316 if test $ol_enable_modules != no ; then
8317         for ac_hdr in ltdl.h
8318 do
8319 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8320 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8321 echo "configure:8322: checking for $ac_hdr" >&5
8322 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8323   echo $ac_n "(cached) $ac_c" 1>&6
8324 else
8325   cat > conftest.$ac_ext <<EOF
8326 #line 8327 "configure"
8327 #include "confdefs.h"
8328 #include <$ac_hdr>
8329 EOF
8330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8331 { (eval echo configure:8332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8333 if test -z "$ac_err"; then
8334   rm -rf conftest*
8335   eval "ac_cv_header_$ac_safe=yes"
8336 else
8337   echo "$ac_err" >&5
8338   echo "configure: failed program was:" >&5
8339   cat conftest.$ac_ext >&5
8340   rm -rf conftest*
8341   eval "ac_cv_header_$ac_safe=no"
8342 fi
8343 rm -f conftest*
8344 fi
8345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8346   echo "$ac_t""yes" 1>&6
8347     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8348   cat >> confdefs.h <<EOF
8349 #define $ac_tr_hdr 1
8350 EOF
8351  
8352 else
8353   echo "$ac_t""no" 1>&6
8354 fi
8355 done
8356
8357
8358         if test $ac_cv_header_ltdl_h = no ; then
8359                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8360         fi
8361
8362         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8363 echo "configure:8364: checking for lt_dlinit in -lltdl" >&5
8364 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8365 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8366   echo $ac_n "(cached) $ac_c" 1>&6
8367 else
8368   ac_save_LIBS="$LIBS"
8369 LIBS="-lltdl  $LIBS"
8370 cat > conftest.$ac_ext <<EOF
8371 #line 8372 "configure"
8372 #include "confdefs.h"
8373 /* Override any gcc2 internal prototype to avoid an error.  */
8374 /* We use char because int might match the return type of a gcc2
8375     builtin and then its argument prototype would still apply.  */
8376 char lt_dlinit();
8377
8378 int main() {
8379 lt_dlinit()
8380 ; return 0; }
8381 EOF
8382 if { (eval echo configure:8383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8383   rm -rf conftest*
8384   eval "ac_cv_lib_$ac_lib_var=yes"
8385 else
8386   echo "configure: failed program was:" >&5
8387   cat conftest.$ac_ext >&5
8388   rm -rf conftest*
8389   eval "ac_cv_lib_$ac_lib_var=no"
8390 fi
8391 rm -f conftest*
8392 LIBS="$ac_save_LIBS"
8393
8394 fi
8395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8396   echo "$ac_t""yes" 1>&6
8397   
8398                 MODULES_LIBS=-lltdl
8399                 cat >> confdefs.h <<\EOF
8400 #define HAVE_LIBLTDL 1
8401 EOF
8402
8403         
8404 else
8405   echo "$ac_t""no" 1>&6
8406 fi
8407
8408
8409         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8410                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8411         fi
8412         ol_link_modules=yes
8413 else
8414         ol_with_bdb_module=static
8415         ol_with_dnssrv_module=static
8416         ol_with_ldap_module=static
8417         ol_with_ldbm_module=static
8418         ol_with_meta_module=static
8419         ol_with_monitor_module=static
8420         ol_with_passwd_module=static
8421         ol_with_perl_module=static
8422         ol_with_shell_module=static
8423         ol_with_tcl_module=static
8424         ol_with_sql_module=static
8425 fi
8426
8427 # test for EBCDIC
8428 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8429 echo "configure:8430: checking for EBCDIC" >&5
8430 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8431   echo $ac_n "(cached) $ac_c" 1>&6
8432 else
8433   
8434         cat > conftest.$ac_ext <<EOF
8435 #line 8436 "configure"
8436 #include "confdefs.h"
8437
8438 #if !('M' == 0xd4)
8439 #include <__ASCII__/generate_error.h>
8440 #endif
8441
8442 EOF
8443 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8444 { (eval echo configure:8445: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8445 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8446 if test -z "$ac_err"; then
8447   rm -rf conftest*
8448   ol_cv_cpp_ebcdic=yes
8449 else
8450   echo "$ac_err" >&5
8451   echo "configure: failed program was:" >&5
8452   cat conftest.$ac_ext >&5
8453   rm -rf conftest*
8454   ol_cv_cpp_ebcdic=no
8455 fi
8456 rm -f conftest*
8457 fi
8458
8459 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8460 if test $ol_cv_cpp_ebcdic = yes ; then
8461         cat >> confdefs.h <<\EOF
8462 #define HAVE_EBCDIC 1
8463 EOF
8464
8465 fi
8466
8467 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8468 echo "configure:8469: checking for ANSI C header files" >&5
8469 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8470   echo $ac_n "(cached) $ac_c" 1>&6
8471 else
8472   cat > conftest.$ac_ext <<EOF
8473 #line 8474 "configure"
8474 #include "confdefs.h"
8475 #include <stdlib.h>
8476 #include <stdarg.h>
8477 #include <string.h>
8478 #include <float.h>
8479 EOF
8480 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8481 { (eval echo configure:8482: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8482 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8483 if test -z "$ac_err"; then
8484   rm -rf conftest*
8485   ol_cv_header_stdc=yes
8486 else
8487   echo "$ac_err" >&5
8488   echo "configure: failed program was:" >&5
8489   cat conftest.$ac_ext >&5
8490   rm -rf conftest*
8491   ol_cv_header_stdc=no
8492 fi
8493 rm -f conftest*
8494
8495 if test $ol_cv_header_stdc = yes; then
8496   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8497 cat > conftest.$ac_ext <<EOF
8498 #line 8499 "configure"
8499 #include "confdefs.h"
8500 #include <string.h>
8501 EOF
8502 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8503   egrep "memchr" >/dev/null 2>&1; then
8504   :
8505 else
8506   rm -rf conftest*
8507   ol_cv_header_stdc=no
8508 fi
8509 rm -f conftest*
8510
8511 fi
8512
8513 if test $ol_cv_header_stdc = yes; then
8514   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8515 cat > conftest.$ac_ext <<EOF
8516 #line 8517 "configure"
8517 #include "confdefs.h"
8518 #include <stdlib.h>
8519 EOF
8520 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8521   egrep "free" >/dev/null 2>&1; then
8522   :
8523 else
8524   rm -rf conftest*
8525   ol_cv_header_stdc=no
8526 fi
8527 rm -f conftest*
8528
8529 fi
8530
8531 if test $ol_cv_header_stdc = yes; then
8532   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8533 if test "$cross_compiling" = yes; then
8534   :
8535 else
8536   cat > conftest.$ac_ext <<EOF
8537 #line 8538 "configure"
8538 #include "confdefs.h"
8539 #include <ctype.h>
8540 #ifndef HAVE_EBCDIC
8541 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8542 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8543 #else
8544 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8545                 || ('j' <= (c) && (c) <= 'r') \
8546                 || ('s' <= (c) && (c) <= 'z'))
8547 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8548 #endif
8549 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8550 int main () { int i; for (i = 0; i < 256; i++)
8551 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8552 exit (0); }
8553
8554 EOF
8555 if { (eval echo configure:8556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8556 then
8557   :
8558 else
8559   echo "configure: failed program was:" >&5
8560   cat conftest.$ac_ext >&5
8561   rm -fr conftest*
8562   ol_cv_header_stdc=no
8563 fi
8564 rm -fr conftest*
8565 fi
8566
8567 fi
8568 fi
8569
8570 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8571 if test $ol_cv_header_stdc = yes; then
8572   cat >> confdefs.h <<\EOF
8573 #define STDC_HEADERS 1
8574 EOF
8575
8576 fi
8577 ac_cv_header_stdc=disable
8578
8579
8580 if test $ol_cv_header_stdc != yes; then
8581         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8582 fi
8583
8584 ac_header_dirent=no
8585 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8586 do
8587 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8588 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8589 echo "configure:8590: checking for $ac_hdr that defines DIR" >&5
8590 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8591   echo $ac_n "(cached) $ac_c" 1>&6
8592 else
8593   cat > conftest.$ac_ext <<EOF
8594 #line 8595 "configure"
8595 #include "confdefs.h"
8596 #include <sys/types.h>
8597 #include <$ac_hdr>
8598 int main() {
8599 DIR *dirp = 0;
8600 ; return 0; }
8601 EOF
8602 if { (eval echo configure:8603: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8603   rm -rf conftest*
8604   eval "ac_cv_header_dirent_$ac_safe=yes"
8605 else
8606   echo "configure: failed program was:" >&5
8607   cat conftest.$ac_ext >&5
8608   rm -rf conftest*
8609   eval "ac_cv_header_dirent_$ac_safe=no"
8610 fi
8611 rm -f conftest*
8612 fi
8613 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8614   echo "$ac_t""yes" 1>&6
8615     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8616   cat >> confdefs.h <<EOF
8617 #define $ac_tr_hdr 1
8618 EOF
8619  ac_header_dirent=$ac_hdr; break
8620 else
8621   echo "$ac_t""no" 1>&6
8622 fi
8623 done
8624 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8625 if test $ac_header_dirent = dirent.h; then
8626 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8627 echo "configure:8628: checking for opendir in -ldir" >&5
8628 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8629 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8630   echo $ac_n "(cached) $ac_c" 1>&6
8631 else
8632   ac_save_LIBS="$LIBS"
8633 LIBS="-ldir  $LIBS"
8634 cat > conftest.$ac_ext <<EOF
8635 #line 8636 "configure"
8636 #include "confdefs.h"
8637 /* Override any gcc2 internal prototype to avoid an error.  */
8638 /* We use char because int might match the return type of a gcc2
8639     builtin and then its argument prototype would still apply.  */
8640 char opendir();
8641
8642 int main() {
8643 opendir()
8644 ; return 0; }
8645 EOF
8646 if { (eval echo configure:8647: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8647   rm -rf conftest*
8648   eval "ac_cv_lib_$ac_lib_var=yes"
8649 else
8650   echo "configure: failed program was:" >&5
8651   cat conftest.$ac_ext >&5
8652   rm -rf conftest*
8653   eval "ac_cv_lib_$ac_lib_var=no"
8654 fi
8655 rm -f conftest*
8656 LIBS="$ac_save_LIBS"
8657
8658 fi
8659 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8660   echo "$ac_t""yes" 1>&6
8661   LIBS="$LIBS -ldir"
8662 else
8663   echo "$ac_t""no" 1>&6
8664 fi
8665
8666 else
8667 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8668 echo "configure:8669: checking for opendir in -lx" >&5
8669 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8670 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8671   echo $ac_n "(cached) $ac_c" 1>&6
8672 else
8673   ac_save_LIBS="$LIBS"
8674 LIBS="-lx  $LIBS"
8675 cat > conftest.$ac_ext <<EOF
8676 #line 8677 "configure"
8677 #include "confdefs.h"
8678 /* Override any gcc2 internal prototype to avoid an error.  */
8679 /* We use char because int might match the return type of a gcc2
8680     builtin and then its argument prototype would still apply.  */
8681 char opendir();
8682
8683 int main() {
8684 opendir()
8685 ; return 0; }
8686 EOF
8687 if { (eval echo configure:8688: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8688   rm -rf conftest*
8689   eval "ac_cv_lib_$ac_lib_var=yes"
8690 else
8691   echo "configure: failed program was:" >&5
8692   cat conftest.$ac_ext >&5
8693   rm -rf conftest*
8694   eval "ac_cv_lib_$ac_lib_var=no"
8695 fi
8696 rm -f conftest*
8697 LIBS="$ac_save_LIBS"
8698
8699 fi
8700 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8701   echo "$ac_t""yes" 1>&6
8702   LIBS="$LIBS -lx"
8703 else
8704   echo "$ac_t""no" 1>&6
8705 fi
8706
8707 fi
8708
8709 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8710 echo "configure:8711: checking for sys/wait.h that is POSIX.1 compatible" >&5
8711 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8712   echo $ac_n "(cached) $ac_c" 1>&6
8713 else
8714   cat > conftest.$ac_ext <<EOF
8715 #line 8716 "configure"
8716 #include "confdefs.h"
8717 #include <sys/types.h>
8718 #include <sys/wait.h>
8719 #ifndef WEXITSTATUS
8720 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8721 #endif
8722 #ifndef WIFEXITED
8723 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8724 #endif
8725 int main() {
8726 int s;
8727 wait (&s);
8728 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8729 ; return 0; }
8730 EOF
8731 if { (eval echo configure:8732: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8732   rm -rf conftest*
8733   ac_cv_header_sys_wait_h=yes
8734 else
8735   echo "configure: failed program was:" >&5
8736   cat conftest.$ac_ext >&5
8737   rm -rf conftest*
8738   ac_cv_header_sys_wait_h=no
8739 fi
8740 rm -f conftest*
8741 fi
8742
8743 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8744 if test $ac_cv_header_sys_wait_h = yes; then
8745   cat >> confdefs.h <<\EOF
8746 #define HAVE_SYS_WAIT_H 1
8747 EOF
8748
8749 fi
8750
8751 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8752 echo "configure:8753: checking POSIX termios" >&5
8753 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8754   echo $ac_n "(cached) $ac_c" 1>&6
8755 else
8756   cat > conftest.$ac_ext <<EOF
8757 #line 8758 "configure"
8758 #include "confdefs.h"
8759 #include <sys/types.h>
8760 #include <unistd.h>
8761 #include <termios.h>
8762 int main() {
8763 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8764    tcgetattr(0, 0);
8765 ; return 0; }
8766 EOF
8767 if { (eval echo configure:8768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8768   rm -rf conftest*
8769   am_cv_sys_posix_termios=yes
8770 else
8771   echo "configure: failed program was:" >&5
8772   cat conftest.$ac_ext >&5
8773   rm -rf conftest*
8774   am_cv_sys_posix_termios=no
8775 fi
8776 rm -f conftest*
8777 fi
8778
8779 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8780
8781
8782  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8783 echo "configure:8784: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8784 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8785   echo $ac_n "(cached) $ac_c" 1>&6
8786 else
8787   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8788
8789   gwinsz_in_termios_h=no
8790   if test $am_cv_sys_posix_termios = yes; then
8791     cat > conftest.$ac_ext <<EOF
8792 #line 8793 "configure"
8793 #include "confdefs.h"
8794 #include <sys/types.h>
8795 #     include <termios.h>
8796 #     ifdef TIOCGWINSZ
8797         yes
8798 #     endif
8799     
8800 EOF
8801 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8802   egrep "yes" >/dev/null 2>&1; then
8803   rm -rf conftest*
8804   gwinsz_in_termios_h=yes
8805 fi
8806 rm -f conftest*
8807
8808   fi
8809
8810   if test $gwinsz_in_termios_h = no; then
8811     cat > conftest.$ac_ext <<EOF
8812 #line 8813 "configure"
8813 #include "confdefs.h"
8814 #include <sys/types.h>
8815 #     include <sys/ioctl.h>
8816 #     ifdef TIOCGWINSZ
8817         yes
8818 #     endif
8819     
8820 EOF
8821 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8822   egrep "yes" >/dev/null 2>&1; then
8823   rm -rf conftest*
8824   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8825 fi
8826 rm -f conftest*
8827
8828   fi
8829   
8830 fi
8831
8832 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8833   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8834     cat >> confdefs.h <<\EOF
8835 #define GWINSZ_IN_SYS_IOCTL 1
8836 EOF
8837
8838   fi
8839
8840 if test $am_cv_sys_posix_termios = yes ; then
8841         cat >> confdefs.h <<\EOF
8842 #define HAVE_POSIX_TERMIOS 1
8843 EOF
8844
8845 fi
8846
8847 for ac_hdr in \
8848         arpa/inet.h             \
8849         arpa/nameser.h  \
8850         assert.h                \
8851         conio.h                 \
8852         crypt.h                 \
8853         direct.h                \
8854         errno.h                 \
8855         fcntl.h                 \
8856         filio.h                 \
8857         getopt.h                \
8858         grp.h                   \
8859         io.h                    \
8860         libutil.h               \
8861         limits.h                \
8862         locale.h                \
8863         netinet/tcp.h   \
8864         malloc.h                \
8865         memory.h                \
8866         psap.h                  \
8867         pwd.h                   \
8868         process.h               \
8869         resolv.h                \
8870         sgtty.h                 \
8871         shadow.h                \
8872         stddef.h                \
8873         string.h                \
8874         strings.h               \
8875         sysexits.h              \
8876         sys/file.h              \
8877         sys/filio.h             \
8878         sys/errno.h             \
8879         sys/ioctl.h             \
8880         sys/param.h             \
8881         sys/resource.h  \
8882         sys/select.h    \
8883         sys/socket.h    \
8884         sys/syslog.h    \
8885         sys/time.h              \
8886         sys/types.h             \
8887         syslog.h                \
8888         termios.h               \
8889         unistd.h                \
8890         winsock.h               \
8891         winsock2.h              \
8892
8893 do
8894 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8895 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8896 echo "configure:8897: checking for $ac_hdr" >&5
8897 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8898   echo $ac_n "(cached) $ac_c" 1>&6
8899 else
8900   cat > conftest.$ac_ext <<EOF
8901 #line 8902 "configure"
8902 #include "confdefs.h"
8903 #include <$ac_hdr>
8904 EOF
8905 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8906 { (eval echo configure:8907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8907 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8908 if test -z "$ac_err"; then
8909   rm -rf conftest*
8910   eval "ac_cv_header_$ac_safe=yes"
8911 else
8912   echo "$ac_err" >&5
8913   echo "configure: failed program was:" >&5
8914   cat conftest.$ac_ext >&5
8915   rm -rf conftest*
8916   eval "ac_cv_header_$ac_safe=no"
8917 fi
8918 rm -f conftest*
8919 fi
8920 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8921   echo "$ac_t""yes" 1>&6
8922     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8923   cat >> confdefs.h <<EOF
8924 #define $ac_tr_hdr 1
8925 EOF
8926  
8927 else
8928   echo "$ac_t""no" 1>&6
8929 fi
8930 done
8931
8932
8933
8934
8935 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8936 echo "configure:8937: checking for dlopen" >&5
8937 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8938   echo $ac_n "(cached) $ac_c" 1>&6
8939 else
8940   cat > conftest.$ac_ext <<EOF
8941 #line 8942 "configure"
8942 #include "confdefs.h"
8943 /* System header to define __stub macros and hopefully few prototypes,
8944     which can conflict with char dlopen(); below.  */
8945 #include <assert.h>
8946 /* Override any gcc2 internal prototype to avoid an error.  */
8947 /* We use char because int might match the return type of a gcc2
8948     builtin and then its argument prototype would still apply.  */
8949 char dlopen();
8950 char (*f)();
8951
8952 int main() {
8953
8954 /* The GNU C library defines this for functions which it implements
8955     to always fail with ENOSYS.  Some functions are actually named
8956     something starting with __ and the normal name is an alias.  */
8957 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8958 choke me
8959 #else
8960 f = dlopen;
8961 #endif
8962
8963 ; return 0; }
8964 EOF
8965 if { (eval echo configure:8966: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8966   rm -rf conftest*
8967   eval "ac_cv_func_dlopen=yes"
8968 else
8969   echo "configure: failed program was:" >&5
8970   cat conftest.$ac_ext >&5
8971   rm -rf conftest*
8972   eval "ac_cv_func_dlopen=no"
8973 fi
8974 rm -f conftest*
8975 fi
8976
8977 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
8978   echo "$ac_t""yes" 1>&6
8979   :
8980 else
8981   echo "$ac_t""no" 1>&6
8982 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
8983 echo "configure:8984: checking for dlopen in -ldl" >&5
8984 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
8985 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8986   echo $ac_n "(cached) $ac_c" 1>&6
8987 else
8988   ac_save_LIBS="$LIBS"
8989 LIBS="-ldl  $LIBS"
8990 cat > conftest.$ac_ext <<EOF
8991 #line 8992 "configure"
8992 #include "confdefs.h"
8993 /* Override any gcc2 internal prototype to avoid an error.  */
8994 /* We use char because int might match the return type of a gcc2
8995     builtin and then its argument prototype would still apply.  */
8996 char dlopen();
8997
8998 int main() {
8999 dlopen()
9000 ; return 0; }
9001 EOF
9002 if { (eval echo configure:9003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9003   rm -rf conftest*
9004   eval "ac_cv_lib_$ac_lib_var=yes"
9005 else
9006   echo "configure: failed program was:" >&5
9007   cat conftest.$ac_ext >&5
9008   rm -rf conftest*
9009   eval "ac_cv_lib_$ac_lib_var=no"
9010 fi
9011 rm -f conftest*
9012 LIBS="$ac_save_LIBS"
9013
9014 fi
9015 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9016   echo "$ac_t""yes" 1>&6
9017     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9018     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9019   cat >> confdefs.h <<EOF
9020 #define $ac_tr_lib 1
9021 EOF
9022
9023   LIBS="-ldl $LIBS"
9024
9025 else
9026   echo "$ac_t""no" 1>&6
9027 fi
9028
9029 fi
9030
9031
9032 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9033 echo "configure:9034: checking for sigset in -lV3" >&5
9034 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9035 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9036   echo $ac_n "(cached) $ac_c" 1>&6
9037 else
9038   ac_save_LIBS="$LIBS"
9039 LIBS="-lV3  $LIBS"
9040 cat > conftest.$ac_ext <<EOF
9041 #line 9042 "configure"
9042 #include "confdefs.h"
9043 /* Override any gcc2 internal prototype to avoid an error.  */
9044 /* We use char because int might match the return type of a gcc2
9045     builtin and then its argument prototype would still apply.  */
9046 char sigset();
9047
9048 int main() {
9049 sigset()
9050 ; return 0; }
9051 EOF
9052 if { (eval echo configure:9053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9053   rm -rf conftest*
9054   eval "ac_cv_lib_$ac_lib_var=yes"
9055 else
9056   echo "configure: failed program was:" >&5
9057   cat conftest.$ac_ext >&5
9058   rm -rf conftest*
9059   eval "ac_cv_lib_$ac_lib_var=no"
9060 fi
9061 rm -f conftest*
9062 LIBS="$ac_save_LIBS"
9063
9064 fi
9065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9066   echo "$ac_t""yes" 1>&6
9067     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9068     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9069   cat >> confdefs.h <<EOF
9070 #define $ac_tr_lib 1
9071 EOF
9072
9073   LIBS="-lV3 $LIBS"
9074
9075 else
9076   echo "$ac_t""no" 1>&6
9077 fi
9078
9079
9080 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9081 echo "configure:9082: checking for winsock" >&5
9082 save_LIBS="$LIBS"
9083 for curlib in ws2_32 wsock32; do
9084         LIBS="$LIBS -l$curlib"
9085         cat > conftest.$ac_ext <<EOF
9086 #line 9087 "configure"
9087 #include "confdefs.h"
9088
9089                         char socket@12();
9090                         char select@20();
9091                         char closesocket@4();
9092                         char gethostname@8();
9093                         
9094 int main() {
9095
9096                         socket@12();
9097                         select@20();
9098                         closesocket@4();
9099                         gethostname@8();
9100                         
9101 ; return 0; }
9102 EOF
9103 if { (eval echo configure:9104: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9104   rm -rf conftest*
9105   have_winsock=yes
9106 else
9107   echo "configure: failed program was:" >&5
9108   cat conftest.$ac_ext >&5
9109   rm -rf conftest*
9110   have_winsock=no
9111 fi
9112 rm -f conftest*
9113
9114         if test $have_winsock = yes; then
9115                 cat >> confdefs.h <<\EOF
9116 #define HAVE_WINSOCK 1
9117 EOF
9118
9119                 ac_cv_func_socket=yes
9120                 ac_cv_func_select=yes
9121                 ac_cv_func_closesocket=yes
9122                 ac_cv_func_gethostname=yes
9123                 if test $curlib = ws2_32; then
9124                         have_winsock=winsock2
9125                         cat >> confdefs.h <<\EOF
9126 #define HAVE_WINSOCK2 1
9127 EOF
9128
9129                 fi
9130                 break
9131         fi
9132         LIBS="$save_LIBS"
9133 done
9134 echo "$ac_t""$have_winsock" 1>&6
9135
9136
9137 echo $ac_n "checking for socket""... $ac_c" 1>&6
9138 echo "configure:9139: checking for socket" >&5
9139 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9140   echo $ac_n "(cached) $ac_c" 1>&6
9141 else
9142   cat > conftest.$ac_ext <<EOF
9143 #line 9144 "configure"
9144 #include "confdefs.h"
9145 /* System header to define __stub macros and hopefully few prototypes,
9146     which can conflict with char socket(); below.  */
9147 #include <assert.h>
9148 /* Override any gcc2 internal prototype to avoid an error.  */
9149 /* We use char because int might match the return type of a gcc2
9150     builtin and then its argument prototype would still apply.  */
9151 char socket();
9152 char (*f)();
9153
9154 int main() {
9155
9156 /* The GNU C library defines this for functions which it implements
9157     to always fail with ENOSYS.  Some functions are actually named
9158     something starting with __ and the normal name is an alias.  */
9159 #if defined (__stub_socket) || defined (__stub___socket)
9160 choke me
9161 #else
9162 f = socket;
9163 #endif
9164
9165 ; return 0; }
9166 EOF
9167 if { (eval echo configure:9168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9168   rm -rf conftest*
9169   eval "ac_cv_func_socket=yes"
9170 else
9171   echo "configure: failed program was:" >&5
9172   cat conftest.$ac_ext >&5
9173   rm -rf conftest*
9174   eval "ac_cv_func_socket=no"
9175 fi
9176 rm -f conftest*
9177 fi
9178
9179 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9180   echo "$ac_t""yes" 1>&6
9181   :
9182 else
9183   echo "$ac_t""no" 1>&6
9184         
9185         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9186 echo "configure:9187: checking for main in -lsocket" >&5
9187 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9188 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9189   echo $ac_n "(cached) $ac_c" 1>&6
9190 else
9191   ac_save_LIBS="$LIBS"
9192 LIBS="-lsocket  $LIBS"
9193 cat > conftest.$ac_ext <<EOF
9194 #line 9195 "configure"
9195 #include "confdefs.h"
9196
9197 int main() {
9198 main()
9199 ; return 0; }
9200 EOF
9201 if { (eval echo configure:9202: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9202   rm -rf conftest*
9203   eval "ac_cv_lib_$ac_lib_var=yes"
9204 else
9205   echo "configure: failed program was:" >&5
9206   cat conftest.$ac_ext >&5
9207   rm -rf conftest*
9208   eval "ac_cv_lib_$ac_lib_var=no"
9209 fi
9210 rm -f conftest*
9211 LIBS="$ac_save_LIBS"
9212
9213 fi
9214 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9215   echo "$ac_t""yes" 1>&6
9216     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9217     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9218   cat >> confdefs.h <<EOF
9219 #define $ac_tr_lib 1
9220 EOF
9221
9222   LIBS="-lsocket $LIBS"
9223
9224 else
9225   echo "$ac_t""no" 1>&6
9226 fi
9227
9228         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9229 echo "configure:9230: checking for main in -lnet" >&5
9230 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9231 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9232   echo $ac_n "(cached) $ac_c" 1>&6
9233 else
9234   ac_save_LIBS="$LIBS"
9235 LIBS="-lnet  $LIBS"
9236 cat > conftest.$ac_ext <<EOF
9237 #line 9238 "configure"
9238 #include "confdefs.h"
9239
9240 int main() {
9241 main()
9242 ; return 0; }
9243 EOF
9244 if { (eval echo configure:9245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9245   rm -rf conftest*
9246   eval "ac_cv_lib_$ac_lib_var=yes"
9247 else
9248   echo "configure: failed program was:" >&5
9249   cat conftest.$ac_ext >&5
9250   rm -rf conftest*
9251   eval "ac_cv_lib_$ac_lib_var=no"
9252 fi
9253 rm -f conftest*
9254 LIBS="$ac_save_LIBS"
9255
9256 fi
9257 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9258   echo "$ac_t""yes" 1>&6
9259     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9260     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9261   cat >> confdefs.h <<EOF
9262 #define $ac_tr_lib 1
9263 EOF
9264
9265   LIBS="-lnet $LIBS"
9266
9267 else
9268   echo "$ac_t""no" 1>&6
9269 fi
9270
9271         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9272 echo "configure:9273: checking for main in -lnsl_s" >&5
9273 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9274 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9275   echo $ac_n "(cached) $ac_c" 1>&6
9276 else
9277   ac_save_LIBS="$LIBS"
9278 LIBS="-lnsl_s  $LIBS"
9279 cat > conftest.$ac_ext <<EOF
9280 #line 9281 "configure"
9281 #include "confdefs.h"
9282
9283 int main() {
9284 main()
9285 ; return 0; }
9286 EOF
9287 if { (eval echo configure:9288: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9288   rm -rf conftest*
9289   eval "ac_cv_lib_$ac_lib_var=yes"
9290 else
9291   echo "configure: failed program was:" >&5
9292   cat conftest.$ac_ext >&5
9293   rm -rf conftest*
9294   eval "ac_cv_lib_$ac_lib_var=no"
9295 fi
9296 rm -f conftest*
9297 LIBS="$ac_save_LIBS"
9298
9299 fi
9300 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9301   echo "$ac_t""yes" 1>&6
9302     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9303     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9304   cat >> confdefs.h <<EOF
9305 #define $ac_tr_lib 1
9306 EOF
9307
9308   LIBS="-lnsl_s $LIBS"
9309
9310 else
9311   echo "$ac_t""no" 1>&6
9312 fi
9313
9314         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9315 echo "configure:9316: checking for main in -lnsl" >&5
9316 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9317 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9318   echo $ac_n "(cached) $ac_c" 1>&6
9319 else
9320   ac_save_LIBS="$LIBS"
9321 LIBS="-lnsl  $LIBS"
9322 cat > conftest.$ac_ext <<EOF
9323 #line 9324 "configure"
9324 #include "confdefs.h"
9325
9326 int main() {
9327 main()
9328 ; return 0; }
9329 EOF
9330 if { (eval echo configure:9331: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9331   rm -rf conftest*
9332   eval "ac_cv_lib_$ac_lib_var=yes"
9333 else
9334   echo "configure: failed program was:" >&5
9335   cat conftest.$ac_ext >&5
9336   rm -rf conftest*
9337   eval "ac_cv_lib_$ac_lib_var=no"
9338 fi
9339 rm -f conftest*
9340 LIBS="$ac_save_LIBS"
9341
9342 fi
9343 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9344   echo "$ac_t""yes" 1>&6
9345     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9346     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9347   cat >> confdefs.h <<EOF
9348 #define $ac_tr_lib 1
9349 EOF
9350
9351   LIBS="-lnsl $LIBS"
9352
9353 else
9354   echo "$ac_t""no" 1>&6
9355 fi
9356
9357         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9358 echo "configure:9359: checking for socket in -linet" >&5
9359 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9360 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9361   echo $ac_n "(cached) $ac_c" 1>&6
9362 else
9363   ac_save_LIBS="$LIBS"
9364 LIBS="-linet  $LIBS"
9365 cat > conftest.$ac_ext <<EOF
9366 #line 9367 "configure"
9367 #include "confdefs.h"
9368 /* Override any gcc2 internal prototype to avoid an error.  */
9369 /* We use char because int might match the return type of a gcc2
9370     builtin and then its argument prototype would still apply.  */
9371 char socket();
9372
9373 int main() {
9374 socket()
9375 ; return 0; }
9376 EOF
9377 if { (eval echo configure:9378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9378   rm -rf conftest*
9379   eval "ac_cv_lib_$ac_lib_var=yes"
9380 else
9381   echo "configure: failed program was:" >&5
9382   cat conftest.$ac_ext >&5
9383   rm -rf conftest*
9384   eval "ac_cv_lib_$ac_lib_var=no"
9385 fi
9386 rm -f conftest*
9387 LIBS="$ac_save_LIBS"
9388
9389 fi
9390 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9391   echo "$ac_t""yes" 1>&6
9392     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9393     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9394   cat >> confdefs.h <<EOF
9395 #define $ac_tr_lib 1
9396 EOF
9397
9398   LIBS="-linet $LIBS"
9399
9400 else
9401   echo "$ac_t""no" 1>&6
9402 fi
9403
9404         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9405 echo "configure:9406: checking for main in -lgen" >&5
9406 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9407 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9408   echo $ac_n "(cached) $ac_c" 1>&6
9409 else
9410   ac_save_LIBS="$LIBS"
9411 LIBS="-lgen  $LIBS"
9412 cat > conftest.$ac_ext <<EOF
9413 #line 9414 "configure"
9414 #include "confdefs.h"
9415
9416 int main() {
9417 main()
9418 ; return 0; }
9419 EOF
9420 if { (eval echo configure:9421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9421   rm -rf conftest*
9422   eval "ac_cv_lib_$ac_lib_var=yes"
9423 else
9424   echo "configure: failed program was:" >&5
9425   cat conftest.$ac_ext >&5
9426   rm -rf conftest*
9427   eval "ac_cv_lib_$ac_lib_var=no"
9428 fi
9429 rm -f conftest*
9430 LIBS="$ac_save_LIBS"
9431
9432 fi
9433 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9434   echo "$ac_t""yes" 1>&6
9435     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9436     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9437   cat >> confdefs.h <<EOF
9438 #define $ac_tr_lib 1
9439 EOF
9440
9441   LIBS="-lgen $LIBS"
9442
9443 else
9444   echo "$ac_t""no" 1>&6
9445 fi
9446
9447
9448 fi
9449
9450
9451 echo $ac_n "checking for select""... $ac_c" 1>&6
9452 echo "configure:9453: checking for select" >&5
9453 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9454   echo $ac_n "(cached) $ac_c" 1>&6
9455 else
9456   cat > conftest.$ac_ext <<EOF
9457 #line 9458 "configure"
9458 #include "confdefs.h"
9459 /* System header to define __stub macros and hopefully few prototypes,
9460     which can conflict with char select(); below.  */
9461 #include <assert.h>
9462 /* Override any gcc2 internal prototype to avoid an error.  */
9463 /* We use char because int might match the return type of a gcc2
9464     builtin and then its argument prototype would still apply.  */
9465 char select();
9466 char (*f)();
9467
9468 int main() {
9469
9470 /* The GNU C library defines this for functions which it implements
9471     to always fail with ENOSYS.  Some functions are actually named
9472     something starting with __ and the normal name is an alias.  */
9473 #if defined (__stub_select) || defined (__stub___select)
9474 choke me
9475 #else
9476 f = select;
9477 #endif
9478
9479 ; return 0; }
9480 EOF
9481 if { (eval echo configure:9482: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9482   rm -rf conftest*
9483   eval "ac_cv_func_select=yes"
9484 else
9485   echo "configure: failed program was:" >&5
9486   cat conftest.$ac_ext >&5
9487   rm -rf conftest*
9488   eval "ac_cv_func_select=no"
9489 fi
9490 rm -f conftest*
9491 fi
9492
9493 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9494   echo "$ac_t""yes" 1>&6
9495   :
9496 else
9497   echo "$ac_t""no" 1>&6
9498 { echo "configure: error: select() required." 1>&2; exit 1; }
9499 fi
9500
9501
9502 if test "${ac_cv_header_winsock_h}" != yes; then
9503                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9504 echo "configure:9505: checking types of arguments for select()" >&5
9505  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9506   echo $ac_n "(cached) $ac_c" 1>&6
9507 else
9508    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9509   echo $ac_n "(cached) $ac_c" 1>&6
9510 else
9511     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9512   echo $ac_n "(cached) $ac_c" 1>&6
9513 else
9514      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9515      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9516       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9517        cat > conftest.$ac_ext <<EOF
9518 #line 9519 "configure"
9519 #include "confdefs.h"
9520 #ifdef HAVE_SYS_TYPES_H
9521 #include <sys/types.h>
9522 #endif
9523 #ifdef HAVE_SYS_TIME_H
9524 #include <sys/time.h>
9525 #endif
9526 #ifdef HAVE_SYS_SELECT_H
9527 #include <sys/select.h>
9528 #endif
9529 #ifdef HAVE_SYS_SOCKET_H
9530 #include <sys/socket.h>
9531 #endif
9532 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);
9533 int main() {
9534
9535 ; return 0; }
9536 EOF
9537 if { (eval echo configure:9538: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9538   rm -rf conftest*
9539           ac_not_found=no ; break 3
9540 else
9541   echo "configure: failed program was:" >&5
9542   cat conftest.$ac_ext >&5
9543   rm -rf conftest*
9544   ac_not_found=yes
9545 fi
9546 rm -f conftest*
9547       done
9548      done
9549     done
9550    
9551 fi
9552   
9553 fi
9554  
9555 fi
9556  if test "$ac_not_found" = yes; then
9557   ac_cv_func_select_arg1=int 
9558   ac_cv_func_select_arg234='int *' 
9559   ac_cv_func_select_arg5='struct timeval *'
9560  fi
9561  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9562  cat >> confdefs.h <<EOF
9563 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9564 EOF
9565
9566  cat >> confdefs.h <<EOF
9567 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9568 EOF
9569
9570  cat >> confdefs.h <<EOF
9571 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9572 EOF
9573
9574
9575 fi
9576
9577
9578 for ac_hdr in regex.h 
9579 do
9580 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9581 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9582 echo "configure:9583: checking for $ac_hdr" >&5
9583 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9584   echo $ac_n "(cached) $ac_c" 1>&6
9585 else
9586   cat > conftest.$ac_ext <<EOF
9587 #line 9588 "configure"
9588 #include "confdefs.h"
9589 #include <$ac_hdr>
9590 EOF
9591 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9592 { (eval echo configure:9593: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9593 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9594 if test -z "$ac_err"; then
9595   rm -rf conftest*
9596   eval "ac_cv_header_$ac_safe=yes"
9597 else
9598   echo "$ac_err" >&5
9599   echo "configure: failed program was:" >&5
9600   cat conftest.$ac_ext >&5
9601   rm -rf conftest*
9602   eval "ac_cv_header_$ac_safe=no"
9603 fi
9604 rm -f conftest*
9605 fi
9606 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9607   echo "$ac_t""yes" 1>&6
9608     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9609   cat >> confdefs.h <<EOF
9610 #define $ac_tr_hdr 1
9611 EOF
9612  
9613 else
9614   echo "$ac_t""no" 1>&6
9615 fi
9616 done
9617
9618 if test "$ac_cv_header_regex_h" != yes ; then
9619         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9620 fi
9621
9622 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9623 echo "configure:9624: checking for library containing regfree" >&5
9624 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9625   echo $ac_n "(cached) $ac_c" 1>&6
9626 else
9627   ac_func_search_save_LIBS="$LIBS"
9628 ac_cv_search_regfree="no"
9629 cat > conftest.$ac_ext <<EOF
9630 #line 9631 "configure"
9631 #include "confdefs.h"
9632 /* Override any gcc2 internal prototype to avoid an error.  */
9633 /* We use char because int might match the return type of a gcc2
9634     builtin and then its argument prototype would still apply.  */
9635 char regfree();
9636
9637 int main() {
9638 regfree()
9639 ; return 0; }
9640 EOF
9641 if { (eval echo configure:9642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9642   rm -rf conftest*
9643   ac_cv_search_regfree="none required"
9644 else
9645   echo "configure: failed program was:" >&5
9646   cat conftest.$ac_ext >&5
9647 fi
9648 rm -f conftest*
9649 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9650 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9651 cat > conftest.$ac_ext <<EOF
9652 #line 9653 "configure"
9653 #include "confdefs.h"
9654 /* Override any gcc2 internal prototype to avoid an error.  */
9655 /* We use char because int might match the return type of a gcc2
9656     builtin and then its argument prototype would still apply.  */
9657 char regfree();
9658
9659 int main() {
9660 regfree()
9661 ; return 0; }
9662 EOF
9663 if { (eval echo configure:9664: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9664   rm -rf conftest*
9665   ac_cv_search_regfree="-l$ac_lib"
9666 break
9667 else
9668   echo "configure: failed program was:" >&5
9669   cat conftest.$ac_ext >&5
9670 fi
9671 rm -f conftest*
9672 done
9673 LIBS="$ac_func_search_save_LIBS"
9674 fi
9675
9676 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9677 if test "$ac_cv_search_regfree" != "no"; then
9678   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9679   :
9680 else :
9681   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9682 fi
9683
9684
9685 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9686 echo "configure:9687: checking for compatible POSIX regex" >&5
9687 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9688   echo $ac_n "(cached) $ac_c" 1>&6
9689 else
9690   
9691         if test "$cross_compiling" = yes; then
9692   ol_cv_c_posix_regex=cross
9693 else
9694   cat > conftest.$ac_ext <<EOF
9695 #line 9696 "configure"
9696 #include "confdefs.h"
9697
9698 #include <sys/types.h>
9699 #include <regex.h>
9700 static char *pattern, *string;
9701 main()
9702 {
9703         int rc;
9704         regex_t re;
9705
9706         pattern = "^A";
9707
9708         if(regcomp(&re, pattern, 0)) {
9709                 return -1;
9710         }
9711         
9712         string = "ALL MATCH";
9713         
9714         rc = regexec(&re, string, 0, (void*)0, 0);
9715
9716         regfree(&re);
9717
9718         return rc;
9719 }
9720 EOF
9721 if { (eval echo configure:9722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9722 then
9723   ol_cv_c_posix_regex=yes
9724 else
9725   echo "configure: failed program was:" >&5
9726   cat conftest.$ac_ext >&5
9727   rm -fr conftest*
9728   ol_cv_c_posix_regex=no
9729 fi
9730 rm -fr conftest*
9731 fi
9732
9733 fi
9734
9735 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9736
9737 if test "$ol_cv_c_posix_regex" = no ; then
9738         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9739 fi
9740
9741 echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9742 echo "configure:9743: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9743 save_LIBS="$LIBS"
9744 LIBS="$LIBS -lrpcrt4"
9745 cat > conftest.$ac_ext <<EOF
9746 #line 9747 "configure"
9747 #include "confdefs.h"
9748
9749                 char UuidCreate@4();
9750                 char UuidToStringA@8();
9751                 
9752 int main() {
9753
9754                 UuidCreate@4();
9755                 UuidToStringA@8();
9756                 
9757 ; return 0; }
9758 EOF
9759 if { (eval echo configure:9760: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9760   rm -rf conftest*
9761   need_rpcrt=yes
9762 else
9763   echo "configure: failed program was:" >&5
9764   cat conftest.$ac_ext >&5
9765   rm -rf conftest*
9766   need_rpcrt=no
9767 fi
9768 rm -f conftest*
9769 if test $need_rpcrt = yes; then
9770         SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9771 fi
9772 LIBS="$save_LIBS"
9773 echo "$ac_t""$need_rpcrt" 1>&6
9774
9775 ol_link_dnssrv=no
9776 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9777 echo "configure:9778: checking for res_query" >&5
9778 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9779   echo $ac_n "(cached) $ac_c" 1>&6
9780 else
9781   cat > conftest.$ac_ext <<EOF
9782 #line 9783 "configure"
9783 #include "confdefs.h"
9784 /* System header to define __stub macros and hopefully few prototypes,
9785     which can conflict with char res_query(); below.  */
9786 #include <assert.h>
9787 /* Override any gcc2 internal prototype to avoid an error.  */
9788 /* We use char because int might match the return type of a gcc2
9789     builtin and then its argument prototype would still apply.  */
9790 char res_query();
9791 char (*f)();
9792
9793 int main() {
9794
9795 /* The GNU C library defines this for functions which it implements
9796     to always fail with ENOSYS.  Some functions are actually named
9797     something starting with __ and the normal name is an alias.  */
9798 #if defined (__stub_res_query) || defined (__stub___res_query)
9799 choke me
9800 #else
9801 f = res_query;
9802 #endif
9803
9804 ; return 0; }
9805 EOF
9806 if { (eval echo configure:9807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9807   rm -rf conftest*
9808   eval "ac_cv_func_res_query=yes"
9809 else
9810   echo "configure: failed program was:" >&5
9811   cat conftest.$ac_ext >&5
9812   rm -rf conftest*
9813   eval "ac_cv_func_res_query=no"
9814 fi
9815 rm -f conftest*
9816 fi
9817
9818 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9819   echo "$ac_t""yes" 1>&6
9820   :
9821 else
9822   echo "$ac_t""no" 1>&6
9823 fi
9824
9825 if test $ac_cv_func_res_query = no ; then 
9826         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9827 echo "configure:9828: checking for __res_query" >&5
9828 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9829   echo $ac_n "(cached) $ac_c" 1>&6
9830 else
9831   cat > conftest.$ac_ext <<EOF
9832 #line 9833 "configure"
9833 #include "confdefs.h"
9834 /* System header to define __stub macros and hopefully few prototypes,
9835     which can conflict with char __res_query(); below.  */
9836 #include <assert.h>
9837 /* Override any gcc2 internal prototype to avoid an error.  */
9838 /* We use char because int might match the return type of a gcc2
9839     builtin and then its argument prototype would still apply.  */
9840 char __res_query();
9841 char (*f)();
9842
9843 int main() {
9844
9845 /* The GNU C library defines this for functions which it implements
9846     to always fail with ENOSYS.  Some functions are actually named
9847     something starting with __ and the normal name is an alias.  */
9848 #if defined (__stub___res_query) || defined (__stub_____res_query)
9849 choke me
9850 #else
9851 f = __res_query;
9852 #endif
9853
9854 ; return 0; }
9855 EOF
9856 if { (eval echo configure:9857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9857   rm -rf conftest*
9858   eval "ac_cv_func___res_query=yes"
9859 else
9860   echo "configure: failed program was:" >&5
9861   cat conftest.$ac_ext >&5
9862   rm -rf conftest*
9863   eval "ac_cv_func___res_query=no"
9864 fi
9865 rm -f conftest*
9866 fi
9867
9868 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
9869   echo "$ac_t""yes" 1>&6
9870   :
9871 else
9872   echo "$ac_t""no" 1>&6
9873 fi
9874
9875         ac_cv_func_res_query=$ac_cv_func___res_query
9876 fi
9877
9878 if test $ac_cv_func_res_query = no ; then 
9879         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
9880 echo "configure:9881: checking for res_query in -lbind" >&5
9881 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
9882 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9883   echo $ac_n "(cached) $ac_c" 1>&6
9884 else
9885   ac_save_LIBS="$LIBS"
9886 LIBS="-lbind  $LIBS"
9887 cat > conftest.$ac_ext <<EOF
9888 #line 9889 "configure"
9889 #include "confdefs.h"
9890 /* Override any gcc2 internal prototype to avoid an error.  */
9891 /* We use char because int might match the return type of a gcc2
9892     builtin and then its argument prototype would still apply.  */
9893 char res_query();
9894
9895 int main() {
9896 res_query()
9897 ; return 0; }
9898 EOF
9899 if { (eval echo configure:9900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9900   rm -rf conftest*
9901   eval "ac_cv_lib_$ac_lib_var=yes"
9902 else
9903   echo "configure: failed program was:" >&5
9904   cat conftest.$ac_ext >&5
9905   rm -rf conftest*
9906   eval "ac_cv_lib_$ac_lib_var=no"
9907 fi
9908 rm -f conftest*
9909 LIBS="$ac_save_LIBS"
9910
9911 fi
9912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9913   echo "$ac_t""yes" 1>&6
9914     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9915     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9916   cat >> confdefs.h <<EOF
9917 #define $ac_tr_lib 1
9918 EOF
9919
9920   LIBS="-lbind $LIBS"
9921
9922 else
9923   echo "$ac_t""no" 1>&6
9924 fi
9925
9926         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
9927 fi
9928
9929 if test $ac_cv_func_res_query = no ; then 
9930         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
9931 echo "configure:9932: checking for __res_query in -lbind" >&5
9932 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
9933 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9934   echo $ac_n "(cached) $ac_c" 1>&6
9935 else
9936   ac_save_LIBS="$LIBS"
9937 LIBS="-lbind  $LIBS"
9938 cat > conftest.$ac_ext <<EOF
9939 #line 9940 "configure"
9940 #include "confdefs.h"
9941 /* Override any gcc2 internal prototype to avoid an error.  */
9942 /* We use char because int might match the return type of a gcc2
9943     builtin and then its argument prototype would still apply.  */
9944 char __res_query();
9945
9946 int main() {
9947 __res_query()
9948 ; return 0; }
9949 EOF
9950 if { (eval echo configure:9951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9951   rm -rf conftest*
9952   eval "ac_cv_lib_$ac_lib_var=yes"
9953 else
9954   echo "configure: failed program was:" >&5
9955   cat conftest.$ac_ext >&5
9956   rm -rf conftest*
9957   eval "ac_cv_lib_$ac_lib_var=no"
9958 fi
9959 rm -f conftest*
9960 LIBS="$ac_save_LIBS"
9961
9962 fi
9963 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9964   echo "$ac_t""yes" 1>&6
9965     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9966     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9967   cat >> confdefs.h <<EOF
9968 #define $ac_tr_lib 1
9969 EOF
9970
9971   LIBS="-lbind $LIBS"
9972
9973 else
9974   echo "$ac_t""no" 1>&6
9975 fi
9976
9977         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
9978 fi
9979
9980 if test $ac_cv_func_res_query = no ; then 
9981         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
9982 echo "configure:9983: checking for res_query in -lresolv" >&5
9983 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
9984 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9985   echo $ac_n "(cached) $ac_c" 1>&6
9986 else
9987   ac_save_LIBS="$LIBS"
9988 LIBS="-lresolv  $LIBS"
9989 cat > conftest.$ac_ext <<EOF
9990 #line 9991 "configure"
9991 #include "confdefs.h"
9992 /* Override any gcc2 internal prototype to avoid an error.  */
9993 /* We use char because int might match the return type of a gcc2
9994     builtin and then its argument prototype would still apply.  */
9995 char res_query();
9996
9997 int main() {
9998 res_query()
9999 ; return 0; }
10000 EOF
10001 if { (eval echo configure:10002: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10002   rm -rf conftest*
10003   eval "ac_cv_lib_$ac_lib_var=yes"
10004 else
10005   echo "configure: failed program was:" >&5
10006   cat conftest.$ac_ext >&5
10007   rm -rf conftest*
10008   eval "ac_cv_lib_$ac_lib_var=no"
10009 fi
10010 rm -f conftest*
10011 LIBS="$ac_save_LIBS"
10012
10013 fi
10014 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10015   echo "$ac_t""yes" 1>&6
10016     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10017     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10018   cat >> confdefs.h <<EOF
10019 #define $ac_tr_lib 1
10020 EOF
10021
10022   LIBS="-lresolv $LIBS"
10023
10024 else
10025   echo "$ac_t""no" 1>&6
10026 fi
10027
10028         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10029 fi
10030
10031 if test $ac_cv_func_res_query = no ; then 
10032         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10033 echo "configure:10034: checking for __res_query in -lresolv" >&5
10034 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10035 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10036   echo $ac_n "(cached) $ac_c" 1>&6
10037 else
10038   ac_save_LIBS="$LIBS"
10039 LIBS="-lresolv  $LIBS"
10040 cat > conftest.$ac_ext <<EOF
10041 #line 10042 "configure"
10042 #include "confdefs.h"
10043 /* Override any gcc2 internal prototype to avoid an error.  */
10044 /* We use char because int might match the return type of a gcc2
10045     builtin and then its argument prototype would still apply.  */
10046 char __res_query();
10047
10048 int main() {
10049 __res_query()
10050 ; return 0; }
10051 EOF
10052 if { (eval echo configure:10053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10053   rm -rf conftest*
10054   eval "ac_cv_lib_$ac_lib_var=yes"
10055 else
10056   echo "configure: failed program was:" >&5
10057   cat conftest.$ac_ext >&5
10058   rm -rf conftest*
10059   eval "ac_cv_lib_$ac_lib_var=no"
10060 fi
10061 rm -f conftest*
10062 LIBS="$ac_save_LIBS"
10063
10064 fi
10065 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10066   echo "$ac_t""yes" 1>&6
10067     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10068     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10069   cat >> confdefs.h <<EOF
10070 #define $ac_tr_lib 1
10071 EOF
10072
10073   LIBS="-lresolv $LIBS"
10074
10075 else
10076   echo "$ac_t""no" 1>&6
10077 fi
10078
10079         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10080 fi
10081
10082 if test "$ac_cv_func_res_query" = yes ; then
10083         cat >> confdefs.h <<\EOF
10084 #define HAVE_RES_QUERY 1
10085 EOF
10086
10087
10088         if test $ol_enable_dnssrv != no ; then
10089                 ol_link_dnssrv=yes
10090         fi
10091 fi
10092
10093 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10094         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10095 fi
10096
10097 for ac_func in getaddrinfo gai_strerror inet_ntop 
10098 do
10099 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10100 echo "configure:10101: checking for $ac_func" >&5
10101 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10102   echo $ac_n "(cached) $ac_c" 1>&6
10103 else
10104   cat > conftest.$ac_ext <<EOF
10105 #line 10106 "configure"
10106 #include "confdefs.h"
10107 /* System header to define __stub macros and hopefully few prototypes,
10108     which can conflict with char $ac_func(); below.  */
10109 #include <assert.h>
10110 /* Override any gcc2 internal prototype to avoid an error.  */
10111 /* We use char because int might match the return type of a gcc2
10112     builtin and then its argument prototype would still apply.  */
10113 char $ac_func();
10114 char (*f)();
10115
10116 int main() {
10117
10118 /* The GNU C library defines this for functions which it implements
10119     to always fail with ENOSYS.  Some functions are actually named
10120     something starting with __ and the normal name is an alias.  */
10121 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10122 choke me
10123 #else
10124 f = $ac_func;
10125 #endif
10126
10127 ; return 0; }
10128 EOF
10129 if { (eval echo configure:10130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10130   rm -rf conftest*
10131   eval "ac_cv_func_$ac_func=yes"
10132 else
10133   echo "configure: failed program was:" >&5
10134   cat conftest.$ac_ext >&5
10135   rm -rf conftest*
10136   eval "ac_cv_func_$ac_func=no"
10137 fi
10138 rm -f conftest*
10139 fi
10140
10141 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10142   echo "$ac_t""yes" 1>&6
10143     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10144   cat >> confdefs.h <<EOF
10145 #define $ac_tr_func 1
10146 EOF
10147  
10148 else
10149   echo "$ac_t""no" 1>&6
10150 fi
10151 done
10152
10153
10154 ol_link_ipv6=no
10155 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10156         if test $ol_enable_ipv6 = yes ; then
10157                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10158         fi
10159 elif test $ol_enable_ipv6 != no ; then
10160         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10161 echo "configure:10162: checking INET6_ADDRSTRLEN" >&5
10162 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10163   echo $ac_n "(cached) $ac_c" 1>&6
10164 else
10165   
10166                 cat > conftest.$ac_ext <<EOF
10167 #line 10168 "configure"
10168 #include "confdefs.h"
10169
10170 #                       include <netinet/in.h>
10171 #                       ifdef INET6_ADDRSTRLEN
10172                                 __has_inet6_addrstrlen__;
10173 #                       endif
10174                 
10175 EOF
10176 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10177   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10178   rm -rf conftest*
10179   ol_cv_inet6_addrstrlen=yes
10180 else
10181   rm -rf conftest*
10182   ol_cv_inet6_addrstrlen=no
10183 fi
10184 rm -f conftest*
10185
10186 fi
10187
10188 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10189
10190         if test $ol_cv_inet6_addrstrlen = yes ; then
10191                 ol_link_ipv6=yes
10192         elif test $ol_enable_ipv6 = yes ; then
10193                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10194         fi
10195 fi
10196
10197 if test $ol_enable_local != no ; then
10198         for ac_hdr in sys/un.h 
10199 do
10200 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10201 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10202 echo "configure:10203: checking for $ac_hdr" >&5
10203 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10204   echo $ac_n "(cached) $ac_c" 1>&6
10205 else
10206   cat > conftest.$ac_ext <<EOF
10207 #line 10208 "configure"
10208 #include "confdefs.h"
10209 #include <$ac_hdr>
10210 EOF
10211 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10212 { (eval echo configure:10213: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10213 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10214 if test -z "$ac_err"; then
10215   rm -rf conftest*
10216   eval "ac_cv_header_$ac_safe=yes"
10217 else
10218   echo "$ac_err" >&5
10219   echo "configure: failed program was:" >&5
10220   cat conftest.$ac_ext >&5
10221   rm -rf conftest*
10222   eval "ac_cv_header_$ac_safe=no"
10223 fi
10224 rm -f conftest*
10225 fi
10226 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10227   echo "$ac_t""yes" 1>&6
10228     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10229   cat >> confdefs.h <<EOF
10230 #define $ac_tr_hdr 1
10231 EOF
10232  
10233 else
10234   echo "$ac_t""no" 1>&6
10235 fi
10236 done
10237
10238
10239         if test $ol_enable_local = auto ; then
10240                 ol_enable_local=$ac_cv_header_sys_un_h
10241         elif test $ac_cv_header_sys_un_h = no ; then
10242                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10243         fi
10244 fi
10245
10246 ol_link_kbind=no
10247 ol_link_kpasswd=no
10248 ol_link_krb5=no
10249 ol_link_krb4=no
10250
10251 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10252         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10253         -o $ol_with_kerberos = k425 ; then
10254
10255         for ac_hdr in krb5.h
10256 do
10257 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10258 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10259 echo "configure:10260: checking for $ac_hdr" >&5
10260 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10261   echo $ac_n "(cached) $ac_c" 1>&6
10262 else
10263   cat > conftest.$ac_ext <<EOF
10264 #line 10265 "configure"
10265 #include "confdefs.h"
10266 #include <$ac_hdr>
10267 EOF
10268 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10269 { (eval echo configure:10270: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10270 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10271 if test -z "$ac_err"; then
10272   rm -rf conftest*
10273   eval "ac_cv_header_$ac_safe=yes"
10274 else
10275   echo "$ac_err" >&5
10276   echo "configure: failed program was:" >&5
10277   cat conftest.$ac_ext >&5
10278   rm -rf conftest*
10279   eval "ac_cv_header_$ac_safe=no"
10280 fi
10281 rm -f conftest*
10282 fi
10283 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10284   echo "$ac_t""yes" 1>&6
10285     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10286   cat >> confdefs.h <<EOF
10287 #define $ac_tr_hdr 1
10288 EOF
10289  
10290 else
10291   echo "$ac_t""no" 1>&6
10292 fi
10293 done
10294
10295
10296         if test $ac_cv_header_krb5_h = yes ; then
10297                                 for ac_hdr in heim_err.h
10298 do
10299 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10300 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10301 echo "configure:10302: checking for $ac_hdr" >&5
10302 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10303   echo $ac_n "(cached) $ac_c" 1>&6
10304 else
10305   cat > conftest.$ac_ext <<EOF
10306 #line 10307 "configure"
10307 #include "confdefs.h"
10308 #include <$ac_hdr>
10309 EOF
10310 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10311 { (eval echo configure:10312: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10312 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10313 if test -z "$ac_err"; then
10314   rm -rf conftest*
10315   eval "ac_cv_header_$ac_safe=yes"
10316 else
10317   echo "$ac_err" >&5
10318   echo "configure: failed program was:" >&5
10319   cat conftest.$ac_ext >&5
10320   rm -rf conftest*
10321   eval "ac_cv_header_$ac_safe=no"
10322 fi
10323 rm -f conftest*
10324 fi
10325 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10326   echo "$ac_t""yes" 1>&6
10327     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10328   cat >> confdefs.h <<EOF
10329 #define $ac_tr_hdr 1
10330 EOF
10331  
10332 else
10333   echo "$ac_t""no" 1>&6
10334 fi
10335 done
10336
10337                 if test $ac_cv_header_heim_err_h = yes ; then
10338                         krb5_impl=heimdal
10339                 else
10340                         krb5_impl=mit
10341                 fi
10342
10343                 if test $krb5_impl = mit; then
10344                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10345 echo "configure:10346: checking for main in -lk5crypto" >&5
10346 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10347 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10348   echo $ac_n "(cached) $ac_c" 1>&6
10349 else
10350   ac_save_LIBS="$LIBS"
10351 LIBS="-lk5crypto  $LIBS"
10352 cat > conftest.$ac_ext <<EOF
10353 #line 10354 "configure"
10354 #include "confdefs.h"
10355
10356 int main() {
10357 main()
10358 ; return 0; }
10359 EOF
10360 if { (eval echo configure:10361: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10361   rm -rf conftest*
10362   eval "ac_cv_lib_$ac_lib_var=yes"
10363 else
10364   echo "configure: failed program was:" >&5
10365   cat conftest.$ac_ext >&5
10366   rm -rf conftest*
10367   eval "ac_cv_lib_$ac_lib_var=no"
10368 fi
10369 rm -f conftest*
10370 LIBS="$ac_save_LIBS"
10371
10372 fi
10373 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10374   echo "$ac_t""yes" 1>&6
10375   krb5crypto=k5crypto
10376 else
10377   echo "$ac_t""no" 1>&6
10378 krb5crypto=crypto
10379 fi
10380
10381
10382                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10383 echo "configure:10384: checking for main in -lkrb5" >&5
10384 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10385 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10386   echo $ac_n "(cached) $ac_c" 1>&6
10387 else
10388   ac_save_LIBS="$LIBS"
10389 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10390 cat > conftest.$ac_ext <<EOF
10391 #line 10392 "configure"
10392 #include "confdefs.h"
10393
10394 int main() {
10395 main()
10396 ; return 0; }
10397 EOF
10398 if { (eval echo configure:10399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10399   rm -rf conftest*
10400   eval "ac_cv_lib_$ac_lib_var=yes"
10401 else
10402   echo "configure: failed program was:" >&5
10403   cat conftest.$ac_ext >&5
10404   rm -rf conftest*
10405   eval "ac_cv_lib_$ac_lib_var=no"
10406 fi
10407 rm -f conftest*
10408 LIBS="$ac_save_LIBS"
10409
10410 fi
10411 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10412   echo "$ac_t""yes" 1>&6
10413   have_krb5=yes
10414                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10415 else
10416   echo "$ac_t""no" 1>&6
10417 have_krb5=no
10418 fi
10419
10420
10421                 elif test $krb5_impl = heimdal; then
10422                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10423 echo "configure:10424: checking for main in -lkrb5" >&5
10424 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10425 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10426   echo $ac_n "(cached) $ac_c" 1>&6
10427 else
10428   ac_save_LIBS="$LIBS"
10429 LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
10430 cat > conftest.$ac_ext <<EOF
10431 #line 10432 "configure"
10432 #include "confdefs.h"
10433
10434 int main() {
10435 main()
10436 ; return 0; }
10437 EOF
10438 if { (eval echo configure:10439: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10439   rm -rf conftest*
10440   eval "ac_cv_lib_$ac_lib_var=yes"
10441 else
10442   echo "configure: failed program was:" >&5
10443   cat conftest.$ac_ext >&5
10444   rm -rf conftest*
10445   eval "ac_cv_lib_$ac_lib_var=no"
10446 fi
10447 rm -f conftest*
10448 LIBS="$ac_save_LIBS"
10449
10450 fi
10451 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10452   echo "$ac_t""yes" 1>&6
10453   have_krb5=yes
10454                                 KRB5_LIBS="-lkrb5 -ldes -lasn1 -lroken -lcom_err"
10455 else
10456   echo "$ac_t""no" 1>&6
10457 have_krb5=no
10458 fi
10459
10460
10461                         cat >> confdefs.h <<\EOF
10462 #define HAVE_HEIMDAL_KERBEROS 1
10463 EOF
10464
10465
10466                 else
10467                         have_krb5=no
10468                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10469                 fi
10470
10471                 if test $have_krb5 = yes ; then
10472                         ol_link_krb5=yes
10473
10474                         cat >> confdefs.h <<\EOF
10475 #define HAVE_KRB5 1
10476 EOF
10477
10478
10479                         if test $ol_enable_kpasswd != no ; then
10480                                 ol_link_kpasswd=yes;
10481                         fi
10482
10483                         if test $ol_with_kerberos = k5only ; then
10484                                 ol_with_kerberos=found
10485                         fi
10486
10487                 elif test $ol_with_kerberos != auto ; then
10488                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10489                 fi
10490
10491         fi
10492 fi
10493
10494 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10495         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10496
10497         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10498 do
10499 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10500 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10501 echo "configure:10502: checking for $ac_hdr" >&5
10502 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10503   echo $ac_n "(cached) $ac_c" 1>&6
10504 else
10505   cat > conftest.$ac_ext <<EOF
10506 #line 10507 "configure"
10507 #include "confdefs.h"
10508 #include <$ac_hdr>
10509 EOF
10510 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10511 { (eval echo configure:10512: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10512 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10513 if test -z "$ac_err"; then
10514   rm -rf conftest*
10515   eval "ac_cv_header_$ac_safe=yes"
10516 else
10517   echo "$ac_err" >&5
10518   echo "configure: failed program was:" >&5
10519   cat conftest.$ac_ext >&5
10520   rm -rf conftest*
10521   eval "ac_cv_header_$ac_safe=no"
10522 fi
10523 rm -f conftest*
10524 fi
10525 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10526   echo "$ac_t""yes" 1>&6
10527     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10528   cat >> confdefs.h <<EOF
10529 #define $ac_tr_hdr 1
10530 EOF
10531  
10532 else
10533   echo "$ac_t""no" 1>&6
10534 fi
10535 done
10536
10537
10538         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10539                 if test $krb5_impl = mit; then
10540                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10541 echo "configure:10542: checking for main in -lkrb4" >&5
10542 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10543 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10544   echo $ac_n "(cached) $ac_c" 1>&6
10545 else
10546   ac_save_LIBS="$LIBS"
10547 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10548 cat > conftest.$ac_ext <<EOF
10549 #line 10550 "configure"
10550 #include "confdefs.h"
10551
10552 int main() {
10553 main()
10554 ; return 0; }
10555 EOF
10556 if { (eval echo configure:10557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10557   rm -rf conftest*
10558   eval "ac_cv_lib_$ac_lib_var=yes"
10559 else
10560   echo "configure: failed program was:" >&5
10561   cat conftest.$ac_ext >&5
10562   rm -rf conftest*
10563   eval "ac_cv_lib_$ac_lib_var=no"
10564 fi
10565 rm -f conftest*
10566 LIBS="$ac_save_LIBS"
10567
10568 fi
10569 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10570   echo "$ac_t""yes" 1>&6
10571   have_k425=yes
10572                                 KRB4_LIBS="-lkrb4 -ldes425"
10573 else
10574   echo "$ac_t""no" 1>&6
10575 have_k425=no
10576 fi
10577
10578
10579                 elif test $krb5_impl = heimdal; then
10580                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10581 echo "configure:10582: checking for main in -lkrb4" >&5
10582 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10583 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10584   echo $ac_n "(cached) $ac_c" 1>&6
10585 else
10586   ac_save_LIBS="$LIBS"
10587 LIBS="-lkrb4 -lkrb5 -ldes -lasn1 -lroken -lcom_err $LIBS"
10588 cat > conftest.$ac_ext <<EOF
10589 #line 10590 "configure"
10590 #include "confdefs.h"
10591
10592 int main() {
10593 main()
10594 ; return 0; }
10595 EOF
10596 if { (eval echo configure:10597: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10597   rm -rf conftest*
10598   eval "ac_cv_lib_$ac_lib_var=yes"
10599 else
10600   echo "configure: failed program was:" >&5
10601   cat conftest.$ac_ext >&5
10602   rm -rf conftest*
10603   eval "ac_cv_lib_$ac_lib_var=no"
10604 fi
10605 rm -f conftest*
10606 LIBS="$ac_save_LIBS"
10607
10608 fi
10609 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10610   echo "$ac_t""yes" 1>&6
10611   have_k425=yes
10612                                 KRB4_LIBS="-lkrb4"
10613 else
10614   echo "$ac_t""no" 1>&6
10615 have_k425=no
10616 fi
10617
10618
10619                 else
10620                         have_425=no
10621                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10622                 fi
10623
10624                 if test $have_k425 = yes ; then
10625                         ol_with_kerberos=found
10626                         ol_link_krb4=yes
10627
10628                         cat >> confdefs.h <<\EOF
10629 #define HAVE_KRB425 1
10630 EOF
10631
10632                         cat >> confdefs.h <<\EOF
10633 #define HAVE_KRB4 1
10634 EOF
10635
10636
10637                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10638 echo "configure:10639: checking for des_debug in Kerberos libraries" >&5
10639 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10640   echo $ac_n "(cached) $ac_c" 1>&6
10641 else
10642   
10643                                                                 save_LIBS="$LIBS"
10644                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10645                                 cat > conftest.$ac_ext <<EOF
10646 #line 10647 "configure"
10647 #include "confdefs.h"
10648
10649 #include <kerberosIV/krb.h>
10650 #include <kerberosIV/des.h>
10651 extern int des_debug;
10652
10653 int main() {
10654
10655 des_debug = 1;
10656
10657 ; return 0; }
10658 EOF
10659 if { (eval echo configure:10660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10660   rm -rf conftest*
10661   ol_cv_var_des_debug=yes
10662 else
10663   echo "configure: failed program was:" >&5
10664   cat conftest.$ac_ext >&5
10665   rm -rf conftest*
10666   ol_cv_var_des_debug=no
10667 fi
10668 rm -f conftest*
10669                                                                 LIBS="$save_LIBS"
10670                         
10671 fi
10672
10673 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10674
10675                         if test $ol_cv_var_des_debug = yes ; then
10676                                 cat >> confdefs.h <<\EOF
10677 #define HAVE_DES_DEBUG 1
10678 EOF
10679
10680                         fi
10681
10682                         LIBS="$save_LIBS"
10683                 fi
10684         fi
10685 fi
10686
10687 if test $ol_link_krb5 = yes ; then
10688         ol_with_kerberos=found
10689 fi
10690
10691 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10692         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10693
10694         for ac_hdr in krb.h des.h krb-archaeology.h 
10695 do
10696 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10697 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10698 echo "configure:10699: checking for $ac_hdr" >&5
10699 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10700   echo $ac_n "(cached) $ac_c" 1>&6
10701 else
10702   cat > conftest.$ac_ext <<EOF
10703 #line 10704 "configure"
10704 #include "confdefs.h"
10705 #include <$ac_hdr>
10706 EOF
10707 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10708 { (eval echo configure:10709: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10709 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10710 if test -z "$ac_err"; then
10711   rm -rf conftest*
10712   eval "ac_cv_header_$ac_safe=yes"
10713 else
10714   echo "$ac_err" >&5
10715   echo "configure: failed program was:" >&5
10716   cat conftest.$ac_ext >&5
10717   rm -rf conftest*
10718   eval "ac_cv_header_$ac_safe=no"
10719 fi
10720 rm -f conftest*
10721 fi
10722 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10723   echo "$ac_t""yes" 1>&6
10724     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10725   cat >> confdefs.h <<EOF
10726 #define $ac_tr_hdr 1
10727 EOF
10728  
10729 else
10730   echo "$ac_t""no" 1>&6
10731 fi
10732 done
10733
10734
10735         if test $ac_cv_header_krb_h = yes ; then
10736                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10737 echo "configure:10738: checking for main in -lkrb" >&5
10738 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10739 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10740   echo $ac_n "(cached) $ac_c" 1>&6
10741 else
10742   ac_save_LIBS="$LIBS"
10743 LIBS="-lkrb -ldes $LIBS"
10744 cat > conftest.$ac_ext <<EOF
10745 #line 10746 "configure"
10746 #include "confdefs.h"
10747
10748 int main() {
10749 main()
10750 ; return 0; }
10751 EOF
10752 if { (eval echo configure:10753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10753   rm -rf conftest*
10754   eval "ac_cv_lib_$ac_lib_var=yes"
10755 else
10756   echo "configure: failed program was:" >&5
10757   cat conftest.$ac_ext >&5
10758   rm -rf conftest*
10759   eval "ac_cv_lib_$ac_lib_var=no"
10760 fi
10761 rm -f conftest*
10762 LIBS="$ac_save_LIBS"
10763
10764 fi
10765 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10766   echo "$ac_t""yes" 1>&6
10767   have_k4=yes
10768 else
10769   echo "$ac_t""no" 1>&6
10770 have_k4=no
10771 fi
10772
10773
10774                 if test $have_k4 = yes ; then
10775                         ol_with_kerberos=found
10776                         ol_link_krb4=yes
10777
10778                         cat >> confdefs.h <<\EOF
10779 #define HAVE_KRB4 1
10780 EOF
10781
10782
10783                         KRB4_LIBS="-lkrb -ldes"
10784
10785                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10786                                 cat >> confdefs.h <<\EOF
10787 #define HAVE_KTH_KERBEROS 1
10788 EOF
10789
10790                         fi
10791                 fi
10792         fi
10793 fi
10794
10795 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10796         ol_link_kpasswd=yes
10797 fi
10798
10799 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10800         ol_link_kbind=yes
10801
10802 elif test $ol_enable_kbind = yes ; then
10803         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10804 fi
10805
10806 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10807         cat >> confdefs.h <<\EOF
10808 #define HAVE_KERBEROS 1
10809 EOF
10810
10811
10812 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10813         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10814 fi
10815
10816 ol_link_tls=no
10817 if test $ol_with_tls != no ; then
10818         for ac_hdr in openssl/ssl.h ssl.h
10819 do
10820 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10821 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10822 echo "configure:10823: checking for $ac_hdr" >&5
10823 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10824   echo $ac_n "(cached) $ac_c" 1>&6
10825 else
10826   cat > conftest.$ac_ext <<EOF
10827 #line 10828 "configure"
10828 #include "confdefs.h"
10829 #include <$ac_hdr>
10830 EOF
10831 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10832 { (eval echo configure:10833: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10833 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10834 if test -z "$ac_err"; then
10835   rm -rf conftest*
10836   eval "ac_cv_header_$ac_safe=yes"
10837 else
10838   echo "$ac_err" >&5
10839   echo "configure: failed program was:" >&5
10840   cat conftest.$ac_ext >&5
10841   rm -rf conftest*
10842   eval "ac_cv_header_$ac_safe=no"
10843 fi
10844 rm -f conftest*
10845 fi
10846 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10847   echo "$ac_t""yes" 1>&6
10848     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10849   cat >> confdefs.h <<EOF
10850 #define $ac_tr_hdr 1
10851 EOF
10852  
10853 else
10854   echo "$ac_t""no" 1>&6
10855 fi
10856 done
10857
10858         
10859         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
10860                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
10861 echo "configure:10862: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
10862 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
10863 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10864   echo $ac_n "(cached) $ac_c" 1>&6
10865 else
10866   ac_save_LIBS="$LIBS"
10867 LIBS="-lssl -lcrypto $LIBS"
10868 cat > conftest.$ac_ext <<EOF
10869 #line 10870 "configure"
10870 #include "confdefs.h"
10871 /* Override any gcc2 internal prototype to avoid an error.  */
10872 /* We use char because int might match the return type of a gcc2
10873     builtin and then its argument prototype would still apply.  */
10874 char SSLeay_add_ssl_algorithms();
10875
10876 int main() {
10877 SSLeay_add_ssl_algorithms()
10878 ; return 0; }
10879 EOF
10880 if { (eval echo configure:10881: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10881   rm -rf conftest*
10882   eval "ac_cv_lib_$ac_lib_var=yes"
10883 else
10884   echo "configure: failed program was:" >&5
10885   cat conftest.$ac_ext >&5
10886   rm -rf conftest*
10887   eval "ac_cv_lib_$ac_lib_var=no"
10888 fi
10889 rm -f conftest*
10890 LIBS="$ac_save_LIBS"
10891
10892 fi
10893 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10894   echo "$ac_t""yes" 1>&6
10895   have_ssleay=yes
10896                         need_rsaref=no
10897 else
10898   echo "$ac_t""no" 1>&6
10899 have_ssleay=no
10900 fi
10901
10902                         
10903                 if test $have_ssleay = no ; then
10904                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
10905 echo "configure:10906: checking for SSL_library_init in -lssl" >&5
10906 ac_lib_var=`echo ssl'_'SSL_library_init | 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 $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 SSL_library_init();
10919
10920 int main() {
10921 SSL_library_init()
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=no
10941 else
10942   echo "$ac_t""no" 1>&6
10943 have_ssleay=no
10944 fi
10945
10946                 fi
10947
10948                 if test $have_ssleay = no ; then
10949                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
10950 echo "configure:10951: checking for ssl3_accept in -lssl" >&5
10951 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
10952 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10953   echo $ac_n "(cached) $ac_c" 1>&6
10954 else
10955   ac_save_LIBS="$LIBS"
10956 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
10957 cat > conftest.$ac_ext <<EOF
10958 #line 10959 "configure"
10959 #include "confdefs.h"
10960 /* Override any gcc2 internal prototype to avoid an error.  */
10961 /* We use char because int might match the return type of a gcc2
10962     builtin and then its argument prototype would still apply.  */
10963 char ssl3_accept();
10964
10965 int main() {
10966 ssl3_accept()
10967 ; return 0; }
10968 EOF
10969 if { (eval echo configure:10970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10970   rm -rf conftest*
10971   eval "ac_cv_lib_$ac_lib_var=yes"
10972 else
10973   echo "configure: failed program was:" >&5
10974   cat conftest.$ac_ext >&5
10975   rm -rf conftest*
10976   eval "ac_cv_lib_$ac_lib_var=no"
10977 fi
10978 rm -f conftest*
10979 LIBS="$ac_save_LIBS"
10980
10981 fi
10982 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10983   echo "$ac_t""yes" 1>&6
10984   have_ssleay=yes
10985                                 need_rsaref=yes
10986 else
10987   echo "$ac_t""no" 1>&6
10988 have_ssleay=no
10989 fi
10990
10991                 fi
10992
10993                 if test $have_ssleay = yes ; then
10994                         ol_with_tls=found
10995                         ol_link_tls=yes
10996
10997                         cat >> confdefs.h <<\EOF
10998 #define HAVE_SSLEAY 1
10999 EOF
11000
11001
11002                         if test $need_rsaref = yes; then
11003                                 cat >> confdefs.h <<\EOF
11004 #define HAVE_RSAREF 1
11005 EOF
11006
11007
11008                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11009                         else
11010                                 TLS_LIBS="-lssl -lcrypto"
11011                         fi
11012                 fi
11013         fi
11014
11015 else
11016         echo "configure: warning: TLS privacy protection not supported!" 1>&2
11017 fi
11018
11019 if test $ol_link_tls = yes ; then
11020         cat >> confdefs.h <<\EOF
11021 #define HAVE_TLS 1
11022 EOF
11023
11024
11025 elif test $ol_with_tls = auto ; then
11026         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11027         echo "configure: warning: TLS privacy protection not supported!" 1>&2
11028
11029 elif test $ol_with_tls != no ; then
11030         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11031 fi
11032
11033 if test $ol_enable_lmpasswd != no; then
11034         if test $ol_link_tls != yes ; then
11035                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11036         fi
11037
11038         cat >> confdefs.h <<\EOF
11039 #define SLAPD_LMHASH 1
11040 EOF
11041
11042 fi
11043
11044 for ac_func in \
11045         ctime_r                 \
11046         gethostbyname_r gethostbyaddr_r \
11047
11048 do
11049 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11050 echo "configure:11051: checking for $ac_func" >&5
11051 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11052   echo $ac_n "(cached) $ac_c" 1>&6
11053 else
11054   cat > conftest.$ac_ext <<EOF
11055 #line 11056 "configure"
11056 #include "confdefs.h"
11057 /* System header to define __stub macros and hopefully few prototypes,
11058     which can conflict with char $ac_func(); below.  */
11059 #include <assert.h>
11060 /* Override any gcc2 internal prototype to avoid an error.  */
11061 /* We use char because int might match the return type of a gcc2
11062     builtin and then its argument prototype would still apply.  */
11063 char $ac_func();
11064 char (*f)();
11065
11066 int main() {
11067
11068 /* The GNU C library defines this for functions which it implements
11069     to always fail with ENOSYS.  Some functions are actually named
11070     something starting with __ and the normal name is an alias.  */
11071 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11072 choke me
11073 #else
11074 f = $ac_func;
11075 #endif
11076
11077 ; return 0; }
11078 EOF
11079 if { (eval echo configure:11080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11080   rm -rf conftest*
11081   eval "ac_cv_func_$ac_func=yes"
11082 else
11083   echo "configure: failed program was:" >&5
11084   cat conftest.$ac_ext >&5
11085   rm -rf conftest*
11086   eval "ac_cv_func_$ac_func=no"
11087 fi
11088 rm -f conftest*
11089 fi
11090
11091 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11092   echo "$ac_t""yes" 1>&6
11093     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11094   cat >> confdefs.h <<EOF
11095 #define $ac_tr_func 1
11096 EOF
11097  
11098 else
11099   echo "$ac_t""no" 1>&6
11100 fi
11101 done
11102
11103
11104 if test "$ac_cv_func_ctime_r" = no ; then
11105         ol_cv_func_ctime_r_nargs=0
11106 else
11107         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11108 echo "configure:11109: checking number of arguments of ctime_r" >&5
11109 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11110   echo $ac_n "(cached) $ac_c" 1>&6
11111 else
11112   cat > conftest.$ac_ext <<EOF
11113 #line 11114 "configure"
11114 #include "confdefs.h"
11115 #include <time.h>
11116 int main() {
11117 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11118 ; return 0; }
11119 EOF
11120 if { (eval echo configure:11121: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11121   rm -rf conftest*
11122   ol_cv_func_ctime_r_nargs3=yes
11123 else
11124   echo "configure: failed program was:" >&5
11125   cat conftest.$ac_ext >&5
11126   rm -rf conftest*
11127   ol_cv_func_ctime_r_nargs3=no
11128 fi
11129 rm -f conftest*
11130
11131         cat > conftest.$ac_ext <<EOF
11132 #line 11133 "configure"
11133 #include "confdefs.h"
11134 #include <time.h>
11135 int main() {
11136 time_t ti; char *buffer; ctime_r(&ti,buffer);
11137 ; return 0; }
11138 EOF
11139 if { (eval echo configure:11140: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11140   rm -rf conftest*
11141   ol_cv_func_ctime_r_nargs2=yes
11142 else
11143   echo "configure: failed program was:" >&5
11144   cat conftest.$ac_ext >&5
11145   rm -rf conftest*
11146   ol_cv_func_ctime_r_nargs2=no
11147 fi
11148 rm -f conftest*
11149
11150         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11151                 $ol_cv_func_ctime_r_nargs2 = no ; then
11152
11153                 ol_cv_func_ctime_r_nargs=3
11154
11155         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11156                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11157
11158                 ol_cv_func_ctime_r_nargs=2
11159
11160         else
11161                 ol_cv_func_ctime_r_nargs=0
11162         fi
11163   
11164 fi
11165
11166 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11167
11168   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11169         cat >> confdefs.h <<EOF
11170 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11171 EOF
11172
11173   fi
11174
11175 fi
11176
11177 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11178         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11179 echo "configure:11180: checking number of arguments of gethostbyname_r" >&5
11180 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11181   echo $ac_n "(cached) $ac_c" 1>&6
11182 else
11183   cat > conftest.$ac_ext <<EOF
11184 #line 11185 "configure"
11185 #include "confdefs.h"
11186 #include <sys/types.h>
11187 #include <sys/socket.h>
11188 #include <netinet/in.h>
11189 #include <netdb.h>
11190 #define BUFSIZE (sizeof(struct hostent)+10)
11191 int main() {
11192 struct hostent hent; char buffer[BUFSIZE];
11193                 int bufsize=BUFSIZE;int h_errno;
11194                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11195                         buffer, bufsize, &h_errno);
11196 ; return 0; }
11197 EOF
11198 if { (eval echo configure:11199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11199   rm -rf conftest*
11200   ol_cv_func_gethostbyname_r_nargs5=yes
11201 else
11202   echo "configure: failed program was:" >&5
11203   cat conftest.$ac_ext >&5
11204   rm -rf conftest*
11205   ol_cv_func_gethostbyname_r_nargs5=no
11206 fi
11207 rm -f conftest*
11208
11209         cat > conftest.$ac_ext <<EOF
11210 #line 11211 "configure"
11211 #include "confdefs.h"
11212 #include <sys/types.h>
11213 #include <sys/socket.h>
11214 #include <netinet/in.h>
11215 #include <netdb.h>
11216 #define BUFSIZE (sizeof(struct hostent)+10)
11217 int main() {
11218 struct hostent hent;struct hostent *rhent;
11219                 char buffer[BUFSIZE];
11220                 int bufsize=BUFSIZE;int h_errno;
11221                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11222                         &rhent, &h_errno);
11223 ; return 0; }
11224 EOF
11225 if { (eval echo configure:11226: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11226   rm -rf conftest*
11227   ol_cv_func_gethostbyname_r_nargs6=yes
11228 else
11229   echo "configure: failed program was:" >&5
11230   cat conftest.$ac_ext >&5
11231   rm -rf conftest*
11232   ol_cv_func_gethostbyname_r_nargs6=no
11233 fi
11234 rm -f conftest*
11235
11236         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11237                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11238
11239                 ol_cv_func_gethostbyname_r_nargs=5
11240
11241         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11242                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11243
11244                 ol_cv_func_gethostbyname_r_nargs=6
11245
11246         else
11247                 ol_cv_func_gethostbyname_r_nargs=0
11248         fi
11249   
11250 fi
11251
11252 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11253   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11254         cat >> confdefs.h <<EOF
11255 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11256 EOF
11257
11258   fi
11259
11260 else
11261         ol_cv_func_gethostbyname_r_nargs=0
11262 fi
11263  
11264 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11265         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11266 echo "configure:11267: checking number of arguments of gethostbyaddr_r" >&5
11267 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11268   echo $ac_n "(cached) $ac_c" 1>&6
11269 else
11270   cat > conftest.$ac_ext <<EOF
11271 #line 11272 "configure"
11272 #include "confdefs.h"
11273 #include <sys/types.h>
11274 #include <sys/socket.h>
11275 #include <netinet/in.h>
11276 #include <netdb.h>
11277 #define BUFSIZE (sizeof(struct hostent)+10)
11278 int main() {
11279 struct hostent hent; char buffer[BUFSIZE]; 
11280             struct in_addr add;
11281             size_t alen=sizeof(struct in_addr);
11282             int bufsize=BUFSIZE;int h_errno;
11283                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11284                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11285 ; return 0; }
11286 EOF
11287 if { (eval echo configure:11288: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11288   rm -rf conftest*
11289   ol_cv_func_gethostbyaddr_r_nargs7=yes
11290 else
11291   echo "configure: failed program was:" >&5
11292   cat conftest.$ac_ext >&5
11293   rm -rf conftest*
11294   ol_cv_func_gethostbyaddr_r_nargs7=no
11295 fi
11296 rm -f conftest*
11297
11298         cat > conftest.$ac_ext <<EOF
11299 #line 11300 "configure"
11300 #include "confdefs.h"
11301 #include <sys/types.h>
11302 #include <sys/socket.h>
11303 #include <netinet/in.h>
11304 #include <netdb.h>
11305 #define BUFSIZE (sizeof(struct hostent)+10)
11306 int main() {
11307 struct hostent hent;
11308                 struct hostent *rhent; char buffer[BUFSIZE]; 
11309                 struct in_addr add;
11310                 size_t alen=sizeof(struct in_addr);
11311                 int bufsize=BUFSIZE;int h_errno;
11312                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11313                         alen, AF_INET, &hent, buffer, bufsize, 
11314                         &rhent, &h_errno);
11315 ; return 0; }
11316 EOF
11317 if { (eval echo configure:11318: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11318   rm -rf conftest*
11319   ol_cv_func_gethostbyaddr_r_nargs8=yes
11320 else
11321   echo "configure: failed program was:" >&5
11322   cat conftest.$ac_ext >&5
11323   rm -rf conftest*
11324   ol_cv_func_gethostbyaddr_r_nargs8=no
11325 fi
11326 rm -f conftest*
11327
11328         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11329                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11330
11331                 ol_cv_func_gethostbyaddr_r_nargs=7
11332
11333         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11334                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11335
11336                 ol_cv_func_gethostbyaddr_r_nargs=8
11337
11338         else
11339                 ol_cv_func_gethostbyaddr_r_nargs=0
11340         fi
11341   
11342 fi
11343
11344 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11345   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11346     cat >> confdefs.h <<EOF
11347 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11348 EOF
11349
11350   fi
11351
11352 else
11353         ol_cv_func_gethostbyaddr_r_nargs=0
11354 fi
11355
11356 if test "$ac_cv_func_ctime_r" = yes \
11357         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11358         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11359         -a "$ac_cv_func_gethostbyname_r" = yes \
11360         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11361         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11362         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11363         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11364         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11365         ; then
11366  
11367         cat >> confdefs.h <<\EOF
11368 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11369 EOF
11370
11371 fi
11372
11373 ol_link_threads=no
11374
11375 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11376         -o $ol_with_threads = nt ; then
11377
11378         
11379         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11380 echo "configure:11381: checking for _beginthread" >&5
11381 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11382   echo $ac_n "(cached) $ac_c" 1>&6
11383 else
11384   cat > conftest.$ac_ext <<EOF
11385 #line 11386 "configure"
11386 #include "confdefs.h"
11387 /* System header to define __stub macros and hopefully few prototypes,
11388     which can conflict with char _beginthread(); below.  */
11389 #include <assert.h>
11390 /* Override any gcc2 internal prototype to avoid an error.  */
11391 /* We use char because int might match the return type of a gcc2
11392     builtin and then its argument prototype would still apply.  */
11393 char _beginthread();
11394 char (*f)();
11395
11396 int main() {
11397
11398 /* The GNU C library defines this for functions which it implements
11399     to always fail with ENOSYS.  Some functions are actually named
11400     something starting with __ and the normal name is an alias.  */
11401 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11402 choke me
11403 #else
11404 f = _beginthread;
11405 #endif
11406
11407 ; return 0; }
11408 EOF
11409 if { (eval echo configure:11410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11410   rm -rf conftest*
11411   eval "ac_cv_func__beginthread=yes"
11412 else
11413   echo "configure: failed program was:" >&5
11414   cat conftest.$ac_ext >&5
11415   rm -rf conftest*
11416   eval "ac_cv_func__beginthread=no"
11417 fi
11418 rm -f conftest*
11419 fi
11420
11421 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11422   echo "$ac_t""yes" 1>&6
11423   :
11424 else
11425   echo "$ac_t""no" 1>&6
11426 fi
11427
11428
11429         if test $ac_cv_func__beginthread = yes ; then
11430                 cat >> confdefs.h <<\EOF
11431 #define HAVE_NT_THREADS 1
11432 EOF
11433
11434                 ol_cv_nt_threads=yes
11435         fi
11436
11437
11438         if test "$ol_cv_nt_threads" = yes ; then
11439                 ol_link_threads=nt
11440                 ol_with_threads=found
11441                 ol_with_yielding_select=yes
11442
11443                 cat >> confdefs.h <<\EOF
11444 #define HAVE_NT_SERVICE_MANAGER 1
11445 EOF
11446
11447                 cat >> confdefs.h <<\EOF
11448 #define HAVE_NT_EVENT_LOG 1
11449 EOF
11450
11451         fi
11452
11453         if test $ol_with_threads = nt ; then
11454                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11455         fi
11456 fi
11457
11458 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11459         -o $ol_with_threads = posix ; then
11460
11461         for ac_hdr in pthread.h
11462 do
11463 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11464 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11465 echo "configure:11466: checking for $ac_hdr" >&5
11466 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11467   echo $ac_n "(cached) $ac_c" 1>&6
11468 else
11469   cat > conftest.$ac_ext <<EOF
11470 #line 11471 "configure"
11471 #include "confdefs.h"
11472 #include <$ac_hdr>
11473 EOF
11474 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11475 { (eval echo configure:11476: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11476 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11477 if test -z "$ac_err"; then
11478   rm -rf conftest*
11479   eval "ac_cv_header_$ac_safe=yes"
11480 else
11481   echo "$ac_err" >&5
11482   echo "configure: failed program was:" >&5
11483   cat conftest.$ac_ext >&5
11484   rm -rf conftest*
11485   eval "ac_cv_header_$ac_safe=no"
11486 fi
11487 rm -f conftest*
11488 fi
11489 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11490   echo "$ac_t""yes" 1>&6
11491     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11492   cat >> confdefs.h <<EOF
11493 #define $ac_tr_hdr 1
11494 EOF
11495  
11496 else
11497   echo "$ac_t""no" 1>&6
11498 fi
11499 done
11500
11501
11502         if test $ac_cv_header_pthread_h = yes ; then
11503                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11504 echo "configure:11505: checking POSIX thread version" >&5
11505 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11506   echo $ac_n "(cached) $ac_c" 1>&6
11507 else
11508   
11509         cat > conftest.$ac_ext <<EOF
11510 #line 11511 "configure"
11511 #include "confdefs.h"
11512
11513 #               include <pthread.h>
11514                 /* this check could be improved */
11515 #               ifdef PTHREAD_ONCE_INIT
11516                         pthread_version_final;
11517 #               endif
11518         
11519 EOF
11520 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11521   egrep "pthread_version_final" >/dev/null 2>&1; then
11522   rm -rf conftest*
11523   ol_pthread_final=yes
11524 else
11525   rm -rf conftest*
11526   ol_pthread_final=no
11527 fi
11528 rm -f conftest*
11529
11530
11531         cat > conftest.$ac_ext <<EOF
11532 #line 11533 "configure"
11533 #include "confdefs.h"
11534
11535 #               include <pthread.h>
11536                 /* this check could be improved */
11537 #               ifdef pthread_once_init
11538                         pthread_version_draft4;
11539 #               endif
11540         
11541 EOF
11542 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11543   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11544   rm -rf conftest*
11545   ol_pthread_draft4=yes
11546 else
11547   rm -rf conftest*
11548   ol_pthread_draft4=no
11549 fi
11550 rm -f conftest*
11551
11552
11553         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11554                 ol_cv_pthread_version=final
11555         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11556                 ol_cv_pthread_version=draft4
11557         else
11558                 ol_cv_pthread_version=unknown
11559         fi
11560
11561 fi
11562
11563 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11564
11565
11566                 if test $ol_cv_pthread_version = final ; then
11567                         cat >> confdefs.h <<\EOF
11568 #define HAVE_PTHREADS_FINAL 1
11569 EOF
11570
11571                 elif test $ol_cv_pthread_version = draft4 ; then
11572                         cat >> confdefs.h <<\EOF
11573 #define HAVE_PTHREADS_D4 1
11574 EOF
11575
11576                 else
11577                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11578                 fi
11579
11580                 # consider threads found
11581                 ol_with_threads=found
11582
11583                 
11584         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11585 echo "configure:11586: checking for LinuxThreads pthread.h" >&5
11586 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11587   echo $ac_n "(cached) $ac_c" 1>&6
11588 else
11589   cat > conftest.$ac_ext <<EOF
11590 #line 11591 "configure"
11591 #include "confdefs.h"
11592 #include <pthread.h>
11593 EOF
11594 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11595   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11596   rm -rf conftest*
11597   ol_cv_header_linux_threads=yes
11598 else
11599   rm -rf conftest*
11600   ol_cv_header_linux_threads=no
11601 fi
11602 rm -f conftest*
11603
11604                 
11605 fi
11606
11607 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11608         if test $ol_cv_header_linux_threads = yes; then
11609                 cat >> confdefs.h <<\EOF
11610 #define HAVE_LINUX_THREADS 1
11611 EOF
11612
11613         fi
11614
11615                 
11616         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11617 echo "configure:11618: checking for GNU Pth pthread.h" >&5
11618 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11619   echo $ac_n "(cached) $ac_c" 1>&6
11620 else
11621   cat > conftest.$ac_ext <<EOF
11622 #line 11623 "configure"
11623 #include "confdefs.h"
11624 #include <pthread.h>
11625 #ifdef _POSIX_THREAD_IS_GNU_PTH
11626         __gnu_pth__;
11627 #endif
11628
11629 EOF
11630 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11631   egrep "__gnu_pth__" >/dev/null 2>&1; then
11632   rm -rf conftest*
11633   ol_cv_header_gnu_pth_pthread_h=yes
11634 else
11635   rm -rf conftest*
11636   ol_cv_header_gnu_pth_pthread_h=no
11637 fi
11638 rm -f conftest*
11639
11640                 
11641 fi
11642
11643 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11644
11645
11646                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11647                         for ac_hdr in sched.h
11648 do
11649 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11650 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11651 echo "configure:11652: checking for $ac_hdr" >&5
11652 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11653   echo $ac_n "(cached) $ac_c" 1>&6
11654 else
11655   cat > conftest.$ac_ext <<EOF
11656 #line 11657 "configure"
11657 #include "confdefs.h"
11658 #include <$ac_hdr>
11659 EOF
11660 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11661 { (eval echo configure:11662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11662 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11663 if test -z "$ac_err"; then
11664   rm -rf conftest*
11665   eval "ac_cv_header_$ac_safe=yes"
11666 else
11667   echo "$ac_err" >&5
11668   echo "configure: failed program was:" >&5
11669   cat conftest.$ac_ext >&5
11670   rm -rf conftest*
11671   eval "ac_cv_header_$ac_safe=no"
11672 fi
11673 rm -f conftest*
11674 fi
11675 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11676   echo "$ac_t""yes" 1>&6
11677     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11678   cat >> confdefs.h <<EOF
11679 #define $ac_tr_hdr 1
11680 EOF
11681  
11682 else
11683   echo "$ac_t""no" 1>&6
11684 fi
11685 done
11686
11687                 fi
11688
11689                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11690                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11691 echo "configure:11692: checking for pthread_create in default libraries" >&5
11692 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11693   echo $ac_n "(cached) $ac_c" 1>&6
11694 else
11695   
11696                 if test "$cross_compiling" = yes; then
11697   cat > conftest.$ac_ext <<EOF
11698 #line 11699 "configure"
11699 #include "confdefs.h"
11700 /* pthread test headers */
11701 #include <pthread.h>
11702 #ifndef NULL
11703 #define NULL (void*)0
11704 #endif
11705
11706 static void *task(p)
11707         void *p;
11708 {
11709         return (void *) (p == NULL);
11710 }
11711
11712 int main() {
11713
11714         /* pthread test function */
11715         pthread_t t;
11716         int status;
11717         int detach = 1;
11718
11719 #ifdef HAVE_PTHREADS_FINAL
11720         /* Final pthreads */
11721         pthread_attr_t attr;
11722
11723         status = pthread_attr_init(&attr);
11724         if( status ) return status;
11725
11726 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11727         if( !detach ) {
11728 #if defined( PTHREAD_CREATE_JOINABLE )
11729                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11730 #else
11731                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11732 #endif
11733
11734 #ifdef PTHREAD_CREATE_DETACHED
11735         } else {
11736                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11737 #endif
11738         }
11739         if( status ) return status;
11740 #endif
11741
11742         status = pthread_create( &t, &attr, task, NULL );
11743         if( status ) return status;
11744
11745 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11746         if( detach ) {
11747                 /* give thread a chance to complete */
11748                 /* it should remain joinable and hence detachable */
11749                 sleep( 1 );
11750
11751                 status = pthread_detach( t );
11752                 if( status ) return status;
11753         }
11754 #endif
11755
11756 #else
11757         /* Draft 4 pthreads */
11758         status = pthread_create( &t, pthread_attr_default, task, NULL );
11759         if( status ) return status;
11760
11761         if( detach ) {
11762                 /* give thread a chance to complete */
11763                 /* it should remain joinable and hence detachable */
11764                 sleep( 1 );
11765
11766                 status = pthread_detach( &t );
11767                 if( status ) return status;
11768         }
11769 #endif
11770
11771 #ifdef HAVE_LINUX_THREADS
11772         pthread_kill_other_threads_np();
11773 #endif
11774
11775         return 0;
11776
11777 ; return 0; }
11778 EOF
11779 if { (eval echo configure:11780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11780   rm -rf conftest*
11781   ol_cv_pthread_create=yes
11782 else
11783   echo "configure: failed program was:" >&5
11784   cat conftest.$ac_ext >&5
11785   rm -rf conftest*
11786   ol_cv_pthread_create=no
11787 fi
11788 rm -f conftest*
11789 else
11790   cat > conftest.$ac_ext <<EOF
11791 #line 11792 "configure"
11792 #include "confdefs.h"
11793 /* pthread test headers */
11794 #include <pthread.h>
11795 #ifndef NULL
11796 #define NULL (void*)0
11797 #endif
11798
11799 static void *task(p)
11800         void *p;
11801 {
11802         return (void *) (p == NULL);
11803 }
11804
11805
11806 int main(argc, argv)
11807         int argc;
11808         char **argv;
11809 {
11810
11811         /* pthread test function */
11812         pthread_t t;
11813         int status;
11814         int detach = 1;
11815
11816 #ifdef HAVE_PTHREADS_FINAL
11817         /* Final pthreads */
11818         pthread_attr_t attr;
11819
11820         status = pthread_attr_init(&attr);
11821         if( status ) return status;
11822
11823 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11824         if( !detach ) {
11825 #if defined( PTHREAD_CREATE_JOINABLE )
11826                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11827 #else
11828                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11829 #endif
11830
11831 #ifdef PTHREAD_CREATE_DETACHED
11832         } else {
11833                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11834 #endif
11835         }
11836         if( status ) return status;
11837 #endif
11838
11839         status = pthread_create( &t, &attr, task, NULL );
11840         if( status ) return status;
11841
11842 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11843         if( detach ) {
11844                 /* give thread a chance to complete */
11845                 /* it should remain joinable and hence detachable */
11846                 sleep( 1 );
11847
11848                 status = pthread_detach( t );
11849                 if( status ) return status;
11850         }
11851 #endif
11852
11853 #else
11854         /* Draft 4 pthreads */
11855         status = pthread_create( &t, pthread_attr_default, task, NULL );
11856         if( status ) return status;
11857
11858         if( detach ) {
11859                 /* give thread a chance to complete */
11860                 /* it should remain joinable and hence detachable */
11861                 sleep( 1 );
11862
11863                 status = pthread_detach( &t );
11864                 if( status ) return status;
11865         }
11866 #endif
11867
11868 #ifdef HAVE_LINUX_THREADS
11869         pthread_kill_other_threads_np();
11870 #endif
11871
11872         return 0;
11873
11874 }
11875
11876 EOF
11877 if { (eval echo configure:11878: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
11878 then
11879   ol_cv_pthread_create=yes
11880 else
11881   echo "configure: failed program was:" >&5
11882   cat conftest.$ac_ext >&5
11883   rm -fr conftest*
11884   ol_cv_pthread_create=no
11885 fi
11886 rm -fr conftest*
11887 fi
11888
11889 fi
11890
11891 echo "$ac_t""$ol_cv_pthread_create" 1>&6
11892
11893                 if test $ol_cv_pthread_create != no ; then
11894                         ol_link_threads=posix
11895                         ol_link_pthreads=""
11896                 fi
11897                 
11898                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
11899 if test "$ol_link_threads" = no ; then
11900         # try -kthread
11901         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
11902 echo "configure:11903: checking for pthread link with -kthread" >&5
11903 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
11904   echo $ac_n "(cached) $ac_c" 1>&6
11905 else
11906   
11907                 # save the flags
11908                 ol_LIBS="$LIBS"
11909                 LIBS="-kthread $LIBS"
11910
11911                 if test "$cross_compiling" = yes; then
11912   cat > conftest.$ac_ext <<EOF
11913 #line 11914 "configure"
11914 #include "confdefs.h"
11915 /* pthread test headers */
11916 #include <pthread.h>
11917 #ifndef NULL
11918 #define NULL (void*)0
11919 #endif
11920
11921 static void *task(p)
11922         void *p;
11923 {
11924         return (void *) (p == NULL);
11925 }
11926
11927 int main() {
11928
11929         /* pthread test function */
11930         pthread_t t;
11931         int status;
11932         int detach = 1;
11933
11934 #ifdef HAVE_PTHREADS_FINAL
11935         /* Final pthreads */
11936         pthread_attr_t attr;
11937
11938         status = pthread_attr_init(&attr);
11939         if( status ) return status;
11940
11941 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11942         if( !detach ) {
11943 #if defined( PTHREAD_CREATE_JOINABLE )
11944                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11945 #else
11946                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11947 #endif
11948
11949 #ifdef PTHREAD_CREATE_DETACHED
11950         } else {
11951                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11952 #endif
11953         }
11954         if( status ) return status;
11955 #endif
11956
11957         status = pthread_create( &t, &attr, task, NULL );
11958         if( status ) return status;
11959
11960 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11961         if( detach ) {
11962                 /* give thread a chance to complete */
11963                 /* it should remain joinable and hence detachable */
11964                 sleep( 1 );
11965
11966                 status = pthread_detach( t );
11967                 if( status ) return status;
11968         }
11969 #endif
11970
11971 #else
11972         /* Draft 4 pthreads */
11973         status = pthread_create( &t, pthread_attr_default, task, NULL );
11974         if( status ) return status;
11975
11976         if( detach ) {
11977                 /* give thread a chance to complete */
11978                 /* it should remain joinable and hence detachable */
11979                 sleep( 1 );
11980
11981                 status = pthread_detach( &t );
11982                 if( status ) return status;
11983         }
11984 #endif
11985
11986 #ifdef HAVE_LINUX_THREADS
11987         pthread_kill_other_threads_np();
11988 #endif
11989
11990         return 0;
11991
11992 ; return 0; }
11993 EOF
11994 if { (eval echo configure:11995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11995   rm -rf conftest*
11996   ol_cv_pthread_kthread=yes
11997 else
11998   echo "configure: failed program was:" >&5
11999   cat conftest.$ac_ext >&5
12000   rm -rf conftest*
12001   ol_cv_pthread_kthread=no
12002 fi
12003 rm -f conftest*
12004 else
12005   cat > conftest.$ac_ext <<EOF
12006 #line 12007 "configure"
12007 #include "confdefs.h"
12008 /* pthread test headers */
12009 #include <pthread.h>
12010 #ifndef NULL
12011 #define NULL (void*)0
12012 #endif
12013
12014 static void *task(p)
12015         void *p;
12016 {
12017         return (void *) (p == NULL);
12018 }
12019
12020
12021 int main(argc, argv)
12022         int argc;
12023         char **argv;
12024 {
12025
12026         /* pthread test function */
12027         pthread_t t;
12028         int status;
12029         int detach = 1;
12030
12031 #ifdef HAVE_PTHREADS_FINAL
12032         /* Final pthreads */
12033         pthread_attr_t attr;
12034
12035         status = pthread_attr_init(&attr);
12036         if( status ) return status;
12037
12038 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12039         if( !detach ) {
12040 #if defined( PTHREAD_CREATE_JOINABLE )
12041                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12042 #else
12043                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12044 #endif
12045
12046 #ifdef PTHREAD_CREATE_DETACHED
12047         } else {
12048                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12049 #endif
12050         }
12051         if( status ) return status;
12052 #endif
12053
12054         status = pthread_create( &t, &attr, task, NULL );
12055         if( status ) return status;
12056
12057 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12058         if( detach ) {
12059                 /* give thread a chance to complete */
12060                 /* it should remain joinable and hence detachable */
12061                 sleep( 1 );
12062
12063                 status = pthread_detach( t );
12064                 if( status ) return status;
12065         }
12066 #endif
12067
12068 #else
12069         /* Draft 4 pthreads */
12070         status = pthread_create( &t, pthread_attr_default, task, NULL );
12071         if( status ) return status;
12072
12073         if( detach ) {
12074                 /* give thread a chance to complete */
12075                 /* it should remain joinable and hence detachable */
12076                 sleep( 1 );
12077
12078                 status = pthread_detach( &t );
12079                 if( status ) return status;
12080         }
12081 #endif
12082
12083 #ifdef HAVE_LINUX_THREADS
12084         pthread_kill_other_threads_np();
12085 #endif
12086
12087         return 0;
12088
12089 }
12090
12091 EOF
12092 if { (eval echo configure:12093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12093 then
12094   ol_cv_pthread_kthread=yes
12095 else
12096   echo "configure: failed program was:" >&5
12097   cat conftest.$ac_ext >&5
12098   rm -fr conftest*
12099   ol_cv_pthread_kthread=no
12100 fi
12101 rm -fr conftest*
12102 fi
12103
12104
12105                 # restore the LIBS
12106                 LIBS="$ol_LIBS"
12107         
12108 fi
12109
12110 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12111
12112         if test $ol_cv_pthread_kthread = yes ; then
12113                 ol_link_pthreads="-kthread"
12114                 ol_link_threads=posix
12115         fi
12116 fi
12117
12118                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12119 if test "$ol_link_threads" = no ; then
12120         # try -pthread
12121         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12122 echo "configure:12123: checking for pthread link with -pthread" >&5
12123 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12124   echo $ac_n "(cached) $ac_c" 1>&6
12125 else
12126   
12127                 # save the flags
12128                 ol_LIBS="$LIBS"
12129                 LIBS="-pthread $LIBS"
12130
12131                 if test "$cross_compiling" = yes; then
12132   cat > conftest.$ac_ext <<EOF
12133 #line 12134 "configure"
12134 #include "confdefs.h"
12135 /* pthread test headers */
12136 #include <pthread.h>
12137 #ifndef NULL
12138 #define NULL (void*)0
12139 #endif
12140
12141 static void *task(p)
12142         void *p;
12143 {
12144         return (void *) (p == NULL);
12145 }
12146
12147 int main() {
12148
12149         /* pthread test function */
12150         pthread_t t;
12151         int status;
12152         int detach = 1;
12153
12154 #ifdef HAVE_PTHREADS_FINAL
12155         /* Final pthreads */
12156         pthread_attr_t attr;
12157
12158         status = pthread_attr_init(&attr);
12159         if( status ) return status;
12160
12161 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12162         if( !detach ) {
12163 #if defined( PTHREAD_CREATE_JOINABLE )
12164                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12165 #else
12166                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12167 #endif
12168
12169 #ifdef PTHREAD_CREATE_DETACHED
12170         } else {
12171                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12172 #endif
12173         }
12174         if( status ) return status;
12175 #endif
12176
12177         status = pthread_create( &t, &attr, task, NULL );
12178         if( status ) return status;
12179
12180 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12181         if( detach ) {
12182                 /* give thread a chance to complete */
12183                 /* it should remain joinable and hence detachable */
12184                 sleep( 1 );
12185
12186                 status = pthread_detach( t );
12187                 if( status ) return status;
12188         }
12189 #endif
12190
12191 #else
12192         /* Draft 4 pthreads */
12193         status = pthread_create( &t, pthread_attr_default, task, NULL );
12194         if( status ) return status;
12195
12196         if( detach ) {
12197                 /* give thread a chance to complete */
12198                 /* it should remain joinable and hence detachable */
12199                 sleep( 1 );
12200
12201                 status = pthread_detach( &t );
12202                 if( status ) return status;
12203         }
12204 #endif
12205
12206 #ifdef HAVE_LINUX_THREADS
12207         pthread_kill_other_threads_np();
12208 #endif
12209
12210         return 0;
12211
12212 ; return 0; }
12213 EOF
12214 if { (eval echo configure:12215: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12215   rm -rf conftest*
12216   ol_cv_pthread_pthread=yes
12217 else
12218   echo "configure: failed program was:" >&5
12219   cat conftest.$ac_ext >&5
12220   rm -rf conftest*
12221   ol_cv_pthread_pthread=no
12222 fi
12223 rm -f conftest*
12224 else
12225   cat > conftest.$ac_ext <<EOF
12226 #line 12227 "configure"
12227 #include "confdefs.h"
12228 /* pthread test headers */
12229 #include <pthread.h>
12230 #ifndef NULL
12231 #define NULL (void*)0
12232 #endif
12233
12234 static void *task(p)
12235         void *p;
12236 {
12237         return (void *) (p == NULL);
12238 }
12239
12240
12241 int main(argc, argv)
12242         int argc;
12243         char **argv;
12244 {
12245
12246         /* pthread test function */
12247         pthread_t t;
12248         int status;
12249         int detach = 1;
12250
12251 #ifdef HAVE_PTHREADS_FINAL
12252         /* Final pthreads */
12253         pthread_attr_t attr;
12254
12255         status = pthread_attr_init(&attr);
12256         if( status ) return status;
12257
12258 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12259         if( !detach ) {
12260 #if defined( PTHREAD_CREATE_JOINABLE )
12261                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12262 #else
12263                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12264 #endif
12265
12266 #ifdef PTHREAD_CREATE_DETACHED
12267         } else {
12268                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12269 #endif
12270         }
12271         if( status ) return status;
12272 #endif
12273
12274         status = pthread_create( &t, &attr, task, NULL );
12275         if( status ) return status;
12276
12277 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12278         if( detach ) {
12279                 /* give thread a chance to complete */
12280                 /* it should remain joinable and hence detachable */
12281                 sleep( 1 );
12282
12283                 status = pthread_detach( t );
12284                 if( status ) return status;
12285         }
12286 #endif
12287
12288 #else
12289         /* Draft 4 pthreads */
12290         status = pthread_create( &t, pthread_attr_default, task, NULL );
12291         if( status ) return status;
12292
12293         if( detach ) {
12294                 /* give thread a chance to complete */
12295                 /* it should remain joinable and hence detachable */
12296                 sleep( 1 );
12297
12298                 status = pthread_detach( &t );
12299                 if( status ) return status;
12300         }
12301 #endif
12302
12303 #ifdef HAVE_LINUX_THREADS
12304         pthread_kill_other_threads_np();
12305 #endif
12306
12307         return 0;
12308
12309 }
12310
12311 EOF
12312 if { (eval echo configure:12313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12313 then
12314   ol_cv_pthread_pthread=yes
12315 else
12316   echo "configure: failed program was:" >&5
12317   cat conftest.$ac_ext >&5
12318   rm -fr conftest*
12319   ol_cv_pthread_pthread=no
12320 fi
12321 rm -fr conftest*
12322 fi
12323
12324
12325                 # restore the LIBS
12326                 LIBS="$ol_LIBS"
12327         
12328 fi
12329
12330 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12331
12332         if test $ol_cv_pthread_pthread = yes ; then
12333                 ol_link_pthreads="-pthread"
12334                 ol_link_threads=posix
12335         fi
12336 fi
12337
12338                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12339 if test "$ol_link_threads" = no ; then
12340         # try -pthreads
12341         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12342 echo "configure:12343: checking for pthread link with -pthreads" >&5
12343 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12344   echo $ac_n "(cached) $ac_c" 1>&6
12345 else
12346   
12347                 # save the flags
12348                 ol_LIBS="$LIBS"
12349                 LIBS="-pthreads $LIBS"
12350
12351                 if test "$cross_compiling" = yes; then
12352   cat > conftest.$ac_ext <<EOF
12353 #line 12354 "configure"
12354 #include "confdefs.h"
12355 /* pthread test headers */
12356 #include <pthread.h>
12357 #ifndef NULL
12358 #define NULL (void*)0
12359 #endif
12360
12361 static void *task(p)
12362         void *p;
12363 {
12364         return (void *) (p == NULL);
12365 }
12366
12367 int main() {
12368
12369         /* pthread test function */
12370         pthread_t t;
12371         int status;
12372         int detach = 1;
12373
12374 #ifdef HAVE_PTHREADS_FINAL
12375         /* Final pthreads */
12376         pthread_attr_t attr;
12377
12378         status = pthread_attr_init(&attr);
12379         if( status ) return status;
12380
12381 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12382         if( !detach ) {
12383 #if defined( PTHREAD_CREATE_JOINABLE )
12384                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12385 #else
12386                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12387 #endif
12388
12389 #ifdef PTHREAD_CREATE_DETACHED
12390         } else {
12391                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12392 #endif
12393         }
12394         if( status ) return status;
12395 #endif
12396
12397         status = pthread_create( &t, &attr, task, NULL );
12398         if( status ) return status;
12399
12400 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12401         if( detach ) {
12402                 /* give thread a chance to complete */
12403                 /* it should remain joinable and hence detachable */
12404                 sleep( 1 );
12405
12406                 status = pthread_detach( t );
12407                 if( status ) return status;
12408         }
12409 #endif
12410
12411 #else
12412         /* Draft 4 pthreads */
12413         status = pthread_create( &t, pthread_attr_default, task, NULL );
12414         if( status ) return status;
12415
12416         if( detach ) {
12417                 /* give thread a chance to complete */
12418                 /* it should remain joinable and hence detachable */
12419                 sleep( 1 );
12420
12421                 status = pthread_detach( &t );
12422                 if( status ) return status;
12423         }
12424 #endif
12425
12426 #ifdef HAVE_LINUX_THREADS
12427         pthread_kill_other_threads_np();
12428 #endif
12429
12430         return 0;
12431
12432 ; return 0; }
12433 EOF
12434 if { (eval echo configure:12435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12435   rm -rf conftest*
12436   ol_cv_pthread_pthreads=yes
12437 else
12438   echo "configure: failed program was:" >&5
12439   cat conftest.$ac_ext >&5
12440   rm -rf conftest*
12441   ol_cv_pthread_pthreads=no
12442 fi
12443 rm -f conftest*
12444 else
12445   cat > conftest.$ac_ext <<EOF
12446 #line 12447 "configure"
12447 #include "confdefs.h"
12448 /* pthread test headers */
12449 #include <pthread.h>
12450 #ifndef NULL
12451 #define NULL (void*)0
12452 #endif
12453
12454 static void *task(p)
12455         void *p;
12456 {
12457         return (void *) (p == NULL);
12458 }
12459
12460
12461 int main(argc, argv)
12462         int argc;
12463         char **argv;
12464 {
12465
12466         /* pthread test function */
12467         pthread_t t;
12468         int status;
12469         int detach = 1;
12470
12471 #ifdef HAVE_PTHREADS_FINAL
12472         /* Final pthreads */
12473         pthread_attr_t attr;
12474
12475         status = pthread_attr_init(&attr);
12476         if( status ) return status;
12477
12478 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12479         if( !detach ) {
12480 #if defined( PTHREAD_CREATE_JOINABLE )
12481                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12482 #else
12483                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12484 #endif
12485
12486 #ifdef PTHREAD_CREATE_DETACHED
12487         } else {
12488                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12489 #endif
12490         }
12491         if( status ) return status;
12492 #endif
12493
12494         status = pthread_create( &t, &attr, task, NULL );
12495         if( status ) return status;
12496
12497 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12498         if( detach ) {
12499                 /* give thread a chance to complete */
12500                 /* it should remain joinable and hence detachable */
12501                 sleep( 1 );
12502
12503                 status = pthread_detach( t );
12504                 if( status ) return status;
12505         }
12506 #endif
12507
12508 #else
12509         /* Draft 4 pthreads */
12510         status = pthread_create( &t, pthread_attr_default, task, NULL );
12511         if( status ) return status;
12512
12513         if( detach ) {
12514                 /* give thread a chance to complete */
12515                 /* it should remain joinable and hence detachable */
12516                 sleep( 1 );
12517
12518                 status = pthread_detach( &t );
12519                 if( status ) return status;
12520         }
12521 #endif
12522
12523 #ifdef HAVE_LINUX_THREADS
12524         pthread_kill_other_threads_np();
12525 #endif
12526
12527         return 0;
12528
12529 }
12530
12531 EOF
12532 if { (eval echo configure:12533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12533 then
12534   ol_cv_pthread_pthreads=yes
12535 else
12536   echo "configure: failed program was:" >&5
12537   cat conftest.$ac_ext >&5
12538   rm -fr conftest*
12539   ol_cv_pthread_pthreads=no
12540 fi
12541 rm -fr conftest*
12542 fi
12543
12544
12545                 # restore the LIBS
12546                 LIBS="$ol_LIBS"
12547         
12548 fi
12549
12550 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12551
12552         if test $ol_cv_pthread_pthreads = yes ; then
12553                 ol_link_pthreads="-pthreads"
12554                 ol_link_threads=posix
12555         fi
12556 fi
12557
12558                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12559 if test "$ol_link_threads" = no ; then
12560         # try -mthreads
12561         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12562 echo "configure:12563: checking for pthread link with -mthreads" >&5
12563 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12564   echo $ac_n "(cached) $ac_c" 1>&6
12565 else
12566   
12567                 # save the flags
12568                 ol_LIBS="$LIBS"
12569                 LIBS="-mthreads $LIBS"
12570
12571                 if test "$cross_compiling" = yes; then
12572   cat > conftest.$ac_ext <<EOF
12573 #line 12574 "configure"
12574 #include "confdefs.h"
12575 /* pthread test headers */
12576 #include <pthread.h>
12577 #ifndef NULL
12578 #define NULL (void*)0
12579 #endif
12580
12581 static void *task(p)
12582         void *p;
12583 {
12584         return (void *) (p == NULL);
12585 }
12586
12587 int main() {
12588
12589         /* pthread test function */
12590         pthread_t t;
12591         int status;
12592         int detach = 1;
12593
12594 #ifdef HAVE_PTHREADS_FINAL
12595         /* Final pthreads */
12596         pthread_attr_t attr;
12597
12598         status = pthread_attr_init(&attr);
12599         if( status ) return status;
12600
12601 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12602         if( !detach ) {
12603 #if defined( PTHREAD_CREATE_JOINABLE )
12604                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12605 #else
12606                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12607 #endif
12608
12609 #ifdef PTHREAD_CREATE_DETACHED
12610         } else {
12611                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12612 #endif
12613         }
12614         if( status ) return status;
12615 #endif
12616
12617         status = pthread_create( &t, &attr, task, NULL );
12618         if( status ) return status;
12619
12620 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12621         if( detach ) {
12622                 /* give thread a chance to complete */
12623                 /* it should remain joinable and hence detachable */
12624                 sleep( 1 );
12625
12626                 status = pthread_detach( t );
12627                 if( status ) return status;
12628         }
12629 #endif
12630
12631 #else
12632         /* Draft 4 pthreads */
12633         status = pthread_create( &t, pthread_attr_default, task, NULL );
12634         if( status ) return status;
12635
12636         if( detach ) {
12637                 /* give thread a chance to complete */
12638                 /* it should remain joinable and hence detachable */
12639                 sleep( 1 );
12640
12641                 status = pthread_detach( &t );
12642                 if( status ) return status;
12643         }
12644 #endif
12645
12646 #ifdef HAVE_LINUX_THREADS
12647         pthread_kill_other_threads_np();
12648 #endif
12649
12650         return 0;
12651
12652 ; return 0; }
12653 EOF
12654 if { (eval echo configure:12655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12655   rm -rf conftest*
12656   ol_cv_pthread_mthreads=yes
12657 else
12658   echo "configure: failed program was:" >&5
12659   cat conftest.$ac_ext >&5
12660   rm -rf conftest*
12661   ol_cv_pthread_mthreads=no
12662 fi
12663 rm -f conftest*
12664 else
12665   cat > conftest.$ac_ext <<EOF
12666 #line 12667 "configure"
12667 #include "confdefs.h"
12668 /* pthread test headers */
12669 #include <pthread.h>
12670 #ifndef NULL
12671 #define NULL (void*)0
12672 #endif
12673
12674 static void *task(p)
12675         void *p;
12676 {
12677         return (void *) (p == NULL);
12678 }
12679
12680
12681 int main(argc, argv)
12682         int argc;
12683         char **argv;
12684 {
12685
12686         /* pthread test function */
12687         pthread_t t;
12688         int status;
12689         int detach = 1;
12690
12691 #ifdef HAVE_PTHREADS_FINAL
12692         /* Final pthreads */
12693         pthread_attr_t attr;
12694
12695         status = pthread_attr_init(&attr);
12696         if( status ) return status;
12697
12698 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12699         if( !detach ) {
12700 #if defined( PTHREAD_CREATE_JOINABLE )
12701                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12702 #else
12703                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12704 #endif
12705
12706 #ifdef PTHREAD_CREATE_DETACHED
12707         } else {
12708                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12709 #endif
12710         }
12711         if( status ) return status;
12712 #endif
12713
12714         status = pthread_create( &t, &attr, task, NULL );
12715         if( status ) return status;
12716
12717 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12718         if( detach ) {
12719                 /* give thread a chance to complete */
12720                 /* it should remain joinable and hence detachable */
12721                 sleep( 1 );
12722
12723                 status = pthread_detach( t );
12724                 if( status ) return status;
12725         }
12726 #endif
12727
12728 #else
12729         /* Draft 4 pthreads */
12730         status = pthread_create( &t, pthread_attr_default, task, NULL );
12731         if( status ) return status;
12732
12733         if( detach ) {
12734                 /* give thread a chance to complete */
12735                 /* it should remain joinable and hence detachable */
12736                 sleep( 1 );
12737
12738                 status = pthread_detach( &t );
12739                 if( status ) return status;
12740         }
12741 #endif
12742
12743 #ifdef HAVE_LINUX_THREADS
12744         pthread_kill_other_threads_np();
12745 #endif
12746
12747         return 0;
12748
12749 }
12750
12751 EOF
12752 if { (eval echo configure:12753: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12753 then
12754   ol_cv_pthread_mthreads=yes
12755 else
12756   echo "configure: failed program was:" >&5
12757   cat conftest.$ac_ext >&5
12758   rm -fr conftest*
12759   ol_cv_pthread_mthreads=no
12760 fi
12761 rm -fr conftest*
12762 fi
12763
12764
12765                 # restore the LIBS
12766                 LIBS="$ol_LIBS"
12767         
12768 fi
12769
12770 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12771
12772         if test $ol_cv_pthread_mthreads = yes ; then
12773                 ol_link_pthreads="-mthreads"
12774                 ol_link_threads=posix
12775         fi
12776 fi
12777
12778                 # Pthread try link: -thread (ol_cv_pthread_thread)
12779 if test "$ol_link_threads" = no ; then
12780         # try -thread
12781         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12782 echo "configure:12783: checking for pthread link with -thread" >&5
12783 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12784   echo $ac_n "(cached) $ac_c" 1>&6
12785 else
12786   
12787                 # save the flags
12788                 ol_LIBS="$LIBS"
12789                 LIBS="-thread $LIBS"
12790
12791                 if test "$cross_compiling" = yes; then
12792   cat > conftest.$ac_ext <<EOF
12793 #line 12794 "configure"
12794 #include "confdefs.h"
12795 /* pthread test headers */
12796 #include <pthread.h>
12797 #ifndef NULL
12798 #define NULL (void*)0
12799 #endif
12800
12801 static void *task(p)
12802         void *p;
12803 {
12804         return (void *) (p == NULL);
12805 }
12806
12807 int main() {
12808
12809         /* pthread test function */
12810         pthread_t t;
12811         int status;
12812         int detach = 1;
12813
12814 #ifdef HAVE_PTHREADS_FINAL
12815         /* Final pthreads */
12816         pthread_attr_t attr;
12817
12818         status = pthread_attr_init(&attr);
12819         if( status ) return status;
12820
12821 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12822         if( !detach ) {
12823 #if defined( PTHREAD_CREATE_JOINABLE )
12824                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12825 #else
12826                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12827 #endif
12828
12829 #ifdef PTHREAD_CREATE_DETACHED
12830         } else {
12831                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12832 #endif
12833         }
12834         if( status ) return status;
12835 #endif
12836
12837         status = pthread_create( &t, &attr, task, NULL );
12838         if( status ) return status;
12839
12840 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12841         if( detach ) {
12842                 /* give thread a chance to complete */
12843                 /* it should remain joinable and hence detachable */
12844                 sleep( 1 );
12845
12846                 status = pthread_detach( t );
12847                 if( status ) return status;
12848         }
12849 #endif
12850
12851 #else
12852         /* Draft 4 pthreads */
12853         status = pthread_create( &t, pthread_attr_default, task, NULL );
12854         if( status ) return status;
12855
12856         if( detach ) {
12857                 /* give thread a chance to complete */
12858                 /* it should remain joinable and hence detachable */
12859                 sleep( 1 );
12860
12861                 status = pthread_detach( &t );
12862                 if( status ) return status;
12863         }
12864 #endif
12865
12866 #ifdef HAVE_LINUX_THREADS
12867         pthread_kill_other_threads_np();
12868 #endif
12869
12870         return 0;
12871
12872 ; return 0; }
12873 EOF
12874 if { (eval echo configure:12875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12875   rm -rf conftest*
12876   ol_cv_pthread_thread=yes
12877 else
12878   echo "configure: failed program was:" >&5
12879   cat conftest.$ac_ext >&5
12880   rm -rf conftest*
12881   ol_cv_pthread_thread=no
12882 fi
12883 rm -f conftest*
12884 else
12885   cat > conftest.$ac_ext <<EOF
12886 #line 12887 "configure"
12887 #include "confdefs.h"
12888 /* pthread test headers */
12889 #include <pthread.h>
12890 #ifndef NULL
12891 #define NULL (void*)0
12892 #endif
12893
12894 static void *task(p)
12895         void *p;
12896 {
12897         return (void *) (p == NULL);
12898 }
12899
12900
12901 int main(argc, argv)
12902         int argc;
12903         char **argv;
12904 {
12905
12906         /* pthread test function */
12907         pthread_t t;
12908         int status;
12909         int detach = 1;
12910
12911 #ifdef HAVE_PTHREADS_FINAL
12912         /* Final pthreads */
12913         pthread_attr_t attr;
12914
12915         status = pthread_attr_init(&attr);
12916         if( status ) return status;
12917
12918 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12919         if( !detach ) {
12920 #if defined( PTHREAD_CREATE_JOINABLE )
12921                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12922 #else
12923                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12924 #endif
12925
12926 #ifdef PTHREAD_CREATE_DETACHED
12927         } else {
12928                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12929 #endif
12930         }
12931         if( status ) return status;
12932 #endif
12933
12934         status = pthread_create( &t, &attr, task, NULL );
12935         if( status ) return status;
12936
12937 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12938         if( detach ) {
12939                 /* give thread a chance to complete */
12940                 /* it should remain joinable and hence detachable */
12941                 sleep( 1 );
12942
12943                 status = pthread_detach( t );
12944                 if( status ) return status;
12945         }
12946 #endif
12947
12948 #else
12949         /* Draft 4 pthreads */
12950         status = pthread_create( &t, pthread_attr_default, task, NULL );
12951         if( status ) return status;
12952
12953         if( detach ) {
12954                 /* give thread a chance to complete */
12955                 /* it should remain joinable and hence detachable */
12956                 sleep( 1 );
12957
12958                 status = pthread_detach( &t );
12959                 if( status ) return status;
12960         }
12961 #endif
12962
12963 #ifdef HAVE_LINUX_THREADS
12964         pthread_kill_other_threads_np();
12965 #endif
12966
12967         return 0;
12968
12969 }
12970
12971 EOF
12972 if { (eval echo configure:12973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12973 then
12974   ol_cv_pthread_thread=yes
12975 else
12976   echo "configure: failed program was:" >&5
12977   cat conftest.$ac_ext >&5
12978   rm -fr conftest*
12979   ol_cv_pthread_thread=no
12980 fi
12981 rm -fr conftest*
12982 fi
12983
12984
12985                 # restore the LIBS
12986                 LIBS="$ol_LIBS"
12987         
12988 fi
12989
12990 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
12991
12992         if test $ol_cv_pthread_thread = yes ; then
12993                 ol_link_pthreads="-thread"
12994                 ol_link_threads=posix
12995         fi
12996 fi
12997
12998
12999                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13000 if test "$ol_link_threads" = no ; then
13001         # try -lpthread -lmach -lexc -lc_r
13002         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13003 echo "configure:13004: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13004 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13005   echo $ac_n "(cached) $ac_c" 1>&6
13006 else
13007   
13008                 # save the flags
13009                 ol_LIBS="$LIBS"
13010                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13011
13012                 if test "$cross_compiling" = yes; then
13013   cat > conftest.$ac_ext <<EOF
13014 #line 13015 "configure"
13015 #include "confdefs.h"
13016 /* pthread test headers */
13017 #include <pthread.h>
13018 #ifndef NULL
13019 #define NULL (void*)0
13020 #endif
13021
13022 static void *task(p)
13023         void *p;
13024 {
13025         return (void *) (p == NULL);
13026 }
13027
13028 int main() {
13029
13030         /* pthread test function */
13031         pthread_t t;
13032         int status;
13033         int detach = 1;
13034
13035 #ifdef HAVE_PTHREADS_FINAL
13036         /* Final pthreads */
13037         pthread_attr_t attr;
13038
13039         status = pthread_attr_init(&attr);
13040         if( status ) return status;
13041
13042 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13043         if( !detach ) {
13044 #if defined( PTHREAD_CREATE_JOINABLE )
13045                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13046 #else
13047                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13048 #endif
13049
13050 #ifdef PTHREAD_CREATE_DETACHED
13051         } else {
13052                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13053 #endif
13054         }
13055         if( status ) return status;
13056 #endif
13057
13058         status = pthread_create( &t, &attr, task, NULL );
13059         if( status ) return status;
13060
13061 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13062         if( detach ) {
13063                 /* give thread a chance to complete */
13064                 /* it should remain joinable and hence detachable */
13065                 sleep( 1 );
13066
13067                 status = pthread_detach( t );
13068                 if( status ) return status;
13069         }
13070 #endif
13071
13072 #else
13073         /* Draft 4 pthreads */
13074         status = pthread_create( &t, pthread_attr_default, task, NULL );
13075         if( status ) return status;
13076
13077         if( detach ) {
13078                 /* give thread a chance to complete */
13079                 /* it should remain joinable and hence detachable */
13080                 sleep( 1 );
13081
13082                 status = pthread_detach( &t );
13083                 if( status ) return status;
13084         }
13085 #endif
13086
13087 #ifdef HAVE_LINUX_THREADS
13088         pthread_kill_other_threads_np();
13089 #endif
13090
13091         return 0;
13092
13093 ; return 0; }
13094 EOF
13095 if { (eval echo configure:13096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13096   rm -rf conftest*
13097   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13098 else
13099   echo "configure: failed program was:" >&5
13100   cat conftest.$ac_ext >&5
13101   rm -rf conftest*
13102   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13103 fi
13104 rm -f conftest*
13105 else
13106   cat > conftest.$ac_ext <<EOF
13107 #line 13108 "configure"
13108 #include "confdefs.h"
13109 /* pthread test headers */
13110 #include <pthread.h>
13111 #ifndef NULL
13112 #define NULL (void*)0
13113 #endif
13114
13115 static void *task(p)
13116         void *p;
13117 {
13118         return (void *) (p == NULL);
13119 }
13120
13121
13122 int main(argc, argv)
13123         int argc;
13124         char **argv;
13125 {
13126
13127         /* pthread test function */
13128         pthread_t t;
13129         int status;
13130         int detach = 1;
13131
13132 #ifdef HAVE_PTHREADS_FINAL
13133         /* Final pthreads */
13134         pthread_attr_t attr;
13135
13136         status = pthread_attr_init(&attr);
13137         if( status ) return status;
13138
13139 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13140         if( !detach ) {
13141 #if defined( PTHREAD_CREATE_JOINABLE )
13142                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13143 #else
13144                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13145 #endif
13146
13147 #ifdef PTHREAD_CREATE_DETACHED
13148         } else {
13149                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13150 #endif
13151         }
13152         if( status ) return status;
13153 #endif
13154
13155         status = pthread_create( &t, &attr, task, NULL );
13156         if( status ) return status;
13157
13158 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13159         if( detach ) {
13160                 /* give thread a chance to complete */
13161                 /* it should remain joinable and hence detachable */
13162                 sleep( 1 );
13163
13164                 status = pthread_detach( t );
13165                 if( status ) return status;
13166         }
13167 #endif
13168
13169 #else
13170         /* Draft 4 pthreads */
13171         status = pthread_create( &t, pthread_attr_default, task, NULL );
13172         if( status ) return status;
13173
13174         if( detach ) {
13175                 /* give thread a chance to complete */
13176                 /* it should remain joinable and hence detachable */
13177                 sleep( 1 );
13178
13179                 status = pthread_detach( &t );
13180                 if( status ) return status;
13181         }
13182 #endif
13183
13184 #ifdef HAVE_LINUX_THREADS
13185         pthread_kill_other_threads_np();
13186 #endif
13187
13188         return 0;
13189
13190 }
13191
13192 EOF
13193 if { (eval echo configure:13194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13194 then
13195   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13196 else
13197   echo "configure: failed program was:" >&5
13198   cat conftest.$ac_ext >&5
13199   rm -fr conftest*
13200   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13201 fi
13202 rm -fr conftest*
13203 fi
13204
13205
13206                 # restore the LIBS
13207                 LIBS="$ol_LIBS"
13208         
13209 fi
13210
13211 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13212
13213         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13214                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13215                 ol_link_threads=posix
13216         fi
13217 fi
13218
13219                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13220 if test "$ol_link_threads" = no ; then
13221         # try -lpthread -lmach -lexc
13222         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13223 echo "configure:13224: checking for pthread link with -lpthread -lmach -lexc" >&5
13224 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13225   echo $ac_n "(cached) $ac_c" 1>&6
13226 else
13227   
13228                 # save the flags
13229                 ol_LIBS="$LIBS"
13230                 LIBS="-lpthread -lmach -lexc $LIBS"
13231
13232                 if test "$cross_compiling" = yes; then
13233   cat > conftest.$ac_ext <<EOF
13234 #line 13235 "configure"
13235 #include "confdefs.h"
13236 /* pthread test headers */
13237 #include <pthread.h>
13238 #ifndef NULL
13239 #define NULL (void*)0
13240 #endif
13241
13242 static void *task(p)
13243         void *p;
13244 {
13245         return (void *) (p == NULL);
13246 }
13247
13248 int main() {
13249
13250         /* pthread test function */
13251         pthread_t t;
13252         int status;
13253         int detach = 1;
13254
13255 #ifdef HAVE_PTHREADS_FINAL
13256         /* Final pthreads */
13257         pthread_attr_t attr;
13258
13259         status = pthread_attr_init(&attr);
13260         if( status ) return status;
13261
13262 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13263         if( !detach ) {
13264 #if defined( PTHREAD_CREATE_JOINABLE )
13265                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13266 #else
13267                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13268 #endif
13269
13270 #ifdef PTHREAD_CREATE_DETACHED
13271         } else {
13272                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13273 #endif
13274         }
13275         if( status ) return status;
13276 #endif
13277
13278         status = pthread_create( &t, &attr, task, NULL );
13279         if( status ) return status;
13280
13281 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13282         if( detach ) {
13283                 /* give thread a chance to complete */
13284                 /* it should remain joinable and hence detachable */
13285                 sleep( 1 );
13286
13287                 status = pthread_detach( t );
13288                 if( status ) return status;
13289         }
13290 #endif
13291
13292 #else
13293         /* Draft 4 pthreads */
13294         status = pthread_create( &t, pthread_attr_default, task, NULL );
13295         if( status ) return status;
13296
13297         if( detach ) {
13298                 /* give thread a chance to complete */
13299                 /* it should remain joinable and hence detachable */
13300                 sleep( 1 );
13301
13302                 status = pthread_detach( &t );
13303                 if( status ) return status;
13304         }
13305 #endif
13306
13307 #ifdef HAVE_LINUX_THREADS
13308         pthread_kill_other_threads_np();
13309 #endif
13310
13311         return 0;
13312
13313 ; return 0; }
13314 EOF
13315 if { (eval echo configure:13316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13316   rm -rf conftest*
13317   ol_cv_pthread_lpthread_lmach_lexc=yes
13318 else
13319   echo "configure: failed program was:" >&5
13320   cat conftest.$ac_ext >&5
13321   rm -rf conftest*
13322   ol_cv_pthread_lpthread_lmach_lexc=no
13323 fi
13324 rm -f conftest*
13325 else
13326   cat > conftest.$ac_ext <<EOF
13327 #line 13328 "configure"
13328 #include "confdefs.h"
13329 /* pthread test headers */
13330 #include <pthread.h>
13331 #ifndef NULL
13332 #define NULL (void*)0
13333 #endif
13334
13335 static void *task(p)
13336         void *p;
13337 {
13338         return (void *) (p == NULL);
13339 }
13340
13341
13342 int main(argc, argv)
13343         int argc;
13344         char **argv;
13345 {
13346
13347         /* pthread test function */
13348         pthread_t t;
13349         int status;
13350         int detach = 1;
13351
13352 #ifdef HAVE_PTHREADS_FINAL
13353         /* Final pthreads */
13354         pthread_attr_t attr;
13355
13356         status = pthread_attr_init(&attr);
13357         if( status ) return status;
13358
13359 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13360         if( !detach ) {
13361 #if defined( PTHREAD_CREATE_JOINABLE )
13362                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13363 #else
13364                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13365 #endif
13366
13367 #ifdef PTHREAD_CREATE_DETACHED
13368         } else {
13369                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13370 #endif
13371         }
13372         if( status ) return status;
13373 #endif
13374
13375         status = pthread_create( &t, &attr, task, NULL );
13376         if( status ) return status;
13377
13378 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13379         if( detach ) {
13380                 /* give thread a chance to complete */
13381                 /* it should remain joinable and hence detachable */
13382                 sleep( 1 );
13383
13384                 status = pthread_detach( t );
13385                 if( status ) return status;
13386         }
13387 #endif
13388
13389 #else
13390         /* Draft 4 pthreads */
13391         status = pthread_create( &t, pthread_attr_default, task, NULL );
13392         if( status ) return status;
13393
13394         if( detach ) {
13395                 /* give thread a chance to complete */
13396                 /* it should remain joinable and hence detachable */
13397                 sleep( 1 );
13398
13399                 status = pthread_detach( &t );
13400                 if( status ) return status;
13401         }
13402 #endif
13403
13404 #ifdef HAVE_LINUX_THREADS
13405         pthread_kill_other_threads_np();
13406 #endif
13407
13408         return 0;
13409
13410 }
13411
13412 EOF
13413 if { (eval echo configure:13414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13414 then
13415   ol_cv_pthread_lpthread_lmach_lexc=yes
13416 else
13417   echo "configure: failed program was:" >&5
13418   cat conftest.$ac_ext >&5
13419   rm -fr conftest*
13420   ol_cv_pthread_lpthread_lmach_lexc=no
13421 fi
13422 rm -fr conftest*
13423 fi
13424
13425
13426                 # restore the LIBS
13427                 LIBS="$ol_LIBS"
13428         
13429 fi
13430
13431 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13432
13433         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13434                 ol_link_pthreads="-lpthread -lmach -lexc"
13435                 ol_link_threads=posix
13436         fi
13437 fi
13438
13439
13440                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13441 if test "$ol_link_threads" = no ; then
13442         # try -lpthread -Wl,-woff,85
13443         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13444 echo "configure:13445: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13445 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13446   echo $ac_n "(cached) $ac_c" 1>&6
13447 else
13448   
13449                 # save the flags
13450                 ol_LIBS="$LIBS"
13451                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13452
13453                 if test "$cross_compiling" = yes; then
13454   cat > conftest.$ac_ext <<EOF
13455 #line 13456 "configure"
13456 #include "confdefs.h"
13457 /* pthread test headers */
13458 #include <pthread.h>
13459 #ifndef NULL
13460 #define NULL (void*)0
13461 #endif
13462
13463 static void *task(p)
13464         void *p;
13465 {
13466         return (void *) (p == NULL);
13467 }
13468
13469 int main() {
13470
13471         /* pthread test function */
13472         pthread_t t;
13473         int status;
13474         int detach = 1;
13475
13476 #ifdef HAVE_PTHREADS_FINAL
13477         /* Final pthreads */
13478         pthread_attr_t attr;
13479
13480         status = pthread_attr_init(&attr);
13481         if( status ) return status;
13482
13483 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13484         if( !detach ) {
13485 #if defined( PTHREAD_CREATE_JOINABLE )
13486                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13487 #else
13488                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13489 #endif
13490
13491 #ifdef PTHREAD_CREATE_DETACHED
13492         } else {
13493                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13494 #endif
13495         }
13496         if( status ) return status;
13497 #endif
13498
13499         status = pthread_create( &t, &attr, task, NULL );
13500         if( status ) return status;
13501
13502 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13503         if( detach ) {
13504                 /* give thread a chance to complete */
13505                 /* it should remain joinable and hence detachable */
13506                 sleep( 1 );
13507
13508                 status = pthread_detach( t );
13509                 if( status ) return status;
13510         }
13511 #endif
13512
13513 #else
13514         /* Draft 4 pthreads */
13515         status = pthread_create( &t, pthread_attr_default, task, NULL );
13516         if( status ) return status;
13517
13518         if( detach ) {
13519                 /* give thread a chance to complete */
13520                 /* it should remain joinable and hence detachable */
13521                 sleep( 1 );
13522
13523                 status = pthread_detach( &t );
13524                 if( status ) return status;
13525         }
13526 #endif
13527
13528 #ifdef HAVE_LINUX_THREADS
13529         pthread_kill_other_threads_np();
13530 #endif
13531
13532         return 0;
13533
13534 ; return 0; }
13535 EOF
13536 if { (eval echo configure:13537: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13537   rm -rf conftest*
13538   ol_cv_pthread_lib_lpthread_woff=yes
13539 else
13540   echo "configure: failed program was:" >&5
13541   cat conftest.$ac_ext >&5
13542   rm -rf conftest*
13543   ol_cv_pthread_lib_lpthread_woff=no
13544 fi
13545 rm -f conftest*
13546 else
13547   cat > conftest.$ac_ext <<EOF
13548 #line 13549 "configure"
13549 #include "confdefs.h"
13550 /* pthread test headers */
13551 #include <pthread.h>
13552 #ifndef NULL
13553 #define NULL (void*)0
13554 #endif
13555
13556 static void *task(p)
13557         void *p;
13558 {
13559         return (void *) (p == NULL);
13560 }
13561
13562
13563 int main(argc, argv)
13564         int argc;
13565         char **argv;
13566 {
13567
13568         /* pthread test function */
13569         pthread_t t;
13570         int status;
13571         int detach = 1;
13572
13573 #ifdef HAVE_PTHREADS_FINAL
13574         /* Final pthreads */
13575         pthread_attr_t attr;
13576
13577         status = pthread_attr_init(&attr);
13578         if( status ) return status;
13579
13580 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13581         if( !detach ) {
13582 #if defined( PTHREAD_CREATE_JOINABLE )
13583                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13584 #else
13585                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13586 #endif
13587
13588 #ifdef PTHREAD_CREATE_DETACHED
13589         } else {
13590                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13591 #endif
13592         }
13593         if( status ) return status;
13594 #endif
13595
13596         status = pthread_create( &t, &attr, task, NULL );
13597         if( status ) return status;
13598
13599 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13600         if( detach ) {
13601                 /* give thread a chance to complete */
13602                 /* it should remain joinable and hence detachable */
13603                 sleep( 1 );
13604
13605                 status = pthread_detach( t );
13606                 if( status ) return status;
13607         }
13608 #endif
13609
13610 #else
13611         /* Draft 4 pthreads */
13612         status = pthread_create( &t, pthread_attr_default, task, NULL );
13613         if( status ) return status;
13614
13615         if( detach ) {
13616                 /* give thread a chance to complete */
13617                 /* it should remain joinable and hence detachable */
13618                 sleep( 1 );
13619
13620                 status = pthread_detach( &t );
13621                 if( status ) return status;
13622         }
13623 #endif
13624
13625 #ifdef HAVE_LINUX_THREADS
13626         pthread_kill_other_threads_np();
13627 #endif
13628
13629         return 0;
13630
13631 }
13632
13633 EOF
13634 if { (eval echo configure:13635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13635 then
13636   ol_cv_pthread_lib_lpthread_woff=yes
13637 else
13638   echo "configure: failed program was:" >&5
13639   cat conftest.$ac_ext >&5
13640   rm -fr conftest*
13641   ol_cv_pthread_lib_lpthread_woff=no
13642 fi
13643 rm -fr conftest*
13644 fi
13645
13646
13647                 # restore the LIBS
13648                 LIBS="$ol_LIBS"
13649         
13650 fi
13651
13652 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13653
13654         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13655                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13656                 ol_link_threads=posix
13657         fi
13658 fi
13659
13660
13661                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13662 if test "$ol_link_threads" = no ; then
13663         # try -lpthread
13664         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13665 echo "configure:13666: checking for pthread link with -lpthread" >&5
13666 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13667   echo $ac_n "(cached) $ac_c" 1>&6
13668 else
13669   
13670                 # save the flags
13671                 ol_LIBS="$LIBS"
13672                 LIBS="-lpthread $LIBS"
13673
13674                 if test "$cross_compiling" = yes; then
13675   cat > conftest.$ac_ext <<EOF
13676 #line 13677 "configure"
13677 #include "confdefs.h"
13678 /* pthread test headers */
13679 #include <pthread.h>
13680 #ifndef NULL
13681 #define NULL (void*)0
13682 #endif
13683
13684 static void *task(p)
13685         void *p;
13686 {
13687         return (void *) (p == NULL);
13688 }
13689
13690 int main() {
13691
13692         /* pthread test function */
13693         pthread_t t;
13694         int status;
13695         int detach = 1;
13696
13697 #ifdef HAVE_PTHREADS_FINAL
13698         /* Final pthreads */
13699         pthread_attr_t attr;
13700
13701         status = pthread_attr_init(&attr);
13702         if( status ) return status;
13703
13704 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13705         if( !detach ) {
13706 #if defined( PTHREAD_CREATE_JOINABLE )
13707                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13708 #else
13709                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13710 #endif
13711
13712 #ifdef PTHREAD_CREATE_DETACHED
13713         } else {
13714                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13715 #endif
13716         }
13717         if( status ) return status;
13718 #endif
13719
13720         status = pthread_create( &t, &attr, task, NULL );
13721         if( status ) return status;
13722
13723 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13724         if( detach ) {
13725                 /* give thread a chance to complete */
13726                 /* it should remain joinable and hence detachable */
13727                 sleep( 1 );
13728
13729                 status = pthread_detach( t );
13730                 if( status ) return status;
13731         }
13732 #endif
13733
13734 #else
13735         /* Draft 4 pthreads */
13736         status = pthread_create( &t, pthread_attr_default, task, NULL );
13737         if( status ) return status;
13738
13739         if( detach ) {
13740                 /* give thread a chance to complete */
13741                 /* it should remain joinable and hence detachable */
13742                 sleep( 1 );
13743
13744                 status = pthread_detach( &t );
13745                 if( status ) return status;
13746         }
13747 #endif
13748
13749 #ifdef HAVE_LINUX_THREADS
13750         pthread_kill_other_threads_np();
13751 #endif
13752
13753         return 0;
13754
13755 ; return 0; }
13756 EOF
13757 if { (eval echo configure:13758: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13758   rm -rf conftest*
13759   ol_cv_pthread_lpthread=yes
13760 else
13761   echo "configure: failed program was:" >&5
13762   cat conftest.$ac_ext >&5
13763   rm -rf conftest*
13764   ol_cv_pthread_lpthread=no
13765 fi
13766 rm -f conftest*
13767 else
13768   cat > conftest.$ac_ext <<EOF
13769 #line 13770 "configure"
13770 #include "confdefs.h"
13771 /* pthread test headers */
13772 #include <pthread.h>
13773 #ifndef NULL
13774 #define NULL (void*)0
13775 #endif
13776
13777 static void *task(p)
13778         void *p;
13779 {
13780         return (void *) (p == NULL);
13781 }
13782
13783
13784 int main(argc, argv)
13785         int argc;
13786         char **argv;
13787 {
13788
13789         /* pthread test function */
13790         pthread_t t;
13791         int status;
13792         int detach = 1;
13793
13794 #ifdef HAVE_PTHREADS_FINAL
13795         /* Final pthreads */
13796         pthread_attr_t attr;
13797
13798         status = pthread_attr_init(&attr);
13799         if( status ) return status;
13800
13801 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13802         if( !detach ) {
13803 #if defined( PTHREAD_CREATE_JOINABLE )
13804                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13805 #else
13806                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13807 #endif
13808
13809 #ifdef PTHREAD_CREATE_DETACHED
13810         } else {
13811                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13812 #endif
13813         }
13814         if( status ) return status;
13815 #endif
13816
13817         status = pthread_create( &t, &attr, task, NULL );
13818         if( status ) return status;
13819
13820 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13821         if( detach ) {
13822                 /* give thread a chance to complete */
13823                 /* it should remain joinable and hence detachable */
13824                 sleep( 1 );
13825
13826                 status = pthread_detach( t );
13827                 if( status ) return status;
13828         }
13829 #endif
13830
13831 #else
13832         /* Draft 4 pthreads */
13833         status = pthread_create( &t, pthread_attr_default, task, NULL );
13834         if( status ) return status;
13835
13836         if( detach ) {
13837                 /* give thread a chance to complete */
13838                 /* it should remain joinable and hence detachable */
13839                 sleep( 1 );
13840
13841                 status = pthread_detach( &t );
13842                 if( status ) return status;
13843         }
13844 #endif
13845
13846 #ifdef HAVE_LINUX_THREADS
13847         pthread_kill_other_threads_np();
13848 #endif
13849
13850         return 0;
13851
13852 }
13853
13854 EOF
13855 if { (eval echo configure:13856: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13856 then
13857   ol_cv_pthread_lpthread=yes
13858 else
13859   echo "configure: failed program was:" >&5
13860   cat conftest.$ac_ext >&5
13861   rm -fr conftest*
13862   ol_cv_pthread_lpthread=no
13863 fi
13864 rm -fr conftest*
13865 fi
13866
13867
13868                 # restore the LIBS
13869                 LIBS="$ol_LIBS"
13870         
13871 fi
13872
13873 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
13874
13875         if test $ol_cv_pthread_lpthread = yes ; then
13876                 ol_link_pthreads="-lpthread"
13877                 ol_link_threads=posix
13878         fi
13879 fi
13880
13881                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
13882 if test "$ol_link_threads" = no ; then
13883         # try -lc_r
13884         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
13885 echo "configure:13886: checking for pthread link with -lc_r" >&5
13886 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
13887   echo $ac_n "(cached) $ac_c" 1>&6
13888 else
13889   
13890                 # save the flags
13891                 ol_LIBS="$LIBS"
13892                 LIBS="-lc_r $LIBS"
13893
13894                 if test "$cross_compiling" = yes; then
13895   cat > conftest.$ac_ext <<EOF
13896 #line 13897 "configure"
13897 #include "confdefs.h"
13898 /* pthread test headers */
13899 #include <pthread.h>
13900 #ifndef NULL
13901 #define NULL (void*)0
13902 #endif
13903
13904 static void *task(p)
13905         void *p;
13906 {
13907         return (void *) (p == NULL);
13908 }
13909
13910 int main() {
13911
13912         /* pthread test function */
13913         pthread_t t;
13914         int status;
13915         int detach = 1;
13916
13917 #ifdef HAVE_PTHREADS_FINAL
13918         /* Final pthreads */
13919         pthread_attr_t attr;
13920
13921         status = pthread_attr_init(&attr);
13922         if( status ) return status;
13923
13924 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13925         if( !detach ) {
13926 #if defined( PTHREAD_CREATE_JOINABLE )
13927                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13928 #else
13929                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13930 #endif
13931
13932 #ifdef PTHREAD_CREATE_DETACHED
13933         } else {
13934                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13935 #endif
13936         }
13937         if( status ) return status;
13938 #endif
13939
13940         status = pthread_create( &t, &attr, task, NULL );
13941         if( status ) return status;
13942
13943 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13944         if( detach ) {
13945                 /* give thread a chance to complete */
13946                 /* it should remain joinable and hence detachable */
13947                 sleep( 1 );
13948
13949                 status = pthread_detach( t );
13950                 if( status ) return status;
13951         }
13952 #endif
13953
13954 #else
13955         /* Draft 4 pthreads */
13956         status = pthread_create( &t, pthread_attr_default, task, NULL );
13957         if( status ) return status;
13958
13959         if( detach ) {
13960                 /* give thread a chance to complete */
13961                 /* it should remain joinable and hence detachable */
13962                 sleep( 1 );
13963
13964                 status = pthread_detach( &t );
13965                 if( status ) return status;
13966         }
13967 #endif
13968
13969 #ifdef HAVE_LINUX_THREADS
13970         pthread_kill_other_threads_np();
13971 #endif
13972
13973         return 0;
13974
13975 ; return 0; }
13976 EOF
13977 if { (eval echo configure:13978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13978   rm -rf conftest*
13979   ol_cv_pthread_lc_r=yes
13980 else
13981   echo "configure: failed program was:" >&5
13982   cat conftest.$ac_ext >&5
13983   rm -rf conftest*
13984   ol_cv_pthread_lc_r=no
13985 fi
13986 rm -f conftest*
13987 else
13988   cat > conftest.$ac_ext <<EOF
13989 #line 13990 "configure"
13990 #include "confdefs.h"
13991 /* pthread test headers */
13992 #include <pthread.h>
13993 #ifndef NULL
13994 #define NULL (void*)0
13995 #endif
13996
13997 static void *task(p)
13998         void *p;
13999 {
14000         return (void *) (p == NULL);
14001 }
14002
14003
14004 int main(argc, argv)
14005         int argc;
14006         char **argv;
14007 {
14008
14009         /* pthread test function */
14010         pthread_t t;
14011         int status;
14012         int detach = 1;
14013
14014 #ifdef HAVE_PTHREADS_FINAL
14015         /* Final pthreads */
14016         pthread_attr_t attr;
14017
14018         status = pthread_attr_init(&attr);
14019         if( status ) return status;
14020
14021 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14022         if( !detach ) {
14023 #if defined( PTHREAD_CREATE_JOINABLE )
14024                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14025 #else
14026                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14027 #endif
14028
14029 #ifdef PTHREAD_CREATE_DETACHED
14030         } else {
14031                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14032 #endif
14033         }
14034         if( status ) return status;
14035 #endif
14036
14037         status = pthread_create( &t, &attr, task, NULL );
14038         if( status ) return status;
14039
14040 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14041         if( detach ) {
14042                 /* give thread a chance to complete */
14043                 /* it should remain joinable and hence detachable */
14044                 sleep( 1 );
14045
14046                 status = pthread_detach( t );
14047                 if( status ) return status;
14048         }
14049 #endif
14050
14051 #else
14052         /* Draft 4 pthreads */
14053         status = pthread_create( &t, pthread_attr_default, task, NULL );
14054         if( status ) return status;
14055
14056         if( detach ) {
14057                 /* give thread a chance to complete */
14058                 /* it should remain joinable and hence detachable */
14059                 sleep( 1 );
14060
14061                 status = pthread_detach( &t );
14062                 if( status ) return status;
14063         }
14064 #endif
14065
14066 #ifdef HAVE_LINUX_THREADS
14067         pthread_kill_other_threads_np();
14068 #endif
14069
14070         return 0;
14071
14072 }
14073
14074 EOF
14075 if { (eval echo configure:14076: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14076 then
14077   ol_cv_pthread_lc_r=yes
14078 else
14079   echo "configure: failed program was:" >&5
14080   cat conftest.$ac_ext >&5
14081   rm -fr conftest*
14082   ol_cv_pthread_lc_r=no
14083 fi
14084 rm -fr conftest*
14085 fi
14086
14087
14088                 # restore the LIBS
14089                 LIBS="$ol_LIBS"
14090         
14091 fi
14092
14093 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14094
14095         if test $ol_cv_pthread_lc_r = yes ; then
14096                 ol_link_pthreads="-lc_r"
14097                 ol_link_threads=posix
14098         fi
14099 fi
14100
14101
14102                 # Pthread try link: -threads (ol_cv_pthread_threads)
14103 if test "$ol_link_threads" = no ; then
14104         # try -threads
14105         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14106 echo "configure:14107: checking for pthread link with -threads" >&5
14107 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14108   echo $ac_n "(cached) $ac_c" 1>&6
14109 else
14110   
14111                 # save the flags
14112                 ol_LIBS="$LIBS"
14113                 LIBS="-threads $LIBS"
14114
14115                 if test "$cross_compiling" = yes; then
14116   cat > conftest.$ac_ext <<EOF
14117 #line 14118 "configure"
14118 #include "confdefs.h"
14119 /* pthread test headers */
14120 #include <pthread.h>
14121 #ifndef NULL
14122 #define NULL (void*)0
14123 #endif
14124
14125 static void *task(p)
14126         void *p;
14127 {
14128         return (void *) (p == NULL);
14129 }
14130
14131 int main() {
14132
14133         /* pthread test function */
14134         pthread_t t;
14135         int status;
14136         int detach = 1;
14137
14138 #ifdef HAVE_PTHREADS_FINAL
14139         /* Final pthreads */
14140         pthread_attr_t attr;
14141
14142         status = pthread_attr_init(&attr);
14143         if( status ) return status;
14144
14145 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14146         if( !detach ) {
14147 #if defined( PTHREAD_CREATE_JOINABLE )
14148                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14149 #else
14150                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14151 #endif
14152
14153 #ifdef PTHREAD_CREATE_DETACHED
14154         } else {
14155                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14156 #endif
14157         }
14158         if( status ) return status;
14159 #endif
14160
14161         status = pthread_create( &t, &attr, task, NULL );
14162         if( status ) return status;
14163
14164 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14165         if( detach ) {
14166                 /* give thread a chance to complete */
14167                 /* it should remain joinable and hence detachable */
14168                 sleep( 1 );
14169
14170                 status = pthread_detach( t );
14171                 if( status ) return status;
14172         }
14173 #endif
14174
14175 #else
14176         /* Draft 4 pthreads */
14177         status = pthread_create( &t, pthread_attr_default, task, NULL );
14178         if( status ) return status;
14179
14180         if( detach ) {
14181                 /* give thread a chance to complete */
14182                 /* it should remain joinable and hence detachable */
14183                 sleep( 1 );
14184
14185                 status = pthread_detach( &t );
14186                 if( status ) return status;
14187         }
14188 #endif
14189
14190 #ifdef HAVE_LINUX_THREADS
14191         pthread_kill_other_threads_np();
14192 #endif
14193
14194         return 0;
14195
14196 ; return 0; }
14197 EOF
14198 if { (eval echo configure:14199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14199   rm -rf conftest*
14200   ol_cv_pthread_threads=yes
14201 else
14202   echo "configure: failed program was:" >&5
14203   cat conftest.$ac_ext >&5
14204   rm -rf conftest*
14205   ol_cv_pthread_threads=no
14206 fi
14207 rm -f conftest*
14208 else
14209   cat > conftest.$ac_ext <<EOF
14210 #line 14211 "configure"
14211 #include "confdefs.h"
14212 /* pthread test headers */
14213 #include <pthread.h>
14214 #ifndef NULL
14215 #define NULL (void*)0
14216 #endif
14217
14218 static void *task(p)
14219         void *p;
14220 {
14221         return (void *) (p == NULL);
14222 }
14223
14224
14225 int main(argc, argv)
14226         int argc;
14227         char **argv;
14228 {
14229
14230         /* pthread test function */
14231         pthread_t t;
14232         int status;
14233         int detach = 1;
14234
14235 #ifdef HAVE_PTHREADS_FINAL
14236         /* Final pthreads */
14237         pthread_attr_t attr;
14238
14239         status = pthread_attr_init(&attr);
14240         if( status ) return status;
14241
14242 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14243         if( !detach ) {
14244 #if defined( PTHREAD_CREATE_JOINABLE )
14245                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14246 #else
14247                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14248 #endif
14249
14250 #ifdef PTHREAD_CREATE_DETACHED
14251         } else {
14252                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14253 #endif
14254         }
14255         if( status ) return status;
14256 #endif
14257
14258         status = pthread_create( &t, &attr, task, NULL );
14259         if( status ) return status;
14260
14261 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14262         if( detach ) {
14263                 /* give thread a chance to complete */
14264                 /* it should remain joinable and hence detachable */
14265                 sleep( 1 );
14266
14267                 status = pthread_detach( t );
14268                 if( status ) return status;
14269         }
14270 #endif
14271
14272 #else
14273         /* Draft 4 pthreads */
14274         status = pthread_create( &t, pthread_attr_default, task, NULL );
14275         if( status ) return status;
14276
14277         if( detach ) {
14278                 /* give thread a chance to complete */
14279                 /* it should remain joinable and hence detachable */
14280                 sleep( 1 );
14281
14282                 status = pthread_detach( &t );
14283                 if( status ) return status;
14284         }
14285 #endif
14286
14287 #ifdef HAVE_LINUX_THREADS
14288         pthread_kill_other_threads_np();
14289 #endif
14290
14291         return 0;
14292
14293 }
14294
14295 EOF
14296 if { (eval echo configure:14297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14297 then
14298   ol_cv_pthread_threads=yes
14299 else
14300   echo "configure: failed program was:" >&5
14301   cat conftest.$ac_ext >&5
14302   rm -fr conftest*
14303   ol_cv_pthread_threads=no
14304 fi
14305 rm -fr conftest*
14306 fi
14307
14308
14309                 # restore the LIBS
14310                 LIBS="$ol_LIBS"
14311         
14312 fi
14313
14314 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14315
14316         if test $ol_cv_pthread_threads = yes ; then
14317                 ol_link_pthreads="-threads"
14318                 ol_link_threads=posix
14319         fi
14320 fi
14321
14322
14323                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14324 if test "$ol_link_threads" = no ; then
14325         # try -lpthreads -lmach -lexc -lc_r
14326         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14327 echo "configure:14328: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14328 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14329   echo $ac_n "(cached) $ac_c" 1>&6
14330 else
14331   
14332                 # save the flags
14333                 ol_LIBS="$LIBS"
14334                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14335
14336                 if test "$cross_compiling" = yes; then
14337   cat > conftest.$ac_ext <<EOF
14338 #line 14339 "configure"
14339 #include "confdefs.h"
14340 /* pthread test headers */
14341 #include <pthread.h>
14342 #ifndef NULL
14343 #define NULL (void*)0
14344 #endif
14345
14346 static void *task(p)
14347         void *p;
14348 {
14349         return (void *) (p == NULL);
14350 }
14351
14352 int main() {
14353
14354         /* pthread test function */
14355         pthread_t t;
14356         int status;
14357         int detach = 1;
14358
14359 #ifdef HAVE_PTHREADS_FINAL
14360         /* Final pthreads */
14361         pthread_attr_t attr;
14362
14363         status = pthread_attr_init(&attr);
14364         if( status ) return status;
14365
14366 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14367         if( !detach ) {
14368 #if defined( PTHREAD_CREATE_JOINABLE )
14369                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14370 #else
14371                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14372 #endif
14373
14374 #ifdef PTHREAD_CREATE_DETACHED
14375         } else {
14376                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14377 #endif
14378         }
14379         if( status ) return status;
14380 #endif
14381
14382         status = pthread_create( &t, &attr, task, NULL );
14383         if( status ) return status;
14384
14385 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14386         if( detach ) {
14387                 /* give thread a chance to complete */
14388                 /* it should remain joinable and hence detachable */
14389                 sleep( 1 );
14390
14391                 status = pthread_detach( t );
14392                 if( status ) return status;
14393         }
14394 #endif
14395
14396 #else
14397         /* Draft 4 pthreads */
14398         status = pthread_create( &t, pthread_attr_default, task, NULL );
14399         if( status ) return status;
14400
14401         if( detach ) {
14402                 /* give thread a chance to complete */
14403                 /* it should remain joinable and hence detachable */
14404                 sleep( 1 );
14405
14406                 status = pthread_detach( &t );
14407                 if( status ) return status;
14408         }
14409 #endif
14410
14411 #ifdef HAVE_LINUX_THREADS
14412         pthread_kill_other_threads_np();
14413 #endif
14414
14415         return 0;
14416
14417 ; return 0; }
14418 EOF
14419 if { (eval echo configure:14420: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14420   rm -rf conftest*
14421   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14422 else
14423   echo "configure: failed program was:" >&5
14424   cat conftest.$ac_ext >&5
14425   rm -rf conftest*
14426   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14427 fi
14428 rm -f conftest*
14429 else
14430   cat > conftest.$ac_ext <<EOF
14431 #line 14432 "configure"
14432 #include "confdefs.h"
14433 /* pthread test headers */
14434 #include <pthread.h>
14435 #ifndef NULL
14436 #define NULL (void*)0
14437 #endif
14438
14439 static void *task(p)
14440         void *p;
14441 {
14442         return (void *) (p == NULL);
14443 }
14444
14445
14446 int main(argc, argv)
14447         int argc;
14448         char **argv;
14449 {
14450
14451         /* pthread test function */
14452         pthread_t t;
14453         int status;
14454         int detach = 1;
14455
14456 #ifdef HAVE_PTHREADS_FINAL
14457         /* Final pthreads */
14458         pthread_attr_t attr;
14459
14460         status = pthread_attr_init(&attr);
14461         if( status ) return status;
14462
14463 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14464         if( !detach ) {
14465 #if defined( PTHREAD_CREATE_JOINABLE )
14466                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14467 #else
14468                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14469 #endif
14470
14471 #ifdef PTHREAD_CREATE_DETACHED
14472         } else {
14473                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14474 #endif
14475         }
14476         if( status ) return status;
14477 #endif
14478
14479         status = pthread_create( &t, &attr, task, NULL );
14480         if( status ) return status;
14481
14482 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14483         if( detach ) {
14484                 /* give thread a chance to complete */
14485                 /* it should remain joinable and hence detachable */
14486                 sleep( 1 );
14487
14488                 status = pthread_detach( t );
14489                 if( status ) return status;
14490         }
14491 #endif
14492
14493 #else
14494         /* Draft 4 pthreads */
14495         status = pthread_create( &t, pthread_attr_default, task, NULL );
14496         if( status ) return status;
14497
14498         if( detach ) {
14499                 /* give thread a chance to complete */
14500                 /* it should remain joinable and hence detachable */
14501                 sleep( 1 );
14502
14503                 status = pthread_detach( &t );
14504                 if( status ) return status;
14505         }
14506 #endif
14507
14508 #ifdef HAVE_LINUX_THREADS
14509         pthread_kill_other_threads_np();
14510 #endif
14511
14512         return 0;
14513
14514 }
14515
14516 EOF
14517 if { (eval echo configure:14518: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14518 then
14519   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14520 else
14521   echo "configure: failed program was:" >&5
14522   cat conftest.$ac_ext >&5
14523   rm -fr conftest*
14524   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14525 fi
14526 rm -fr conftest*
14527 fi
14528
14529
14530                 # restore the LIBS
14531                 LIBS="$ol_LIBS"
14532         
14533 fi
14534
14535 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14536
14537         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14538                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14539                 ol_link_threads=posix
14540         fi
14541 fi
14542
14543                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14544 if test "$ol_link_threads" = no ; then
14545         # try -lpthreads -lmach -lexc
14546         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14547 echo "configure:14548: checking for pthread link with -lpthreads -lmach -lexc" >&5
14548 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14549   echo $ac_n "(cached) $ac_c" 1>&6
14550 else
14551   
14552                 # save the flags
14553                 ol_LIBS="$LIBS"
14554                 LIBS="-lpthreads -lmach -lexc $LIBS"
14555
14556                 if test "$cross_compiling" = yes; then
14557   cat > conftest.$ac_ext <<EOF
14558 #line 14559 "configure"
14559 #include "confdefs.h"
14560 /* pthread test headers */
14561 #include <pthread.h>
14562 #ifndef NULL
14563 #define NULL (void*)0
14564 #endif
14565
14566 static void *task(p)
14567         void *p;
14568 {
14569         return (void *) (p == NULL);
14570 }
14571
14572 int main() {
14573
14574         /* pthread test function */
14575         pthread_t t;
14576         int status;
14577         int detach = 1;
14578
14579 #ifdef HAVE_PTHREADS_FINAL
14580         /* Final pthreads */
14581         pthread_attr_t attr;
14582
14583         status = pthread_attr_init(&attr);
14584         if( status ) return status;
14585
14586 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14587         if( !detach ) {
14588 #if defined( PTHREAD_CREATE_JOINABLE )
14589                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14590 #else
14591                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14592 #endif
14593
14594 #ifdef PTHREAD_CREATE_DETACHED
14595         } else {
14596                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14597 #endif
14598         }
14599         if( status ) return status;
14600 #endif
14601
14602         status = pthread_create( &t, &attr, task, NULL );
14603         if( status ) return status;
14604
14605 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14606         if( detach ) {
14607                 /* give thread a chance to complete */
14608                 /* it should remain joinable and hence detachable */
14609                 sleep( 1 );
14610
14611                 status = pthread_detach( t );
14612                 if( status ) return status;
14613         }
14614 #endif
14615
14616 #else
14617         /* Draft 4 pthreads */
14618         status = pthread_create( &t, pthread_attr_default, task, NULL );
14619         if( status ) return status;
14620
14621         if( detach ) {
14622                 /* give thread a chance to complete */
14623                 /* it should remain joinable and hence detachable */
14624                 sleep( 1 );
14625
14626                 status = pthread_detach( &t );
14627                 if( status ) return status;
14628         }
14629 #endif
14630
14631 #ifdef HAVE_LINUX_THREADS
14632         pthread_kill_other_threads_np();
14633 #endif
14634
14635         return 0;
14636
14637 ; return 0; }
14638 EOF
14639 if { (eval echo configure:14640: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14640   rm -rf conftest*
14641   ol_cv_pthread_lpthreads_lmach_lexc=yes
14642 else
14643   echo "configure: failed program was:" >&5
14644   cat conftest.$ac_ext >&5
14645   rm -rf conftest*
14646   ol_cv_pthread_lpthreads_lmach_lexc=no
14647 fi
14648 rm -f conftest*
14649 else
14650   cat > conftest.$ac_ext <<EOF
14651 #line 14652 "configure"
14652 #include "confdefs.h"
14653 /* pthread test headers */
14654 #include <pthread.h>
14655 #ifndef NULL
14656 #define NULL (void*)0
14657 #endif
14658
14659 static void *task(p)
14660         void *p;
14661 {
14662         return (void *) (p == NULL);
14663 }
14664
14665
14666 int main(argc, argv)
14667         int argc;
14668         char **argv;
14669 {
14670
14671         /* pthread test function */
14672         pthread_t t;
14673         int status;
14674         int detach = 1;
14675
14676 #ifdef HAVE_PTHREADS_FINAL
14677         /* Final pthreads */
14678         pthread_attr_t attr;
14679
14680         status = pthread_attr_init(&attr);
14681         if( status ) return status;
14682
14683 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14684         if( !detach ) {
14685 #if defined( PTHREAD_CREATE_JOINABLE )
14686                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14687 #else
14688                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14689 #endif
14690
14691 #ifdef PTHREAD_CREATE_DETACHED
14692         } else {
14693                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14694 #endif
14695         }
14696         if( status ) return status;
14697 #endif
14698
14699         status = pthread_create( &t, &attr, task, NULL );
14700         if( status ) return status;
14701
14702 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14703         if( detach ) {
14704                 /* give thread a chance to complete */
14705                 /* it should remain joinable and hence detachable */
14706                 sleep( 1 );
14707
14708                 status = pthread_detach( t );
14709                 if( status ) return status;
14710         }
14711 #endif
14712
14713 #else
14714         /* Draft 4 pthreads */
14715         status = pthread_create( &t, pthread_attr_default, task, NULL );
14716         if( status ) return status;
14717
14718         if( detach ) {
14719                 /* give thread a chance to complete */
14720                 /* it should remain joinable and hence detachable */
14721                 sleep( 1 );
14722
14723                 status = pthread_detach( &t );
14724                 if( status ) return status;
14725         }
14726 #endif
14727
14728 #ifdef HAVE_LINUX_THREADS
14729         pthread_kill_other_threads_np();
14730 #endif
14731
14732         return 0;
14733
14734 }
14735
14736 EOF
14737 if { (eval echo configure:14738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14738 then
14739   ol_cv_pthread_lpthreads_lmach_lexc=yes
14740 else
14741   echo "configure: failed program was:" >&5
14742   cat conftest.$ac_ext >&5
14743   rm -fr conftest*
14744   ol_cv_pthread_lpthreads_lmach_lexc=no
14745 fi
14746 rm -fr conftest*
14747 fi
14748
14749
14750                 # restore the LIBS
14751                 LIBS="$ol_LIBS"
14752         
14753 fi
14754
14755 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14756
14757         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14758                 ol_link_pthreads="-lpthreads -lmach -lexc"
14759                 ol_link_threads=posix
14760         fi
14761 fi
14762
14763                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14764 if test "$ol_link_threads" = no ; then
14765         # try -lpthreads -lexc
14766         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14767 echo "configure:14768: checking for pthread link with -lpthreads -lexc" >&5
14768 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14769   echo $ac_n "(cached) $ac_c" 1>&6
14770 else
14771   
14772                 # save the flags
14773                 ol_LIBS="$LIBS"
14774                 LIBS="-lpthreads -lexc $LIBS"
14775
14776                 if test "$cross_compiling" = yes; then
14777   cat > conftest.$ac_ext <<EOF
14778 #line 14779 "configure"
14779 #include "confdefs.h"
14780 /* pthread test headers */
14781 #include <pthread.h>
14782 #ifndef NULL
14783 #define NULL (void*)0
14784 #endif
14785
14786 static void *task(p)
14787         void *p;
14788 {
14789         return (void *) (p == NULL);
14790 }
14791
14792 int main() {
14793
14794         /* pthread test function */
14795         pthread_t t;
14796         int status;
14797         int detach = 1;
14798
14799 #ifdef HAVE_PTHREADS_FINAL
14800         /* Final pthreads */
14801         pthread_attr_t attr;
14802
14803         status = pthread_attr_init(&attr);
14804         if( status ) return status;
14805
14806 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14807         if( !detach ) {
14808 #if defined( PTHREAD_CREATE_JOINABLE )
14809                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14810 #else
14811                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14812 #endif
14813
14814 #ifdef PTHREAD_CREATE_DETACHED
14815         } else {
14816                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14817 #endif
14818         }
14819         if( status ) return status;
14820 #endif
14821
14822         status = pthread_create( &t, &attr, task, NULL );
14823         if( status ) return status;
14824
14825 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14826         if( detach ) {
14827                 /* give thread a chance to complete */
14828                 /* it should remain joinable and hence detachable */
14829                 sleep( 1 );
14830
14831                 status = pthread_detach( t );
14832                 if( status ) return status;
14833         }
14834 #endif
14835
14836 #else
14837         /* Draft 4 pthreads */
14838         status = pthread_create( &t, pthread_attr_default, task, NULL );
14839         if( status ) return status;
14840
14841         if( detach ) {
14842                 /* give thread a chance to complete */
14843                 /* it should remain joinable and hence detachable */
14844                 sleep( 1 );
14845
14846                 status = pthread_detach( &t );
14847                 if( status ) return status;
14848         }
14849 #endif
14850
14851 #ifdef HAVE_LINUX_THREADS
14852         pthread_kill_other_threads_np();
14853 #endif
14854
14855         return 0;
14856
14857 ; return 0; }
14858 EOF
14859 if { (eval echo configure:14860: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14860   rm -rf conftest*
14861   ol_cv_pthread_lpthreads_lexc=yes
14862 else
14863   echo "configure: failed program was:" >&5
14864   cat conftest.$ac_ext >&5
14865   rm -rf conftest*
14866   ol_cv_pthread_lpthreads_lexc=no
14867 fi
14868 rm -f conftest*
14869 else
14870   cat > conftest.$ac_ext <<EOF
14871 #line 14872 "configure"
14872 #include "confdefs.h"
14873 /* pthread test headers */
14874 #include <pthread.h>
14875 #ifndef NULL
14876 #define NULL (void*)0
14877 #endif
14878
14879 static void *task(p)
14880         void *p;
14881 {
14882         return (void *) (p == NULL);
14883 }
14884
14885
14886 int main(argc, argv)
14887         int argc;
14888         char **argv;
14889 {
14890
14891         /* pthread test function */
14892         pthread_t t;
14893         int status;
14894         int detach = 1;
14895
14896 #ifdef HAVE_PTHREADS_FINAL
14897         /* Final pthreads */
14898         pthread_attr_t attr;
14899
14900         status = pthread_attr_init(&attr);
14901         if( status ) return status;
14902
14903 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14904         if( !detach ) {
14905 #if defined( PTHREAD_CREATE_JOINABLE )
14906                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14907 #else
14908                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14909 #endif
14910
14911 #ifdef PTHREAD_CREATE_DETACHED
14912         } else {
14913                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14914 #endif
14915         }
14916         if( status ) return status;
14917 #endif
14918
14919         status = pthread_create( &t, &attr, task, NULL );
14920         if( status ) return status;
14921
14922 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14923         if( detach ) {
14924                 /* give thread a chance to complete */
14925                 /* it should remain joinable and hence detachable */
14926                 sleep( 1 );
14927
14928                 status = pthread_detach( t );
14929                 if( status ) return status;
14930         }
14931 #endif
14932
14933 #else
14934         /* Draft 4 pthreads */
14935         status = pthread_create( &t, pthread_attr_default, task, NULL );
14936         if( status ) return status;
14937
14938         if( detach ) {
14939                 /* give thread a chance to complete */
14940                 /* it should remain joinable and hence detachable */
14941                 sleep( 1 );
14942
14943                 status = pthread_detach( &t );
14944                 if( status ) return status;
14945         }
14946 #endif
14947
14948 #ifdef HAVE_LINUX_THREADS
14949         pthread_kill_other_threads_np();
14950 #endif
14951
14952         return 0;
14953
14954 }
14955
14956 EOF
14957 if { (eval echo configure:14958: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14958 then
14959   ol_cv_pthread_lpthreads_lexc=yes
14960 else
14961   echo "configure: failed program was:" >&5
14962   cat conftest.$ac_ext >&5
14963   rm -fr conftest*
14964   ol_cv_pthread_lpthreads_lexc=no
14965 fi
14966 rm -fr conftest*
14967 fi
14968
14969
14970                 # restore the LIBS
14971                 LIBS="$ol_LIBS"
14972         
14973 fi
14974
14975 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
14976
14977         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
14978                 ol_link_pthreads="-lpthreads -lexc"
14979                 ol_link_threads=posix
14980         fi
14981 fi
14982
14983
14984                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
14985 if test "$ol_link_threads" = no ; then
14986         # try -lpthreads
14987         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
14988 echo "configure:14989: checking for pthread link with -lpthreads" >&5
14989 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
14990   echo $ac_n "(cached) $ac_c" 1>&6
14991 else
14992   
14993                 # save the flags
14994                 ol_LIBS="$LIBS"
14995                 LIBS="-lpthreads $LIBS"
14996
14997                 if test "$cross_compiling" = yes; then
14998   cat > conftest.$ac_ext <<EOF
14999 #line 15000 "configure"
15000 #include "confdefs.h"
15001 /* pthread test headers */
15002 #include <pthread.h>
15003 #ifndef NULL
15004 #define NULL (void*)0
15005 #endif
15006
15007 static void *task(p)
15008         void *p;
15009 {
15010         return (void *) (p == NULL);
15011 }
15012
15013 int main() {
15014
15015         /* pthread test function */
15016         pthread_t t;
15017         int status;
15018         int detach = 1;
15019
15020 #ifdef HAVE_PTHREADS_FINAL
15021         /* Final pthreads */
15022         pthread_attr_t attr;
15023
15024         status = pthread_attr_init(&attr);
15025         if( status ) return status;
15026
15027 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15028         if( !detach ) {
15029 #if defined( PTHREAD_CREATE_JOINABLE )
15030                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15031 #else
15032                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15033 #endif
15034
15035 #ifdef PTHREAD_CREATE_DETACHED
15036         } else {
15037                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15038 #endif
15039         }
15040         if( status ) return status;
15041 #endif
15042
15043         status = pthread_create( &t, &attr, task, NULL );
15044         if( status ) return status;
15045
15046 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15047         if( detach ) {
15048                 /* give thread a chance to complete */
15049                 /* it should remain joinable and hence detachable */
15050                 sleep( 1 );
15051
15052                 status = pthread_detach( t );
15053                 if( status ) return status;
15054         }
15055 #endif
15056
15057 #else
15058         /* Draft 4 pthreads */
15059         status = pthread_create( &t, pthread_attr_default, task, NULL );
15060         if( status ) return status;
15061
15062         if( detach ) {
15063                 /* give thread a chance to complete */
15064                 /* it should remain joinable and hence detachable */
15065                 sleep( 1 );
15066
15067                 status = pthread_detach( &t );
15068                 if( status ) return status;
15069         }
15070 #endif
15071
15072 #ifdef HAVE_LINUX_THREADS
15073         pthread_kill_other_threads_np();
15074 #endif
15075
15076         return 0;
15077
15078 ; return 0; }
15079 EOF
15080 if { (eval echo configure:15081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15081   rm -rf conftest*
15082   ol_cv_pthread_lib_lpthreads=yes
15083 else
15084   echo "configure: failed program was:" >&5
15085   cat conftest.$ac_ext >&5
15086   rm -rf conftest*
15087   ol_cv_pthread_lib_lpthreads=no
15088 fi
15089 rm -f conftest*
15090 else
15091   cat > conftest.$ac_ext <<EOF
15092 #line 15093 "configure"
15093 #include "confdefs.h"
15094 /* pthread test headers */
15095 #include <pthread.h>
15096 #ifndef NULL
15097 #define NULL (void*)0
15098 #endif
15099
15100 static void *task(p)
15101         void *p;
15102 {
15103         return (void *) (p == NULL);
15104 }
15105
15106
15107 int main(argc, argv)
15108         int argc;
15109         char **argv;
15110 {
15111
15112         /* pthread test function */
15113         pthread_t t;
15114         int status;
15115         int detach = 1;
15116
15117 #ifdef HAVE_PTHREADS_FINAL
15118         /* Final pthreads */
15119         pthread_attr_t attr;
15120
15121         status = pthread_attr_init(&attr);
15122         if( status ) return status;
15123
15124 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15125         if( !detach ) {
15126 #if defined( PTHREAD_CREATE_JOINABLE )
15127                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15128 #else
15129                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15130 #endif
15131
15132 #ifdef PTHREAD_CREATE_DETACHED
15133         } else {
15134                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15135 #endif
15136         }
15137         if( status ) return status;
15138 #endif
15139
15140         status = pthread_create( &t, &attr, task, NULL );
15141         if( status ) return status;
15142
15143 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15144         if( detach ) {
15145                 /* give thread a chance to complete */
15146                 /* it should remain joinable and hence detachable */
15147                 sleep( 1 );
15148
15149                 status = pthread_detach( t );
15150                 if( status ) return status;
15151         }
15152 #endif
15153
15154 #else
15155         /* Draft 4 pthreads */
15156         status = pthread_create( &t, pthread_attr_default, task, NULL );
15157         if( status ) return status;
15158
15159         if( detach ) {
15160                 /* give thread a chance to complete */
15161                 /* it should remain joinable and hence detachable */
15162                 sleep( 1 );
15163
15164                 status = pthread_detach( &t );
15165                 if( status ) return status;
15166         }
15167 #endif
15168
15169 #ifdef HAVE_LINUX_THREADS
15170         pthread_kill_other_threads_np();
15171 #endif
15172
15173         return 0;
15174
15175 }
15176
15177 EOF
15178 if { (eval echo configure:15179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15179 then
15180   ol_cv_pthread_lib_lpthreads=yes
15181 else
15182   echo "configure: failed program was:" >&5
15183   cat conftest.$ac_ext >&5
15184   rm -fr conftest*
15185   ol_cv_pthread_lib_lpthreads=no
15186 fi
15187 rm -fr conftest*
15188 fi
15189
15190
15191                 # restore the LIBS
15192                 LIBS="$ol_LIBS"
15193         
15194 fi
15195
15196 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15197
15198         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15199                 ol_link_pthreads="-lpthreads"
15200                 ol_link_threads=posix
15201         fi
15202 fi
15203
15204
15205                 if test $ol_link_threads != no ; then
15206                         cat >> confdefs.h <<\EOF
15207 #define HAVE_PTHREADS 1
15208 EOF
15209
15210
15211                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15212
15213                                                 save_CPPFLAGS="$CPPFLAGS"
15214                         save_LIBS="$LIBS"
15215                         LIBS="$LTHREAD_LIBS $LIBS"
15216
15217                                                                                                 for ac_func in sched_yield pthread_yield
15218 do
15219 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15220 echo "configure:15221: checking for $ac_func" >&5
15221 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15222   echo $ac_n "(cached) $ac_c" 1>&6
15223 else
15224   cat > conftest.$ac_ext <<EOF
15225 #line 15226 "configure"
15226 #include "confdefs.h"
15227 /* System header to define __stub macros and hopefully few prototypes,
15228     which can conflict with char $ac_func(); below.  */
15229 #include <assert.h>
15230 /* Override any gcc2 internal prototype to avoid an error.  */
15231 /* We use char because int might match the return type of a gcc2
15232     builtin and then its argument prototype would still apply.  */
15233 char $ac_func();
15234 char (*f)();
15235
15236 int main() {
15237
15238 /* The GNU C library defines this for functions which it implements
15239     to always fail with ENOSYS.  Some functions are actually named
15240     something starting with __ and the normal name is an alias.  */
15241 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15242 choke me
15243 #else
15244 f = $ac_func;
15245 #endif
15246
15247 ; return 0; }
15248 EOF
15249 if { (eval echo configure:15250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15250   rm -rf conftest*
15251   eval "ac_cv_func_$ac_func=yes"
15252 else
15253   echo "configure: failed program was:" >&5
15254   cat conftest.$ac_ext >&5
15255   rm -rf conftest*
15256   eval "ac_cv_func_$ac_func=no"
15257 fi
15258 rm -f conftest*
15259 fi
15260
15261 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15262   echo "$ac_t""yes" 1>&6
15263     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15264   cat >> confdefs.h <<EOF
15265 #define $ac_tr_func 1
15266 EOF
15267  
15268 else
15269   echo "$ac_t""no" 1>&6
15270 fi
15271 done
15272
15273
15274                         if test $ac_cv_func_sched_yield = no -a \
15275                                 $ac_cv_func_pthread_yield = no ; then
15276                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15277 echo "configure:15278: checking for sched_yield in -lrt" >&5
15278 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15279 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15280   echo $ac_n "(cached) $ac_c" 1>&6
15281 else
15282   ac_save_LIBS="$LIBS"
15283 LIBS="-lrt  $LIBS"
15284 cat > conftest.$ac_ext <<EOF
15285 #line 15286 "configure"
15286 #include "confdefs.h"
15287 /* Override any gcc2 internal prototype to avoid an error.  */
15288 /* We use char because int might match the return type of a gcc2
15289     builtin and then its argument prototype would still apply.  */
15290 char sched_yield();
15291
15292 int main() {
15293 sched_yield()
15294 ; return 0; }
15295 EOF
15296 if { (eval echo configure:15297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15297   rm -rf conftest*
15298   eval "ac_cv_lib_$ac_lib_var=yes"
15299 else
15300   echo "configure: failed program was:" >&5
15301   cat conftest.$ac_ext >&5
15302   rm -rf conftest*
15303   eval "ac_cv_lib_$ac_lib_var=no"
15304 fi
15305 rm -f conftest*
15306 LIBS="$ac_save_LIBS"
15307
15308 fi
15309 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15310   echo "$ac_t""yes" 1>&6
15311   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15312                                         cat >> confdefs.h <<\EOF
15313 #define HAVE_SCHED_YIELD 1
15314 EOF
15315
15316                                         ac_cv_func_sched_yield=yes
15317 else
15318   echo "$ac_t""no" 1>&6
15319 ac_cv_func_sched_yield=no
15320 fi
15321
15322                         fi
15323                         if test $ac_cv_func_sched_yield = no -a \
15324                                 $ac_cv_func_pthread_yield = no ; then
15325                                                                                                 for ac_func in thr_yield
15326 do
15327 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15328 echo "configure:15329: checking for $ac_func" >&5
15329 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15330   echo $ac_n "(cached) $ac_c" 1>&6
15331 else
15332   cat > conftest.$ac_ext <<EOF
15333 #line 15334 "configure"
15334 #include "confdefs.h"
15335 /* System header to define __stub macros and hopefully few prototypes,
15336     which can conflict with char $ac_func(); below.  */
15337 #include <assert.h>
15338 /* Override any gcc2 internal prototype to avoid an error.  */
15339 /* We use char because int might match the return type of a gcc2
15340     builtin and then its argument prototype would still apply.  */
15341 char $ac_func();
15342 char (*f)();
15343
15344 int main() {
15345
15346 /* The GNU C library defines this for functions which it implements
15347     to always fail with ENOSYS.  Some functions are actually named
15348     something starting with __ and the normal name is an alias.  */
15349 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15350 choke me
15351 #else
15352 f = $ac_func;
15353 #endif
15354
15355 ; return 0; }
15356 EOF
15357 if { (eval echo configure:15358: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15358   rm -rf conftest*
15359   eval "ac_cv_func_$ac_func=yes"
15360 else
15361   echo "configure: failed program was:" >&5
15362   cat conftest.$ac_ext >&5
15363   rm -rf conftest*
15364   eval "ac_cv_func_$ac_func=no"
15365 fi
15366 rm -f conftest*
15367 fi
15368
15369 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15370   echo "$ac_t""yes" 1>&6
15371     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15372   cat >> confdefs.h <<EOF
15373 #define $ac_tr_func 1
15374 EOF
15375  
15376 else
15377   echo "$ac_t""no" 1>&6
15378 fi
15379 done
15380
15381                         fi
15382                         if test $ac_cv_func_sched_yield = no -a \
15383                                 $ac_cv_func_pthread_yield = no -a \
15384                                 "$ac_cv_func_thr_yield" = no ; then
15385                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15386                         fi
15387
15388                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15389 do
15390 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15391 echo "configure:15392: checking for $ac_func" >&5
15392 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15393   echo $ac_n "(cached) $ac_c" 1>&6
15394 else
15395   cat > conftest.$ac_ext <<EOF
15396 #line 15397 "configure"
15397 #include "confdefs.h"
15398 /* System header to define __stub macros and hopefully few prototypes,
15399     which can conflict with char $ac_func(); below.  */
15400 #include <assert.h>
15401 /* Override any gcc2 internal prototype to avoid an error.  */
15402 /* We use char because int might match the return type of a gcc2
15403     builtin and then its argument prototype would still apply.  */
15404 char $ac_func();
15405 char (*f)();
15406
15407 int main() {
15408
15409 /* The GNU C library defines this for functions which it implements
15410     to always fail with ENOSYS.  Some functions are actually named
15411     something starting with __ and the normal name is an alias.  */
15412 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15413 choke me
15414 #else
15415 f = $ac_func;
15416 #endif
15417
15418 ; return 0; }
15419 EOF
15420 if { (eval echo configure:15421: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15421   rm -rf conftest*
15422   eval "ac_cv_func_$ac_func=yes"
15423 else
15424   echo "configure: failed program was:" >&5
15425   cat conftest.$ac_ext >&5
15426   rm -rf conftest*
15427   eval "ac_cv_func_$ac_func=no"
15428 fi
15429 rm -f conftest*
15430 fi
15431
15432 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15433   echo "$ac_t""yes" 1>&6
15434     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15435   cat >> confdefs.h <<EOF
15436 #define $ac_tr_func 1
15437 EOF
15438  
15439 else
15440   echo "$ac_t""no" 1>&6
15441 fi
15442 done
15443
15444
15445                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15446 echo "configure:15447: checking for pthread_detach with <pthread.h>" >&5
15447 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15448   echo $ac_n "(cached) $ac_c" 1>&6
15449 else
15450   
15451                                                                 cat > conftest.$ac_ext <<EOF
15452 #line 15453 "configure"
15453 #include "confdefs.h"
15454
15455 #include <pthread.h>
15456 #ifndef NULL
15457 #define NULL (void*)0
15458 #endif
15459
15460 int main() {
15461 pthread_detach(NULL);
15462 ; return 0; }
15463 EOF
15464 if { (eval echo configure:15465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15465   rm -rf conftest*
15466   ol_cv_func_pthread_detach=yes
15467 else
15468   echo "configure: failed program was:" >&5
15469   cat conftest.$ac_ext >&5
15470   rm -rf conftest*
15471   ol_cv_func_pthread_detach=no
15472 fi
15473 rm -f conftest*
15474                         
15475 fi
15476
15477 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15478
15479                         if test $ol_cv_func_pthread_detach = no ; then
15480                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15481                         fi
15482
15483                         cat >> confdefs.h <<\EOF
15484 #define HAVE_PTHREAD_DETACH 1
15485 EOF
15486
15487
15488                                                 for ac_func in \
15489                                 pthread_setconcurrency \
15490                                 pthread_getconcurrency \
15491                                 thr_setconcurrency \
15492                                 thr_getconcurrency \
15493                         
15494 do
15495 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15496 echo "configure:15497: checking for $ac_func" >&5
15497 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15498   echo $ac_n "(cached) $ac_c" 1>&6
15499 else
15500   cat > conftest.$ac_ext <<EOF
15501 #line 15502 "configure"
15502 #include "confdefs.h"
15503 /* System header to define __stub macros and hopefully few prototypes,
15504     which can conflict with char $ac_func(); below.  */
15505 #include <assert.h>
15506 /* Override any gcc2 internal prototype to avoid an error.  */
15507 /* We use char because int might match the return type of a gcc2
15508     builtin and then its argument prototype would still apply.  */
15509 char $ac_func();
15510 char (*f)();
15511
15512 int main() {
15513
15514 /* The GNU C library defines this for functions which it implements
15515     to always fail with ENOSYS.  Some functions are actually named
15516     something starting with __ and the normal name is an alias.  */
15517 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15518 choke me
15519 #else
15520 f = $ac_func;
15521 #endif
15522
15523 ; return 0; }
15524 EOF
15525 if { (eval echo configure:15526: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15526   rm -rf conftest*
15527   eval "ac_cv_func_$ac_func=yes"
15528 else
15529   echo "configure: failed program was:" >&5
15530   cat conftest.$ac_ext >&5
15531   rm -rf conftest*
15532   eval "ac_cv_func_$ac_func=no"
15533 fi
15534 rm -f conftest*
15535 fi
15536
15537 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15538   echo "$ac_t""yes" 1>&6
15539     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15540   cat >> confdefs.h <<EOF
15541 #define $ac_tr_func 1
15542 EOF
15543  
15544 else
15545   echo "$ac_t""no" 1>&6
15546 fi
15547 done
15548
15549
15550                         
15551         for ac_func in pthread_kill_other_threads_np
15552 do
15553 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15554 echo "configure:15555: checking for $ac_func" >&5
15555 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15556   echo $ac_n "(cached) $ac_c" 1>&6
15557 else
15558   cat > conftest.$ac_ext <<EOF
15559 #line 15560 "configure"
15560 #include "confdefs.h"
15561 /* System header to define __stub macros and hopefully few prototypes,
15562     which can conflict with char $ac_func(); below.  */
15563 #include <assert.h>
15564 /* Override any gcc2 internal prototype to avoid an error.  */
15565 /* We use char because int might match the return type of a gcc2
15566     builtin and then its argument prototype would still apply.  */
15567 char $ac_func();
15568 char (*f)();
15569
15570 int main() {
15571
15572 /* The GNU C library defines this for functions which it implements
15573     to always fail with ENOSYS.  Some functions are actually named
15574     something starting with __ and the normal name is an alias.  */
15575 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15576 choke me
15577 #else
15578 f = $ac_func;
15579 #endif
15580
15581 ; return 0; }
15582 EOF
15583 if { (eval echo configure:15584: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15584   rm -rf conftest*
15585   eval "ac_cv_func_$ac_func=yes"
15586 else
15587   echo "configure: failed program was:" >&5
15588   cat conftest.$ac_ext >&5
15589   rm -rf conftest*
15590   eval "ac_cv_func_$ac_func=no"
15591 fi
15592 rm -f conftest*
15593 fi
15594
15595 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15596   echo "$ac_t""yes" 1>&6
15597     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15598   cat >> confdefs.h <<EOF
15599 #define $ac_tr_func 1
15600 EOF
15601  
15602 else
15603   echo "$ac_t""no" 1>&6
15604 fi
15605 done
15606
15607         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15608 echo "configure:15609: checking for LinuxThreads implementation" >&5
15609 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15610   echo $ac_n "(cached) $ac_c" 1>&6
15611 else
15612   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15613 fi
15614
15615 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15616
15617                         
15618         
15619         
15620         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15621 echo "configure:15622: checking for LinuxThreads consistency" >&5
15622 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15623   echo $ac_n "(cached) $ac_c" 1>&6
15624 else
15625   
15626                 if test $ol_cv_header_linux_threads = yes -a \
15627                         $ol_cv_sys_linux_threads = yes; then
15628                         ol_cv_linux_threads=yes
15629                 elif test $ol_cv_header_linux_threads = no -a \
15630                         $ol_cv_sys_linux_threads = no; then
15631                         ol_cv_linux_threads=no
15632                 else
15633                         ol_cv_linux_threads=error
15634                 fi
15635         
15636 fi
15637
15638 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15639
15640
15641                         if test $ol_cv_linux_threads = error; then
15642                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15643                         fi
15644
15645                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15646 echo "configure:15647: checking if pthread_create() works" >&5
15647 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15648   echo $ac_n "(cached) $ac_c" 1>&6
15649 else
15650   
15651                         if test "$cross_compiling" = yes; then
15652                                 ol_cv_pthread_create_works=yes
15653 else
15654   cat > conftest.$ac_ext <<EOF
15655 #line 15656 "configure"
15656 #include "confdefs.h"
15657 /* pthread test headers */
15658 #include <pthread.h>
15659 #ifndef NULL
15660 #define NULL (void*)0
15661 #endif
15662
15663 static void *task(p)
15664         void *p;
15665 {
15666         return (void *) (p == NULL);
15667 }
15668
15669
15670 int main(argc, argv)
15671         int argc;
15672         char **argv;
15673 {
15674
15675         /* pthread test function */
15676         pthread_t t;
15677         int status;
15678         int detach = 1;
15679
15680 #ifdef HAVE_PTHREADS_FINAL
15681         /* Final pthreads */
15682         pthread_attr_t attr;
15683
15684         status = pthread_attr_init(&attr);
15685         if( status ) return status;
15686
15687 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15688         if( !detach ) {
15689 #if defined( PTHREAD_CREATE_JOINABLE )
15690                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15691 #else
15692                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15693 #endif
15694
15695 #ifdef PTHREAD_CREATE_DETACHED
15696         } else {
15697                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15698 #endif
15699         }
15700         if( status ) return status;
15701 #endif
15702
15703         status = pthread_create( &t, &attr, task, NULL );
15704         if( status ) return status;
15705
15706 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15707         if( detach ) {
15708                 /* give thread a chance to complete */
15709                 /* it should remain joinable and hence detachable */
15710                 sleep( 1 );
15711
15712                 status = pthread_detach( t );
15713                 if( status ) return status;
15714         }
15715 #endif
15716
15717 #else
15718         /* Draft 4 pthreads */
15719         status = pthread_create( &t, pthread_attr_default, task, NULL );
15720         if( status ) return status;
15721
15722         if( detach ) {
15723                 /* give thread a chance to complete */
15724                 /* it should remain joinable and hence detachable */
15725                 sleep( 1 );
15726
15727                 status = pthread_detach( &t );
15728                 if( status ) return status;
15729         }
15730 #endif
15731
15732 #ifdef HAVE_LINUX_THREADS
15733         pthread_kill_other_threads_np();
15734 #endif
15735
15736         return 0;
15737
15738 }
15739
15740 EOF
15741 if { (eval echo configure:15742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15742 then
15743   ol_cv_pthread_create_works=yes
15744 else
15745   echo "configure: failed program was:" >&5
15746   cat conftest.$ac_ext >&5
15747   rm -fr conftest*
15748   ol_cv_pthread_create_works=no
15749 fi
15750 rm -fr conftest*
15751 fi
15752
15753 fi
15754
15755 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15756
15757                         if test $ol_cv_pthread_create_works = no ; then
15758                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15759                         fi
15760
15761                                                 if test $ol_with_yielding_select = auto ; then
15762                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15763 echo "configure:15764: checking if select yields when using pthreads" >&5
15764 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15765   echo $ac_n "(cached) $ac_c" 1>&6
15766 else
15767   
15768                                 if test "$cross_compiling" = yes; then
15769   ol_cv_pthread_select_yields=cross
15770 else
15771   cat > conftest.$ac_ext <<EOF
15772 #line 15773 "configure"
15773 #include "confdefs.h"
15774
15775 #include <sys/types.h>
15776 #include <sys/time.h>
15777 #include <unistd.h>
15778 #include <pthread.h>
15779 #ifndef NULL
15780 #define NULL (void*) 0
15781 #endif
15782
15783 static int fildes[2];
15784
15785 static void *task(p)
15786         void *p;
15787 {
15788         int i;
15789         struct timeval tv;
15790
15791         fd_set rfds;
15792
15793         tv.tv_sec=10;
15794         tv.tv_usec=0;
15795
15796         FD_ZERO(&rfds);
15797         FD_SET(fildes[0], &rfds);
15798
15799         /* we're not interested in any fds */
15800         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15801
15802         if(i < 0) {
15803                 perror("select");
15804                 exit(10);
15805         }
15806
15807         exit(0); /* if we exit here, the select blocked the whole process */
15808 }
15809
15810 int main(argc, argv)
15811         int argc;
15812         char **argv;
15813 {
15814         pthread_t t;
15815
15816         /* create a pipe to select */
15817         if(pipe(&fildes[0])) {
15818                 perror("select");
15819                 exit(1);
15820         }
15821
15822 #ifdef HAVE_PTHREAD_SETCONCURRENCY
15823         (void) pthread_setconcurrency(2);
15824 #else
15825 #ifdef HAVE_THR_SETCONCURRENCY
15826         /* Set Solaris LWP concurrency to 2 */
15827         thr_setconcurrency(2);
15828 #endif
15829 #endif
15830
15831 #if HAVE_PTHREADS_D4
15832         pthread_create(&t, pthread_attr_default, task, NULL);
15833 #else
15834         pthread_create(&t, NULL, task, NULL);
15835 #endif
15836
15837 #if HAVE_SCHED_YIELD
15838         sched_yield();  /* make sure task runs first */
15839 #else
15840 #ifdef HAVE_PTHREAD_YIELD
15841         pthread_yield();        /* make sure task runs first */
15842 #endif
15843 #endif
15844
15845         exit(2);
15846 }
15847 EOF
15848 if { (eval echo configure:15849: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15849 then
15850   ol_cv_pthread_select_yields=no
15851 else
15852   echo "configure: failed program was:" >&5
15853   cat conftest.$ac_ext >&5
15854   rm -fr conftest*
15855   ol_cv_pthread_select_yields=yes
15856 fi
15857 rm -fr conftest*
15858 fi
15859
15860 fi
15861
15862 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
15863
15864                                 if test $ol_cv_pthread_select_yields = cross ; then
15865                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
15866                                 fi
15867
15868                                 if test $ol_cv_pthread_select_yields = yes ; then
15869                                         ol_with_yielding_select=yes
15870                                 fi
15871                         fi
15872
15873                                                 CPPFLAGS="$save_CPPFLAGS"
15874                         LIBS="$save_LIBS"
15875                 else
15876                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
15877                 fi
15878         fi
15879
15880         if test $ol_with_threads = posix ; then
15881                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
15882         fi
15883 fi
15884
15885 if test $ol_with_threads = auto -o $ol_with_threads = yes \
15886         -o $ol_with_threads = mach ; then
15887
15888                 for ac_hdr in mach/cthreads.h cthreads.h
15889 do
15890 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
15891 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
15892 echo "configure:15893: checking for $ac_hdr" >&5
15893 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
15894   echo $ac_n "(cached) $ac_c" 1>&6
15895 else
15896   cat > conftest.$ac_ext <<EOF
15897 #line 15898 "configure"
15898 #include "confdefs.h"
15899 #include <$ac_hdr>
15900 EOF
15901 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
15902 { (eval echo configure:15903: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
15903 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
15904 if test -z "$ac_err"; then
15905   rm -rf conftest*
15906   eval "ac_cv_header_$ac_safe=yes"
15907 else
15908   echo "$ac_err" >&5
15909   echo "configure: failed program was:" >&5
15910   cat conftest.$ac_ext >&5
15911   rm -rf conftest*
15912   eval "ac_cv_header_$ac_safe=no"
15913 fi
15914 rm -f conftest*
15915 fi
15916 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
15917   echo "$ac_t""yes" 1>&6
15918     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
15919   cat >> confdefs.h <<EOF
15920 #define $ac_tr_hdr 1
15921 EOF
15922  
15923 else
15924   echo "$ac_t""no" 1>&6
15925 fi
15926 done
15927
15928         if test $ac_cv_header_mach_cthreads_h = yes ; then
15929                 ol_with_threads=found
15930
15931                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
15932 echo "configure:15933: checking for cthread_fork" >&5
15933 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
15934   echo $ac_n "(cached) $ac_c" 1>&6
15935 else
15936   cat > conftest.$ac_ext <<EOF
15937 #line 15938 "configure"
15938 #include "confdefs.h"
15939 /* System header to define __stub macros and hopefully few prototypes,
15940     which can conflict with char cthread_fork(); below.  */
15941 #include <assert.h>
15942 /* Override any gcc2 internal prototype to avoid an error.  */
15943 /* We use char because int might match the return type of a gcc2
15944     builtin and then its argument prototype would still apply.  */
15945 char cthread_fork();
15946 char (*f)();
15947
15948 int main() {
15949
15950 /* The GNU C library defines this for functions which it implements
15951     to always fail with ENOSYS.  Some functions are actually named
15952     something starting with __ and the normal name is an alias.  */
15953 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
15954 choke me
15955 #else
15956 f = cthread_fork;
15957 #endif
15958
15959 ; return 0; }
15960 EOF
15961 if { (eval echo configure:15962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15962   rm -rf conftest*
15963   eval "ac_cv_func_cthread_fork=yes"
15964 else
15965   echo "configure: failed program was:" >&5
15966   cat conftest.$ac_ext >&5
15967   rm -rf conftest*
15968   eval "ac_cv_func_cthread_fork=no"
15969 fi
15970 rm -f conftest*
15971 fi
15972
15973 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
15974   echo "$ac_t""yes" 1>&6
15975   ol_link_threads=yes
15976 else
15977   echo "$ac_t""no" 1>&6
15978 fi
15979
15980
15981                 if test $ol_link_threads = no ; then
15982                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
15983 echo "configure:15984: checking for cthread_fork with -all_load" >&5
15984 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
15985   echo $ac_n "(cached) $ac_c" 1>&6
15986 else
15987   
15988                                                                 save_LIBS="$LIBS"
15989                                 LIBS="-all_load $LIBS"
15990                                 cat > conftest.$ac_ext <<EOF
15991 #line 15992 "configure"
15992 #include "confdefs.h"
15993 #include <mach/cthreads.h>
15994 int main() {
15995
15996                                         cthread_fork((void *)0, (void *)0);
15997                                         
15998 ; return 0; }
15999 EOF
16000 if { (eval echo configure:16001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16001   rm -rf conftest*
16002   ol_cv_cthread_all_load=yes
16003 else
16004   echo "configure: failed program was:" >&5
16005   cat conftest.$ac_ext >&5
16006   rm -rf conftest*
16007   ol_cv_cthread_all_load=no
16008 fi
16009 rm -f conftest*
16010                                                                 LIBS="$save_LIBS"
16011                         
16012 fi
16013
16014 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
16015
16016                         if test $ol_cv_cthread_all_load = yes ; then
16017                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
16018                                 ol_link_threads=mach
16019                                 ol_with_threads=found
16020                         fi
16021                 fi
16022
16023         elif test $ac_cv_header_cthreads_h = yes ; then
16024                                 
16025                 ol_with_threads=found
16026  
16027                                 save_LIBS="$LIBS"
16028                 LIBS="$LIBS -lthreads"
16029                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16030 echo "configure:16031: checking for cthread_fork" >&5
16031 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16032   echo $ac_n "(cached) $ac_c" 1>&6
16033 else
16034   cat > conftest.$ac_ext <<EOF
16035 #line 16036 "configure"
16036 #include "confdefs.h"
16037 /* System header to define __stub macros and hopefully few prototypes,
16038     which can conflict with char cthread_fork(); below.  */
16039 #include <assert.h>
16040 /* Override any gcc2 internal prototype to avoid an error.  */
16041 /* We use char because int might match the return type of a gcc2
16042     builtin and then its argument prototype would still apply.  */
16043 char cthread_fork();
16044 char (*f)();
16045
16046 int main() {
16047
16048 /* The GNU C library defines this for functions which it implements
16049     to always fail with ENOSYS.  Some functions are actually named
16050     something starting with __ and the normal name is an alias.  */
16051 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16052 choke me
16053 #else
16054 f = cthread_fork;
16055 #endif
16056
16057 ; return 0; }
16058 EOF
16059 if { (eval echo configure:16060: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16060   rm -rf conftest*
16061   eval "ac_cv_func_cthread_fork=yes"
16062 else
16063   echo "configure: failed program was:" >&5
16064   cat conftest.$ac_ext >&5
16065   rm -rf conftest*
16066   eval "ac_cv_func_cthread_fork=no"
16067 fi
16068 rm -f conftest*
16069 fi
16070
16071 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16072   echo "$ac_t""yes" 1>&6
16073   ol_link_threads=yes
16074 else
16075   echo "$ac_t""no" 1>&6
16076 fi
16077
16078                 LIBS="$save_LIBS"
16079
16080                 if test $ol_link_threads = yes ; then
16081                         LTHREAD_LIBS="-lthreads"
16082                         ol_link_threads=mach
16083                         ol_with_threads=found
16084                 else
16085                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16086                 fi
16087
16088         elif test $ol_with_threads = mach ; then
16089                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16090         fi
16091
16092         if test $ol_link_threads = mach ; then
16093                 cat >> confdefs.h <<\EOF
16094 #define HAVE_MACH_CTHREADS 1
16095 EOF
16096
16097         elif test $ol_with_threads = found ; then
16098                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16099         fi
16100 fi
16101
16102 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16103         -o $ol_with_threads = pth ; then
16104
16105         for ac_hdr in pth.h
16106 do
16107 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16108 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16109 echo "configure:16110: checking for $ac_hdr" >&5
16110 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16111   echo $ac_n "(cached) $ac_c" 1>&6
16112 else
16113   cat > conftest.$ac_ext <<EOF
16114 #line 16115 "configure"
16115 #include "confdefs.h"
16116 #include <$ac_hdr>
16117 EOF
16118 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16119 { (eval echo configure:16120: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16120 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16121 if test -z "$ac_err"; then
16122   rm -rf conftest*
16123   eval "ac_cv_header_$ac_safe=yes"
16124 else
16125   echo "$ac_err" >&5
16126   echo "configure: failed program was:" >&5
16127   cat conftest.$ac_ext >&5
16128   rm -rf conftest*
16129   eval "ac_cv_header_$ac_safe=no"
16130 fi
16131 rm -f conftest*
16132 fi
16133 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16134   echo "$ac_t""yes" 1>&6
16135     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16136   cat >> confdefs.h <<EOF
16137 #define $ac_tr_hdr 1
16138 EOF
16139  
16140 else
16141   echo "$ac_t""no" 1>&6
16142 fi
16143 done
16144
16145
16146         if test $ac_cv_header_pth_h = yes ; then
16147                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16148 echo "configure:16149: checking for pth_version in -lpth" >&5
16149 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16150 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16151   echo $ac_n "(cached) $ac_c" 1>&6
16152 else
16153   ac_save_LIBS="$LIBS"
16154 LIBS="-lpth  $LIBS"
16155 cat > conftest.$ac_ext <<EOF
16156 #line 16157 "configure"
16157 #include "confdefs.h"
16158 /* Override any gcc2 internal prototype to avoid an error.  */
16159 /* We use char because int might match the return type of a gcc2
16160     builtin and then its argument prototype would still apply.  */
16161 char pth_version();
16162
16163 int main() {
16164 pth_version()
16165 ; return 0; }
16166 EOF
16167 if { (eval echo configure:16168: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16168   rm -rf conftest*
16169   eval "ac_cv_lib_$ac_lib_var=yes"
16170 else
16171   echo "configure: failed program was:" >&5
16172   cat conftest.$ac_ext >&5
16173   rm -rf conftest*
16174   eval "ac_cv_lib_$ac_lib_var=no"
16175 fi
16176 rm -f conftest*
16177 LIBS="$ac_save_LIBS"
16178
16179 fi
16180 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16181   echo "$ac_t""yes" 1>&6
16182   have_pth=yes
16183 else
16184   echo "$ac_t""no" 1>&6
16185 have_pth=no
16186 fi
16187
16188
16189                 if test $have_pth = yes ; then
16190                         cat >> confdefs.h <<\EOF
16191 #define HAVE_GNU_PTH 1
16192 EOF
16193
16194                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16195                         ol_link_threads=pth
16196                         ol_with_threads=found
16197
16198                         if test $ol_with_yielding_select = auto ; then
16199                                 ol_with_yielding_select=yes
16200                         fi
16201                 fi
16202         fi
16203 fi
16204
16205 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16206         -o $ol_with_threads = lwp ; then
16207
16208                 for ac_hdr in thread.h synch.h
16209 do
16210 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16211 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16212 echo "configure:16213: checking for $ac_hdr" >&5
16213 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16214   echo $ac_n "(cached) $ac_c" 1>&6
16215 else
16216   cat > conftest.$ac_ext <<EOF
16217 #line 16218 "configure"
16218 #include "confdefs.h"
16219 #include <$ac_hdr>
16220 EOF
16221 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16222 { (eval echo configure:16223: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16223 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16224 if test -z "$ac_err"; then
16225   rm -rf conftest*
16226   eval "ac_cv_header_$ac_safe=yes"
16227 else
16228   echo "$ac_err" >&5
16229   echo "configure: failed program was:" >&5
16230   cat conftest.$ac_ext >&5
16231   rm -rf conftest*
16232   eval "ac_cv_header_$ac_safe=no"
16233 fi
16234 rm -f conftest*
16235 fi
16236 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16237   echo "$ac_t""yes" 1>&6
16238     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16239   cat >> confdefs.h <<EOF
16240 #define $ac_tr_hdr 1
16241 EOF
16242  
16243 else
16244   echo "$ac_t""no" 1>&6
16245 fi
16246 done
16247
16248         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16249                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16250 echo "configure:16251: checking for thr_create in -lthread" >&5
16251 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16252 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16253   echo $ac_n "(cached) $ac_c" 1>&6
16254 else
16255   ac_save_LIBS="$LIBS"
16256 LIBS="-lthread  $LIBS"
16257 cat > conftest.$ac_ext <<EOF
16258 #line 16259 "configure"
16259 #include "confdefs.h"
16260 /* Override any gcc2 internal prototype to avoid an error.  */
16261 /* We use char because int might match the return type of a gcc2
16262     builtin and then its argument prototype would still apply.  */
16263 char thr_create();
16264
16265 int main() {
16266 thr_create()
16267 ; return 0; }
16268 EOF
16269 if { (eval echo configure:16270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16270   rm -rf conftest*
16271   eval "ac_cv_lib_$ac_lib_var=yes"
16272 else
16273   echo "configure: failed program was:" >&5
16274   cat conftest.$ac_ext >&5
16275   rm -rf conftest*
16276   eval "ac_cv_lib_$ac_lib_var=no"
16277 fi
16278 rm -f conftest*
16279 LIBS="$ac_save_LIBS"
16280
16281 fi
16282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16283   echo "$ac_t""yes" 1>&6
16284   have_thr=yes
16285 else
16286   echo "$ac_t""no" 1>&6
16287 have_thr=no
16288 fi
16289
16290
16291                 if test $have_thr = yes ; then
16292                         cat >> confdefs.h <<\EOF
16293 #define HAVE_THR 1
16294 EOF
16295
16296                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16297                         ol_link_threads=thr
16298
16299                         if test $ol_with_yielding_select = auto ; then
16300                                 ol_with_yielding_select=yes
16301                         fi
16302
16303                                                 for ac_func in \
16304                                 thr_setconcurrency \
16305                                 thr_getconcurrency \
16306                         
16307 do
16308 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16309 echo "configure:16310: checking for $ac_func" >&5
16310 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16311   echo $ac_n "(cached) $ac_c" 1>&6
16312 else
16313   cat > conftest.$ac_ext <<EOF
16314 #line 16315 "configure"
16315 #include "confdefs.h"
16316 /* System header to define __stub macros and hopefully few prototypes,
16317     which can conflict with char $ac_func(); below.  */
16318 #include <assert.h>
16319 /* Override any gcc2 internal prototype to avoid an error.  */
16320 /* We use char because int might match the return type of a gcc2
16321     builtin and then its argument prototype would still apply.  */
16322 char $ac_func();
16323 char (*f)();
16324
16325 int main() {
16326
16327 /* The GNU C library defines this for functions which it implements
16328     to always fail with ENOSYS.  Some functions are actually named
16329     something starting with __ and the normal name is an alias.  */
16330 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16331 choke me
16332 #else
16333 f = $ac_func;
16334 #endif
16335
16336 ; return 0; }
16337 EOF
16338 if { (eval echo configure:16339: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16339   rm -rf conftest*
16340   eval "ac_cv_func_$ac_func=yes"
16341 else
16342   echo "configure: failed program was:" >&5
16343   cat conftest.$ac_ext >&5
16344   rm -rf conftest*
16345   eval "ac_cv_func_$ac_func=no"
16346 fi
16347 rm -f conftest*
16348 fi
16349
16350 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16351   echo "$ac_t""yes" 1>&6
16352     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16353   cat >> confdefs.h <<EOF
16354 #define $ac_tr_func 1
16355 EOF
16356  
16357 else
16358   echo "$ac_t""no" 1>&6
16359 fi
16360 done
16361
16362                 fi
16363         fi
16364
16365                 for ac_hdr in lwp/lwp.h
16366 do
16367 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16368 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16369 echo "configure:16370: checking for $ac_hdr" >&5
16370 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16371   echo $ac_n "(cached) $ac_c" 1>&6
16372 else
16373   cat > conftest.$ac_ext <<EOF
16374 #line 16375 "configure"
16375 #include "confdefs.h"
16376 #include <$ac_hdr>
16377 EOF
16378 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16379 { (eval echo configure:16380: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16380 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16381 if test -z "$ac_err"; then
16382   rm -rf conftest*
16383   eval "ac_cv_header_$ac_safe=yes"
16384 else
16385   echo "$ac_err" >&5
16386   echo "configure: failed program was:" >&5
16387   cat conftest.$ac_ext >&5
16388   rm -rf conftest*
16389   eval "ac_cv_header_$ac_safe=no"
16390 fi
16391 rm -f conftest*
16392 fi
16393 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16394   echo "$ac_t""yes" 1>&6
16395     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16396   cat >> confdefs.h <<EOF
16397 #define $ac_tr_hdr 1
16398 EOF
16399  
16400 else
16401   echo "$ac_t""no" 1>&6
16402 fi
16403 done
16404
16405         if test $ac_cv_header_lwp_lwp_h = yes ; then
16406                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16407 echo "configure:16408: checking for lwp_create in -llwp" >&5
16408 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16409 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16410   echo $ac_n "(cached) $ac_c" 1>&6
16411 else
16412   ac_save_LIBS="$LIBS"
16413 LIBS="-llwp  $LIBS"
16414 cat > conftest.$ac_ext <<EOF
16415 #line 16416 "configure"
16416 #include "confdefs.h"
16417 /* Override any gcc2 internal prototype to avoid an error.  */
16418 /* We use char because int might match the return type of a gcc2
16419     builtin and then its argument prototype would still apply.  */
16420 char lwp_create();
16421
16422 int main() {
16423 lwp_create()
16424 ; return 0; }
16425 EOF
16426 if { (eval echo configure:16427: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16427   rm -rf conftest*
16428   eval "ac_cv_lib_$ac_lib_var=yes"
16429 else
16430   echo "configure: failed program was:" >&5
16431   cat conftest.$ac_ext >&5
16432   rm -rf conftest*
16433   eval "ac_cv_lib_$ac_lib_var=no"
16434 fi
16435 rm -f conftest*
16436 LIBS="$ac_save_LIBS"
16437
16438 fi
16439 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16440   echo "$ac_t""yes" 1>&6
16441   have_lwp=yes
16442 else
16443   echo "$ac_t""no" 1>&6
16444 have_lwp=no
16445 fi
16446
16447
16448                 if test $have_lwp = yes ; then
16449                         cat >> confdefs.h <<\EOF
16450 #define HAVE_LWP 1
16451 EOF
16452
16453                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16454                         ol_link_threads=lwp
16455
16456                         if test $ol_with_yielding_select = auto ; then
16457                                 ol_with_yielding_select=no
16458                         fi
16459                 fi
16460         fi
16461 fi
16462
16463 if test $ol_with_yielding_select = yes ; then
16464         cat >> confdefs.h <<\EOF
16465 #define HAVE_YIELDING_SELECT 1
16466 EOF
16467
16468 fi
16469
16470 if test $ol_with_threads = manual ; then
16471                 ol_link_threads=yes
16472
16473         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16474
16475         for ac_hdr in pthread.h sched.h
16476 do
16477 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16478 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16479 echo "configure:16480: checking for $ac_hdr" >&5
16480 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16481   echo $ac_n "(cached) $ac_c" 1>&6
16482 else
16483   cat > conftest.$ac_ext <<EOF
16484 #line 16485 "configure"
16485 #include "confdefs.h"
16486 #include <$ac_hdr>
16487 EOF
16488 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16489 { (eval echo configure:16490: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16490 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16491 if test -z "$ac_err"; then
16492   rm -rf conftest*
16493   eval "ac_cv_header_$ac_safe=yes"
16494 else
16495   echo "$ac_err" >&5
16496   echo "configure: failed program was:" >&5
16497   cat conftest.$ac_ext >&5
16498   rm -rf conftest*
16499   eval "ac_cv_header_$ac_safe=no"
16500 fi
16501 rm -f conftest*
16502 fi
16503 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16504   echo "$ac_t""yes" 1>&6
16505     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16506   cat >> confdefs.h <<EOF
16507 #define $ac_tr_hdr 1
16508 EOF
16509  
16510 else
16511   echo "$ac_t""no" 1>&6
16512 fi
16513 done
16514
16515         for ac_func in sched_yield pthread_yield
16516 do
16517 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16518 echo "configure:16519: checking for $ac_func" >&5
16519 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16520   echo $ac_n "(cached) $ac_c" 1>&6
16521 else
16522   cat > conftest.$ac_ext <<EOF
16523 #line 16524 "configure"
16524 #include "confdefs.h"
16525 /* System header to define __stub macros and hopefully few prototypes,
16526     which can conflict with char $ac_func(); below.  */
16527 #include <assert.h>
16528 /* Override any gcc2 internal prototype to avoid an error.  */
16529 /* We use char because int might match the return type of a gcc2
16530     builtin and then its argument prototype would still apply.  */
16531 char $ac_func();
16532 char (*f)();
16533
16534 int main() {
16535
16536 /* The GNU C library defines this for functions which it implements
16537     to always fail with ENOSYS.  Some functions are actually named
16538     something starting with __ and the normal name is an alias.  */
16539 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16540 choke me
16541 #else
16542 f = $ac_func;
16543 #endif
16544
16545 ; return 0; }
16546 EOF
16547 if { (eval echo configure:16548: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16548   rm -rf conftest*
16549   eval "ac_cv_func_$ac_func=yes"
16550 else
16551   echo "configure: failed program was:" >&5
16552   cat conftest.$ac_ext >&5
16553   rm -rf conftest*
16554   eval "ac_cv_func_$ac_func=no"
16555 fi
16556 rm -f conftest*
16557 fi
16558
16559 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16560   echo "$ac_t""yes" 1>&6
16561     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16562   cat >> confdefs.h <<EOF
16563 #define $ac_tr_func 1
16564 EOF
16565  
16566 else
16567   echo "$ac_t""no" 1>&6
16568 fi
16569 done
16570
16571         
16572         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16573 echo "configure:16574: checking for LinuxThreads pthread.h" >&5
16574 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16575   echo $ac_n "(cached) $ac_c" 1>&6
16576 else
16577   cat > conftest.$ac_ext <<EOF
16578 #line 16579 "configure"
16579 #include "confdefs.h"
16580 #include <pthread.h>
16581 EOF
16582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16583   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16584   rm -rf conftest*
16585   ol_cv_header_linux_threads=yes
16586 else
16587   rm -rf conftest*
16588   ol_cv_header_linux_threads=no
16589 fi
16590 rm -f conftest*
16591
16592                 
16593 fi
16594
16595 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16596         if test $ol_cv_header_linux_threads = yes; then
16597                 cat >> confdefs.h <<\EOF
16598 #define HAVE_LINUX_THREADS 1
16599 EOF
16600
16601         fi
16602
16603
16604         for ac_hdr in mach/cthreads.h
16605 do
16606 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16607 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16608 echo "configure:16609: checking for $ac_hdr" >&5
16609 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16610   echo $ac_n "(cached) $ac_c" 1>&6
16611 else
16612   cat > conftest.$ac_ext <<EOF
16613 #line 16614 "configure"
16614 #include "confdefs.h"
16615 #include <$ac_hdr>
16616 EOF
16617 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16618 { (eval echo configure:16619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16619 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16620 if test -z "$ac_err"; then
16621   rm -rf conftest*
16622   eval "ac_cv_header_$ac_safe=yes"
16623 else
16624   echo "$ac_err" >&5
16625   echo "configure: failed program was:" >&5
16626   cat conftest.$ac_ext >&5
16627   rm -rf conftest*
16628   eval "ac_cv_header_$ac_safe=no"
16629 fi
16630 rm -f conftest*
16631 fi
16632 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16633   echo "$ac_t""yes" 1>&6
16634     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16635   cat >> confdefs.h <<EOF
16636 #define $ac_tr_hdr 1
16637 EOF
16638  
16639 else
16640   echo "$ac_t""no" 1>&6
16641 fi
16642 done
16643
16644         for ac_hdr in lwp/lwp.h
16645 do
16646 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16647 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16648 echo "configure:16649: checking for $ac_hdr" >&5
16649 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16650   echo $ac_n "(cached) $ac_c" 1>&6
16651 else
16652   cat > conftest.$ac_ext <<EOF
16653 #line 16654 "configure"
16654 #include "confdefs.h"
16655 #include <$ac_hdr>
16656 EOF
16657 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16658 { (eval echo configure:16659: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16659 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16660 if test -z "$ac_err"; then
16661   rm -rf conftest*
16662   eval "ac_cv_header_$ac_safe=yes"
16663 else
16664   echo "$ac_err" >&5
16665   echo "configure: failed program was:" >&5
16666   cat conftest.$ac_ext >&5
16667   rm -rf conftest*
16668   eval "ac_cv_header_$ac_safe=no"
16669 fi
16670 rm -f conftest*
16671 fi
16672 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16673   echo "$ac_t""yes" 1>&6
16674     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16675   cat >> confdefs.h <<EOF
16676 #define $ac_tr_hdr 1
16677 EOF
16678  
16679 else
16680   echo "$ac_t""no" 1>&6
16681 fi
16682 done
16683
16684         for ac_hdr in thread.h synch.h
16685 do
16686 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16687 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16688 echo "configure:16689: checking for $ac_hdr" >&5
16689 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16690   echo $ac_n "(cached) $ac_c" 1>&6
16691 else
16692   cat > conftest.$ac_ext <<EOF
16693 #line 16694 "configure"
16694 #include "confdefs.h"
16695 #include <$ac_hdr>
16696 EOF
16697 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16698 { (eval echo configure:16699: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16699 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16700 if test -z "$ac_err"; then
16701   rm -rf conftest*
16702   eval "ac_cv_header_$ac_safe=yes"
16703 else
16704   echo "$ac_err" >&5
16705   echo "configure: failed program was:" >&5
16706   cat conftest.$ac_ext >&5
16707   rm -rf conftest*
16708   eval "ac_cv_header_$ac_safe=no"
16709 fi
16710 rm -f conftest*
16711 fi
16712 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16713   echo "$ac_t""yes" 1>&6
16714     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16715   cat >> confdefs.h <<EOF
16716 #define $ac_tr_hdr 1
16717 EOF
16718  
16719 else
16720   echo "$ac_t""no" 1>&6
16721 fi
16722 done
16723
16724 fi
16725
16726 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16727                         cat >> confdefs.h <<\EOF
16728 #define REENTRANT 1
16729 EOF
16730
16731         cat >> confdefs.h <<\EOF
16732 #define _REENTRANT 1
16733 EOF
16734
16735         cat >> confdefs.h <<\EOF
16736 #define THREAD_SAFE 1
16737 EOF
16738
16739         cat >> confdefs.h <<\EOF
16740 #define _THREAD_SAFE 1
16741 EOF
16742
16743         cat >> confdefs.h <<\EOF
16744 #define THREADSAFE 1
16745 EOF
16746
16747         cat >> confdefs.h <<\EOF
16748 #define _THREADSAFE 1
16749 EOF
16750
16751         cat >> confdefs.h <<\EOF
16752 #define _SGI_MP_SOURCE 1
16753 EOF
16754
16755
16756                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16757 echo "configure:16758: checking for thread specific errno" >&5
16758 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16759   echo $ac_n "(cached) $ac_c" 1>&6
16760 else
16761   
16762                 cat > conftest.$ac_ext <<EOF
16763 #line 16764 "configure"
16764 #include "confdefs.h"
16765 #include <errno.h>
16766 int main() {
16767 errno = 0;
16768 ; return 0; }
16769 EOF
16770 if { (eval echo configure:16771: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16771   rm -rf conftest*
16772   ol_cv_errno_thread_specific=yes
16773 else
16774   echo "configure: failed program was:" >&5
16775   cat conftest.$ac_ext >&5
16776   rm -rf conftest*
16777   ol_cv_errno_thread_specific=no
16778 fi
16779 rm -f conftest*
16780         
16781 fi
16782
16783 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16784
16785                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16786 echo "configure:16787: checking for thread specific h_errno" >&5
16787 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16788   echo $ac_n "(cached) $ac_c" 1>&6
16789 else
16790   
16791                 cat > conftest.$ac_ext <<EOF
16792 #line 16793 "configure"
16793 #include "confdefs.h"
16794 #include <netdb.h>
16795 int main() {
16796 h_errno = 0;
16797 ; return 0; }
16798 EOF
16799 if { (eval echo configure:16800: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16800   rm -rf conftest*
16801   ol_cv_h_errno_thread_specific=yes
16802 else
16803   echo "configure: failed program was:" >&5
16804   cat conftest.$ac_ext >&5
16805   rm -rf conftest*
16806   ol_cv_h_errno_thread_specific=no
16807 fi
16808 rm -f conftest*
16809         
16810 fi
16811
16812 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16813
16814         if test $ol_cv_errno_thread_specific != yes \
16815                 -o $ol_cv_h_errno_thread_specific != yes ; then
16816                 LIBS="$LTHREAD_LIBS $LIBS"
16817                 LTHREAD_LIBS=""
16818         fi
16819
16820 fi  
16821
16822 if test $ol_link_threads = no ; then
16823         if test $ol_with_threads = yes ; then
16824                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
16825         fi
16826
16827         if test $ol_with_threads = auto ; then
16828                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
16829                 ol_with_threads=no
16830         fi
16831
16832         cat >> confdefs.h <<\EOF
16833 #define NO_THREADS 1
16834 EOF
16835
16836         LTHREAD_LIBS=""
16837 fi
16838
16839 if test $ol_link_threads != no ; then
16840         cat >> confdefs.h <<\EOF
16841 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
16842 EOF
16843
16844 fi
16845
16846 ol_link_ldbm=no 
16847
16848 if test $ol_with_ldbm_api = auto \
16849         -o $ol_with_ldbm_api = berkeley \
16850         -o $ol_with_ldbm_api = bcompat ; then
16851
16852         if test $ol_with_ldbm_api = bcompat; then \
16853                 for ac_hdr in db_185.h db.h
16854 do
16855 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16856 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16857 echo "configure:16858: checking for $ac_hdr" >&5
16858 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16859   echo $ac_n "(cached) $ac_c" 1>&6
16860 else
16861   cat > conftest.$ac_ext <<EOF
16862 #line 16863 "configure"
16863 #include "confdefs.h"
16864 #include <$ac_hdr>
16865 EOF
16866 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16867 { (eval echo configure:16868: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16868 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16869 if test -z "$ac_err"; then
16870   rm -rf conftest*
16871   eval "ac_cv_header_$ac_safe=yes"
16872 else
16873   echo "$ac_err" >&5
16874   echo "configure: failed program was:" >&5
16875   cat conftest.$ac_ext >&5
16876   rm -rf conftest*
16877   eval "ac_cv_header_$ac_safe=no"
16878 fi
16879 rm -f conftest*
16880 fi
16881 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16882   echo "$ac_t""yes" 1>&6
16883     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16884   cat >> confdefs.h <<EOF
16885 #define $ac_tr_hdr 1
16886 EOF
16887  
16888 else
16889   echo "$ac_t""no" 1>&6
16890 fi
16891 done
16892
16893 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
16894         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
16895 echo "configure:16896: checking if Berkeley DB header compatibility" >&5
16896 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
16897   echo $ac_n "(cached) $ac_c" 1>&6
16898 else
16899   
16900                 cat > conftest.$ac_ext <<EOF
16901 #line 16902 "configure"
16902 #include "confdefs.h"
16903
16904 #if HAVE_DB_185_H
16905 #       include <db_185.h>
16906 #else
16907 #       include <db.h>
16908 #endif
16909
16910  /* this check could be improved */
16911 #ifndef DB_VERSION_MAJOR
16912 #       define DB_VERSION_MAJOR 1
16913 #endif
16914
16915 #if DB_VERSION_MAJOR == 1 
16916         __db_version_1
16917 #endif
16918
16919 EOF
16920 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16921   egrep "__db_version_1" >/dev/null 2>&1; then
16922   rm -rf conftest*
16923   ol_cv_header_db1=yes
16924 else
16925   rm -rf conftest*
16926   ol_cv_header_db1=no
16927 fi
16928 rm -f conftest*
16929
16930 fi
16931
16932 echo "$ac_t""$ol_cv_header_db1" 1>&6
16933
16934         if test $ol_cv_header_db1 = yes ; then
16935                 ol_cv_lib_db=no
16936 if test $ol_cv_lib_db = no ; then
16937         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
16938 echo "configure:16939: checking for Berkeley DB link (default)" >&5
16939 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
16940   echo $ac_n "(cached) $ac_c" 1>&6
16941 else
16942   
16943         ol_DB_LIB=
16944         ol_LIBS=$LIBS
16945         LIBS="$ol_DB_LIB $LIBS"
16946
16947         cat > conftest.$ac_ext <<EOF
16948 #line 16949 "configure"
16949 #include "confdefs.h"
16950
16951 #ifdef HAVE_DB_185_H
16952 # include <db_185.h>
16953 #else
16954 # include <db.h>
16955 #endif
16956
16957 #ifndef DB_VERSION_MAJOR
16958 # define DB_VERSION_MAJOR 1
16959 #endif
16960
16961 #ifndef NULL
16962 #define NULL ((void*)0)
16963 #endif
16964
16965 int main() {
16966
16967 #if DB_VERSION_MAJOR > 1
16968         {
16969                 char *version;
16970                 int major, minor, patch;
16971
16972                 version = db_version( &major, &minor, &patch );
16973
16974                 if( major != DB_VERSION_MAJOR ||
16975                         minor < DB_VERSION_MINOR )
16976                 {
16977                         printf("Berkeley DB version mismatch\n"
16978                                 "\texpected: %s\n\tgot: %s\n",
16979                                 DB_VERSION_STRING, version);
16980                         return 1;
16981                 }
16982         }
16983 #endif
16984
16985 #if DB_VERSION_MAJOR > 2
16986         db_env_create( NULL, 0 );
16987 #elif DB_VERSION_MAJOR > 1
16988         db_appexit( NULL );
16989 #else
16990         (void) dbopen( NULL, 0, 0, 0, NULL);
16991 #endif
16992
16993 ; return 0; }
16994 EOF
16995 if { (eval echo configure:16996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16996   rm -rf conftest*
16997   ol_cv_db_none=yes
16998 else
16999   echo "configure: failed program was:" >&5
17000   cat conftest.$ac_ext >&5
17001   rm -rf conftest*
17002   ol_cv_db_none=no
17003 fi
17004 rm -f conftest*
17005
17006         LIBS="$ol_LIBS"
17007
17008 fi
17009
17010 echo "$ac_t""$ol_cv_db_none" 1>&6
17011
17012         if test $ol_cv_db_none = yes ; then
17013                 ol_cv_lib_db=yes
17014         fi
17015 fi
17016
17017 if test $ol_cv_lib_db = no ; then
17018         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17019 echo "configure:17020: checking for Berkeley DB link (-ldb)" >&5
17020 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17021   echo $ac_n "(cached) $ac_c" 1>&6
17022 else
17023   
17024         ol_DB_LIB=-ldb
17025         ol_LIBS=$LIBS
17026         LIBS="$ol_DB_LIB $LIBS"
17027
17028         cat > conftest.$ac_ext <<EOF
17029 #line 17030 "configure"
17030 #include "confdefs.h"
17031
17032 #ifdef HAVE_DB_185_H
17033 # include <db_185.h>
17034 #else
17035 # include <db.h>
17036 #endif
17037
17038 #ifndef DB_VERSION_MAJOR
17039 # define DB_VERSION_MAJOR 1
17040 #endif
17041
17042 #ifndef NULL
17043 #define NULL ((void*)0)
17044 #endif
17045
17046 int main() {
17047
17048 #if DB_VERSION_MAJOR > 1
17049         {
17050                 char *version;
17051                 int major, minor, patch;
17052
17053                 version = db_version( &major, &minor, &patch );
17054
17055                 if( major != DB_VERSION_MAJOR ||
17056                         minor < DB_VERSION_MINOR )
17057                 {
17058                         printf("Berkeley DB version mismatch\n"
17059                                 "\texpected: %s\n\tgot: %s\n",
17060                                 DB_VERSION_STRING, version);
17061                         return 1;
17062                 }
17063         }
17064 #endif
17065
17066 #if DB_VERSION_MAJOR > 2
17067         db_env_create( NULL, 0 );
17068 #elif DB_VERSION_MAJOR > 1
17069         db_appexit( NULL );
17070 #else
17071         (void) dbopen( NULL, 0, 0, 0, NULL);
17072 #endif
17073
17074 ; return 0; }
17075 EOF
17076 if { (eval echo configure:17077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17077   rm -rf conftest*
17078   ol_cv_db_db=yes
17079 else
17080   echo "configure: failed program was:" >&5
17081   cat conftest.$ac_ext >&5
17082   rm -rf conftest*
17083   ol_cv_db_db=no
17084 fi
17085 rm -f conftest*
17086
17087         LIBS="$ol_LIBS"
17088
17089 fi
17090
17091 echo "$ac_t""$ol_cv_db_db" 1>&6
17092
17093         if test $ol_cv_db_db = yes ; then
17094                 ol_cv_lib_db=-ldb
17095         fi
17096 fi
17097
17098 if test $ol_cv_lib_db = no ; then
17099         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17100 echo "configure:17101: checking for Berkeley DB link (-ldb4)" >&5
17101 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17102   echo $ac_n "(cached) $ac_c" 1>&6
17103 else
17104   
17105         ol_DB_LIB=-ldb4
17106         ol_LIBS=$LIBS
17107         LIBS="$ol_DB_LIB $LIBS"
17108
17109         cat > conftest.$ac_ext <<EOF
17110 #line 17111 "configure"
17111 #include "confdefs.h"
17112
17113 #ifdef HAVE_DB_185_H
17114 # include <db_185.h>
17115 #else
17116 # include <db.h>
17117 #endif
17118
17119 #ifndef DB_VERSION_MAJOR
17120 # define DB_VERSION_MAJOR 1
17121 #endif
17122
17123 #ifndef NULL
17124 #define NULL ((void*)0)
17125 #endif
17126
17127 int main() {
17128
17129 #if DB_VERSION_MAJOR > 1
17130         {
17131                 char *version;
17132                 int major, minor, patch;
17133
17134                 version = db_version( &major, &minor, &patch );
17135
17136                 if( major != DB_VERSION_MAJOR ||
17137                         minor < DB_VERSION_MINOR )
17138                 {
17139                         printf("Berkeley DB version mismatch\n"
17140                                 "\texpected: %s\n\tgot: %s\n",
17141                                 DB_VERSION_STRING, version);
17142                         return 1;
17143                 }
17144         }
17145 #endif
17146
17147 #if DB_VERSION_MAJOR > 2
17148         db_env_create( NULL, 0 );
17149 #elif DB_VERSION_MAJOR > 1
17150         db_appexit( NULL );
17151 #else
17152         (void) dbopen( NULL, 0, 0, 0, NULL);
17153 #endif
17154
17155 ; return 0; }
17156 EOF
17157 if { (eval echo configure:17158: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17158   rm -rf conftest*
17159   ol_cv_db_db4=yes
17160 else
17161   echo "configure: failed program was:" >&5
17162   cat conftest.$ac_ext >&5
17163   rm -rf conftest*
17164   ol_cv_db_db4=no
17165 fi
17166 rm -f conftest*
17167
17168         LIBS="$ol_LIBS"
17169
17170 fi
17171
17172 echo "$ac_t""$ol_cv_db_db4" 1>&6
17173
17174         if test $ol_cv_db_db4 = yes ; then
17175                 ol_cv_lib_db=-ldb4
17176         fi
17177 fi
17178
17179 if test $ol_cv_lib_db = no ; then
17180         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17181 echo "configure:17182: checking for Berkeley DB link (-ldb3)" >&5
17182 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17183   echo $ac_n "(cached) $ac_c" 1>&6
17184 else
17185   
17186         ol_DB_LIB=-ldb3
17187         ol_LIBS=$LIBS
17188         LIBS="$ol_DB_LIB $LIBS"
17189
17190         cat > conftest.$ac_ext <<EOF
17191 #line 17192 "configure"
17192 #include "confdefs.h"
17193
17194 #ifdef HAVE_DB_185_H
17195 # include <db_185.h>
17196 #else
17197 # include <db.h>
17198 #endif
17199
17200 #ifndef DB_VERSION_MAJOR
17201 # define DB_VERSION_MAJOR 1
17202 #endif
17203
17204 #ifndef NULL
17205 #define NULL ((void*)0)
17206 #endif
17207
17208 int main() {
17209
17210 #if DB_VERSION_MAJOR > 1
17211         {
17212                 char *version;
17213                 int major, minor, patch;
17214
17215                 version = db_version( &major, &minor, &patch );
17216
17217                 if( major != DB_VERSION_MAJOR ||
17218                         minor < DB_VERSION_MINOR )
17219                 {
17220                         printf("Berkeley DB version mismatch\n"
17221                                 "\texpected: %s\n\tgot: %s\n",
17222                                 DB_VERSION_STRING, version);
17223                         return 1;
17224                 }
17225         }
17226 #endif
17227
17228 #if DB_VERSION_MAJOR > 2
17229         db_env_create( NULL, 0 );
17230 #elif DB_VERSION_MAJOR > 1
17231         db_appexit( NULL );
17232 #else
17233         (void) dbopen( NULL, 0, 0, 0, NULL);
17234 #endif
17235
17236 ; return 0; }
17237 EOF
17238 if { (eval echo configure:17239: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17239   rm -rf conftest*
17240   ol_cv_db_db3=yes
17241 else
17242   echo "configure: failed program was:" >&5
17243   cat conftest.$ac_ext >&5
17244   rm -rf conftest*
17245   ol_cv_db_db3=no
17246 fi
17247 rm -f conftest*
17248
17249         LIBS="$ol_LIBS"
17250
17251 fi
17252
17253 echo "$ac_t""$ol_cv_db_db3" 1>&6
17254
17255         if test $ol_cv_db_db3 = yes ; then
17256                 ol_cv_lib_db=-ldb3
17257         fi
17258 fi
17259
17260 if test $ol_cv_lib_db = no ; then
17261         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17262 echo "configure:17263: checking for Berkeley DB link (-ldb2)" >&5
17263 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17264   echo $ac_n "(cached) $ac_c" 1>&6
17265 else
17266   
17267         ol_DB_LIB=-ldb2
17268         ol_LIBS=$LIBS
17269         LIBS="$ol_DB_LIB $LIBS"
17270
17271         cat > conftest.$ac_ext <<EOF
17272 #line 17273 "configure"
17273 #include "confdefs.h"
17274
17275 #ifdef HAVE_DB_185_H
17276 # include <db_185.h>
17277 #else
17278 # include <db.h>
17279 #endif
17280
17281 #ifndef DB_VERSION_MAJOR
17282 # define DB_VERSION_MAJOR 1
17283 #endif
17284
17285 #ifndef NULL
17286 #define NULL ((void*)0)
17287 #endif
17288
17289 int main() {
17290
17291 #if DB_VERSION_MAJOR > 1
17292         {
17293                 char *version;
17294                 int major, minor, patch;
17295
17296                 version = db_version( &major, &minor, &patch );
17297
17298                 if( major != DB_VERSION_MAJOR ||
17299                         minor < DB_VERSION_MINOR )
17300                 {
17301                         printf("Berkeley DB version mismatch\n"
17302                                 "\texpected: %s\n\tgot: %s\n",
17303                                 DB_VERSION_STRING, version);
17304                         return 1;
17305                 }
17306         }
17307 #endif
17308
17309 #if DB_VERSION_MAJOR > 2
17310         db_env_create( NULL, 0 );
17311 #elif DB_VERSION_MAJOR > 1
17312         db_appexit( NULL );
17313 #else
17314         (void) dbopen( NULL, 0, 0, 0, NULL);
17315 #endif
17316
17317 ; return 0; }
17318 EOF
17319 if { (eval echo configure:17320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17320   rm -rf conftest*
17321   ol_cv_db_db2=yes
17322 else
17323   echo "configure: failed program was:" >&5
17324   cat conftest.$ac_ext >&5
17325   rm -rf conftest*
17326   ol_cv_db_db2=no
17327 fi
17328 rm -f conftest*
17329
17330         LIBS="$ol_LIBS"
17331
17332 fi
17333
17334 echo "$ac_t""$ol_cv_db_db2" 1>&6
17335
17336         if test $ol_cv_db_db2 = yes ; then
17337                 ol_cv_lib_db=-ldb2
17338         fi
17339 fi
17340
17341 if test $ol_cv_lib_db = no ; then
17342         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17343 echo "configure:17344: checking for Berkeley DB link (-ldb1)" >&5
17344 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17345   echo $ac_n "(cached) $ac_c" 1>&6
17346 else
17347   
17348         ol_DB_LIB=-ldb1
17349         ol_LIBS=$LIBS
17350         LIBS="$ol_DB_LIB $LIBS"
17351
17352         cat > conftest.$ac_ext <<EOF
17353 #line 17354 "configure"
17354 #include "confdefs.h"
17355
17356 #ifdef HAVE_DB_185_H
17357 # include <db_185.h>
17358 #else
17359 # include <db.h>
17360 #endif
17361
17362 #ifndef DB_VERSION_MAJOR
17363 # define DB_VERSION_MAJOR 1
17364 #endif
17365
17366 #ifndef NULL
17367 #define NULL ((void*)0)
17368 #endif
17369
17370 int main() {
17371
17372 #if DB_VERSION_MAJOR > 1
17373         {
17374                 char *version;
17375                 int major, minor, patch;
17376
17377                 version = db_version( &major, &minor, &patch );
17378
17379                 if( major != DB_VERSION_MAJOR ||
17380                         minor < DB_VERSION_MINOR )
17381                 {
17382                         printf("Berkeley DB version mismatch\n"
17383                                 "\texpected: %s\n\tgot: %s\n",
17384                                 DB_VERSION_STRING, version);
17385                         return 1;
17386                 }
17387         }
17388 #endif
17389
17390 #if DB_VERSION_MAJOR > 2
17391         db_env_create( NULL, 0 );
17392 #elif DB_VERSION_MAJOR > 1
17393         db_appexit( NULL );
17394 #else
17395         (void) dbopen( NULL, 0, 0, 0, NULL);
17396 #endif
17397
17398 ; return 0; }
17399 EOF
17400 if { (eval echo configure:17401: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17401   rm -rf conftest*
17402   ol_cv_db_db1=yes
17403 else
17404   echo "configure: failed program was:" >&5
17405   cat conftest.$ac_ext >&5
17406   rm -rf conftest*
17407   ol_cv_db_db1=no
17408 fi
17409 rm -f conftest*
17410
17411         LIBS="$ol_LIBS"
17412
17413 fi
17414
17415 echo "$ac_t""$ol_cv_db_db1" 1>&6
17416
17417         if test $ol_cv_db_db1 = yes ; then
17418                 ol_cv_lib_db=-ldb1
17419         fi
17420 fi
17421
17422
17423                 if test "$ol_cv_lib_db" != no ; then
17424                         ol_cv_berkeley_db=yes
17425                 fi
17426         fi
17427 fi
17428
17429         else
17430                 ol_cv_berkeley_db=no
17431 for ac_hdr in db.h
17432 do
17433 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17434 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17435 echo "configure:17436: checking for $ac_hdr" >&5
17436 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17437   echo $ac_n "(cached) $ac_c" 1>&6
17438 else
17439   cat > conftest.$ac_ext <<EOF
17440 #line 17441 "configure"
17441 #include "confdefs.h"
17442 #include <$ac_hdr>
17443 EOF
17444 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17445 { (eval echo configure:17446: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17446 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17447 if test -z "$ac_err"; then
17448   rm -rf conftest*
17449   eval "ac_cv_header_$ac_safe=yes"
17450 else
17451   echo "$ac_err" >&5
17452   echo "configure: failed program was:" >&5
17453   cat conftest.$ac_ext >&5
17454   rm -rf conftest*
17455   eval "ac_cv_header_$ac_safe=no"
17456 fi
17457 rm -f conftest*
17458 fi
17459 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17460   echo "$ac_t""yes" 1>&6
17461     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17462   cat >> confdefs.h <<EOF
17463 #define $ac_tr_hdr 1
17464 EOF
17465  
17466 else
17467   echo "$ac_t""no" 1>&6
17468 fi
17469 done
17470
17471 if test $ac_cv_header_db_h = yes; then
17472         ol_cv_lib_db=no
17473 if test $ol_cv_lib_db = no ; then
17474         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17475 echo "configure:17476: checking for Berkeley DB link (default)" >&5
17476 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17477   echo $ac_n "(cached) $ac_c" 1>&6
17478 else
17479   
17480         ol_DB_LIB=
17481         ol_LIBS=$LIBS
17482         LIBS="$ol_DB_LIB $LIBS"
17483
17484         cat > conftest.$ac_ext <<EOF
17485 #line 17486 "configure"
17486 #include "confdefs.h"
17487
17488 #ifdef HAVE_DB_185_H
17489 # include <db_185.h>
17490 #else
17491 # include <db.h>
17492 #endif
17493
17494 #ifndef DB_VERSION_MAJOR
17495 # define DB_VERSION_MAJOR 1
17496 #endif
17497
17498 #ifndef NULL
17499 #define NULL ((void*)0)
17500 #endif
17501
17502 int main() {
17503
17504 #if DB_VERSION_MAJOR > 1
17505         {
17506                 char *version;
17507                 int major, minor, patch;
17508
17509                 version = db_version( &major, &minor, &patch );
17510
17511                 if( major != DB_VERSION_MAJOR ||
17512                         minor < DB_VERSION_MINOR )
17513                 {
17514                         printf("Berkeley DB version mismatch\n"
17515                                 "\texpected: %s\n\tgot: %s\n",
17516                                 DB_VERSION_STRING, version);
17517                         return 1;
17518                 }
17519         }
17520 #endif
17521
17522 #if DB_VERSION_MAJOR > 2
17523         db_env_create( NULL, 0 );
17524 #elif DB_VERSION_MAJOR > 1
17525         db_appexit( NULL );
17526 #else
17527         (void) dbopen( NULL, 0, 0, 0, NULL);
17528 #endif
17529
17530 ; return 0; }
17531 EOF
17532 if { (eval echo configure:17533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17533   rm -rf conftest*
17534   ol_cv_db_none=yes
17535 else
17536   echo "configure: failed program was:" >&5
17537   cat conftest.$ac_ext >&5
17538   rm -rf conftest*
17539   ol_cv_db_none=no
17540 fi
17541 rm -f conftest*
17542
17543         LIBS="$ol_LIBS"
17544
17545 fi
17546
17547 echo "$ac_t""$ol_cv_db_none" 1>&6
17548
17549         if test $ol_cv_db_none = yes ; then
17550                 ol_cv_lib_db=yes
17551         fi
17552 fi
17553
17554 if test $ol_cv_lib_db = no ; then
17555         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17556 echo "configure:17557: checking for Berkeley DB link (-ldb)" >&5
17557 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17558   echo $ac_n "(cached) $ac_c" 1>&6
17559 else
17560   
17561         ol_DB_LIB=-ldb
17562         ol_LIBS=$LIBS
17563         LIBS="$ol_DB_LIB $LIBS"
17564
17565         cat > conftest.$ac_ext <<EOF
17566 #line 17567 "configure"
17567 #include "confdefs.h"
17568
17569 #ifdef HAVE_DB_185_H
17570 # include <db_185.h>
17571 #else
17572 # include <db.h>
17573 #endif
17574
17575 #ifndef DB_VERSION_MAJOR
17576 # define DB_VERSION_MAJOR 1
17577 #endif
17578
17579 #ifndef NULL
17580 #define NULL ((void*)0)
17581 #endif
17582
17583 int main() {
17584
17585 #if DB_VERSION_MAJOR > 1
17586         {
17587                 char *version;
17588                 int major, minor, patch;
17589
17590                 version = db_version( &major, &minor, &patch );
17591
17592                 if( major != DB_VERSION_MAJOR ||
17593                         minor < DB_VERSION_MINOR )
17594                 {
17595                         printf("Berkeley DB version mismatch\n"
17596                                 "\texpected: %s\n\tgot: %s\n",
17597                                 DB_VERSION_STRING, version);
17598                         return 1;
17599                 }
17600         }
17601 #endif
17602
17603 #if DB_VERSION_MAJOR > 2
17604         db_env_create( NULL, 0 );
17605 #elif DB_VERSION_MAJOR > 1
17606         db_appexit( NULL );
17607 #else
17608         (void) dbopen( NULL, 0, 0, 0, NULL);
17609 #endif
17610
17611 ; return 0; }
17612 EOF
17613 if { (eval echo configure:17614: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17614   rm -rf conftest*
17615   ol_cv_db_db=yes
17616 else
17617   echo "configure: failed program was:" >&5
17618   cat conftest.$ac_ext >&5
17619   rm -rf conftest*
17620   ol_cv_db_db=no
17621 fi
17622 rm -f conftest*
17623
17624         LIBS="$ol_LIBS"
17625
17626 fi
17627
17628 echo "$ac_t""$ol_cv_db_db" 1>&6
17629
17630         if test $ol_cv_db_db = yes ; then
17631                 ol_cv_lib_db=-ldb
17632         fi
17633 fi
17634
17635 if test $ol_cv_lib_db = no ; then
17636         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17637 echo "configure:17638: checking for Berkeley DB link (-ldb4)" >&5
17638 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17639   echo $ac_n "(cached) $ac_c" 1>&6
17640 else
17641   
17642         ol_DB_LIB=-ldb4
17643         ol_LIBS=$LIBS
17644         LIBS="$ol_DB_LIB $LIBS"
17645
17646         cat > conftest.$ac_ext <<EOF
17647 #line 17648 "configure"
17648 #include "confdefs.h"
17649
17650 #ifdef HAVE_DB_185_H
17651 # include <db_185.h>
17652 #else
17653 # include <db.h>
17654 #endif
17655
17656 #ifndef DB_VERSION_MAJOR
17657 # define DB_VERSION_MAJOR 1
17658 #endif
17659
17660 #ifndef NULL
17661 #define NULL ((void*)0)
17662 #endif
17663
17664 int main() {
17665
17666 #if DB_VERSION_MAJOR > 1
17667         {
17668                 char *version;
17669                 int major, minor, patch;
17670
17671                 version = db_version( &major, &minor, &patch );
17672
17673                 if( major != DB_VERSION_MAJOR ||
17674                         minor < DB_VERSION_MINOR )
17675                 {
17676                         printf("Berkeley DB version mismatch\n"
17677                                 "\texpected: %s\n\tgot: %s\n",
17678                                 DB_VERSION_STRING, version);
17679                         return 1;
17680                 }
17681         }
17682 #endif
17683
17684 #if DB_VERSION_MAJOR > 2
17685         db_env_create( NULL, 0 );
17686 #elif DB_VERSION_MAJOR > 1
17687         db_appexit( NULL );
17688 #else
17689         (void) dbopen( NULL, 0, 0, 0, NULL);
17690 #endif
17691
17692 ; return 0; }
17693 EOF
17694 if { (eval echo configure:17695: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17695   rm -rf conftest*
17696   ol_cv_db_db4=yes
17697 else
17698   echo "configure: failed program was:" >&5
17699   cat conftest.$ac_ext >&5
17700   rm -rf conftest*
17701   ol_cv_db_db4=no
17702 fi
17703 rm -f conftest*
17704
17705         LIBS="$ol_LIBS"
17706
17707 fi
17708
17709 echo "$ac_t""$ol_cv_db_db4" 1>&6
17710
17711         if test $ol_cv_db_db4 = yes ; then
17712                 ol_cv_lib_db=-ldb4
17713         fi
17714 fi
17715
17716 if test $ol_cv_lib_db = no ; then
17717         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17718 echo "configure:17719: checking for Berkeley DB link (-ldb3)" >&5
17719 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17720   echo $ac_n "(cached) $ac_c" 1>&6
17721 else
17722   
17723         ol_DB_LIB=-ldb3
17724         ol_LIBS=$LIBS
17725         LIBS="$ol_DB_LIB $LIBS"
17726
17727         cat > conftest.$ac_ext <<EOF
17728 #line 17729 "configure"
17729 #include "confdefs.h"
17730
17731 #ifdef HAVE_DB_185_H
17732 # include <db_185.h>
17733 #else
17734 # include <db.h>
17735 #endif
17736
17737 #ifndef DB_VERSION_MAJOR
17738 # define DB_VERSION_MAJOR 1
17739 #endif
17740
17741 #ifndef NULL
17742 #define NULL ((void*)0)
17743 #endif
17744
17745 int main() {
17746
17747 #if DB_VERSION_MAJOR > 1
17748         {
17749                 char *version;
17750                 int major, minor, patch;
17751
17752                 version = db_version( &major, &minor, &patch );
17753
17754                 if( major != DB_VERSION_MAJOR ||
17755                         minor < DB_VERSION_MINOR )
17756                 {
17757                         printf("Berkeley DB version mismatch\n"
17758                                 "\texpected: %s\n\tgot: %s\n",
17759                                 DB_VERSION_STRING, version);
17760                         return 1;
17761                 }
17762         }
17763 #endif
17764
17765 #if DB_VERSION_MAJOR > 2
17766         db_env_create( NULL, 0 );
17767 #elif DB_VERSION_MAJOR > 1
17768         db_appexit( NULL );
17769 #else
17770         (void) dbopen( NULL, 0, 0, 0, NULL);
17771 #endif
17772
17773 ; return 0; }
17774 EOF
17775 if { (eval echo configure:17776: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17776   rm -rf conftest*
17777   ol_cv_db_db3=yes
17778 else
17779   echo "configure: failed program was:" >&5
17780   cat conftest.$ac_ext >&5
17781   rm -rf conftest*
17782   ol_cv_db_db3=no
17783 fi
17784 rm -f conftest*
17785
17786         LIBS="$ol_LIBS"
17787
17788 fi
17789
17790 echo "$ac_t""$ol_cv_db_db3" 1>&6
17791
17792         if test $ol_cv_db_db3 = yes ; then
17793                 ol_cv_lib_db=-ldb3
17794         fi
17795 fi
17796
17797 if test $ol_cv_lib_db = no ; then
17798         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17799 echo "configure:17800: checking for Berkeley DB link (-ldb2)" >&5
17800 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17801   echo $ac_n "(cached) $ac_c" 1>&6
17802 else
17803   
17804         ol_DB_LIB=-ldb2
17805         ol_LIBS=$LIBS
17806         LIBS="$ol_DB_LIB $LIBS"
17807
17808         cat > conftest.$ac_ext <<EOF
17809 #line 17810 "configure"
17810 #include "confdefs.h"
17811
17812 #ifdef HAVE_DB_185_H
17813 # include <db_185.h>
17814 #else
17815 # include <db.h>
17816 #endif
17817
17818 #ifndef DB_VERSION_MAJOR
17819 # define DB_VERSION_MAJOR 1
17820 #endif
17821
17822 #ifndef NULL
17823 #define NULL ((void*)0)
17824 #endif
17825
17826 int main() {
17827
17828 #if DB_VERSION_MAJOR > 1
17829         {
17830                 char *version;
17831                 int major, minor, patch;
17832
17833                 version = db_version( &major, &minor, &patch );
17834
17835                 if( major != DB_VERSION_MAJOR ||
17836                         minor < DB_VERSION_MINOR )
17837                 {
17838                         printf("Berkeley DB version mismatch\n"
17839                                 "\texpected: %s\n\tgot: %s\n",
17840                                 DB_VERSION_STRING, version);
17841                         return 1;
17842                 }
17843         }
17844 #endif
17845
17846 #if DB_VERSION_MAJOR > 2
17847         db_env_create( NULL, 0 );
17848 #elif DB_VERSION_MAJOR > 1
17849         db_appexit( NULL );
17850 #else
17851         (void) dbopen( NULL, 0, 0, 0, NULL);
17852 #endif
17853
17854 ; return 0; }
17855 EOF
17856 if { (eval echo configure:17857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17857   rm -rf conftest*
17858   ol_cv_db_db2=yes
17859 else
17860   echo "configure: failed program was:" >&5
17861   cat conftest.$ac_ext >&5
17862   rm -rf conftest*
17863   ol_cv_db_db2=no
17864 fi
17865 rm -f conftest*
17866
17867         LIBS="$ol_LIBS"
17868
17869 fi
17870
17871 echo "$ac_t""$ol_cv_db_db2" 1>&6
17872
17873         if test $ol_cv_db_db2 = yes ; then
17874                 ol_cv_lib_db=-ldb2
17875         fi
17876 fi
17877
17878 if test $ol_cv_lib_db = no ; then
17879         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17880 echo "configure:17881: checking for Berkeley DB link (-ldb1)" >&5
17881 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17882   echo $ac_n "(cached) $ac_c" 1>&6
17883 else
17884   
17885         ol_DB_LIB=-ldb1
17886         ol_LIBS=$LIBS
17887         LIBS="$ol_DB_LIB $LIBS"
17888
17889         cat > conftest.$ac_ext <<EOF
17890 #line 17891 "configure"
17891 #include "confdefs.h"
17892
17893 #ifdef HAVE_DB_185_H
17894 # include <db_185.h>
17895 #else
17896 # include <db.h>
17897 #endif
17898
17899 #ifndef DB_VERSION_MAJOR
17900 # define DB_VERSION_MAJOR 1
17901 #endif
17902
17903 #ifndef NULL
17904 #define NULL ((void*)0)
17905 #endif
17906
17907 int main() {
17908
17909 #if DB_VERSION_MAJOR > 1
17910         {
17911                 char *version;
17912                 int major, minor, patch;
17913
17914                 version = db_version( &major, &minor, &patch );
17915
17916                 if( major != DB_VERSION_MAJOR ||
17917                         minor < DB_VERSION_MINOR )
17918                 {
17919                         printf("Berkeley DB version mismatch\n"
17920                                 "\texpected: %s\n\tgot: %s\n",
17921                                 DB_VERSION_STRING, version);
17922                         return 1;
17923                 }
17924         }
17925 #endif
17926
17927 #if DB_VERSION_MAJOR > 2
17928         db_env_create( NULL, 0 );
17929 #elif DB_VERSION_MAJOR > 1
17930         db_appexit( NULL );
17931 #else
17932         (void) dbopen( NULL, 0, 0, 0, NULL);
17933 #endif
17934
17935 ; return 0; }
17936 EOF
17937 if { (eval echo configure:17938: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17938   rm -rf conftest*
17939   ol_cv_db_db1=yes
17940 else
17941   echo "configure: failed program was:" >&5
17942   cat conftest.$ac_ext >&5
17943   rm -rf conftest*
17944   ol_cv_db_db1=no
17945 fi
17946 rm -f conftest*
17947
17948         LIBS="$ol_LIBS"
17949
17950 fi
17951
17952 echo "$ac_t""$ol_cv_db_db1" 1>&6
17953
17954         if test $ol_cv_db_db1 = yes ; then
17955                 ol_cv_lib_db=-ldb1
17956         fi
17957 fi
17958
17959
17960         if test "$ol_cv_lib_db" != no ; then
17961                 ol_cv_berkeley_db=yes
17962                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
17963 echo "configure:17964: checking for Berkeley DB thread support" >&5
17964 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
17965   echo $ac_n "(cached) $ac_c" 1>&6
17966 else
17967   
17968         ol_LIBS="$LIBS"
17969         if test $ol_cv_lib_db != yes ; then
17970                 LIBS="$ol_cv_lib_db"
17971         fi
17972
17973         if test "$cross_compiling" = yes; then
17974   ol_cv_berkeley_db_thread=cross
17975 else
17976   cat > conftest.$ac_ext <<EOF
17977 #line 17978 "configure"
17978 #include "confdefs.h"
17979
17980 #ifdef HAVE_DB_185_H
17981         choke me;
17982 #else
17983 #include <db.h>
17984 #endif
17985 #ifndef NULL
17986 #define NULL ((void *)0)
17987 #endif
17988 main()
17989 {
17990         int rc;
17991         u_int32_t flags = DB_CREATE |
17992 #ifdef DB_PRIVATE
17993                 DB_PRIVATE |
17994 #endif
17995                 DB_THREAD;
17996
17997 #if DB_VERSION_MAJOR > 2
17998         DB_ENV *env = NULL;
17999
18000         rc = db_env_create( &env, 0 );
18001
18002         flags |= DB_INIT_MPOOL;
18003 #ifdef DB_MPOOL_PRIVATE
18004         flags |= DB_MPOOL_PRIVATE;
18005 #endif
18006
18007         if( rc ) {
18008                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18009                 return rc;
18010         }
18011
18012 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18013         rc = env->open( env, NULL, flags, 0 );
18014 #else
18015         rc = env->open( env, NULL, NULL, flags, 0 );
18016 #endif
18017
18018         if ( rc == 0 ) {
18019                 rc = env->close( env, 0 );
18020         }
18021
18022         if( rc ) {
18023                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18024                 return rc;
18025         }
18026
18027 #else
18028         DB_ENV env;
18029         memset( &env, '\0', sizeof(env) );
18030
18031         rc = db_appinit( NULL, NULL, &env, flags );
18032
18033         if( rc == 0 ) {
18034                 db_appexit( &env );
18035         }
18036
18037         unlink("__db_mpool.share");
18038         unlink("__db_lock.share");
18039 #endif
18040
18041         return rc;
18042 }
18043 EOF
18044 if { (eval echo configure:18045: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18045 then
18046   ol_cv_berkeley_db_thread=yes
18047 else
18048   echo "configure: failed program was:" >&5
18049   cat conftest.$ac_ext >&5
18050   rm -fr conftest*
18051   ol_cv_berkeley_db_thread=no
18052 fi
18053 rm -fr conftest*
18054 fi
18055
18056
18057         LIBS="$ol_LIBS"
18058
18059         if test $ol_cv_berkeley_db_thread != no ; then
18060                 cat >> confdefs.h <<\EOF
18061 #define HAVE_BERKELEY_DB_THREAD 1
18062 EOF
18063
18064         fi
18065
18066 fi
18067
18068 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18069         fi
18070 fi
18071
18072         fi
18073
18074         if test $ol_cv_berkeley_db != no ; then
18075                 cat >> confdefs.h <<\EOF
18076 #define HAVE_BERKELEY_DB 1
18077 EOF
18078
18079
18080                 ol_link_ldbm=berkeley
18081                 ol_with_ldbm_api=berkeley
18082
18083                 if test $ol_with_ldbm_type = hash ; then
18084                         cat >> confdefs.h <<\EOF
18085 #define LDBM_USE_DBHASH 1
18086 EOF
18087
18088                 else
18089                         cat >> confdefs.h <<\EOF
18090 #define LDBM_USE_DBBTREE 1
18091 EOF
18092
18093                 fi
18094
18095                                                 if test $ol_cv_lib_db != yes ; then
18096                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18097                 fi
18098         fi
18099 fi
18100
18101 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18102         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18103 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18104         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18105 echo "configure:18106: checking Berkeley DB version for BDB backend" >&5
18106 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18107   echo $ac_n "(cached) $ac_c" 1>&6
18108 else
18109   
18110         cat > conftest.$ac_ext <<EOF
18111 #line 18112 "configure"
18112 #include "confdefs.h"
18113
18114 #include <db.h>
18115
18116  /* this check could be improved */
18117 #ifndef DB_VERSION_MAJOR
18118 #       define DB_VERSION_MAJOR 1
18119 #endif
18120
18121 /* require 4.0 or later */
18122 #if DB_VERSION_MAJOR >= 4 
18123         __db_version_compat
18124 #endif
18125         
18126 EOF
18127 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18128   egrep "__db_version_compat" >/dev/null 2>&1; then
18129   rm -rf conftest*
18130   ol_cv_bdb_compat=yes
18131 else
18132   rm -rf conftest*
18133   ol_cv_bdb_compat=no
18134 fi
18135 rm -f conftest*
18136
18137 fi
18138
18139 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18140
18141
18142         if test $ol_cv_bdb_compat = yes ; then
18143                 ol_enable_bdb=yes
18144         elif test $ol_enable_bdb = yes ; then
18145                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18146         else
18147                 ol_enable_bdb=no
18148         fi
18149 fi
18150
18151 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18152         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18153         ol_with_ldbm_api=none
18154 fi
18155
18156 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18157         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18158 echo "configure:18159: checking for MDBM library" >&5
18159 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18160   echo $ac_n "(cached) $ac_c" 1>&6
18161 else
18162         ol_LIBS="$LIBS"
18163         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18164 echo "configure:18165: checking for mdbm_set_chain" >&5
18165 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18166   echo $ac_n "(cached) $ac_c" 1>&6
18167 else
18168   cat > conftest.$ac_ext <<EOF
18169 #line 18170 "configure"
18170 #include "confdefs.h"
18171 /* System header to define __stub macros and hopefully few prototypes,
18172     which can conflict with char mdbm_set_chain(); below.  */
18173 #include <assert.h>
18174 /* Override any gcc2 internal prototype to avoid an error.  */
18175 /* We use char because int might match the return type of a gcc2
18176     builtin and then its argument prototype would still apply.  */
18177 char mdbm_set_chain();
18178 char (*f)();
18179
18180 int main() {
18181
18182 /* The GNU C library defines this for functions which it implements
18183     to always fail with ENOSYS.  Some functions are actually named
18184     something starting with __ and the normal name is an alias.  */
18185 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18186 choke me
18187 #else
18188 f = mdbm_set_chain;
18189 #endif
18190
18191 ; return 0; }
18192 EOF
18193 if { (eval echo configure:18194: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18194   rm -rf conftest*
18195   eval "ac_cv_func_mdbm_set_chain=yes"
18196 else
18197   echo "configure: failed program was:" >&5
18198   cat conftest.$ac_ext >&5
18199   rm -rf conftest*
18200   eval "ac_cv_func_mdbm_set_chain=no"
18201 fi
18202 rm -f conftest*
18203 fi
18204
18205 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18206   echo "$ac_t""yes" 1>&6
18207   ol_cv_lib_mdbm=yes
18208 else
18209   echo "$ac_t""no" 1>&6
18210
18211                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18212 echo "configure:18213: checking for mdbm_set_chain in -lmdbm" >&5
18213 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18214 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18215   echo $ac_n "(cached) $ac_c" 1>&6
18216 else
18217   ac_save_LIBS="$LIBS"
18218 LIBS="-lmdbm  $LIBS"
18219 cat > conftest.$ac_ext <<EOF
18220 #line 18221 "configure"
18221 #include "confdefs.h"
18222 /* Override any gcc2 internal prototype to avoid an error.  */
18223 /* We use char because int might match the return type of a gcc2
18224     builtin and then its argument prototype would still apply.  */
18225 char mdbm_set_chain();
18226
18227 int main() {
18228 mdbm_set_chain()
18229 ; return 0; }
18230 EOF
18231 if { (eval echo configure:18232: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18232   rm -rf conftest*
18233   eval "ac_cv_lib_$ac_lib_var=yes"
18234 else
18235   echo "configure: failed program was:" >&5
18236   cat conftest.$ac_ext >&5
18237   rm -rf conftest*
18238   eval "ac_cv_lib_$ac_lib_var=no"
18239 fi
18240 rm -f conftest*
18241 LIBS="$ac_save_LIBS"
18242
18243 fi
18244 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18245   echo "$ac_t""yes" 1>&6
18246   ol_cv_lib_mdbm=-lmdbm
18247 else
18248   echo "$ac_t""no" 1>&6
18249 ol_cv_lib_mdbm=no
18250 fi
18251
18252         
18253 fi
18254
18255         LIBS="$ol_LIBS"
18256
18257 fi
18258
18259 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18260
18261
18262  for ac_hdr in mdbm.h
18263 do
18264 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18265 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18266 echo "configure:18267: checking for $ac_hdr" >&5
18267 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18268   echo $ac_n "(cached) $ac_c" 1>&6
18269 else
18270   cat > conftest.$ac_ext <<EOF
18271 #line 18272 "configure"
18272 #include "confdefs.h"
18273 #include <$ac_hdr>
18274 EOF
18275 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18276 { (eval echo configure:18277: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18277 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18278 if test -z "$ac_err"; then
18279   rm -rf conftest*
18280   eval "ac_cv_header_$ac_safe=yes"
18281 else
18282   echo "$ac_err" >&5
18283   echo "configure: failed program was:" >&5
18284   cat conftest.$ac_ext >&5
18285   rm -rf conftest*
18286   eval "ac_cv_header_$ac_safe=no"
18287 fi
18288 rm -f conftest*
18289 fi
18290 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18291   echo "$ac_t""yes" 1>&6
18292     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18293   cat >> confdefs.h <<EOF
18294 #define $ac_tr_hdr 1
18295 EOF
18296  
18297 else
18298   echo "$ac_t""no" 1>&6
18299 fi
18300 done
18301
18302  echo $ac_n "checking for db""... $ac_c" 1>&6
18303 echo "configure:18304: checking for db" >&5
18304 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18305   echo $ac_n "(cached) $ac_c" 1>&6
18306 else
18307   
18308         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18309                 ol_cv_mdbm=no
18310         else
18311                 ol_cv_mdbm=yes
18312         fi
18313
18314 fi
18315
18316 echo "$ac_t""$ol_cv_mdbm" 1>&6
18317  if test $ol_cv_mdbm = yes ; then
18318         cat >> confdefs.h <<\EOF
18319 #define HAVE_MDBM 1
18320 EOF
18321
18322  fi
18323
18324
18325         if test $ol_cv_mdbm = yes ; then
18326                 ol_link_ldbm=mdbm
18327                 ol_with_ldbm_api=mdbm
18328                 if test $ol_cv_lib_mdbm != yes ; then
18329                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18330                 fi
18331         fi
18332 fi
18333
18334 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18335         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18336 echo "configure:18337: checking for GDBM library" >&5
18337 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18338   echo $ac_n "(cached) $ac_c" 1>&6
18339 else
18340         ol_LIBS="$LIBS"
18341         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18342 echo "configure:18343: checking for gdbm_open" >&5
18343 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18344   echo $ac_n "(cached) $ac_c" 1>&6
18345 else
18346   cat > conftest.$ac_ext <<EOF
18347 #line 18348 "configure"
18348 #include "confdefs.h"
18349 /* System header to define __stub macros and hopefully few prototypes,
18350     which can conflict with char gdbm_open(); below.  */
18351 #include <assert.h>
18352 /* Override any gcc2 internal prototype to avoid an error.  */
18353 /* We use char because int might match the return type of a gcc2
18354     builtin and then its argument prototype would still apply.  */
18355 char gdbm_open();
18356 char (*f)();
18357
18358 int main() {
18359
18360 /* The GNU C library defines this for functions which it implements
18361     to always fail with ENOSYS.  Some functions are actually named
18362     something starting with __ and the normal name is an alias.  */
18363 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18364 choke me
18365 #else
18366 f = gdbm_open;
18367 #endif
18368
18369 ; return 0; }
18370 EOF
18371 if { (eval echo configure:18372: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18372   rm -rf conftest*
18373   eval "ac_cv_func_gdbm_open=yes"
18374 else
18375   echo "configure: failed program was:" >&5
18376   cat conftest.$ac_ext >&5
18377   rm -rf conftest*
18378   eval "ac_cv_func_gdbm_open=no"
18379 fi
18380 rm -f conftest*
18381 fi
18382
18383 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18384   echo "$ac_t""yes" 1>&6
18385   ol_cv_lib_gdbm=yes
18386 else
18387   echo "$ac_t""no" 1>&6
18388
18389                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18390 echo "configure:18391: checking for gdbm_open in -lgdbm" >&5
18391 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18392 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18393   echo $ac_n "(cached) $ac_c" 1>&6
18394 else
18395   ac_save_LIBS="$LIBS"
18396 LIBS="-lgdbm  $LIBS"
18397 cat > conftest.$ac_ext <<EOF
18398 #line 18399 "configure"
18399 #include "confdefs.h"
18400 /* Override any gcc2 internal prototype to avoid an error.  */
18401 /* We use char because int might match the return type of a gcc2
18402     builtin and then its argument prototype would still apply.  */
18403 char gdbm_open();
18404
18405 int main() {
18406 gdbm_open()
18407 ; return 0; }
18408 EOF
18409 if { (eval echo configure:18410: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18410   rm -rf conftest*
18411   eval "ac_cv_lib_$ac_lib_var=yes"
18412 else
18413   echo "configure: failed program was:" >&5
18414   cat conftest.$ac_ext >&5
18415   rm -rf conftest*
18416   eval "ac_cv_lib_$ac_lib_var=no"
18417 fi
18418 rm -f conftest*
18419 LIBS="$ac_save_LIBS"
18420
18421 fi
18422 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18423   echo "$ac_t""yes" 1>&6
18424   ol_cv_lib_gdbm=-lgdbm
18425 else
18426   echo "$ac_t""no" 1>&6
18427 ol_cv_lib_gdbm=no
18428 fi
18429
18430         
18431 fi
18432
18433         LIBS="$ol_LIBS"
18434
18435 fi
18436
18437 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18438
18439
18440  for ac_hdr in gdbm.h
18441 do
18442 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18443 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18444 echo "configure:18445: checking for $ac_hdr" >&5
18445 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18446   echo $ac_n "(cached) $ac_c" 1>&6
18447 else
18448   cat > conftest.$ac_ext <<EOF
18449 #line 18450 "configure"
18450 #include "confdefs.h"
18451 #include <$ac_hdr>
18452 EOF
18453 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18454 { (eval echo configure:18455: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18455 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18456 if test -z "$ac_err"; then
18457   rm -rf conftest*
18458   eval "ac_cv_header_$ac_safe=yes"
18459 else
18460   echo "$ac_err" >&5
18461   echo "configure: failed program was:" >&5
18462   cat conftest.$ac_ext >&5
18463   rm -rf conftest*
18464   eval "ac_cv_header_$ac_safe=no"
18465 fi
18466 rm -f conftest*
18467 fi
18468 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18469   echo "$ac_t""yes" 1>&6
18470     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18471   cat >> confdefs.h <<EOF
18472 #define $ac_tr_hdr 1
18473 EOF
18474  
18475 else
18476   echo "$ac_t""no" 1>&6
18477 fi
18478 done
18479
18480  echo $ac_n "checking for db""... $ac_c" 1>&6
18481 echo "configure:18482: checking for db" >&5
18482 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18483   echo $ac_n "(cached) $ac_c" 1>&6
18484 else
18485   
18486         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18487                 ol_cv_gdbm=no
18488         else
18489                 ol_cv_gdbm=yes
18490         fi
18491
18492 fi
18493
18494 echo "$ac_t""$ol_cv_gdbm" 1>&6
18495  if test $ol_cv_gdbm = yes ; then
18496         cat >> confdefs.h <<\EOF
18497 #define HAVE_GDBM 1
18498 EOF
18499
18500  fi
18501
18502
18503         if test $ol_cv_gdbm = yes ; then
18504                 ol_link_ldbm=gdbm
18505                 ol_with_ldbm_api=gdbm
18506
18507                 if test $ol_cv_lib_gdbm != yes ; then
18508                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18509                 fi
18510         fi
18511 fi
18512
18513 if test $ol_with_ldbm_api = ndbm ; then
18514         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18515 echo "configure:18516: checking for NDBM library" >&5
18516 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18517   echo $ac_n "(cached) $ac_c" 1>&6
18518 else
18519         ol_LIBS="$LIBS"
18520         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18521 echo "configure:18522: checking for dbm_open" >&5
18522 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18523   echo $ac_n "(cached) $ac_c" 1>&6
18524 else
18525   cat > conftest.$ac_ext <<EOF
18526 #line 18527 "configure"
18527 #include "confdefs.h"
18528 /* System header to define __stub macros and hopefully few prototypes,
18529     which can conflict with char dbm_open(); below.  */
18530 #include <assert.h>
18531 /* Override any gcc2 internal prototype to avoid an error.  */
18532 /* We use char because int might match the return type of a gcc2
18533     builtin and then its argument prototype would still apply.  */
18534 char dbm_open();
18535 char (*f)();
18536
18537 int main() {
18538
18539 /* The GNU C library defines this for functions which it implements
18540     to always fail with ENOSYS.  Some functions are actually named
18541     something starting with __ and the normal name is an alias.  */
18542 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18543 choke me
18544 #else
18545 f = dbm_open;
18546 #endif
18547
18548 ; return 0; }
18549 EOF
18550 if { (eval echo configure:18551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18551   rm -rf conftest*
18552   eval "ac_cv_func_dbm_open=yes"
18553 else
18554   echo "configure: failed program was:" >&5
18555   cat conftest.$ac_ext >&5
18556   rm -rf conftest*
18557   eval "ac_cv_func_dbm_open=no"
18558 fi
18559 rm -f conftest*
18560 fi
18561
18562 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18563   echo "$ac_t""yes" 1>&6
18564   ol_cv_lib_ndbm=yes
18565 else
18566   echo "$ac_t""no" 1>&6
18567
18568                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18569 echo "configure:18570: checking for dbm_open in -lndbm" >&5
18570 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18571 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18572   echo $ac_n "(cached) $ac_c" 1>&6
18573 else
18574   ac_save_LIBS="$LIBS"
18575 LIBS="-lndbm  $LIBS"
18576 cat > conftest.$ac_ext <<EOF
18577 #line 18578 "configure"
18578 #include "confdefs.h"
18579 /* Override any gcc2 internal prototype to avoid an error.  */
18580 /* We use char because int might match the return type of a gcc2
18581     builtin and then its argument prototype would still apply.  */
18582 char dbm_open();
18583
18584 int main() {
18585 dbm_open()
18586 ; return 0; }
18587 EOF
18588 if { (eval echo configure:18589: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18589   rm -rf conftest*
18590   eval "ac_cv_lib_$ac_lib_var=yes"
18591 else
18592   echo "configure: failed program was:" >&5
18593   cat conftest.$ac_ext >&5
18594   rm -rf conftest*
18595   eval "ac_cv_lib_$ac_lib_var=no"
18596 fi
18597 rm -f conftest*
18598 LIBS="$ac_save_LIBS"
18599
18600 fi
18601 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18602   echo "$ac_t""yes" 1>&6
18603   ol_cv_lib_ndbm=-lndbm
18604 else
18605   echo "$ac_t""no" 1>&6
18606
18607                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18608 echo "configure:18609: checking for dbm_open in -ldbm" >&5
18609 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18610 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18611   echo $ac_n "(cached) $ac_c" 1>&6
18612 else
18613   ac_save_LIBS="$LIBS"
18614 LIBS="-ldbm  $LIBS"
18615 cat > conftest.$ac_ext <<EOF
18616 #line 18617 "configure"
18617 #include "confdefs.h"
18618 /* Override any gcc2 internal prototype to avoid an error.  */
18619 /* We use char because int might match the return type of a gcc2
18620     builtin and then its argument prototype would still apply.  */
18621 char dbm_open();
18622
18623 int main() {
18624 dbm_open()
18625 ; return 0; }
18626 EOF
18627 if { (eval echo configure:18628: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18628   rm -rf conftest*
18629   eval "ac_cv_lib_$ac_lib_var=yes"
18630 else
18631   echo "configure: failed program was:" >&5
18632   cat conftest.$ac_ext >&5
18633   rm -rf conftest*
18634   eval "ac_cv_lib_$ac_lib_var=no"
18635 fi
18636 rm -f conftest*
18637 LIBS="$ac_save_LIBS"
18638
18639 fi
18640 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18641   echo "$ac_t""yes" 1>&6
18642   ol_cv_lib_ndbm=-ldbm
18643 else
18644   echo "$ac_t""no" 1>&6
18645 ol_cv_lib_ndbm=no
18646 fi
18647                 
18648 fi
18649
18650         
18651 fi
18652
18653         LIBS="$ol_LIBS"
18654
18655 fi
18656
18657 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
18658
18659
18660  for ac_hdr in ndbm.h
18661 do
18662 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18663 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18664 echo "configure:18665: checking for $ac_hdr" >&5
18665 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18666   echo $ac_n "(cached) $ac_c" 1>&6
18667 else
18668   cat > conftest.$ac_ext <<EOF
18669 #line 18670 "configure"
18670 #include "confdefs.h"
18671 #include <$ac_hdr>
18672 EOF
18673 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18674 { (eval echo configure:18675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18675 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18676 if test -z "$ac_err"; then
18677   rm -rf conftest*
18678   eval "ac_cv_header_$ac_safe=yes"
18679 else
18680   echo "$ac_err" >&5
18681   echo "configure: failed program was:" >&5
18682   cat conftest.$ac_ext >&5
18683   rm -rf conftest*
18684   eval "ac_cv_header_$ac_safe=no"
18685 fi
18686 rm -f conftest*
18687 fi
18688 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18689   echo "$ac_t""yes" 1>&6
18690     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18691   cat >> confdefs.h <<EOF
18692 #define $ac_tr_hdr 1
18693 EOF
18694  
18695 else
18696   echo "$ac_t""no" 1>&6
18697 fi
18698 done
18699
18700  echo $ac_n "checking for db""... $ac_c" 1>&6
18701 echo "configure:18702: checking for db" >&5
18702 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
18703   echo $ac_n "(cached) $ac_c" 1>&6
18704 else
18705   
18706         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
18707                 ol_cv_ndbm=no
18708         else
18709                 ol_cv_ndbm=yes
18710         fi
18711
18712 fi
18713
18714 echo "$ac_t""$ol_cv_ndbm" 1>&6
18715  if test $ol_cv_ndbm = yes ; then
18716         cat >> confdefs.h <<\EOF
18717 #define HAVE_NDBM 1
18718 EOF
18719
18720  fi
18721
18722
18723         if test $ol_cv_ndbm = yes ; then
18724                 ol_link_ldbm=ndbm
18725                 ol_with_ldbm_api=ndbm
18726
18727                 if test $ol_cv_lib_ndbm != yes ; then
18728                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
18729                 fi
18730         fi
18731 fi
18732
18733 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
18734         echo "configure: warning: could not find suitable LDBM backend" 1>&2
18735         if test $ol_enable_ldbm = yes ; then
18736                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
18737         fi
18738
18739         echo "configure: warning: disabling LDBM" 1>&2
18740         ol_enable_ldbm=no
18741 fi
18742
18743 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
18744         BUILD_LIBS_DYNAMIC=shared
18745         cat >> confdefs.h <<\EOF
18746 #define LDAP_LIBS_DYNAMIC 1
18747 EOF
18748
18749 else
18750         BUILD_LIBS_DYNAMIC=static
18751 fi
18752
18753 if test $ol_enable_wrappers != no ; then
18754         for ac_hdr in tcpd.h
18755 do
18756 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18757 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18758 echo "configure:18759: checking for $ac_hdr" >&5
18759 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18760   echo $ac_n "(cached) $ac_c" 1>&6
18761 else
18762   cat > conftest.$ac_ext <<EOF
18763 #line 18764 "configure"
18764 #include "confdefs.h"
18765 #include <$ac_hdr>
18766 EOF
18767 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18768 { (eval echo configure:18769: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18769 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18770 if test -z "$ac_err"; then
18771   rm -rf conftest*
18772   eval "ac_cv_header_$ac_safe=yes"
18773 else
18774   echo "$ac_err" >&5
18775   echo "configure: failed program was:" >&5
18776   cat conftest.$ac_ext >&5
18777   rm -rf conftest*
18778   eval "ac_cv_header_$ac_safe=no"
18779 fi
18780 rm -f conftest*
18781 fi
18782 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18783   echo "$ac_t""yes" 1>&6
18784     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18785   cat >> confdefs.h <<EOF
18786 #define $ac_tr_hdr 1
18787 EOF
18788  
18789                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
18790 echo "configure:18791: checking for TCP wrappers library" >&5
18791                 save_LIBS="$LIBS"
18792                 LIBS="$LIBS -lwrap"
18793                 cat > conftest.$ac_ext <<EOF
18794 #line 18795 "configure"
18795 #include "confdefs.h"
18796
18797 #include <tcpd.h>
18798 int allow_severity = 0;
18799 int deny_severity  = 0;
18800
18801 struct request_info *req;
18802                 
18803 int main() {
18804
18805 hosts_access(req)
18806                 
18807 ; return 0; }
18808 EOF
18809 if { (eval echo configure:18810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18810   rm -rf conftest*
18811   echo "$ac_t""-lwrap" 1>&6
18812                 have_wrappers=yes
18813                 LIBS="$save_LIBS"
18814 else
18815   echo "configure: failed program was:" >&5
18816   cat conftest.$ac_ext >&5
18817   rm -rf conftest*
18818   
18819                                 LIBS="$LIBS -lnsl"
18820                 cat > conftest.$ac_ext <<EOF
18821 #line 18822 "configure"
18822 #include "confdefs.h"
18823
18824 #include <tcpd.h>
18825 int allow_severity = 0;
18826 int deny_severity  = 0;
18827
18828 struct request_info *req;
18829                 
18830 int main() {
18831
18832 hosts_access(req)
18833                 
18834 ; return 0; }
18835 EOF
18836 if { (eval echo configure:18837: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18837   rm -rf conftest*
18838   echo "$ac_t""-lwrap -lnsl" 1>&6
18839                 have_wrappers=yes
18840                 LIBS="$save_LIBS -lnsl"
18841 else
18842   echo "configure: failed program was:" >&5
18843   cat conftest.$ac_ext >&5
18844   rm -rf conftest*
18845   
18846                 echo "$ac_t""no" 1>&6
18847                 have_wrappers=no
18848                 LIBS=$save_LIBS
18849 fi
18850 rm -f conftest*
18851 fi
18852 rm -f conftest*
18853 else
18854   echo "$ac_t""no" 1>&6
18855 have_wrappers=no
18856 fi
18857 done
18858
18859
18860         if test $have_wrappers = yes ; then
18861                 cat >> confdefs.h <<\EOF
18862 #define HAVE_TCPD 1
18863 EOF
18864
18865                 WRAP_LIBS="-lwrap"
18866         elif test $ol_enable_wrappers = yes ; then
18867                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
18868         else
18869                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
18870                 WRAP_LIBS=""
18871         fi
18872 fi
18873
18874 if test $ol_enable_syslog != no ; then
18875         echo $ac_n "checking for openlog""... $ac_c" 1>&6
18876 echo "configure:18877: checking for openlog" >&5
18877 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
18878   echo $ac_n "(cached) $ac_c" 1>&6
18879 else
18880   cat > conftest.$ac_ext <<EOF
18881 #line 18882 "configure"
18882 #include "confdefs.h"
18883 /* System header to define __stub macros and hopefully few prototypes,
18884     which can conflict with char openlog(); below.  */
18885 #include <assert.h>
18886 /* Override any gcc2 internal prototype to avoid an error.  */
18887 /* We use char because int might match the return type of a gcc2
18888     builtin and then its argument prototype would still apply.  */
18889 char openlog();
18890 char (*f)();
18891
18892 int main() {
18893
18894 /* The GNU C library defines this for functions which it implements
18895     to always fail with ENOSYS.  Some functions are actually named
18896     something starting with __ and the normal name is an alias.  */
18897 #if defined (__stub_openlog) || defined (__stub___openlog)
18898 choke me
18899 #else
18900 f = openlog;
18901 #endif
18902
18903 ; return 0; }
18904 EOF
18905 if { (eval echo configure:18906: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18906   rm -rf conftest*
18907   eval "ac_cv_func_openlog=yes"
18908 else
18909   echo "configure: failed program was:" >&5
18910   cat conftest.$ac_ext >&5
18911   rm -rf conftest*
18912   eval "ac_cv_func_openlog=no"
18913 fi
18914 rm -f conftest*
18915 fi
18916
18917 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
18918   echo "$ac_t""yes" 1>&6
18919   :
18920 else
18921   echo "$ac_t""no" 1>&6
18922 fi
18923
18924         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
18925                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
18926         fi
18927         ol_enable_syslog=$ac_cv_func_openlog
18928 fi
18929
18930
18931 ol_link_sql=no
18932 if test $ol_enable_sql != no ; then
18933         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
18934 echo "configure:18935: checking for SQLDriverConnect in -liodbc" >&5
18935 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
18936 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18937   echo $ac_n "(cached) $ac_c" 1>&6
18938 else
18939   ac_save_LIBS="$LIBS"
18940 LIBS="-liodbc  $LIBS"
18941 cat > conftest.$ac_ext <<EOF
18942 #line 18943 "configure"
18943 #include "confdefs.h"
18944 /* Override any gcc2 internal prototype to avoid an error.  */
18945 /* We use char because int might match the return type of a gcc2
18946     builtin and then its argument prototype would still apply.  */
18947 char SQLDriverConnect();
18948
18949 int main() {
18950 SQLDriverConnect()
18951 ; return 0; }
18952 EOF
18953 if { (eval echo configure:18954: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18954   rm -rf conftest*
18955   eval "ac_cv_lib_$ac_lib_var=yes"
18956 else
18957   echo "configure: failed program was:" >&5
18958   cat conftest.$ac_ext >&5
18959   rm -rf conftest*
18960   eval "ac_cv_lib_$ac_lib_var=no"
18961 fi
18962 rm -f conftest*
18963 LIBS="$ac_save_LIBS"
18964
18965 fi
18966 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18967   echo "$ac_t""yes" 1>&6
18968   have_iodbc=yes
18969 else
18970   echo "$ac_t""no" 1>&6
18971 have_iodbc=no
18972 fi
18973
18974         if test $have_iodbc = yes ; then
18975                 ol_link_sql="-liodbc"
18976         else
18977                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
18978 echo "configure:18979: checking for SQLDriverConnect in -lodbc" >&5
18979 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
18980 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18981   echo $ac_n "(cached) $ac_c" 1>&6
18982 else
18983   ac_save_LIBS="$LIBS"
18984 LIBS="-lodbc  $LIBS"
18985 cat > conftest.$ac_ext <<EOF
18986 #line 18987 "configure"
18987 #include "confdefs.h"
18988 /* Override any gcc2 internal prototype to avoid an error.  */
18989 /* We use char because int might match the return type of a gcc2
18990     builtin and then its argument prototype would still apply.  */
18991 char SQLDriverConnect();
18992
18993 int main() {
18994 SQLDriverConnect()
18995 ; return 0; }
18996 EOF
18997 if { (eval echo configure:18998: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18998   rm -rf conftest*
18999   eval "ac_cv_lib_$ac_lib_var=yes"
19000 else
19001   echo "configure: failed program was:" >&5
19002   cat conftest.$ac_ext >&5
19003   rm -rf conftest*
19004   eval "ac_cv_lib_$ac_lib_var=no"
19005 fi
19006 rm -f conftest*
19007 LIBS="$ac_save_LIBS"
19008
19009 fi
19010 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19011   echo "$ac_t""yes" 1>&6
19012   have_odbc=yes
19013 else
19014   echo "$ac_t""no" 1>&6
19015 have_odbc=no
19016 fi
19017
19018                 if test $have_odbc = yes ; then
19019                         ol_link_sql="-lodbc"
19020                 fi
19021         fi
19022
19023         if test $ol_link_sql != no ; then
19024                 SLAPD_SQL_LIBS="$ol_link_sql"
19025
19026         elif test $ol_enable_sql != auto ; then
19027                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19028         fi
19029 fi
19030
19031 if test $ol_enable_tcl != no ; then
19032         for ac_hdr in tcl.h
19033 do
19034 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19035 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19036 echo "configure:19037: checking for $ac_hdr" >&5
19037 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19038   echo $ac_n "(cached) $ac_c" 1>&6
19039 else
19040   cat > conftest.$ac_ext <<EOF
19041 #line 19042 "configure"
19042 #include "confdefs.h"
19043 #include <$ac_hdr>
19044 EOF
19045 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19046 { (eval echo configure:19047: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19047 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19048 if test -z "$ac_err"; then
19049   rm -rf conftest*
19050   eval "ac_cv_header_$ac_safe=yes"
19051 else
19052   echo "$ac_err" >&5
19053   echo "configure: failed program was:" >&5
19054   cat conftest.$ac_ext >&5
19055   rm -rf conftest*
19056   eval "ac_cv_header_$ac_safe=no"
19057 fi
19058 rm -f conftest*
19059 fi
19060 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19061   echo "$ac_t""yes" 1>&6
19062     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19063   cat >> confdefs.h <<EOF
19064 #define $ac_tr_hdr 1
19065 EOF
19066  
19067 else
19068   echo "$ac_t""no" 1>&6
19069 fi
19070 done
19071
19072
19073         if test $ac_cv_header_tcl_h != yes ; then
19074                 have_tcl=no
19075         else
19076                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19077                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19078 echo "configure:19079: checking for main in -l$lib" >&5
19079 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19080 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19081   echo $ac_n "(cached) $ac_c" 1>&6
19082 else
19083   ac_save_LIBS="$LIBS"
19084 LIBS="-l$lib  $LIBS"
19085 cat > conftest.$ac_ext <<EOF
19086 #line 19087 "configure"
19087 #include "confdefs.h"
19088
19089 int main() {
19090 main()
19091 ; return 0; }
19092 EOF
19093 if { (eval echo configure:19094: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19094   rm -rf conftest*
19095   eval "ac_cv_lib_$ac_lib_var=yes"
19096 else
19097   echo "configure: failed program was:" >&5
19098   cat conftest.$ac_ext >&5
19099   rm -rf conftest*
19100   eval "ac_cv_lib_$ac_lib_var=no"
19101 fi
19102 rm -f conftest*
19103 LIBS="$ac_save_LIBS"
19104
19105 fi
19106 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19107   echo "$ac_t""yes" 1>&6
19108   have_tcl=yes
19109                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19110                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19111                            else
19112                                         MOD_TCL_LIB="-l${lib}"
19113                            fi;break
19114 else
19115   echo "$ac_t""no" 1>&6
19116 have_tcl=no
19117 fi
19118
19119                 done
19120         fi
19121
19122         if test $have_tcl != yes ; then
19123                 echo "configure: warning: could not find -ltcl" 1>&2
19124                 if test $ol_enable_tcl = yes ; then
19125                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19126                 fi
19127
19128                 ol_enable_tcl=no
19129         fi
19130 fi
19131
19132 ol_link_termcap=no
19133 for ac_hdr in termcap.h ncurses.h
19134 do
19135 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19136 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19137 echo "configure:19138: checking for $ac_hdr" >&5
19138 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19139   echo $ac_n "(cached) $ac_c" 1>&6
19140 else
19141   cat > conftest.$ac_ext <<EOF
19142 #line 19143 "configure"
19143 #include "confdefs.h"
19144 #include <$ac_hdr>
19145 EOF
19146 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19147 { (eval echo configure:19148: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19148 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19149 if test -z "$ac_err"; then
19150   rm -rf conftest*
19151   eval "ac_cv_header_$ac_safe=yes"
19152 else
19153   echo "$ac_err" >&5
19154   echo "configure: failed program was:" >&5
19155   cat conftest.$ac_ext >&5
19156   rm -rf conftest*
19157   eval "ac_cv_header_$ac_safe=no"
19158 fi
19159 rm -f conftest*
19160 fi
19161 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19162   echo "$ac_t""yes" 1>&6
19163     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19164   cat >> confdefs.h <<EOF
19165 #define $ac_tr_hdr 1
19166 EOF
19167  
19168 else
19169   echo "$ac_t""no" 1>&6
19170 fi
19171 done
19172
19173
19174 if test $ol_link_termcap = no ; then
19175         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19176 echo "configure:19177: checking for tputs in -ltermcap" >&5
19177 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19178 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19179   echo $ac_n "(cached) $ac_c" 1>&6
19180 else
19181   ac_save_LIBS="$LIBS"
19182 LIBS="-ltermcap  $LIBS"
19183 cat > conftest.$ac_ext <<EOF
19184 #line 19185 "configure"
19185 #include "confdefs.h"
19186 /* Override any gcc2 internal prototype to avoid an error.  */
19187 /* We use char because int might match the return type of a gcc2
19188     builtin and then its argument prototype would still apply.  */
19189 char tputs();
19190
19191 int main() {
19192 tputs()
19193 ; return 0; }
19194 EOF
19195 if { (eval echo configure:19196: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19196   rm -rf conftest*
19197   eval "ac_cv_lib_$ac_lib_var=yes"
19198 else
19199   echo "configure: failed program was:" >&5
19200   cat conftest.$ac_ext >&5
19201   rm -rf conftest*
19202   eval "ac_cv_lib_$ac_lib_var=no"
19203 fi
19204 rm -f conftest*
19205 LIBS="$ac_save_LIBS"
19206
19207 fi
19208 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19209   echo "$ac_t""yes" 1>&6
19210   have_termcap=yes
19211 else
19212   echo "$ac_t""no" 1>&6
19213 have_termcap=no
19214 fi
19215
19216         if test $have_termcap = yes ; then
19217                 cat >> confdefs.h <<\EOF
19218 #define HAVE_TERMCAP 1
19219 EOF
19220
19221                 ol_link_termcap=yes
19222                 TERMCAP_LIBS=-ltermcap
19223         fi
19224 fi
19225
19226 if test $ol_link_termcap = no ; then
19227         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19228 echo "configure:19229: checking for initscr in -lncurses" >&5
19229 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19230 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19231   echo $ac_n "(cached) $ac_c" 1>&6
19232 else
19233   ac_save_LIBS="$LIBS"
19234 LIBS="-lncurses  $LIBS"
19235 cat > conftest.$ac_ext <<EOF
19236 #line 19237 "configure"
19237 #include "confdefs.h"
19238 /* Override any gcc2 internal prototype to avoid an error.  */
19239 /* We use char because int might match the return type of a gcc2
19240     builtin and then its argument prototype would still apply.  */
19241 char initscr();
19242
19243 int main() {
19244 initscr()
19245 ; return 0; }
19246 EOF
19247 if { (eval echo configure:19248: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19248   rm -rf conftest*
19249   eval "ac_cv_lib_$ac_lib_var=yes"
19250 else
19251   echo "configure: failed program was:" >&5
19252   cat conftest.$ac_ext >&5
19253   rm -rf conftest*
19254   eval "ac_cv_lib_$ac_lib_var=no"
19255 fi
19256 rm -f conftest*
19257 LIBS="$ac_save_LIBS"
19258
19259 fi
19260 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19261   echo "$ac_t""yes" 1>&6
19262   have_ncurses=yes
19263 else
19264   echo "$ac_t""no" 1>&6
19265 have_ncurses=no
19266 fi
19267
19268         if test $have_ncurses = yes ; then
19269                 cat >> confdefs.h <<\EOF
19270 #define HAVE_NCURSES 1
19271 EOF
19272
19273                 ol_link_termcap=yes
19274                 TERMCAP_LIBS=-lncurses
19275         fi
19276 fi
19277
19278 if test $ol_link_termcap = no ; then
19279         cat >> confdefs.h <<\EOF
19280 #define NO_TERMCAP 1
19281 EOF
19282
19283         TERMCAP_LIBS=
19284 fi
19285
19286 ol_link_sasl=no
19287 ol_link_spasswd=no
19288 if test $ol_with_cyrus_sasl != no ; then
19289         for ac_hdr in sasl/sasl.h sasl.h
19290 do
19291 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19292 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19293 echo "configure:19294: checking for $ac_hdr" >&5
19294 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19295   echo $ac_n "(cached) $ac_c" 1>&6
19296 else
19297   cat > conftest.$ac_ext <<EOF
19298 #line 19299 "configure"
19299 #include "confdefs.h"
19300 #include <$ac_hdr>
19301 EOF
19302 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19303 { (eval echo configure:19304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19304 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19305 if test -z "$ac_err"; then
19306   rm -rf conftest*
19307   eval "ac_cv_header_$ac_safe=yes"
19308 else
19309   echo "$ac_err" >&5
19310   echo "configure: failed program was:" >&5
19311   cat conftest.$ac_ext >&5
19312   rm -rf conftest*
19313   eval "ac_cv_header_$ac_safe=no"
19314 fi
19315 rm -f conftest*
19316 fi
19317 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19318   echo "$ac_t""yes" 1>&6
19319     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19320   cat >> confdefs.h <<EOF
19321 #define $ac_tr_hdr 1
19322 EOF
19323  
19324 else
19325   echo "$ac_t""no" 1>&6
19326 fi
19327 done
19328
19329
19330         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19331                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19332 echo "configure:19333: checking for sasl_client_init in -lsasl2" >&5
19333 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19334 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19335   echo $ac_n "(cached) $ac_c" 1>&6
19336 else
19337   ac_save_LIBS="$LIBS"
19338 LIBS="-lsasl2  $LIBS"
19339 cat > conftest.$ac_ext <<EOF
19340 #line 19341 "configure"
19341 #include "confdefs.h"
19342 /* Override any gcc2 internal prototype to avoid an error.  */
19343 /* We use char because int might match the return type of a gcc2
19344     builtin and then its argument prototype would still apply.  */
19345 char sasl_client_init();
19346
19347 int main() {
19348 sasl_client_init()
19349 ; return 0; }
19350 EOF
19351 if { (eval echo configure:19352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19352   rm -rf conftest*
19353   eval "ac_cv_lib_$ac_lib_var=yes"
19354 else
19355   echo "configure: failed program was:" >&5
19356   cat conftest.$ac_ext >&5
19357   rm -rf conftest*
19358   eval "ac_cv_lib_$ac_lib_var=no"
19359 fi
19360 rm -f conftest*
19361 LIBS="$ac_save_LIBS"
19362
19363 fi
19364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19365   echo "$ac_t""yes" 1>&6
19366   ol_link_sasl="-lsasl2"
19367 else
19368   echo "$ac_t""no" 1>&6
19369 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19370 echo "configure:19371: checking for sasl_client_init in -lsasl" >&5
19371 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19372 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19373   echo $ac_n "(cached) $ac_c" 1>&6
19374 else
19375   ac_save_LIBS="$LIBS"
19376 LIBS="-lsasl  $LIBS"
19377 cat > conftest.$ac_ext <<EOF
19378 #line 19379 "configure"
19379 #include "confdefs.h"
19380 /* Override any gcc2 internal prototype to avoid an error.  */
19381 /* We use char because int might match the return type of a gcc2
19382     builtin and then its argument prototype would still apply.  */
19383 char sasl_client_init();
19384
19385 int main() {
19386 sasl_client_init()
19387 ; return 0; }
19388 EOF
19389 if { (eval echo configure:19390: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19390   rm -rf conftest*
19391   eval "ac_cv_lib_$ac_lib_var=yes"
19392 else
19393   echo "configure: failed program was:" >&5
19394   cat conftest.$ac_ext >&5
19395   rm -rf conftest*
19396   eval "ac_cv_lib_$ac_lib_var=no"
19397 fi
19398 rm -f conftest*
19399 LIBS="$ac_save_LIBS"
19400
19401 fi
19402 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19403   echo "$ac_t""yes" 1>&6
19404   ol_link_sasl="-lsasl"
19405 else
19406   echo "$ac_t""no" 1>&6
19407 fi
19408
19409 fi
19410
19411         fi
19412
19413         if test $ol_link_sasl = no ; then
19414                 if test $ol_with_cyrus_sasl != auto ; then
19415                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19416                 else
19417                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19418                         echo "configure: warning: SASL authentication not supported!" 1>&2
19419                         if test $ol_link_tls = no ; then
19420                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19421                         fi
19422                 fi
19423         else
19424                 cat >> confdefs.h <<\EOF
19425 #define HAVE_CYRUS_SASL 1
19426 EOF
19427
19428                 SASL_LIBS="$ol_link_sasl"
19429                 if test $ol_enable_spasswd != no ; then
19430                         ol_link_spasswd=yes
19431                 fi
19432         fi
19433
19434 else
19435         echo "configure: warning: SASL authentication not supported!" 1>&2
19436         if test $ol_link_tls = no ; then
19437                 echo "configure: warning: Strong authentication not supported!" 1>&2
19438         fi
19439 fi
19440
19441 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19442         dev=no
19443         if test -r /dev/urandom ; then
19444                 dev="/dev/urandom";
19445         elif test -r /idev/urandom ; then
19446                 dev="/idev/urandom";
19447         elif test -r /dev/srandom ; then
19448                 dev="/dev/srandom";
19449         elif test -r /dev/random ; then
19450                 dev="/dev/random";
19451         elif test -r /idev/random ; then
19452                 dev="/idev/random";
19453         fi
19454
19455         if test $dev != no ; then
19456                 cat >> confdefs.h <<EOF
19457 #define URANDOM_DEVICE "$dev"
19458 EOF
19459
19460         fi
19461 fi
19462
19463 ol_link_fetch=no
19464 if test $ol_with_fetch != no ; then
19465         ol_LIBS=$LIBS
19466 LIBS="-lfetch -lcom_err $LIBS"
19467 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19468 echo "configure:19469: checking fetch(3) library" >&5
19469 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19470   echo $ac_n "(cached) $ac_c" 1>&6
19471 else
19472   
19473         cat > conftest.$ac_ext <<EOF
19474 #line 19475 "configure"
19475 #include "confdefs.h"
19476
19477 #include <sys/param.h>
19478 #include <stdio.h>
19479 #include <fetch.h>
19480 int main() {
19481 struct url *u = fetchParseURL("file:///"); 
19482 ; return 0; }
19483 EOF
19484 if { (eval echo configure:19485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19485   rm -rf conftest*
19486   ol_cv_lib_fetch=yes
19487 else
19488   echo "configure: failed program was:" >&5
19489   cat conftest.$ac_ext >&5
19490   rm -rf conftest*
19491   ol_cv_lib_fetch=no
19492 fi
19493 rm -f conftest*
19494 fi
19495
19496 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19497 LIBS=$ol_LIBS
19498 if test $ol_cv_lib_fetch != no ; then
19499         ol_link_fetch="-lfetch -lcom_err"
19500         cat >> confdefs.h <<\EOF
19501 #define HAVE_FETCH 1
19502 EOF
19503
19504 fi
19505
19506
19507         if test $ol_cv_lib_fetch != no ; then
19508                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19509                 ol_link_fetch=freebsd
19510
19511         elif test $ol_with_fetch != auto ; then
19512                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19513         fi 
19514 fi
19515
19516 ol_link_readline=no
19517 if test $ol_with_readline != no ; then
19518         for ac_hdr in readline/readline.h readline/history.h
19519 do
19520 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19521 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19522 echo "configure:19523: checking for $ac_hdr" >&5
19523 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19524   echo $ac_n "(cached) $ac_c" 1>&6
19525 else
19526   cat > conftest.$ac_ext <<EOF
19527 #line 19528 "configure"
19528 #include "confdefs.h"
19529 #include <$ac_hdr>
19530 EOF
19531 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19532 { (eval echo configure:19533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19533 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19534 if test -z "$ac_err"; then
19535   rm -rf conftest*
19536   eval "ac_cv_header_$ac_safe=yes"
19537 else
19538   echo "$ac_err" >&5
19539   echo "configure: failed program was:" >&5
19540   cat conftest.$ac_ext >&5
19541   rm -rf conftest*
19542   eval "ac_cv_header_$ac_safe=no"
19543 fi
19544 rm -f conftest*
19545 fi
19546 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19547   echo "$ac_t""yes" 1>&6
19548     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19549   cat >> confdefs.h <<EOF
19550 #define $ac_tr_hdr 1
19551 EOF
19552  
19553 else
19554   echo "$ac_t""no" 1>&6
19555 fi
19556 done
19557
19558
19559         if test $ac_cv_header_readline_readline_h = yes ; then
19560                 save_LIBS="$LIBS"
19561                 LIBS="$TERMCAP_LIBS $LIBS"
19562                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
19563 echo "configure:19564: checking for readline in -lreadline" >&5
19564 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
19565 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19566   echo $ac_n "(cached) $ac_c" 1>&6
19567 else
19568   ac_save_LIBS="$LIBS"
19569 LIBS="-lreadline  $LIBS"
19570 cat > conftest.$ac_ext <<EOF
19571 #line 19572 "configure"
19572 #include "confdefs.h"
19573 /* Override any gcc2 internal prototype to avoid an error.  */
19574 /* We use char because int might match the return type of a gcc2
19575     builtin and then its argument prototype would still apply.  */
19576 char readline();
19577
19578 int main() {
19579 readline()
19580 ; return 0; }
19581 EOF
19582 if { (eval echo configure:19583: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19583   rm -rf conftest*
19584   eval "ac_cv_lib_$ac_lib_var=yes"
19585 else
19586   echo "configure: failed program was:" >&5
19587   cat conftest.$ac_ext >&5
19588   rm -rf conftest*
19589   eval "ac_cv_lib_$ac_lib_var=no"
19590 fi
19591 rm -f conftest*
19592 LIBS="$ac_save_LIBS"
19593
19594 fi
19595 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19596   echo "$ac_t""yes" 1>&6
19597   have_readline=yes
19598 else
19599   echo "$ac_t""no" 1>&6
19600 have_readline=no
19601 fi
19602
19603                 LIBS="$save_LIBS"
19604                         
19605                 if test $have_readline = yes ; then
19606                         ol_with_readline=found
19607                         ol_link_readline=yes
19608
19609                         READLINE_LIBS="-lreadline"
19610                 fi
19611         fi
19612 fi
19613
19614 if test $ol_link_readline = yes ; then
19615         cat >> confdefs.h <<\EOF
19616 #define HAVE_READLINE 1
19617 EOF
19618
19619 fi
19620
19621
19622 if test $ol_enable_crypt != no ; then
19623         echo $ac_n "checking for crypt""... $ac_c" 1>&6
19624 echo "configure:19625: checking for crypt" >&5
19625 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
19626   echo $ac_n "(cached) $ac_c" 1>&6
19627 else
19628   cat > conftest.$ac_ext <<EOF
19629 #line 19630 "configure"
19630 #include "confdefs.h"
19631 /* System header to define __stub macros and hopefully few prototypes,
19632     which can conflict with char crypt(); below.  */
19633 #include <assert.h>
19634 /* Override any gcc2 internal prototype to avoid an error.  */
19635 /* We use char because int might match the return type of a gcc2
19636     builtin and then its argument prototype would still apply.  */
19637 char crypt();
19638 char (*f)();
19639
19640 int main() {
19641
19642 /* The GNU C library defines this for functions which it implements
19643     to always fail with ENOSYS.  Some functions are actually named
19644     something starting with __ and the normal name is an alias.  */
19645 #if defined (__stub_crypt) || defined (__stub___crypt)
19646 choke me
19647 #else
19648 f = crypt;
19649 #endif
19650
19651 ; return 0; }
19652 EOF
19653 if { (eval echo configure:19654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19654   rm -rf conftest*
19655   eval "ac_cv_func_crypt=yes"
19656 else
19657   echo "configure: failed program was:" >&5
19658   cat conftest.$ac_ext >&5
19659   rm -rf conftest*
19660   eval "ac_cv_func_crypt=no"
19661 fi
19662 rm -f conftest*
19663 fi
19664
19665 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
19666   echo "$ac_t""yes" 1>&6
19667   have_crypt=yes
19668 else
19669   echo "$ac_t""no" 1>&6
19670
19671                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
19672 echo "configure:19673: checking for crypt in -lcrypt" >&5
19673 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
19674 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19675   echo $ac_n "(cached) $ac_c" 1>&6
19676 else
19677   ac_save_LIBS="$LIBS"
19678 LIBS="-lcrypt  $LIBS"
19679 cat > conftest.$ac_ext <<EOF
19680 #line 19681 "configure"
19681 #include "confdefs.h"
19682 /* Override any gcc2 internal prototype to avoid an error.  */
19683 /* We use char because int might match the return type of a gcc2
19684     builtin and then its argument prototype would still apply.  */
19685 char crypt();
19686
19687 int main() {
19688 crypt()
19689 ; return 0; }
19690 EOF
19691 if { (eval echo configure:19692: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19692   rm -rf conftest*
19693   eval "ac_cv_lib_$ac_lib_var=yes"
19694 else
19695   echo "configure: failed program was:" >&5
19696   cat conftest.$ac_ext >&5
19697   rm -rf conftest*
19698   eval "ac_cv_lib_$ac_lib_var=no"
19699 fi
19700 rm -f conftest*
19701 LIBS="$ac_save_LIBS"
19702
19703 fi
19704 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19705   echo "$ac_t""yes" 1>&6
19706   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
19707                         have_crypt=yes
19708 else
19709   echo "$ac_t""no" 1>&6
19710 have_crypt=no
19711 fi
19712
19713 fi
19714
19715
19716         if test $have_crypt = yes ; then
19717                 cat >> confdefs.h <<\EOF
19718 #define HAVE_CRYPT 1
19719 EOF
19720
19721         else
19722                 echo "configure: warning: could not find crypt" 1>&2
19723                 if test $ol_enable_crypt = yes ; then
19724                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
19725                 fi
19726
19727                 echo "configure: warning: disabling crypt support" 1>&2
19728                 ol_enable_crypt=no
19729         fi
19730 fi
19731
19732 if test $ol_enable_proctitle != no ; then
19733         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
19734 echo "configure:19735: checking for setproctitle" >&5
19735 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
19736   echo $ac_n "(cached) $ac_c" 1>&6
19737 else
19738   cat > conftest.$ac_ext <<EOF
19739 #line 19740 "configure"
19740 #include "confdefs.h"
19741 /* System header to define __stub macros and hopefully few prototypes,
19742     which can conflict with char setproctitle(); below.  */
19743 #include <assert.h>
19744 /* Override any gcc2 internal prototype to avoid an error.  */
19745 /* We use char because int might match the return type of a gcc2
19746     builtin and then its argument prototype would still apply.  */
19747 char setproctitle();
19748 char (*f)();
19749
19750 int main() {
19751
19752 /* The GNU C library defines this for functions which it implements
19753     to always fail with ENOSYS.  Some functions are actually named
19754     something starting with __ and the normal name is an alias.  */
19755 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
19756 choke me
19757 #else
19758 f = setproctitle;
19759 #endif
19760
19761 ; return 0; }
19762 EOF
19763 if { (eval echo configure:19764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19764   rm -rf conftest*
19765   eval "ac_cv_func_setproctitle=yes"
19766 else
19767   echo "configure: failed program was:" >&5
19768   cat conftest.$ac_ext >&5
19769   rm -rf conftest*
19770   eval "ac_cv_func_setproctitle=no"
19771 fi
19772 rm -f conftest*
19773 fi
19774
19775 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
19776   echo "$ac_t""yes" 1>&6
19777   have_setproctitle=yes
19778 else
19779   echo "$ac_t""no" 1>&6
19780
19781                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
19782 echo "configure:19783: checking for setproctitle in -lutil" >&5
19783 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
19784 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19785   echo $ac_n "(cached) $ac_c" 1>&6
19786 else
19787   ac_save_LIBS="$LIBS"
19788 LIBS="-lutil  $LIBS"
19789 cat > conftest.$ac_ext <<EOF
19790 #line 19791 "configure"
19791 #include "confdefs.h"
19792 /* Override any gcc2 internal prototype to avoid an error.  */
19793 /* We use char because int might match the return type of a gcc2
19794     builtin and then its argument prototype would still apply.  */
19795 char setproctitle();
19796
19797 int main() {
19798 setproctitle()
19799 ; return 0; }
19800 EOF
19801 if { (eval echo configure:19802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19802   rm -rf conftest*
19803   eval "ac_cv_lib_$ac_lib_var=yes"
19804 else
19805   echo "configure: failed program was:" >&5
19806   cat conftest.$ac_ext >&5
19807   rm -rf conftest*
19808   eval "ac_cv_lib_$ac_lib_var=no"
19809 fi
19810 rm -f conftest*
19811 LIBS="$ac_save_LIBS"
19812
19813 fi
19814 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19815   echo "$ac_t""yes" 1>&6
19816   have_setproctitle=yes
19817                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
19818 else
19819   echo "$ac_t""no" 1>&6
19820 have_setproctitle=no
19821                         LIBOBJS="$LIBOBJS setproctitle.o"
19822                         LIBSRCS="$LIBSRCS setproctitle.c"
19823 fi
19824
19825 fi
19826
19827
19828         if test $have_setproctitle = yes ; then
19829                 cat >> confdefs.h <<\EOF
19830 #define HAVE_SETPROCTITLE 1
19831 EOF
19832
19833         fi
19834 fi
19835
19836 if test $ol_enable_slp != no ; then
19837         for ac_hdr in slp.h 
19838 do
19839 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19840 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19841 echo "configure:19842: checking for $ac_hdr" >&5
19842 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19843   echo $ac_n "(cached) $ac_c" 1>&6
19844 else
19845   cat > conftest.$ac_ext <<EOF
19846 #line 19847 "configure"
19847 #include "confdefs.h"
19848 #include <$ac_hdr>
19849 EOF
19850 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19851 { (eval echo configure:19852: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19852 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19853 if test -z "$ac_err"; then
19854   rm -rf conftest*
19855   eval "ac_cv_header_$ac_safe=yes"
19856 else
19857   echo "$ac_err" >&5
19858   echo "configure: failed program was:" >&5
19859   cat conftest.$ac_ext >&5
19860   rm -rf conftest*
19861   eval "ac_cv_header_$ac_safe=no"
19862 fi
19863 rm -f conftest*
19864 fi
19865 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19866   echo "$ac_t""yes" 1>&6
19867     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19868   cat >> confdefs.h <<EOF
19869 #define $ac_tr_hdr 1
19870 EOF
19871  
19872 else
19873   echo "$ac_t""no" 1>&6
19874 fi
19875 done
19876
19877
19878         if test $ac_cv_header_slp_h = yes ; then
19879                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
19880 echo "configure:19881: checking for SLPOpen in -lslp" >&5
19881 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
19882 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19883   echo $ac_n "(cached) $ac_c" 1>&6
19884 else
19885   ac_save_LIBS="$LIBS"
19886 LIBS="-lslp  $LIBS"
19887 cat > conftest.$ac_ext <<EOF
19888 #line 19889 "configure"
19889 #include "confdefs.h"
19890 /* Override any gcc2 internal prototype to avoid an error.  */
19891 /* We use char because int might match the return type of a gcc2
19892     builtin and then its argument prototype would still apply.  */
19893 char SLPOpen();
19894
19895 int main() {
19896 SLPOpen()
19897 ; return 0; }
19898 EOF
19899 if { (eval echo configure:19900: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19900   rm -rf conftest*
19901   eval "ac_cv_lib_$ac_lib_var=yes"
19902 else
19903   echo "configure: failed program was:" >&5
19904   cat conftest.$ac_ext >&5
19905   rm -rf conftest*
19906   eval "ac_cv_lib_$ac_lib_var=no"
19907 fi
19908 rm -f conftest*
19909 LIBS="$ac_save_LIBS"
19910
19911 fi
19912 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19913   echo "$ac_t""yes" 1>&6
19914   have_slp=yes
19915 else
19916   echo "$ac_t""no" 1>&6
19917 have_slp=no
19918 fi
19919
19920                 if test $have_slp = yes ; then
19921                         cat >> confdefs.h <<\EOF
19922 #define HAVE_SLP 1
19923 EOF
19924
19925                         SLAPD_SLP_LIBS=-lslp
19926                 fi
19927
19928         elif test $ol_enable_slp = yes ; then
19929                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
19930         fi
19931 fi
19932
19933 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
19934 echo "configure:19935: checking for ANSI C header files" >&5
19935 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
19936   echo $ac_n "(cached) $ac_c" 1>&6
19937 else
19938   cat > conftest.$ac_ext <<EOF
19939 #line 19940 "configure"
19940 #include "confdefs.h"
19941 #include <stdlib.h>
19942 #include <stdarg.h>
19943 #include <string.h>
19944 #include <float.h>
19945 EOF
19946 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19947 { (eval echo configure:19948: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19948 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19949 if test -z "$ac_err"; then
19950   rm -rf conftest*
19951   ac_cv_header_stdc=yes
19952 else
19953   echo "$ac_err" >&5
19954   echo "configure: failed program was:" >&5
19955   cat conftest.$ac_ext >&5
19956   rm -rf conftest*
19957   ac_cv_header_stdc=no
19958 fi
19959 rm -f conftest*
19960
19961 if test $ac_cv_header_stdc = yes; then
19962   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
19963 cat > conftest.$ac_ext <<EOF
19964 #line 19965 "configure"
19965 #include "confdefs.h"
19966 #include <string.h>
19967 EOF
19968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19969   egrep "memchr" >/dev/null 2>&1; then
19970   :
19971 else
19972   rm -rf conftest*
19973   ac_cv_header_stdc=no
19974 fi
19975 rm -f conftest*
19976
19977 fi
19978
19979 if test $ac_cv_header_stdc = yes; then
19980   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
19981 cat > conftest.$ac_ext <<EOF
19982 #line 19983 "configure"
19983 #include "confdefs.h"
19984 #include <stdlib.h>
19985 EOF
19986 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19987   egrep "free" >/dev/null 2>&1; then
19988   :
19989 else
19990   rm -rf conftest*
19991   ac_cv_header_stdc=no
19992 fi
19993 rm -f conftest*
19994
19995 fi
19996
19997 if test $ac_cv_header_stdc = yes; then
19998   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
19999 if test "$cross_compiling" = yes; then
20000   :
20001 else
20002   cat > conftest.$ac_ext <<EOF
20003 #line 20004 "configure"
20004 #include "confdefs.h"
20005 #include <ctype.h>
20006 #if ((' ' & 0x0FF) == 0x020)
20007 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20008 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20009 #else
20010 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20011  || ('j' <= (c) && (c) <= 'r') \
20012  || ('s' <= (c) && (c) <= 'z'))
20013 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20014 #endif
20015 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20016 int main () { int i; for (i = 0; i < 256; i++)
20017 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20018 exit (0); }
20019
20020 EOF
20021 if { (eval echo configure:20022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20022 then
20023   :
20024 else
20025   echo "configure: failed program was:" >&5
20026   cat conftest.$ac_ext >&5
20027   rm -fr conftest*
20028   ac_cv_header_stdc=no
20029 fi
20030 rm -fr conftest*
20031 fi
20032
20033 fi
20034 fi
20035
20036 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20037 if test $ac_cv_header_stdc = yes; then
20038   cat >> confdefs.h <<\EOF
20039 #define STDC_HEADERS 1
20040 EOF
20041
20042 fi
20043
20044 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20045 echo "configure:20046: checking for mode_t" >&5
20046 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20047   echo $ac_n "(cached) $ac_c" 1>&6
20048 else
20049   cat > conftest.$ac_ext <<EOF
20050 #line 20051 "configure"
20051 #include "confdefs.h"
20052 #include <sys/types.h>
20053 #if STDC_HEADERS
20054 #include <stdlib.h>
20055 #include <stddef.h>
20056 #endif
20057
20058 EOF
20059 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20060   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20061   rm -rf conftest*
20062   eval "ac_cv_type_mode_t=yes"
20063 else
20064   rm -rf conftest*
20065   eval "ac_cv_type_mode_t=no"
20066 fi
20067 rm -f conftest*
20068
20069 fi
20070 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20071   echo "$ac_t""yes" 1>&6
20072 else
20073   echo "$ac_t""no" 1>&6
20074   cat >> confdefs.h <<EOF
20075 #define mode_t int
20076 EOF
20077
20078 fi
20079
20080 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20081 echo "configure:20082: checking for off_t" >&5
20082 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20083   echo $ac_n "(cached) $ac_c" 1>&6
20084 else
20085   cat > conftest.$ac_ext <<EOF
20086 #line 20087 "configure"
20087 #include "confdefs.h"
20088 #include <sys/types.h>
20089 #if STDC_HEADERS
20090 #include <stdlib.h>
20091 #include <stddef.h>
20092 #endif
20093
20094 EOF
20095 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20096   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20097   rm -rf conftest*
20098   eval "ac_cv_type_off_t=yes"
20099 else
20100   rm -rf conftest*
20101   eval "ac_cv_type_off_t=no"
20102 fi
20103 rm -f conftest*
20104
20105 fi
20106 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20107   echo "$ac_t""yes" 1>&6
20108 else
20109   echo "$ac_t""no" 1>&6
20110   cat >> confdefs.h <<EOF
20111 #define off_t long
20112 EOF
20113
20114 fi
20115
20116 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20117 echo "configure:20118: checking for pid_t" >&5
20118 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20119   echo $ac_n "(cached) $ac_c" 1>&6
20120 else
20121   cat > conftest.$ac_ext <<EOF
20122 #line 20123 "configure"
20123 #include "confdefs.h"
20124 #include <sys/types.h>
20125 #if STDC_HEADERS
20126 #include <stdlib.h>
20127 #include <stddef.h>
20128 #endif
20129
20130 EOF
20131 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20132   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20133   rm -rf conftest*
20134   eval "ac_cv_type_pid_t=yes"
20135 else
20136   rm -rf conftest*
20137   eval "ac_cv_type_pid_t=no"
20138 fi
20139 rm -f conftest*
20140
20141 fi
20142 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20143   echo "$ac_t""yes" 1>&6
20144 else
20145   echo "$ac_t""no" 1>&6
20146   cat >> confdefs.h <<EOF
20147 #define pid_t int
20148 EOF
20149
20150 fi
20151
20152 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20153 echo "configure:20154: checking for ptrdiff_t" >&5
20154 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20155   echo $ac_n "(cached) $ac_c" 1>&6
20156 else
20157   cat > conftest.$ac_ext <<EOF
20158 #line 20159 "configure"
20159 #include "confdefs.h"
20160 #include <stddef.h>
20161 int main() {
20162 ptrdiff_t p
20163 ; return 0; }
20164 EOF
20165 if { (eval echo configure:20166: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20166   rm -rf conftest*
20167   am_cv_type_ptrdiff_t=yes
20168 else
20169   echo "configure: failed program was:" >&5
20170   cat conftest.$ac_ext >&5
20171   rm -rf conftest*
20172   am_cv_type_ptrdiff_t=no
20173 fi
20174 rm -f conftest*
20175 fi
20176
20177 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20178    if test $am_cv_type_ptrdiff_t = yes; then
20179      cat >> confdefs.h <<\EOF
20180 #define HAVE_PTRDIFF_T 1
20181 EOF
20182
20183    fi
20184
20185 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20186 echo "configure:20187: checking return type of signal handlers" >&5
20187 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20188   echo $ac_n "(cached) $ac_c" 1>&6
20189 else
20190   cat > conftest.$ac_ext <<EOF
20191 #line 20192 "configure"
20192 #include "confdefs.h"
20193 #include <sys/types.h>
20194 #include <signal.h>
20195 #ifdef signal
20196 #undef signal
20197 #endif
20198 #ifdef __cplusplus
20199 extern "C" void (*signal (int, void (*)(int)))(int);
20200 #else
20201 void (*signal ()) ();
20202 #endif
20203
20204 int main() {
20205 int i;
20206 ; return 0; }
20207 EOF
20208 if { (eval echo configure:20209: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20209   rm -rf conftest*
20210   ac_cv_type_signal=void
20211 else
20212   echo "configure: failed program was:" >&5
20213   cat conftest.$ac_ext >&5
20214   rm -rf conftest*
20215   ac_cv_type_signal=int
20216 fi
20217 rm -f conftest*
20218 fi
20219
20220 echo "$ac_t""$ac_cv_type_signal" 1>&6
20221 cat >> confdefs.h <<EOF
20222 #define RETSIGTYPE $ac_cv_type_signal
20223 EOF
20224
20225
20226 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20227 echo "configure:20228: checking for size_t" >&5
20228 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20229   echo $ac_n "(cached) $ac_c" 1>&6
20230 else
20231   cat > conftest.$ac_ext <<EOF
20232 #line 20233 "configure"
20233 #include "confdefs.h"
20234 #include <sys/types.h>
20235 #if STDC_HEADERS
20236 #include <stdlib.h>
20237 #include <stddef.h>
20238 #endif
20239
20240 EOF
20241 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20242   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20243   rm -rf conftest*
20244   eval "ac_cv_type_size_t=yes"
20245 else
20246   rm -rf conftest*
20247   eval "ac_cv_type_size_t=no"
20248 fi
20249 rm -f conftest*
20250
20251 fi
20252 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20253   echo "$ac_t""yes" 1>&6
20254 else
20255   echo "$ac_t""no" 1>&6
20256   cat >> confdefs.h <<EOF
20257 #define size_t unsigned
20258 EOF
20259
20260 fi
20261
20262
20263 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20264 echo "configure:20265: checking for ssize_t" >&5
20265 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20266   echo $ac_n "(cached) $ac_c" 1>&6
20267 else
20268   cat > conftest.$ac_ext <<EOF
20269 #line 20270 "configure"
20270 #include "confdefs.h"
20271 #include <sys/types.h>
20272 #if STDC_HEADERS
20273 #include <stdlib.h>
20274 #include <stddef.h>
20275 #endif
20276
20277 EOF
20278 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20279   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20280   rm -rf conftest*
20281   eval "ac_cv_type_ssize_t=yes"
20282 else
20283   rm -rf conftest*
20284   eval "ac_cv_type_ssize_t=no"
20285 fi
20286 rm -f conftest*
20287
20288 fi
20289 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20290   echo "$ac_t""yes" 1>&6
20291 else
20292   echo "$ac_t""no" 1>&6
20293   cat >> confdefs.h <<EOF
20294 #define ssize_t signed int
20295 EOF
20296
20297 fi
20298
20299 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20300 echo "configure:20301: checking for caddr_t" >&5
20301 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20302   echo $ac_n "(cached) $ac_c" 1>&6
20303 else
20304   cat > conftest.$ac_ext <<EOF
20305 #line 20306 "configure"
20306 #include "confdefs.h"
20307 #include <sys/types.h>
20308 #if STDC_HEADERS
20309 #include <stdlib.h>
20310 #include <stddef.h>
20311 #endif
20312
20313 EOF
20314 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20315   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20316   rm -rf conftest*
20317   eval "ac_cv_type_caddr_t=yes"
20318 else
20319   rm -rf conftest*
20320   eval "ac_cv_type_caddr_t=no"
20321 fi
20322 rm -f conftest*
20323
20324 fi
20325 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20326   echo "$ac_t""yes" 1>&6
20327 else
20328   echo "$ac_t""no" 1>&6
20329   cat >> confdefs.h <<EOF
20330 #define caddr_t char *
20331 EOF
20332
20333 fi
20334
20335
20336 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20337 echo "configure:20338: checking for socklen_t" >&5
20338 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20339   echo $ac_n "(cached) $ac_c" 1>&6
20340 else
20341   cat > conftest.$ac_ext <<EOF
20342 #line 20343 "configure"
20343 #include "confdefs.h"
20344
20345 #ifdef HAVE_SYS_TYPES_H
20346 #include <sys/types.h>
20347 #endif
20348 #ifdef HAVE_SYS_SOCKET_H
20349 #include <sys/socket.h>
20350 #endif
20351
20352 int main() {
20353 socklen_t len;
20354 ; return 0; }
20355 EOF
20356 if { (eval echo configure:20357: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20357   rm -rf conftest*
20358   ol_cv_type_socklen_t=yes
20359 else
20360   echo "configure: failed program was:" >&5
20361   cat conftest.$ac_ext >&5
20362   rm -rf conftest*
20363   ol_cv_type_socklen_t=no
20364 fi
20365 rm -f conftest*
20366 fi
20367
20368 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20369   if test $ol_cv_type_socklen_t = no; then
20370     cat >> confdefs.h <<\EOF
20371 #define socklen_t int
20372 EOF
20373
20374   fi
20375  
20376 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20377 echo "configure:20378: checking for member st_blksize in aggregate type struct stat" >&5
20378 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20379   echo $ac_n "(cached) $ac_c" 1>&6
20380 else
20381   cat > conftest.$ac_ext <<EOF
20382 #line 20383 "configure"
20383 #include "confdefs.h"
20384 #include <sys/types.h>
20385 #include <sys/stat.h>
20386 int main() {
20387 struct stat foo; foo.st_blksize;
20388 ; return 0; }
20389 EOF
20390 if { (eval echo configure:20391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20391   rm -rf conftest*
20392   ac_cv_c_struct_member_st_blksize=yes
20393 else
20394   echo "configure: failed program was:" >&5
20395   cat conftest.$ac_ext >&5
20396   rm -rf conftest*
20397   ac_cv_c_struct_member_st_blksize=no
20398 fi
20399 rm -f conftest*
20400 fi
20401
20402 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20403 st_blksize="$ac_cv_c_struct_member_st_blksize"
20404 if test $ac_cv_c_struct_member_st_blksize = yes; then
20405   cat >> confdefs.h <<\EOF
20406 #define HAVE_ST_BLKSIZE 1
20407 EOF
20408
20409 fi
20410
20411 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20412 echo "configure:20413: checking whether time.h and sys/time.h may both be included" >&5
20413 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20414   echo $ac_n "(cached) $ac_c" 1>&6
20415 else
20416   cat > conftest.$ac_ext <<EOF
20417 #line 20418 "configure"
20418 #include "confdefs.h"
20419 #include <sys/types.h>
20420 #include <sys/time.h>
20421 #include <time.h>
20422 int main() {
20423 struct tm *tp;
20424 ; return 0; }
20425 EOF
20426 if { (eval echo configure:20427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20427   rm -rf conftest*
20428   ac_cv_header_time=yes
20429 else
20430   echo "configure: failed program was:" >&5
20431   cat conftest.$ac_ext >&5
20432   rm -rf conftest*
20433   ac_cv_header_time=no
20434 fi
20435 rm -f conftest*
20436 fi
20437
20438 echo "$ac_t""$ac_cv_header_time" 1>&6
20439 if test $ac_cv_header_time = yes; then
20440   cat >> confdefs.h <<\EOF
20441 #define TIME_WITH_SYS_TIME 1
20442 EOF
20443
20444 fi
20445
20446 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20447 echo "configure:20448: checking whether struct tm is in sys/time.h or time.h" >&5
20448 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20449   echo $ac_n "(cached) $ac_c" 1>&6
20450 else
20451   cat > conftest.$ac_ext <<EOF
20452 #line 20453 "configure"
20453 #include "confdefs.h"
20454 #include <sys/types.h>
20455 #include <time.h>
20456 int main() {
20457 struct tm *tp; tp->tm_sec;
20458 ; return 0; }
20459 EOF
20460 if { (eval echo configure:20461: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20461   rm -rf conftest*
20462   ac_cv_struct_tm=time.h
20463 else
20464   echo "configure: failed program was:" >&5
20465   cat conftest.$ac_ext >&5
20466   rm -rf conftest*
20467   ac_cv_struct_tm=sys/time.h
20468 fi
20469 rm -f conftest*
20470 fi
20471
20472 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20473 if test $ac_cv_struct_tm = sys/time.h; then
20474   cat >> confdefs.h <<\EOF
20475 #define TM_IN_SYS_TIME 1
20476 EOF
20477
20478 fi
20479
20480 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20481 echo "configure:20482: checking for uid_t in sys/types.h" >&5
20482 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
20483   echo $ac_n "(cached) $ac_c" 1>&6
20484 else
20485   cat > conftest.$ac_ext <<EOF
20486 #line 20487 "configure"
20487 #include "confdefs.h"
20488 #include <sys/types.h>
20489 EOF
20490 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20491   egrep "uid_t" >/dev/null 2>&1; then
20492   rm -rf conftest*
20493   ac_cv_type_uid_t=yes
20494 else
20495   rm -rf conftest*
20496   ac_cv_type_uid_t=no
20497 fi
20498 rm -f conftest*
20499
20500 fi
20501
20502 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20503 if test $ac_cv_type_uid_t = no; then
20504   cat >> confdefs.h <<\EOF
20505 #define uid_t int
20506 EOF
20507
20508   cat >> confdefs.h <<\EOF
20509 #define gid_t int
20510 EOF
20511
20512 fi
20513
20514 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20515 echo "configure:20516: checking for sig_atomic_t" >&5
20516 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20517   echo $ac_n "(cached) $ac_c" 1>&6
20518 else
20519   cat > conftest.$ac_ext <<EOF
20520 #line 20521 "configure"
20521 #include "confdefs.h"
20522 #include <signal.h>
20523 int main() {
20524 sig_atomic_t atomic;
20525 ; return 0; }
20526 EOF
20527 if { (eval echo configure:20528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20528   rm -rf conftest*
20529   ol_cv_type_sig_atomic_t=yes
20530 else
20531   echo "configure: failed program was:" >&5
20532   cat conftest.$ac_ext >&5
20533   rm -rf conftest*
20534   ol_cv_type_sig_atomic_t=no
20535 fi
20536 rm -f conftest*
20537 fi
20538
20539 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20540   if test $ol_cv_type_sig_atomic_t = no; then
20541     cat >> confdefs.h <<\EOF
20542 #define sig_atomic_t int
20543 EOF
20544
20545   fi
20546  
20547
20548
20549 # test for pw_gecos in struct passwd
20550 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
20551 echo "configure:20552: checking struct passwd for pw_gecos" >&5
20552 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
20553   echo $ac_n "(cached) $ac_c" 1>&6
20554 else
20555   
20556         cat > conftest.$ac_ext <<EOF
20557 #line 20558 "configure"
20558 #include "confdefs.h"
20559 #include <pwd.h>
20560 int main() {
20561
20562         struct passwd pwd;
20563         pwd.pw_gecos = pwd.pw_name;
20564
20565 ; return 0; }
20566 EOF
20567 if { (eval echo configure:20568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20568   rm -rf conftest*
20569   ol_cv_struct_passwd_pw_gecos=yes
20570 else
20571   echo "configure: failed program was:" >&5
20572   cat conftest.$ac_ext >&5
20573   rm -rf conftest*
20574   ol_cv_struct_passwd_pw_gecos=no
20575 fi
20576 rm -f conftest*
20577 fi
20578
20579 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
20580 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
20581         cat >> confdefs.h <<\EOF
20582 #define HAVE_PW_GECOS 1
20583 EOF
20584
20585 fi
20586
20587 # test for pw_passwd in struct passwd
20588 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
20589 echo "configure:20590: checking struct passwd for pw_passwd" >&5
20590 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
20591   echo $ac_n "(cached) $ac_c" 1>&6
20592 else
20593   
20594         cat > conftest.$ac_ext <<EOF
20595 #line 20596 "configure"
20596 #include "confdefs.h"
20597 #include <pwd.h>
20598 int main() {
20599
20600         struct passwd pwd;
20601         pwd.pw_passwd = pwd.pw_name;
20602
20603 ; return 0; }
20604 EOF
20605 if { (eval echo configure:20606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20606   rm -rf conftest*
20607   ol_cv_struct_passwd_pw_passwd=yes
20608 else
20609   echo "configure: failed program was:" >&5
20610   cat conftest.$ac_ext >&5
20611   rm -rf conftest*
20612   ol_cv_struct_passwd_pw_passwd=no
20613 fi
20614 rm -f conftest*
20615 fi
20616
20617 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
20618 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
20619         cat >> confdefs.h <<\EOF
20620 #define HAVE_PW_PASSWD 1
20621 EOF
20622
20623 fi
20624
20625
20626 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
20627 echo "configure:20628: checking if toupper() requires islower()" >&5
20628 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
20629   echo $ac_n "(cached) $ac_c" 1>&6
20630 else
20631   
20632         if test "$cross_compiling" = yes; then
20633   ol_cv_c_upper_lower=safe
20634 else
20635   cat > conftest.$ac_ext <<EOF
20636 #line 20637 "configure"
20637 #include "confdefs.h"
20638
20639 #include <ctype.h>
20640 main()
20641 {
20642         if ('C' == toupper('C'))
20643                 exit(0);
20644         else
20645                 exit(1);
20646 }
20647 EOF
20648 if { (eval echo configure:20649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20649 then
20650   ol_cv_c_upper_lower=no
20651 else
20652   echo "configure: failed program was:" >&5
20653   cat conftest.$ac_ext >&5
20654   rm -fr conftest*
20655   ol_cv_c_upper_lower=yes
20656 fi
20657 rm -fr conftest*
20658 fi
20659
20660 fi
20661
20662 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
20663 if test $ol_cv_c_upper_lower != no ; then
20664         cat >> confdefs.h <<\EOF
20665 #define C_UPPER_LOWER 1
20666 EOF
20667
20668 fi
20669
20670 echo $ac_n "checking for working const""... $ac_c" 1>&6
20671 echo "configure:20672: checking for working const" >&5
20672 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
20673   echo $ac_n "(cached) $ac_c" 1>&6
20674 else
20675   cat > conftest.$ac_ext <<EOF
20676 #line 20677 "configure"
20677 #include "confdefs.h"
20678
20679 int main() {
20680
20681 /* Ultrix mips cc rejects this.  */
20682 typedef int charset[2]; const charset x;
20683 /* SunOS 4.1.1 cc rejects this.  */
20684 char const *const *ccp;
20685 char **p;
20686 /* NEC SVR4.0.2 mips cc rejects this.  */
20687 struct point {int x, y;};
20688 static struct point const zero = {0,0};
20689 /* AIX XL C 1.02.0.0 rejects this.
20690    It does not let you subtract one const X* pointer from another in an arm
20691    of an if-expression whose if-part is not a constant expression */
20692 const char *g = "string";
20693 ccp = &g + (g ? g-g : 0);
20694 /* HPUX 7.0 cc rejects these. */
20695 ++ccp;
20696 p = (char**) ccp;
20697 ccp = (char const *const *) p;
20698 { /* SCO 3.2v4 cc rejects this.  */
20699   char *t;
20700   char const *s = 0 ? (char *) 0 : (char const *) 0;
20701
20702   *t++ = 0;
20703 }
20704 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20705   int x[] = {25, 17};
20706   const int *foo = &x[0];
20707   ++foo;
20708 }
20709 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20710   typedef const int *iptr;
20711   iptr p = 0;
20712   ++p;
20713 }
20714 { /* AIX XL C 1.02.0.0 rejects this saying
20715      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20716   struct s { int j; const int *ap[3]; };
20717   struct s *b; b->j = 5;
20718 }
20719 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20720   const int foo = 10;
20721 }
20722
20723 ; return 0; }
20724 EOF
20725 if { (eval echo configure:20726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20726   rm -rf conftest*
20727   ac_cv_c_const=yes
20728 else
20729   echo "configure: failed program was:" >&5
20730   cat conftest.$ac_ext >&5
20731   rm -rf conftest*
20732   ac_cv_c_const=no
20733 fi
20734 rm -f conftest*
20735 fi
20736
20737 echo "$ac_t""$ac_cv_c_const" 1>&6
20738 if test $ac_cv_c_const = no; then
20739   cat >> confdefs.h <<\EOF
20740 #define const 
20741 EOF
20742
20743 fi
20744
20745 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
20746 echo "configure:20747: checking if compiler understands volatile" >&5
20747 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
20748   echo $ac_n "(cached) $ac_c" 1>&6
20749 else
20750   cat > conftest.$ac_ext <<EOF
20751 #line 20752 "configure"
20752 #include "confdefs.h"
20753 int x, y, z;
20754 int main() {
20755 volatile int a; int * volatile b = x ? &y : &z;
20756       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
20757       *b = 0;
20758 ; return 0; }
20759 EOF
20760 if { (eval echo configure:20761: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20761   rm -rf conftest*
20762   ol_cv_c_volatile=yes
20763 else
20764   echo "configure: failed program was:" >&5
20765   cat conftest.$ac_ext >&5
20766   rm -rf conftest*
20767   ol_cv_c_volatile=no
20768 fi
20769 rm -f conftest*
20770 fi
20771
20772 echo "$ac_t""$ol_cv_c_volatile" 1>&6
20773   if test $ol_cv_c_volatile = yes; then
20774     : 
20775   else
20776     cat >> confdefs.h <<\EOF
20777 #define volatile 
20778 EOF
20779
20780   fi
20781  
20782
20783 if test $cross_compiling = yes ; then
20784         cat >> confdefs.h <<\EOF
20785 #define CROSS_COMPILING 1
20786 EOF
20787
20788 else
20789         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
20790 echo "configure:20791: checking whether byte ordering is bigendian" >&5
20791 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
20792   echo $ac_n "(cached) $ac_c" 1>&6
20793 else
20794   ac_cv_c_bigendian=unknown
20795 # See if sys/param.h defines the BYTE_ORDER macro.
20796 cat > conftest.$ac_ext <<EOF
20797 #line 20798 "configure"
20798 #include "confdefs.h"
20799 #include <sys/types.h>
20800 #include <sys/param.h>
20801 int main() {
20802
20803 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
20804  bogus endian macros
20805 #endif
20806 ; return 0; }
20807 EOF
20808 if { (eval echo configure:20809: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20809   rm -rf conftest*
20810   # It does; now see whether it defined to BIG_ENDIAN or not.
20811 cat > conftest.$ac_ext <<EOF
20812 #line 20813 "configure"
20813 #include "confdefs.h"
20814 #include <sys/types.h>
20815 #include <sys/param.h>
20816 int main() {
20817
20818 #if BYTE_ORDER != BIG_ENDIAN
20819  not big endian
20820 #endif
20821 ; return 0; }
20822 EOF
20823 if { (eval echo configure:20824: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20824   rm -rf conftest*
20825   ac_cv_c_bigendian=yes
20826 else
20827   echo "configure: failed program was:" >&5
20828   cat conftest.$ac_ext >&5
20829   rm -rf conftest*
20830   ac_cv_c_bigendian=no
20831 fi
20832 rm -f conftest*
20833 else
20834   echo "configure: failed program was:" >&5
20835   cat conftest.$ac_ext >&5
20836 fi
20837 rm -f conftest*
20838 if test $ac_cv_c_bigendian = unknown; then
20839 if test "$cross_compiling" = yes; then
20840     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
20841 else
20842   cat > conftest.$ac_ext <<EOF
20843 #line 20844 "configure"
20844 #include "confdefs.h"
20845 main () {
20846   /* Are we little or big endian?  From Harbison&Steele.  */
20847   union
20848   {
20849     long l;
20850     char c[sizeof (long)];
20851   } u;
20852   u.l = 1;
20853   exit (u.c[sizeof (long) - 1] == 1);
20854 }
20855 EOF
20856 if { (eval echo configure:20857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20857 then
20858   ac_cv_c_bigendian=no
20859 else
20860   echo "configure: failed program was:" >&5
20861   cat conftest.$ac_ext >&5
20862   rm -fr conftest*
20863   ac_cv_c_bigendian=yes
20864 fi
20865 rm -fr conftest*
20866 fi
20867
20868 fi
20869 fi
20870
20871 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
20872 if test $ac_cv_c_bigendian = yes; then
20873   cat >> confdefs.h <<\EOF
20874 #define WORDS_BIGENDIAN 1
20875 EOF
20876
20877 fi
20878
20879 fi
20880
20881 echo $ac_n "checking size of short""... $ac_c" 1>&6
20882 echo "configure:20883: checking size of short" >&5 
20883 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
20884   echo $ac_n "(cached) $ac_c" 1>&6
20885 else
20886   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20887   cat > conftest.$ac_ext <<EOF
20888 #line 20889 "configure"
20889 #include "confdefs.h"
20890 #include "confdefs.h" 
20891 #include <sys/types.h> 
20892  
20893
20894 int main() {
20895 switch (0) case 0: case (sizeof (short) == $ac_size):;
20896 ; return 0; }
20897 EOF
20898 if { (eval echo configure:20899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20899   rm -rf conftest*
20900   ac_cv_sizeof_short=$ac_size
20901 else
20902   echo "configure: failed program was:" >&5
20903   cat conftest.$ac_ext >&5
20904 fi
20905 rm -f conftest* 
20906   if test x$ac_cv_sizeof_short != x ; then break; fi 
20907 done 
20908
20909 fi
20910  
20911 if test x$ac_cv_sizeof_short = x ; then 
20912   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
20913 fi 
20914 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
20915 cat >> confdefs.h <<EOF
20916 #define SIZEOF_SHORT $ac_cv_sizeof_short
20917 EOF
20918  
20919  
20920 echo $ac_n "checking size of int""... $ac_c" 1>&6
20921 echo "configure:20922: checking size of int" >&5 
20922 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
20923   echo $ac_n "(cached) $ac_c" 1>&6
20924 else
20925   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20926   cat > conftest.$ac_ext <<EOF
20927 #line 20928 "configure"
20928 #include "confdefs.h"
20929 #include "confdefs.h" 
20930 #include <sys/types.h> 
20931  
20932
20933 int main() {
20934 switch (0) case 0: case (sizeof (int) == $ac_size):;
20935 ; return 0; }
20936 EOF
20937 if { (eval echo configure:20938: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20938   rm -rf conftest*
20939   ac_cv_sizeof_int=$ac_size
20940 else
20941   echo "configure: failed program was:" >&5
20942   cat conftest.$ac_ext >&5
20943 fi
20944 rm -f conftest* 
20945   if test x$ac_cv_sizeof_int != x ; then break; fi 
20946 done 
20947
20948 fi
20949  
20950 if test x$ac_cv_sizeof_int = x ; then 
20951   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
20952 fi 
20953 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
20954 cat >> confdefs.h <<EOF
20955 #define SIZEOF_INT $ac_cv_sizeof_int
20956 EOF
20957  
20958  
20959 echo $ac_n "checking size of long""... $ac_c" 1>&6
20960 echo "configure:20961: checking size of long" >&5 
20961 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
20962   echo $ac_n "(cached) $ac_c" 1>&6
20963 else
20964   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
20965   cat > conftest.$ac_ext <<EOF
20966 #line 20967 "configure"
20967 #include "confdefs.h"
20968 #include "confdefs.h" 
20969 #include <sys/types.h> 
20970  
20971
20972 int main() {
20973 switch (0) case 0: case (sizeof (long) == $ac_size):;
20974 ; return 0; }
20975 EOF
20976 if { (eval echo configure:20977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20977   rm -rf conftest*
20978   ac_cv_sizeof_long=$ac_size
20979 else
20980   echo "configure: failed program was:" >&5
20981   cat conftest.$ac_ext >&5
20982 fi
20983 rm -f conftest* 
20984   if test x$ac_cv_sizeof_long != x ; then break; fi 
20985 done 
20986
20987 fi
20988  
20989 if test x$ac_cv_sizeof_long = x ; then 
20990   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
20991 fi 
20992 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
20993 cat >> confdefs.h <<EOF
20994 #define SIZEOF_LONG $ac_cv_sizeof_long
20995 EOF
20996  
20997
20998
20999 if test "$ac_cv_sizeof_int" -lt 4 ; then
21000         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21001
21002         cat >> confdefs.h <<\EOF
21003 #define LBER_INT_T long
21004 EOF
21005
21006 else
21007         cat >> confdefs.h <<\EOF
21008 #define LBER_INT_T int
21009 EOF
21010
21011 fi
21012
21013 cat >> confdefs.h <<\EOF
21014 #define LBER_LEN_T long
21015 EOF
21016
21017 cat >> confdefs.h <<\EOF
21018 #define LBER_SOCKET_T int
21019 EOF
21020
21021 cat >> confdefs.h <<\EOF
21022 #define LBER_TAG_T long
21023 EOF
21024
21025
21026 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21027 echo "configure:21028: checking for 8-bit clean memcmp" >&5
21028 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21029   echo $ac_n "(cached) $ac_c" 1>&6
21030 else
21031   if test "$cross_compiling" = yes; then
21032   ac_cv_func_memcmp_clean=no
21033 else
21034   cat > conftest.$ac_ext <<EOF
21035 #line 21036 "configure"
21036 #include "confdefs.h"
21037
21038 main()
21039 {
21040   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21041   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21042 }
21043
21044 EOF
21045 if { (eval echo configure:21046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21046 then
21047   ac_cv_func_memcmp_clean=yes
21048 else
21049   echo "configure: failed program was:" >&5
21050   cat conftest.$ac_ext >&5
21051   rm -fr conftest*
21052   ac_cv_func_memcmp_clean=no
21053 fi
21054 rm -fr conftest*
21055 fi
21056
21057 fi
21058
21059 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21060 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21061
21062 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21063 echo "configure:21064: checking for strftime" >&5
21064 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21065   echo $ac_n "(cached) $ac_c" 1>&6
21066 else
21067   cat > conftest.$ac_ext <<EOF
21068 #line 21069 "configure"
21069 #include "confdefs.h"
21070 /* System header to define __stub macros and hopefully few prototypes,
21071     which can conflict with char strftime(); below.  */
21072 #include <assert.h>
21073 /* Override any gcc2 internal prototype to avoid an error.  */
21074 /* We use char because int might match the return type of a gcc2
21075     builtin and then its argument prototype would still apply.  */
21076 char strftime();
21077 char (*f)();
21078
21079 int main() {
21080
21081 /* The GNU C library defines this for functions which it implements
21082     to always fail with ENOSYS.  Some functions are actually named
21083     something starting with __ and the normal name is an alias.  */
21084 #if defined (__stub_strftime) || defined (__stub___strftime)
21085 choke me
21086 #else
21087 f = strftime;
21088 #endif
21089
21090 ; return 0; }
21091 EOF
21092 if { (eval echo configure:21093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21093   rm -rf conftest*
21094   eval "ac_cv_func_strftime=yes"
21095 else
21096   echo "configure: failed program was:" >&5
21097   cat conftest.$ac_ext >&5
21098   rm -rf conftest*
21099   eval "ac_cv_func_strftime=no"
21100 fi
21101 rm -f conftest*
21102 fi
21103
21104 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21105   echo "$ac_t""yes" 1>&6
21106   cat >> confdefs.h <<\EOF
21107 #define HAVE_STRFTIME 1
21108 EOF
21109
21110 else
21111   echo "$ac_t""no" 1>&6
21112 # strftime is in -lintl on SCO UNIX.
21113 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21114 echo "configure:21115: checking for strftime in -lintl" >&5
21115 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21116 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21117   echo $ac_n "(cached) $ac_c" 1>&6
21118 else
21119   ac_save_LIBS="$LIBS"
21120 LIBS="-lintl  $LIBS"
21121 cat > conftest.$ac_ext <<EOF
21122 #line 21123 "configure"
21123 #include "confdefs.h"
21124 /* Override any gcc2 internal prototype to avoid an error.  */
21125 /* We use char because int might match the return type of a gcc2
21126     builtin and then its argument prototype would still apply.  */
21127 char strftime();
21128
21129 int main() {
21130 strftime()
21131 ; return 0; }
21132 EOF
21133 if { (eval echo configure:21134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21134   rm -rf conftest*
21135   eval "ac_cv_lib_$ac_lib_var=yes"
21136 else
21137   echo "configure: failed program was:" >&5
21138   cat conftest.$ac_ext >&5
21139   rm -rf conftest*
21140   eval "ac_cv_lib_$ac_lib_var=no"
21141 fi
21142 rm -f conftest*
21143 LIBS="$ac_save_LIBS"
21144
21145 fi
21146 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21147   echo "$ac_t""yes" 1>&6
21148   cat >> confdefs.h <<\EOF
21149 #define HAVE_STRFTIME 1
21150 EOF
21151
21152 LIBS="-lintl $LIBS"
21153 else
21154   echo "$ac_t""no" 1>&6
21155 fi
21156
21157 fi
21158
21159
21160 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21161 echo "configure:21162: checking for inet_aton()" >&5
21162 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21163   echo $ac_n "(cached) $ac_c" 1>&6
21164 else
21165   cat > conftest.$ac_ext <<EOF
21166 #line 21167 "configure"
21167 #include "confdefs.h"
21168
21169 #ifdef HAVE_SYS_TYPES_H
21170 #       include <sys/types.h>
21171 #endif
21172 #ifdef HAVE_SYS_SOCKET_H
21173 #       include <sys/socket.h>
21174 #       ifdef HAVE_SYS_SELECT_H
21175 #               include <sys/select.h>
21176 #       endif
21177 #       include <netinet/in.h>
21178 #       ifdef HAVE_ARPA_INET_H
21179 #               include <arpa/inet.h>
21180 #       endif
21181 #endif
21182
21183 int main() {
21184 struct in_addr in;
21185 int rc = inet_aton( "255.255.255.255", &in );
21186 ; return 0; }
21187 EOF
21188 if { (eval echo configure:21189: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21189   rm -rf conftest*
21190   ol_cv_func_inet_aton=yes
21191 else
21192   echo "configure: failed program was:" >&5
21193   cat conftest.$ac_ext >&5
21194   rm -rf conftest*
21195   ol_cv_func_inet_aton=no
21196 fi
21197 rm -f conftest*
21198 fi
21199
21200 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21201   if test $ol_cv_func_inet_aton != no; then
21202     cat >> confdefs.h <<\EOF
21203 #define HAVE_INET_ATON 1
21204 EOF
21205
21206   fi
21207  
21208
21209 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21210 echo "configure:21211: checking for _spawnlp" >&5
21211 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21212   echo $ac_n "(cached) $ac_c" 1>&6
21213 else
21214   cat > conftest.$ac_ext <<EOF
21215 #line 21216 "configure"
21216 #include "confdefs.h"
21217 /* System header to define __stub macros and hopefully few prototypes,
21218     which can conflict with char _spawnlp(); below.  */
21219 #include <assert.h>
21220 /* Override any gcc2 internal prototype to avoid an error.  */
21221 /* We use char because int might match the return type of a gcc2
21222     builtin and then its argument prototype would still apply.  */
21223 char _spawnlp();
21224 char (*f)();
21225
21226 int main() {
21227
21228 /* The GNU C library defines this for functions which it implements
21229     to always fail with ENOSYS.  Some functions are actually named
21230     something starting with __ and the normal name is an alias.  */
21231 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21232 choke me
21233 #else
21234 f = _spawnlp;
21235 #endif
21236
21237 ; return 0; }
21238 EOF
21239 if { (eval echo configure:21240: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21240   rm -rf conftest*
21241   eval "ac_cv_func__spawnlp=yes"
21242 else
21243   echo "configure: failed program was:" >&5
21244   cat conftest.$ac_ext >&5
21245   rm -rf conftest*
21246   eval "ac_cv_func__spawnlp=no"
21247 fi
21248 rm -f conftest*
21249 fi
21250
21251 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21252   echo "$ac_t""yes" 1>&6
21253   cat >> confdefs.h <<\EOF
21254 #define HAVE_SPAWNLP 1
21255 EOF
21256
21257 else
21258   echo "$ac_t""no" 1>&6
21259 fi
21260
21261
21262 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21263 echo "configure:21264: checking for _snprintf" >&5
21264 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21265   echo $ac_n "(cached) $ac_c" 1>&6
21266 else
21267   cat > conftest.$ac_ext <<EOF
21268 #line 21269 "configure"
21269 #include "confdefs.h"
21270 /* System header to define __stub macros and hopefully few prototypes,
21271     which can conflict with char _snprintf(); below.  */
21272 #include <assert.h>
21273 /* Override any gcc2 internal prototype to avoid an error.  */
21274 /* We use char because int might match the return type of a gcc2
21275     builtin and then its argument prototype would still apply.  */
21276 char _snprintf();
21277 char (*f)();
21278
21279 int main() {
21280
21281 /* The GNU C library defines this for functions which it implements
21282     to always fail with ENOSYS.  Some functions are actually named
21283     something starting with __ and the normal name is an alias.  */
21284 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21285 choke me
21286 #else
21287 f = _snprintf;
21288 #endif
21289
21290 ; return 0; }
21291 EOF
21292 if { (eval echo configure:21293: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21293   rm -rf conftest*
21294   eval "ac_cv_func__snprintf=yes"
21295 else
21296   echo "configure: failed program was:" >&5
21297   cat conftest.$ac_ext >&5
21298   rm -rf conftest*
21299   eval "ac_cv_func__snprintf=no"
21300 fi
21301 rm -f conftest*
21302 fi
21303
21304 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21305   echo "$ac_t""yes" 1>&6
21306   ac_cv_func_snprintf=yes
21307         cat >> confdefs.h <<\EOF
21308 #define snprintf _snprintf
21309 EOF
21310
21311
21312 else
21313   echo "$ac_t""no" 1>&6
21314 fi
21315
21316
21317 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21318 echo "configure:21319: checking for _vsnprintf" >&5
21319 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21320   echo $ac_n "(cached) $ac_c" 1>&6
21321 else
21322   cat > conftest.$ac_ext <<EOF
21323 #line 21324 "configure"
21324 #include "confdefs.h"
21325 /* System header to define __stub macros and hopefully few prototypes,
21326     which can conflict with char _vsnprintf(); below.  */
21327 #include <assert.h>
21328 /* Override any gcc2 internal prototype to avoid an error.  */
21329 /* We use char because int might match the return type of a gcc2
21330     builtin and then its argument prototype would still apply.  */
21331 char _vsnprintf();
21332 char (*f)();
21333
21334 int main() {
21335
21336 /* The GNU C library defines this for functions which it implements
21337     to always fail with ENOSYS.  Some functions are actually named
21338     something starting with __ and the normal name is an alias.  */
21339 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21340 choke me
21341 #else
21342 f = _vsnprintf;
21343 #endif
21344
21345 ; return 0; }
21346 EOF
21347 if { (eval echo configure:21348: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21348   rm -rf conftest*
21349   eval "ac_cv_func__vsnprintf=yes"
21350 else
21351   echo "configure: failed program was:" >&5
21352   cat conftest.$ac_ext >&5
21353   rm -rf conftest*
21354   eval "ac_cv_func__vsnprintf=no"
21355 fi
21356 rm -f conftest*
21357 fi
21358
21359 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21360   echo "$ac_t""yes" 1>&6
21361   ac_cv_func_vsnprintf=yes
21362         cat >> confdefs.h <<\EOF
21363 #define vsnprintf _vsnprintf
21364 EOF
21365
21366
21367 else
21368   echo "$ac_t""no" 1>&6
21369 fi
21370
21371
21372 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21373 echo "configure:21374: checking for vprintf" >&5
21374 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21375   echo $ac_n "(cached) $ac_c" 1>&6
21376 else
21377   cat > conftest.$ac_ext <<EOF
21378 #line 21379 "configure"
21379 #include "confdefs.h"
21380 /* System header to define __stub macros and hopefully few prototypes,
21381     which can conflict with char vprintf(); below.  */
21382 #include <assert.h>
21383 /* Override any gcc2 internal prototype to avoid an error.  */
21384 /* We use char because int might match the return type of a gcc2
21385     builtin and then its argument prototype would still apply.  */
21386 char vprintf();
21387 char (*f)();
21388
21389 int main() {
21390
21391 /* The GNU C library defines this for functions which it implements
21392     to always fail with ENOSYS.  Some functions are actually named
21393     something starting with __ and the normal name is an alias.  */
21394 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21395 choke me
21396 #else
21397 f = vprintf;
21398 #endif
21399
21400 ; return 0; }
21401 EOF
21402 if { (eval echo configure:21403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21403   rm -rf conftest*
21404   eval "ac_cv_func_vprintf=yes"
21405 else
21406   echo "configure: failed program was:" >&5
21407   cat conftest.$ac_ext >&5
21408   rm -rf conftest*
21409   eval "ac_cv_func_vprintf=no"
21410 fi
21411 rm -f conftest*
21412 fi
21413
21414 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21415   echo "$ac_t""yes" 1>&6
21416   cat >> confdefs.h <<\EOF
21417 #define HAVE_VPRINTF 1
21418 EOF
21419
21420 else
21421   echo "$ac_t""no" 1>&6
21422 fi
21423
21424 if test "$ac_cv_func_vprintf" != yes; then
21425 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21426 echo "configure:21427: checking for _doprnt" >&5
21427 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21428   echo $ac_n "(cached) $ac_c" 1>&6
21429 else
21430   cat > conftest.$ac_ext <<EOF
21431 #line 21432 "configure"
21432 #include "confdefs.h"
21433 /* System header to define __stub macros and hopefully few prototypes,
21434     which can conflict with char _doprnt(); below.  */
21435 #include <assert.h>
21436 /* Override any gcc2 internal prototype to avoid an error.  */
21437 /* We use char because int might match the return type of a gcc2
21438     builtin and then its argument prototype would still apply.  */
21439 char _doprnt();
21440 char (*f)();
21441
21442 int main() {
21443
21444 /* The GNU C library defines this for functions which it implements
21445     to always fail with ENOSYS.  Some functions are actually named
21446     something starting with __ and the normal name is an alias.  */
21447 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21448 choke me
21449 #else
21450 f = _doprnt;
21451 #endif
21452
21453 ; return 0; }
21454 EOF
21455 if { (eval echo configure:21456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21456   rm -rf conftest*
21457   eval "ac_cv_func__doprnt=yes"
21458 else
21459   echo "configure: failed program was:" >&5
21460   cat conftest.$ac_ext >&5
21461   rm -rf conftest*
21462   eval "ac_cv_func__doprnt=no"
21463 fi
21464 rm -f conftest*
21465 fi
21466
21467 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21468   echo "$ac_t""yes" 1>&6
21469   cat >> confdefs.h <<\EOF
21470 #define HAVE_DOPRNT 1
21471 EOF
21472
21473 else
21474   echo "$ac_t""no" 1>&6
21475 fi
21476
21477 fi
21478
21479
21480 if test $ac_cv_func_vprintf = yes ; then
21481                 for ac_func in vsnprintf vsprintf
21482 do
21483 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21484 echo "configure:21485: checking for $ac_func" >&5
21485 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21486   echo $ac_n "(cached) $ac_c" 1>&6
21487 else
21488   cat > conftest.$ac_ext <<EOF
21489 #line 21490 "configure"
21490 #include "confdefs.h"
21491 /* System header to define __stub macros and hopefully few prototypes,
21492     which can conflict with char $ac_func(); below.  */
21493 #include <assert.h>
21494 /* Override any gcc2 internal prototype to avoid an error.  */
21495 /* We use char because int might match the return type of a gcc2
21496     builtin and then its argument prototype would still apply.  */
21497 char $ac_func();
21498 char (*f)();
21499
21500 int main() {
21501
21502 /* The GNU C library defines this for functions which it implements
21503     to always fail with ENOSYS.  Some functions are actually named
21504     something starting with __ and the normal name is an alias.  */
21505 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21506 choke me
21507 #else
21508 f = $ac_func;
21509 #endif
21510
21511 ; return 0; }
21512 EOF
21513 if { (eval echo configure:21514: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21514   rm -rf conftest*
21515   eval "ac_cv_func_$ac_func=yes"
21516 else
21517   echo "configure: failed program was:" >&5
21518   cat conftest.$ac_ext >&5
21519   rm -rf conftest*
21520   eval "ac_cv_func_$ac_func=no"
21521 fi
21522 rm -f conftest*
21523 fi
21524
21525 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21526   echo "$ac_t""yes" 1>&6
21527     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21528   cat >> confdefs.h <<EOF
21529 #define $ac_tr_func 1
21530 EOF
21531  
21532 else
21533   echo "$ac_t""no" 1>&6
21534 fi
21535 done
21536
21537 fi
21538
21539 for ac_func in \
21540         bcopy                   \
21541         closesocket             \
21542         chroot                  \
21543         endgrent                \
21544         endpwent                \
21545         fcntl                   \
21546         flock                   \
21547         getdtablesize   \
21548         getgrgid                \
21549         gethostname             \
21550         getpass                 \
21551         getpassphrase   \
21552         getpwuid                \
21553         getpwnam                \
21554         getspnam                \
21555         gettimeofday    \
21556         initgroups              \
21557         lockf                   \
21558         memcpy                  \
21559         memmove                 \
21560         mkstemp                 \
21561         mktemp                  \
21562         pipe                    \
21563         read                    \
21564         recv                    \
21565         recvfrom                \
21566         setpwfile               \
21567         setgid                  \
21568         setegid                 \
21569         setsid                  \
21570         setuid                  \
21571         seteuid                 \
21572         sigaction               \
21573         signal                  \
21574         sigset                  \
21575         strdup                  \
21576         strerror                \
21577         strpbrk                 \
21578         strrchr                 \
21579         strsep                  \
21580         strstr                  \
21581         strtol                  \
21582         strtoul                 \
21583         strspn                  \
21584         sysconf                 \
21585         usleep                  \
21586         waitpid                 \
21587         wait4                   \
21588         write                   \
21589         send                    \
21590         sendto                  \
21591
21592 do
21593 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21594 echo "configure:21595: checking for $ac_func" >&5
21595 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21596   echo $ac_n "(cached) $ac_c" 1>&6
21597 else
21598   cat > conftest.$ac_ext <<EOF
21599 #line 21600 "configure"
21600 #include "confdefs.h"
21601 /* System header to define __stub macros and hopefully few prototypes,
21602     which can conflict with char $ac_func(); below.  */
21603 #include <assert.h>
21604 /* Override any gcc2 internal prototype to avoid an error.  */
21605 /* We use char because int might match the return type of a gcc2
21606     builtin and then its argument prototype would still apply.  */
21607 char $ac_func();
21608 char (*f)();
21609
21610 int main() {
21611
21612 /* The GNU C library defines this for functions which it implements
21613     to always fail with ENOSYS.  Some functions are actually named
21614     something starting with __ and the normal name is an alias.  */
21615 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21616 choke me
21617 #else
21618 f = $ac_func;
21619 #endif
21620
21621 ; return 0; }
21622 EOF
21623 if { (eval echo configure:21624: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21624   rm -rf conftest*
21625   eval "ac_cv_func_$ac_func=yes"
21626 else
21627   echo "configure: failed program was:" >&5
21628   cat conftest.$ac_ext >&5
21629   rm -rf conftest*
21630   eval "ac_cv_func_$ac_func=no"
21631 fi
21632 rm -f conftest*
21633 fi
21634
21635 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21636   echo "$ac_t""yes" 1>&6
21637     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21638   cat >> confdefs.h <<EOF
21639 #define $ac_tr_func 1
21640 EOF
21641  
21642 else
21643   echo "$ac_t""no" 1>&6
21644 fi
21645 done
21646
21647
21648 for ac_func in getopt
21649 do
21650 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21651 echo "configure:21652: checking for $ac_func" >&5
21652 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21653   echo $ac_n "(cached) $ac_c" 1>&6
21654 else
21655   cat > conftest.$ac_ext <<EOF
21656 #line 21657 "configure"
21657 #include "confdefs.h"
21658 /* System header to define __stub macros and hopefully few prototypes,
21659     which can conflict with char $ac_func(); below.  */
21660 #include <assert.h>
21661 /* Override any gcc2 internal prototype to avoid an error.  */
21662 /* We use char because int might match the return type of a gcc2
21663     builtin and then its argument prototype would still apply.  */
21664 char $ac_func();
21665 char (*f)();
21666
21667 int main() {
21668
21669 /* The GNU C library defines this for functions which it implements
21670     to always fail with ENOSYS.  Some functions are actually named
21671     something starting with __ and the normal name is an alias.  */
21672 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21673 choke me
21674 #else
21675 f = $ac_func;
21676 #endif
21677
21678 ; return 0; }
21679 EOF
21680 if { (eval echo configure:21681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21681   rm -rf conftest*
21682   eval "ac_cv_func_$ac_func=yes"
21683 else
21684   echo "configure: failed program was:" >&5
21685   cat conftest.$ac_ext >&5
21686   rm -rf conftest*
21687   eval "ac_cv_func_$ac_func=no"
21688 fi
21689 rm -f conftest*
21690 fi
21691
21692 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21693   echo "$ac_t""yes" 1>&6
21694     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21695   cat >> confdefs.h <<EOF
21696 #define $ac_tr_func 1
21697 EOF
21698  
21699 else
21700   echo "$ac_t""no" 1>&6
21701 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
21702 fi
21703 done
21704
21705
21706
21707 if test "$ac_cv_func_getopt" != yes; then
21708         LIBSRCS="$LIBSRCS getopt.c"
21709 fi
21710
21711 # Check Configuration
21712 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
21713 echo "configure:21714: checking declaration of sys_errlist" >&5
21714 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
21715   echo $ac_n "(cached) $ac_c" 1>&6
21716 else
21717   
21718         cat > conftest.$ac_ext <<EOF
21719 #line 21720 "configure"
21720 #include "confdefs.h"
21721
21722 #include <stdio.h>
21723 #include <sys/types.h>
21724 #include <errno.h>
21725 #ifdef WINNT
21726 #include <stdlib.h>
21727 #endif 
21728 int main() {
21729 char *c = (char *) *sys_errlist
21730 ; return 0; }
21731 EOF
21732 if { (eval echo configure:21733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21733   rm -rf conftest*
21734   ol_cv_dcl_sys_errlist=yes
21735         ol_cv_have_sys_errlist=yes
21736 else
21737   echo "configure: failed program was:" >&5
21738   cat conftest.$ac_ext >&5
21739   rm -rf conftest*
21740   ol_cv_dcl_sys_errlist=no
21741 fi
21742 rm -f conftest*
21743 fi
21744
21745 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
21746 #
21747 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
21748 if test $ol_cv_dcl_sys_errlist = no ; then
21749         cat >> confdefs.h <<\EOF
21750 #define DECL_SYS_ERRLIST 1
21751 EOF
21752
21753
21754         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
21755 echo "configure:21756: checking existence of sys_errlist" >&5
21756 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
21757   echo $ac_n "(cached) $ac_c" 1>&6
21758 else
21759   
21760                 cat > conftest.$ac_ext <<EOF
21761 #line 21762 "configure"
21762 #include "confdefs.h"
21763 #include <errno.h>
21764 int main() {
21765 char *c = (char *) *sys_errlist
21766 ; return 0; }
21767 EOF
21768 if { (eval echo configure:21769: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21769   rm -rf conftest*
21770   ol_cv_have_sys_errlist=yes
21771 else
21772   echo "configure: failed program was:" >&5
21773   cat conftest.$ac_ext >&5
21774   rm -rf conftest*
21775   ol_cv_have_sys_errlist=no
21776 fi
21777 rm -f conftest*
21778 fi
21779
21780 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
21781 fi
21782 if test $ol_cv_have_sys_errlist = yes ; then
21783         cat >> confdefs.h <<\EOF
21784 #define HAVE_SYS_ERRLIST 1
21785 EOF
21786
21787 fi
21788
21789
21790
21791 if test "$ol_enable_debug" != no ; then
21792         cat >> confdefs.h <<\EOF
21793 #define LDAP_DEBUG 1
21794 EOF
21795
21796 fi
21797 if test "$ol_enable_syslog" = yes ; then
21798         cat >> confdefs.h <<\EOF
21799 #define LDAP_SYSLOG 1
21800 EOF
21801
21802 fi
21803 if test "$ol_enable_cache" = no ; then
21804         cat >> confdefs.h <<\EOF
21805 #define LDAP_NOCACHE 1
21806 EOF
21807
21808 fi
21809 if test "$ol_link_kbind" != no ; then
21810         cat >> confdefs.h <<\EOF
21811 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
21812 EOF
21813
21814 fi
21815 if test "$ol_enable_proctitle" != no ; then
21816         cat >> confdefs.h <<\EOF
21817 #define LDAP_PROCTITLE 1
21818 EOF
21819
21820 fi
21821 if test "$ol_enable_referrals" != no ; then
21822         cat >> confdefs.h <<\EOF
21823 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
21824 EOF
21825
21826 fi
21827 if test "$ol_enable_local" != no; then
21828         cat >> confdefs.h <<\EOF
21829 #define LDAP_PF_LOCAL 1
21830 EOF
21831
21832 fi
21833 if test "$ol_link_ipv6" != no; then
21834         cat >> confdefs.h <<\EOF
21835 #define LDAP_PF_INET6 1
21836 EOF
21837
21838 fi
21839 if test "$ol_enable_cleartext" != no ; then
21840         cat >> confdefs.h <<\EOF
21841 #define SLAPD_CLEARTEXT 1
21842 EOF
21843
21844 fi
21845 if test "$ol_enable_crypt" != no ; then
21846         cat >> confdefs.h <<\EOF
21847 #define SLAPD_CRYPT 1
21848 EOF
21849
21850 fi
21851 if test "$ol_link_kpasswd" != no ; then
21852         cat >> confdefs.h <<\EOF
21853 #define SLAPD_KPASSWD 1
21854 EOF
21855
21856 fi
21857 if test "$ol_link_spasswd" != no ; then
21858         cat >> confdefs.h <<\EOF
21859 #define SLAPD_SPASSWD 1
21860 EOF
21861
21862 fi
21863 if test "$ol_enable_phonetic" != no ; then
21864         cat >> confdefs.h <<\EOF
21865 #define SLAPD_PHONETIC 1
21866 EOF
21867
21868 fi
21869 if test "$ol_enable_rlookups" != no ; then
21870         cat >> confdefs.h <<\EOF
21871 #define SLAPD_RLOOKUPS 1
21872 EOF
21873
21874 fi
21875 if test "$ol_enable_aci" != no ; then
21876         cat >> confdefs.h <<\EOF
21877 #define SLAPD_ACI_ENABLED 1
21878 EOF
21879
21880 fi
21881
21882 if test "$ol_link_modules" != no ; then
21883         cat >> confdefs.h <<\EOF
21884 #define SLAPD_MODULES 1
21885 EOF
21886
21887         BUILD_SLAPD=yes
21888         SLAPD_MODULES_LDFLAGS="-dlopen self"
21889 fi
21890
21891 if test "$ol_enable_bdb" != no ; then
21892         cat >> confdefs.h <<\EOF
21893 #define SLAPD_BDB 1
21894 EOF
21895
21896         BUILD_SLAPD=yes
21897         BUILD_BDB=yes
21898         if test "$ol_with_bdb_module" != static ; then
21899                 cat >> confdefs.h <<\EOF
21900 #define SLAPD_BDB_DYNAMIC 1
21901 EOF
21902
21903                 BUILD_BDB=mod
21904                 BUILD_BDB_DYNAMIC=shared
21905                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
21906                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
21907         else
21908                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
21909         fi
21910 fi
21911
21912 if test "$ol_link_dnssrv" != no ; then
21913         cat >> confdefs.h <<\EOF
21914 #define SLAPD_DNSSRV 1
21915 EOF
21916
21917         BUILD_SLAPD=yes
21918         BUILD_DNSSRV=yes
21919         if test "$ol_with_dnssrv_module" != static ; then
21920                 cat >> confdefs.h <<\EOF
21921 #define SLAPD_DNSSRV_DYNAMIC 1
21922 EOF
21923
21924                 BUILD_DNSSRV=mod
21925                 BUILD_DNSSRV_DYNAMIC=shared
21926                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
21927                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
21928         else
21929                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
21930         fi
21931 fi
21932
21933 if test "$ol_enable_ldap" != no ; then
21934         cat >> confdefs.h <<\EOF
21935 #define SLAPD_LDAP 1
21936 EOF
21937
21938         BUILD_SLAPD=yes
21939         BUILD_LDAP=yes
21940         if test "$ol_with_ldap_module" != static ; then
21941                 cat >> confdefs.h <<\EOF
21942 #define SLAPD_LDAP_DYNAMIC 1
21943 EOF
21944
21945                 BUILD_LDAP=mod
21946                 BUILD_LDAP_DYNAMIC=shared
21947                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
21948                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
21949         else
21950                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
21951         fi
21952 fi
21953
21954 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
21955         cat >> confdefs.h <<\EOF
21956 #define SLAPD_LDBM 1
21957 EOF
21958
21959         BUILD_SLAPD=yes
21960         BUILD_LDBM=yes
21961         LDBM_LIB="-lldbm"
21962         if test "$ol_with_ldbm_module" != static ; then
21963                 cat >> confdefs.h <<\EOF
21964 #define SLAPD_LDBM_DYNAMIC 1
21965 EOF
21966
21967                 BUILD_LDBM=mod
21968                 BUILD_LDBM_DYNAMIC=shared
21969                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
21970                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
21971         else
21972                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
21973         fi
21974 fi
21975
21976 if test "$ol_enable_meta" != no ; then
21977         if test "$ol_enable_ldap" = no ; then
21978                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
21979         fi
21980         if test "$ol_enable_rewrite" = no ; then
21981                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
21982         fi
21983         cat >> confdefs.h <<\EOF
21984 #define SLAPD_META 1
21985 EOF
21986
21987         BUILD_SLAPD=yes
21988         BUILD_META=yes
21989         if test "$ol_with_meta_module" != static ; then
21990                 cat >> confdefs.h <<\EOF
21991 #define SLAPD_META_DYNAMIC 1
21992 EOF
21993
21994                 BUILD_META=mod
21995                 BUILD_META_DYNAMIC=shared
21996                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
21997                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
21998         else
21999                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22000         fi
22001 fi
22002
22003 if test "$ol_enable_monitor" != no ; then
22004         cat >> confdefs.h <<\EOF
22005 #define SLAPD_MONITOR 1
22006 EOF
22007
22008         BUILD_SLAPD=yes
22009         BUILD_MONITOR=yes
22010         if test "$ol_with_monitor_module" != static ; then
22011                 cat >> confdefs.h <<\EOF
22012 #define SLAPD_MONITOR_DYNAMIC 1
22013 EOF
22014
22015                 BUILD_MONITOR=mod
22016                 BUILD_MONITOR_DYNAMIC=shared
22017                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la"
22018                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22019         else
22020                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22021         fi
22022 fi
22023
22024 if test "$ol_enable_passwd" != no ; then
22025         cat >> confdefs.h <<\EOF
22026 #define SLAPD_PASSWD 1
22027 EOF
22028
22029         BUILD_SLAPD=yes
22030         BUILD_PASSWD=yes
22031         if test "$ol_with_passwd_module" != static ; then
22032                 cat >> confdefs.h <<\EOF
22033 #define SLAPD_PASSWD_DYNAMIC 1
22034 EOF
22035
22036                 BUILD_PASSWD=mod
22037                 BUILD_PASSWD_DYNAMIC=shared
22038                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
22039                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22040         else
22041                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22042         fi
22043 fi
22044
22045 if test "$ol_link_perl" != no ; then
22046         cat >> confdefs.h <<\EOF
22047 #define SLAPD_PERL 1
22048 EOF
22049
22050         BUILD_SLAPD=yes
22051         BUILD_PERL=yes
22052         if test "$ol_with_perl_module" != static ; then
22053                 cat >> confdefs.h <<\EOF
22054 #define SLAPD_PERL_DYNAMIC 1
22055 EOF
22056
22057                 BUILD_PERL=mod
22058                 BUILD_PERL_DYNAMIC=shared
22059                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
22060                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22061         else
22062                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22063         fi
22064 fi
22065
22066 if test "$ol_enable_shell" != no ; then
22067         cat >> confdefs.h <<\EOF
22068 #define SLAPD_SHELL 1
22069 EOF
22070
22071         BUILD_SLAPD=yes
22072         BUILD_SHELL=yes
22073         if test "$ol_with_shell_module" != static ; then
22074                 cat >> confdefs.h <<\EOF
22075 #define SLAPD_SHELL_DYNAMIC 1
22076 EOF
22077
22078                 BUILD_SHELL=mod
22079                 BUILD_SHELL_DYNAMIC=shared
22080                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
22081                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22082         else
22083                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22084         fi
22085 fi
22086
22087 if test "$ol_enable_tcl" != no ; then
22088         cat >> confdefs.h <<\EOF
22089 #define SLAPD_TCL 1
22090 EOF
22091
22092         BUILD_SLAPD=yes
22093         BUILD_TCL=yes
22094         if test "$ol_with_tcl_module" != static; then
22095                 cat >> confdefs.h <<\EOF
22096 #define SLAPD_TCL_DYNAMIC 1
22097 EOF
22098
22099                 BUILD_TCL=mod
22100                 BUILD_TCL_DYNAMIC=shared
22101                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
22102                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
22103         else
22104                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
22105         fi
22106 fi
22107
22108 if test "$ol_link_sql" != no ; then
22109         cat >> confdefs.h <<\EOF
22110 #define SLAPD_SQL 1
22111 EOF
22112
22113         BUILD_SLAPD=yes
22114         BUILD_SQL=yes
22115         if test "$ol_with_sql_module" != static; then
22116                 cat >> confdefs.h <<\EOF
22117 #define SLAPD_SQL_DYNAMIC 1
22118 EOF
22119
22120                 BUILD_SQL=mod
22121                 BUILD_SQL_DYNAMIC=shared
22122                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
22123                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22124         else
22125                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22126         fi
22127 fi
22128
22129 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22130         $BUILD_SLAPD = yes ; then
22131         BUILD_SLURPD=yes
22132 fi
22133
22134 if test "$ol_enable_rewrite" != no ; then
22135         cat >> confdefs.h <<\EOF
22136 #define ENABLE_REWRITE 1
22137 EOF
22138
22139         BUILD_REWRITE=yes
22140         SLAPD_LIBS="$SLAPD_LIBS -lrewrite"
22141 fi
22142
22143
22144
22145 if test "$ac_cv_mingw32" = yes ; then
22146         PLAT=NT
22147         SLAPD_MODULES_LDFLAGS=
22148         SLAPD_MODULES_LIST=
22149 else
22150         PLAT=UNIX
22151 fi
22152
22153
22154
22155
22156
22157
22158   
22159   
22160   
22161   
22162   
22163   
22164   
22165   
22166   
22167   
22168   
22169   
22170   
22171   
22172   
22173   
22174   
22175   
22176   
22177   
22178   
22179   
22180
22181
22182
22183
22184
22185
22186
22187
22188
22189
22190
22191
22192
22193
22194
22195
22196
22197
22198
22199
22200
22201
22202
22203
22204
22205
22206
22207
22208
22209
22210
22211
22212
22213
22214
22215
22216
22217
22218
22219
22220 # Check whether --with-xxinstall or --without-xxinstall was given.
22221 if test "${with_xxinstall+set}" = set; then
22222   withval="$with_xxinstall"
22223   :
22224 fi
22225
22226
22227
22228 trap '' 1 2 15
22229
22230 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22231
22232 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22233 # Let make expand exec_prefix.
22234 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22235
22236 # Any assignment to VPATH causes Sun make to only execute
22237 # the first set of double-colon rules, so remove it if not needed.
22238 # If there is a colon in the path, we need to keep it.
22239 if test "x$srcdir" = x.; then
22240   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22241 fi
22242
22243 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22244
22245 DEFS=-DHAVE_CONFIG_H
22246
22247 # Without the "./", some shells look in PATH for config.status.
22248 : ${CONFIG_STATUS=./config.status}
22249
22250 echo creating $CONFIG_STATUS
22251 rm -f $CONFIG_STATUS
22252 cat > $CONFIG_STATUS <<EOF
22253 #! /bin/sh
22254 # Generated automatically by configure.
22255 # Run this file to recreate the current configuration.
22256 # This directory was configured as follows,
22257 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22258 #
22259 # $0 $ac_configure_args
22260 #
22261 # Compiler output produced by configure, useful for debugging
22262 # configure, is in ./config.log if it exists.
22263
22264 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22265 for ac_option
22266 do
22267   case "\$ac_option" in
22268   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22269     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22270     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22271   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22272     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22273     exit 0 ;;
22274   -help | --help | --hel | --he | --h)
22275     echo "\$ac_cs_usage"; exit 0 ;;
22276   *) echo "\$ac_cs_usage"; exit 1 ;;
22277   esac
22278 done
22279
22280 ac_given_srcdir=$srcdir
22281 ac_given_INSTALL="$INSTALL"
22282
22283 trap 'rm -fr `echo "\
22284 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22285 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22286 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22287 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22288 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22289 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22290 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22291 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22292 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
22293 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22294 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22295 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22296 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22297 include/Makefile:build/top.mk:include/Makefile.in \
22298 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22299 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22300 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22301 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22302 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22303 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22304 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22305 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22306 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22307 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22308 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22309 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22310 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22311 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22312 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22313 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22314 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22315 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22316 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22317 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22318 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22319 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22320 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22321 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22322 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22323 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22324 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22325 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22326  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22327 EOF
22328 cat >> $CONFIG_STATUS <<EOF
22329
22330 # Protect against being on the right side of a sed subst in config.status.
22331 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22332  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22333 $ac_vpsub
22334 $extrasub
22335 s%@SHELL@%$SHELL%g
22336 s%@CFLAGS@%$CFLAGS%g
22337 s%@CPPFLAGS@%$CPPFLAGS%g
22338 s%@CXXFLAGS@%$CXXFLAGS%g
22339 s%@FFLAGS@%$FFLAGS%g
22340 s%@DEFS@%$DEFS%g
22341 s%@LDFLAGS@%$LDFLAGS%g
22342 s%@LIBS@%$LIBS%g
22343 s%@exec_prefix@%$exec_prefix%g
22344 s%@prefix@%$prefix%g
22345 s%@program_transform_name@%$program_transform_name%g
22346 s%@bindir@%$bindir%g
22347 s%@sbindir@%$sbindir%g
22348 s%@libexecdir@%$libexecdir%g
22349 s%@datadir@%$datadir%g
22350 s%@sysconfdir@%$sysconfdir%g
22351 s%@sharedstatedir@%$sharedstatedir%g
22352 s%@localstatedir@%$localstatedir%g
22353 s%@libdir@%$libdir%g
22354 s%@includedir@%$includedir%g
22355 s%@oldincludedir@%$oldincludedir%g
22356 s%@infodir@%$infodir%g
22357 s%@mandir@%$mandir%g
22358 s%@SHTOOL@%$SHTOOL%g
22359 s%@host@%$host%g
22360 s%@host_alias@%$host_alias%g
22361 s%@host_cpu@%$host_cpu%g
22362 s%@host_vendor@%$host_vendor%g
22363 s%@host_os@%$host_os%g
22364 s%@target@%$target%g
22365 s%@target_alias@%$target_alias%g
22366 s%@target_cpu@%$target_cpu%g
22367 s%@target_vendor@%$target_vendor%g
22368 s%@target_os@%$target_os%g
22369 s%@build@%$build%g
22370 s%@build_alias@%$build_alias%g
22371 s%@build_cpu@%$build_cpu%g
22372 s%@build_vendor@%$build_vendor%g
22373 s%@build_os@%$build_os%g
22374 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22375 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22376 s%@INSTALL_DATA@%$INSTALL_DATA%g
22377 s%@PACKAGE@%$PACKAGE%g
22378 s%@VERSION@%$VERSION%g
22379 s%@ACLOCAL@%$ACLOCAL%g
22380 s%@AUTOCONF@%$AUTOCONF%g
22381 s%@AUTOMAKE@%$AUTOMAKE%g
22382 s%@AUTOHEADER@%$AUTOHEADER%g
22383 s%@MAKEINFO@%$MAKEINFO%g
22384 s%@install_sh@%$install_sh%g
22385 s%@AMTAR@%$AMTAR%g
22386 s%@AWK@%$AWK%g
22387 s%@AMTARFLAGS@%$AMTARFLAGS%g
22388 s%@SET_MAKE@%$SET_MAKE%g
22389 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22390 s%@top_builddir@%$top_builddir%g
22391 s%@ldap_subdir@%$ldap_subdir%g
22392 s%@CC@%$CC%g
22393 s%@AR@%$AR%g
22394 s%@LN_S@%$LN_S%g
22395 s%@OBJEXT@%$OBJEXT%g
22396 s%@EXEEXT@%$EXEEXT%g
22397 s%@ECHO@%$ECHO%g
22398 s%@RANLIB@%$RANLIB%g
22399 s%@STRIP@%$STRIP%g
22400 s%@DLLTOOL@%$DLLTOOL%g
22401 s%@AS@%$AS%g
22402 s%@OBJDUMP@%$OBJDUMP%g
22403 s%@CPP@%$CPP%g
22404 s%@LIBTOOL@%$LIBTOOL%g
22405 s%@LN_H@%$LN_H%g
22406 s%@SENDMAIL@%$SENDMAIL%g
22407 s%@EDITOR@%$EDITOR%g
22408 s%@FINGER@%$FINGER%g
22409 s%@PERLBIN@%$PERLBIN%g
22410 s%@OL_MKDEP@%$OL_MKDEP%g
22411 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22412 s%@LIBOBJS@%$LIBOBJS%g
22413 s%@LIBSRCS@%$LIBSRCS%g
22414 s%@PLAT@%$PLAT%g
22415 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22416 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22417 s%@BUILD_BDB@%$BUILD_BDB%g
22418 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22419 s%@BUILD_LDAP@%$BUILD_LDAP%g
22420 s%@BUILD_LDBM@%$BUILD_LDBM%g
22421 s%@BUILD_META@%$BUILD_META%g
22422 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
22423 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
22424 s%@BUILD_PERL@%$BUILD_PERL%g
22425 s%@BUILD_SHELL@%$BUILD_SHELL%g
22426 s%@BUILD_SQL@%$BUILD_SQL%g
22427 s%@BUILD_TCL@%$BUILD_TCL%g
22428 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
22429 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
22430 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
22431 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
22432 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
22433 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
22434 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
22435 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
22436 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
22437 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
22438 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
22439 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
22440 s%@LDBM_LIB@%$LDBM_LIB%g
22441 s%@LDAP_LIBS@%$LDAP_LIBS%g
22442 s%@LDIF_LIBS@%$LDIF_LIBS%g
22443 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
22444 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
22445 s%@LDBM_LIBS@%$LDBM_LIBS%g
22446 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
22447 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
22448 s%@WRAP_LIBS@%$WRAP_LIBS%g
22449 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
22450 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
22451 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
22452 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
22453 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
22454 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
22455 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
22456 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
22457 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
22458 s%@KRB4_LIBS@%$KRB4_LIBS%g
22459 s%@KRB5_LIBS@%$KRB5_LIBS%g
22460 s%@READLINE_LIBS@%$READLINE_LIBS%g
22461 s%@SASL_LIBS@%$SASL_LIBS%g
22462 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
22463 s%@TLS_LIBS@%$TLS_LIBS%g
22464 s%@MODULES_LIBS@%$MODULES_LIBS%g
22465 s%@AUTH_LIBS@%$AUTH_LIBS%g
22466 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
22467 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
22468 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
22469 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
22470
22471 CEOF
22472 EOF
22473
22474 cat >> $CONFIG_STATUS <<\EOF
22475
22476 # Split the substitutions into bite-sized pieces for seds with
22477 # small command number limits, like on Digital OSF/1 and HP-UX.
22478 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
22479 ac_file=1 # Number of current file.
22480 ac_beg=1 # First line for current file.
22481 ac_end=$ac_max_sed_cmds # Line after last line for current file.
22482 ac_more_lines=:
22483 ac_sed_cmds=""
22484 while $ac_more_lines; do
22485   if test $ac_beg -gt 1; then
22486     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
22487   else
22488     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
22489   fi
22490   if test ! -s conftest.s$ac_file; then
22491     ac_more_lines=false
22492     rm -f conftest.s$ac_file
22493   else
22494     if test -z "$ac_sed_cmds"; then
22495       ac_sed_cmds="sed -f conftest.s$ac_file"
22496     else
22497       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
22498     fi
22499     ac_file=`expr $ac_file + 1`
22500     ac_beg=$ac_end
22501     ac_end=`expr $ac_end + $ac_max_sed_cmds`
22502   fi
22503 done
22504 if test -z "$ac_sed_cmds"; then
22505   ac_sed_cmds=cat
22506 fi
22507 EOF
22508
22509 cat >> $CONFIG_STATUS <<EOF
22510
22511 CONFIG_FILES=\${CONFIG_FILES-"\
22512 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22513 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22514 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22515 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22516 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22517 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22518 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22519 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22520 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
22521 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22522 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22523 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22524 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22525 include/Makefile:build/top.mk:include/Makefile.in \
22526 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22527 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22528 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22529 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22530 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22531 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22532 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22533 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22534 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22535 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22536 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22537 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22538 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22539 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22540 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22541 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22542 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22543 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22544 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22545 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22546 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22547 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22548 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22549 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22550 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22551 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22552 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22553 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22554 "}
22555 EOF
22556 cat >> $CONFIG_STATUS <<\EOF
22557 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
22558   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22559   case "$ac_file" in
22560   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22561        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22562   *) ac_file_in="${ac_file}.in" ;;
22563   esac
22564
22565   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
22566
22567   # Remove last slash and all that follows it.  Not all systems have dirname.
22568   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22569   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22570     # The file is in a subdirectory.
22571     test ! -d "$ac_dir" && mkdir "$ac_dir"
22572     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
22573     # A "../" for each directory in $ac_dir_suffix.
22574     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
22575   else
22576     ac_dir_suffix= ac_dots=
22577   fi
22578
22579   case "$ac_given_srcdir" in
22580   .)  srcdir=.
22581       if test -z "$ac_dots"; then top_srcdir=.
22582       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
22583   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
22584   *) # Relative path.
22585     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
22586     top_srcdir="$ac_dots$ac_given_srcdir" ;;
22587   esac
22588
22589   case "$ac_given_INSTALL" in
22590   [/$]*) INSTALL="$ac_given_INSTALL" ;;
22591   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
22592   esac
22593
22594   echo creating "$ac_file"
22595   rm -f "$ac_file"
22596   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
22597   case "$ac_file" in
22598   *[Mm]akefile*) ac_comsub="1i\\
22599 # $configure_input" ;;
22600   *) ac_comsub= ;;
22601   esac
22602
22603   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22604   sed -e "$ac_comsub
22605 s%@configure_input@%$configure_input%g
22606 s%@srcdir@%$srcdir%g
22607 s%@top_srcdir@%$top_srcdir%g
22608 s%@INSTALL@%$INSTALL%g
22609 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
22610 fi; done
22611 rm -f conftest.s*
22612
22613 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22614 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22615 #
22616 # ac_d sets the value in "#define NAME VALUE" lines.
22617 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22618 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
22619 ac_dC='\3'
22620 ac_dD='%g'
22621 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22622 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22623 ac_uB='\([      ]\)%\1#\2define\3'
22624 ac_uC=' '
22625 ac_uD='\4%g'
22626 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22627 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22628 ac_eB='$%\1#\2define\3'
22629 ac_eC=' '
22630 ac_eD='%g'
22631
22632 if test "${CONFIG_HEADERS+set}" != set; then
22633 EOF
22634 cat >> $CONFIG_STATUS <<EOF
22635   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
22636 EOF
22637 cat >> $CONFIG_STATUS <<\EOF
22638 fi
22639 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
22640   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22641   case "$ac_file" in
22642   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22643        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22644   *) ac_file_in="${ac_file}.in" ;;
22645   esac
22646
22647   echo creating $ac_file
22648
22649   rm -f conftest.frag conftest.in conftest.out
22650   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22651   cat $ac_file_inputs > conftest.in
22652
22653 EOF
22654
22655 # Transform confdefs.h into a sed script conftest.vals that substitutes
22656 # the proper values into config.h.in to produce config.h.  And first:
22657 # Protect against being on the right side of a sed subst in config.status.
22658 # Protect against being in an unquoted here document in config.status.
22659 rm -f conftest.vals
22660 cat > conftest.hdr <<\EOF
22661 s/[\\&%]/\\&/g
22662 s%[\\$`]%\\&%g
22663 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
22664 s%ac_d%ac_u%gp
22665 s%ac_u%ac_e%gp
22666 EOF
22667 sed -n -f conftest.hdr confdefs.h > conftest.vals
22668 rm -f conftest.hdr
22669
22670 # This sed command replaces #undef with comments.  This is necessary, for
22671 # example, in the case of _POSIX_SOURCE, which is predefined and required
22672 # on some systems where configure will not decide to define it.
22673 cat >> conftest.vals <<\EOF
22674 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
22675 EOF
22676
22677 # Break up conftest.vals because some shells have a limit on
22678 # the size of here documents, and old seds have small limits too.
22679
22680 rm -f conftest.tail
22681 while :
22682 do
22683   ac_lines=`grep -c . conftest.vals`
22684   # grep -c gives empty output for an empty file on some AIX systems.
22685   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
22686   # Write a limited-size here document to conftest.frag.
22687   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
22688   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
22689   echo 'CEOF
22690   sed -f conftest.frag conftest.in > conftest.out
22691   rm -f conftest.in
22692   mv conftest.out conftest.in
22693 ' >> $CONFIG_STATUS
22694   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22695   rm -f conftest.vals
22696   mv conftest.tail conftest.vals
22697 done
22698 rm -f conftest.vals
22699
22700 cat >> $CONFIG_STATUS <<\EOF
22701   rm -f conftest.frag conftest.h
22702   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
22703   cat conftest.in >> conftest.h
22704   rm -f conftest.in
22705   if cmp -s $ac_file conftest.h 2>/dev/null; then
22706     echo "$ac_file is unchanged"
22707     rm -f conftest.h
22708   else
22709     # Remove last slash and all that follows it.  Not all systems have dirname.
22710       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22711       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22712       # The file is in a subdirectory.
22713       test ! -d "$ac_dir" && mkdir "$ac_dir"
22714     fi
22715     rm -f $ac_file
22716     mv conftest.h $ac_file
22717   fi
22718 fi; done
22719
22720 EOF
22721 cat >> $CONFIG_STATUS <<EOF
22722
22723 EOF
22724 cat >> $CONFIG_STATUS <<\EOF
22725
22726 date > stamp-h
22727 echo Please run \"make depend\" to build dependencies
22728
22729 exit 0
22730 EOF
22731 chmod +x $CONFIG_STATUS
22732 rm -fr confdefs* $ac_clean_files
22733 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
22734