]> git.sur5r.net Git - openldap/blob - configure
Rebuild
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.420 2002/05/18 00:06:32 hyc 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-x-compile      enable cross compiling [no]"
48 ac_help="$ac_help
49   --with-cyrus-sasl       with Cyrus SASL support [auto]"
50 ac_help="$ac_help
51   --with-fetch            with freeBSD fetch URL support [auto]"
52 ac_help="$ac_help
53   --with-kerberos         with Kerberos support [auto]"
54 ac_help="$ac_help
55   --with-readline         with readline support [auto]"
56 ac_help="$ac_help
57   --with-threads          with threads [auto]"
58 ac_help="$ac_help
59   --with-tls              with TLS/SSL support [auto]"
60 ac_help="$ac_help
61   --with-yielding-select  with implicitly yielding select [auto]"
62 ac_help="$ac_help
63
64 SLAPD (Standalone LDAP Daemon) Options:"
65 ac_help="$ac_help
66   --enable-slapd          enable building slapd [yes]"
67 ac_help="$ac_help
68     --enable-aci          enable per-object ACIs (experimental) [no]"
69 ac_help="$ac_help
70     --enable-cleartext    enable cleartext passwords [yes]"
71 ac_help="$ac_help
72     --enable-crypt        enable crypt(3) passwords [no]"
73 ac_help="$ac_help
74     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
75 ac_help="$ac_help
76     --enable-kpasswd      enable Kerberos password verification [no]"
77 ac_help="$ac_help
78     --enable-lmpasswd     enable LAN Manager passwords [no]"
79 ac_help="$ac_help
80     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
81 ac_help="$ac_help
82     --enable-modules      enable dynamic module support [no]"
83 ac_help="$ac_help
84     --enable-phonetic     enable phonetic/soundex [no]"
85 ac_help="$ac_help
86     --enable-rewrite      enable DN rewriting in back-ldap and back-meta [no]"
87 ac_help="$ac_help
88     --enable-rlookups     enable reverse lookups of client hostnames [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|dynamic [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|dynamic [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|dynamic [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|berkeley|bcompat|mdbm|gdbm [auto]"
109 ac_help="$ac_help
110     --with-ldbm-module    module type static|dynamic [static]"
111 ac_help="$ac_help
112     --with-ldbm-type      use LDBM type auto|btree|hash [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|dynamic [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|dynamic [static]"
121 ac_help="$ac_help
122     --enable-null         enable null backend [no]"
123 ac_help="$ac_help
124     --with-null-module    module type static|dynamic [static]"
125 ac_help="$ac_help
126     --enable-passwd       enable passwd backend [no]"
127 ac_help="$ac_help
128     --with-passwd-module  module type static|dynamic [static]"
129 ac_help="$ac_help
130     --enable-perl         enable perl backend [no]"
131 ac_help="$ac_help
132     --with-perl-module    module type static|dynamic [static]"
133 ac_help="$ac_help
134     --enable-shell        enable shell backend [no]"
135 ac_help="$ac_help
136     --with-shell-module   module type static|dynamic [static]"
137 ac_help="$ac_help
138     --enable-sql          enable sql backend [no]"
139 ac_help="$ac_help
140     --with-sql-module     module type static|dynamic [static]"
141 ac_help="$ac_help
142     --enable-tcl          enable tcl backend [no]"
143 ac_help="$ac_help
144     --with-tcl-module     module type static|dynamic [static]"
145 ac_help="$ac_help
146
147 SLURPD (Replication Daemon) Options:"
148 ac_help="$ac_help
149   --enable-slurpd         enable building slurpd [auto]"
150 ac_help="$ac_help
151
152 Library Generation & Linking Options"
153 ac_help="$ac_help
154   --enable-static[=PKGS]  build static libraries [default=yes]"
155 ac_help="$ac_help
156   --enable-shared[=PKGS]  build shared libraries [default=yes]"
157 ac_help="$ac_help
158   --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
159 ac_help="$ac_help
160   --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
161
162 # Find the correct PATH separator.  Usually this is `:', but
163 # DJGPP uses `;' like DOS.
164 if test "X${PATH_SEPARATOR+set}" != Xset; then
165   UNAME=${UNAME-`uname 2>/dev/null`}
166   case X$UNAME in
167     *-DOS) lt_cv_sys_path_separator=';' ;;
168     *)     lt_cv_sys_path_separator=':' ;;
169   esac
170   PATH_SEPARATOR=$lt_cv_sys_path_separator
171 fi
172
173
174 # Check that we are running under the correct shell.
175 SHELL=${CONFIG_SHELL-/bin/sh}
176
177 case X$ECHO in
178 X*--fallback-echo)
179   # Remove one level of quotation (which was required for Make).
180   ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','`
181   ;;
182 esac
183
184 echo=${ECHO-echo}
185 if test "X$1" = X--no-reexec; then
186   # Discard the --no-reexec flag, and continue.
187   shift
188 elif test "X$1" = X--fallback-echo; then
189   # Avoid inline document here, it may be left over
190   :
191 elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
192   # Yippee, $echo works!
193   :
194 else
195   # Restart under the correct shell.
196   exec $SHELL "$0" --no-reexec ${1+"$@"}
197 fi
198
199 if test "X$1" = X--fallback-echo; then
200   # used as fallback echo
201   shift
202   cat <<EOF
203
204 EOF
205   exit 0
206 fi
207
208 # The HP-UX ksh and POSIX shell print the target directory to stdout
209 # if CDPATH is set.
210 if test "X${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
211
212 if test -z "$ECHO"; then
213 if test "X${echo_test_string+set}" != Xset; then
214 # find a string as large as possible, as long as the shell can cope with it
215   for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
216     # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
217     if (echo_test_string="`eval $cmd`") 2>/dev/null &&
218        echo_test_string="`eval $cmd`" &&
219        (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null
220     then
221       break
222     fi
223   done
224 fi
225
226 if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
227    echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
228    test "X$echo_testing_string" = "X$echo_test_string"; then
229   :
230 else
231   # The Solaris, AIX, and Digital Unix default echo programs unquote
232   # backslashes.  This makes it impossible to quote backslashes using
233   #   echo "$something" | sed 's/\\/\\\\/g'
234   #
235   # So, first we look for a working echo in the user's PATH.
236
237   IFS="${IFS=   }"; save_ifs="$IFS"; IFS=$PATH_SEPARATOR
238   for dir in $PATH /usr/ucb; do
239     if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
240        test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
241        echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
242        test "X$echo_testing_string" = "X$echo_test_string"; then
243       echo="$dir/echo"
244       break
245     fi
246   done
247   IFS="$save_ifs"
248
249   if test "X$echo" = Xecho; then
250     # We didn't find a better echo, so look for alternatives.
251     if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' &&
252        echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` &&
253        test "X$echo_testing_string" = "X$echo_test_string"; then
254       # This shell has a builtin print -r that does the trick.
255       echo='print -r'
256     elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) &&
257          test "X$CONFIG_SHELL" != X/bin/ksh; then
258       # If we have ksh, try running configure again with it.
259       ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
260       export ORIGINAL_CONFIG_SHELL
261       CONFIG_SHELL=/bin/ksh
262       export CONFIG_SHELL
263       exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
264     else
265       # Try using printf.
266       echo='printf %s\n'
267       if test "X`($echo '\t') 2>/dev/null`" = 'X\t' &&
268          echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` &&
269          test "X$echo_testing_string" = "X$echo_test_string"; then
270         # Cool, printf works
271         :
272       elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
273            test "X$echo_testing_string" = 'X\t' &&
274            echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
275            test "X$echo_testing_string" = "X$echo_test_string"; then
276         CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
277         export CONFIG_SHELL
278         SHELL="$CONFIG_SHELL"
279         export SHELL
280         echo="$CONFIG_SHELL $0 --fallback-echo"
281       elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
282            test "X$echo_testing_string" = 'X\t' &&
283            echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
284            test "X$echo_testing_string" = "X$echo_test_string"; then
285         echo="$CONFIG_SHELL $0 --fallback-echo"
286       else
287         # maybe with a smaller string...
288         prev=:
289
290         for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
291           if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null
292           then
293             break
294           fi
295           prev="$cmd"
296         done
297
298         if test "$prev" != 'sed 50q "$0"'; then
299           echo_test_string=`eval $prev`
300           export echo_test_string
301           exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
302         else
303           # Oops.  We lost completely, so just stick with echo.
304           echo=echo
305         fi
306       fi
307     fi
308   fi
309 fi
310 fi
311
312 # Copy echo and quote the copy suitably for passing to libtool from
313 # the Makefile, instead of quoting the original, which is used later.
314 ECHO=$echo
315 if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
316    ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
317 fi
318
319
320 ac_help="$ac_help
321   --disable-libtool-lock  avoid locking (might break parallel builds)"
322 ac_help="$ac_help
323   --with-pic              try to use only PIC/non-PIC objects [default=use both]"
324 ac_help="$ac_help
325
326 See INSTALL file for further details."
327
328 # Initialize some variables set by options.
329 # The variables have the same names as the options, with
330 # dashes changed to underlines.
331 build=NONE
332 cache_file=./config.cache
333 exec_prefix=NONE
334 host=NONE
335 no_create=
336 nonopt=NONE
337 no_recursion=
338 prefix=NONE
339 program_prefix=NONE
340 program_suffix=NONE
341 program_transform_name=s,x,x,
342 silent=
343 site=
344 srcdir=
345 target=NONE
346 verbose=
347 x_includes=NONE
348 x_libraries=NONE
349 bindir='${exec_prefix}/bin'
350 sbindir='${exec_prefix}/sbin'
351 libexecdir='${exec_prefix}/libexec'
352 datadir='${prefix}/share'
353 sysconfdir='${prefix}/etc'
354 sharedstatedir='${prefix}/com'
355 localstatedir='${prefix}/var'
356 libdir='${exec_prefix}/lib'
357 includedir='${prefix}/include'
358 oldincludedir='/usr/include'
359 infodir='${prefix}/info'
360 mandir='${prefix}/man'
361
362 # Initialize some other variables.
363 subdirs=
364 MFLAGS= MAKEFLAGS=
365 SHELL=${CONFIG_SHELL-/bin/sh}
366 # Maximum number of lines to put in a shell here document.
367 ac_max_here_lines=12
368
369 ac_prev=
370 for ac_option
371 do
372
373   # If the previous option needs an argument, assign it.
374   if test -n "$ac_prev"; then
375     eval "$ac_prev=\$ac_option"
376     ac_prev=
377     continue
378   fi
379
380   case "$ac_option" in
381   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
382   *) ac_optarg= ;;
383   esac
384
385   # Accept the important Cygnus configure options, so we can diagnose typos.
386
387   case "$ac_option" in
388
389   -bindir | --bindir | --bindi | --bind | --bin | --bi)
390     ac_prev=bindir ;;
391   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
392     bindir="$ac_optarg" ;;
393
394   -build | --build | --buil | --bui | --bu)
395     ac_prev=build ;;
396   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
397     build="$ac_optarg" ;;
398
399   -cache-file | --cache-file | --cache-fil | --cache-fi \
400   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
401     ac_prev=cache_file ;;
402   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
403   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
404     cache_file="$ac_optarg" ;;
405
406   -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
407     ac_prev=datadir ;;
408   -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
409   | --da=*)
410     datadir="$ac_optarg" ;;
411
412   -disable-* | --disable-*)
413     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
414     # Reject names that are not valid shell variable names.
415     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
416       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
417     fi
418     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
419     eval "enable_${ac_feature}=no" ;;
420
421   -enable-* | --enable-*)
422     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
423     # Reject names that are not valid shell variable names.
424     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
425       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
426     fi
427     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
428     case "$ac_option" in
429       *=*) ;;
430       *) ac_optarg=yes ;;
431     esac
432     eval "enable_${ac_feature}='$ac_optarg'" ;;
433
434   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
435   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
436   | --exec | --exe | --ex)
437     ac_prev=exec_prefix ;;
438   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
439   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
440   | --exec=* | --exe=* | --ex=*)
441     exec_prefix="$ac_optarg" ;;
442
443   -gas | --gas | --ga | --g)
444     # Obsolete; use --with-gas.
445     with_gas=yes ;;
446
447   -help | --help | --hel | --he)
448     # Omit some internal or obsolete options to make the list less imposing.
449     # This message is too long to be a string in the A/UX 3.1 sh.
450     cat << EOF
451 Usage: configure [options] [host]
452 Options: [defaults in brackets after descriptions]
453 Configuration:
454   --cache-file=FILE       cache test results in FILE
455   --help                  print this message
456   --no-create             do not create output files
457   --quiet, --silent       do not print \`checking...' messages
458   --version               print the version of autoconf that created configure
459 Directory and file names:
460   --prefix=PREFIX         install architecture-independent files in PREFIX
461                           [$ac_default_prefix]
462   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
463                           [same as prefix]
464   --bindir=DIR            user executables in DIR [EPREFIX/bin]
465   --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
466   --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
467   --datadir=DIR           read-only architecture-independent data in DIR
468                           [PREFIX/share]
469   --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
470   --sharedstatedir=DIR    modifiable architecture-independent data in DIR
471                           [PREFIX/com]
472   --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
473   --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
474   --includedir=DIR        C header files in DIR [PREFIX/include]
475   --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
476   --infodir=DIR           info documentation in DIR [PREFIX/info]
477   --mandir=DIR            man documentation in DIR [PREFIX/man]
478   --srcdir=DIR            find the sources in DIR [configure dir or ..]
479   --program-prefix=PREFIX prepend PREFIX to installed program names
480   --program-suffix=SUFFIX append SUFFIX to installed program names
481   --program-transform-name=PROGRAM
482                           run sed PROGRAM on installed program names
483 EOF
484     cat << EOF
485 Host type:
486   --build=BUILD           configure for building on BUILD [BUILD=HOST]
487   --host=HOST             configure for HOST [guessed]
488   --target=TARGET         configure for TARGET [TARGET=HOST]
489 Features and packages:
490   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
491   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
492   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
493   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
494   --x-includes=DIR        X include files are in DIR
495   --x-libraries=DIR       X library files are in DIR
496 EOF
497     if test -n "$ac_help"; then
498       echo "--enable and --with options recognized:$ac_help"
499     fi
500     exit 0 ;;
501
502   -host | --host | --hos | --ho)
503     ac_prev=host ;;
504   -host=* | --host=* | --hos=* | --ho=*)
505     host="$ac_optarg" ;;
506
507   -includedir | --includedir | --includedi | --included | --include \
508   | --includ | --inclu | --incl | --inc)
509     ac_prev=includedir ;;
510   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
511   | --includ=* | --inclu=* | --incl=* | --inc=*)
512     includedir="$ac_optarg" ;;
513
514   -infodir | --infodir | --infodi | --infod | --info | --inf)
515     ac_prev=infodir ;;
516   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
517     infodir="$ac_optarg" ;;
518
519   -libdir | --libdir | --libdi | --libd)
520     ac_prev=libdir ;;
521   -libdir=* | --libdir=* | --libdi=* | --libd=*)
522     libdir="$ac_optarg" ;;
523
524   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
525   | --libexe | --libex | --libe)
526     ac_prev=libexecdir ;;
527   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
528   | --libexe=* | --libex=* | --libe=*)
529     libexecdir="$ac_optarg" ;;
530
531   -localstatedir | --localstatedir | --localstatedi | --localstated \
532   | --localstate | --localstat | --localsta | --localst \
533   | --locals | --local | --loca | --loc | --lo)
534     ac_prev=localstatedir ;;
535   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
536   | --localstate=* | --localstat=* | --localsta=* | --localst=* \
537   | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
538     localstatedir="$ac_optarg" ;;
539
540   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
541     ac_prev=mandir ;;
542   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
543     mandir="$ac_optarg" ;;
544
545   -nfp | --nfp | --nf)
546     # Obsolete; use --without-fp.
547     with_fp=no ;;
548
549   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
550   | --no-cr | --no-c)
551     no_create=yes ;;
552
553   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
554   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
555     no_recursion=yes ;;
556
557   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
558   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
559   | --oldin | --oldi | --old | --ol | --o)
560     ac_prev=oldincludedir ;;
561   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
562   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
563   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
564     oldincludedir="$ac_optarg" ;;
565
566   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
567     ac_prev=prefix ;;
568   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
569     prefix="$ac_optarg" ;;
570
571   -program-prefix | --program-prefix | --program-prefi | --program-pref \
572   | --program-pre | --program-pr | --program-p)
573     ac_prev=program_prefix ;;
574   -program-prefix=* | --program-prefix=* | --program-prefi=* \
575   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
576     program_prefix="$ac_optarg" ;;
577
578   -program-suffix | --program-suffix | --program-suffi | --program-suff \
579   | --program-suf | --program-su | --program-s)
580     ac_prev=program_suffix ;;
581   -program-suffix=* | --program-suffix=* | --program-suffi=* \
582   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
583     program_suffix="$ac_optarg" ;;
584
585   -program-transform-name | --program-transform-name \
586   | --program-transform-nam | --program-transform-na \
587   | --program-transform-n | --program-transform- \
588   | --program-transform | --program-transfor \
589   | --program-transfo | --program-transf \
590   | --program-trans | --program-tran \
591   | --progr-tra | --program-tr | --program-t)
592     ac_prev=program_transform_name ;;
593   -program-transform-name=* | --program-transform-name=* \
594   | --program-transform-nam=* | --program-transform-na=* \
595   | --program-transform-n=* | --program-transform-=* \
596   | --program-transform=* | --program-transfor=* \
597   | --program-transfo=* | --program-transf=* \
598   | --program-trans=* | --program-tran=* \
599   | --progr-tra=* | --program-tr=* | --program-t=*)
600     program_transform_name="$ac_optarg" ;;
601
602   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
603   | -silent | --silent | --silen | --sile | --sil)
604     silent=yes ;;
605
606   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
607     ac_prev=sbindir ;;
608   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
609   | --sbi=* | --sb=*)
610     sbindir="$ac_optarg" ;;
611
612   -sharedstatedir | --sharedstatedir | --sharedstatedi \
613   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
614   | --sharedst | --shareds | --shared | --share | --shar \
615   | --sha | --sh)
616     ac_prev=sharedstatedir ;;
617   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
618   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
619   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
620   | --sha=* | --sh=*)
621     sharedstatedir="$ac_optarg" ;;
622
623   -site | --site | --sit)
624     ac_prev=site ;;
625   -site=* | --site=* | --sit=*)
626     site="$ac_optarg" ;;
627
628   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
629     ac_prev=srcdir ;;
630   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
631     srcdir="$ac_optarg" ;;
632
633   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
634   | --syscon | --sysco | --sysc | --sys | --sy)
635     ac_prev=sysconfdir ;;
636   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
637   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
638     sysconfdir="$ac_optarg" ;;
639
640   -target | --target | --targe | --targ | --tar | --ta | --t)
641     ac_prev=target ;;
642   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
643     target="$ac_optarg" ;;
644
645   -v | -verbose | --verbose | --verbos | --verbo | --verb)
646     verbose=yes ;;
647
648   -version | --version | --versio | --versi | --vers)
649     echo "configure generated by autoconf version 2.13.1"
650     exit 0 ;;
651
652   -with-* | --with-*)
653     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
654     # Reject names that are not valid shell variable names.
655     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
656       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
657     fi
658     ac_package=`echo $ac_package| sed 's/-/_/g'`
659     case "$ac_option" in
660       *=*) ;;
661       *) ac_optarg=yes ;;
662     esac
663     eval "with_${ac_package}='$ac_optarg'" ;;
664
665   -without-* | --without-*)
666     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
667     # Reject names that are not valid shell variable names.
668     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
669       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
670     fi
671     ac_package=`echo $ac_package| sed 's/-/_/g'`
672     eval "with_${ac_package}=no" ;;
673
674   --x)
675     # Obsolete; use --with-x.
676     with_x=yes ;;
677
678   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
679   | --x-incl | --x-inc | --x-in | --x-i)
680     ac_prev=x_includes ;;
681   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
682   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
683     x_includes="$ac_optarg" ;;
684
685   -x-libraries | --x-libraries | --x-librarie | --x-librari \
686   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
687     ac_prev=x_libraries ;;
688   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
689   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
690     x_libraries="$ac_optarg" ;;
691
692   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
693     ;;
694
695   *)
696     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
697       echo "configure: warning: $ac_option: invalid host type" 1>&2
698     fi
699     if test "x$nonopt" != xNONE; then
700       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
701     fi
702     nonopt="$ac_option"
703     ;;
704
705   esac
706 done
707
708 if test -n "$ac_prev"; then
709   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
710 fi
711
712 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
713
714 # File descriptor usage:
715 # 0 standard input
716 # 1 file creation
717 # 2 errors and warnings
718 # 3 some systems may open it to /dev/tty
719 # 4 used on the Kubota Titan
720 # 6 checking for... messages and results
721 # 5 compiler messages saved in config.log
722 if test "$silent" = yes; then
723   exec 6>/dev/null
724 else
725   exec 6>&1
726 fi
727 exec 5>./config.log
728
729 echo "\
730 This file contains any messages produced by compilers while
731 running configure, to aid debugging if configure makes a mistake.
732 " 1>&5
733
734 # Strip out --no-create and --no-recursion so they do not pile up.
735 # Also quote any args containing shell metacharacters.
736 ac_configure_args=
737 for ac_arg
738 do
739   case "$ac_arg" in
740   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
741   | --no-cr | --no-c) ;;
742   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
743   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
744   *" "*|*"      "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
745   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
746   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
747   esac
748 done
749
750 # NLS nuisances.
751 # Only set these to C if already set.  These must not be set unconditionally
752 # because not all systems understand e.g. LANG=C (notably SCO).
753 # Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
754 # Non-C LC_CTYPE values break the ctype check.
755 if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
756 if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
757 if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
758 if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
759
760 # confdefs.h avoids OS command line length limits that DEFS can exceed.
761 rm -rf conftest* confdefs.h
762 # AIX cpp loses on an empty file, so make sure it contains at least a newline.
763 echo > confdefs.h
764
765 # A filename unique to this package, relative to the directory that
766 # configure is in, which we can look for to find out if srcdir is correct.
767 ac_unique_file=build/version.sh
768
769 # Find the source files, if location was not specified.
770 if test -z "$srcdir"; then
771   ac_srcdir_defaulted=yes
772   # Try the directory containing this script, then its parent.
773   ac_prog=$0
774   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
775   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
776   srcdir=$ac_confdir
777   if test ! -r $srcdir/$ac_unique_file; then
778     srcdir=..
779   fi
780 else
781   ac_srcdir_defaulted=no
782 fi
783 if test ! -r $srcdir/$ac_unique_file; then
784   if test "$ac_srcdir_defaulted" = yes; then
785     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
786   else
787     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
788   fi
789 fi
790 srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
791
792 # Prefer explicitly selected file to automatically selected ones.
793 if test -z "$CONFIG_SITE"; then
794   if test "x$prefix" != xNONE; then
795     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
796   else
797     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
798   fi
799 fi
800 for ac_site_file in $CONFIG_SITE; do
801   if test -r "$ac_site_file"; then
802     echo "loading site script $ac_site_file"
803     . "$ac_site_file"
804   fi
805 done
806
807
808 ac_ext=c
809 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
810 ac_cpp='$CPP $CPPFLAGS'
811 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
812 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
813 cross_compiling=$ac_cv_prog_cc_cross
814
815 ac_exeext=
816 ac_objext=o
817 if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
818   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
819   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
820     ac_n= ac_c='
821 ' ac_t='        '
822   else
823     ac_n=-n ac_c= ac_t=
824   fi
825 else
826   ac_n= ac_c='\c' ac_t=
827 fi
828
829
830 # set unset (borrowed from autoconf 2.49c)
831 if (OL_FOO=OL_FOO; unset OL_FOO) >/dev/null 2>&1; then
832   ol_unset=unset
833 else
834   ol_unset=false
835 fi
836 # unset CDPATH
837 $ol_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
838
839 ac_aux_dir=
840 for ac_dir in build $srcdir/build; do
841   if 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/install.sh; then
846     ac_aux_dir=$ac_dir
847     ac_install_sh="$ac_aux_dir/install.sh -c"
848     break
849   elif test -f $ac_dir/shtool; then
850     ac_aux_dir=$ac_dir
851     ac_install_sh="$ac_aux_dir/shtool install -c"
852     break
853   fi
854 done
855 if test -z "$ac_aux_dir"; then
856   { echo "configure: error: can not find install-sh or install.sh in build $srcdir/build" 1>&2; exit 1; }
857 fi
858 ac_config_guess="$SHELL $ac_aux_dir/config.guess"
859 ac_config_sub="$SHELL $ac_aux_dir/config.sub"
860 ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
861
862 eval `$ac_aux_dir/version.sh`
863 if test -z "$OL_STRING"; then
864         { echo "configure: error: could not determine version" 1>&2; exit 1; }
865 fi
866
867 if test -f "$ac_aux_dir/shtool" -a ! -d $ac_aux_dir/shtool; then
868         ac_cv_shtool="$ac_aux_dir/shtool"
869 else
870         { echo "configure: error: no shtool found in $ac_aux_dir" 1>&2; exit 1; }
871 fi
872
873 SHTOOL="$ac_cv_shtool"
874
875 TB=`$SHTOOL echo -e %B`
876 TN=`$SHTOOL echo -e %b`
877
878 echo "Configuring $TB$OL_STRING$TN ..."
879
880
881 echo $ac_n "checking host system type""... $ac_c" 1>&6
882 echo "configure:883: checking host system type" >&5
883 if test "x$ac_cv_host" = "x" || (test "x$host" != "xNONE" && test "x$host" != "x$ac_cv_host_alias"); then
884
885 # Make sure we can run config.sub.
886   if $ac_config_sub sun4 >/dev/null 2>&1; then :
887     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
888   fi
889
890   ac_cv_host_alias=$host
891   case "$ac_cv_host_alias" in
892   NONE)
893     case $nonopt in
894     NONE)
895       if ac_cv_host_alias=`$ac_config_guess`; then :
896       else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
897       fi ;;
898     *) ac_cv_host_alias=$nonopt ;;
899     esac ;;
900   esac
901
902   ac_cv_host=`$ac_config_sub $ac_cv_host_alias`
903   ac_cv_host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
904   ac_cv_host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
905   ac_cv_host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
906 else
907   echo $ac_n "(cached) $ac_c" 1>&6
908 fi
909
910 echo "$ac_t""$ac_cv_host" 1>&6
911
912 host=$ac_cv_host
913 host_alias=$ac_cv_host_alias
914 host_cpu=$ac_cv_host_cpu
915 host_vendor=$ac_cv_host_vendor
916 host_os=$ac_cv_host_os
917
918
919
920
921
922 echo $ac_n "checking target system type""... $ac_c" 1>&6
923 echo "configure:924: checking target system type" >&5
924 if test "x$ac_cv_target" = "x" || (test "x$target" != "xNONE" && test "x$target" != "x$ac_cv_target_alias"); then
925
926 # Make sure we can run config.sub.
927   if $ac_config_sub sun4 >/dev/null 2>&1; then :
928     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
929   fi
930
931   ac_cv_target_alias=$target
932   case "$ac_cv_target_alias" in
933   NONE)
934     case $nonopt in
935     NONE)
936       ac_cv_target_alias=$host_alias ;;
937
938     *) ac_cv_target_alias=$nonopt ;;
939     esac ;;
940   esac
941
942   ac_cv_target=`$ac_config_sub $ac_cv_target_alias`
943   ac_cv_target_cpu=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
944   ac_cv_target_vendor=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
945   ac_cv_target_os=`echo $ac_cv_target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
946 else
947   echo $ac_n "(cached) $ac_c" 1>&6
948 fi
949
950 echo "$ac_t""$ac_cv_target" 1>&6
951
952 target=$ac_cv_target
953 target_alias=$ac_cv_target_alias
954 target_cpu=$ac_cv_target_cpu
955 target_vendor=$ac_cv_target_vendor
956 target_os=$ac_cv_target_os
957
958
959
960
961
962 echo $ac_n "checking build system type""... $ac_c" 1>&6
963 echo "configure:964: checking build system type" >&5
964 if test "x$ac_cv_build" = "x" || (test "x$build" != "xNONE" && test "x$build" != "x$ac_cv_build_alias"); then
965
966 # Make sure we can run config.sub.
967   if $ac_config_sub sun4 >/dev/null 2>&1; then :
968     else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
969   fi
970
971   ac_cv_build_alias=$build
972   case "$ac_cv_build_alias" in
973   NONE)
974     case $nonopt in
975     NONE)
976       ac_cv_build_alias=$host_alias ;;
977
978     *) ac_cv_build_alias=$nonopt ;;
979     esac ;;
980   esac
981
982   ac_cv_build=`$ac_config_sub $ac_cv_build_alias`
983   ac_cv_build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
984   ac_cv_build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
985   ac_cv_build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
986 else
987   echo $ac_n "(cached) $ac_c" 1>&6
988 fi
989
990 echo "$ac_t""$ac_cv_build" 1>&6
991
992 build=$ac_cv_build
993 build_alias=$ac_cv_build_alias
994 build_cpu=$ac_cv_build_cpu
995 build_vendor=$ac_cv_build_vendor
996 build_os=$ac_cv_build_os
997
998
999
1000
1001
1002 # Do some error checking and defaulting for the host and target type.
1003 # The inputs are:
1004 #    configure --host=HOST --target=TARGET --build=BUILD NONOPT
1005 #
1006 # The rules are:
1007 # 1. You are not allowed to specify --host, --target, and nonopt at the
1008 #    same time.
1009 # 2. Host defaults to nonopt.
1010 # 3. If nonopt is not specified, then host defaults to the current host,
1011 #    as determined by config.guess.
1012 # 4. Target and build default to nonopt.
1013 # 5. If nonopt is not specified, then target and build default to host.
1014
1015 # The aliases save the names the user supplied, while $host etc.
1016 # will get canonicalized.
1017 case $host---$target---$nonopt in
1018 NONE---*---* | *---NONE---* | *---*---NONE) ;;
1019 *) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
1020 esac
1021
1022 test "$host_alias" != "$target_alias" &&
1023   test "$program_prefix$program_suffix$program_transform_name" = \
1024     NONENONEs,x,x, &&
1025   program_prefix=${target_alias}-
1026
1027
1028 # Find a good install program.  We prefer a C program (faster),
1029 # so one script is as good as another.  But avoid the broken or
1030 # incompatible versions:
1031 # SysV /etc/install, /usr/sbin/install
1032 # SunOS /usr/etc/install
1033 # IRIX /sbin/install
1034 # AIX /bin/install
1035 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
1036 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
1037 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
1038 # ./install, which can be erroneously created by make from ./install.sh.
1039 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
1040 echo "configure:1041: checking for a BSD compatible install" >&5
1041 if test -z "$INSTALL"; then
1042 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
1043   echo $ac_n "(cached) $ac_c" 1>&6
1044 else
1045     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
1046   for ac_dir in $PATH; do
1047     # Account for people who put trailing slashes in PATH elements.
1048     case "$ac_dir/" in
1049     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
1050     *)
1051       # OSF1 and SCO ODT 3.0 have their own names for install.
1052       # Don't use installbsd from OSF since it installs stuff as root
1053       # by default.
1054       for ac_prog in ginstall scoinst install; do
1055         if test -f $ac_dir/$ac_prog; then
1056           if test $ac_prog = install &&
1057             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
1058             # AIX install.  It has an incompatible calling convention.
1059             :
1060           elif test $ac_prog = install &&
1061             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
1062             # program-specific install script used by HP pwplus--don't use.
1063             :
1064           else
1065             ac_cv_path_install="$ac_dir/$ac_prog -c"
1066             break 2
1067           fi
1068         fi
1069       done
1070       ;;
1071     esac
1072   done
1073   IFS="$ac_save_IFS"
1074
1075 fi
1076   if test "${ac_cv_path_install+set}" = set; then
1077     INSTALL="$ac_cv_path_install"
1078   else
1079     # As a last resort, use the slow shell script.  We don't cache a
1080     # path for INSTALL within a source directory, because that will
1081     # break other packages using the cache if that directory is
1082     # removed, or if the path is relative.
1083     INSTALL="$ac_install_sh"
1084   fi
1085 fi
1086 echo "$ac_t""$INSTALL" 1>&6
1087
1088 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
1089 # It thinks the first close brace ends the variable substitution.
1090 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
1091
1092 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
1093
1094 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
1095
1096 echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
1097 echo "configure:1098: checking whether build environment is sane" >&5
1098 # Just in case
1099 sleep 1
1100 echo timestamp > conftestfile
1101 # Do `set' in a subshell so we don't clobber the current shell's
1102 # arguments.  Must try -L first in case configure is actually a
1103 # symlink; some systems play weird games with the mod time of symlinks
1104 # (eg FreeBSD returns the mod time of the symlink's containing
1105 # directory).
1106 if (
1107    set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
1108    if test "$*" = "X"; then
1109       # -L didn't work.
1110       set X `ls -t $srcdir/configure conftestfile`
1111    fi
1112    if test "$*" != "X $srcdir/configure conftestfile" \
1113       && test "$*" != "X conftestfile $srcdir/configure"; then
1114
1115       # If neither matched, then we have a broken ls.  This can happen
1116       # if, for instance, CONFIG_SHELL is bash and it inherits a
1117       # broken ls alias from the environment.  This has actually
1118       # happened.  Such a system could not be considered "sane".
1119       { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
1120 alias in your environment" 1>&2; exit 1; }
1121    fi
1122
1123    test "$2" = conftestfile
1124    )
1125 then
1126    # Ok.
1127    :
1128 else
1129    { echo "configure: error: newly created file is older than distributed files!
1130 Check your system clock" 1>&2; exit 1; }
1131 fi
1132 rm -f conftest*
1133 echo "$ac_t""yes" 1>&6
1134 if test "$program_transform_name" = s,x,x,; then
1135   program_transform_name=
1136 else
1137   # Double any \ or $.  echo might interpret backslashes.
1138   cat <<\EOF_SED > conftestsed
1139 s,\\,\\\\,g; s,\$,$$,g
1140 EOF_SED
1141   program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
1142   rm -f conftestsed
1143 fi
1144 test "$program_prefix" != NONE &&
1145   program_transform_name="s,^,${program_prefix},;$program_transform_name"
1146 # Use a double $ so make ignores it.
1147 test "$program_suffix" != NONE &&
1148   program_transform_name="s,\$\$,${program_suffix},;$program_transform_name"
1149
1150 # sed with no file args requires a program.
1151 test "$program_transform_name" = "" && program_transform_name="s,x,x,"
1152
1153 for ac_prog in mawk gawk nawk awk
1154 do
1155 # Extract the first word of "$ac_prog", so it can be a program name with args.
1156 set dummy $ac_prog; ac_word=$2
1157 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1158 echo "configure:1159: checking for $ac_word" >&5
1159 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
1160   echo $ac_n "(cached) $ac_c" 1>&6
1161 else
1162   if test -n "$AWK"; then
1163   ac_cv_prog_AWK="$AWK" # Let the user override the test.
1164 else
1165   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1166   ac_dummy="$PATH"
1167   for ac_dir in $ac_dummy; do
1168     test -z "$ac_dir" && ac_dir=.
1169     if test -f $ac_dir/$ac_word; then
1170       ac_cv_prog_AWK="$ac_prog"
1171       break
1172     fi
1173   done
1174   IFS="$ac_save_ifs"
1175 fi
1176 fi
1177 AWK="$ac_cv_prog_AWK"
1178 if test -n "$AWK"; then
1179   echo "$ac_t""$AWK" 1>&6
1180 else
1181   echo "$ac_t""no" 1>&6
1182 fi
1183
1184 test -n "$AWK" && break
1185 done
1186
1187 echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
1188 echo "configure:1189: checking whether ${MAKE-make} sets \${MAKE}" >&5
1189 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
1190 if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
1191   echo $ac_n "(cached) $ac_c" 1>&6
1192 else
1193   cat > conftestmake <<\EOF
1194 all:
1195         @echo 'ac_maketemp="${MAKE}"'
1196 EOF
1197 # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
1198 eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
1199 if test -n "$ac_maketemp"; then
1200   eval ac_cv_prog_make_${ac_make}_set=yes
1201 else
1202   eval ac_cv_prog_make_${ac_make}_set=no
1203 fi
1204 rm -f conftestmake
1205 fi
1206 if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
1207   echo "$ac_t""yes" 1>&6
1208   SET_MAKE=
1209 else
1210   echo "$ac_t""no" 1>&6
1211   SET_MAKE="MAKE=${MAKE-make}"
1212 fi
1213
1214
1215
1216 PACKAGE=$OL_PACKAGE
1217
1218 VERSION=$OL_VERSION
1219
1220 if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
1221   { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
1222 fi
1223
1224
1225
1226 missing_dir=`cd $ac_aux_dir && pwd`
1227 echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
1228 echo "configure:1229: checking for working aclocal" >&5
1229 # Run test in a subshell; some versions of sh will print an error if
1230 # an executable is not found, even if stderr is redirected.
1231 # Redirect stdin to placate older versions of autoconf.  Sigh.
1232 if (aclocal --version) < /dev/null > /dev/null 2>&1; then
1233    ACLOCAL=aclocal
1234    echo "$ac_t""found" 1>&6
1235 else
1236    ACLOCAL="$missing_dir/missing aclocal"
1237    echo "$ac_t""missing" 1>&6
1238 fi
1239
1240 echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
1241 echo "configure:1242: checking for working autoconf" >&5
1242 # Run test in a subshell; some versions of sh will print an error if
1243 # an executable is not found, even if stderr is redirected.
1244 # Redirect stdin to placate older versions of autoconf.  Sigh.
1245 if (autoconf --version) < /dev/null > /dev/null 2>&1; then
1246    AUTOCONF=autoconf
1247    echo "$ac_t""found" 1>&6
1248 else
1249    AUTOCONF="$missing_dir/missing autoconf"
1250    echo "$ac_t""missing" 1>&6
1251 fi
1252
1253 echo $ac_n "checking for working automake""... $ac_c" 1>&6
1254 echo "configure:1255: checking for working automake" >&5
1255 # Run test in a subshell; some versions of sh will print an error if
1256 # an executable is not found, even if stderr is redirected.
1257 # Redirect stdin to placate older versions of autoconf.  Sigh.
1258 if (automake --version) < /dev/null > /dev/null 2>&1; then
1259    AUTOMAKE=automake
1260    echo "$ac_t""found" 1>&6
1261 else
1262    AUTOMAKE="$missing_dir/missing automake"
1263    echo "$ac_t""missing" 1>&6
1264 fi
1265
1266 echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
1267 echo "configure:1268: checking for working autoheader" >&5
1268 # Run test in a subshell; some versions of sh will print an error if
1269 # an executable is not found, even if stderr is redirected.
1270 # Redirect stdin to placate older versions of autoconf.  Sigh.
1271 if (autoheader --version) < /dev/null > /dev/null 2>&1; then
1272    AUTOHEADER=autoheader
1273    echo "$ac_t""found" 1>&6
1274 else
1275    AUTOHEADER="$missing_dir/missing autoheader"
1276    echo "$ac_t""missing" 1>&6
1277 fi
1278
1279 echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
1280 echo "configure:1281: checking for working makeinfo" >&5
1281 # Run test in a subshell; some versions of sh will print an error if
1282 # an executable is not found, even if stderr is redirected.
1283 # Redirect stdin to placate older versions of autoconf.  Sigh.
1284 if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
1285    MAKEINFO=makeinfo
1286    echo "$ac_t""found" 1>&6
1287 else
1288    MAKEINFO="$missing_dir/missing makeinfo"
1289    echo "$ac_t""missing" 1>&6
1290 fi
1291
1292 install_sh="$missing_dir/install-sh"
1293 test -f "$install_sh" || install_sh="$missing_dir/install.sh"
1294
1295 for ac_prog in gnutar gtar tar
1296 do
1297 # Extract the first word of "$ac_prog", so it can be a program name with args.
1298 set dummy $ac_prog; ac_word=$2
1299 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
1300 echo "configure:1301: checking for $ac_word" >&5
1301 if eval "test \"\${ac_cv_prog_AMTAR+set}\" = set"; then
1302   echo $ac_n "(cached) $ac_c" 1>&6
1303 else
1304   if test -n "$AMTAR"; then
1305   ac_cv_prog_AMTAR="$AMTAR" # Let the user override the test.
1306 else
1307   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
1308   ac_dummy="$PATH"
1309   for ac_dir in $ac_dummy; do
1310     test -z "$ac_dir" && ac_dir=.
1311     if test -f $ac_dir/$ac_word; then
1312       ac_cv_prog_AMTAR="$ac_prog"
1313       break
1314     fi
1315   done
1316   IFS="$ac_save_ifs"
1317 fi
1318 fi
1319 AMTAR="$ac_cv_prog_AMTAR"
1320 if test -n "$AMTAR"; then
1321   echo "$ac_t""$AMTAR" 1>&6
1322 else
1323   echo "$ac_t""no" 1>&6
1324 fi
1325
1326 test -n "$AMTAR" && break
1327 done
1328
1329
1330 AMTARFLAGS=
1331 if test -n "$AMTAR"; then
1332   if $SHELL -c "$AMTAR --version" > /dev/null 2>&1; then
1333         AMTARFLAGS=o
1334   fi
1335 fi
1336
1337 cat >> confdefs.h <<EOF
1338 #define OPENLDAP_PACKAGE "$PACKAGE"
1339 EOF
1340
1341 cat >> confdefs.h <<EOF
1342 #define OPENLDAP_VERSION "$VERSION"
1343 EOF
1344
1345
1346 cat >> confdefs.h <<EOF
1347 #define LDAP_VENDOR_VERSION $OL_API_INC
1348 EOF
1349
1350 cat >> confdefs.h <<EOF
1351 #define LDAP_VENDOR_VERSION_MAJOR $OL_MAJOR
1352 EOF
1353
1354 cat >> confdefs.h <<EOF
1355 #define LDAP_VENDOR_VERSION_MINOR $OL_MINOR
1356 EOF
1357
1358 cat >> confdefs.h <<EOF
1359 #define LDAP_VENDOR_VERSION_PATCH $OL_PATCH
1360 EOF
1361
1362
1363 OPENLDAP_LIBVERSION=$OL_API_LIB
1364
1365
1366
1367 echo $ac_n "checking configure arguments""... $ac_c" 1>&6
1368 echo "configure:1369: checking configure arguments" >&5
1369
1370
1371 top_builddir=`pwd`
1372
1373 ldap_subdir="/openldap"
1374
1375 # Check whether --with-subdir or --without-subdir was given.
1376 if test "${with_subdir+set}" = set; then
1377   withval="$with_subdir"
1378   case "$withval" in
1379         no) ldap_subdir=""
1380                 ;;
1381         yes)
1382                 ;;
1383         /*|\\*)
1384                 ldap_subdir="$withval"
1385                 ;;
1386         *)
1387                 ldap_subdir="/$withval"
1388                 ;;
1389 esac
1390
1391 fi
1392
1393
1394 # OpenLDAP --enable-debug
1395         # Check whether --enable-debug or --disable-debug was given.
1396 if test "${enable_debug+set}" = set; then
1397   enableval="$enable_debug"
1398   
1399         ol_arg=invalid
1400         for ol_val in auto yes no ; do
1401                 if test "$enableval" = "$ol_val" ; then
1402                         ol_arg="$ol_val"
1403                 fi
1404         done
1405         if test "$ol_arg" = "invalid" ; then
1406                 { echo "configure: error: bad value $enableval for --enable-debug" 1>&2; exit 1; }
1407         fi
1408         ol_enable_debug="$ol_arg"
1409
1410 else
1411         ol_enable_debug="yes"
1412 fi
1413 # end --enable-debug
1414 # OpenLDAP --enable-syslog
1415         # Check whether --enable-syslog or --disable-syslog was given.
1416 if test "${enable_syslog+set}" = set; then
1417   enableval="$enable_syslog"
1418   
1419         ol_arg=invalid
1420         for ol_val in auto yes no ; do
1421                 if test "$enableval" = "$ol_val" ; then
1422                         ol_arg="$ol_val"
1423                 fi
1424         done
1425         if test "$ol_arg" = "invalid" ; then
1426                 { echo "configure: error: bad value $enableval for --enable-syslog" 1>&2; exit 1; }
1427         fi
1428         ol_enable_syslog="$ol_arg"
1429
1430 else
1431         ol_enable_syslog="auto"
1432 fi
1433 # end --enable-syslog
1434 # OpenLDAP --enable-proctitle
1435         # Check whether --enable-proctitle or --disable-proctitle was given.
1436 if test "${enable_proctitle+set}" = set; then
1437   enableval="$enable_proctitle"
1438   
1439         ol_arg=invalid
1440         for ol_val in auto yes no ; do
1441                 if test "$enableval" = "$ol_val" ; then
1442                         ol_arg="$ol_val"
1443                 fi
1444         done
1445         if test "$ol_arg" = "invalid" ; then
1446                 { echo "configure: error: bad value $enableval for --enable-proctitle" 1>&2; exit 1; }
1447         fi
1448         ol_enable_proctitle="$ol_arg"
1449
1450 else
1451         ol_enable_proctitle="yes"
1452 fi
1453 # end --enable-proctitle
1454 # OpenLDAP --enable-cache
1455         # Check whether --enable-cache or --disable-cache was given.
1456 if test "${enable_cache+set}" = set; then
1457   enableval="$enable_cache"
1458   
1459         ol_arg=invalid
1460         for ol_val in auto yes no ; do
1461                 if test "$enableval" = "$ol_val" ; then
1462                         ol_arg="$ol_val"
1463                 fi
1464         done
1465         if test "$ol_arg" = "invalid" ; then
1466                 { echo "configure: error: bad value $enableval for --enable-cache" 1>&2; exit 1; }
1467         fi
1468         ol_enable_cache="$ol_arg"
1469
1470 else
1471         ol_enable_cache="no"
1472 fi
1473 # end --enable-cache
1474 # OpenLDAP --enable-referrals
1475         # Check whether --enable-referrals or --disable-referrals was given.
1476 if test "${enable_referrals+set}" = set; then
1477   enableval="$enable_referrals"
1478   
1479         ol_arg=invalid
1480         for ol_val in auto yes no ; do
1481                 if test "$enableval" = "$ol_val" ; then
1482                         ol_arg="$ol_val"
1483                 fi
1484         done
1485         if test "$ol_arg" = "invalid" ; then
1486                 { echo "configure: error: bad value $enableval for --enable-referrals" 1>&2; exit 1; }
1487         fi
1488         ol_enable_referrals="$ol_arg"
1489
1490 else
1491         ol_enable_referrals="no"
1492 fi
1493 # end --enable-referrals
1494 # OpenLDAP --enable-kbind
1495         # Check whether --enable-kbind or --disable-kbind was given.
1496 if test "${enable_kbind+set}" = set; then
1497   enableval="$enable_kbind"
1498   
1499         ol_arg=invalid
1500         for ol_val in auto yes no ; do
1501                 if test "$enableval" = "$ol_val" ; then
1502                         ol_arg="$ol_val"
1503                 fi
1504         done
1505         if test "$ol_arg" = "invalid" ; then
1506                 { echo "configure: error: bad value $enableval for --enable-kbind" 1>&2; exit 1; }
1507         fi
1508         ol_enable_kbind="$ol_arg"
1509
1510 else
1511         ol_enable_kbind="no"
1512 fi
1513 # end --enable-kbind
1514 # OpenLDAP --enable-ipv6
1515         # Check whether --enable-ipv6 or --disable-ipv6 was given.
1516 if test "${enable_ipv6+set}" = set; then
1517   enableval="$enable_ipv6"
1518   
1519         ol_arg=invalid
1520         for ol_val in auto yes no ; do
1521                 if test "$enableval" = "$ol_val" ; then
1522                         ol_arg="$ol_val"
1523                 fi
1524         done
1525         if test "$ol_arg" = "invalid" ; then
1526                 { echo "configure: error: bad value $enableval for --enable-ipv6" 1>&2; exit 1; }
1527         fi
1528         ol_enable_ipv6="$ol_arg"
1529
1530 else
1531         ol_enable_ipv6="auto"
1532 fi
1533 # end --enable-ipv6
1534 # OpenLDAP --enable-local
1535         # Check whether --enable-local or --disable-local was given.
1536 if test "${enable_local+set}" = set; then
1537   enableval="$enable_local"
1538   
1539         ol_arg=invalid
1540         for ol_val in auto yes no ; do
1541                 if test "$enableval" = "$ol_val" ; then
1542                         ol_arg="$ol_val"
1543                 fi
1544         done
1545         if test "$ol_arg" = "invalid" ; then
1546                 { echo "configure: error: bad value $enableval for --enable-local" 1>&2; exit 1; }
1547         fi
1548         ol_enable_local="$ol_arg"
1549
1550 else
1551         ol_enable_local="auto"
1552 fi
1553 # end --enable-local
1554 # OpenLDAP --enable-x_compile
1555         # Check whether --enable-x_compile or --disable-x_compile was given.
1556 if test "${enable_x_compile+set}" = set; then
1557   enableval="$enable_x_compile"
1558   
1559         ol_arg=invalid
1560         for ol_val in yes no ; do
1561                 if test "$enableval" = "$ol_val" ; then
1562                         ol_arg="$ol_val"
1563                 fi
1564         done
1565         if test "$ol_arg" = "invalid" ; then
1566                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1567         fi
1568         ol_enable_x_compile="$ol_arg"
1569
1570 else
1571         ol_enable_x_compile="no"
1572 fi
1573 # end --enable-x_compile
1574
1575
1576 # OpenLDAP --with-cyrus_sasl
1577         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1578 if test "${with_cyrus_sasl+set}" = set; then
1579   withval="$with_cyrus_sasl"
1580   
1581         ol_arg=invalid
1582         for ol_val in auto yes no  ; do
1583                 if test "$withval" = "$ol_val" ; then
1584                         ol_arg="$ol_val"
1585                 fi
1586         done
1587         if test "$ol_arg" = "invalid" ; then
1588                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1589         fi
1590         ol_with_cyrus_sasl="$ol_arg"
1591
1592 else
1593         ol_with_cyrus_sasl="auto"
1594 fi
1595 # end --with-cyrus_sasl
1596
1597 # OpenLDAP --with-fetch
1598         # Check whether --with-fetch or --without-fetch was given.
1599 if test "${with_fetch+set}" = set; then
1600   withval="$with_fetch"
1601   
1602         ol_arg=invalid
1603         for ol_val in auto yes no  ; do
1604                 if test "$withval" = "$ol_val" ; then
1605                         ol_arg="$ol_val"
1606                 fi
1607         done
1608         if test "$ol_arg" = "invalid" ; then
1609                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1610         fi
1611         ol_with_fetch="$ol_arg"
1612
1613 else
1614         ol_with_fetch="auto"
1615 fi
1616 # end --with-fetch
1617
1618 # OpenLDAP --with-kerberos
1619         # Check whether --with-kerberos or --without-kerberos was given.
1620 if test "${with_kerberos+set}" = set; then
1621   withval="$with_kerberos"
1622   
1623         ol_arg=invalid
1624         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1625                 if test "$withval" = "$ol_val" ; then
1626                         ol_arg="$ol_val"
1627                 fi
1628         done
1629         if test "$ol_arg" = "invalid" ; then
1630                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1631         fi
1632         ol_with_kerberos="$ol_arg"
1633
1634 else
1635         ol_with_kerberos="auto"
1636 fi
1637 # end --with-kerberos
1638
1639 # OpenLDAP --with-readline
1640         # Check whether --with-readline or --without-readline was given.
1641 if test "${with_readline+set}" = set; then
1642   withval="$with_readline"
1643   
1644         ol_arg=invalid
1645         for ol_val in auto yes no  ; do
1646                 if test "$withval" = "$ol_val" ; then
1647                         ol_arg="$ol_val"
1648                 fi
1649         done
1650         if test "$ol_arg" = "invalid" ; then
1651                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1652         fi
1653         ol_with_readline="$ol_arg"
1654
1655 else
1656         ol_with_readline="auto"
1657 fi
1658 # end --with-readline
1659
1660 # OpenLDAP --with-threads
1661         # Check whether --with-threads or --without-threads was given.
1662 if test "${with_threads+set}" = set; then
1663   withval="$with_threads"
1664   
1665         ol_arg=invalid
1666         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1667                 if test "$withval" = "$ol_val" ; then
1668                         ol_arg="$ol_val"
1669                 fi
1670         done
1671         if test "$ol_arg" = "invalid" ; then
1672                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1673         fi
1674         ol_with_threads="$ol_arg"
1675
1676 else
1677         ol_with_threads="auto"
1678 fi
1679 # end --with-threads
1680
1681 # OpenLDAP --with-tls
1682         # Check whether --with-tls or --without-tls was given.
1683 if test "${with_tls+set}" = set; then
1684   withval="$with_tls"
1685   
1686         ol_arg=invalid
1687         for ol_val in auto ssleay openssl yes no  ; do
1688                 if test "$withval" = "$ol_val" ; then
1689                         ol_arg="$ol_val"
1690                 fi
1691         done
1692         if test "$ol_arg" = "invalid" ; then
1693                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1694         fi
1695         ol_with_tls="$ol_arg"
1696
1697 else
1698         ol_with_tls="auto"
1699 fi
1700 # end --with-tls
1701
1702 # OpenLDAP --with-yielding_select
1703         # Check whether --with-yielding_select or --without-yielding_select was given.
1704 if test "${with_yielding_select+set}" = set; then
1705   withval="$with_yielding_select"
1706   
1707         ol_arg=invalid
1708         for ol_val in auto yes no manual  ; do
1709                 if test "$withval" = "$ol_val" ; then
1710                         ol_arg="$ol_val"
1711                 fi
1712         done
1713         if test "$ol_arg" = "invalid" ; then
1714                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1715         fi
1716         ol_with_yielding_select="$ol_arg"
1717
1718 else
1719         ol_with_yielding_select="auto"
1720 fi
1721 # end --with-yielding_select
1722
1723
1724
1725 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1726 if test "${with_xxslapdoptions+set}" = set; then
1727   withval="$with_xxslapdoptions"
1728   :
1729 fi
1730
1731 # OpenLDAP --enable-slapd
1732         # Check whether --enable-slapd or --disable-slapd was given.
1733 if test "${enable_slapd+set}" = set; then
1734   enableval="$enable_slapd"
1735   
1736         ol_arg=invalid
1737         for ol_val in auto yes no ; do
1738                 if test "$enableval" = "$ol_val" ; then
1739                         ol_arg="$ol_val"
1740                 fi
1741         done
1742         if test "$ol_arg" = "invalid" ; then
1743                 { echo "configure: error: bad value $enableval for --enable-slapd" 1>&2; exit 1; }
1744         fi
1745         ol_enable_slapd="$ol_arg"
1746
1747 else
1748         ol_enable_slapd="yes"
1749 fi
1750 # end --enable-slapd
1751 # OpenLDAP --enable-aci
1752         # Check whether --enable-aci or --disable-aci was given.
1753 if test "${enable_aci+set}" = set; then
1754   enableval="$enable_aci"
1755   
1756         ol_arg=invalid
1757         for ol_val in auto yes no ; do
1758                 if test "$enableval" = "$ol_val" ; then
1759                         ol_arg="$ol_val"
1760                 fi
1761         done
1762         if test "$ol_arg" = "invalid" ; then
1763                 { echo "configure: error: bad value $enableval for --enable-aci" 1>&2; exit 1; }
1764         fi
1765         ol_enable_aci="$ol_arg"
1766
1767 else
1768         ol_enable_aci="no"
1769 fi
1770 # end --enable-aci
1771 # OpenLDAP --enable-cleartext
1772         # Check whether --enable-cleartext or --disable-cleartext was given.
1773 if test "${enable_cleartext+set}" = set; then
1774   enableval="$enable_cleartext"
1775   
1776         ol_arg=invalid
1777         for ol_val in auto yes no ; do
1778                 if test "$enableval" = "$ol_val" ; then
1779                         ol_arg="$ol_val"
1780                 fi
1781         done
1782         if test "$ol_arg" = "invalid" ; then
1783                 { echo "configure: error: bad value $enableval for --enable-cleartext" 1>&2; exit 1; }
1784         fi
1785         ol_enable_cleartext="$ol_arg"
1786
1787 else
1788         ol_enable_cleartext="yes"
1789 fi
1790 # end --enable-cleartext
1791 # OpenLDAP --enable-crypt
1792         # Check whether --enable-crypt or --disable-crypt was given.
1793 if test "${enable_crypt+set}" = set; then
1794   enableval="$enable_crypt"
1795   
1796         ol_arg=invalid
1797         for ol_val in auto yes no ; do
1798                 if test "$enableval" = "$ol_val" ; then
1799                         ol_arg="$ol_val"
1800                 fi
1801         done
1802         if test "$ol_arg" = "invalid" ; then
1803                 { echo "configure: error: bad value $enableval for --enable-crypt" 1>&2; exit 1; }
1804         fi
1805         ol_enable_crypt="$ol_arg"
1806
1807 else
1808         ol_enable_crypt="no"
1809 fi
1810 # end --enable-crypt
1811 # OpenLDAP --enable-dynamic
1812         # Check whether --enable-dynamic or --disable-dynamic was given.
1813 if test "${enable_dynamic+set}" = set; then
1814   enableval="$enable_dynamic"
1815   
1816         ol_arg=invalid
1817         for ol_val in auto yes no ; do
1818                 if test "$enableval" = "$ol_val" ; then
1819                         ol_arg="$ol_val"
1820                 fi
1821         done
1822         if test "$ol_arg" = "invalid" ; then
1823                 { echo "configure: error: bad value $enableval for --enable-dynamic" 1>&2; exit 1; }
1824         fi
1825         ol_enable_dynamic="$ol_arg"
1826
1827 else
1828         ol_enable_dynamic="no"
1829 fi
1830 # end --enable-dynamic
1831 # OpenLDAP --enable-kpasswd
1832         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1833 if test "${enable_kpasswd+set}" = set; then
1834   enableval="$enable_kpasswd"
1835   
1836         ol_arg=invalid
1837         for ol_val in auto yes no ; do
1838                 if test "$enableval" = "$ol_val" ; then
1839                         ol_arg="$ol_val"
1840                 fi
1841         done
1842         if test "$ol_arg" = "invalid" ; then
1843                 { echo "configure: error: bad value $enableval for --enable-kpasswd" 1>&2; exit 1; }
1844         fi
1845         ol_enable_kpasswd="$ol_arg"
1846
1847 else
1848         ol_enable_kpasswd="no"
1849 fi
1850 # end --enable-kpasswd
1851 # OpenLDAP --enable-lmpasswd
1852         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1853 if test "${enable_lmpasswd+set}" = set; then
1854   enableval="$enable_lmpasswd"
1855   
1856         ol_arg=invalid
1857         for ol_val in auto yes no ; do
1858                 if test "$enableval" = "$ol_val" ; then
1859                         ol_arg="$ol_val"
1860                 fi
1861         done
1862         if test "$ol_arg" = "invalid" ; then
1863                 { echo "configure: error: bad value $enableval for --enable-lmpasswd" 1>&2; exit 1; }
1864         fi
1865         ol_enable_lmpasswd="$ol_arg"
1866
1867 else
1868         ol_enable_lmpasswd="no"
1869 fi
1870 # end --enable-lmpasswd
1871 # OpenLDAP --enable-spasswd
1872         # Check whether --enable-spasswd or --disable-spasswd was given.
1873 if test "${enable_spasswd+set}" = set; then
1874   enableval="$enable_spasswd"
1875   
1876         ol_arg=invalid
1877         for ol_val in auto yes no ; do
1878                 if test "$enableval" = "$ol_val" ; then
1879                         ol_arg="$ol_val"
1880                 fi
1881         done
1882         if test "$ol_arg" = "invalid" ; then
1883                 { echo "configure: error: bad value $enableval for --enable-spasswd" 1>&2; exit 1; }
1884         fi
1885         ol_enable_spasswd="$ol_arg"
1886
1887 else
1888         ol_enable_spasswd="no"
1889 fi
1890 # end --enable-spasswd
1891 # OpenLDAP --enable-modules
1892         # Check whether --enable-modules or --disable-modules was given.
1893 if test "${enable_modules+set}" = set; then
1894   enableval="$enable_modules"
1895   
1896         ol_arg=invalid
1897         for ol_val in auto yes no ; do
1898                 if test "$enableval" = "$ol_val" ; then
1899                         ol_arg="$ol_val"
1900                 fi
1901         done
1902         if test "$ol_arg" = "invalid" ; then
1903                 { echo "configure: error: bad value $enableval for --enable-modules" 1>&2; exit 1; }
1904         fi
1905         ol_enable_modules="$ol_arg"
1906
1907 else
1908         ol_enable_modules="no"
1909 fi
1910 # end --enable-modules
1911 # OpenLDAP --enable-phonetic
1912         # Check whether --enable-phonetic or --disable-phonetic was given.
1913 if test "${enable_phonetic+set}" = set; then
1914   enableval="$enable_phonetic"
1915   
1916         ol_arg=invalid
1917         for ol_val in auto yes no ; do
1918                 if test "$enableval" = "$ol_val" ; then
1919                         ol_arg="$ol_val"
1920                 fi
1921         done
1922         if test "$ol_arg" = "invalid" ; then
1923                 { echo "configure: error: bad value $enableval for --enable-phonetic" 1>&2; exit 1; }
1924         fi
1925         ol_enable_phonetic="$ol_arg"
1926
1927 else
1928         ol_enable_phonetic="no"
1929 fi
1930 # end --enable-phonetic
1931 # OpenLDAP --enable-rewrite
1932         # Check whether --enable-rewrite or --disable-rewrite was given.
1933 if test "${enable_rewrite+set}" = set; then
1934   enableval="$enable_rewrite"
1935   
1936         ol_arg=invalid
1937         for ol_val in auto yes no ; do
1938                 if test "$enableval" = "$ol_val" ; then
1939                         ol_arg="$ol_val"
1940                 fi
1941         done
1942         if test "$ol_arg" = "invalid" ; then
1943                 { echo "configure: error: bad value $enableval for --enable-rewrite" 1>&2; exit 1; }
1944         fi
1945         ol_enable_rewrite="$ol_arg"
1946
1947 else
1948         ol_enable_rewrite="no"
1949 fi
1950 # end --enable-rewrite
1951 # OpenLDAP --enable-rlookups
1952         # Check whether --enable-rlookups or --disable-rlookups was given.
1953 if test "${enable_rlookups+set}" = set; then
1954   enableval="$enable_rlookups"
1955   
1956         ol_arg=invalid
1957         for ol_val in auto yes no ; do
1958                 if test "$enableval" = "$ol_val" ; then
1959                         ol_arg="$ol_val"
1960                 fi
1961         done
1962         if test "$ol_arg" = "invalid" ; then
1963                 { echo "configure: error: bad value $enableval for --enable-rlookups" 1>&2; exit 1; }
1964         fi
1965         ol_enable_rlookups="$ol_arg"
1966
1967 else
1968         ol_enable_rlookups="no"
1969 fi
1970 # end --enable-rlookups
1971 # OpenLDAP --enable-slp
1972         # Check whether --enable-slp or --disable-slp was given.
1973 if test "${enable_slp+set}" = set; then
1974   enableval="$enable_slp"
1975   
1976         ol_arg=invalid
1977         for ol_val in auto yes no ; do
1978                 if test "$enableval" = "$ol_val" ; then
1979                         ol_arg="$ol_val"
1980                 fi
1981         done
1982         if test "$ol_arg" = "invalid" ; then
1983                 { echo "configure: error: bad value $enableval for --enable-slp" 1>&2; exit 1; }
1984         fi
1985         ol_enable_slp="$ol_arg"
1986
1987 else
1988         ol_enable_slp="no"
1989 fi
1990 # end --enable-slp
1991 # OpenLDAP --enable-wrappers
1992         # Check whether --enable-wrappers or --disable-wrappers was given.
1993 if test "${enable_wrappers+set}" = set; then
1994   enableval="$enable_wrappers"
1995   
1996         ol_arg=invalid
1997         for ol_val in auto yes no ; do
1998                 if test "$enableval" = "$ol_val" ; then
1999                         ol_arg="$ol_val"
2000                 fi
2001         done
2002         if test "$ol_arg" = "invalid" ; then
2003                 { echo "configure: error: bad value $enableval for --enable-wrappers" 1>&2; exit 1; }
2004         fi
2005         ol_enable_wrappers="$ol_arg"
2006
2007 else
2008         ol_enable_wrappers="no"
2009 fi
2010 # end --enable-wrappers
2011
2012 # OpenLDAP --enable-bdb
2013         # Check whether --enable-bdb or --disable-bdb was given.
2014 if test "${enable_bdb+set}" = set; then
2015   enableval="$enable_bdb"
2016   
2017         ol_arg=invalid
2018         for ol_val in auto yes no ; do
2019                 if test "$enableval" = "$ol_val" ; then
2020                         ol_arg="$ol_val"
2021                 fi
2022         done
2023         if test "$ol_arg" = "invalid" ; then
2024                 { echo "configure: error: bad value $enableval for --enable-bdb" 1>&2; exit 1; }
2025         fi
2026         ol_enable_bdb="$ol_arg"
2027
2028 else
2029         ol_enable_bdb="yes"
2030 fi
2031 # end --enable-bdb
2032 # OpenLDAP --with-bdb_module
2033         # Check whether --with-bdb_module or --without-bdb_module was given.
2034 if test "${with_bdb_module+set}" = set; then
2035   withval="$with_bdb_module"
2036   
2037         ol_arg=invalid
2038         for ol_val in static dynamic ; do
2039                 if test "$withval" = "$ol_val" ; then
2040                         ol_arg="$ol_val"
2041                 fi
2042         done
2043         if test "$ol_arg" = "invalid" ; then
2044                 { echo "configure: error: bad value $withval for --with-bdb_module" 1>&2; exit 1; }
2045         fi
2046         ol_with_bdb_module="$ol_arg"
2047
2048 else
2049         ol_with_bdb_module="static"
2050 fi
2051 # end --with-bdb_module
2052
2053 # OpenLDAP --enable-dnssrv
2054         # Check whether --enable-dnssrv or --disable-dnssrv was given.
2055 if test "${enable_dnssrv+set}" = set; then
2056   enableval="$enable_dnssrv"
2057   
2058         ol_arg=invalid
2059         for ol_val in auto yes no ; do
2060                 if test "$enableval" = "$ol_val" ; then
2061                         ol_arg="$ol_val"
2062                 fi
2063         done
2064         if test "$ol_arg" = "invalid" ; then
2065                 { echo "configure: error: bad value $enableval for --enable-dnssrv" 1>&2; exit 1; }
2066         fi
2067         ol_enable_dnssrv="$ol_arg"
2068
2069 else
2070         ol_enable_dnssrv="no"
2071 fi
2072 # end --enable-dnssrv
2073 # OpenLDAP --with-dnssrv_module
2074         # Check whether --with-dnssrv_module or --without-dnssrv_module was given.
2075 if test "${with_dnssrv_module+set}" = set; then
2076   withval="$with_dnssrv_module"
2077   
2078         ol_arg=invalid
2079         for ol_val in static dynamic ; do
2080                 if test "$withval" = "$ol_val" ; then
2081                         ol_arg="$ol_val"
2082                 fi
2083         done
2084         if test "$ol_arg" = "invalid" ; then
2085                 { echo "configure: error: bad value $withval for --with-dnssrv_module" 1>&2; exit 1; }
2086         fi
2087         ol_with_dnssrv_module="$ol_arg"
2088
2089 else
2090         ol_with_dnssrv_module="static"
2091 fi
2092 # end --with-dnssrv_module
2093
2094 # OpenLDAP --enable-ldap
2095         # Check whether --enable-ldap or --disable-ldap was given.
2096 if test "${enable_ldap+set}" = set; then
2097   enableval="$enable_ldap"
2098   
2099         ol_arg=invalid
2100         for ol_val in auto yes no ; do
2101                 if test "$enableval" = "$ol_val" ; then
2102                         ol_arg="$ol_val"
2103                 fi
2104         done
2105         if test "$ol_arg" = "invalid" ; then
2106                 { echo "configure: error: bad value $enableval for --enable-ldap" 1>&2; exit 1; }
2107         fi
2108         ol_enable_ldap="$ol_arg"
2109
2110 else
2111         ol_enable_ldap="no"
2112 fi
2113 # end --enable-ldap
2114 # OpenLDAP --with-ldap_module
2115         # Check whether --with-ldap_module or --without-ldap_module was given.
2116 if test "${with_ldap_module+set}" = set; then
2117   withval="$with_ldap_module"
2118   
2119         ol_arg=invalid
2120         for ol_val in static dynamic ; do
2121                 if test "$withval" = "$ol_val" ; then
2122                         ol_arg="$ol_val"
2123                 fi
2124         done
2125         if test "$ol_arg" = "invalid" ; then
2126                 { echo "configure: error: bad value $withval for --with-ldap_module" 1>&2; exit 1; }
2127         fi
2128         ol_with_ldap_module="$ol_arg"
2129
2130 else
2131         ol_with_ldap_module="static"
2132 fi
2133 # end --with-ldap_module
2134
2135 # OpenLDAP --enable-ldbm
2136         # Check whether --enable-ldbm or --disable-ldbm was given.
2137 if test "${enable_ldbm+set}" = set; then
2138   enableval="$enable_ldbm"
2139   
2140         ol_arg=invalid
2141         for ol_val in auto yes no ; do
2142                 if test "$enableval" = "$ol_val" ; then
2143                         ol_arg="$ol_val"
2144                 fi
2145         done
2146         if test "$ol_arg" = "invalid" ; then
2147                 { echo "configure: error: bad value $enableval for --enable-ldbm" 1>&2; exit 1; }
2148         fi
2149         ol_enable_ldbm="$ol_arg"
2150
2151 else
2152         ol_enable_ldbm="no"
2153 fi
2154 # end --enable-ldbm
2155 # OpenLDAP --with-ldbm_api
2156         # Check whether --with-ldbm_api or --without-ldbm_api was given.
2157 if test "${with_ldbm_api+set}" = set; then
2158   withval="$with_ldbm_api"
2159   
2160         ol_arg=invalid
2161         for ol_val in auto berkeley bcompat mdbm gdbm ; do
2162                 if test "$withval" = "$ol_val" ; then
2163                         ol_arg="$ol_val"
2164                 fi
2165         done
2166         if test "$ol_arg" = "invalid" ; then
2167                 { echo "configure: error: bad value $withval for --with-ldbm_api" 1>&2; exit 1; }
2168         fi
2169         ol_with_ldbm_api="$ol_arg"
2170
2171 else
2172         ol_with_ldbm_api="auto"
2173 fi
2174 # end --with-ldbm_api
2175
2176 # OpenLDAP --with-ldbm_module
2177         # Check whether --with-ldbm_module or --without-ldbm_module was given.
2178 if test "${with_ldbm_module+set}" = set; then
2179   withval="$with_ldbm_module"
2180   
2181         ol_arg=invalid
2182         for ol_val in static dynamic ; do
2183                 if test "$withval" = "$ol_val" ; then
2184                         ol_arg="$ol_val"
2185                 fi
2186         done
2187         if test "$ol_arg" = "invalid" ; then
2188                 { echo "configure: error: bad value $withval for --with-ldbm_module" 1>&2; exit 1; }
2189         fi
2190         ol_with_ldbm_module="$ol_arg"
2191
2192 else
2193         ol_with_ldbm_module="static"
2194 fi
2195 # end --with-ldbm_module
2196
2197 # OpenLDAP --with-ldbm_type
2198         # Check whether --with-ldbm_type or --without-ldbm_type was given.
2199 if test "${with_ldbm_type+set}" = set; then
2200   withval="$with_ldbm_type"
2201   
2202         ol_arg=invalid
2203         for ol_val in auto btree hash ; do
2204                 if test "$withval" = "$ol_val" ; then
2205                         ol_arg="$ol_val"
2206                 fi
2207         done
2208         if test "$ol_arg" = "invalid" ; then
2209                 { echo "configure: error: bad value $withval for --with-ldbm_type" 1>&2; exit 1; }
2210         fi
2211         ol_with_ldbm_type="$ol_arg"
2212
2213 else
2214         ol_with_ldbm_type="auto"
2215 fi
2216 # end --with-ldbm_type
2217
2218 # OpenLDAP --enable-meta
2219         # Check whether --enable-meta or --disable-meta was given.
2220 if test "${enable_meta+set}" = set; then
2221   enableval="$enable_meta"
2222   
2223         ol_arg=invalid
2224         for ol_val in auto yes no ; do
2225                 if test "$enableval" = "$ol_val" ; then
2226                         ol_arg="$ol_val"
2227                 fi
2228         done
2229         if test "$ol_arg" = "invalid" ; then
2230                 { echo "configure: error: bad value $enableval for --enable-meta" 1>&2; exit 1; }
2231         fi
2232         ol_enable_meta="$ol_arg"
2233
2234 else
2235         ol_enable_meta="no"
2236 fi
2237 # end --enable-meta
2238 # OpenLDAP --with-meta_module
2239         # Check whether --with-meta_module or --without-meta_module was given.
2240 if test "${with_meta_module+set}" = set; then
2241   withval="$with_meta_module"
2242   
2243         ol_arg=invalid
2244         for ol_val in static dynamic ; do
2245                 if test "$withval" = "$ol_val" ; then
2246                         ol_arg="$ol_val"
2247                 fi
2248         done
2249         if test "$ol_arg" = "invalid" ; then
2250                 { echo "configure: error: bad value $withval for --with-meta_module" 1>&2; exit 1; }
2251         fi
2252         ol_with_meta_module="$ol_arg"
2253
2254 else
2255         ol_with_meta_module="static"
2256 fi
2257 # end --with-meta_module
2258
2259 # OpenLDAP --enable-monitor
2260         # Check whether --enable-monitor or --disable-monitor was given.
2261 if test "${enable_monitor+set}" = set; then
2262   enableval="$enable_monitor"
2263   
2264         ol_arg=invalid
2265         for ol_val in auto yes no ; do
2266                 if test "$enableval" = "$ol_val" ; then
2267                         ol_arg="$ol_val"
2268                 fi
2269         done
2270         if test "$ol_arg" = "invalid" ; then
2271                 { echo "configure: error: bad value $enableval for --enable-monitor" 1>&2; exit 1; }
2272         fi
2273         ol_enable_monitor="$ol_arg"
2274
2275 else
2276         ol_enable_monitor="no"
2277 fi
2278 # end --enable-monitor
2279 # OpenLDAP --with-monitor_module
2280         # Check whether --with-monitor_module or --without-monitor_module was given.
2281 if test "${with_monitor_module+set}" = set; then
2282   withval="$with_monitor_module"
2283   
2284         ol_arg=invalid
2285         for ol_val in static dynamic ; do
2286                 if test "$withval" = "$ol_val" ; then
2287                         ol_arg="$ol_val"
2288                 fi
2289         done
2290         if test "$ol_arg" = "invalid" ; then
2291                 { echo "configure: error: bad value $withval for --with-monitor_module" 1>&2; exit 1; }
2292         fi
2293         ol_with_monitor_module="$ol_arg"
2294
2295 else
2296         ol_with_monitor_module="static"
2297 fi
2298 # end --with-monitor_module
2299
2300 # OpenLDAP --enable-null
2301         # Check whether --enable-null or --disable-null was given.
2302 if test "${enable_null+set}" = set; then
2303   enableval="$enable_null"
2304   
2305         ol_arg=invalid
2306         for ol_val in auto yes no ; do
2307                 if test "$enableval" = "$ol_val" ; then
2308                         ol_arg="$ol_val"
2309                 fi
2310         done
2311         if test "$ol_arg" = "invalid" ; then
2312                 { echo "configure: error: bad value $enableval for --enable-null" 1>&2; exit 1; }
2313         fi
2314         ol_enable_null="$ol_arg"
2315
2316 else
2317         ol_enable_null="no"
2318 fi
2319 # end --enable-null
2320 # OpenLDAP --with-null_module
2321         # Check whether --with-null_module or --without-null_module was given.
2322 if test "${with_null_module+set}" = set; then
2323   withval="$with_null_module"
2324   
2325         ol_arg=invalid
2326         for ol_val in static dynamic ; do
2327                 if test "$withval" = "$ol_val" ; then
2328                         ol_arg="$ol_val"
2329                 fi
2330         done
2331         if test "$ol_arg" = "invalid" ; then
2332                 { echo "configure: error: bad value $withval for --with-null_module" 1>&2; exit 1; }
2333         fi
2334         ol_with_null_module="$ol_arg"
2335
2336 else
2337         ol_with_null_module="static"
2338 fi
2339 # end --with-null_module
2340
2341 # OpenLDAP --enable-passwd
2342         # Check whether --enable-passwd or --disable-passwd was given.
2343 if test "${enable_passwd+set}" = set; then
2344   enableval="$enable_passwd"
2345   
2346         ol_arg=invalid
2347         for ol_val in auto yes no ; do
2348                 if test "$enableval" = "$ol_val" ; then
2349                         ol_arg="$ol_val"
2350                 fi
2351         done
2352         if test "$ol_arg" = "invalid" ; then
2353                 { echo "configure: error: bad value $enableval for --enable-passwd" 1>&2; exit 1; }
2354         fi
2355         ol_enable_passwd="$ol_arg"
2356
2357 else
2358         ol_enable_passwd="no"
2359 fi
2360 # end --enable-passwd
2361 # OpenLDAP --with-passwd_module
2362         # Check whether --with-passwd_module or --without-passwd_module was given.
2363 if test "${with_passwd_module+set}" = set; then
2364   withval="$with_passwd_module"
2365   
2366         ol_arg=invalid
2367         for ol_val in static dynamic ; do
2368                 if test "$withval" = "$ol_val" ; then
2369                         ol_arg="$ol_val"
2370                 fi
2371         done
2372         if test "$ol_arg" = "invalid" ; then
2373                 { echo "configure: error: bad value $withval for --with-passwd_module" 1>&2; exit 1; }
2374         fi
2375         ol_with_passwd_module="$ol_arg"
2376
2377 else
2378         ol_with_passwd_module="static"
2379 fi
2380 # end --with-passwd_module
2381
2382 # OpenLDAP --enable-perl
2383         # Check whether --enable-perl or --disable-perl was given.
2384 if test "${enable_perl+set}" = set; then
2385   enableval="$enable_perl"
2386   
2387         ol_arg=invalid
2388         for ol_val in auto yes no ; do
2389                 if test "$enableval" = "$ol_val" ; then
2390                         ol_arg="$ol_val"
2391                 fi
2392         done
2393         if test "$ol_arg" = "invalid" ; then
2394                 { echo "configure: error: bad value $enableval for --enable-perl" 1>&2; exit 1; }
2395         fi
2396         ol_enable_perl="$ol_arg"
2397
2398 else
2399         ol_enable_perl="no"
2400 fi
2401 # end --enable-perl
2402 # OpenLDAP --with-perl_module
2403         # Check whether --with-perl_module or --without-perl_module was given.
2404 if test "${with_perl_module+set}" = set; then
2405   withval="$with_perl_module"
2406   
2407         ol_arg=invalid
2408         for ol_val in static dynamic ; do
2409                 if test "$withval" = "$ol_val" ; then
2410                         ol_arg="$ol_val"
2411                 fi
2412         done
2413         if test "$ol_arg" = "invalid" ; then
2414                 { echo "configure: error: bad value $withval for --with-perl_module" 1>&2; exit 1; }
2415         fi
2416         ol_with_perl_module="$ol_arg"
2417
2418 else
2419         ol_with_perl_module="static"
2420 fi
2421 # end --with-perl_module
2422
2423 # OpenLDAP --enable-shell
2424         # Check whether --enable-shell or --disable-shell was given.
2425 if test "${enable_shell+set}" = set; then
2426   enableval="$enable_shell"
2427   
2428         ol_arg=invalid
2429         for ol_val in auto yes no ; do
2430                 if test "$enableval" = "$ol_val" ; then
2431                         ol_arg="$ol_val"
2432                 fi
2433         done
2434         if test "$ol_arg" = "invalid" ; then
2435                 { echo "configure: error: bad value $enableval for --enable-shell" 1>&2; exit 1; }
2436         fi
2437         ol_enable_shell="$ol_arg"
2438
2439 else
2440         ol_enable_shell="no"
2441 fi
2442 # end --enable-shell
2443 # OpenLDAP --with-shell_module
2444         # Check whether --with-shell_module or --without-shell_module was given.
2445 if test "${with_shell_module+set}" = set; then
2446   withval="$with_shell_module"
2447   
2448         ol_arg=invalid
2449         for ol_val in static dynamic ; do
2450                 if test "$withval" = "$ol_val" ; then
2451                         ol_arg="$ol_val"
2452                 fi
2453         done
2454         if test "$ol_arg" = "invalid" ; then
2455                 { echo "configure: error: bad value $withval for --with-shell_module" 1>&2; exit 1; }
2456         fi
2457         ol_with_shell_module="$ol_arg"
2458
2459 else
2460         ol_with_shell_module="static"
2461 fi
2462 # end --with-shell_module
2463
2464 # OpenLDAP --enable-sql
2465         # Check whether --enable-sql or --disable-sql was given.
2466 if test "${enable_sql+set}" = set; then
2467   enableval="$enable_sql"
2468   
2469         ol_arg=invalid
2470         for ol_val in auto yes no ; do
2471                 if test "$enableval" = "$ol_val" ; then
2472                         ol_arg="$ol_val"
2473                 fi
2474         done
2475         if test "$ol_arg" = "invalid" ; then
2476                 { echo "configure: error: bad value $enableval for --enable-sql" 1>&2; exit 1; }
2477         fi
2478         ol_enable_sql="$ol_arg"
2479
2480 else
2481         ol_enable_sql="no"
2482 fi
2483 # end --enable-sql
2484 # OpenLDAP --with-sql_module
2485         # Check whether --with-sql_module or --without-sql_module was given.
2486 if test "${with_sql_module+set}" = set; then
2487   withval="$with_sql_module"
2488   
2489         ol_arg=invalid
2490         for ol_val in static dynamic ; do
2491                 if test "$withval" = "$ol_val" ; then
2492                         ol_arg="$ol_val"
2493                 fi
2494         done
2495         if test "$ol_arg" = "invalid" ; then
2496                 { echo "configure: error: bad value $withval for --with-sql_module" 1>&2; exit 1; }
2497         fi
2498         ol_with_sql_module="$ol_arg"
2499
2500 else
2501         ol_with_sql_module="static"
2502 fi
2503 # end --with-sql_module
2504
2505 # OpenLDAP --enable-tcl
2506         # Check whether --enable-tcl or --disable-tcl was given.
2507 if test "${enable_tcl+set}" = set; then
2508   enableval="$enable_tcl"
2509   
2510         ol_arg=invalid
2511         for ol_val in auto yes no ; do
2512                 if test "$enableval" = "$ol_val" ; then
2513                         ol_arg="$ol_val"
2514                 fi
2515         done
2516         if test "$ol_arg" = "invalid" ; then
2517                 { echo "configure: error: bad value $enableval for --enable-tcl" 1>&2; exit 1; }
2518         fi
2519         ol_enable_tcl="$ol_arg"
2520
2521 else
2522         ol_enable_tcl="no"
2523 fi
2524 # end --enable-tcl
2525 # OpenLDAP --with-tcl_module
2526         # Check whether --with-tcl_module or --without-tcl_module was given.
2527 if test "${with_tcl_module+set}" = set; then
2528   withval="$with_tcl_module"
2529   
2530         ol_arg=invalid
2531         for ol_val in static dynamic ; do
2532                 if test "$withval" = "$ol_val" ; then
2533                         ol_arg="$ol_val"
2534                 fi
2535         done
2536         if test "$ol_arg" = "invalid" ; then
2537                 { echo "configure: error: bad value $withval for --with-tcl_module" 1>&2; exit 1; }
2538         fi
2539         ol_with_tcl_module="$ol_arg"
2540
2541 else
2542         ol_with_tcl_module="static"
2543 fi
2544 # end --with-tcl_module
2545
2546
2547 # Check whether --with-xxslurpdoptions or --without-xxslurpdoptions was given.
2548 if test "${with_xxslurpdoptions+set}" = set; then
2549   withval="$with_xxslurpdoptions"
2550   :
2551 fi
2552
2553 # OpenLDAP --enable-slurpd
2554         # Check whether --enable-slurpd or --disable-slurpd was given.
2555 if test "${enable_slurpd+set}" = set; then
2556   enableval="$enable_slurpd"
2557   
2558         ol_arg=invalid
2559         for ol_val in auto yes no ; do
2560                 if test "$enableval" = "$ol_val" ; then
2561                         ol_arg="$ol_val"
2562                 fi
2563         done
2564         if test "$ol_arg" = "invalid" ; then
2565                 { echo "configure: error: bad value $enableval for --enable-slurpd" 1>&2; exit 1; }
2566         fi
2567         ol_enable_slurpd="$ol_arg"
2568
2569 else
2570         ol_enable_slurpd="auto"
2571 fi
2572 # end --enable-slurpd
2573
2574 # Check whether --with-xxliboptions or --without-xxliboptions was given.
2575 if test "${with_xxliboptions+set}" = set; then
2576   withval="$with_xxliboptions"
2577   :
2578 fi
2579
2580 # Check whether --enable-static or --disable-static was given.
2581 if test "${enable_static+set}" = set; then
2582   enableval="$enable_static"
2583   p=${PACKAGE-default}
2584 case $enableval in
2585 yes) enable_static=yes ;;
2586 no) enable_static=no ;;
2587 *)
2588   enable_static=no
2589   # Look at the argument we got.  We use all the common list separators.
2590   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2591   for pkg in $enableval; do
2592     if test "X$pkg" = "X$p"; then
2593       enable_static=yes
2594     fi
2595   done
2596   IFS="$ac_save_ifs"
2597   ;;
2598 esac
2599 else
2600   enable_static=yes
2601 fi
2602
2603 # Check whether --enable-shared or --disable-shared was given.
2604 if test "${enable_shared+set}" = set; then
2605   enableval="$enable_shared"
2606   p=${PACKAGE-default}
2607 case $enableval in
2608 yes) enable_shared=yes ;;
2609 no) enable_shared=no ;;
2610 *)
2611   enable_shared=no
2612   # Look at the argument we got.  We use all the common list separators.
2613   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
2614   for pkg in $enableval; do
2615     if test "X$pkg" = "X$p"; then
2616       enable_shared=yes
2617     fi
2618   done
2619   IFS="$ac_save_ifs"
2620   ;;
2621 esac
2622 else
2623   enable_shared=yes
2624 fi
2625
2626
2627
2628 # validate options
2629 if test $ol_enable_slapd = no ; then
2630                 if test $ol_enable_bdb = yes ; then
2631                 echo "configure: warning: slapd disabled, ignoring --enable-bdb argument" 1>&2
2632         fi
2633         if test $ol_enable_dnssrv = yes ; then
2634                 echo "configure: warning: slapd disabled, ignoring --enable-dnssrv argument" 1>&2
2635         fi
2636         if test $ol_enable_ldap = yes ; then
2637                 echo "configure: warning: slapd disabled, ignoring --enable-ldap argument" 1>&2
2638         fi
2639         if test $ol_enable_ldbm = yes ; then
2640                 echo "configure: warning: slapd disabled, ignoring --enable-ldbm argument" 1>&2
2641         fi
2642         if test $ol_enable_meta = yes ; then
2643                 echo "configure: warning: slapd disabled, ignoring --enable-meta argument" 1>&2
2644         fi
2645         if test $ol_enable_monitor = yes ; then
2646                 echo "configure: warning: slapd disabled, ignoring --enable-monitor argument" 1>&2
2647         fi
2648         if test $ol_enable_null = yes ; then
2649                 echo "configure: warning: slapd disabled, ignoring --enable-null argument" 1>&2
2650         fi
2651         if test $ol_enable_passwd = yes ; then
2652                 echo "configure: warning: slapd disabled, ignoring --enable-passwd argument" 1>&2
2653         fi
2654         if test $ol_enable_perl = yes ; then
2655                 echo "configure: warning: slapd disabled, ignoring --enable-perl argument" 1>&2
2656         fi
2657         if test $ol_enable_shell = yes ; then
2658                 echo "configure: warning: slapd disabled, ignoring --enable-shell argument" 1>&2
2659         fi
2660         if test $ol_enable_tcl = yes ; then
2661                 echo "configure: warning: slapd disabled, ignoring --enable-tcl argument" 1>&2
2662         fi
2663         if test $ol_enable_sql = yes ; then
2664                 echo "configure: warning: slapd disabled, ignoring --enable-sql argument" 1>&2
2665         fi
2666         if test $ol_enable_modules = yes ; then
2667                 echo "configure: warning: slapd disabled, ignoring --enable-modules argument" 1>&2
2668         fi
2669         if test $ol_enable_wrappers = yes ; then
2670                 echo "configure: warning: slapd disabled, ignoring --enable-wrappers argument" 1>&2
2671         fi
2672         if test $ol_enable_phonetic = yes ; then
2673                 echo "configure: warning: slapd disabled, ignoring --enable-phonetic argument" 1>&2
2674         fi
2675         if test $ol_enable_rlookups = yes ; then
2676                 echo "configure: warning: slapd disabled, ignoring --enable-rlookups argument" 1>&2
2677         fi
2678         if test $ol_enable_aci = yes ; then
2679                 echo "configure: warning: slapd disabled, ignoring --enable-aci argument" 1>&2
2680         fi
2681         if test $ol_with_ldbm_api != auto ; then
2682                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-api argument" 1>&2
2683         fi
2684         if test $ol_with_ldbm_type != auto ; then
2685                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-type argument" 1>&2
2686         fi
2687         if test $ol_with_bdb_module != static ; then
2688                 echo "configure: warning: slapd disabled, ignoring --with-bdb-module argument" 1>&2
2689         fi
2690         if test $ol_with_dnssrv_module != static ; then
2691                 echo "configure: warning: slapd disabled, ignoring --with-dnssrv-module argument" 1>&2
2692         fi
2693         if test $ol_with_ldap_module != static ; then
2694                 echo "configure: warning: slapd disabled, ignoring --with-ldap-module argument" 1>&2
2695         fi
2696         if test $ol_with_ldbm_module != static ; then
2697                 echo "configure: warning: slapd disabled, ignoring --with-ldbm-module argument" 1>&2
2698         fi
2699         if test $ol_with_meta_module != static ; then
2700                 echo "configure: warning: slapd disabled, ignoring --with-meta-module argument" 1>&2
2701         fi
2702         if test $ol_with_monitor_module != static ; then
2703                 echo "configure: warning: slapd disabled, ignoring --with-monitor-module argument" 1>&2
2704         fi
2705         if test $ol_with_null_module != static ; then
2706                 echo "configure: warning: slapd disabled, ignoring --with-null-module argument" 1>&2
2707         fi
2708         if test $ol_with_passwd_module != static ; then
2709                 echo "configure: warning: slapd disabled, ignoring --with-passwd-module argument" 1>&2
2710         fi
2711         if test $ol_with_perl_module != static ; then
2712                 echo "configure: warning: slapd disabled, ignoring --with-perl-module argument" 1>&2
2713         fi
2714         if test $ol_with_shell_module != static ; then
2715                 echo "configure: warning: slapd disabled, ignoring --with-shell-module argument" 1>&2
2716         fi
2717         if test $ol_with_tcl_module != static ; then
2718                 echo "configure: warning: slapd disabled, ignoring --with-tcl-module argument" 1>&2
2719         fi
2720         if test $ol_with_sql_module != static ; then
2721                 echo "configure: warning: slapd disabled, ignoring --with-sql-module argument" 1>&2
2722         fi
2723         if test $ol_enable_slurpd = yes ; then
2724                 { echo "configure: error: slurpd requires slapd" 1>&2; exit 1; }
2725         fi
2726         if test $ol_enable_rewrite = yes ; then
2727                 echo "configure: warning: slapd disabled, ignoring --enable-rewrite argument" 1>&2
2728         fi
2729
2730         # force settings to no
2731         ol_enable_bdb=no
2732         ol_enable_dnssrv=no
2733         ol_enable_ldap=no
2734         ol_enable_ldbm=no
2735         ol_enable_meta=no
2736         ol_enable_monitor=no
2737         ol_enable_null=no
2738         ol_enable_passwd=no
2739         ol_enable_perl=no
2740         ol_enable_shell=no
2741         ol_enable_tcl=no
2742         ol_enable_sql=no
2743
2744         ol_enable_modules=no
2745         ol_enable_phonetic=no
2746         ol_enable_rlookups=no
2747         ol_enable_aci=no
2748         ol_enable_wrappers=no
2749         ol_enable_dynamic=no
2750
2751         ol_with_ldbm_api=no
2752         ol_with_ldbm_type=no
2753
2754         ol_with_bdb_module=static
2755         ol_with_dnssrv_module=static
2756         ol_with_ldap_module=static
2757         ol_with_ldbm_module=static
2758         ol_with_meta_module=static
2759         ol_with_monitor_module=static
2760         ol_with_null_module=static
2761         ol_with_passwd_module=static
2762         ol_with_perl_module=static
2763         ol_with_shell_module=static
2764         ol_with_tcl_module=static
2765         ol_with_sql_module=static
2766
2767         ol_enable_slurpd=no
2768
2769         ol_enable_rewrite=no
2770
2771 elif test $ol_enable_ldbm = no ; then
2772         
2773         if test $ol_with_ldbm_api != auto ; then
2774                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-api argument" 1>&2
2775         fi
2776
2777         if test $ol_with_ldbm_type != auto ; then
2778                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-type argument" 1>&2
2779         fi
2780
2781         if test $ol_with_ldbm_module != static ; then
2782                 echo "configure: warning: LDBM disabled, ignoring --with-ldbm-module argument" 1>&2
2783         fi
2784
2785         if test $ol_enable_modules != yes -a \
2786                 $ol_enable_bdb = no -a \
2787                 $ol_enable_dnssrv = no -a \
2788                 $ol_enable_ldap = no -a \
2789                 $ol_enable_meta = no -a \
2790                 $ol_enable_monitor = no -a \
2791                 $ol_enable_null = no -a \
2792                 $ol_enable_passwd = no -a \
2793                 $ol_enable_perl = no -a \
2794                 $ol_enable_shell = no -a \
2795                 $ol_enable_sql = no -a \
2796                 $ol_enable_tcl = no ; then
2797
2798                 if test $ol_enable_slapd = yes ; then
2799                         { echo "configure: error: slapd requires a backend" 1>&2; exit 1; }
2800                 else
2801                         echo "configure: warning: skipping slapd, no backend specified" 1>&2
2802                         ol_enable_slapd=no
2803                 fi
2804         fi
2805
2806         ol_with_ldbm_api=no
2807         ol_with_ldbm_type=no
2808         ol_with_ldbm_module=static
2809
2810         if test $ol_enable_bdb != no ; then
2811                 ol_with_ldbm_api=berkeley
2812         fi
2813
2814 else
2815                 if test $ol_with_ldbm_api = gdbm -a \
2816                 $ol_with_ldbm_type = btree ; then
2817                 { echo "configure: error: GDBM only supports LDBM type hash" 1>&2; exit 1; }
2818         fi
2819         if test $ol_with_ldbm_api = mdbm -a \
2820                 $ol_with_ldbm_type = btree ; then
2821                 { echo "configure: error: MDBM only supports LDBM type hash" 1>&2; exit 1; }
2822         fi
2823         if test $ol_with_ldbm_api = ndbm -a \
2824                 $ol_with_ldbm_type = btree ; then
2825                 { echo "configure: error: NDBM only supports LDBM type hash" 1>&2; exit 1; }
2826         fi
2827
2828         if test $ol_enable_bdb = yes ; then
2829                 if test $ol_with_ldbm_api = auto ; then
2830                         ol_with_ldbm_api=berkeley
2831                 elif test $ol_with_ldbm_api != berkeley ; then
2832                         { echo "configure: error: LDBM API not compatible with BDB" 1>&2; exit 1; }
2833                 fi
2834
2835         elif test $ol_enable_bdb = auto ; then
2836                 if test $ol_with_ldbm_api != berkeley \
2837                         -o $ol_with_ldbm_api != auto ; then
2838                         echo "configure: warning: LDBM API not compatible with BDB, disabling BDB" 1>&2
2839                         ol_enable_bdb=no
2840                 fi
2841         fi
2842 fi
2843
2844 if test $ol_enable_slurpd = yes ; then
2845                 if test $ol_with_threads = no ; then
2846                 { echo "configure: error: slurpd requires threads" 1>&2; exit 1; }
2847         fi
2848 fi
2849
2850 if test $ol_enable_lmpasswd = yes ; then
2851         if test $ol_with_tls = no ; then
2852                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
2853         fi
2854 fi
2855
2856 if test $ol_enable_kbind = yes -o $ol_enable_kpasswd = yes ; then
2857         if test $ol_with_kerberos = no ; then
2858                 { echo "configure: error: options require --with-kerberos" 1>&2; exit 1; }
2859         elif test $ol_with_kerberos = auto ; then
2860                 ol_with_kerberos=yes
2861         fi
2862
2863 elif test $ol_enable_kbind = no -o $ol_enable_kpasswd = no ; then
2864         if test $ol_with_kerberos = auto ; then
2865                 ol_with_kerberos=no
2866         elif test $ol_with_kerberos != no ; then
2867                 echo "configure: warning: Kerberos detection enabled unnecessarily" 1>&2;
2868                 ol_with_kerberos=no
2869         fi
2870 fi
2871
2872 if test $ol_enable_spasswd = yes ; then
2873         if test $ol_with_cyrus_sasl = no ; then
2874                 { echo "configure: error: options require --with-cyrus-sasl" 1>&2; exit 1; }
2875         fi
2876         ol_with_cyrus_sasl=yes
2877 fi
2878
2879 echo "$ac_t""done" 1>&6
2880
2881 LDAP_LIBS=
2882 LDIF_LIBS=
2883 LDBM_LIB=
2884 LDBM_LIBS=
2885 LTHREAD_LIBS=
2886 LUTIL_LIBS=
2887
2888 SLAPD_LIBS=
2889 SLURPD_LIBS=
2890
2891 BUILD_SLAPD=no
2892 BUILD_SLURPD=no
2893
2894 BUILD_THREAD=no
2895
2896 BUILD_BDB=no
2897 BUILD_DNSSRV=no
2898 BUILD_LDAP=no
2899 BUILD_LDBM=no
2900 BUILD_META=no
2901 BUILD_MONITOR=no
2902 BUILD_NULL=no
2903 BUILD_PASSWD=no
2904 BUILD_PERL=no
2905 BUILD_SHELL=no
2906 BUILD_SQL=no
2907 BUILD_TCL=no
2908
2909 BUILD_BDB_DYNAMIC=static
2910 BUILD_DNSSRV_DYNAMIC=static
2911 BUILD_LDAP_DYNAMIC=static
2912 BUILD_LDBM_DYNAMIC=static
2913 BUILD_META_DYNAMIC=static
2914 BUILD_MONITOR_DYNAMIC=static
2915 BUILD_NULL_DYNAMIC=static
2916 BUILD_PASSWD_DYNAMIC=static
2917 BUILD_PERL_DYNAMIC=static
2918 BUILD_SHELL_DYNAMIC=static
2919 BUILD_TCL_DYNAMIC=static
2920 BUILD_SQL_DYNAMIC=static
2921
2922 SLAPD_MODULES_LDFLAGS=
2923 SLAPD_MODULES_CPPFLAGS=
2924
2925 SLAPD_STATIC_BACKENDS=
2926 SLAPD_DYNAMIC_BACKENDS=
2927
2928 SLAPD_PERL_LDFLAGS=
2929 MOD_PERL_LDFLAGS=
2930 PERL_CPPFLAGS=
2931
2932 SLAPD_SQL_LDFLAGS=
2933 SLAPD_SQL_LIBS=
2934 SLAPD_SQL_INCLUDES=
2935
2936 MOD_TCL_LIB=
2937 KRB4_LIBS=
2938 KRB5_LIBS=
2939 READLINE_LIBS=
2940 SASL_LIBS=
2941 TERMCAP_LIBS=
2942 TLS_LIBS=
2943 MODULES_LIBS=
2944 AUTH_LIBS=
2945
2946 SLAPD_SLP_LIBS=
2947
2948
2949 # Find a good install program.  We prefer a C program (faster),
2950 # so one script is as good as another.  But avoid the broken or
2951 # incompatible versions:
2952 # SysV /etc/install, /usr/sbin/install
2953 # SunOS /usr/etc/install
2954 # IRIX /sbin/install
2955 # AIX /bin/install
2956 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2957 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2958 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2959 # ./install, which can be erroneously created by make from ./install.sh.
2960 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2961 echo "configure:2962: checking for a BSD compatible install" >&5
2962 if test -z "$INSTALL"; then
2963 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2964   echo $ac_n "(cached) $ac_c" 1>&6
2965 else
2966     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2967   for ac_dir in $PATH; do
2968     # Account for people who put trailing slashes in PATH elements.
2969     case "$ac_dir/" in
2970     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2971     *)
2972       # OSF1 and SCO ODT 3.0 have their own names for install.
2973       # Don't use installbsd from OSF since it installs stuff as root
2974       # by default.
2975       for ac_prog in ginstall scoinst install; do
2976         if test -f $ac_dir/$ac_prog; then
2977           if test $ac_prog = install &&
2978             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2979             # AIX install.  It has an incompatible calling convention.
2980             :
2981           elif test $ac_prog = install &&
2982             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2983             # program-specific install script used by HP pwplus--don't use.
2984             :
2985           else
2986             ac_cv_path_install="$ac_dir/$ac_prog -c"
2987             break 2
2988           fi
2989         fi
2990       done
2991       ;;
2992     esac
2993   done
2994   IFS="$ac_save_IFS"
2995
2996 fi
2997   if test "${ac_cv_path_install+set}" = set; then
2998     INSTALL="$ac_cv_path_install"
2999   else
3000     # As a last resort, use the slow shell script.  We don't cache a
3001     # path for INSTALL within a source directory, because that will
3002     # break other packages using the cache if that directory is
3003     # removed, or if the path is relative.
3004     INSTALL="$ac_install_sh"
3005   fi
3006 fi
3007 echo "$ac_t""$INSTALL" 1>&6
3008
3009 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3010 # It thinks the first close brace ends the variable substitution.
3011 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3012
3013 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3014
3015 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3016
3017
3018 cat >> confdefs.h <<\EOF
3019 #define HAVE_MKVERSION 1
3020 EOF
3021
3022
3023
3024
3025 ol_aix_threads=no
3026 case "$target" in
3027 *-*-aix*)       if test -z "$CC" ; then
3028                 case "$ol_with_threads" in
3029                 auto | yes |  posix) ol_aix_threads=yes ;;
3030                 esac
3031         fi
3032 ;;
3033 esac
3034
3035 if test $ol_aix_threads = yes ; then
3036         if test -z "${CC}" ; then
3037                 for ac_prog in cc_r xlc_r cc
3038 do
3039 # Extract the first word of "$ac_prog", so it can be a program name with args.
3040 set dummy $ac_prog; ac_word=$2
3041 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3042 echo "configure:3043: checking for $ac_word" >&5
3043 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3044   echo $ac_n "(cached) $ac_c" 1>&6
3045 else
3046   if test -n "$CC"; then
3047   ac_cv_prog_CC="$CC" # Let the user override the test.
3048 else
3049   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3050   ac_dummy="$PATH"
3051   for ac_dir in $ac_dummy; do
3052     test -z "$ac_dir" && ac_dir=.
3053     if test -f $ac_dir/$ac_word; then
3054       ac_cv_prog_CC="$ac_prog"
3055       break
3056     fi
3057   done
3058   IFS="$ac_save_ifs"
3059 fi
3060 fi
3061 CC="$ac_cv_prog_CC"
3062 if test -n "$CC"; then
3063   echo "$ac_t""$CC" 1>&6
3064 else
3065   echo "$ac_t""no" 1>&6
3066 fi
3067
3068 test -n "$CC" && break
3069 done
3070
3071
3072                 if test "$CC" = cc ; then
3073                                                 if test $ol_with_threads != auto ; then
3074                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3075                         else
3076                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3077                         fi
3078                         ol_with_threads=no
3079                 fi
3080         fi
3081
3082         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3083                 ol_with_threads=posix
3084                 ol_cv_pthread_create=yes
3085         fi
3086 fi
3087
3088 if test -z "${CC}"; then
3089         for ac_prog in cc
3090 do
3091 # Extract the first word of "$ac_prog", so it can be a program name with args.
3092 set dummy $ac_prog; ac_word=$2
3093 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3094 echo "configure:3095: checking for $ac_word" >&5
3095 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3096   echo $ac_n "(cached) $ac_c" 1>&6
3097 else
3098   if test -n "$CC"; then
3099   ac_cv_prog_CC="$CC" # Let the user override the test.
3100 else
3101   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3102   ac_dummy="$PATH"
3103   for ac_dir in $ac_dummy; do
3104     test -z "$ac_dir" && ac_dir=.
3105     if test -f $ac_dir/$ac_word; then
3106       ac_cv_prog_CC="$ac_prog"
3107       break
3108     fi
3109   done
3110   IFS="$ac_save_ifs"
3111 fi
3112 fi
3113 CC="$ac_cv_prog_CC"
3114 if test -n "$CC"; then
3115   echo "$ac_t""$CC" 1>&6
3116 else
3117   echo "$ac_t""no" 1>&6
3118 fi
3119
3120 test -n "$CC" && break
3121 done
3122
3123 fi
3124
3125
3126 if test -z "${AR}"; then
3127         for ac_prog in ar gar
3128 do
3129 # Extract the first word of "$ac_prog", so it can be a program name with args.
3130 set dummy $ac_prog; ac_word=$2
3131 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3132 echo "configure:3133: checking for $ac_word" >&5
3133 if eval "test \"\${ac_cv_prog_AR+set}\" = set"; then
3134   echo $ac_n "(cached) $ac_c" 1>&6
3135 else
3136   if test -n "$AR"; then
3137   ac_cv_prog_AR="$AR" # Let the user override the test.
3138 else
3139   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3140   ac_dummy="$PATH"
3141   for ac_dir in $ac_dummy; do
3142     test -z "$ac_dir" && ac_dir=.
3143     if test -f $ac_dir/$ac_word; then
3144       ac_cv_prog_AR="$ac_prog"
3145       break
3146     fi
3147   done
3148   IFS="$ac_save_ifs"
3149 fi
3150 fi
3151 AR="$ac_cv_prog_AR"
3152 if test -n "$AR"; then
3153   echo "$ac_t""$AR" 1>&6
3154 else
3155   echo "$ac_t""no" 1>&6
3156 fi
3157
3158 test -n "$AR" && break
3159 done
3160 test -n "$AR" || AR="missing"
3161
3162
3163         if test "${AR}" = "missing" ; then
3164                 { echo "configure: error: Unable to locate ar(1).  Check PATH or set AR." 1>&2; exit 1; }
3165         fi
3166 fi
3167
3168
3169
3170 # Find the correct PATH separator.  Usually this is `:', but
3171 # DJGPP uses `;' like DOS.
3172 if test "X${PATH_SEPARATOR+set}" != Xset; then
3173   UNAME=${UNAME-`uname 2>/dev/null`}
3174   case X$UNAME in
3175     *-DOS) lt_cv_sys_path_separator=';' ;;
3176     *)     lt_cv_sys_path_separator=':' ;;
3177   esac
3178   PATH_SEPARATOR=$lt_cv_sys_path_separator
3179 fi
3180
3181 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3182 echo "configure:3183: checking for Cygwin environment" >&5
3183 if eval "test \"\${ac_cv_cygwin+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
3192 #ifndef __CYGWIN__
3193 #define __CYGWIN__ __CYGWIN32__
3194 #endif
3195 return __CYGWIN__;
3196 ; return 0; }
3197 EOF
3198 if { (eval echo configure:3199: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3199   rm -rf conftest*
3200   ac_cv_cygwin=yes
3201 else
3202   echo "configure: failed program was:" >&5
3203   cat conftest.$ac_ext >&5
3204   rm -rf conftest*
3205   ac_cv_cygwin=no
3206 fi
3207 rm -f conftest*
3208 fi
3209
3210 echo "$ac_t""$ac_cv_cygwin" 1>&6
3211 CYGWIN=
3212 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3213 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3214 echo "configure:3215: checking for mingw32 environment" >&5
3215 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3216   echo $ac_n "(cached) $ac_c" 1>&6
3217 else
3218   cat > conftest.$ac_ext <<EOF
3219 #line 3220 "configure"
3220 #include "confdefs.h"
3221
3222 int main() {
3223 return __MINGW32__;
3224 ; return 0; }
3225 EOF
3226 if { (eval echo configure:3227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3227   rm -rf conftest*
3228   ac_cv_mingw32=yes
3229 else
3230   echo "configure: failed program was:" >&5
3231   cat conftest.$ac_ext >&5
3232   rm -rf conftest*
3233   ac_cv_mingw32=no
3234 fi
3235 rm -f conftest*
3236 fi
3237
3238 echo "$ac_t""$ac_cv_mingw32" 1>&6
3239 MINGW32=
3240 test "$ac_cv_mingw32" = yes && MINGW32=yes
3241 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3242 echo "configure:3243: checking for EMX OS/2 environment" >&5
3243 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3244   echo $ac_n "(cached) $ac_c" 1>&6
3245 else
3246   cat > conftest.$ac_ext <<EOF
3247 #line 3248 "configure"
3248 #include "confdefs.h"
3249
3250 int main() {
3251 return __EMX__;
3252 ; return 0; }
3253 EOF
3254 if { (eval echo configure:3255: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3255   rm -rf conftest*
3256   ac_cv_emxos2=yes
3257 else
3258   echo "configure: failed program was:" >&5
3259   cat conftest.$ac_ext >&5
3260   rm -rf conftest*
3261   ac_cv_emxos2=no
3262 fi
3263 rm -f conftest*
3264 fi
3265
3266 echo "$ac_t""$ac_cv_emxos2" 1>&6
3267 EMXOS2=
3268 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3269 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3270 echo "configure:3271: checking how to run the C preprocessor" >&5
3271 # On Suns, sometimes $CPP names a directory.
3272 if test -n "$CPP" && test -d "$CPP"; then
3273   CPP=
3274 fi
3275 if test -z "$CPP"; then
3276 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3277   echo $ac_n "(cached) $ac_c" 1>&6
3278 else
3279     # This must be in double quotes, not single quotes, because CPP may get
3280   # substituted into the Makefile and "${CC-cc}" will confuse make.
3281   CPP="${CC-cc} -E"
3282   # On the NeXT, cc -E runs the code through the compiler's parser,
3283   # not just through cpp.
3284   cat > conftest.$ac_ext <<EOF
3285 #line 3286 "configure"
3286 #include "confdefs.h"
3287 #include <assert.h>
3288 Syntax Error
3289 EOF
3290 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3291 { (eval echo configure:3292: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3292 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3293 if test -z "$ac_err"; then
3294   :
3295 else
3296   echo "$ac_err" >&5
3297   echo "configure: failed program was:" >&5
3298   cat conftest.$ac_ext >&5
3299   rm -rf conftest*
3300   CPP="${CC-cc} -E -traditional-cpp"
3301   cat > conftest.$ac_ext <<EOF
3302 #line 3303 "configure"
3303 #include "confdefs.h"
3304 #include <assert.h>
3305 Syntax Error
3306 EOF
3307 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3308 { (eval echo configure:3309: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3309 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3310 if test -z "$ac_err"; then
3311   :
3312 else
3313   echo "$ac_err" >&5
3314   echo "configure: failed program was:" >&5
3315   cat conftest.$ac_ext >&5
3316   rm -rf conftest*
3317   CPP="${CC-cc} -nologo -E"
3318   cat > conftest.$ac_ext <<EOF
3319 #line 3320 "configure"
3320 #include "confdefs.h"
3321 #include <assert.h>
3322 Syntax Error
3323 EOF
3324 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3325 { (eval echo configure:3326: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3326 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3327 if test -z "$ac_err"; then
3328   :
3329 else
3330   echo "$ac_err" >&5
3331   echo "configure: failed program was:" >&5
3332   cat conftest.$ac_ext >&5
3333   rm -rf conftest*
3334   CPP=/lib/cpp
3335 fi
3336 rm -f conftest*
3337 fi
3338 rm -f conftest*
3339 fi
3340 rm -f conftest*
3341   ac_cv_prog_CPP="$CPP"
3342 fi
3343   CPP="$ac_cv_prog_CPP"
3344 else
3345   ac_cv_prog_CPP="$CPP"
3346 fi
3347 echo "$ac_t""$CPP" 1>&6
3348
3349 # Check whether --enable-fast-install or --disable-fast-install was given.
3350 if test "${enable_fast_install+set}" = set; then
3351   enableval="$enable_fast_install"
3352   p=${PACKAGE-default}
3353 case $enableval in
3354 yes) enable_fast_install=yes ;;
3355 no) enable_fast_install=no ;;
3356 *)
3357   enable_fast_install=no
3358   # Look at the argument we got.  We use all the common list separators.
3359   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3360   for pkg in $enableval; do
3361     if test "X$pkg" = "X$p"; then
3362       enable_fast_install=yes
3363     fi
3364   done
3365   IFS="$ac_save_ifs"
3366   ;;
3367 esac
3368 else
3369   enable_fast_install=yes
3370 fi
3371
3372 # Extract the first word of "gcc", so it can be a program name with args.
3373 set dummy gcc; ac_word=$2
3374 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3375 echo "configure:3376: checking for $ac_word" >&5
3376 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3377   echo $ac_n "(cached) $ac_c" 1>&6
3378 else
3379   if test -n "$CC"; then
3380   ac_cv_prog_CC="$CC" # Let the user override the test.
3381 else
3382   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3383   ac_dummy="$PATH"
3384   for ac_dir in $ac_dummy; do
3385     test -z "$ac_dir" && ac_dir=.
3386     if test -f $ac_dir/$ac_word; then
3387       ac_cv_prog_CC="gcc"
3388       break
3389     fi
3390   done
3391   IFS="$ac_save_ifs"
3392 fi
3393 fi
3394 CC="$ac_cv_prog_CC"
3395 if test -n "$CC"; then
3396   echo "$ac_t""$CC" 1>&6
3397 else
3398   echo "$ac_t""no" 1>&6
3399 fi
3400
3401 if test -z "$CC"; then
3402   # Extract the first word of "cc", so it can be a program name with args.
3403 set dummy cc; ac_word=$2
3404 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3405 echo "configure:3406: checking for $ac_word" >&5
3406 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3407   echo $ac_n "(cached) $ac_c" 1>&6
3408 else
3409   if test -n "$CC"; then
3410   ac_cv_prog_CC="$CC" # Let the user override the test.
3411 else
3412   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3413   ac_prog_rejected=no
3414   ac_dummy="$PATH"
3415   for ac_dir in $ac_dummy; do
3416     test -z "$ac_dir" && ac_dir=.
3417     if test -f $ac_dir/$ac_word; then
3418       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3419         ac_prog_rejected=yes
3420         continue
3421       fi
3422       ac_cv_prog_CC="cc"
3423       break
3424     fi
3425   done
3426   IFS="$ac_save_ifs"
3427 if test $ac_prog_rejected = yes; then
3428   # We found a bogon in the path, so make sure we never use it.
3429   set dummy $ac_cv_prog_CC
3430   shift
3431   if test $# -gt 0; then
3432     # We chose a different compiler from the bogus one.
3433     # However, it has the same basename, so the bogon will be chosen
3434     # first if we set CC to just the basename; use the full file name.
3435     shift
3436     set dummy "$ac_dir/$ac_word" "$@"
3437     shift
3438     ac_cv_prog_CC="$@"
3439   fi
3440 fi
3441 fi
3442 fi
3443 CC="$ac_cv_prog_CC"
3444 if test -n "$CC"; then
3445   echo "$ac_t""$CC" 1>&6
3446 else
3447   echo "$ac_t""no" 1>&6
3448 fi
3449
3450   if test -z "$CC"; then
3451     case "`uname -s`" in
3452     *win32* | *WIN32* | *CYGWIN*)
3453       # Extract the first word of "cl", so it can be a program name with args.
3454 set dummy cl; ac_word=$2
3455 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3456 echo "configure:3457: checking for $ac_word" >&5
3457 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3458   echo $ac_n "(cached) $ac_c" 1>&6
3459 else
3460   if test -n "$CC"; then
3461   ac_cv_prog_CC="$CC" # Let the user override the test.
3462 else
3463   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3464   ac_dummy="$PATH"
3465   for ac_dir in $ac_dummy; do
3466     test -z "$ac_dir" && ac_dir=.
3467     if test -f $ac_dir/$ac_word; then
3468       ac_cv_prog_CC="cl"
3469       break
3470     fi
3471   done
3472   IFS="$ac_save_ifs"
3473 fi
3474 fi
3475 CC="$ac_cv_prog_CC"
3476 if test -n "$CC"; then
3477   echo "$ac_t""$CC" 1>&6
3478 else
3479   echo "$ac_t""no" 1>&6
3480 fi
3481  ;;
3482     esac
3483   fi
3484   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3485 fi
3486
3487 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3488 echo "configure:3489: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3489
3490 ac_ext=c
3491 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3492 ac_cpp='$CPP $CPPFLAGS'
3493 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3494 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3495 cross_compiling=$ac_cv_prog_cc_cross
3496
3497 cat > conftest.$ac_ext << EOF
3498
3499 #line 3500 "configure"
3500 #include "confdefs.h"
3501
3502 main(){return(0);}
3503 EOF
3504 if { (eval echo configure:3505: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3505   ac_cv_prog_cc_works=yes
3506   # If we can't run a trivial program, we are probably using a cross compiler.
3507   if (./conftest; exit) 2>/dev/null; then
3508     ac_cv_prog_cc_cross=no
3509   else
3510     ac_cv_prog_cc_cross=yes
3511   fi
3512 else
3513   echo "configure: failed program was:" >&5
3514   cat conftest.$ac_ext >&5
3515   ac_cv_prog_cc_works=no
3516 fi
3517 rm -fr conftest*
3518 ac_ext=c
3519 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3520 ac_cpp='$CPP $CPPFLAGS'
3521 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3522 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3523 cross_compiling=$ac_cv_prog_cc_cross
3524
3525 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3526 if test $ac_cv_prog_cc_works = no; then
3527   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3528 fi
3529 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3530 echo "configure:3531: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3531 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3532 cross_compiling=$ac_cv_prog_cc_cross
3533
3534 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3535 echo "configure:3536: checking whether we are using GNU C" >&5
3536 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3537   echo $ac_n "(cached) $ac_c" 1>&6
3538 else
3539   cat > conftest.c <<EOF
3540 #ifdef __GNUC__
3541   yes;
3542 #endif
3543 EOF
3544 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3545   ac_cv_prog_gcc=yes
3546 else
3547   ac_cv_prog_gcc=no
3548 fi
3549 fi
3550
3551 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3552
3553 if test $ac_cv_prog_gcc = yes; then
3554   GCC=yes
3555 else
3556   GCC=
3557 fi
3558
3559 ac_test_CFLAGS="${CFLAGS+set}"
3560 ac_save_CFLAGS="$CFLAGS"
3561 CFLAGS=
3562 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3563 echo "configure:3564: checking whether ${CC-cc} accepts -g" >&5
3564 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3565   echo $ac_n "(cached) $ac_c" 1>&6
3566 else
3567   echo 'void f(){}' > conftest.c
3568 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3569   ac_cv_prog_cc_g=yes
3570 else
3571   ac_cv_prog_cc_g=no
3572 fi
3573 rm -f conftest*
3574
3575 fi
3576
3577 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3578 if test "$ac_test_CFLAGS" = set; then
3579   CFLAGS="$ac_save_CFLAGS"
3580 elif test $ac_cv_prog_cc_g = yes; then
3581   if test "$GCC" = yes; then
3582     CFLAGS="-g -O2"
3583   else
3584     CFLAGS="-g"
3585   fi
3586 else
3587   if test "$GCC" = yes; then
3588     CFLAGS="-O2"
3589   else
3590     CFLAGS=
3591   fi
3592 fi
3593
3594 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3595 if test "${with_gnu_ld+set}" = set; then
3596   withval="$with_gnu_ld"
3597   test "$withval" = no || with_gnu_ld=yes
3598 else
3599   with_gnu_ld=no
3600 fi
3601
3602 ac_prog=ld
3603 if test "$GCC" = yes; then
3604   # Check if gcc -print-prog-name=ld gives a path.
3605   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3606 echo "configure:3607: checking for ld used by GCC" >&5
3607   case $host in
3608   *-*-mingw*)
3609     # gcc leaves a trailing carriage return which upsets mingw
3610     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3611   *)
3612     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3613   esac
3614   case $ac_prog in
3615     # Accept absolute paths.
3616     [\\/]* | [A-Za-z]:[\\/]*)
3617       re_direlt='/[^/][^/]*/\.\./'
3618       # Canonicalize the path of ld
3619       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3620       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3621         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3622       done
3623       test -z "$LD" && LD="$ac_prog"
3624       ;;
3625   "")
3626     # If it fails, then pretend we aren't using GCC.
3627     ac_prog=ld
3628     ;;
3629   *)
3630     # If it is relative, then search for the first ld in PATH.
3631     with_gnu_ld=unknown
3632     ;;
3633   esac
3634 elif test "$with_gnu_ld" = yes; then
3635   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3636 echo "configure:3637: checking for GNU ld" >&5
3637 else
3638   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3639 echo "configure:3640: checking for non-GNU ld" >&5
3640 fi
3641 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3642   echo $ac_n "(cached) $ac_c" 1>&6
3643 else
3644   if test -z "$LD"; then
3645   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3646   for ac_dir in $PATH; do
3647     test -z "$ac_dir" && ac_dir=.
3648     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3649       lt_cv_path_LD="$ac_dir/$ac_prog"
3650       # Check to see if the program is GNU ld.  I'd rather use --version,
3651       # but apparently some GNU ld's only accept -v.
3652       # Break only if it was the GNU/non-GNU ld that we prefer.
3653       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3654         test "$with_gnu_ld" != no && break
3655       else
3656         test "$with_gnu_ld" != yes && break
3657       fi
3658     fi
3659   done
3660   IFS="$ac_save_ifs"
3661 else
3662   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3663 fi
3664 fi
3665
3666 LD="$lt_cv_path_LD"
3667 if test -n "$LD"; then
3668   echo "$ac_t""$LD" 1>&6
3669 else
3670   echo "$ac_t""no" 1>&6
3671 fi
3672 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3673 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3674 echo "configure:3675: checking if the linker ($LD) is GNU ld" >&5
3675 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3676   echo $ac_n "(cached) $ac_c" 1>&6
3677 else
3678   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3679 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3680   lt_cv_prog_gnu_ld=yes
3681 else
3682   lt_cv_prog_gnu_ld=no
3683 fi
3684 fi
3685
3686 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3687 with_gnu_ld=$lt_cv_prog_gnu_ld
3688
3689
3690 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3691 echo "configure:3692: checking for $LD option to reload object files" >&5
3692 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3693   echo $ac_n "(cached) $ac_c" 1>&6
3694 else
3695   lt_cv_ld_reload_flag='-r'
3696 fi
3697
3698 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3699 reload_flag=$lt_cv_ld_reload_flag
3700 test -n "$reload_flag" && reload_flag=" $reload_flag"
3701
3702 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3703 echo "configure:3704: checking for BSD-compatible nm" >&5
3704 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3705   echo $ac_n "(cached) $ac_c" 1>&6
3706 else
3707   if test -n "$NM"; then
3708   # Let the user override the test.
3709   lt_cv_path_NM="$NM"
3710 else
3711   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3712   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3713     test -z "$ac_dir" && ac_dir=.
3714     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3715     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3716       # Check to see if the nm accepts a BSD-compat flag.
3717       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3718       #   nm: unknown option "B" ignored
3719       # Tru64's nm complains that /dev/null is an invalid object file
3720       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3721         lt_cv_path_NM="$tmp_nm -B"
3722         break
3723       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3724         lt_cv_path_NM="$tmp_nm -p"
3725         break
3726       else
3727         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3728         continue # so that we can try to find one that supports BSD flags
3729       fi
3730     fi
3731   done
3732   IFS="$ac_save_ifs"
3733   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3734 fi
3735 fi
3736
3737 NM="$lt_cv_path_NM"
3738 echo "$ac_t""$NM" 1>&6
3739
3740 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3741 echo "configure:3742: checking whether ln -s works" >&5
3742 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3743   echo $ac_n "(cached) $ac_c" 1>&6
3744 else
3745   rm -f conftestdata
3746 if ln -s X conftestdata 2>/dev/null
3747 then
3748   rm -f conftestdata
3749   ac_cv_prog_LN_S="ln -s"
3750 else
3751   ac_cv_prog_LN_S=ln
3752 fi
3753 fi
3754 LN_S="$ac_cv_prog_LN_S"
3755 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3756   echo "$ac_t""yes" 1>&6
3757 else
3758   echo "$ac_t""no" 1>&6
3759 fi
3760
3761 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3762 echo "configure:3763: checking how to recognise dependant libraries" >&5
3763 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3764   echo $ac_n "(cached) $ac_c" 1>&6
3765 else
3766   lt_cv_file_magic_cmd='$MAGIC_CMD'
3767 lt_cv_file_magic_test_file=
3768 lt_cv_deplibs_check_method='unknown'
3769 # Need to set the preceding variable on all platforms that support
3770 # interlibrary dependencies.
3771 # 'none' -- dependencies not supported.
3772 # `unknown' -- same as none, but documents that we really don't know.
3773 # 'pass_all' -- all dependencies passed with no checks.
3774 # 'test_compile' -- check by making test program.
3775 # 'file_magic [[regex]]' -- check by looking for files in library path
3776 # which responds to the $file_magic_cmd with a given egrep regex.
3777 # If you have `file' or equivalent on your system and you're not sure
3778 # whether `pass_all' will *always* work, you probably want this one.
3779
3780 case $host_os in
3781 aix4* | aix5*)
3782   lt_cv_deplibs_check_method=pass_all
3783   ;;
3784
3785 beos*)
3786   lt_cv_deplibs_check_method=pass_all
3787   ;;
3788
3789 bsdi4*)
3790   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3791   lt_cv_file_magic_cmd='/usr/bin/file -L'
3792   lt_cv_file_magic_test_file=/shlib/libc.so
3793   ;;
3794
3795 cygwin* | mingw* | pw32*)
3796   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3797   lt_cv_file_magic_cmd='$OBJDUMP -f'
3798   ;;
3799
3800 darwin* | rhapsody*)
3801   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3802   lt_cv_file_magic_cmd='/usr/bin/file -L'
3803   case "$host_os" in
3804   rhapsody* | darwin1.[012])
3805     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3806     ;;
3807   *) # Darwin 1.3 on
3808     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3809     ;;
3810   esac
3811   ;;
3812
3813 freebsd*)
3814   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3815     case $host_cpu in
3816     i*86 )
3817       # Not sure whether the presence of OpenBSD here was a mistake.
3818       # Let's accept both of them until this is cleared up.
3819       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3820       lt_cv_file_magic_cmd=/usr/bin/file
3821       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3822       ;;
3823     esac
3824   else
3825     lt_cv_deplibs_check_method=pass_all
3826   fi
3827   ;;
3828
3829 gnu*)
3830   lt_cv_deplibs_check_method=pass_all
3831   ;;
3832
3833 hpux10.20*|hpux11*)
3834   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3835   lt_cv_file_magic_cmd=/usr/bin/file
3836   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3837   ;;
3838
3839 irix5* | irix6*)
3840   case $host_os in
3841   irix5*)
3842     # this will be overridden with pass_all, but let us keep it just in case
3843     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3844     ;;
3845   *)
3846     case $LD in
3847     *-32|*"-32 ") libmagic=32-bit;;
3848     *-n32|*"-n32 ") libmagic=N32;;
3849     *-64|*"-64 ") libmagic=64-bit;;
3850     *) libmagic=never-match;;
3851     esac
3852     # this will be overridden with pass_all, but let us keep it just in case
3853     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3854     ;;
3855   esac
3856   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3857   lt_cv_deplibs_check_method=pass_all
3858   ;;
3859
3860 # This must be Linux ELF.
3861 linux-gnu*)
3862   case $host_cpu in
3863   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3864     lt_cv_deplibs_check_method=pass_all ;;
3865   *)
3866     # glibc up to 2.1.1 does not perform some relocations on ARM
3867     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3868   esac
3869   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3870   ;;
3871
3872 netbsd*)
3873   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3874     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3875   else
3876     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3877   fi
3878   ;;
3879
3880 newos6*)
3881   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3882   lt_cv_file_magic_cmd=/usr/bin/file
3883   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3884   ;;
3885
3886 openbsd*)
3887   lt_cv_file_magic_cmd=/usr/bin/file
3888   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3889   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3890     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3891   else
3892     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3893   fi
3894   ;;
3895
3896 osf3* | osf4* | osf5*)
3897   # this will be overridden with pass_all, but let us keep it just in case
3898   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3899   lt_cv_file_magic_test_file=/shlib/libc.so
3900   lt_cv_deplibs_check_method=pass_all
3901   ;;
3902
3903 sco3.2v5*)
3904   lt_cv_deplibs_check_method=pass_all
3905   ;;
3906
3907 solaris*)
3908   lt_cv_deplibs_check_method=pass_all
3909   lt_cv_file_magic_test_file=/lib/libc.so
3910   ;;
3911
3912 sysv5uw[78]* | sysv4*uw2*)
3913   lt_cv_deplibs_check_method=pass_all
3914   ;;
3915
3916 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3917   case $host_vendor in
3918   motorola)
3919     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]'
3920     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3921     ;;
3922   ncr)
3923     lt_cv_deplibs_check_method=pass_all
3924     ;;
3925   sequent)
3926     lt_cv_file_magic_cmd='/bin/file'
3927     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3928     ;;
3929   sni)
3930     lt_cv_file_magic_cmd='/bin/file'
3931     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3932     lt_cv_file_magic_test_file=/lib/libc.so
3933     ;;
3934   esac
3935   ;;
3936 esac
3937
3938 fi
3939
3940 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3941 file_magic_cmd=$lt_cv_file_magic_cmd
3942 deplibs_check_method=$lt_cv_deplibs_check_method
3943
3944 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3945 echo "configure:3946: checking for object suffix" >&5
3946 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3947   echo $ac_n "(cached) $ac_c" 1>&6
3948 else
3949   rm -f conftest*
3950 echo 'int i = 1;' > conftest.$ac_ext
3951 if { (eval echo configure:3952: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3952   for ac_file in conftest.*; do
3953     case $ac_file in
3954     *.c) ;;
3955     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3956     esac
3957   done
3958 else
3959   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3960 fi
3961 rm -f conftest*
3962 fi
3963
3964 echo "$ac_t""$ac_cv_objext" 1>&6
3965 OBJEXT=$ac_cv_objext
3966 ac_objext=$ac_cv_objext
3967
3968
3969
3970
3971 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3972 echo "configure:3973: checking for executable suffix" >&5
3973 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3974   echo $ac_n "(cached) $ac_c" 1>&6
3975 else
3976   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3977   ac_cv_exeext=.exe
3978 else
3979   rm -f conftest*
3980   echo 'int main () { return 0; }' > conftest.$ac_ext
3981   ac_cv_exeext=
3982   if { (eval echo configure:3983: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3983     for file in conftest.*; do
3984       case $file in
3985       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3986       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3987       esac
3988     done
3989   else
3990     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3991   fi
3992   rm -f conftest*
3993   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3994 fi
3995 fi
3996
3997 EXEEXT=""
3998 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3999 echo "$ac_t""${ac_cv_exeext}" 1>&6
4000 ac_exeext=$EXEEXT
4001
4002 if test $host != $build; then
4003   ac_tool_prefix=${host_alias}-
4004 else
4005   ac_tool_prefix=
4006 fi
4007
4008
4009
4010
4011 # Check for command to grab the raw symbol name followed by C symbol from nm.
4012 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4013 echo "configure:4014: checking command to parse $NM output" >&5
4014 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4015   echo $ac_n "(cached) $ac_c" 1>&6
4016 else
4017   
4018 # These are sane defaults that work on at least a few old systems.
4019 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4020
4021 # Character class describing NM global symbol codes.
4022 symcode='[BCDEGRST]'
4023
4024 # Regexp to match symbols that can be accessed directly from C.
4025 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4026
4027 # Transform the above into a raw symbol and a C symbol.
4028 symxfrm='\1 \2\3 \3'
4029
4030 # Transform an extracted symbol line into a proper C declaration
4031 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4032
4033 # Transform an extracted symbol line into symbol name and symbol address
4034 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'"
4035
4036 # Define system-specific variables.
4037 case $host_os in
4038 aix*)
4039   symcode='[BCDT]'
4040   ;;
4041 cygwin* | mingw* | pw32*)
4042   symcode='[ABCDGISTW]'
4043   ;;
4044 hpux*) # Its linker distinguishes data from code symbols
4045   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4046   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'"
4047   ;;
4048 irix*)
4049   symcode='[BCDEGRST]'
4050   ;;
4051 solaris* | sysv5*)
4052   symcode='[BDT]'
4053   ;;
4054 sysv4)
4055   symcode='[DFNSTU]'
4056   ;;
4057 esac
4058
4059 # Handle CRLF in mingw tool chain
4060 opt_cr=
4061 case $host_os in
4062 mingw*)
4063   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4064   ;;
4065 esac
4066
4067 # If we're using GNU nm, then use its standard symbol codes.
4068 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4069   symcode='[ABCDGISTW]'
4070 fi
4071
4072 # Try without a prefix undercore, then with it.
4073 for ac_symprfx in "" "_"; do
4074
4075   # Write the raw and C identifiers.
4076 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4077
4078   # Check to see that the pipe works correctly.
4079   pipe_works=no
4080   rm -f conftest*
4081   cat > conftest.$ac_ext <<EOF
4082 #ifdef __cplusplus
4083 extern "C" {
4084 #endif
4085 char nm_test_var;
4086 void nm_test_func(){}
4087 #ifdef __cplusplus
4088 }
4089 #endif
4090 int main(){nm_test_var='a';nm_test_func();return(0);}
4091 EOF
4092
4093   if { (eval echo configure:4094: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4094     # Now try to grab the symbols.
4095     nlist=conftest.nm
4096     if { (eval echo configure:4097: \"$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
4097       # Try sorting and uniquifying the output.
4098       if sort "$nlist" | uniq > "$nlist"T; then
4099         mv -f "$nlist"T "$nlist"
4100       else
4101         rm -f "$nlist"T
4102       fi
4103
4104       # Make sure that we snagged all the symbols we need.
4105       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4106         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4107           cat <<EOF > conftest.$ac_ext
4108 #ifdef __cplusplus
4109 extern "C" {
4110 #endif
4111
4112 EOF
4113           # Now generate the symbol file.
4114           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4115
4116           cat <<EOF >> conftest.$ac_ext
4117 #if defined (__STDC__) && __STDC__
4118 # define lt_ptr void *
4119 #else
4120 # define lt_ptr char *
4121 # define const
4122 #endif
4123
4124 /* The mapping between symbol names and symbols. */
4125 const struct {
4126   const char *name;
4127   lt_ptr address;
4128 }
4129 lt_preloaded_symbols[] =
4130 {
4131 EOF
4132           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4133           cat <<\EOF >> conftest.$ac_ext
4134   {0, (lt_ptr) 0}
4135 };
4136
4137 #ifdef __cplusplus
4138 }
4139 #endif
4140 EOF
4141           # Now try linking the two files.
4142           mv conftest.$ac_objext conftstm.$ac_objext
4143           save_LIBS="$LIBS"
4144           save_CFLAGS="$CFLAGS"
4145           LIBS="conftstm.$ac_objext"
4146           CFLAGS="$CFLAGS$no_builtin_flag"
4147           if { (eval echo configure:4148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4148             pipe_works=yes
4149           fi
4150           LIBS="$save_LIBS"
4151           CFLAGS="$save_CFLAGS"
4152         else
4153           echo "cannot find nm_test_func in $nlist" >&5
4154         fi
4155       else
4156         echo "cannot find nm_test_var in $nlist" >&5
4157       fi
4158     else
4159       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4160     fi
4161   else
4162     echo "$progname: failed program was:" >&5
4163     cat conftest.$ac_ext >&5
4164   fi
4165   rm -f conftest* conftst*
4166
4167   # Do not use the global_symbol_pipe unless it works.
4168   if test "$pipe_works" = yes; then
4169     break
4170   else
4171     lt_cv_sys_global_symbol_pipe=
4172   fi
4173 done
4174
4175 fi
4176
4177 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4178 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4179   global_symbol_to_cdecl=
4180   global_symbol_to_c_name_address=
4181 else
4182   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4183   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4184 fi
4185 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4186 then
4187   echo "$ac_t""failed" 1>&6
4188 else
4189   echo "$ac_t""ok" 1>&6
4190 fi
4191
4192 for ac_hdr in dlfcn.h
4193 do
4194 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4195 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4196 echo "configure:4197: checking for $ac_hdr" >&5
4197 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4198   echo $ac_n "(cached) $ac_c" 1>&6
4199 else
4200   cat > conftest.$ac_ext <<EOF
4201 #line 4202 "configure"
4202 #include "confdefs.h"
4203 #include <$ac_hdr>
4204 EOF
4205 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4206 { (eval echo configure:4207: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4207 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4208 if test -z "$ac_err"; then
4209   rm -rf conftest*
4210   eval "ac_cv_header_$ac_safe=yes"
4211 else
4212   echo "$ac_err" >&5
4213   echo "configure: failed program was:" >&5
4214   cat conftest.$ac_ext >&5
4215   rm -rf conftest*
4216   eval "ac_cv_header_$ac_safe=no"
4217 fi
4218 rm -f conftest*
4219 fi
4220 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4221   echo "$ac_t""yes" 1>&6
4222     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4223   cat >> confdefs.h <<EOF
4224 #define $ac_tr_hdr 1
4225 EOF
4226  
4227 else
4228   echo "$ac_t""no" 1>&6
4229 fi
4230 done
4231
4232
4233
4234
4235
4236 # Only perform the check for file, if the check method requires it
4237 case $deplibs_check_method in
4238 file_magic*)
4239   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4240     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4241 echo "configure:4242: checking for ${ac_tool_prefix}file" >&5
4242 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4243   echo $ac_n "(cached) $ac_c" 1>&6
4244 else
4245   case $MAGIC_CMD in
4246   /*)
4247   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4248   ;;
4249   ?:/*)
4250   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4251   ;;
4252   *)
4253   ac_save_MAGIC_CMD="$MAGIC_CMD"
4254   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4255   ac_dummy="/usr/bin:$PATH"
4256   for ac_dir in $ac_dummy; do
4257     test -z "$ac_dir" && ac_dir=.
4258     if test -f $ac_dir/${ac_tool_prefix}file; then
4259       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4260       if test -n "$file_magic_test_file"; then
4261         case $deplibs_check_method in
4262         "file_magic "*)
4263           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4264           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4265           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4266             egrep "$file_magic_regex" > /dev/null; then
4267             :
4268           else
4269             cat <<EOF 1>&2
4270
4271 *** Warning: the command libtool uses to detect shared libraries,
4272 *** $file_magic_cmd, produces output that libtool cannot recognize.
4273 *** The result is that libtool may fail to recognize shared libraries
4274 *** as such.  This will affect the creation of libtool libraries that
4275 *** depend on shared libraries, but programs linked with such libtool
4276 *** libraries will work regardless of this problem.  Nevertheless, you
4277 *** may want to report the problem to your system manager and/or to
4278 *** bug-libtool@gnu.org
4279
4280 EOF
4281           fi ;;
4282         esac
4283       fi
4284       break
4285     fi
4286   done
4287   IFS="$ac_save_ifs"
4288   MAGIC_CMD="$ac_save_MAGIC_CMD"
4289   ;;
4290 esac
4291 fi
4292
4293 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4294 if test -n "$MAGIC_CMD"; then
4295   echo "$ac_t""$MAGIC_CMD" 1>&6
4296 else
4297   echo "$ac_t""no" 1>&6
4298 fi
4299
4300 if test -z "$lt_cv_path_MAGIC_CMD"; then
4301   if test -n "$ac_tool_prefix"; then
4302     echo $ac_n "checking for file""... $ac_c" 1>&6
4303 echo "configure:4304: checking for file" >&5
4304 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4305   echo $ac_n "(cached) $ac_c" 1>&6
4306 else
4307   case $MAGIC_CMD in
4308   /*)
4309   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4310   ;;
4311   ?:/*)
4312   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4313   ;;
4314   *)
4315   ac_save_MAGIC_CMD="$MAGIC_CMD"
4316   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4317   ac_dummy="/usr/bin:$PATH"
4318   for ac_dir in $ac_dummy; do
4319     test -z "$ac_dir" && ac_dir=.
4320     if test -f $ac_dir/file; then
4321       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4322       if test -n "$file_magic_test_file"; then
4323         case $deplibs_check_method in
4324         "file_magic "*)
4325           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4326           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4327           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4328             egrep "$file_magic_regex" > /dev/null; then
4329             :
4330           else
4331             cat <<EOF 1>&2
4332
4333 *** Warning: the command libtool uses to detect shared libraries,
4334 *** $file_magic_cmd, produces output that libtool cannot recognize.
4335 *** The result is that libtool may fail to recognize shared libraries
4336 *** as such.  This will affect the creation of libtool libraries that
4337 *** depend on shared libraries, but programs linked with such libtool
4338 *** libraries will work regardless of this problem.  Nevertheless, you
4339 *** may want to report the problem to your system manager and/or to
4340 *** bug-libtool@gnu.org
4341
4342 EOF
4343           fi ;;
4344         esac
4345       fi
4346       break
4347     fi
4348   done
4349   IFS="$ac_save_ifs"
4350   MAGIC_CMD="$ac_save_MAGIC_CMD"
4351   ;;
4352 esac
4353 fi
4354
4355 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4356 if test -n "$MAGIC_CMD"; then
4357   echo "$ac_t""$MAGIC_CMD" 1>&6
4358 else
4359   echo "$ac_t""no" 1>&6
4360 fi
4361
4362   else
4363     MAGIC_CMD=:
4364   fi
4365 fi
4366
4367   fi
4368   ;;
4369 esac
4370
4371 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4372 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4373 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4374 echo "configure:4375: checking for $ac_word" >&5
4375 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4376   echo $ac_n "(cached) $ac_c" 1>&6
4377 else
4378   if test -n "$RANLIB"; then
4379   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4380 else
4381   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4382   ac_dummy="$PATH"
4383   for ac_dir in $ac_dummy; do
4384     test -z "$ac_dir" && ac_dir=.
4385     if test -f $ac_dir/$ac_word; then
4386       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4387       break
4388     fi
4389   done
4390   IFS="$ac_save_ifs"
4391 fi
4392 fi
4393 RANLIB="$ac_cv_prog_RANLIB"
4394 if test -n "$RANLIB"; then
4395   echo "$ac_t""$RANLIB" 1>&6
4396 else
4397   echo "$ac_t""no" 1>&6
4398 fi
4399
4400
4401 if test -z "$ac_cv_prog_RANLIB"; then
4402 if test -n "$ac_tool_prefix"; then
4403   # Extract the first word of "ranlib", so it can be a program name with args.
4404 set dummy ranlib; ac_word=$2
4405 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4406 echo "configure:4407: checking for $ac_word" >&5
4407 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4408   echo $ac_n "(cached) $ac_c" 1>&6
4409 else
4410   if test -n "$RANLIB"; then
4411   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4412 else
4413   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4414   ac_dummy="$PATH"
4415   for ac_dir in $ac_dummy; do
4416     test -z "$ac_dir" && ac_dir=.
4417     if test -f $ac_dir/$ac_word; then
4418       ac_cv_prog_RANLIB="ranlib"
4419       break
4420     fi
4421   done
4422   IFS="$ac_save_ifs"
4423   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4424 fi
4425 fi
4426 RANLIB="$ac_cv_prog_RANLIB"
4427 if test -n "$RANLIB"; then
4428   echo "$ac_t""$RANLIB" 1>&6
4429 else
4430   echo "$ac_t""no" 1>&6
4431 fi
4432
4433 else
4434   RANLIB=":"
4435 fi
4436 fi
4437
4438 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4439 set dummy ${ac_tool_prefix}strip; ac_word=$2
4440 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4441 echo "configure:4442: checking for $ac_word" >&5
4442 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4443   echo $ac_n "(cached) $ac_c" 1>&6
4444 else
4445   if test -n "$STRIP"; then
4446   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4447 else
4448   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4449   ac_dummy="$PATH"
4450   for ac_dir in $ac_dummy; do
4451     test -z "$ac_dir" && ac_dir=.
4452     if test -f $ac_dir/$ac_word; then
4453       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4454       break
4455     fi
4456   done
4457   IFS="$ac_save_ifs"
4458 fi
4459 fi
4460 STRIP="$ac_cv_prog_STRIP"
4461 if test -n "$STRIP"; then
4462   echo "$ac_t""$STRIP" 1>&6
4463 else
4464   echo "$ac_t""no" 1>&6
4465 fi
4466
4467
4468 if test -z "$ac_cv_prog_STRIP"; then
4469 if test -n "$ac_tool_prefix"; then
4470   # Extract the first word of "strip", so it can be a program name with args.
4471 set dummy strip; ac_word=$2
4472 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4473 echo "configure:4474: checking for $ac_word" >&5
4474 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4475   echo $ac_n "(cached) $ac_c" 1>&6
4476 else
4477   if test -n "$STRIP"; then
4478   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4479 else
4480   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4481   ac_dummy="$PATH"
4482   for ac_dir in $ac_dummy; do
4483     test -z "$ac_dir" && ac_dir=.
4484     if test -f $ac_dir/$ac_word; then
4485       ac_cv_prog_STRIP="strip"
4486       break
4487     fi
4488   done
4489   IFS="$ac_save_ifs"
4490   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4491 fi
4492 fi
4493 STRIP="$ac_cv_prog_STRIP"
4494 if test -n "$STRIP"; then
4495   echo "$ac_t""$STRIP" 1>&6
4496 else
4497   echo "$ac_t""no" 1>&6
4498 fi
4499
4500 else
4501   STRIP=":"
4502 fi
4503 fi
4504
4505
4506 enable_dlopen=yes
4507 enable_win32_dll=yes
4508
4509 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4510 if test "${enable_libtool_lock+set}" = set; then
4511   enableval="$enable_libtool_lock"
4512   :
4513 fi
4514
4515 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4516
4517 # Some flags need to be propagated to the compiler or linker for good
4518 # libtool support.
4519 case $host in
4520 *-*-irix6*)
4521   # Find out which ABI we are using.
4522   echo '#line 4523 "configure"' > conftest.$ac_ext
4523   if { (eval echo configure:4524: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4524     case `/usr/bin/file conftest.$ac_objext` in
4525     *32-bit*)
4526       LD="${LD-ld} -32"
4527       ;;
4528     *N32*)
4529       LD="${LD-ld} -n32"
4530       ;;
4531     *64-bit*)
4532       LD="${LD-ld} -64"
4533       ;;
4534     esac
4535   fi
4536   rm -rf conftest*
4537   ;;
4538
4539 *-*-sco3.2v5*)
4540   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4541   SAVE_CFLAGS="$CFLAGS"
4542   CFLAGS="$CFLAGS -belf"
4543   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4544 echo "configure:4545: checking whether the C compiler needs -belf" >&5
4545 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4546   echo $ac_n "(cached) $ac_c" 1>&6
4547 else
4548   
4549      ac_ext=c
4550 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4551 ac_cpp='$CPP $CPPFLAGS'
4552 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4553 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4554 cross_compiling=$ac_cv_prog_cc_cross
4555
4556      cat > conftest.$ac_ext <<EOF
4557 #line 4558 "configure"
4558 #include "confdefs.h"
4559
4560 int main() {
4561
4562 ; return 0; }
4563 EOF
4564 if { (eval echo configure:4565: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4565   rm -rf conftest*
4566   lt_cv_cc_needs_belf=yes
4567 else
4568   echo "configure: failed program was:" >&5
4569   cat conftest.$ac_ext >&5
4570   rm -rf conftest*
4571   lt_cv_cc_needs_belf=no
4572 fi
4573 rm -f conftest*
4574      ac_ext=c
4575 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4576 ac_cpp='$CPP $CPPFLAGS'
4577 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4578 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4579 cross_compiling=$ac_cv_prog_cc_cross
4580
4581 fi
4582
4583 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4584   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4585     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4586     CFLAGS="$SAVE_CFLAGS"
4587   fi
4588   ;;
4589
4590 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4591   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4592 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4593 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4594 echo "configure:4595: checking for $ac_word" >&5
4595 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4596   echo $ac_n "(cached) $ac_c" 1>&6
4597 else
4598   if test -n "$DLLTOOL"; then
4599   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4600 else
4601   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4602   ac_dummy="$PATH"
4603   for ac_dir in $ac_dummy; do
4604     test -z "$ac_dir" && ac_dir=.
4605     if test -f $ac_dir/$ac_word; then
4606       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4607       break
4608     fi
4609   done
4610   IFS="$ac_save_ifs"
4611 fi
4612 fi
4613 DLLTOOL="$ac_cv_prog_DLLTOOL"
4614 if test -n "$DLLTOOL"; then
4615   echo "$ac_t""$DLLTOOL" 1>&6
4616 else
4617   echo "$ac_t""no" 1>&6
4618 fi
4619
4620
4621 if test -z "$ac_cv_prog_DLLTOOL"; then
4622 if test -n "$ac_tool_prefix"; then
4623   # Extract the first word of "dlltool", so it can be a program name with args.
4624 set dummy dlltool; ac_word=$2
4625 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4626 echo "configure:4627: checking for $ac_word" >&5
4627 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4628   echo $ac_n "(cached) $ac_c" 1>&6
4629 else
4630   if test -n "$DLLTOOL"; then
4631   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4632 else
4633   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4634   ac_dummy="$PATH"
4635   for ac_dir in $ac_dummy; do
4636     test -z "$ac_dir" && ac_dir=.
4637     if test -f $ac_dir/$ac_word; then
4638       ac_cv_prog_DLLTOOL="dlltool"
4639       break
4640     fi
4641   done
4642   IFS="$ac_save_ifs"
4643   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4644 fi
4645 fi
4646 DLLTOOL="$ac_cv_prog_DLLTOOL"
4647 if test -n "$DLLTOOL"; then
4648   echo "$ac_t""$DLLTOOL" 1>&6
4649 else
4650   echo "$ac_t""no" 1>&6
4651 fi
4652
4653 else
4654   DLLTOOL="false"
4655 fi
4656 fi
4657
4658   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4659 set dummy ${ac_tool_prefix}as; ac_word=$2
4660 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4661 echo "configure:4662: checking for $ac_word" >&5
4662 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4663   echo $ac_n "(cached) $ac_c" 1>&6
4664 else
4665   if test -n "$AS"; then
4666   ac_cv_prog_AS="$AS" # Let the user override the test.
4667 else
4668   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4669   ac_dummy="$PATH"
4670   for ac_dir in $ac_dummy; do
4671     test -z "$ac_dir" && ac_dir=.
4672     if test -f $ac_dir/$ac_word; then
4673       ac_cv_prog_AS="${ac_tool_prefix}as"
4674       break
4675     fi
4676   done
4677   IFS="$ac_save_ifs"
4678 fi
4679 fi
4680 AS="$ac_cv_prog_AS"
4681 if test -n "$AS"; then
4682   echo "$ac_t""$AS" 1>&6
4683 else
4684   echo "$ac_t""no" 1>&6
4685 fi
4686
4687
4688 if test -z "$ac_cv_prog_AS"; then
4689 if test -n "$ac_tool_prefix"; then
4690   # Extract the first word of "as", so it can be a program name with args.
4691 set dummy as; ac_word=$2
4692 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4693 echo "configure:4694: checking for $ac_word" >&5
4694 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4695   echo $ac_n "(cached) $ac_c" 1>&6
4696 else
4697   if test -n "$AS"; then
4698   ac_cv_prog_AS="$AS" # Let the user override the test.
4699 else
4700   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4701   ac_dummy="$PATH"
4702   for ac_dir in $ac_dummy; do
4703     test -z "$ac_dir" && ac_dir=.
4704     if test -f $ac_dir/$ac_word; then
4705       ac_cv_prog_AS="as"
4706       break
4707     fi
4708   done
4709   IFS="$ac_save_ifs"
4710   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4711 fi
4712 fi
4713 AS="$ac_cv_prog_AS"
4714 if test -n "$AS"; then
4715   echo "$ac_t""$AS" 1>&6
4716 else
4717   echo "$ac_t""no" 1>&6
4718 fi
4719
4720 else
4721   AS="false"
4722 fi
4723 fi
4724
4725   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4726 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4727 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4728 echo "configure:4729: checking for $ac_word" >&5
4729 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4730   echo $ac_n "(cached) $ac_c" 1>&6
4731 else
4732   if test -n "$OBJDUMP"; then
4733   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4734 else
4735   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4736   ac_dummy="$PATH"
4737   for ac_dir in $ac_dummy; do
4738     test -z "$ac_dir" && ac_dir=.
4739     if test -f $ac_dir/$ac_word; then
4740       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4741       break
4742     fi
4743   done
4744   IFS="$ac_save_ifs"
4745 fi
4746 fi
4747 OBJDUMP="$ac_cv_prog_OBJDUMP"
4748 if test -n "$OBJDUMP"; then
4749   echo "$ac_t""$OBJDUMP" 1>&6
4750 else
4751   echo "$ac_t""no" 1>&6
4752 fi
4753
4754
4755 if test -z "$ac_cv_prog_OBJDUMP"; then
4756 if test -n "$ac_tool_prefix"; then
4757   # Extract the first word of "objdump", so it can be a program name with args.
4758 set dummy objdump; ac_word=$2
4759 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4760 echo "configure:4761: checking for $ac_word" >&5
4761 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4762   echo $ac_n "(cached) $ac_c" 1>&6
4763 else
4764   if test -n "$OBJDUMP"; then
4765   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4766 else
4767   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4768   ac_dummy="$PATH"
4769   for ac_dir in $ac_dummy; do
4770     test -z "$ac_dir" && ac_dir=.
4771     if test -f $ac_dir/$ac_word; then
4772       ac_cv_prog_OBJDUMP="objdump"
4773       break
4774     fi
4775   done
4776   IFS="$ac_save_ifs"
4777   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4778 fi
4779 fi
4780 OBJDUMP="$ac_cv_prog_OBJDUMP"
4781 if test -n "$OBJDUMP"; then
4782   echo "$ac_t""$OBJDUMP" 1>&6
4783 else
4784   echo "$ac_t""no" 1>&6
4785 fi
4786
4787 else
4788   OBJDUMP="false"
4789 fi
4790 fi
4791
4792
4793   # recent cygwin and mingw systems supply a stub DllMain which the user
4794   # can override, but on older systems we have to supply one
4795   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4796 echo "configure:4797: checking if libtool should supply DllMain function" >&5
4797 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4798   echo $ac_n "(cached) $ac_c" 1>&6
4799 else
4800   cat > conftest.$ac_ext <<EOF
4801 #line 4802 "configure"
4802 #include "confdefs.h"
4803
4804 int main() {
4805 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4806       DllMain (0, 0, 0);
4807 ; return 0; }
4808 EOF
4809 if { (eval echo configure:4810: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4810   rm -rf conftest*
4811   lt_cv_need_dllmain=no
4812 else
4813   echo "configure: failed program was:" >&5
4814   cat conftest.$ac_ext >&5
4815   rm -rf conftest*
4816   lt_cv_need_dllmain=yes
4817 fi
4818 rm -f conftest*
4819 fi
4820
4821 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4822
4823   case $host/$CC in
4824   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4825     # old mingw systems require "-dll" to link a DLL, while more recent ones
4826     # require "-mdll"
4827     SAVE_CFLAGS="$CFLAGS"
4828     CFLAGS="$CFLAGS -mdll"
4829     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4830 echo "configure:4831: checking how to link DLLs" >&5
4831 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4832   echo $ac_n "(cached) $ac_c" 1>&6
4833 else
4834   cat > conftest.$ac_ext <<EOF
4835 #line 4836 "configure"
4836 #include "confdefs.h"
4837
4838 int main() {
4839
4840 ; return 0; }
4841 EOF
4842 if { (eval echo configure:4843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4843   rm -rf conftest*
4844   lt_cv_cc_dll_switch=-mdll
4845 else
4846   echo "configure: failed program was:" >&5
4847   cat conftest.$ac_ext >&5
4848   rm -rf conftest*
4849   lt_cv_cc_dll_switch=-dll
4850 fi
4851 rm -f conftest*
4852 fi
4853
4854 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4855     CFLAGS="$SAVE_CFLAGS" ;;
4856   *-*-cygwin* | *-*-pw32*)
4857     # cygwin systems need to pass --dll to the linker, and not link
4858     # crt.o which will require a WinMain@16 definition.
4859     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4860   esac
4861   ;;
4862   
4863 esac
4864
4865 # Sed substitution that helps us do robust quoting.  It backslashifies
4866 # metacharacters that are still active within double-quoted strings.
4867 Xsed='sed -e s/^X//'
4868 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4869
4870 # Same as above, but do not quote variable references.
4871 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4872
4873 # Sed substitution to delay expansion of an escaped shell variable in a
4874 # double_quote_subst'ed string.
4875 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4876
4877 # Constants:
4878 rm="rm -f"
4879
4880 # Global variables:
4881 default_ofile=libtool
4882 can_build_shared=yes
4883
4884 # All known linkers require a `.a' archive for static linking (except M$VC,
4885 # which needs '.lib').
4886 libext=a
4887 ltmain="$ac_aux_dir/ltmain.sh"
4888 ofile="$default_ofile"
4889 with_gnu_ld="$lt_cv_prog_gnu_ld"
4890 need_locks="$enable_libtool_lock"
4891
4892 old_CC="$CC"
4893 old_CFLAGS="$CFLAGS"
4894
4895 # Set sane defaults for various variables
4896 test -z "$AR" && AR=ar
4897 test -z "$AR_FLAGS" && AR_FLAGS=cru
4898 test -z "$AS" && AS=as
4899 test -z "$CC" && CC=cc
4900 test -z "$DLLTOOL" && DLLTOOL=dlltool
4901 test -z "$LD" && LD=ld
4902 test -z "$LN_S" && LN_S="ln -s"
4903 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4904 test -z "$NM" && NM=nm
4905 test -z "$OBJDUMP" && OBJDUMP=objdump
4906 test -z "$RANLIB" && RANLIB=:
4907 test -z "$STRIP" && STRIP=:
4908 test -z "$ac_objext" && ac_objext=o
4909
4910 if test x"$host" != x"$build"; then
4911   ac_tool_prefix=${host_alias}-
4912 else
4913   ac_tool_prefix=
4914 fi
4915
4916 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4917 case $host_os in
4918 linux-gnu*) ;;
4919 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4920 esac
4921
4922 case $host_os in
4923 aix3*)
4924   # AIX sometimes has problems with the GCC collect2 program.  For some
4925   # reason, if we set the COLLECT_NAMES environment variable, the problems
4926   # vanish in a puff of smoke.
4927   if test "X${COLLECT_NAMES+set}" != Xset; then
4928     COLLECT_NAMES=
4929     export COLLECT_NAMES
4930   fi
4931   ;;
4932 esac
4933
4934 # Determine commands to create old-style static archives.
4935 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4936 old_postinstall_cmds='chmod 644 $oldlib'
4937 old_postuninstall_cmds=
4938
4939 if test -n "$RANLIB"; then
4940   case $host_os in
4941   openbsd*)
4942     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4943     ;;
4944   *)
4945     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4946     ;;
4947   esac
4948   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4949 fi
4950
4951 # Allow CC to be a program name with arguments.
4952 set dummy $CC
4953 compiler="$2"
4954
4955 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4956 echo "configure:4957: checking for objdir" >&5
4957 rm -f .libs 2>/dev/null
4958 mkdir .libs 2>/dev/null
4959 if test -d .libs; then
4960   objdir=.libs
4961 else
4962   # MS-DOS does not allow filenames that begin with a dot.
4963   objdir=_libs
4964 fi
4965 rmdir .libs 2>/dev/null
4966 echo "$ac_t""$objdir" 1>&6
4967
4968
4969 # Check whether --with-pic or --without-pic was given.
4970 if test "${with_pic+set}" = set; then
4971   withval="$with_pic"
4972   pic_mode="$withval"
4973 else
4974   pic_mode=default
4975 fi
4976
4977 test -z "$pic_mode" && pic_mode=default
4978
4979 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4980 # in isolation, and that seeing it set (from the cache) indicates that
4981 # the associated values are set (in the cache) correctly too.
4982 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4983 echo "configure:4984: checking for $compiler option to produce PIC" >&5
4984 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4985   echo $ac_n "(cached) $ac_c" 1>&6
4986 else
4987    lt_cv_prog_cc_pic=
4988   lt_cv_prog_cc_shlib=
4989   lt_cv_prog_cc_wl=
4990   lt_cv_prog_cc_static=
4991   lt_cv_prog_cc_no_builtin=
4992   lt_cv_prog_cc_can_build_shared=$can_build_shared
4993
4994   if test "$GCC" = yes; then
4995     lt_cv_prog_cc_wl='-Wl,'
4996     lt_cv_prog_cc_static='-static'
4997
4998     case $host_os in
4999     aix*)
5000       # Below there is a dirty hack to force normal static linking with -ldl
5001       # The problem is because libdl dynamically linked with both libc and
5002       # libC (AIX C++ library), which obviously doesn't included in libraries
5003       # list by gcc. This cause undefined symbols with -static flags.
5004       # This hack allows C programs to be linked with "-static -ldl", but
5005       # not sure about C++ programs.
5006       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5007       ;;
5008     amigaos*)
5009       # FIXME: we need at least 68020 code to build shared libraries, but
5010       # adding the `-m68020' flag to GCC prevents building anything better,
5011       # like `-m68040'.
5012       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5013       ;;
5014     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
5015       # PIC is the default for these OSes.
5016       ;;
5017     darwin* | rhapsody*)
5018       # PIC is the default on this platform
5019       # Common symbols not allowed in MH_DYLIB files
5020       lt_cv_prog_cc_pic='-fno-common'
5021       ;;
5022     cygwin* | mingw* | pw32* | os2*)
5023       # This hack is so that the source file can tell whether it is being
5024       # built for inclusion in a dll (and should export symbols for example).
5025       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5026       ;;
5027     sysv4*MP*)
5028       if test -d /usr/nec; then
5029          lt_cv_prog_cc_pic=-Kconform_pic
5030       fi
5031       ;;
5032     *)
5033       lt_cv_prog_cc_pic='-fPIC'
5034       ;;
5035     esac
5036   else
5037     # PORTME Check for PIC flags for the system compiler.
5038     case $host_os in
5039     aix3* | aix4* | aix5*)
5040       lt_cv_prog_cc_wl='-Wl,'
5041       # All AIX code is PIC.
5042       if test "$host_cpu" = ia64; then
5043         # AIX 5 now supports IA64 processor
5044         lt_cv_prog_cc_static='-Bstatic'
5045       else
5046         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5047       fi
5048       ;;
5049
5050     hpux9* | hpux10* | hpux11*)
5051       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5052       lt_cv_prog_cc_wl='-Wl,'
5053       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5054       lt_cv_prog_cc_pic='+Z'
5055       ;;
5056
5057     irix5* | irix6*)
5058       lt_cv_prog_cc_wl='-Wl,'
5059       lt_cv_prog_cc_static='-non_shared'
5060       # PIC (with -KPIC) is the default.
5061       ;;
5062
5063     cygwin* | mingw* | pw32* | os2*)
5064       # This hack is so that the source file can tell whether it is being
5065       # built for inclusion in a dll (and should export symbols for example).
5066       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5067       ;;
5068
5069     newsos6)
5070       lt_cv_prog_cc_pic='-KPIC'
5071       lt_cv_prog_cc_static='-Bstatic'
5072       ;;
5073
5074     osf3* | osf4* | osf5*)
5075       # All OSF/1 code is PIC.
5076       lt_cv_prog_cc_wl='-Wl,'
5077       lt_cv_prog_cc_static='-non_shared'
5078       ;;
5079
5080     sco3.2v5*)
5081       lt_cv_prog_cc_pic='-Kpic'
5082       lt_cv_prog_cc_static='-dn'
5083       lt_cv_prog_cc_shlib='-belf'
5084       ;;
5085
5086     solaris*)
5087       lt_cv_prog_cc_pic='-KPIC'
5088       lt_cv_prog_cc_static='-Bstatic'
5089       lt_cv_prog_cc_wl='-Wl,'
5090       ;;
5091
5092     sunos4*)
5093       lt_cv_prog_cc_pic='-PIC'
5094       lt_cv_prog_cc_static='-Bstatic'
5095       lt_cv_prog_cc_wl='-Qoption ld '
5096       ;;
5097
5098     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5099       lt_cv_prog_cc_pic='-KPIC'
5100       lt_cv_prog_cc_static='-Bstatic'
5101       if test "x$host_vendor" = xsni; then
5102         lt_cv_prog_cc_wl='-LD'
5103       else
5104         lt_cv_prog_cc_wl='-Wl,'
5105       fi
5106       ;;
5107
5108     uts4*)
5109       lt_cv_prog_cc_pic='-pic'
5110       lt_cv_prog_cc_static='-Bstatic'
5111       ;;
5112
5113     sysv4*MP*)
5114       if test -d /usr/nec ;then
5115         lt_cv_prog_cc_pic='-Kconform_pic'
5116         lt_cv_prog_cc_static='-Bstatic'
5117       fi
5118       ;;
5119
5120     *)
5121       lt_cv_prog_cc_can_build_shared=no
5122       ;;
5123     esac
5124   fi
5125
5126 fi
5127
5128 if test -z "$lt_cv_prog_cc_pic"; then
5129   echo "$ac_t""none" 1>&6
5130 else
5131   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5132
5133   # Check to make sure the pic_flag actually works.
5134   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5135 echo "configure:5136: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5136   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5137   echo $ac_n "(cached) $ac_c" 1>&6
5138 else
5139       save_CFLAGS="$CFLAGS"
5140     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5141     cat > conftest.$ac_ext <<EOF
5142 #line 5143 "configure"
5143 #include "confdefs.h"
5144
5145 int main() {
5146
5147 ; return 0; }
5148 EOF
5149 if { (eval echo configure:5150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5150   rm -rf conftest*
5151         case $host_os in
5152       hpux9* | hpux10* | hpux11*)
5153         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5154         # they create non-PIC objects.  So, if there were any warnings, we
5155         # assume that PIC is not supported.
5156         if test -s conftest.err; then
5157           lt_cv_prog_cc_pic_works=no
5158         else
5159           lt_cv_prog_cc_pic_works=yes
5160         fi
5161         ;;
5162       *)
5163         lt_cv_prog_cc_pic_works=yes
5164         ;;
5165       esac
5166     
5167 else
5168   echo "configure: failed program was:" >&5
5169   cat conftest.$ac_ext >&5
5170   rm -rf conftest*
5171         lt_cv_prog_cc_pic_works=no
5172     
5173 fi
5174 rm -f conftest*
5175     CFLAGS="$save_CFLAGS"
5176   
5177 fi
5178
5179
5180   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5181     lt_cv_prog_cc_pic=
5182     lt_cv_prog_cc_can_build_shared=no
5183   else
5184     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5185   fi
5186
5187   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5188 fi
5189
5190 # Check for any special shared library compilation flags.
5191 if test -n "$lt_cv_prog_cc_shlib"; then
5192   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5193   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5194   else
5195    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5196     lt_cv_prog_cc_can_build_shared=no
5197   fi
5198 fi
5199
5200 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5201 echo "configure:5202: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5202 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5203   echo $ac_n "(cached) $ac_c" 1>&6
5204 else
5205     lt_cv_prog_cc_static_works=no
5206   save_LDFLAGS="$LDFLAGS"
5207   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5208   cat > conftest.$ac_ext <<EOF
5209 #line 5210 "configure"
5210 #include "confdefs.h"
5211
5212 int main() {
5213
5214 ; return 0; }
5215 EOF
5216 if { (eval echo configure:5217: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5217   rm -rf conftest*
5218   lt_cv_prog_cc_static_works=yes
5219 else
5220   echo "configure: failed program was:" >&5
5221   cat conftest.$ac_ext >&5
5222 fi
5223 rm -f conftest*
5224   LDFLAGS="$save_LDFLAGS"
5225
5226 fi
5227
5228
5229 # Belt *and* braces to stop my trousers falling down:
5230 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5231 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5232
5233 pic_flag="$lt_cv_prog_cc_pic"
5234 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5235 wl="$lt_cv_prog_cc_wl"
5236 link_static_flag="$lt_cv_prog_cc_static"
5237 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5238 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5239
5240
5241 # Check to see if options -o and -c are simultaneously supported by compiler
5242 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5243 echo "configure:5244: checking if $compiler supports -c -o file.$ac_objext" >&5
5244 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5245   echo $ac_n "(cached) $ac_c" 1>&6
5246 else
5247   
5248 $rm -r conftest 2>/dev/null
5249 mkdir conftest
5250 cd conftest
5251 echo "int some_variable = 0;" > conftest.$ac_ext
5252 mkdir out
5253 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5254 # that will create temporary files in the current directory regardless of
5255 # the output directory.  Thus, making CWD read-only will cause this test
5256 # to fail, enabling locking or at least warning the user not to do parallel
5257 # builds.
5258 chmod -w .
5259 save_CFLAGS="$CFLAGS"
5260 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5261 compiler_c_o=no
5262 if { (eval echo configure:5263: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5263   # The compiler can only warn and ignore the option if not recognized
5264   # So say no if there are warnings
5265   if test -s out/conftest.err; then
5266     lt_cv_compiler_c_o=no
5267   else
5268     lt_cv_compiler_c_o=yes
5269   fi
5270 else
5271   # Append any errors to the config.log.
5272   cat out/conftest.err 1>&5
5273   lt_cv_compiler_c_o=no
5274 fi
5275 CFLAGS="$save_CFLAGS"
5276 chmod u+w .
5277 $rm conftest* out/*
5278 rmdir out
5279 cd ..
5280 rmdir conftest
5281 $rm -r conftest 2>/dev/null
5282
5283 fi
5284
5285 compiler_c_o=$lt_cv_compiler_c_o
5286 echo "$ac_t""$compiler_c_o" 1>&6
5287
5288 if test x"$compiler_c_o" = x"yes"; then
5289   # Check to see if we can write to a .lo
5290   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5291 echo "configure:5292: checking if $compiler supports -c -o file.lo" >&5
5292   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5293   echo $ac_n "(cached) $ac_c" 1>&6
5294 else
5295   
5296   lt_cv_compiler_o_lo=no
5297   save_CFLAGS="$CFLAGS"
5298   CFLAGS="$CFLAGS -c -o conftest.lo"
5299   save_objext="$ac_objext"
5300   ac_objext=lo
5301   cat > conftest.$ac_ext <<EOF
5302 #line 5303 "configure"
5303 #include "confdefs.h"
5304
5305 int main() {
5306 int some_variable = 0;
5307 ; return 0; }
5308 EOF
5309 if { (eval echo configure:5310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5310   rm -rf conftest*
5311       # The compiler can only warn and ignore the option if not recognized
5312     # So say no if there are warnings
5313     if test -s conftest.err; then
5314       lt_cv_compiler_o_lo=no
5315     else
5316       lt_cv_compiler_o_lo=yes
5317     fi
5318   
5319 else
5320   echo "configure: failed program was:" >&5
5321   cat conftest.$ac_ext >&5
5322 fi
5323 rm -f conftest*
5324   ac_objext="$save_objext"
5325   CFLAGS="$save_CFLAGS"
5326   
5327 fi
5328
5329   compiler_o_lo=$lt_cv_compiler_o_lo
5330   echo "$ac_t""$compiler_o_lo" 1>&6
5331 else
5332   compiler_o_lo=no
5333 fi
5334
5335 # Check to see if we can do hard links to lock some files if needed
5336 hard_links="nottested"
5337 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5338   # do not overwrite the value of need_locks provided by the user
5339   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5340 echo "configure:5341: checking if we can lock with hard links" >&5
5341   hard_links=yes
5342   $rm conftest*
5343   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5344   touch conftest.a
5345   ln conftest.a conftest.b 2>&5 || hard_links=no
5346   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5347   echo "$ac_t""$hard_links" 1>&6
5348   if test "$hard_links" = no; then
5349     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5350     need_locks=warn
5351   fi
5352 else
5353   need_locks=no
5354 fi
5355
5356 if test "$GCC" = yes; then
5357   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5358   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5359 echo "configure:5360: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5360   echo "int some_variable = 0;" > conftest.$ac_ext
5361   save_CFLAGS="$CFLAGS"
5362   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5363   compiler_rtti_exceptions=no
5364   cat > conftest.$ac_ext <<EOF
5365 #line 5366 "configure"
5366 #include "confdefs.h"
5367
5368 int main() {
5369 int some_variable = 0;
5370 ; return 0; }
5371 EOF
5372 if { (eval echo configure:5373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5373   rm -rf conftest*
5374       # The compiler can only warn and ignore the option if not recognized
5375     # So say no if there are warnings
5376     if test -s conftest.err; then
5377       compiler_rtti_exceptions=no
5378     else
5379       compiler_rtti_exceptions=yes
5380     fi
5381   
5382 else
5383   echo "configure: failed program was:" >&5
5384   cat conftest.$ac_ext >&5
5385 fi
5386 rm -f conftest*
5387   CFLAGS="$save_CFLAGS"
5388   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5389
5390   if test "$compiler_rtti_exceptions" = "yes"; then
5391     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5392   else
5393     no_builtin_flag=' -fno-builtin'
5394   fi
5395 fi
5396
5397 # See if the linker supports building shared libraries.
5398 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5399 echo "configure:5400: checking whether the linker ($LD) supports shared libraries" >&5
5400
5401 allow_undefined_flag=
5402 no_undefined_flag=
5403 need_lib_prefix=unknown
5404 need_version=unknown
5405 # when you set need_version to no, make sure it does not cause -set_version
5406 # flags to be left without arguments
5407 archive_cmds=
5408 archive_expsym_cmds=
5409 old_archive_from_new_cmds=
5410 old_archive_from_expsyms_cmds=
5411 export_dynamic_flag_spec=
5412 whole_archive_flag_spec=
5413 thread_safe_flag_spec=
5414 hardcode_into_libs=no
5415 hardcode_libdir_flag_spec=
5416 hardcode_libdir_separator=
5417 hardcode_direct=no
5418 hardcode_minus_L=no
5419 hardcode_shlibpath_var=unsupported
5420 runpath_var=
5421 link_all_deplibs=unknown
5422 always_export_symbols=no
5423 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5424 # include_expsyms should be a list of space-separated symbols to be *always*
5425 # included in the symbol list
5426 include_expsyms=
5427 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5428 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5429 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5430 # as well as any symbol that contains `d'.
5431 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5432 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5433 # platforms (ab)use it in PIC code, but their linkers get confused if
5434 # the symbol is explicitly referenced.  Since portable code cannot
5435 # rely on this symbol name, it's probably fine to never include it in
5436 # preloaded symbol tables.
5437 extract_expsyms_cmds=
5438
5439 case $host_os in
5440 cygwin* | mingw* | pw32*)
5441   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5442   # When not using gcc, we currently assume that we are using
5443   # Microsoft Visual C++.
5444   if test "$GCC" != yes; then
5445     with_gnu_ld=no
5446   fi
5447   ;;
5448 openbsd*)
5449   with_gnu_ld=no
5450   ;;
5451 esac
5452
5453 ld_shlibs=yes
5454 if test "$with_gnu_ld" = yes; then
5455   # If archive_cmds runs LD, not CC, wlarc should be empty
5456   wlarc='${wl}'
5457
5458   # See if GNU ld supports shared libraries.
5459   case $host_os in
5460   aix3* | aix4* | aix5*)
5461     # On AIX, the GNU linker is very broken
5462     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5463     ld_shlibs=no
5464     cat <<EOF 1>&2
5465
5466 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5467 *** to be unable to reliably create shared libraries on AIX.
5468 *** Therefore, libtool is disabling shared libraries support.  If you
5469 *** really care for shared libraries, you may want to modify your PATH
5470 *** so that a non-GNU linker is found, and then restart.
5471
5472 EOF
5473     ;;
5474
5475   amigaos*)
5476     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)'
5477     hardcode_libdir_flag_spec='-L$libdir'
5478     hardcode_minus_L=yes
5479
5480     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5481     # that the semantics of dynamic libraries on AmigaOS, at least up
5482     # to version 4, is to share data among multiple programs linked
5483     # with the same dynamic library.  Since this doesn't match the
5484     # behavior of shared libraries on other platforms, we can use
5485     # them.
5486     ld_shlibs=no
5487     ;;
5488
5489   beos*)
5490     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5491       allow_undefined_flag=unsupported
5492       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5493       # support --undefined.  This deserves some investigation.  FIXME
5494       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5495     else
5496       ld_shlibs=no
5497     fi
5498     ;;
5499
5500   cygwin* | mingw* | pw32*)
5501     # hardcode_libdir_flag_spec is actually meaningless, as there is
5502     # no search path for DLLs.
5503     hardcode_libdir_flag_spec='-L$libdir'
5504     allow_undefined_flag=unsupported
5505     always_export_symbols=yes
5506
5507     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5508       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5509       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5510       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5511       else $CC -o impgen impgen.c ; fi)~
5512       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5513
5514     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5515
5516     # cygwin and mingw dlls have different entry points and sets of symbols
5517     # to exclude.
5518     # FIXME: what about values for MSVC?
5519     dll_entry=__cygwin_dll_entry@12
5520     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5521     case $host_os in
5522     mingw*)
5523       # mingw values
5524       dll_entry=_DllMainCRTStartup@12
5525       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5526       ;;
5527     esac
5528
5529     # mingw and cygwin differ, and it's simplest to just exclude the union
5530     # of the two symbol sets.
5531     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5532
5533     # recent cygwin and mingw systems supply a stub DllMain which the user
5534     # can override, but on older systems we have to supply one (in ltdll.c)
5535     if test "x$lt_cv_need_dllmain" = "xyes"; then
5536       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5537       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~
5538         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5539     else
5540       ltdll_obj=
5541       ltdll_cmds=
5542     fi
5543
5544     # Extract the symbol export list from an `--export-all' def file,
5545     # then regenerate the def file from the symbol export list, so that
5546     # the compiled dll only exports the symbol export list.
5547     # Be careful not to strip the DATA tag left be newer dlltools.
5548     export_symbols_cmds="$ltdll_cmds"'
5549       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5550       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5551
5552     # If the export-symbols file already is a .def file (1st line
5553     # is EXPORTS), use it as is.
5554     # If DATA tags from a recent dlltool are present, honour them!
5555     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5556         cp $export_symbols $output_objdir/$soname-def;
5557       else
5558         echo EXPORTS > $output_objdir/$soname-def;
5559         _lt_hint=1;
5560         cat $export_symbols | while read symbol; do
5561          set dummy \$symbol;
5562          case \$# in
5563            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5564            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5565          esac;
5566          _lt_hint=`expr 1 + \$_lt_hint`;
5567         done;
5568       fi~
5569       '"$ltdll_cmds"'
5570       $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~
5571       $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~
5572       $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~
5573       $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~
5574       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5575     ;;
5576
5577   netbsd*)
5578     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5579       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5580       wlarc=
5581     else
5582       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5583       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5584     fi
5585     ;;
5586
5587   solaris* | sysv5*)
5588     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5589       ld_shlibs=no
5590       cat <<EOF 1>&2
5591
5592 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5593 *** create shared libraries on Solaris systems.  Therefore, libtool
5594 *** is disabling shared libraries support.  We urge you to upgrade GNU
5595 *** binutils to release 2.9.1 or newer.  Another option is to modify
5596 *** your PATH or compiler configuration so that the native linker is
5597 *** used, and then restart.
5598
5599 EOF
5600     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5601       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5602       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5603     else
5604       ld_shlibs=no
5605     fi
5606     ;;
5607
5608   sunos4*)
5609     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5610     wlarc=
5611     hardcode_direct=yes
5612     hardcode_shlibpath_var=no
5613     ;;
5614
5615   *)
5616     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5617       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5618       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5619     else
5620       ld_shlibs=no
5621     fi
5622     ;;
5623   esac
5624
5625   if test "$ld_shlibs" = yes; then
5626     runpath_var=LD_RUN_PATH
5627     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5628     export_dynamic_flag_spec='${wl}--export-dynamic'
5629     case $host_os in
5630     cygwin* | mingw* | pw32*)
5631       # dlltool doesn't understand --whole-archive et. al.
5632       whole_archive_flag_spec=
5633       ;;
5634     *)
5635       # ancient GNU ld didn't support --whole-archive et. al.
5636       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5637         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5638       else
5639         whole_archive_flag_spec=
5640       fi
5641       ;;
5642     esac
5643   fi
5644 else
5645   # PORTME fill in a description of your system's linker (not GNU ld)
5646   case $host_os in
5647   aix3*)
5648     allow_undefined_flag=unsupported
5649     always_export_symbols=yes
5650     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'
5651     # Note: this linker hardcodes the directories in LIBPATH if there
5652     # are no directories specified by -L.
5653     hardcode_minus_L=yes
5654     if test "$GCC" = yes && test -z "$link_static_flag"; then
5655       # Neither direct hardcoding nor static linking is supported with a
5656       # broken collect2.
5657       hardcode_direct=unsupported
5658     fi
5659     ;;
5660
5661   aix4* | aix5*)
5662     if test "$host_cpu" = ia64; then
5663       # On IA64, the linker does run time linking by default, so we don't
5664       # have to do anything special.
5665       aix_use_runtimelinking=no
5666       exp_sym_flag='-Bexport'
5667       no_entry_flag=""
5668     else
5669       aix_use_runtimelinking=no
5670
5671       # Test if we are trying to use run time linking or normal
5672       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5673       # need to do runtime linking.
5674       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5675         for ld_flag in $LDFLAGS; do
5676           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5677             aix_use_runtimelinking=yes
5678             break
5679           fi
5680         done
5681       esac
5682
5683       exp_sym_flag='-bexport'
5684       no_entry_flag='-bnoentry'
5685     fi
5686
5687     # When large executables or shared objects are built, AIX ld can
5688     # have problems creating the table of contents.  If linking a library
5689     # or program results in "error TOC overflow" add -mminimal-toc to
5690     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5691     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5692
5693     hardcode_direct=yes
5694     archive_cmds=''
5695     hardcode_libdir_separator=':'
5696     if test "$GCC" = yes; then
5697       case $host_os in aix4.[012]|aix4.[012].*)
5698         collect2name=`${CC} -print-prog-name=collect2`
5699         if test -f "$collect2name" && \
5700           strings "$collect2name" | grep resolve_lib_name >/dev/null
5701         then
5702           # We have reworked collect2
5703           hardcode_direct=yes
5704         else
5705           # We have old collect2
5706           hardcode_direct=unsupported
5707           # It fails to find uninstalled libraries when the uninstalled
5708           # path is not listed in the libpath.  Setting hardcode_minus_L
5709           # to unsupported forces relinking
5710           hardcode_minus_L=yes
5711           hardcode_libdir_flag_spec='-L$libdir'
5712           hardcode_libdir_separator=
5713         fi
5714       esac
5715
5716       shared_flag='-shared'
5717     else
5718       # not using gcc
5719       if test "$host_cpu" = ia64; then
5720         shared_flag='${wl}-G'
5721       else
5722         if test "$aix_use_runtimelinking" = yes; then
5723           shared_flag='${wl}-G'
5724         else
5725           shared_flag='${wl}-bM:SRE'
5726         fi
5727       fi
5728     fi
5729
5730     # It seems that -bexpall can do strange things, so it is better to
5731     # generate a list of symbols to export.
5732     always_export_symbols=yes
5733     if test "$aix_use_runtimelinking" = yes; then
5734       # Warning - without using the other runtime loading flags (-brtl),
5735       # -berok will link without error, but may produce a broken library.
5736       allow_undefined_flag='-berok'
5737       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5738       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"
5739     else
5740       if test "$host_cpu" = ia64; then
5741         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5742         allow_undefined_flag="-z nodefs"
5743         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"
5744       else
5745         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5746         # Warning - without using the other run time loading flags,
5747         # -berok will link without error, but may produce a broken library.
5748         allow_undefined_flag='${wl}-berok'
5749         # This is a bit strange, but is similar to how AIX traditionally builds
5750         # it's shared libraries.
5751         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'
5752       fi
5753     fi
5754     ;;
5755
5756   amigaos*)
5757     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)'
5758     hardcode_libdir_flag_spec='-L$libdir'
5759     hardcode_minus_L=yes
5760     # see comment about different semantics on the GNU ld section
5761     ld_shlibs=no
5762     ;;
5763
5764   cygwin* | mingw* | pw32*)
5765     # When not using gcc, we currently assume that we are using
5766     # Microsoft Visual C++.
5767     # hardcode_libdir_flag_spec is actually meaningless, as there is
5768     # no search path for DLLs.
5769     hardcode_libdir_flag_spec=' '
5770     allow_undefined_flag=unsupported
5771     # Tell ltmain to make .lib files, not .a files.
5772     libext=lib
5773     # FIXME: Setting linknames here is a bad hack.
5774     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5775     # The linker will automatically build a .lib file if we build a DLL.
5776     old_archive_from_new_cmds='true'
5777     # FIXME: Should let the user specify the lib program.
5778     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5779     fix_srcfile_path='`cygpath -w "$srcfile"`'
5780     ;;
5781
5782   darwin* | rhapsody*)
5783     case "$host_os" in
5784     rhapsody* | darwin1.[012])
5785       allow_undefined_flag='-undefined suppress'
5786       ;;
5787     *) # Darwin 1.3 on
5788       allow_undefined_flag='-flat_namespace -undefined suppress'
5789       ;;
5790     esac
5791     # FIXME: Relying on posixy $() will cause problems for
5792     #        cross-compilation, but unfortunately the echo tests do not
5793     #        yet detect zsh echo's removal of \ escapes.
5794     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'
5795     # We need to add '_' to the symbols in $export_symbols first
5796     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5797     hardcode_direct=yes
5798     hardcode_shlibpath_var=no
5799     whole_archive_flag_spec='-all_load $convenience'
5800     ;;
5801
5802   freebsd1*)
5803     ld_shlibs=no
5804     ;;
5805
5806   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5807   # support.  Future versions do this automatically, but an explicit c++rt0.o
5808   # does not break anything, and helps significantly (at the cost of a little
5809   # extra space).
5810   freebsd2.2*)
5811     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5812     hardcode_libdir_flag_spec='-R$libdir'
5813     hardcode_direct=yes
5814     hardcode_shlibpath_var=no
5815     ;;
5816
5817   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5818   freebsd2*)
5819     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5820     hardcode_direct=yes
5821     hardcode_minus_L=yes
5822     hardcode_shlibpath_var=no
5823     ;;
5824
5825   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5826   freebsd*)
5827     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5828     hardcode_libdir_flag_spec='-R$libdir'
5829     hardcode_direct=yes
5830     hardcode_shlibpath_var=no
5831     ;;
5832
5833   hpux9* | hpux10* | hpux11*)
5834     case $host_os in
5835     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' ;;
5836     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5837     esac
5838     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5839     hardcode_libdir_separator=:
5840     hardcode_direct=yes
5841     hardcode_minus_L=yes # Not in the search PATH, but as the default
5842                          # location of the library.
5843     export_dynamic_flag_spec='${wl}-E'
5844     ;;
5845
5846   irix5* | irix6*)
5847     if test "$GCC" = yes; then
5848       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'
5849     else
5850       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'
5851     fi
5852     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5853     hardcode_libdir_separator=:
5854     link_all_deplibs=yes
5855     ;;
5856
5857   netbsd*)
5858     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5859       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5860     else
5861       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5862     fi
5863     hardcode_libdir_flag_spec='-R$libdir'
5864     hardcode_direct=yes
5865     hardcode_shlibpath_var=no
5866     ;;
5867
5868   newsos6)
5869     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5870     hardcode_direct=yes
5871     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5872     hardcode_libdir_separator=:
5873     hardcode_shlibpath_var=no
5874     ;;
5875
5876   openbsd*)
5877     hardcode_direct=yes
5878     hardcode_shlibpath_var=no
5879     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5880       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5881       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5882       export_dynamic_flag_spec='${wl}-E'
5883     else
5884       case "$host_os" in
5885       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5886         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5887         hardcode_libdir_flag_spec='-R$libdir'
5888         ;;
5889       *)
5890         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5891         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5892         ;;
5893       esac
5894     fi
5895     ;;
5896
5897   os2*)
5898     hardcode_libdir_flag_spec='-L$libdir'
5899     hardcode_minus_L=yes
5900     allow_undefined_flag=unsupported
5901     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'
5902     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5903     ;;
5904
5905   osf3*)
5906     if test "$GCC" = yes; then
5907       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5908       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'
5909     else
5910       allow_undefined_flag=' -expect_unresolved \*'
5911       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'
5912     fi
5913     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5914     hardcode_libdir_separator=:
5915     ;;
5916
5917   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5918     if test "$GCC" = yes; then
5919       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5920       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'
5921       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5922     else
5923       allow_undefined_flag=' -expect_unresolved \*'
5924       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'
5925       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5926       $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'
5927
5928       #Both c and cxx compiler support -rpath directly
5929       hardcode_libdir_flag_spec='-rpath $libdir'
5930     fi
5931     hardcode_libdir_separator=:
5932     ;;
5933
5934   sco3.2v5*)
5935     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5936     hardcode_shlibpath_var=no
5937     runpath_var=LD_RUN_PATH
5938     hardcode_runpath_var=yes
5939     export_dynamic_flag_spec='${wl}-Bexport'
5940     ;;
5941
5942   solaris*)
5943     # gcc --version < 3.0 without binutils cannot create self contained
5944     # shared libraries reliably, requiring libgcc.a to resolve some of
5945     # the object symbols generated in some cases.  Libraries that use
5946     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5947     # a copy of libgcc.a into every shared library to guarantee resolving
5948     # such symbols causes other problems:  According to Tim Van Holder
5949     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5950     # (to the application) exception stack for one thing.
5951     no_undefined_flag=' -z defs'
5952     if test "$GCC" = yes; then
5953       case `$CC --version 2>/dev/null` in
5954       [12].*)
5955         cat <<EOF 1>&2
5956
5957 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5958 *** create self contained shared libraries on Solaris systems, without
5959 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5960 *** -no-undefined support, which will at least allow you to build shared
5961 *** libraries.  However, you may find that when you link such libraries
5962 *** into an application without using GCC, you have to manually add
5963 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5964 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5965 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5966
5967 EOF
5968         no_undefined_flag=
5969         ;;
5970       esac
5971     fi
5972     # $CC -shared without GNU ld will not create a library from C++
5973     # object files and a static libstdc++, better avoid it by now
5974     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5975     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5976                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5977     hardcode_libdir_flag_spec='-R$libdir'
5978     hardcode_shlibpath_var=no
5979     case $host_os in
5980     solaris2.[0-5] | solaris2.[0-5].*) ;;
5981     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5982       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5983     esac
5984     link_all_deplibs=yes
5985     ;;
5986
5987   sunos4*)
5988     if test "x$host_vendor" = xsequent; then
5989       # Use $CC to link under sequent, because it throws in some extra .o
5990       # files that make .init and .fini sections work.
5991       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5992     else
5993       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5994     fi
5995     hardcode_libdir_flag_spec='-L$libdir'
5996     hardcode_direct=yes
5997     hardcode_minus_L=yes
5998     hardcode_shlibpath_var=no
5999     ;;
6000
6001   sysv4)
6002     if test "x$host_vendor" = xsno; then
6003       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
6004       hardcode_direct=yes # is this really true???
6005     else
6006       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6007       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6008     fi
6009     runpath_var='LD_RUN_PATH'
6010     hardcode_shlibpath_var=no
6011     ;;
6012
6013   sysv4.3*)
6014     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6015     hardcode_shlibpath_var=no
6016     export_dynamic_flag_spec='-Bexport'
6017     ;;
6018
6019   sysv5*)
6020     no_undefined_flag=' -z text'
6021     # $CC -shared without GNU ld will not create a library from C++
6022     # object files and a static libstdc++, better avoid it by now
6023     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6024     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6025                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6026     hardcode_libdir_flag_spec=
6027     hardcode_shlibpath_var=no
6028     runpath_var='LD_RUN_PATH'
6029     ;;
6030
6031   uts4*)
6032     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6033     hardcode_libdir_flag_spec='-L$libdir'
6034     hardcode_shlibpath_var=no
6035     ;;
6036
6037   dgux*)
6038     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6039     hardcode_libdir_flag_spec='-L$libdir'
6040     hardcode_shlibpath_var=no
6041     ;;
6042
6043   sysv4*MP*)
6044     if test -d /usr/nec; then
6045       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6046       hardcode_shlibpath_var=no
6047       runpath_var=LD_RUN_PATH
6048       hardcode_runpath_var=yes
6049       ld_shlibs=yes
6050     fi
6051     ;;
6052
6053   sysv4.2uw2*)
6054     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6055     hardcode_direct=yes
6056     hardcode_minus_L=no
6057     hardcode_shlibpath_var=no
6058     hardcode_runpath_var=yes
6059     runpath_var=LD_RUN_PATH
6060     ;;
6061
6062   sysv5uw7* | unixware7*)
6063     no_undefined_flag='${wl}-z ${wl}text'
6064     if test "$GCC" = yes; then
6065       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6066     else
6067       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6068     fi
6069     runpath_var='LD_RUN_PATH'
6070     hardcode_shlibpath_var=no
6071     ;;
6072
6073   *)
6074     ld_shlibs=no
6075     ;;
6076   esac
6077 fi
6078 echo "$ac_t""$ld_shlibs" 1>&6
6079 test "$ld_shlibs" = no && can_build_shared=no
6080
6081 # Check hardcoding attributes.
6082 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6083 echo "configure:6084: checking how to hardcode library paths into programs" >&5
6084 hardcode_action=
6085 if test -n "$hardcode_libdir_flag_spec" || \
6086    test -n "$runpath_var"; then
6087
6088   # We can hardcode non-existant directories.
6089   if test "$hardcode_direct" != no &&
6090      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6091      # have to relink, otherwise we might link with an installed library
6092      # when we should be linking with a yet-to-be-installed one
6093      ## test "$hardcode_shlibpath_var" != no &&
6094      test "$hardcode_minus_L" != no; then
6095     # Linking always hardcodes the temporary library directory.
6096     hardcode_action=relink
6097   else
6098     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6099     hardcode_action=immediate
6100   fi
6101 else
6102   # We cannot hardcode anything, or else we can only hardcode existing
6103   # directories.
6104   hardcode_action=unsupported
6105 fi
6106 echo "$ac_t""$hardcode_action" 1>&6
6107
6108 striplib=
6109 old_striplib=
6110 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6111 echo "configure:6112: checking whether stripping libraries is possible" >&5
6112 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6113   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6114   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6115   echo "$ac_t""yes" 1>&6
6116 else
6117   echo "$ac_t""no" 1>&6
6118 fi
6119
6120 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6121 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6122
6123 # PORTME Fill in your ld.so characteristics
6124 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6125 echo "configure:6126: checking dynamic linker characteristics" >&5
6126 library_names_spec=
6127 libname_spec='lib$name'
6128 soname_spec=
6129 postinstall_cmds=
6130 postuninstall_cmds=
6131 finish_cmds=
6132 finish_eval=
6133 shlibpath_var=
6134 shlibpath_overrides_runpath=unknown
6135 version_type=none
6136 dynamic_linker="$host_os ld.so"
6137 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6138 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6139
6140 case $host_os in
6141 aix3*)
6142   version_type=linux
6143   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6144   shlibpath_var=LIBPATH
6145
6146   # AIX has no versioning support, so we append a major version to the name.
6147   soname_spec='${libname}${release}.so$major'
6148   ;;
6149
6150 aix4* | aix5*)
6151   version_type=linux
6152   if test "$host_cpu" = ia64; then
6153     # AIX 5 supports IA64
6154     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6155     shlibpath_var=LD_LIBRARY_PATH
6156   else
6157     # With GCC up to 2.95.x, collect2 would create an import file
6158     # for dependence libraries.  The import file would start with
6159     # the line `#! .'.  This would cause the generated library to
6160     # depend on `.', always an invalid library.  This was fixed in
6161     # development snapshots of GCC prior to 3.0.
6162     case $host_os in
6163       aix4 | aix4.[01] | aix4.[01].*)
6164         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6165              echo ' yes '
6166              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6167           :
6168         else
6169           can_build_shared=no
6170         fi
6171         ;;
6172     esac
6173     # AIX (on Power*) has no versioning support, so currently we can
6174     # not hardcode correct soname into executable. Probably we can
6175     # add versioning support to collect2, so additional links can
6176     # be useful in future.
6177     if test "$aix_use_runtimelinking" = yes; then
6178       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6179       # instead of lib<name>.a to let people know that these are not
6180       # typical AIX shared libraries.
6181       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6182     else
6183       # We preserve .a as extension for shared libraries through AIX4.2
6184       # and later when we are not doing run time linking.
6185       library_names_spec='${libname}${release}.a $libname.a'
6186       soname_spec='${libname}${release}.so$major'
6187     fi
6188     shlibpath_var=LIBPATH
6189   fi
6190   ;;
6191
6192 amigaos*)
6193   library_names_spec='$libname.ixlibrary $libname.a'
6194   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6195   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'
6196   ;;
6197
6198 beos*)
6199   library_names_spec='${libname}.so'
6200   dynamic_linker="$host_os ld.so"
6201   shlibpath_var=LIBRARY_PATH
6202   ;;
6203
6204 bsdi4*)
6205   version_type=linux
6206   need_version=no
6207   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6208   soname_spec='${libname}${release}.so$major'
6209   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6210   shlibpath_var=LD_LIBRARY_PATH
6211   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6212   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6213   export_dynamic_flag_spec=-rdynamic
6214   # the default ld.so.conf also contains /usr/contrib/lib and
6215   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6216   # libtool to hard-code these into programs
6217   ;;
6218
6219 cygwin* | mingw* | pw32*)
6220   version_type=windows
6221   need_version=no
6222   need_lib_prefix=no
6223   case $GCC,$host_os in
6224   yes,cygwin*)
6225     library_names_spec='$libname.dll.a'
6226     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6227     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6228       dldir=$destdir/`dirname \$dlpath`~
6229       test -d \$dldir || mkdir -p \$dldir~
6230       $install_prog .libs/$dlname \$dldir/$dlname'
6231     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6232       dlpath=$dir/\$dldll~
6233        $rm \$dlpath'
6234     ;;
6235   yes,mingw*)
6236     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6237     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6238     ;;
6239   yes,pw32*)
6240     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6241     ;;
6242   *)
6243     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6244     ;;
6245   esac
6246   dynamic_linker='Win32 ld.exe'
6247   # FIXME: first we should search . and the directory the executable is in
6248   shlibpath_var=PATH
6249   ;;
6250
6251 darwin* | rhapsody*)
6252   dynamic_linker="$host_os dyld"
6253   version_type=darwin
6254   need_lib_prefix=no
6255   need_version=no
6256   # FIXME: Relying on posixy $() will cause problems for
6257   #        cross-compilation, but unfortunately the echo tests do not
6258   #        yet detect zsh echo's removal of \ escapes.
6259   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)'
6260   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6261   shlibpath_overrides_runpath=yes
6262   shlibpath_var=DYLD_LIBRARY_PATH
6263   ;;
6264
6265 freebsd1*)
6266   dynamic_linker=no
6267   ;;
6268
6269 freebsd*)
6270   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6271   version_type=freebsd-$objformat
6272   case $version_type in
6273     freebsd-elf*)
6274       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6275       need_version=no
6276       need_lib_prefix=no
6277       ;;
6278     freebsd-*)
6279       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6280       need_version=yes
6281       ;;
6282   esac
6283   shlibpath_var=LD_LIBRARY_PATH
6284   case $host_os in
6285   freebsd2*)
6286     shlibpath_overrides_runpath=yes
6287     ;;
6288   *)
6289     shlibpath_overrides_runpath=no
6290     hardcode_into_libs=yes
6291     ;;
6292   esac
6293   ;;
6294
6295 gnu*)
6296   version_type=linux
6297   need_lib_prefix=no
6298   need_version=no
6299   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6300   soname_spec='${libname}${release}.so$major'
6301   shlibpath_var=LD_LIBRARY_PATH
6302   hardcode_into_libs=yes
6303   ;;
6304
6305 hpux9* | hpux10* | hpux11*)
6306   # Give a soname corresponding to the major version so that dld.sl refuses to
6307   # link against other versions.
6308   dynamic_linker="$host_os dld.sl"
6309   version_type=sunos
6310   need_lib_prefix=no
6311   need_version=no
6312   shlibpath_var=SHLIB_PATH
6313   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6314   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6315   soname_spec='${libname}${release}.sl$major'
6316   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6317   postinstall_cmds='chmod 555 $lib'
6318   ;;
6319
6320 irix5* | irix6*)
6321   version_type=irix
6322   need_lib_prefix=no
6323   need_version=no
6324   soname_spec='${libname}${release}.so$major'
6325   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6326   case $host_os in
6327   irix5*)
6328     libsuff= shlibsuff=
6329     ;;
6330   *)
6331     case $LD in # libtool.m4 will add one of these switches to LD
6332     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6333     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6334     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6335     *) libsuff= shlibsuff= libmagic=never-match;;
6336     esac
6337     ;;
6338   esac
6339   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6340   shlibpath_overrides_runpath=no
6341   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6342   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6343   ;;
6344
6345 # No shared lib support for Linux oldld, aout, or coff.
6346 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6347   dynamic_linker=no
6348   ;;
6349
6350 # This must be Linux ELF.
6351 linux-gnu*)
6352   version_type=linux
6353   need_lib_prefix=no
6354   need_version=no
6355   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6356   soname_spec='${libname}${release}.so$major'
6357   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6358   shlibpath_var=LD_LIBRARY_PATH
6359   shlibpath_overrides_runpath=no
6360   # This implies no fast_install, which is unacceptable.
6361   # Some rework will be needed to allow for fast_install
6362   # before this can be enabled.
6363   hardcode_into_libs=yes
6364
6365   # We used to test for /lib/ld.so.1 and disable shared libraries on
6366   # powerpc, because MkLinux only supported shared libraries with the
6367   # GNU dynamic linker.  Since this was broken with cross compilers,
6368   # most powerpc-linux boxes support dynamic linking these days and
6369   # people can always --disable-shared, the test was removed, and we
6370   # assume the GNU/Linux dynamic linker is in use.
6371   dynamic_linker='GNU/Linux ld.so'
6372   ;;
6373
6374 netbsd*)
6375   version_type=sunos
6376   need_lib_prefix=no
6377   need_version=no
6378   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6379     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6380     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6381     dynamic_linker='NetBSD (a.out) ld.so'
6382   else
6383     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6384     soname_spec='${libname}${release}.so$major'
6385     dynamic_linker='NetBSD ld.elf_so'
6386   fi
6387   shlibpath_var=LD_LIBRARY_PATH
6388   shlibpath_overrides_runpath=yes
6389   hardcode_into_libs=yes
6390   ;;
6391
6392 newsos6)
6393   version_type=linux
6394   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6395   shlibpath_var=LD_LIBRARY_PATH
6396   shlibpath_overrides_runpath=yes
6397   ;;
6398
6399 openbsd*)
6400   version_type=sunos
6401   need_lib_prefix=no
6402   need_version=no
6403   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6404     case "$host_os" in
6405     openbsd2.[89] | openbsd2.[89].*)
6406       shlibpath_overrides_runpath=no
6407       ;;
6408     *)
6409       shlibpath_overrides_runpath=yes
6410       ;;
6411     esac
6412   else
6413     shlibpath_overrides_runpath=yes
6414   fi
6415   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6416   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6417   shlibpath_var=LD_LIBRARY_PATH
6418   ;;
6419
6420 os2*)
6421   libname_spec='$name'
6422   need_lib_prefix=no
6423   library_names_spec='$libname.dll $libname.a'
6424   dynamic_linker='OS/2 ld.exe'
6425   shlibpath_var=LIBPATH
6426   ;;
6427
6428 osf3* | osf4* | osf5*)
6429   version_type=osf
6430   need_version=no
6431   soname_spec='${libname}${release}.so'
6432   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6433   shlibpath_var=LD_LIBRARY_PATH
6434   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6435   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6436   ;;
6437
6438 sco3.2v5*)
6439   version_type=osf
6440   soname_spec='${libname}${release}.so$major'
6441   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6442   shlibpath_var=LD_LIBRARY_PATH
6443   ;;
6444
6445 solaris*)
6446   version_type=linux
6447   need_lib_prefix=no
6448   need_version=no
6449   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6450   soname_spec='${libname}${release}.so$major'
6451   shlibpath_var=LD_LIBRARY_PATH
6452   shlibpath_overrides_runpath=yes
6453   hardcode_into_libs=yes
6454   # ldd complains unless libraries are executable
6455   postinstall_cmds='chmod +x $lib'
6456   ;;
6457
6458 sunos4*)
6459   version_type=sunos
6460   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6461   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6462   shlibpath_var=LD_LIBRARY_PATH
6463   shlibpath_overrides_runpath=yes
6464   if test "$with_gnu_ld" = yes; then
6465     need_lib_prefix=no
6466   fi
6467   need_version=yes
6468   ;;
6469
6470 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6471   version_type=linux
6472   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6473   soname_spec='${libname}${release}.so$major'
6474   shlibpath_var=LD_LIBRARY_PATH
6475   case $host_vendor in
6476     sni)
6477       shlibpath_overrides_runpath=no
6478       ;;
6479     motorola)
6480       need_lib_prefix=no
6481       need_version=no
6482       shlibpath_overrides_runpath=no
6483       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6484       ;;
6485   esac
6486   ;;
6487
6488 uts4*)
6489   version_type=linux
6490   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6491   soname_spec='${libname}${release}.so$major'
6492   shlibpath_var=LD_LIBRARY_PATH
6493   ;;
6494
6495 dgux*)
6496   version_type=linux
6497   need_lib_prefix=no
6498   need_version=no
6499   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6500   soname_spec='${libname}${release}.so$major'
6501   shlibpath_var=LD_LIBRARY_PATH
6502   ;;
6503
6504 sysv4*MP*)
6505   if test -d /usr/nec ;then
6506     version_type=linux
6507     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6508     soname_spec='$libname.so.$major'
6509     shlibpath_var=LD_LIBRARY_PATH
6510   fi
6511   ;;
6512
6513 *)
6514   dynamic_linker=no
6515   ;;
6516 esac
6517 echo "$ac_t""$dynamic_linker" 1>&6
6518 test "$dynamic_linker" = no && can_build_shared=no
6519
6520 # Report the final consequences.
6521 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6522 echo "configure:6523: checking if libtool supports shared libraries" >&5
6523 echo "$ac_t""$can_build_shared" 1>&6
6524
6525 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6526 echo "configure:6527: checking whether to build shared libraries" >&5
6527 test "$can_build_shared" = "no" && enable_shared=no
6528
6529 # On AIX, shared libraries and static libraries use the same namespace, and
6530 # are all built from PIC.
6531 case "$host_os" in
6532 aix3*)
6533   test "$enable_shared" = yes && enable_static=no
6534   if test -n "$RANLIB"; then
6535     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6536     postinstall_cmds='$RANLIB $lib'
6537   fi
6538   ;;
6539
6540 aix4*)
6541   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6542     test "$enable_shared" = yes && enable_static=no
6543   fi
6544   ;;
6545 esac
6546 echo "$ac_t""$enable_shared" 1>&6
6547
6548 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6549 echo "configure:6550: checking whether to build static libraries" >&5
6550 # Make sure either enable_shared or enable_static is yes.
6551 test "$enable_shared" = yes || enable_static=yes
6552 echo "$ac_t""$enable_static" 1>&6
6553
6554 if test "$hardcode_action" = relink; then
6555   # Fast installation is not supported
6556   enable_fast_install=no
6557 elif test "$shlibpath_overrides_runpath" = yes ||
6558      test "$enable_shared" = no; then
6559   # Fast installation is not necessary
6560   enable_fast_install=needless
6561 fi
6562
6563 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6564 if test "$GCC" = yes; then
6565   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6566 fi
6567
6568 if test "x$enable_dlopen" != xyes; then
6569   enable_dlopen=unknown
6570   enable_dlopen_self=unknown
6571   enable_dlopen_self_static=unknown
6572 else
6573   lt_cv_dlopen=no
6574   lt_cv_dlopen_libs=
6575
6576   case $host_os in
6577   beos*)
6578     lt_cv_dlopen="load_add_on"
6579     lt_cv_dlopen_libs=
6580     lt_cv_dlopen_self=yes
6581     ;;
6582
6583   cygwin* | mingw* | pw32*)
6584     lt_cv_dlopen="LoadLibrary"
6585     lt_cv_dlopen_libs=
6586    ;;
6587
6588   *)
6589     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6590 echo "configure:6591: checking for shl_load" >&5
6591 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6592   echo $ac_n "(cached) $ac_c" 1>&6
6593 else
6594   cat > conftest.$ac_ext <<EOF
6595 #line 6596 "configure"
6596 #include "confdefs.h"
6597 /* System header to define __stub macros and hopefully few prototypes,
6598     which can conflict with char shl_load(); below.  */
6599 #include <assert.h>
6600 /* Override any gcc2 internal prototype to avoid an error.  */
6601 /* We use char because int might match the return type of a gcc2
6602     builtin and then its argument prototype would still apply.  */
6603 char shl_load();
6604 char (*f)();
6605
6606 int main() {
6607
6608 /* The GNU C library defines this for functions which it implements
6609     to always fail with ENOSYS.  Some functions are actually named
6610     something starting with __ and the normal name is an alias.  */
6611 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6612 choke me
6613 #else
6614 f = shl_load;
6615 #endif
6616
6617 ; return 0; }
6618 EOF
6619 if { (eval echo configure:6620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6620   rm -rf conftest*
6621   eval "ac_cv_func_shl_load=yes"
6622 else
6623   echo "configure: failed program was:" >&5
6624   cat conftest.$ac_ext >&5
6625   rm -rf conftest*
6626   eval "ac_cv_func_shl_load=no"
6627 fi
6628 rm -f conftest*
6629 fi
6630
6631 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6632   echo "$ac_t""yes" 1>&6
6633   lt_cv_dlopen="shl_load"
6634 else
6635   echo "$ac_t""no" 1>&6
6636 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6637 echo "configure:6638: checking for shl_load in -ldld" >&5
6638 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6639 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6640   echo $ac_n "(cached) $ac_c" 1>&6
6641 else
6642   ac_save_LIBS="$LIBS"
6643 LIBS="-ldld  $LIBS"
6644 cat > conftest.$ac_ext <<EOF
6645 #line 6646 "configure"
6646 #include "confdefs.h"
6647 /* Override any gcc2 internal prototype to avoid an error.  */
6648 /* We use char because int might match the return type of a gcc2
6649     builtin and then its argument prototype would still apply.  */
6650 char shl_load();
6651
6652 int main() {
6653 shl_load()
6654 ; return 0; }
6655 EOF
6656 if { (eval echo configure:6657: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6657   rm -rf conftest*
6658   eval "ac_cv_lib_$ac_lib_var=yes"
6659 else
6660   echo "configure: failed program was:" >&5
6661   cat conftest.$ac_ext >&5
6662   rm -rf conftest*
6663   eval "ac_cv_lib_$ac_lib_var=no"
6664 fi
6665 rm -f conftest*
6666 LIBS="$ac_save_LIBS"
6667
6668 fi
6669 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6670   echo "$ac_t""yes" 1>&6
6671   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6672 else
6673   echo "$ac_t""no" 1>&6
6674 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6675 echo "configure:6676: checking for dlopen" >&5
6676 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6677   echo $ac_n "(cached) $ac_c" 1>&6
6678 else
6679   cat > conftest.$ac_ext <<EOF
6680 #line 6681 "configure"
6681 #include "confdefs.h"
6682 /* System header to define __stub macros and hopefully few prototypes,
6683     which can conflict with char dlopen(); below.  */
6684 #include <assert.h>
6685 /* Override any gcc2 internal prototype to avoid an error.  */
6686 /* We use char because int might match the return type of a gcc2
6687     builtin and then its argument prototype would still apply.  */
6688 char dlopen();
6689 char (*f)();
6690
6691 int main() {
6692
6693 /* The GNU C library defines this for functions which it implements
6694     to always fail with ENOSYS.  Some functions are actually named
6695     something starting with __ and the normal name is an alias.  */
6696 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6697 choke me
6698 #else
6699 f = dlopen;
6700 #endif
6701
6702 ; return 0; }
6703 EOF
6704 if { (eval echo configure:6705: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6705   rm -rf conftest*
6706   eval "ac_cv_func_dlopen=yes"
6707 else
6708   echo "configure: failed program was:" >&5
6709   cat conftest.$ac_ext >&5
6710   rm -rf conftest*
6711   eval "ac_cv_func_dlopen=no"
6712 fi
6713 rm -f conftest*
6714 fi
6715
6716 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6717   echo "$ac_t""yes" 1>&6
6718   lt_cv_dlopen="dlopen"
6719 else
6720   echo "$ac_t""no" 1>&6
6721 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6722 echo "configure:6723: checking for dlopen in -ldl" >&5
6723 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6724 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6725   echo $ac_n "(cached) $ac_c" 1>&6
6726 else
6727   ac_save_LIBS="$LIBS"
6728 LIBS="-ldl  $LIBS"
6729 cat > conftest.$ac_ext <<EOF
6730 #line 6731 "configure"
6731 #include "confdefs.h"
6732 /* Override any gcc2 internal prototype to avoid an error.  */
6733 /* We use char because int might match the return type of a gcc2
6734     builtin and then its argument prototype would still apply.  */
6735 char dlopen();
6736
6737 int main() {
6738 dlopen()
6739 ; return 0; }
6740 EOF
6741 if { (eval echo configure:6742: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6742   rm -rf conftest*
6743   eval "ac_cv_lib_$ac_lib_var=yes"
6744 else
6745   echo "configure: failed program was:" >&5
6746   cat conftest.$ac_ext >&5
6747   rm -rf conftest*
6748   eval "ac_cv_lib_$ac_lib_var=no"
6749 fi
6750 rm -f conftest*
6751 LIBS="$ac_save_LIBS"
6752
6753 fi
6754 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6755   echo "$ac_t""yes" 1>&6
6756   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6757 else
6758   echo "$ac_t""no" 1>&6
6759 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6760 echo "configure:6761: checking for dlopen in -lsvld" >&5
6761 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6762 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6763   echo $ac_n "(cached) $ac_c" 1>&6
6764 else
6765   ac_save_LIBS="$LIBS"
6766 LIBS="-lsvld  $LIBS"
6767 cat > conftest.$ac_ext <<EOF
6768 #line 6769 "configure"
6769 #include "confdefs.h"
6770 /* Override any gcc2 internal prototype to avoid an error.  */
6771 /* We use char because int might match the return type of a gcc2
6772     builtin and then its argument prototype would still apply.  */
6773 char dlopen();
6774
6775 int main() {
6776 dlopen()
6777 ; return 0; }
6778 EOF
6779 if { (eval echo configure:6780: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6780   rm -rf conftest*
6781   eval "ac_cv_lib_$ac_lib_var=yes"
6782 else
6783   echo "configure: failed program was:" >&5
6784   cat conftest.$ac_ext >&5
6785   rm -rf conftest*
6786   eval "ac_cv_lib_$ac_lib_var=no"
6787 fi
6788 rm -f conftest*
6789 LIBS="$ac_save_LIBS"
6790
6791 fi
6792 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6793   echo "$ac_t""yes" 1>&6
6794   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6795 else
6796   echo "$ac_t""no" 1>&6
6797 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6798 echo "configure:6799: checking for dld_link in -ldld" >&5
6799 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6800 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6801   echo $ac_n "(cached) $ac_c" 1>&6
6802 else
6803   ac_save_LIBS="$LIBS"
6804 LIBS="-ldld  $LIBS"
6805 cat > conftest.$ac_ext <<EOF
6806 #line 6807 "configure"
6807 #include "confdefs.h"
6808 /* Override any gcc2 internal prototype to avoid an error.  */
6809 /* We use char because int might match the return type of a gcc2
6810     builtin and then its argument prototype would still apply.  */
6811 char dld_link();
6812
6813 int main() {
6814 dld_link()
6815 ; return 0; }
6816 EOF
6817 if { (eval echo configure:6818: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6818   rm -rf conftest*
6819   eval "ac_cv_lib_$ac_lib_var=yes"
6820 else
6821   echo "configure: failed program was:" >&5
6822   cat conftest.$ac_ext >&5
6823   rm -rf conftest*
6824   eval "ac_cv_lib_$ac_lib_var=no"
6825 fi
6826 rm -f conftest*
6827 LIBS="$ac_save_LIBS"
6828
6829 fi
6830 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6831   echo "$ac_t""yes" 1>&6
6832   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6833 else
6834   echo "$ac_t""no" 1>&6
6835 fi
6836
6837               
6838 fi
6839
6840             
6841 fi
6842
6843           
6844 fi
6845
6846         
6847 fi
6848
6849       
6850 fi
6851
6852     ;;
6853   esac
6854
6855   if test "x$lt_cv_dlopen" != xno; then
6856     enable_dlopen=yes
6857   else
6858     enable_dlopen=no
6859   fi
6860
6861   case $lt_cv_dlopen in
6862   dlopen)
6863     save_CPPFLAGS="$CPPFLAGS"
6864         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6865
6866     save_LDFLAGS="$LDFLAGS"
6867     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6868
6869     save_LIBS="$LIBS"
6870     LIBS="$lt_cv_dlopen_libs $LIBS"
6871
6872     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6873 echo "configure:6874: checking whether a program can dlopen itself" >&5
6874 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6875   echo $ac_n "(cached) $ac_c" 1>&6
6876 else
6877           if test "$cross_compiling" = yes; then :
6878   lt_cv_dlopen_self=cross
6879 else
6880     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6881   lt_status=$lt_dlunknown
6882   cat > conftest.$ac_ext <<EOF
6883 #line 6884 "configure"
6884 #include "confdefs.h"
6885
6886 #if HAVE_DLFCN_H
6887 #include <dlfcn.h>
6888 #endif
6889
6890 #include <stdio.h>
6891
6892 #ifdef RTLD_GLOBAL
6893 #  define LT_DLGLOBAL           RTLD_GLOBAL
6894 #else
6895 #  ifdef DL_GLOBAL
6896 #    define LT_DLGLOBAL         DL_GLOBAL
6897 #  else
6898 #    define LT_DLGLOBAL         0
6899 #  endif
6900 #endif
6901
6902 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6903    find out it does not work in some platform. */
6904 #ifndef LT_DLLAZY_OR_NOW
6905 #  ifdef RTLD_LAZY
6906 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6907 #  else
6908 #    ifdef DL_LAZY
6909 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6910 #    else
6911 #      ifdef RTLD_NOW
6912 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6913 #      else
6914 #        ifdef DL_NOW
6915 #          define LT_DLLAZY_OR_NOW      DL_NOW
6916 #        else
6917 #          define LT_DLLAZY_OR_NOW      0
6918 #        endif
6919 #      endif
6920 #    endif
6921 #  endif
6922 #endif
6923
6924 #ifdef __cplusplus
6925 extern "C" void exit (int);
6926 #endif
6927
6928 void fnord() { int i=42;}
6929 int main ()
6930 {
6931   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6932   int status = $lt_dlunknown;
6933
6934   if (self)
6935     {
6936       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6937       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6938       /* dlclose (self); */
6939     }
6940
6941     exit (status);
6942 }
6943 EOF
6944   if { (eval echo configure:6945: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6945     (./conftest; exit; ) 2>/dev/null
6946     lt_status=$?
6947     case x$lt_status in
6948       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6949       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6950       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6951     esac
6952   else :
6953     # compilation failed
6954     lt_cv_dlopen_self=no
6955   fi
6956 fi
6957 rm -fr conftest*
6958
6959     
6960 fi
6961
6962 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6963
6964     if test "x$lt_cv_dlopen_self" = xyes; then
6965       LDFLAGS="$LDFLAGS $link_static_flag"
6966       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6967 echo "configure:6968: checking whether a statically linked program can dlopen itself" >&5
6968 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6969   echo $ac_n "(cached) $ac_c" 1>&6
6970 else
6971           if test "$cross_compiling" = yes; then :
6972   lt_cv_dlopen_self_static=cross
6973 else
6974     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6975   lt_status=$lt_dlunknown
6976   cat > conftest.$ac_ext <<EOF
6977 #line 6978 "configure"
6978 #include "confdefs.h"
6979
6980 #if HAVE_DLFCN_H
6981 #include <dlfcn.h>
6982 #endif
6983
6984 #include <stdio.h>
6985
6986 #ifdef RTLD_GLOBAL
6987 #  define LT_DLGLOBAL           RTLD_GLOBAL
6988 #else
6989 #  ifdef DL_GLOBAL
6990 #    define LT_DLGLOBAL         DL_GLOBAL
6991 #  else
6992 #    define LT_DLGLOBAL         0
6993 #  endif
6994 #endif
6995
6996 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6997    find out it does not work in some platform. */
6998 #ifndef LT_DLLAZY_OR_NOW
6999 #  ifdef RTLD_LAZY
7000 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
7001 #  else
7002 #    ifdef DL_LAZY
7003 #      define LT_DLLAZY_OR_NOW          DL_LAZY
7004 #    else
7005 #      ifdef RTLD_NOW
7006 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7007 #      else
7008 #        ifdef DL_NOW
7009 #          define LT_DLLAZY_OR_NOW      DL_NOW
7010 #        else
7011 #          define LT_DLLAZY_OR_NOW      0
7012 #        endif
7013 #      endif
7014 #    endif
7015 #  endif
7016 #endif
7017
7018 #ifdef __cplusplus
7019 extern "C" void exit (int);
7020 #endif
7021
7022 void fnord() { int i=42;}
7023 int main ()
7024 {
7025   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7026   int status = $lt_dlunknown;
7027
7028   if (self)
7029     {
7030       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7031       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7032       /* dlclose (self); */
7033     }
7034
7035     exit (status);
7036 }
7037 EOF
7038   if { (eval echo configure:7039: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7039     (./conftest; exit; ) 2>/dev/null
7040     lt_status=$?
7041     case x$lt_status in
7042       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7043       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7044       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7045     esac
7046   else :
7047     # compilation failed
7048     lt_cv_dlopen_self_static=no
7049   fi
7050 fi
7051 rm -fr conftest*
7052
7053       
7054 fi
7055
7056 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7057     fi
7058
7059     CPPFLAGS="$save_CPPFLAGS"
7060     LDFLAGS="$save_LDFLAGS"
7061     LIBS="$save_LIBS"
7062     ;;
7063   esac
7064
7065   case $lt_cv_dlopen_self in
7066   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7067   *) enable_dlopen_self=unknown ;;
7068   esac
7069
7070   case $lt_cv_dlopen_self_static in
7071   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7072   *) enable_dlopen_self_static=unknown ;;
7073   esac
7074 fi
7075
7076
7077 if test "$enable_shared" = yes && test "$GCC" = yes; then
7078   case $archive_cmds in
7079   *'~'*)
7080     # FIXME: we may have to deal with multi-command sequences.
7081     ;;
7082   '$CC '*)
7083     # Test whether the compiler implicitly links with -lc since on some
7084     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7085     # to ld, don't add -lc before -lgcc.
7086     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7087 echo "configure:7088: checking whether -lc should be explicitly linked in" >&5
7088     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7089   echo $ac_n "(cached) $ac_c" 1>&6
7090 else
7091   $rm conftest*
7092     echo 'static int dummy;' > conftest.$ac_ext
7093
7094     if { (eval echo configure:7095: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7095       soname=conftest
7096       lib=conftest
7097       libobjs=conftest.$ac_objext
7098       deplibs=
7099       wl=$lt_cv_prog_cc_wl
7100       compiler_flags=-v
7101       linker_flags=-v
7102       verstring=
7103       output_objdir=.
7104       libname=conftest
7105       save_allow_undefined_flag=$allow_undefined_flag
7106       allow_undefined_flag=
7107       if { (eval echo configure:7108: \"$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; }
7108       then
7109         lt_cv_archive_cmds_need_lc=no
7110       else
7111         lt_cv_archive_cmds_need_lc=yes
7112       fi
7113       allow_undefined_flag=$save_allow_undefined_flag
7114     else
7115       cat conftest.err 1>&5
7116     fi
7117 fi
7118
7119     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7120     ;;
7121   esac
7122 fi
7123 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7124
7125 # The second clause should only fire when bootstrapping the
7126 # libtool distribution, otherwise you forgot to ship ltmain.sh
7127 # with your package, and you will get complaints that there are
7128 # no rules to generate ltmain.sh.
7129 if test -f "$ltmain"; then
7130   :
7131 else
7132   # If there is no Makefile yet, we rely on a make rule to execute
7133   # `config.status --recheck' to rerun these tests and create the
7134   # libtool script then.
7135   test -f Makefile && make "$ltmain"
7136 fi
7137
7138 if test -f "$ltmain"; then
7139   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7140   $rm -f "${ofile}T"
7141
7142   echo creating $ofile
7143
7144   # Now quote all the things that may contain metacharacters while being
7145   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7146   # variables and quote the copies for generation of the libtool script.
7147   for var in echo old_CC old_CFLAGS \
7148     AR AR_FLAGS CC LD LN_S NM SHELL \
7149     reload_flag reload_cmds wl \
7150     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7151     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7152     library_names_spec soname_spec \
7153     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7154     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7155     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7156     old_striplib striplib file_magic_cmd export_symbols_cmds \
7157     deplibs_check_method allow_undefined_flag no_undefined_flag \
7158     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7159     global_symbol_to_c_name_address \
7160     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7161     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7162     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7163
7164     case $var in
7165     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7166     old_postinstall_cmds | old_postuninstall_cmds | \
7167     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7168     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7169     postinstall_cmds | postuninstall_cmds | \
7170     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7171       # Double-quote double-evaled strings.
7172       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7173       ;;
7174     *)
7175       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7176       ;;
7177     esac
7178   done
7179
7180   cat <<__EOF__ > "${ofile}T"
7181 #! $SHELL
7182
7183 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7184 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7185 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7186 #
7187 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7188 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7189 #
7190 # This program is free software; you can redistribute it and/or modify
7191 # it under the terms of the GNU General Public License as published by
7192 # the Free Software Foundation; either version 2 of the License, or
7193 # (at your option) any later version.
7194 #
7195 # This program is distributed in the hope that it will be useful, but
7196 # WITHOUT ANY WARRANTY; without even the implied warranty of
7197 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7198 # General Public License for more details.
7199 #
7200 # You should have received a copy of the GNU General Public License
7201 # along with this program; if not, write to the Free Software
7202 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7203 #
7204 # As a special exception to the GNU General Public License, if you
7205 # distribute this file as part of a program that contains a
7206 # configuration script generated by Autoconf, you may include it under
7207 # the same distribution terms that you use for the rest of that program.
7208
7209 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7210 Xsed="sed -e s/^X//"
7211
7212 # The HP-UX ksh and POSIX shell print the target directory to stdout
7213 # if CDPATH is set.
7214 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7215
7216 # ### BEGIN LIBTOOL CONFIG
7217
7218 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7219
7220 # Shell to use when invoking shell scripts.
7221 SHELL=$lt_SHELL
7222
7223 # Whether or not to build shared libraries.
7224 build_libtool_libs=$enable_shared
7225
7226 # Whether or not to build static libraries.
7227 build_old_libs=$enable_static
7228
7229 # Whether or not to add -lc for building shared libraries.
7230 build_libtool_need_lc=$need_lc
7231
7232 # Whether or not to optimize for fast installation.
7233 fast_install=$enable_fast_install
7234
7235 # The host system.
7236 host_alias=$host_alias
7237 host=$host
7238
7239 # An echo program that does not interpret backslashes.
7240 echo=$lt_echo
7241
7242 # The archiver.
7243 AR=$lt_AR
7244 AR_FLAGS=$lt_AR_FLAGS
7245
7246 # The default C compiler.
7247 CC=$lt_CC
7248
7249 # Is the compiler the GNU C compiler?
7250 with_gcc=$GCC
7251
7252 # The linker used to build libraries.
7253 LD=$lt_LD
7254
7255 # Whether we need hard or soft links.
7256 LN_S=$lt_LN_S
7257
7258 # A BSD-compatible nm program.
7259 NM=$lt_NM
7260
7261 # A symbol stripping program
7262 STRIP=$STRIP
7263
7264 # Used to examine libraries when file_magic_cmd begins "file"
7265 MAGIC_CMD=$MAGIC_CMD
7266
7267 # Used on cygwin: DLL creation program.
7268 DLLTOOL="$DLLTOOL"
7269
7270 # Used on cygwin: object dumper.
7271 OBJDUMP="$OBJDUMP"
7272
7273 # Used on cygwin: assembler.
7274 AS="$AS"
7275
7276 # The name of the directory that contains temporary libtool files.
7277 objdir=$objdir
7278
7279 # How to create reloadable object files.
7280 reload_flag=$lt_reload_flag
7281 reload_cmds=$lt_reload_cmds
7282
7283 # How to pass a linker flag through the compiler.
7284 wl=$lt_wl
7285
7286 # Object file suffix (normally "o").
7287 objext="$ac_objext"
7288
7289 # Old archive suffix (normally "a").
7290 libext="$libext"
7291
7292 # Executable file suffix (normally "").
7293 exeext="$exeext"
7294
7295 # Additional compiler flags for building library objects.
7296 pic_flag=$lt_pic_flag
7297 pic_mode=$pic_mode
7298
7299 # Does compiler simultaneously support -c and -o options?
7300 compiler_c_o=$lt_compiler_c_o
7301
7302 # Can we write directly to a .lo ?
7303 compiler_o_lo=$lt_compiler_o_lo
7304
7305 # Must we lock files when doing compilation ?
7306 need_locks=$lt_need_locks
7307
7308 # Do we need the lib prefix for modules?
7309 need_lib_prefix=$need_lib_prefix
7310
7311 # Do we need a version for libraries?
7312 need_version=$need_version
7313
7314 # Whether dlopen is supported.
7315 dlopen_support=$enable_dlopen
7316
7317 # Whether dlopen of programs is supported.
7318 dlopen_self=$enable_dlopen_self
7319
7320 # Whether dlopen of statically linked programs is supported.
7321 dlopen_self_static=$enable_dlopen_self_static
7322
7323 # Compiler flag to prevent dynamic linking.
7324 link_static_flag=$lt_link_static_flag
7325
7326 # Compiler flag to turn off builtin functions.
7327 no_builtin_flag=$lt_no_builtin_flag
7328
7329 # Compiler flag to allow reflexive dlopens.
7330 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7331
7332 # Compiler flag to generate shared objects directly from archives.
7333 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7334
7335 # Compiler flag to generate thread-safe objects.
7336 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7337
7338 # Library versioning type.
7339 version_type=$version_type
7340
7341 # Format of library name prefix.
7342 libname_spec=$lt_libname_spec
7343
7344 # List of archive names.  First name is the real one, the rest are links.
7345 # The last name is the one that the linker finds with -lNAME.
7346 library_names_spec=$lt_library_names_spec
7347
7348 # The coded name of the library, if different from the real name.
7349 soname_spec=$lt_soname_spec
7350
7351 # Commands used to build and install an old-style archive.
7352 RANLIB=$lt_RANLIB
7353 old_archive_cmds=$lt_old_archive_cmds
7354 old_postinstall_cmds=$lt_old_postinstall_cmds
7355 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7356
7357 # Create an old-style archive from a shared archive.
7358 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7359
7360 # Create a temporary old-style archive to link instead of a shared archive.
7361 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7362
7363 # Commands used to build and install a shared archive.
7364 archive_cmds=$lt_archive_cmds
7365 archive_expsym_cmds=$lt_archive_expsym_cmds
7366 postinstall_cmds=$lt_postinstall_cmds
7367 postuninstall_cmds=$lt_postuninstall_cmds
7368
7369 # Commands to strip libraries.
7370 old_striplib=$lt_old_striplib
7371 striplib=$lt_striplib
7372
7373 # Method to check whether dependent libraries are shared objects.
7374 deplibs_check_method=$lt_deplibs_check_method
7375
7376 # Command to use when deplibs_check_method == file_magic.
7377 file_magic_cmd=$lt_file_magic_cmd
7378
7379 # Flag that allows shared libraries with undefined symbols to be built.
7380 allow_undefined_flag=$lt_allow_undefined_flag
7381
7382 # Flag that forces no undefined symbols.
7383 no_undefined_flag=$lt_no_undefined_flag
7384
7385 # Commands used to finish a libtool library installation in a directory.
7386 finish_cmds=$lt_finish_cmds
7387
7388 # Same as above, but a single script fragment to be evaled but not shown.
7389 finish_eval=$lt_finish_eval
7390
7391 # Take the output of nm and produce a listing of raw symbols and C names.
7392 global_symbol_pipe=$lt_global_symbol_pipe
7393
7394 # Transform the output of nm in a proper C declaration
7395 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7396
7397 # Transform the output of nm in a C name address pair
7398 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7399
7400 # This is the shared library runtime path variable.
7401 runpath_var=$runpath_var
7402
7403 # This is the shared library path variable.
7404 shlibpath_var=$shlibpath_var
7405
7406 # Is shlibpath searched before the hard-coded library search path?
7407 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7408
7409 # How to hardcode a shared library path into an executable.
7410 hardcode_action=$hardcode_action
7411
7412 # Whether we should hardcode library paths into libraries.
7413 hardcode_into_libs=$hardcode_into_libs
7414
7415 # Flag to hardcode \$libdir into a binary during linking.
7416 # This must work even if \$libdir does not exist.
7417 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7418
7419 # Whether we need a single -rpath flag with a separated argument.
7420 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7421
7422 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7423 # resulting binary.
7424 hardcode_direct=$hardcode_direct
7425
7426 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7427 # resulting binary.
7428 hardcode_minus_L=$hardcode_minus_L
7429
7430 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7431 # the resulting binary.
7432 hardcode_shlibpath_var=$hardcode_shlibpath_var
7433
7434 # Variables whose values should be saved in libtool wrapper scripts and
7435 # restored at relink time.
7436 variables_saved_for_relink="$variables_saved_for_relink"
7437
7438 # Whether libtool must link a program against all its dependency libraries.
7439 link_all_deplibs=$link_all_deplibs
7440
7441 # Compile-time system search path for libraries
7442 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7443
7444 # Run-time system search path for libraries
7445 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7446
7447 # Fix the shell variable \$srcfile for the compiler.
7448 fix_srcfile_path="$fix_srcfile_path"
7449
7450 # Set to yes if exported symbols are required.
7451 always_export_symbols=$always_export_symbols
7452
7453 # The commands to list exported symbols.
7454 export_symbols_cmds=$lt_export_symbols_cmds
7455
7456 # The commands to extract the exported symbol list from a shared archive.
7457 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7458
7459 # Symbols that should not be listed in the preloaded symbols.
7460 exclude_expsyms=$lt_exclude_expsyms
7461
7462 # Symbols that must always be exported.
7463 include_expsyms=$lt_include_expsyms
7464
7465 # ### END LIBTOOL CONFIG
7466
7467 __EOF__
7468
7469   case $host_os in
7470   aix3*)
7471     cat <<\EOF >> "${ofile}T"
7472
7473 # AIX sometimes has problems with the GCC collect2 program.  For some
7474 # reason, if we set the COLLECT_NAMES environment variable, the problems
7475 # vanish in a puff of smoke.
7476 if test "X${COLLECT_NAMES+set}" != Xset; then
7477   COLLECT_NAMES=
7478   export COLLECT_NAMES
7479 fi
7480 EOF
7481     ;;
7482   esac
7483
7484   case $host_os in
7485   cygwin* | mingw* | pw32* | os2*)
7486     cat <<'EOF' >> "${ofile}T"
7487       # This is a source program that is used to create dlls on Windows
7488       # Don't remove nor modify the starting and closing comments
7489 # /* ltdll.c starts here */
7490 # #define WIN32_LEAN_AND_MEAN
7491 # #include <windows.h>
7492 # #undef WIN32_LEAN_AND_MEAN
7493 # #include <stdio.h>
7494 #
7495 # #ifndef __CYGWIN__
7496 # #  ifdef __CYGWIN32__
7497 # #    define __CYGWIN__ __CYGWIN32__
7498 # #  endif
7499 # #endif
7500 #
7501 # #ifdef __cplusplus
7502 # extern "C" {
7503 # #endif
7504 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7505 # #ifdef __cplusplus
7506 # }
7507 # #endif
7508 #
7509 # #ifdef __CYGWIN__
7510 # #include <cygwin/cygwin_dll.h>
7511 # DECLARE_CYGWIN_DLL( DllMain );
7512 # #endif
7513 # HINSTANCE __hDllInstance_base;
7514 #
7515 # BOOL APIENTRY
7516 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7517 # {
7518 #   __hDllInstance_base = hInst;
7519 #   return TRUE;
7520 # }
7521 # /* ltdll.c ends here */
7522         # This is a source program that is used to create import libraries
7523         # on Windows for dlls which lack them. Don't remove nor modify the
7524         # starting and closing comments
7525 # /* impgen.c starts here */
7526 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7527 #
7528 #  This file is part of GNU libtool.
7529 #
7530 #  This program is free software; you can redistribute it and/or modify
7531 #  it under the terms of the GNU General Public License as published by
7532 #  the Free Software Foundation; either version 2 of the License, or
7533 #  (at your option) any later version.
7534 #
7535 #  This program is distributed in the hope that it will be useful,
7536 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7537 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7538 #  GNU General Public License for more details.
7539 #
7540 #  You should have received a copy of the GNU General Public License
7541 #  along with this program; if not, write to the Free Software
7542 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7543 #  */
7544 #
7545 # #include <stdio.h>            /* for printf() */
7546 # #include <unistd.h>           /* for open(), lseek(), read() */
7547 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7548 # #include <string.h>           /* for strdup() */
7549 #
7550 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7551 # #ifndef O_BINARY
7552 # #define O_BINARY 0
7553 # #endif
7554 #
7555 # static unsigned int
7556 # pe_get16 (fd, offset)
7557 #      int fd;
7558 #      int offset;
7559 # {
7560 #   unsigned char b[2];
7561 #   lseek (fd, offset, SEEK_SET);
7562 #   read (fd, b, 2);
7563 #   return b[0] + (b[1]<<8);
7564 # }
7565 #
7566 # static unsigned int
7567 # pe_get32 (fd, offset)
7568 #     int fd;
7569 #     int offset;
7570 # {
7571 #   unsigned char b[4];
7572 #   lseek (fd, offset, SEEK_SET);
7573 #   read (fd, b, 4);
7574 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7575 # }
7576 #
7577 # static unsigned int
7578 # pe_as32 (ptr)
7579 #      void *ptr;
7580 # {
7581 #   unsigned char *b = ptr;
7582 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7583 # }
7584 #
7585 # int
7586 # main (argc, argv)
7587 #     int argc;
7588 #     char *argv[];
7589 # {
7590 #     int dll;
7591 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7592 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7593 #     unsigned long name_rvas, nexp;
7594 #     unsigned char *expdata, *erva;
7595 #     char *filename, *dll_name;
7596 #
7597 #     filename = argv[1];
7598 #
7599 #     dll = open(filename, O_RDONLY|O_BINARY);
7600 #     if (dll < 1)
7601 #       return 1;
7602 #
7603 #     dll_name = filename;
7604 #
7605 #     for (i=0; filename[i]; i++)
7606 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7607 #           dll_name = filename + i +1;
7608 #
7609 #     pe_header_offset = pe_get32 (dll, 0x3c);
7610 #     opthdr_ofs = pe_header_offset + 4 + 20;
7611 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7612 #
7613 #     if (num_entries < 1) /* no exports */
7614 #       return 1;
7615 #
7616 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7617 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7618 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7619 #     secptr = (pe_header_offset + 4 + 20 +
7620 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7621 #
7622 #     expptr = 0;
7623 #     for (i = 0; i < nsections; i++)
7624 #     {
7625 #       char sname[8];
7626 #       unsigned long secptr1 = secptr + 40 * i;
7627 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7628 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7629 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7630 #       lseek(dll, secptr1, SEEK_SET);
7631 #       read(dll, sname, 8);
7632 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7633 #       {
7634 #           expptr = fptr + (export_rva - vaddr);
7635 #           if (export_rva + export_size > vaddr + vsize)
7636 #               export_size = vsize - (export_rva - vaddr);
7637 #           break;
7638 #       }
7639 #     }
7640 #
7641 #     expdata = (unsigned char*)malloc(export_size);
7642 #     lseek (dll, expptr, SEEK_SET);
7643 #     read (dll, expdata, export_size);
7644 #     erva = expdata - export_rva;
7645 #
7646 #     nexp = pe_as32 (expdata+24);
7647 #     name_rvas = pe_as32 (expdata+32);
7648 #
7649 #     printf ("EXPORTS\n");
7650 #     for (i = 0; i<nexp; i++)
7651 #     {
7652 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7653 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7654 #     }
7655 #
7656 #     return 0;
7657 # }
7658 # /* impgen.c ends here */
7659
7660 EOF
7661     ;;
7662   esac
7663
7664   # We use sed instead of cat because bash on DJGPP gets confused if
7665   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7666   # text mode, it properly converts lines to CR/LF.  This bash problem
7667   # is reportedly fixed, but why not run on old versions too?
7668   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7669
7670   mv -f "${ofile}T" "$ofile" || \
7671     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7672   chmod +x "$ofile"
7673 fi
7674
7675
7676
7677
7678
7679 # This can be used to rebuild libtool when needed
7680 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7681
7682 # Always use our own libtool.
7683 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7684
7685 # Prevent multiple expansion
7686
7687
7688
7689 for ac_prog in mawk gawk nawk awk
7690 do
7691 # Extract the first word of "$ac_prog", so it can be a program name with args.
7692 set dummy $ac_prog; ac_word=$2
7693 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7694 echo "configure:7695: checking for $ac_word" >&5
7695 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7696   echo $ac_n "(cached) $ac_c" 1>&6
7697 else
7698   if test -n "$AWK"; then
7699   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7700 else
7701   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7702   ac_dummy="$PATH"
7703   for ac_dir in $ac_dummy; do
7704     test -z "$ac_dir" && ac_dir=.
7705     if test -f $ac_dir/$ac_word; then
7706       ac_cv_prog_AWK="$ac_prog"
7707       break
7708     fi
7709   done
7710   IFS="$ac_save_ifs"
7711 fi
7712 fi
7713 AWK="$ac_cv_prog_AWK"
7714 if test -n "$AWK"; then
7715   echo "$ac_t""$AWK" 1>&6
7716 else
7717   echo "$ac_t""no" 1>&6
7718 fi
7719
7720 test -n "$AWK" && break
7721 done
7722
7723 # test for ln hardlink support
7724 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7725 echo "configure:7726: checking whether ln works" >&5
7726 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7727   echo $ac_n "(cached) $ac_c" 1>&6
7728 else
7729   rm -f conftest.src conftest.dst
7730 echo "conftest" > conftest.src
7731 if ln conftest.src conftest.dst 2>/dev/null
7732 then
7733   ol_cv_prog_LN_H="ln"
7734 else
7735   ol_cv_prog_LN_H="cp"
7736 fi
7737 rm -f conftest.src conftest.dst
7738
7739 fi
7740 LN_H="$ol_cv_prog_LN_H"
7741 if test "$ol_cv_prog_LN_H" = "ln"; then
7742         echo "$ac_t""yes" 1>&6
7743 else
7744         echo "$ac_t""no" 1>&6
7745 fi
7746
7747 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7748 echo "configure:7749: checking whether ln -s works" >&5
7749 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7750   echo $ac_n "(cached) $ac_c" 1>&6
7751 else
7752   rm -f conftestdata
7753 if ln -s X conftestdata 2>/dev/null
7754 then
7755   rm -f conftestdata
7756   ac_cv_prog_LN_S="ln -s"
7757 else
7758   ac_cv_prog_LN_S=ln
7759 fi
7760 fi
7761 LN_S="$ac_cv_prog_LN_S"
7762 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7763   echo "$ac_t""yes" 1>&6
7764 else
7765   echo "$ac_t""no" 1>&6
7766 fi
7767
7768
7769 # Extract the first word of "sendmail", so it can be a program name with args.
7770 set dummy sendmail; ac_word=$2
7771 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7772 echo "configure:7773: checking for $ac_word" >&5
7773 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7774   echo $ac_n "(cached) $ac_c" 1>&6
7775 else
7776   case "$SENDMAIL" in
7777   /*)
7778   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7779   ;;
7780   ?:/*)
7781   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7782   ;;
7783   *)
7784   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7785   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7786   for ac_dir in $ac_dummy; do 
7787     test -z "$ac_dir" && ac_dir=.
7788     if test -f $ac_dir/$ac_word; then
7789       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7790       break
7791     fi
7792   done
7793   IFS="$ac_save_ifs"
7794   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7795   ;;
7796 esac
7797 fi
7798 SENDMAIL="$ac_cv_path_SENDMAIL"
7799 if test -n "$SENDMAIL"; then
7800   echo "$ac_t""$SENDMAIL" 1>&6
7801 else
7802   echo "$ac_t""no" 1>&6
7803 fi
7804
7805 # Extract the first word of "vi", so it can be a program name with args.
7806 set dummy vi; ac_word=$2
7807 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7808 echo "configure:7809: checking for $ac_word" >&5
7809 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7810   echo $ac_n "(cached) $ac_c" 1>&6
7811 else
7812   case "$EDITOR" in
7813   /*)
7814   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7815   ;;
7816   ?:/*)
7817   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7818   ;;
7819   *)
7820   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7821   ac_dummy="$PATH:/usr/ucb"
7822   for ac_dir in $ac_dummy; do 
7823     test -z "$ac_dir" && ac_dir=.
7824     if test -f $ac_dir/$ac_word; then
7825       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7826       break
7827     fi
7828   done
7829   IFS="$ac_save_ifs"
7830   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7831   ;;
7832 esac
7833 fi
7834 EDITOR="$ac_cv_path_EDITOR"
7835 if test -n "$EDITOR"; then
7836   echo "$ac_t""$EDITOR" 1>&6
7837 else
7838   echo "$ac_t""no" 1>&6
7839 fi
7840
7841
7842 ol_link_perl=no
7843 if test $ol_enable_perl != no ; then
7844         # Extract the first word of "perl", so it can be a program name with args.
7845 set dummy perl; ac_word=$2
7846 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7847 echo "configure:7848: checking for $ac_word" >&5
7848 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7849   echo $ac_n "(cached) $ac_c" 1>&6
7850 else
7851   case "$PERLBIN" in
7852   /*)
7853   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7854   ;;
7855   ?:/*)
7856   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7857   ;;
7858   *)
7859   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7860   ac_dummy="$PATH"
7861   for ac_dir in $ac_dummy; do 
7862     test -z "$ac_dir" && ac_dir=.
7863     if test -f $ac_dir/$ac_word; then
7864       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7865       break
7866     fi
7867   done
7868   IFS="$ac_save_ifs"
7869   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7870   ;;
7871 esac
7872 fi
7873 PERLBIN="$ac_cv_path_PERLBIN"
7874 if test -n "$PERLBIN"; then
7875   echo "$ac_t""$PERLBIN" 1>&6
7876 else
7877   echo "$ac_t""no" 1>&6
7878 fi
7879
7880
7881         if test "no$PERLBIN" = "no" ; then
7882                 if test $ol_enable_perl = yes ; then
7883                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7884                 fi
7885
7886         else
7887                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7888                 if test x"$ol_with_perl_module" = "xstatic" ; then
7889                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7890                 else
7891                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7892                 fi
7893                                 ol_link_perl=yes
7894         fi
7895 fi
7896
7897 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7898 echo "configure:7899: checking how to run the C preprocessor" >&5
7899 # On Suns, sometimes $CPP names a directory.
7900 if test -n "$CPP" && test -d "$CPP"; then
7901   CPP=
7902 fi
7903 if test -z "$CPP"; then
7904 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7905   echo $ac_n "(cached) $ac_c" 1>&6
7906 else
7907     # This must be in double quotes, not single quotes, because CPP may get
7908   # substituted into the Makefile and "${CC-cc}" will confuse make.
7909   CPP="${CC-cc} -E"
7910   # On the NeXT, cc -E runs the code through the compiler's parser,
7911   # not just through cpp.
7912   cat > conftest.$ac_ext <<EOF
7913 #line 7914 "configure"
7914 #include "confdefs.h"
7915 #include <assert.h>
7916 Syntax Error
7917 EOF
7918 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7919 { (eval echo configure:7920: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7920 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7921 if test -z "$ac_err"; then
7922   :
7923 else
7924   echo "$ac_err" >&5
7925   echo "configure: failed program was:" >&5
7926   cat conftest.$ac_ext >&5
7927   rm -rf conftest*
7928   CPP="${CC-cc} -E -traditional-cpp"
7929   cat > conftest.$ac_ext <<EOF
7930 #line 7931 "configure"
7931 #include "confdefs.h"
7932 #include <assert.h>
7933 Syntax Error
7934 EOF
7935 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7936 { (eval echo configure:7937: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7937 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7938 if test -z "$ac_err"; then
7939   :
7940 else
7941   echo "$ac_err" >&5
7942   echo "configure: failed program was:" >&5
7943   cat conftest.$ac_ext >&5
7944   rm -rf conftest*
7945   CPP="${CC-cc} -nologo -E"
7946   cat > conftest.$ac_ext <<EOF
7947 #line 7948 "configure"
7948 #include "confdefs.h"
7949 #include <assert.h>
7950 Syntax Error
7951 EOF
7952 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7953 { (eval echo configure:7954: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7954 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7955 if test -z "$ac_err"; then
7956   :
7957 else
7958   echo "$ac_err" >&5
7959   echo "configure: failed program was:" >&5
7960   cat conftest.$ac_ext >&5
7961   rm -rf conftest*
7962   CPP=/lib/cpp
7963 fi
7964 rm -f conftest*
7965 fi
7966 rm -f conftest*
7967 fi
7968 rm -f conftest*
7969   ac_cv_prog_CPP="$CPP"
7970 fi
7971   CPP="$ac_cv_prog_CPP"
7972 else
7973   ac_cv_prog_CPP="$CPP"
7974 fi
7975 echo "$ac_t""$CPP" 1>&6
7976
7977
7978 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
7979         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
7980
7981 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
7982         echo "configure: warning: programs compiled here do run here..." 1>&2
7983         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
7984
7985 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
7986         echo "configure: warning: programs compiled here do not run here..." 1>&2
7987         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
7988 fi
7989
7990
7991 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
7992 echo "configure:7993: checking for Cygwin environment" >&5
7993 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
7994   echo $ac_n "(cached) $ac_c" 1>&6
7995 else
7996   cat > conftest.$ac_ext <<EOF
7997 #line 7998 "configure"
7998 #include "confdefs.h"
7999
8000 int main() {
8001
8002 #ifndef __CYGWIN__
8003 #define __CYGWIN__ __CYGWIN32__
8004 #endif
8005 return __CYGWIN__;
8006 ; return 0; }
8007 EOF
8008 if { (eval echo configure:8009: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8009   rm -rf conftest*
8010   ac_cv_cygwin=yes
8011 else
8012   echo "configure: failed program was:" >&5
8013   cat conftest.$ac_ext >&5
8014   rm -rf conftest*
8015   ac_cv_cygwin=no
8016 fi
8017 rm -f conftest*
8018 fi
8019
8020 echo "$ac_t""$ac_cv_cygwin" 1>&6
8021 CYGWIN=
8022 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8023 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8024 echo "configure:8025: checking for mingw32 environment" >&5
8025 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8026   echo $ac_n "(cached) $ac_c" 1>&6
8027 else
8028   cat > conftest.$ac_ext <<EOF
8029 #line 8030 "configure"
8030 #include "confdefs.h"
8031
8032 int main() {
8033 return __MINGW32__;
8034 ; return 0; }
8035 EOF
8036 if { (eval echo configure:8037: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8037   rm -rf conftest*
8038   ac_cv_mingw32=yes
8039 else
8040   echo "configure: failed program was:" >&5
8041   cat conftest.$ac_ext >&5
8042   rm -rf conftest*
8043   ac_cv_mingw32=no
8044 fi
8045 rm -f conftest*
8046 fi
8047
8048 echo "$ac_t""$ac_cv_mingw32" 1>&6
8049 MINGW32=
8050 test "$ac_cv_mingw32" = yes && MINGW32=yes
8051
8052
8053
8054 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8055 echo "configure:8056: checking for executable suffix" >&5
8056 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8057   echo $ac_n "(cached) $ac_c" 1>&6
8058 else
8059   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8060   ac_cv_exeext=.exe
8061 else
8062   rm -f conftest*
8063   echo 'int main () { return 0; }' > conftest.$ac_ext
8064   ac_cv_exeext=
8065   if { (eval echo configure:8066: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8066     for file in conftest.*; do
8067       case $file in
8068       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8069       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8070       esac
8071     done
8072   else
8073     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8074   fi
8075   rm -f conftest*
8076   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8077 fi
8078 fi
8079
8080 EXEEXT=""
8081 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8082 echo "$ac_t""${ac_cv_exeext}" 1>&6
8083 ac_exeext=$EXEEXT
8084
8085 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8086 echo "configure:8087: checking for object suffix" >&5
8087 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8088   echo $ac_n "(cached) $ac_c" 1>&6
8089 else
8090   rm -f conftest*
8091 echo 'int i = 1;' > conftest.$ac_ext
8092 if { (eval echo configure:8093: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8093   for ac_file in conftest.*; do
8094     case $ac_file in
8095     *.c) ;;
8096     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8097     esac
8098   done
8099 else
8100   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8101 fi
8102 rm -f conftest*
8103 fi
8104
8105 echo "$ac_t""$ac_cv_objext" 1>&6
8106 OBJEXT=$ac_cv_objext
8107 ac_objext=$ac_cv_objext
8108
8109
8110 cat >> confdefs.h <<EOF
8111 #define EXEEXT "${EXEEXT}"
8112 EOF
8113
8114
8115 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8116 echo "configure:8117: checking for be_app in -lbe" >&5
8117 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8118 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8119   echo $ac_n "(cached) $ac_c" 1>&6
8120 else
8121   ac_save_LIBS="$LIBS"
8122 LIBS="-lbe -lroot -lnet $LIBS"
8123 cat > conftest.$ac_ext <<EOF
8124 #line 8125 "configure"
8125 #include "confdefs.h"
8126 /* Override any gcc2 internal prototype to avoid an error.  */
8127 /* We use char because int might match the return type of a gcc2
8128     builtin and then its argument prototype would still apply.  */
8129 char be_app();
8130
8131 int main() {
8132 be_app()
8133 ; return 0; }
8134 EOF
8135 if { (eval echo configure:8136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8136   rm -rf conftest*
8137   eval "ac_cv_lib_$ac_lib_var=yes"
8138 else
8139   echo "configure: failed program was:" >&5
8140   cat conftest.$ac_ext >&5
8141   rm -rf conftest*
8142   eval "ac_cv_lib_$ac_lib_var=no"
8143 fi
8144 rm -f conftest*
8145 LIBS="$ac_save_LIBS"
8146
8147 fi
8148 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8149   echo "$ac_t""yes" 1>&6
8150   LIBS="$LIBS -lbe -lroot -lnet"
8151 else
8152   echo "$ac_t""no" 1>&6
8153 :
8154 fi
8155
8156
8157
8158
8159
8160 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8161 echo "configure:8162: checking for ${CC-cc} option to accept ANSI C" >&5
8162 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8163   echo $ac_n "(cached) $ac_c" 1>&6
8164 else
8165   am_cv_prog_cc_stdc=no
8166 ac_save_CC="$CC"
8167 # Don't try gcc -ansi; that turns off useful extensions and
8168 # breaks some systems' header files.
8169 # AIX                   -qlanglvl=ansi
8170 # Ultrix and OSF/1      -std1
8171 # HP-UX 10.20 and later -Ae
8172 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8173 # SVR4                  -Xc -D__EXTENSIONS__
8174 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8175 do
8176   CC="$ac_save_CC $ac_arg"
8177   cat > conftest.$ac_ext <<EOF
8178 #line 8179 "configure"
8179 #include "confdefs.h"
8180 #include <stdarg.h>
8181 #include <stdio.h>
8182 #include <sys/types.h>
8183 #include <sys/stat.h>
8184 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8185 struct buf { int x; };
8186 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8187 static char *e (p, i)
8188      char **p;
8189      int i;
8190 {
8191   return p[i];
8192 }
8193 static char *f (char * (*g) (char **, int), char **p, ...)
8194 {
8195   char *s;
8196   va_list v;
8197   va_start (v,p);
8198   s = g (p, va_arg (v,int));
8199   va_end (v);
8200   return s;
8201 }
8202 int test (int i, double x);
8203 struct s1 {int (*f) (int a);};
8204 struct s2 {int (*f) (double a);};
8205 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8206 int argc;
8207 char **argv;
8208
8209 int main() {
8210
8211 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8212
8213 ; return 0; }
8214 EOF
8215 if { (eval echo configure:8216: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8216   rm -rf conftest*
8217   am_cv_prog_cc_stdc="$ac_arg"; break
8218 else
8219   echo "configure: failed program was:" >&5
8220   cat conftest.$ac_ext >&5
8221 fi
8222 rm -f conftest*
8223 done
8224 CC="$ac_save_CC"
8225
8226 fi
8227
8228 if test -z "$am_cv_prog_cc_stdc"; then
8229   echo "$ac_t""none needed" 1>&6
8230 else
8231   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8232 fi
8233 case "x$am_cv_prog_cc_stdc" in
8234   x|xno) ;;
8235   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8236 esac
8237
8238 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8239         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8240 fi
8241
8242 # test for make depend flag
8243 OL_MKDEP=
8244 OL_MKDEP_FLAGS=
8245 if test -z "${MKDEP}"; then
8246         OL_MKDEP="${CC-cc}"
8247         if test -z "${MKDEP_FLAGS}"; then
8248                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8249 echo "configure:8250: checking for ${OL_MKDEP} depend flag" >&5
8250 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8251   echo $ac_n "(cached) $ac_c" 1>&6
8252 else
8253   
8254                         ol_cv_mkdep=no
8255                         for flag in "-M" "-xM"; do
8256                                 cat > conftest.c <<EOF
8257  noCode;
8258 EOF
8259                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8260: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8260                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8261                                 then
8262                                         if test ! -f conftest."${ac_object}" ; then
8263                                                 ol_cv_mkdep=$flag
8264                                                 OL_MKDEP_FLAGS="$flag"
8265                                                 break
8266                                         fi
8267                                 fi
8268                         done
8269                         rm -f conftest*
8270                 
8271 fi
8272
8273 echo "$ac_t""$ol_cv_mkdep" 1>&6
8274         else
8275                 cc_cv_mkdep=yes
8276                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8277         fi
8278 else
8279         cc_cv_mkdep=yes
8280         OL_MKDEP="${MKDEP}"
8281         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8282 fi
8283
8284
8285
8286 if test "${ol_cv_mkdep}" = no ; then
8287         # this will soon become an error
8288         echo "configure: warning: do not know how to generate dependencies" 1>&2
8289 fi
8290
8291 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8292 echo "configure:8293: checking for afopen in -ls" >&5
8293 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8294 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8295   echo $ac_n "(cached) $ac_c" 1>&6
8296 else
8297   ac_save_LIBS="$LIBS"
8298 LIBS="-ls  $LIBS"
8299 cat > conftest.$ac_ext <<EOF
8300 #line 8301 "configure"
8301 #include "confdefs.h"
8302 /* Override any gcc2 internal prototype to avoid an error.  */
8303 /* We use char because int might match the return type of a gcc2
8304     builtin and then its argument prototype would still apply.  */
8305 char afopen();
8306
8307 int main() {
8308 afopen()
8309 ; return 0; }
8310 EOF
8311 if { (eval echo configure:8312: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8312   rm -rf conftest*
8313   eval "ac_cv_lib_$ac_lib_var=yes"
8314 else
8315   echo "configure: failed program was:" >&5
8316   cat conftest.$ac_ext >&5
8317   rm -rf conftest*
8318   eval "ac_cv_lib_$ac_lib_var=no"
8319 fi
8320 rm -f conftest*
8321 LIBS="$ac_save_LIBS"
8322
8323 fi
8324 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8325   echo "$ac_t""yes" 1>&6
8326   
8327         AUTH_LIBS=-ls
8328         cat >> confdefs.h <<\EOF
8329 #define HAVE_AIX_SECURITY 1
8330 EOF
8331
8332
8333 else
8334   echo "$ac_t""no" 1>&6
8335 fi
8336
8337
8338
8339 ol_link_modules=no
8340 if test $ol_enable_modules != no ; then
8341         for ac_hdr in ltdl.h
8342 do
8343 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8344 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8345 echo "configure:8346: checking for $ac_hdr" >&5
8346 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8347   echo $ac_n "(cached) $ac_c" 1>&6
8348 else
8349   cat > conftest.$ac_ext <<EOF
8350 #line 8351 "configure"
8351 #include "confdefs.h"
8352 #include <$ac_hdr>
8353 EOF
8354 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8355 { (eval echo configure:8356: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8356 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8357 if test -z "$ac_err"; then
8358   rm -rf conftest*
8359   eval "ac_cv_header_$ac_safe=yes"
8360 else
8361   echo "$ac_err" >&5
8362   echo "configure: failed program was:" >&5
8363   cat conftest.$ac_ext >&5
8364   rm -rf conftest*
8365   eval "ac_cv_header_$ac_safe=no"
8366 fi
8367 rm -f conftest*
8368 fi
8369 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8370   echo "$ac_t""yes" 1>&6
8371     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8372   cat >> confdefs.h <<EOF
8373 #define $ac_tr_hdr 1
8374 EOF
8375  
8376 else
8377   echo "$ac_t""no" 1>&6
8378 fi
8379 done
8380
8381
8382         if test $ac_cv_header_ltdl_h = no ; then
8383                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8384         fi
8385
8386         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8387 echo "configure:8388: checking for lt_dlinit in -lltdl" >&5
8388 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8389 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8390   echo $ac_n "(cached) $ac_c" 1>&6
8391 else
8392   ac_save_LIBS="$LIBS"
8393 LIBS="-lltdl  $LIBS"
8394 cat > conftest.$ac_ext <<EOF
8395 #line 8396 "configure"
8396 #include "confdefs.h"
8397 /* Override any gcc2 internal prototype to avoid an error.  */
8398 /* We use char because int might match the return type of a gcc2
8399     builtin and then its argument prototype would still apply.  */
8400 char lt_dlinit();
8401
8402 int main() {
8403 lt_dlinit()
8404 ; return 0; }
8405 EOF
8406 if { (eval echo configure:8407: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8407   rm -rf conftest*
8408   eval "ac_cv_lib_$ac_lib_var=yes"
8409 else
8410   echo "configure: failed program was:" >&5
8411   cat conftest.$ac_ext >&5
8412   rm -rf conftest*
8413   eval "ac_cv_lib_$ac_lib_var=no"
8414 fi
8415 rm -f conftest*
8416 LIBS="$ac_save_LIBS"
8417
8418 fi
8419 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8420   echo "$ac_t""yes" 1>&6
8421   
8422                 MODULES_LIBS=-lltdl
8423                 cat >> confdefs.h <<\EOF
8424 #define HAVE_LIBLTDL 1
8425 EOF
8426
8427         
8428 else
8429   echo "$ac_t""no" 1>&6
8430 fi
8431
8432
8433         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8434                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8435         fi
8436         ol_link_modules=yes
8437 else
8438         ol_with_bdb_module=static
8439         ol_with_dnssrv_module=static
8440         ol_with_ldap_module=static
8441         ol_with_ldbm_module=static
8442         ol_with_meta_module=static
8443         ol_with_monitor_module=static
8444         ol_with_null_module=static
8445         ol_with_passwd_module=static
8446         ol_with_perl_module=static
8447         ol_with_shell_module=static
8448         ol_with_tcl_module=static
8449         ol_with_sql_module=static
8450 fi
8451
8452 # test for EBCDIC
8453 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8454 echo "configure:8455: checking for EBCDIC" >&5
8455 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8456   echo $ac_n "(cached) $ac_c" 1>&6
8457 else
8458   
8459         cat > conftest.$ac_ext <<EOF
8460 #line 8461 "configure"
8461 #include "confdefs.h"
8462
8463 #if !('M' == 0xd4)
8464 #include <__ASCII__/generate_error.h>
8465 #endif
8466
8467 EOF
8468 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8469 { (eval echo configure:8470: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8470 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8471 if test -z "$ac_err"; then
8472   rm -rf conftest*
8473   ol_cv_cpp_ebcdic=yes
8474 else
8475   echo "$ac_err" >&5
8476   echo "configure: failed program was:" >&5
8477   cat conftest.$ac_ext >&5
8478   rm -rf conftest*
8479   ol_cv_cpp_ebcdic=no
8480 fi
8481 rm -f conftest*
8482 fi
8483
8484 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8485 if test $ol_cv_cpp_ebcdic = yes ; then
8486         cat >> confdefs.h <<\EOF
8487 #define HAVE_EBCDIC 1
8488 EOF
8489
8490 fi
8491
8492 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8493 echo "configure:8494: checking for ANSI C header files" >&5
8494 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8495   echo $ac_n "(cached) $ac_c" 1>&6
8496 else
8497   cat > conftest.$ac_ext <<EOF
8498 #line 8499 "configure"
8499 #include "confdefs.h"
8500 #include <stdlib.h>
8501 #include <stdarg.h>
8502 #include <string.h>
8503 #include <float.h>
8504 EOF
8505 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8506 { (eval echo configure:8507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8507 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8508 if test -z "$ac_err"; then
8509   rm -rf conftest*
8510   ol_cv_header_stdc=yes
8511 else
8512   echo "$ac_err" >&5
8513   echo "configure: failed program was:" >&5
8514   cat conftest.$ac_ext >&5
8515   rm -rf conftest*
8516   ol_cv_header_stdc=no
8517 fi
8518 rm -f conftest*
8519
8520 if test $ol_cv_header_stdc = yes; then
8521   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8522 cat > conftest.$ac_ext <<EOF
8523 #line 8524 "configure"
8524 #include "confdefs.h"
8525 #include <string.h>
8526 EOF
8527 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8528   egrep "memchr" >/dev/null 2>&1; then
8529   :
8530 else
8531   rm -rf conftest*
8532   ol_cv_header_stdc=no
8533 fi
8534 rm -f conftest*
8535
8536 fi
8537
8538 if test $ol_cv_header_stdc = yes; then
8539   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8540 cat > conftest.$ac_ext <<EOF
8541 #line 8542 "configure"
8542 #include "confdefs.h"
8543 #include <stdlib.h>
8544 EOF
8545 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8546   egrep "free" >/dev/null 2>&1; then
8547   :
8548 else
8549   rm -rf conftest*
8550   ol_cv_header_stdc=no
8551 fi
8552 rm -f conftest*
8553
8554 fi
8555
8556 if test $ol_cv_header_stdc = yes; then
8557   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8558 if test "$cross_compiling" = yes; then
8559   :
8560 else
8561   cat > conftest.$ac_ext <<EOF
8562 #line 8563 "configure"
8563 #include "confdefs.h"
8564 #include <ctype.h>
8565 #ifndef HAVE_EBCDIC
8566 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8567 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8568 #else
8569 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8570                 || ('j' <= (c) && (c) <= 'r') \
8571                 || ('s' <= (c) && (c) <= 'z'))
8572 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8573 #endif
8574 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8575 int main () { int i; for (i = 0; i < 256; i++)
8576 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8577 exit (0); }
8578
8579 EOF
8580 if { (eval echo configure:8581: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8581 then
8582   :
8583 else
8584   echo "configure: failed program was:" >&5
8585   cat conftest.$ac_ext >&5
8586   rm -fr conftest*
8587   ol_cv_header_stdc=no
8588 fi
8589 rm -fr conftest*
8590 fi
8591
8592 fi
8593 fi
8594
8595 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8596 if test $ol_cv_header_stdc = yes; then
8597   cat >> confdefs.h <<\EOF
8598 #define STDC_HEADERS 1
8599 EOF
8600
8601 fi
8602 ac_cv_header_stdc=disable
8603
8604
8605 if test $ol_cv_header_stdc != yes; then
8606         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8607 fi
8608
8609 ac_header_dirent=no
8610 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8611 do
8612 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8613 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8614 echo "configure:8615: checking for $ac_hdr that defines DIR" >&5
8615 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8616   echo $ac_n "(cached) $ac_c" 1>&6
8617 else
8618   cat > conftest.$ac_ext <<EOF
8619 #line 8620 "configure"
8620 #include "confdefs.h"
8621 #include <sys/types.h>
8622 #include <$ac_hdr>
8623 int main() {
8624 DIR *dirp = 0;
8625 ; return 0; }
8626 EOF
8627 if { (eval echo configure:8628: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8628   rm -rf conftest*
8629   eval "ac_cv_header_dirent_$ac_safe=yes"
8630 else
8631   echo "configure: failed program was:" >&5
8632   cat conftest.$ac_ext >&5
8633   rm -rf conftest*
8634   eval "ac_cv_header_dirent_$ac_safe=no"
8635 fi
8636 rm -f conftest*
8637 fi
8638 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8639   echo "$ac_t""yes" 1>&6
8640     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8641   cat >> confdefs.h <<EOF
8642 #define $ac_tr_hdr 1
8643 EOF
8644  ac_header_dirent=$ac_hdr; break
8645 else
8646   echo "$ac_t""no" 1>&6
8647 fi
8648 done
8649 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8650 if test $ac_header_dirent = dirent.h; then
8651 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8652 echo "configure:8653: checking for opendir in -ldir" >&5
8653 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8654 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8655   echo $ac_n "(cached) $ac_c" 1>&6
8656 else
8657   ac_save_LIBS="$LIBS"
8658 LIBS="-ldir  $LIBS"
8659 cat > conftest.$ac_ext <<EOF
8660 #line 8661 "configure"
8661 #include "confdefs.h"
8662 /* Override any gcc2 internal prototype to avoid an error.  */
8663 /* We use char because int might match the return type of a gcc2
8664     builtin and then its argument prototype would still apply.  */
8665 char opendir();
8666
8667 int main() {
8668 opendir()
8669 ; return 0; }
8670 EOF
8671 if { (eval echo configure:8672: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8672   rm -rf conftest*
8673   eval "ac_cv_lib_$ac_lib_var=yes"
8674 else
8675   echo "configure: failed program was:" >&5
8676   cat conftest.$ac_ext >&5
8677   rm -rf conftest*
8678   eval "ac_cv_lib_$ac_lib_var=no"
8679 fi
8680 rm -f conftest*
8681 LIBS="$ac_save_LIBS"
8682
8683 fi
8684 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8685   echo "$ac_t""yes" 1>&6
8686   LIBS="$LIBS -ldir"
8687 else
8688   echo "$ac_t""no" 1>&6
8689 fi
8690
8691 else
8692 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8693 echo "configure:8694: checking for opendir in -lx" >&5
8694 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8695 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8696   echo $ac_n "(cached) $ac_c" 1>&6
8697 else
8698   ac_save_LIBS="$LIBS"
8699 LIBS="-lx  $LIBS"
8700 cat > conftest.$ac_ext <<EOF
8701 #line 8702 "configure"
8702 #include "confdefs.h"
8703 /* Override any gcc2 internal prototype to avoid an error.  */
8704 /* We use char because int might match the return type of a gcc2
8705     builtin and then its argument prototype would still apply.  */
8706 char opendir();
8707
8708 int main() {
8709 opendir()
8710 ; return 0; }
8711 EOF
8712 if { (eval echo configure:8713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8713   rm -rf conftest*
8714   eval "ac_cv_lib_$ac_lib_var=yes"
8715 else
8716   echo "configure: failed program was:" >&5
8717   cat conftest.$ac_ext >&5
8718   rm -rf conftest*
8719   eval "ac_cv_lib_$ac_lib_var=no"
8720 fi
8721 rm -f conftest*
8722 LIBS="$ac_save_LIBS"
8723
8724 fi
8725 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8726   echo "$ac_t""yes" 1>&6
8727   LIBS="$LIBS -lx"
8728 else
8729   echo "$ac_t""no" 1>&6
8730 fi
8731
8732 fi
8733
8734 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8735 echo "configure:8736: checking for sys/wait.h that is POSIX.1 compatible" >&5
8736 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8737   echo $ac_n "(cached) $ac_c" 1>&6
8738 else
8739   cat > conftest.$ac_ext <<EOF
8740 #line 8741 "configure"
8741 #include "confdefs.h"
8742 #include <sys/types.h>
8743 #include <sys/wait.h>
8744 #ifndef WEXITSTATUS
8745 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8746 #endif
8747 #ifndef WIFEXITED
8748 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8749 #endif
8750 int main() {
8751 int s;
8752 wait (&s);
8753 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8754 ; return 0; }
8755 EOF
8756 if { (eval echo configure:8757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8757   rm -rf conftest*
8758   ac_cv_header_sys_wait_h=yes
8759 else
8760   echo "configure: failed program was:" >&5
8761   cat conftest.$ac_ext >&5
8762   rm -rf conftest*
8763   ac_cv_header_sys_wait_h=no
8764 fi
8765 rm -f conftest*
8766 fi
8767
8768 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8769 if test $ac_cv_header_sys_wait_h = yes; then
8770   cat >> confdefs.h <<\EOF
8771 #define HAVE_SYS_WAIT_H 1
8772 EOF
8773
8774 fi
8775
8776 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8777 echo "configure:8778: checking POSIX termios" >&5
8778 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8779   echo $ac_n "(cached) $ac_c" 1>&6
8780 else
8781   cat > conftest.$ac_ext <<EOF
8782 #line 8783 "configure"
8783 #include "confdefs.h"
8784 #include <sys/types.h>
8785 #include <unistd.h>
8786 #include <termios.h>
8787 int main() {
8788 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8789    tcgetattr(0, 0);
8790 ; return 0; }
8791 EOF
8792 if { (eval echo configure:8793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8793   rm -rf conftest*
8794   am_cv_sys_posix_termios=yes
8795 else
8796   echo "configure: failed program was:" >&5
8797   cat conftest.$ac_ext >&5
8798   rm -rf conftest*
8799   am_cv_sys_posix_termios=no
8800 fi
8801 rm -f conftest*
8802 fi
8803
8804 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8805
8806
8807  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8808 echo "configure:8809: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8809 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8810   echo $ac_n "(cached) $ac_c" 1>&6
8811 else
8812   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8813
8814   gwinsz_in_termios_h=no
8815   if test $am_cv_sys_posix_termios = yes; then
8816     cat > conftest.$ac_ext <<EOF
8817 #line 8818 "configure"
8818 #include "confdefs.h"
8819 #include <sys/types.h>
8820 #     include <termios.h>
8821 #     ifdef TIOCGWINSZ
8822         yes
8823 #     endif
8824     
8825 EOF
8826 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8827   egrep "yes" >/dev/null 2>&1; then
8828   rm -rf conftest*
8829   gwinsz_in_termios_h=yes
8830 fi
8831 rm -f conftest*
8832
8833   fi
8834
8835   if test $gwinsz_in_termios_h = no; then
8836     cat > conftest.$ac_ext <<EOF
8837 #line 8838 "configure"
8838 #include "confdefs.h"
8839 #include <sys/types.h>
8840 #     include <sys/ioctl.h>
8841 #     ifdef TIOCGWINSZ
8842         yes
8843 #     endif
8844     
8845 EOF
8846 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8847   egrep "yes" >/dev/null 2>&1; then
8848   rm -rf conftest*
8849   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8850 fi
8851 rm -f conftest*
8852
8853   fi
8854   
8855 fi
8856
8857 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8858   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8859     cat >> confdefs.h <<\EOF
8860 #define GWINSZ_IN_SYS_IOCTL 1
8861 EOF
8862
8863   fi
8864
8865 if test $am_cv_sys_posix_termios = yes ; then
8866         cat >> confdefs.h <<\EOF
8867 #define HAVE_POSIX_TERMIOS 1
8868 EOF
8869
8870 fi
8871
8872 for ac_hdr in \
8873         arpa/inet.h             \
8874         arpa/nameser.h  \
8875         assert.h                \
8876         conio.h                 \
8877         crypt.h                 \
8878         direct.h                \
8879         errno.h                 \
8880         fcntl.h                 \
8881         filio.h                 \
8882         getopt.h                \
8883         grp.h                   \
8884         io.h                    \
8885         libutil.h               \
8886         limits.h                \
8887         locale.h                \
8888         netinet/tcp.h   \
8889         malloc.h                \
8890         memory.h                \
8891         psap.h                  \
8892         pwd.h                   \
8893         process.h               \
8894         resolv.h                \
8895         sgtty.h                 \
8896         shadow.h                \
8897         stddef.h                \
8898         string.h                \
8899         strings.h               \
8900         sysexits.h              \
8901         sys/file.h              \
8902         sys/filio.h             \
8903         sys/errno.h             \
8904         sys/ioctl.h             \
8905         sys/param.h             \
8906         sys/resource.h  \
8907         sys/select.h    \
8908         sys/socket.h    \
8909         sys/syslog.h    \
8910         sys/time.h              \
8911         sys/types.h             \
8912         syslog.h                \
8913         termios.h               \
8914         unistd.h                \
8915         winsock.h               \
8916         winsock2.h              \
8917
8918 do
8919 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8920 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8921 echo "configure:8922: checking for $ac_hdr" >&5
8922 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8923   echo $ac_n "(cached) $ac_c" 1>&6
8924 else
8925   cat > conftest.$ac_ext <<EOF
8926 #line 8927 "configure"
8927 #include "confdefs.h"
8928 #include <$ac_hdr>
8929 EOF
8930 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8931 { (eval echo configure:8932: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8932 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8933 if test -z "$ac_err"; then
8934   rm -rf conftest*
8935   eval "ac_cv_header_$ac_safe=yes"
8936 else
8937   echo "$ac_err" >&5
8938   echo "configure: failed program was:" >&5
8939   cat conftest.$ac_ext >&5
8940   rm -rf conftest*
8941   eval "ac_cv_header_$ac_safe=no"
8942 fi
8943 rm -f conftest*
8944 fi
8945 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8946   echo "$ac_t""yes" 1>&6
8947     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8948   cat >> confdefs.h <<EOF
8949 #define $ac_tr_hdr 1
8950 EOF
8951  
8952 else
8953   echo "$ac_t""no" 1>&6
8954 fi
8955 done
8956
8957
8958
8959
8960 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8961 echo "configure:8962: checking for dlopen" >&5
8962 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8963   echo $ac_n "(cached) $ac_c" 1>&6
8964 else
8965   cat > conftest.$ac_ext <<EOF
8966 #line 8967 "configure"
8967 #include "confdefs.h"
8968 /* System header to define __stub macros and hopefully few prototypes,
8969     which can conflict with char dlopen(); below.  */
8970 #include <assert.h>
8971 /* Override any gcc2 internal prototype to avoid an error.  */
8972 /* We use char because int might match the return type of a gcc2
8973     builtin and then its argument prototype would still apply.  */
8974 char dlopen();
8975 char (*f)();
8976
8977 int main() {
8978
8979 /* The GNU C library defines this for functions which it implements
8980     to always fail with ENOSYS.  Some functions are actually named
8981     something starting with __ and the normal name is an alias.  */
8982 #if defined (__stub_dlopen) || defined (__stub___dlopen)
8983 choke me
8984 #else
8985 f = dlopen;
8986 #endif
8987
8988 ; return 0; }
8989 EOF
8990 if { (eval echo configure:8991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8991   rm -rf conftest*
8992   eval "ac_cv_func_dlopen=yes"
8993 else
8994   echo "configure: failed program was:" >&5
8995   cat conftest.$ac_ext >&5
8996   rm -rf conftest*
8997   eval "ac_cv_func_dlopen=no"
8998 fi
8999 rm -f conftest*
9000 fi
9001
9002 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
9003   echo "$ac_t""yes" 1>&6
9004   :
9005 else
9006   echo "$ac_t""no" 1>&6
9007 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9008 echo "configure:9009: checking for dlopen in -ldl" >&5
9009 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9010 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9011   echo $ac_n "(cached) $ac_c" 1>&6
9012 else
9013   ac_save_LIBS="$LIBS"
9014 LIBS="-ldl  $LIBS"
9015 cat > conftest.$ac_ext <<EOF
9016 #line 9017 "configure"
9017 #include "confdefs.h"
9018 /* Override any gcc2 internal prototype to avoid an error.  */
9019 /* We use char because int might match the return type of a gcc2
9020     builtin and then its argument prototype would still apply.  */
9021 char dlopen();
9022
9023 int main() {
9024 dlopen()
9025 ; return 0; }
9026 EOF
9027 if { (eval echo configure:9028: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9028   rm -rf conftest*
9029   eval "ac_cv_lib_$ac_lib_var=yes"
9030 else
9031   echo "configure: failed program was:" >&5
9032   cat conftest.$ac_ext >&5
9033   rm -rf conftest*
9034   eval "ac_cv_lib_$ac_lib_var=no"
9035 fi
9036 rm -f conftest*
9037 LIBS="$ac_save_LIBS"
9038
9039 fi
9040 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9041   echo "$ac_t""yes" 1>&6
9042     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9043     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9044   cat >> confdefs.h <<EOF
9045 #define $ac_tr_lib 1
9046 EOF
9047
9048   LIBS="-ldl $LIBS"
9049
9050 else
9051   echo "$ac_t""no" 1>&6
9052 fi
9053
9054 fi
9055
9056
9057 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9058 echo "configure:9059: checking for sigset in -lV3" >&5
9059 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9060 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9061   echo $ac_n "(cached) $ac_c" 1>&6
9062 else
9063   ac_save_LIBS="$LIBS"
9064 LIBS="-lV3  $LIBS"
9065 cat > conftest.$ac_ext <<EOF
9066 #line 9067 "configure"
9067 #include "confdefs.h"
9068 /* Override any gcc2 internal prototype to avoid an error.  */
9069 /* We use char because int might match the return type of a gcc2
9070     builtin and then its argument prototype would still apply.  */
9071 char sigset();
9072
9073 int main() {
9074 sigset()
9075 ; return 0; }
9076 EOF
9077 if { (eval echo configure:9078: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9078   rm -rf conftest*
9079   eval "ac_cv_lib_$ac_lib_var=yes"
9080 else
9081   echo "configure: failed program was:" >&5
9082   cat conftest.$ac_ext >&5
9083   rm -rf conftest*
9084   eval "ac_cv_lib_$ac_lib_var=no"
9085 fi
9086 rm -f conftest*
9087 LIBS="$ac_save_LIBS"
9088
9089 fi
9090 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9091   echo "$ac_t""yes" 1>&6
9092     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9093     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9094   cat >> confdefs.h <<EOF
9095 #define $ac_tr_lib 1
9096 EOF
9097
9098   LIBS="-lV3 $LIBS"
9099
9100 else
9101   echo "$ac_t""no" 1>&6
9102 fi
9103
9104
9105 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9106 echo "configure:9107: checking for winsock" >&5
9107 save_LIBS="$LIBS"
9108 for curlib in ws2_32 wsock32; do
9109         LIBS="$LIBS -l$curlib"
9110         cat > conftest.$ac_ext <<EOF
9111 #line 9112 "configure"
9112 #include "confdefs.h"
9113
9114                         char socket@12();
9115                         char select@20();
9116                         char closesocket@4();
9117                         char gethostname@8();
9118                         
9119 int main() {
9120
9121                         socket@12();
9122                         select@20();
9123                         closesocket@4();
9124                         gethostname@8();
9125                         
9126 ; return 0; }
9127 EOF
9128 if { (eval echo configure:9129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9129   rm -rf conftest*
9130   have_winsock=yes
9131 else
9132   echo "configure: failed program was:" >&5
9133   cat conftest.$ac_ext >&5
9134   rm -rf conftest*
9135   have_winsock=no
9136 fi
9137 rm -f conftest*
9138
9139         if test $have_winsock = yes; then
9140                 cat >> confdefs.h <<\EOF
9141 #define HAVE_WINSOCK 1
9142 EOF
9143
9144                 ac_cv_func_socket=yes
9145                 ac_cv_func_select=yes
9146                 ac_cv_func_closesocket=yes
9147                 ac_cv_func_gethostname=yes
9148                 if test $curlib = ws2_32; then
9149                         have_winsock=winsock2
9150                         cat >> confdefs.h <<\EOF
9151 #define HAVE_WINSOCK2 1
9152 EOF
9153
9154                 fi
9155                 break
9156         fi
9157         LIBS="$save_LIBS"
9158 done
9159 echo "$ac_t""$have_winsock" 1>&6
9160
9161
9162 echo $ac_n "checking for socket""... $ac_c" 1>&6
9163 echo "configure:9164: checking for socket" >&5
9164 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9165   echo $ac_n "(cached) $ac_c" 1>&6
9166 else
9167   cat > conftest.$ac_ext <<EOF
9168 #line 9169 "configure"
9169 #include "confdefs.h"
9170 /* System header to define __stub macros and hopefully few prototypes,
9171     which can conflict with char socket(); below.  */
9172 #include <assert.h>
9173 /* Override any gcc2 internal prototype to avoid an error.  */
9174 /* We use char because int might match the return type of a gcc2
9175     builtin and then its argument prototype would still apply.  */
9176 char socket();
9177 char (*f)();
9178
9179 int main() {
9180
9181 /* The GNU C library defines this for functions which it implements
9182     to always fail with ENOSYS.  Some functions are actually named
9183     something starting with __ and the normal name is an alias.  */
9184 #if defined (__stub_socket) || defined (__stub___socket)
9185 choke me
9186 #else
9187 f = socket;
9188 #endif
9189
9190 ; return 0; }
9191 EOF
9192 if { (eval echo configure:9193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9193   rm -rf conftest*
9194   eval "ac_cv_func_socket=yes"
9195 else
9196   echo "configure: failed program was:" >&5
9197   cat conftest.$ac_ext >&5
9198   rm -rf conftest*
9199   eval "ac_cv_func_socket=no"
9200 fi
9201 rm -f conftest*
9202 fi
9203
9204 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9205   echo "$ac_t""yes" 1>&6
9206   :
9207 else
9208   echo "$ac_t""no" 1>&6
9209         
9210         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9211 echo "configure:9212: checking for main in -lsocket" >&5
9212 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9213 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9214   echo $ac_n "(cached) $ac_c" 1>&6
9215 else
9216   ac_save_LIBS="$LIBS"
9217 LIBS="-lsocket  $LIBS"
9218 cat > conftest.$ac_ext <<EOF
9219 #line 9220 "configure"
9220 #include "confdefs.h"
9221
9222 int main() {
9223 main()
9224 ; return 0; }
9225 EOF
9226 if { (eval echo configure:9227: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9227   rm -rf conftest*
9228   eval "ac_cv_lib_$ac_lib_var=yes"
9229 else
9230   echo "configure: failed program was:" >&5
9231   cat conftest.$ac_ext >&5
9232   rm -rf conftest*
9233   eval "ac_cv_lib_$ac_lib_var=no"
9234 fi
9235 rm -f conftest*
9236 LIBS="$ac_save_LIBS"
9237
9238 fi
9239 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9240   echo "$ac_t""yes" 1>&6
9241     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9242     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9243   cat >> confdefs.h <<EOF
9244 #define $ac_tr_lib 1
9245 EOF
9246
9247   LIBS="-lsocket $LIBS"
9248
9249 else
9250   echo "$ac_t""no" 1>&6
9251 fi
9252
9253         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9254 echo "configure:9255: checking for main in -lnet" >&5
9255 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9256 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9257   echo $ac_n "(cached) $ac_c" 1>&6
9258 else
9259   ac_save_LIBS="$LIBS"
9260 LIBS="-lnet  $LIBS"
9261 cat > conftest.$ac_ext <<EOF
9262 #line 9263 "configure"
9263 #include "confdefs.h"
9264
9265 int main() {
9266 main()
9267 ; return 0; }
9268 EOF
9269 if { (eval echo configure:9270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9270   rm -rf conftest*
9271   eval "ac_cv_lib_$ac_lib_var=yes"
9272 else
9273   echo "configure: failed program was:" >&5
9274   cat conftest.$ac_ext >&5
9275   rm -rf conftest*
9276   eval "ac_cv_lib_$ac_lib_var=no"
9277 fi
9278 rm -f conftest*
9279 LIBS="$ac_save_LIBS"
9280
9281 fi
9282 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9283   echo "$ac_t""yes" 1>&6
9284     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9285     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9286   cat >> confdefs.h <<EOF
9287 #define $ac_tr_lib 1
9288 EOF
9289
9290   LIBS="-lnet $LIBS"
9291
9292 else
9293   echo "$ac_t""no" 1>&6
9294 fi
9295
9296         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9297 echo "configure:9298: checking for main in -lnsl_s" >&5
9298 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9299 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9300   echo $ac_n "(cached) $ac_c" 1>&6
9301 else
9302   ac_save_LIBS="$LIBS"
9303 LIBS="-lnsl_s  $LIBS"
9304 cat > conftest.$ac_ext <<EOF
9305 #line 9306 "configure"
9306 #include "confdefs.h"
9307
9308 int main() {
9309 main()
9310 ; return 0; }
9311 EOF
9312 if { (eval echo configure:9313: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9313   rm -rf conftest*
9314   eval "ac_cv_lib_$ac_lib_var=yes"
9315 else
9316   echo "configure: failed program was:" >&5
9317   cat conftest.$ac_ext >&5
9318   rm -rf conftest*
9319   eval "ac_cv_lib_$ac_lib_var=no"
9320 fi
9321 rm -f conftest*
9322 LIBS="$ac_save_LIBS"
9323
9324 fi
9325 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9326   echo "$ac_t""yes" 1>&6
9327     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9328     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9329   cat >> confdefs.h <<EOF
9330 #define $ac_tr_lib 1
9331 EOF
9332
9333   LIBS="-lnsl_s $LIBS"
9334
9335 else
9336   echo "$ac_t""no" 1>&6
9337 fi
9338
9339         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9340 echo "configure:9341: checking for main in -lnsl" >&5
9341 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9342 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9343   echo $ac_n "(cached) $ac_c" 1>&6
9344 else
9345   ac_save_LIBS="$LIBS"
9346 LIBS="-lnsl  $LIBS"
9347 cat > conftest.$ac_ext <<EOF
9348 #line 9349 "configure"
9349 #include "confdefs.h"
9350
9351 int main() {
9352 main()
9353 ; return 0; }
9354 EOF
9355 if { (eval echo configure:9356: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9356   rm -rf conftest*
9357   eval "ac_cv_lib_$ac_lib_var=yes"
9358 else
9359   echo "configure: failed program was:" >&5
9360   cat conftest.$ac_ext >&5
9361   rm -rf conftest*
9362   eval "ac_cv_lib_$ac_lib_var=no"
9363 fi
9364 rm -f conftest*
9365 LIBS="$ac_save_LIBS"
9366
9367 fi
9368 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9369   echo "$ac_t""yes" 1>&6
9370     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9371     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9372   cat >> confdefs.h <<EOF
9373 #define $ac_tr_lib 1
9374 EOF
9375
9376   LIBS="-lnsl $LIBS"
9377
9378 else
9379   echo "$ac_t""no" 1>&6
9380 fi
9381
9382         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9383 echo "configure:9384: checking for socket in -linet" >&5
9384 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9385 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9386   echo $ac_n "(cached) $ac_c" 1>&6
9387 else
9388   ac_save_LIBS="$LIBS"
9389 LIBS="-linet  $LIBS"
9390 cat > conftest.$ac_ext <<EOF
9391 #line 9392 "configure"
9392 #include "confdefs.h"
9393 /* Override any gcc2 internal prototype to avoid an error.  */
9394 /* We use char because int might match the return type of a gcc2
9395     builtin and then its argument prototype would still apply.  */
9396 char socket();
9397
9398 int main() {
9399 socket()
9400 ; return 0; }
9401 EOF
9402 if { (eval echo configure:9403: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9403   rm -rf conftest*
9404   eval "ac_cv_lib_$ac_lib_var=yes"
9405 else
9406   echo "configure: failed program was:" >&5
9407   cat conftest.$ac_ext >&5
9408   rm -rf conftest*
9409   eval "ac_cv_lib_$ac_lib_var=no"
9410 fi
9411 rm -f conftest*
9412 LIBS="$ac_save_LIBS"
9413
9414 fi
9415 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9416   echo "$ac_t""yes" 1>&6
9417     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9418     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9419   cat >> confdefs.h <<EOF
9420 #define $ac_tr_lib 1
9421 EOF
9422
9423   LIBS="-linet $LIBS"
9424
9425 else
9426   echo "$ac_t""no" 1>&6
9427 fi
9428
9429         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9430 echo "configure:9431: checking for main in -lgen" >&5
9431 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9432 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9433   echo $ac_n "(cached) $ac_c" 1>&6
9434 else
9435   ac_save_LIBS="$LIBS"
9436 LIBS="-lgen  $LIBS"
9437 cat > conftest.$ac_ext <<EOF
9438 #line 9439 "configure"
9439 #include "confdefs.h"
9440
9441 int main() {
9442 main()
9443 ; return 0; }
9444 EOF
9445 if { (eval echo configure:9446: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9446   rm -rf conftest*
9447   eval "ac_cv_lib_$ac_lib_var=yes"
9448 else
9449   echo "configure: failed program was:" >&5
9450   cat conftest.$ac_ext >&5
9451   rm -rf conftest*
9452   eval "ac_cv_lib_$ac_lib_var=no"
9453 fi
9454 rm -f conftest*
9455 LIBS="$ac_save_LIBS"
9456
9457 fi
9458 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9459   echo "$ac_t""yes" 1>&6
9460     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9461     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9462   cat >> confdefs.h <<EOF
9463 #define $ac_tr_lib 1
9464 EOF
9465
9466   LIBS="-lgen $LIBS"
9467
9468 else
9469   echo "$ac_t""no" 1>&6
9470 fi
9471
9472
9473 fi
9474
9475
9476 echo $ac_n "checking for select""... $ac_c" 1>&6
9477 echo "configure:9478: checking for select" >&5
9478 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9479   echo $ac_n "(cached) $ac_c" 1>&6
9480 else
9481   cat > conftest.$ac_ext <<EOF
9482 #line 9483 "configure"
9483 #include "confdefs.h"
9484 /* System header to define __stub macros and hopefully few prototypes,
9485     which can conflict with char select(); below.  */
9486 #include <assert.h>
9487 /* Override any gcc2 internal prototype to avoid an error.  */
9488 /* We use char because int might match the return type of a gcc2
9489     builtin and then its argument prototype would still apply.  */
9490 char select();
9491 char (*f)();
9492
9493 int main() {
9494
9495 /* The GNU C library defines this for functions which it implements
9496     to always fail with ENOSYS.  Some functions are actually named
9497     something starting with __ and the normal name is an alias.  */
9498 #if defined (__stub_select) || defined (__stub___select)
9499 choke me
9500 #else
9501 f = select;
9502 #endif
9503
9504 ; return 0; }
9505 EOF
9506 if { (eval echo configure:9507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9507   rm -rf conftest*
9508   eval "ac_cv_func_select=yes"
9509 else
9510   echo "configure: failed program was:" >&5
9511   cat conftest.$ac_ext >&5
9512   rm -rf conftest*
9513   eval "ac_cv_func_select=no"
9514 fi
9515 rm -f conftest*
9516 fi
9517
9518 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9519   echo "$ac_t""yes" 1>&6
9520   :
9521 else
9522   echo "$ac_t""no" 1>&6
9523 { echo "configure: error: select() required." 1>&2; exit 1; }
9524 fi
9525
9526
9527 if test "${ac_cv_header_winsock_h}" != yes; then
9528                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9529 echo "configure:9530: checking types of arguments for select()" >&5
9530  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9531   echo $ac_n "(cached) $ac_c" 1>&6
9532 else
9533    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9534   echo $ac_n "(cached) $ac_c" 1>&6
9535 else
9536     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9537   echo $ac_n "(cached) $ac_c" 1>&6
9538 else
9539      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9540      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9541       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9542        cat > conftest.$ac_ext <<EOF
9543 #line 9544 "configure"
9544 #include "confdefs.h"
9545 #ifdef HAVE_SYS_TYPES_H
9546 #include <sys/types.h>
9547 #endif
9548 #ifdef HAVE_SYS_TIME_H
9549 #include <sys/time.h>
9550 #endif
9551 #ifdef HAVE_SYS_SELECT_H
9552 #include <sys/select.h>
9553 #endif
9554 #ifdef HAVE_SYS_SOCKET_H
9555 #include <sys/socket.h>
9556 #endif
9557 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);
9558 int main() {
9559
9560 ; return 0; }
9561 EOF
9562 if { (eval echo configure:9563: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9563   rm -rf conftest*
9564           ac_not_found=no ; break 3
9565 else
9566   echo "configure: failed program was:" >&5
9567   cat conftest.$ac_ext >&5
9568   rm -rf conftest*
9569   ac_not_found=yes
9570 fi
9571 rm -f conftest*
9572       done
9573      done
9574     done
9575    
9576 fi
9577   
9578 fi
9579  
9580 fi
9581  if test "$ac_not_found" = yes; then
9582   ac_cv_func_select_arg1=int 
9583   ac_cv_func_select_arg234='int *' 
9584   ac_cv_func_select_arg5='struct timeval *'
9585  fi
9586  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9587  cat >> confdefs.h <<EOF
9588 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9589 EOF
9590
9591  cat >> confdefs.h <<EOF
9592 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9593 EOF
9594
9595  cat >> confdefs.h <<EOF
9596 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9597 EOF
9598
9599
9600 fi
9601
9602
9603 for ac_hdr in regex.h 
9604 do
9605 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9606 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9607 echo "configure:9608: checking for $ac_hdr" >&5
9608 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9609   echo $ac_n "(cached) $ac_c" 1>&6
9610 else
9611   cat > conftest.$ac_ext <<EOF
9612 #line 9613 "configure"
9613 #include "confdefs.h"
9614 #include <$ac_hdr>
9615 EOF
9616 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9617 { (eval echo configure:9618: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9618 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9619 if test -z "$ac_err"; then
9620   rm -rf conftest*
9621   eval "ac_cv_header_$ac_safe=yes"
9622 else
9623   echo "$ac_err" >&5
9624   echo "configure: failed program was:" >&5
9625   cat conftest.$ac_ext >&5
9626   rm -rf conftest*
9627   eval "ac_cv_header_$ac_safe=no"
9628 fi
9629 rm -f conftest*
9630 fi
9631 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9632   echo "$ac_t""yes" 1>&6
9633     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9634   cat >> confdefs.h <<EOF
9635 #define $ac_tr_hdr 1
9636 EOF
9637  
9638 else
9639   echo "$ac_t""no" 1>&6
9640 fi
9641 done
9642
9643 if test "$ac_cv_header_regex_h" != yes ; then
9644         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9645 fi
9646
9647 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9648 echo "configure:9649: checking for library containing regfree" >&5
9649 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9650   echo $ac_n "(cached) $ac_c" 1>&6
9651 else
9652   ac_func_search_save_LIBS="$LIBS"
9653 ac_cv_search_regfree="no"
9654 cat > conftest.$ac_ext <<EOF
9655 #line 9656 "configure"
9656 #include "confdefs.h"
9657 /* Override any gcc2 internal prototype to avoid an error.  */
9658 /* We use char because int might match the return type of a gcc2
9659     builtin and then its argument prototype would still apply.  */
9660 char regfree();
9661
9662 int main() {
9663 regfree()
9664 ; return 0; }
9665 EOF
9666 if { (eval echo configure:9667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9667   rm -rf conftest*
9668   ac_cv_search_regfree="none required"
9669 else
9670   echo "configure: failed program was:" >&5
9671   cat conftest.$ac_ext >&5
9672 fi
9673 rm -f conftest*
9674 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9675 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9676 cat > conftest.$ac_ext <<EOF
9677 #line 9678 "configure"
9678 #include "confdefs.h"
9679 /* Override any gcc2 internal prototype to avoid an error.  */
9680 /* We use char because int might match the return type of a gcc2
9681     builtin and then its argument prototype would still apply.  */
9682 char regfree();
9683
9684 int main() {
9685 regfree()
9686 ; return 0; }
9687 EOF
9688 if { (eval echo configure:9689: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9689   rm -rf conftest*
9690   ac_cv_search_regfree="-l$ac_lib"
9691 break
9692 else
9693   echo "configure: failed program was:" >&5
9694   cat conftest.$ac_ext >&5
9695 fi
9696 rm -f conftest*
9697 done
9698 LIBS="$ac_func_search_save_LIBS"
9699 fi
9700
9701 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9702 if test "$ac_cv_search_regfree" != "no"; then
9703   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9704   :
9705 else :
9706   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9707 fi
9708
9709
9710 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9711 echo "configure:9712: checking for compatible POSIX regex" >&5
9712 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9713   echo $ac_n "(cached) $ac_c" 1>&6
9714 else
9715   
9716         if test "$cross_compiling" = yes; then
9717   ol_cv_c_posix_regex=cross
9718 else
9719   cat > conftest.$ac_ext <<EOF
9720 #line 9721 "configure"
9721 #include "confdefs.h"
9722
9723 #include <sys/types.h>
9724 #include <regex.h>
9725 static char *pattern, *string;
9726 main()
9727 {
9728         int rc;
9729         regex_t re;
9730
9731         pattern = "^A";
9732
9733         if(regcomp(&re, pattern, 0)) {
9734                 return -1;
9735         }
9736         
9737         string = "ALL MATCH";
9738         
9739         rc = regexec(&re, string, 0, (void*)0, 0);
9740
9741         regfree(&re);
9742
9743         return rc;
9744 }
9745 EOF
9746 if { (eval echo configure:9747: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9747 then
9748   ol_cv_c_posix_regex=yes
9749 else
9750   echo "configure: failed program was:" >&5
9751   cat conftest.$ac_ext >&5
9752   rm -fr conftest*
9753   ol_cv_c_posix_regex=no
9754 fi
9755 rm -fr conftest*
9756 fi
9757
9758 fi
9759
9760 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9761
9762 if test "$ol_cv_c_posix_regex" = no ; then
9763         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9764 fi
9765
9766
9767 have_uuid=no
9768 for ac_hdr in sys/uuid.h
9769 do
9770 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9771 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9772 echo "configure:9773: checking for $ac_hdr" >&5
9773 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9774   echo $ac_n "(cached) $ac_c" 1>&6
9775 else
9776   cat > conftest.$ac_ext <<EOF
9777 #line 9778 "configure"
9778 #include "confdefs.h"
9779 #include <$ac_hdr>
9780 EOF
9781 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9782 { (eval echo configure:9783: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9783 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9784 if test -z "$ac_err"; then
9785   rm -rf conftest*
9786   eval "ac_cv_header_$ac_safe=yes"
9787 else
9788   echo "$ac_err" >&5
9789   echo "configure: failed program was:" >&5
9790   cat conftest.$ac_ext >&5
9791   rm -rf conftest*
9792   eval "ac_cv_header_$ac_safe=no"
9793 fi
9794 rm -f conftest*
9795 fi
9796 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9797   echo "$ac_t""yes" 1>&6
9798     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9799   cat >> confdefs.h <<EOF
9800 #define $ac_tr_hdr 1
9801 EOF
9802  
9803 else
9804   echo "$ac_t""no" 1>&6
9805 fi
9806 done
9807
9808 if test $ac_cv_header_sys_uuid_h = yes ; then
9809         save_LIBS="$LIBS"
9810         
9811 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9812 echo "configure:9813: checking for library containing uuid_to_str" >&5
9813 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9814   echo $ac_n "(cached) $ac_c" 1>&6
9815 else
9816   ac_func_search_save_LIBS="$LIBS"
9817 ac_cv_search_uuid_to_str="no"
9818 cat > conftest.$ac_ext <<EOF
9819 #line 9820 "configure"
9820 #include "confdefs.h"
9821 /* Override any gcc2 internal prototype to avoid an error.  */
9822 /* We use char because int might match the return type of a gcc2
9823     builtin and then its argument prototype would still apply.  */
9824 char uuid_to_str();
9825
9826 int main() {
9827 uuid_to_str()
9828 ; return 0; }
9829 EOF
9830 if { (eval echo configure:9831: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9831   rm -rf conftest*
9832   ac_cv_search_uuid_to_str="none required"
9833 else
9834   echo "configure: failed program was:" >&5
9835   cat conftest.$ac_ext >&5
9836 fi
9837 rm -f conftest*
9838 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9839 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9840 cat > conftest.$ac_ext <<EOF
9841 #line 9842 "configure"
9842 #include "confdefs.h"
9843 /* Override any gcc2 internal prototype to avoid an error.  */
9844 /* We use char because int might match the return type of a gcc2
9845     builtin and then its argument prototype would still apply.  */
9846 char uuid_to_str();
9847
9848 int main() {
9849 uuid_to_str()
9850 ; return 0; }
9851 EOF
9852 if { (eval echo configure:9853: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9853   rm -rf conftest*
9854   ac_cv_search_uuid_to_str="-l$ac_lib"
9855 break
9856 else
9857   echo "configure: failed program was:" >&5
9858   cat conftest.$ac_ext >&5
9859 fi
9860 rm -f conftest*
9861 done
9862 LIBS="$ac_func_search_save_LIBS"
9863 fi
9864
9865 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9866 if test "$ac_cv_search_uuid_to_str" != "no"; then
9867   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9868   have_uuid=yes
9869 else :
9870   :
9871 fi
9872         LIBS="$save_LIBS"
9873
9874         if test have_uuid = yes ; then
9875                 cat >> confdefs.h <<\EOF
9876 #define HAVE_UUID_TO_STR 1
9877 EOF
9878
9879
9880                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9881                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9882         fi
9883 fi
9884
9885 if test $have_uuid = no ; then
9886         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9887 echo "configure:9888: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9888         save_LIBS="$LIBS"
9889         LIBS="$LIBS -lrpcrt4"
9890         cat > conftest.$ac_ext <<EOF
9891 #line 9892 "configure"
9892 #include "confdefs.h"
9893
9894                 char UuidCreate@4();
9895                 char UuidToStringA@8();
9896                 
9897 int main() {
9898
9899                 UuidCreate@4();
9900                 UuidToStringA@8();
9901                 
9902 ; return 0; }
9903 EOF
9904 if { (eval echo configure:9905: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9905   rm -rf conftest*
9906   need_rpcrt=yes
9907 else
9908   echo "configure: failed program was:" >&5
9909   cat conftest.$ac_ext >&5
9910   rm -rf conftest*
9911   need_rpcrt=no
9912 fi
9913 rm -f conftest*
9914         if test $need_rpcrt = yes; then
9915                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9916         fi
9917         LIBS="$save_LIBS"
9918         echo "$ac_t""$need_rpcrt" 1>&6
9919 fi
9920
9921 ol_link_dnssrv=no
9922 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9923 echo "configure:9924: checking for res_query" >&5
9924 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9925   echo $ac_n "(cached) $ac_c" 1>&6
9926 else
9927   cat > conftest.$ac_ext <<EOF
9928 #line 9929 "configure"
9929 #include "confdefs.h"
9930 /* System header to define __stub macros and hopefully few prototypes,
9931     which can conflict with char res_query(); below.  */
9932 #include <assert.h>
9933 /* Override any gcc2 internal prototype to avoid an error.  */
9934 /* We use char because int might match the return type of a gcc2
9935     builtin and then its argument prototype would still apply.  */
9936 char res_query();
9937 char (*f)();
9938
9939 int main() {
9940
9941 /* The GNU C library defines this for functions which it implements
9942     to always fail with ENOSYS.  Some functions are actually named
9943     something starting with __ and the normal name is an alias.  */
9944 #if defined (__stub_res_query) || defined (__stub___res_query)
9945 choke me
9946 #else
9947 f = res_query;
9948 #endif
9949
9950 ; return 0; }
9951 EOF
9952 if { (eval echo configure:9953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9953   rm -rf conftest*
9954   eval "ac_cv_func_res_query=yes"
9955 else
9956   echo "configure: failed program was:" >&5
9957   cat conftest.$ac_ext >&5
9958   rm -rf conftest*
9959   eval "ac_cv_func_res_query=no"
9960 fi
9961 rm -f conftest*
9962 fi
9963
9964 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9965   echo "$ac_t""yes" 1>&6
9966   :
9967 else
9968   echo "$ac_t""no" 1>&6
9969 fi
9970
9971 if test $ac_cv_func_res_query = no ; then 
9972         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
9973 echo "configure:9974: checking for __res_query" >&5
9974 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
9975   echo $ac_n "(cached) $ac_c" 1>&6
9976 else
9977   cat > conftest.$ac_ext <<EOF
9978 #line 9979 "configure"
9979 #include "confdefs.h"
9980 /* System header to define __stub macros and hopefully few prototypes,
9981     which can conflict with char __res_query(); below.  */
9982 #include <assert.h>
9983 /* Override any gcc2 internal prototype to avoid an error.  */
9984 /* We use char because int might match the return type of a gcc2
9985     builtin and then its argument prototype would still apply.  */
9986 char __res_query();
9987 char (*f)();
9988
9989 int main() {
9990
9991 /* The GNU C library defines this for functions which it implements
9992     to always fail with ENOSYS.  Some functions are actually named
9993     something starting with __ and the normal name is an alias.  */
9994 #if defined (__stub___res_query) || defined (__stub_____res_query)
9995 choke me
9996 #else
9997 f = __res_query;
9998 #endif
9999
10000 ; return 0; }
10001 EOF
10002 if { (eval echo configure:10003: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10003   rm -rf conftest*
10004   eval "ac_cv_func___res_query=yes"
10005 else
10006   echo "configure: failed program was:" >&5
10007   cat conftest.$ac_ext >&5
10008   rm -rf conftest*
10009   eval "ac_cv_func___res_query=no"
10010 fi
10011 rm -f conftest*
10012 fi
10013
10014 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10015   echo "$ac_t""yes" 1>&6
10016   :
10017 else
10018   echo "$ac_t""no" 1>&6
10019 fi
10020
10021         ac_cv_func_res_query=$ac_cv_func___res_query
10022 fi
10023
10024 if test $ac_cv_func_res_query = no ; then 
10025         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10026 echo "configure:10027: checking for res_query in -lbind" >&5
10027 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10028 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10029   echo $ac_n "(cached) $ac_c" 1>&6
10030 else
10031   ac_save_LIBS="$LIBS"
10032 LIBS="-lbind  $LIBS"
10033 cat > conftest.$ac_ext <<EOF
10034 #line 10035 "configure"
10035 #include "confdefs.h"
10036 /* Override any gcc2 internal prototype to avoid an error.  */
10037 /* We use char because int might match the return type of a gcc2
10038     builtin and then its argument prototype would still apply.  */
10039 char res_query();
10040
10041 int main() {
10042 res_query()
10043 ; return 0; }
10044 EOF
10045 if { (eval echo configure:10046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10046   rm -rf conftest*
10047   eval "ac_cv_lib_$ac_lib_var=yes"
10048 else
10049   echo "configure: failed program was:" >&5
10050   cat conftest.$ac_ext >&5
10051   rm -rf conftest*
10052   eval "ac_cv_lib_$ac_lib_var=no"
10053 fi
10054 rm -f conftest*
10055 LIBS="$ac_save_LIBS"
10056
10057 fi
10058 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10059   echo "$ac_t""yes" 1>&6
10060     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10061     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10062   cat >> confdefs.h <<EOF
10063 #define $ac_tr_lib 1
10064 EOF
10065
10066   LIBS="-lbind $LIBS"
10067
10068 else
10069   echo "$ac_t""no" 1>&6
10070 fi
10071
10072         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10073 fi
10074
10075 if test $ac_cv_func_res_query = no ; then 
10076         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10077 echo "configure:10078: checking for __res_query in -lbind" >&5
10078 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10079 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10080   echo $ac_n "(cached) $ac_c" 1>&6
10081 else
10082   ac_save_LIBS="$LIBS"
10083 LIBS="-lbind  $LIBS"
10084 cat > conftest.$ac_ext <<EOF
10085 #line 10086 "configure"
10086 #include "confdefs.h"
10087 /* Override any gcc2 internal prototype to avoid an error.  */
10088 /* We use char because int might match the return type of a gcc2
10089     builtin and then its argument prototype would still apply.  */
10090 char __res_query();
10091
10092 int main() {
10093 __res_query()
10094 ; return 0; }
10095 EOF
10096 if { (eval echo configure:10097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10097   rm -rf conftest*
10098   eval "ac_cv_lib_$ac_lib_var=yes"
10099 else
10100   echo "configure: failed program was:" >&5
10101   cat conftest.$ac_ext >&5
10102   rm -rf conftest*
10103   eval "ac_cv_lib_$ac_lib_var=no"
10104 fi
10105 rm -f conftest*
10106 LIBS="$ac_save_LIBS"
10107
10108 fi
10109 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10110   echo "$ac_t""yes" 1>&6
10111     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10112     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10113   cat >> confdefs.h <<EOF
10114 #define $ac_tr_lib 1
10115 EOF
10116
10117   LIBS="-lbind $LIBS"
10118
10119 else
10120   echo "$ac_t""no" 1>&6
10121 fi
10122
10123         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10124 fi
10125
10126 if test $ac_cv_func_res_query = no ; then 
10127         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10128 echo "configure:10129: checking for res_query in -lresolv" >&5
10129 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10130 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10131   echo $ac_n "(cached) $ac_c" 1>&6
10132 else
10133   ac_save_LIBS="$LIBS"
10134 LIBS="-lresolv  $LIBS"
10135 cat > conftest.$ac_ext <<EOF
10136 #line 10137 "configure"
10137 #include "confdefs.h"
10138 /* Override any gcc2 internal prototype to avoid an error.  */
10139 /* We use char because int might match the return type of a gcc2
10140     builtin and then its argument prototype would still apply.  */
10141 char res_query();
10142
10143 int main() {
10144 res_query()
10145 ; return 0; }
10146 EOF
10147 if { (eval echo configure:10148: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10148   rm -rf conftest*
10149   eval "ac_cv_lib_$ac_lib_var=yes"
10150 else
10151   echo "configure: failed program was:" >&5
10152   cat conftest.$ac_ext >&5
10153   rm -rf conftest*
10154   eval "ac_cv_lib_$ac_lib_var=no"
10155 fi
10156 rm -f conftest*
10157 LIBS="$ac_save_LIBS"
10158
10159 fi
10160 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10161   echo "$ac_t""yes" 1>&6
10162     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10163     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10164   cat >> confdefs.h <<EOF
10165 #define $ac_tr_lib 1
10166 EOF
10167
10168   LIBS="-lresolv $LIBS"
10169
10170 else
10171   echo "$ac_t""no" 1>&6
10172 fi
10173
10174         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10175 fi
10176
10177 if test $ac_cv_func_res_query = no ; then 
10178         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10179 echo "configure:10180: checking for __res_query in -lresolv" >&5
10180 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10181 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10182   echo $ac_n "(cached) $ac_c" 1>&6
10183 else
10184   ac_save_LIBS="$LIBS"
10185 LIBS="-lresolv  $LIBS"
10186 cat > conftest.$ac_ext <<EOF
10187 #line 10188 "configure"
10188 #include "confdefs.h"
10189 /* Override any gcc2 internal prototype to avoid an error.  */
10190 /* We use char because int might match the return type of a gcc2
10191     builtin and then its argument prototype would still apply.  */
10192 char __res_query();
10193
10194 int main() {
10195 __res_query()
10196 ; return 0; }
10197 EOF
10198 if { (eval echo configure:10199: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10199   rm -rf conftest*
10200   eval "ac_cv_lib_$ac_lib_var=yes"
10201 else
10202   echo "configure: failed program was:" >&5
10203   cat conftest.$ac_ext >&5
10204   rm -rf conftest*
10205   eval "ac_cv_lib_$ac_lib_var=no"
10206 fi
10207 rm -f conftest*
10208 LIBS="$ac_save_LIBS"
10209
10210 fi
10211 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10212   echo "$ac_t""yes" 1>&6
10213     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10214     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10215   cat >> confdefs.h <<EOF
10216 #define $ac_tr_lib 1
10217 EOF
10218
10219   LIBS="-lresolv $LIBS"
10220
10221 else
10222   echo "$ac_t""no" 1>&6
10223 fi
10224
10225         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10226 fi
10227
10228 if test "$ac_cv_func_res_query" = yes ; then
10229         cat >> confdefs.h <<\EOF
10230 #define HAVE_RES_QUERY 1
10231 EOF
10232
10233
10234         if test $ol_enable_dnssrv != no ; then
10235                 ol_link_dnssrv=yes
10236         fi
10237 fi
10238
10239 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10240         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10241 fi
10242
10243 for ac_func in getaddrinfo gai_strerror inet_ntop 
10244 do
10245 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10246 echo "configure:10247: checking for $ac_func" >&5
10247 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10248   echo $ac_n "(cached) $ac_c" 1>&6
10249 else
10250   cat > conftest.$ac_ext <<EOF
10251 #line 10252 "configure"
10252 #include "confdefs.h"
10253 /* System header to define __stub macros and hopefully few prototypes,
10254     which can conflict with char $ac_func(); below.  */
10255 #include <assert.h>
10256 /* Override any gcc2 internal prototype to avoid an error.  */
10257 /* We use char because int might match the return type of a gcc2
10258     builtin and then its argument prototype would still apply.  */
10259 char $ac_func();
10260 char (*f)();
10261
10262 int main() {
10263
10264 /* The GNU C library defines this for functions which it implements
10265     to always fail with ENOSYS.  Some functions are actually named
10266     something starting with __ and the normal name is an alias.  */
10267 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10268 choke me
10269 #else
10270 f = $ac_func;
10271 #endif
10272
10273 ; return 0; }
10274 EOF
10275 if { (eval echo configure:10276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10276   rm -rf conftest*
10277   eval "ac_cv_func_$ac_func=yes"
10278 else
10279   echo "configure: failed program was:" >&5
10280   cat conftest.$ac_ext >&5
10281   rm -rf conftest*
10282   eval "ac_cv_func_$ac_func=no"
10283 fi
10284 rm -f conftest*
10285 fi
10286
10287 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10288   echo "$ac_t""yes" 1>&6
10289     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10290   cat >> confdefs.h <<EOF
10291 #define $ac_tr_func 1
10292 EOF
10293  
10294 else
10295   echo "$ac_t""no" 1>&6
10296 fi
10297 done
10298
10299
10300 ol_link_ipv6=no
10301 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10302         if test $ol_enable_ipv6 = yes ; then
10303                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10304         fi
10305 elif test $ol_enable_ipv6 != no ; then
10306         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10307 echo "configure:10308: checking INET6_ADDRSTRLEN" >&5
10308 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10309   echo $ac_n "(cached) $ac_c" 1>&6
10310 else
10311   
10312                 cat > conftest.$ac_ext <<EOF
10313 #line 10314 "configure"
10314 #include "confdefs.h"
10315
10316 #                       include <netinet/in.h>
10317 #                       ifdef INET6_ADDRSTRLEN
10318                                 __has_inet6_addrstrlen__;
10319 #                       endif
10320                 
10321 EOF
10322 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10323   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10324   rm -rf conftest*
10325   ol_cv_inet6_addrstrlen=yes
10326 else
10327   rm -rf conftest*
10328   ol_cv_inet6_addrstrlen=no
10329 fi
10330 rm -f conftest*
10331
10332 fi
10333
10334 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10335
10336         if test $ol_cv_inet6_addrstrlen = yes ; then
10337                 ol_link_ipv6=yes
10338         elif test $ol_enable_ipv6 = yes ; then
10339                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10340         fi
10341 fi
10342
10343 if test $ol_enable_local != no ; then
10344         for ac_hdr in sys/un.h 
10345 do
10346 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10347 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10348 echo "configure:10349: checking for $ac_hdr" >&5
10349 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10350   echo $ac_n "(cached) $ac_c" 1>&6
10351 else
10352   cat > conftest.$ac_ext <<EOF
10353 #line 10354 "configure"
10354 #include "confdefs.h"
10355 #include <$ac_hdr>
10356 EOF
10357 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10358 { (eval echo configure:10359: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10359 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10360 if test -z "$ac_err"; then
10361   rm -rf conftest*
10362   eval "ac_cv_header_$ac_safe=yes"
10363 else
10364   echo "$ac_err" >&5
10365   echo "configure: failed program was:" >&5
10366   cat conftest.$ac_ext >&5
10367   rm -rf conftest*
10368   eval "ac_cv_header_$ac_safe=no"
10369 fi
10370 rm -f conftest*
10371 fi
10372 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10373   echo "$ac_t""yes" 1>&6
10374     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10375   cat >> confdefs.h <<EOF
10376 #define $ac_tr_hdr 1
10377 EOF
10378  
10379 else
10380   echo "$ac_t""no" 1>&6
10381 fi
10382 done
10383
10384
10385         if test $ol_enable_local = auto ; then
10386                 ol_enable_local=$ac_cv_header_sys_un_h
10387         elif test $ac_cv_header_sys_un_h = no ; then
10388                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10389         fi
10390 fi
10391
10392 ol_link_kbind=no
10393 ol_link_kpasswd=no
10394 ol_link_krb5=no
10395 ol_link_krb4=no
10396
10397 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10398         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10399         -o $ol_with_kerberos = k425 ; then
10400
10401         for ac_hdr in krb5.h
10402 do
10403 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10404 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10405 echo "configure:10406: checking for $ac_hdr" >&5
10406 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10407   echo $ac_n "(cached) $ac_c" 1>&6
10408 else
10409   cat > conftest.$ac_ext <<EOF
10410 #line 10411 "configure"
10411 #include "confdefs.h"
10412 #include <$ac_hdr>
10413 EOF
10414 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10415 { (eval echo configure:10416: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10416 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10417 if test -z "$ac_err"; then
10418   rm -rf conftest*
10419   eval "ac_cv_header_$ac_safe=yes"
10420 else
10421   echo "$ac_err" >&5
10422   echo "configure: failed program was:" >&5
10423   cat conftest.$ac_ext >&5
10424   rm -rf conftest*
10425   eval "ac_cv_header_$ac_safe=no"
10426 fi
10427 rm -f conftest*
10428 fi
10429 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10430   echo "$ac_t""yes" 1>&6
10431     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10432   cat >> confdefs.h <<EOF
10433 #define $ac_tr_hdr 1
10434 EOF
10435  
10436 else
10437   echo "$ac_t""no" 1>&6
10438 fi
10439 done
10440
10441
10442         if test $ac_cv_header_krb5_h = yes ; then
10443                                 for ac_hdr in heim_err.h
10444 do
10445 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10446 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10447 echo "configure:10448: checking for $ac_hdr" >&5
10448 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10449   echo $ac_n "(cached) $ac_c" 1>&6
10450 else
10451   cat > conftest.$ac_ext <<EOF
10452 #line 10453 "configure"
10453 #include "confdefs.h"
10454 #include <$ac_hdr>
10455 EOF
10456 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10457 { (eval echo configure:10458: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10458 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10459 if test -z "$ac_err"; then
10460   rm -rf conftest*
10461   eval "ac_cv_header_$ac_safe=yes"
10462 else
10463   echo "$ac_err" >&5
10464   echo "configure: failed program was:" >&5
10465   cat conftest.$ac_ext >&5
10466   rm -rf conftest*
10467   eval "ac_cv_header_$ac_safe=no"
10468 fi
10469 rm -f conftest*
10470 fi
10471 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10472   echo "$ac_t""yes" 1>&6
10473     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10474   cat >> confdefs.h <<EOF
10475 #define $ac_tr_hdr 1
10476 EOF
10477  
10478 else
10479   echo "$ac_t""no" 1>&6
10480 fi
10481 done
10482
10483                 if test $ac_cv_header_heim_err_h = yes ; then
10484                         krb5_impl=heimdal
10485                 else
10486                         krb5_impl=mit
10487                 fi
10488
10489                 if test $krb5_impl = mit; then
10490                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10491 echo "configure:10492: checking for main in -lk5crypto" >&5
10492 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10493 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10494   echo $ac_n "(cached) $ac_c" 1>&6
10495 else
10496   ac_save_LIBS="$LIBS"
10497 LIBS="-lk5crypto  $LIBS"
10498 cat > conftest.$ac_ext <<EOF
10499 #line 10500 "configure"
10500 #include "confdefs.h"
10501
10502 int main() {
10503 main()
10504 ; return 0; }
10505 EOF
10506 if { (eval echo configure:10507: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10507   rm -rf conftest*
10508   eval "ac_cv_lib_$ac_lib_var=yes"
10509 else
10510   echo "configure: failed program was:" >&5
10511   cat conftest.$ac_ext >&5
10512   rm -rf conftest*
10513   eval "ac_cv_lib_$ac_lib_var=no"
10514 fi
10515 rm -f conftest*
10516 LIBS="$ac_save_LIBS"
10517
10518 fi
10519 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10520   echo "$ac_t""yes" 1>&6
10521   krb5crypto=k5crypto
10522 else
10523   echo "$ac_t""no" 1>&6
10524 krb5crypto=crypto
10525 fi
10526
10527
10528                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10529 echo "configure:10530: checking for main in -lkrb5" >&5
10530 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10531 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10532   echo $ac_n "(cached) $ac_c" 1>&6
10533 else
10534   ac_save_LIBS="$LIBS"
10535 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10536 cat > conftest.$ac_ext <<EOF
10537 #line 10538 "configure"
10538 #include "confdefs.h"
10539
10540 int main() {
10541 main()
10542 ; return 0; }
10543 EOF
10544 if { (eval echo configure:10545: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10545   rm -rf conftest*
10546   eval "ac_cv_lib_$ac_lib_var=yes"
10547 else
10548   echo "configure: failed program was:" >&5
10549   cat conftest.$ac_ext >&5
10550   rm -rf conftest*
10551   eval "ac_cv_lib_$ac_lib_var=no"
10552 fi
10553 rm -f conftest*
10554 LIBS="$ac_save_LIBS"
10555
10556 fi
10557 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10558   echo "$ac_t""yes" 1>&6
10559   have_krb5=yes
10560                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10561 else
10562   echo "$ac_t""no" 1>&6
10563 have_krb5=no
10564 fi
10565
10566
10567                 elif test $krb5_impl = heimdal; then
10568                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10569 echo "configure:10570: checking for main in -ldes" >&5
10570 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10571 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10572   echo $ac_n "(cached) $ac_c" 1>&6
10573 else
10574   ac_save_LIBS="$LIBS"
10575 LIBS="-ldes  $LIBS"
10576 cat > conftest.$ac_ext <<EOF
10577 #line 10578 "configure"
10578 #include "confdefs.h"
10579
10580 int main() {
10581 main()
10582 ; return 0; }
10583 EOF
10584 if { (eval echo configure:10585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10585   rm -rf conftest*
10586   eval "ac_cv_lib_$ac_lib_var=yes"
10587 else
10588   echo "configure: failed program was:" >&5
10589   cat conftest.$ac_ext >&5
10590   rm -rf conftest*
10591   eval "ac_cv_lib_$ac_lib_var=no"
10592 fi
10593 rm -f conftest*
10594 LIBS="$ac_save_LIBS"
10595
10596 fi
10597 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10598   echo "$ac_t""yes" 1>&6
10599   krb5crypto=des
10600 else
10601   echo "$ac_t""no" 1>&6
10602 krb5crypto=crypto
10603 fi
10604
10605
10606                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10607 echo "configure:10608: checking for main in -lkrb5" >&5
10608 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10609 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10610   echo $ac_n "(cached) $ac_c" 1>&6
10611 else
10612   ac_save_LIBS="$LIBS"
10613 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10614 cat > conftest.$ac_ext <<EOF
10615 #line 10616 "configure"
10616 #include "confdefs.h"
10617
10618 int main() {
10619 main()
10620 ; return 0; }
10621 EOF
10622 if { (eval echo configure:10623: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10623   rm -rf conftest*
10624   eval "ac_cv_lib_$ac_lib_var=yes"
10625 else
10626   echo "configure: failed program was:" >&5
10627   cat conftest.$ac_ext >&5
10628   rm -rf conftest*
10629   eval "ac_cv_lib_$ac_lib_var=no"
10630 fi
10631 rm -f conftest*
10632 LIBS="$ac_save_LIBS"
10633
10634 fi
10635 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10636   echo "$ac_t""yes" 1>&6
10637   have_krb5=yes
10638                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10639 else
10640   echo "$ac_t""no" 1>&6
10641 have_krb5=no
10642 fi
10643
10644
10645                         cat >> confdefs.h <<\EOF
10646 #define HAVE_HEIMDAL_KERBEROS 1
10647 EOF
10648
10649
10650                 else
10651                         have_krb5=no
10652                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10653                 fi
10654
10655                 if test $have_krb5 = yes ; then
10656                         ol_link_krb5=yes
10657
10658                         cat >> confdefs.h <<\EOF
10659 #define HAVE_KRB5 1
10660 EOF
10661
10662
10663                         if test $ol_enable_kpasswd != no ; then
10664                                 ol_link_kpasswd=yes;
10665                         fi
10666
10667                         if test $ol_with_kerberos = k5only ; then
10668                                 ol_with_kerberos=found
10669                         fi
10670
10671                 elif test $ol_with_kerberos != auto ; then
10672                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10673                 fi
10674
10675         fi
10676 fi
10677
10678 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10679         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10680
10681         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10682 do
10683 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10684 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10685 echo "configure:10686: checking for $ac_hdr" >&5
10686 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10687   echo $ac_n "(cached) $ac_c" 1>&6
10688 else
10689   cat > conftest.$ac_ext <<EOF
10690 #line 10691 "configure"
10691 #include "confdefs.h"
10692 #include <$ac_hdr>
10693 EOF
10694 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10695 { (eval echo configure:10696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10696 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10697 if test -z "$ac_err"; then
10698   rm -rf conftest*
10699   eval "ac_cv_header_$ac_safe=yes"
10700 else
10701   echo "$ac_err" >&5
10702   echo "configure: failed program was:" >&5
10703   cat conftest.$ac_ext >&5
10704   rm -rf conftest*
10705   eval "ac_cv_header_$ac_safe=no"
10706 fi
10707 rm -f conftest*
10708 fi
10709 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10710   echo "$ac_t""yes" 1>&6
10711     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10712   cat >> confdefs.h <<EOF
10713 #define $ac_tr_hdr 1
10714 EOF
10715  
10716 else
10717   echo "$ac_t""no" 1>&6
10718 fi
10719 done
10720
10721
10722         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10723                 if test $krb5_impl = mit; then
10724                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10725 echo "configure:10726: checking for main in -lkrb4" >&5
10726 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10727 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10728   echo $ac_n "(cached) $ac_c" 1>&6
10729 else
10730   ac_save_LIBS="$LIBS"
10731 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10732 cat > conftest.$ac_ext <<EOF
10733 #line 10734 "configure"
10734 #include "confdefs.h"
10735
10736 int main() {
10737 main()
10738 ; return 0; }
10739 EOF
10740 if { (eval echo configure:10741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10741   rm -rf conftest*
10742   eval "ac_cv_lib_$ac_lib_var=yes"
10743 else
10744   echo "configure: failed program was:" >&5
10745   cat conftest.$ac_ext >&5
10746   rm -rf conftest*
10747   eval "ac_cv_lib_$ac_lib_var=no"
10748 fi
10749 rm -f conftest*
10750 LIBS="$ac_save_LIBS"
10751
10752 fi
10753 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10754   echo "$ac_t""yes" 1>&6
10755   have_k425=yes
10756                                 KRB4_LIBS="-lkrb4 -ldes425"
10757 else
10758   echo "$ac_t""no" 1>&6
10759 have_k425=no
10760 fi
10761
10762
10763                 elif test $krb5_impl = heimdal; then
10764                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10765 echo "configure:10766: checking for main in -lkrb4" >&5
10766 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10767 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10768   echo $ac_n "(cached) $ac_c" 1>&6
10769 else
10770   ac_save_LIBS="$LIBS"
10771 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10772 cat > conftest.$ac_ext <<EOF
10773 #line 10774 "configure"
10774 #include "confdefs.h"
10775
10776 int main() {
10777 main()
10778 ; return 0; }
10779 EOF
10780 if { (eval echo configure:10781: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10781   rm -rf conftest*
10782   eval "ac_cv_lib_$ac_lib_var=yes"
10783 else
10784   echo "configure: failed program was:" >&5
10785   cat conftest.$ac_ext >&5
10786   rm -rf conftest*
10787   eval "ac_cv_lib_$ac_lib_var=no"
10788 fi
10789 rm -f conftest*
10790 LIBS="$ac_save_LIBS"
10791
10792 fi
10793 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10794   echo "$ac_t""yes" 1>&6
10795   have_k425=yes
10796                                 KRB4_LIBS="-lkrb4"
10797 else
10798   echo "$ac_t""no" 1>&6
10799 have_k425=no
10800 fi
10801
10802
10803                 else
10804                         have_425=no
10805                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10806                 fi
10807
10808                 if test $have_k425 = yes ; then
10809                         ol_with_kerberos=found
10810                         ol_link_krb4=yes
10811
10812                         cat >> confdefs.h <<\EOF
10813 #define HAVE_KRB425 1
10814 EOF
10815
10816                         cat >> confdefs.h <<\EOF
10817 #define HAVE_KRB4 1
10818 EOF
10819
10820
10821                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10822 echo "configure:10823: checking for des_debug in Kerberos libraries" >&5
10823 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10824   echo $ac_n "(cached) $ac_c" 1>&6
10825 else
10826   
10827                                                                 save_LIBS="$LIBS"
10828                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10829                                 cat > conftest.$ac_ext <<EOF
10830 #line 10831 "configure"
10831 #include "confdefs.h"
10832
10833 #include <kerberosIV/krb.h>
10834 #include <kerberosIV/des.h>
10835 extern int des_debug;
10836
10837 int main() {
10838
10839 des_debug = 1;
10840
10841 ; return 0; }
10842 EOF
10843 if { (eval echo configure:10844: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10844   rm -rf conftest*
10845   ol_cv_var_des_debug=yes
10846 else
10847   echo "configure: failed program was:" >&5
10848   cat conftest.$ac_ext >&5
10849   rm -rf conftest*
10850   ol_cv_var_des_debug=no
10851 fi
10852 rm -f conftest*
10853                                                                 LIBS="$save_LIBS"
10854                         
10855 fi
10856
10857 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10858
10859                         if test $ol_cv_var_des_debug = yes ; then
10860                                 cat >> confdefs.h <<\EOF
10861 #define HAVE_DES_DEBUG 1
10862 EOF
10863
10864                         fi
10865
10866                         LIBS="$save_LIBS"
10867                 fi
10868         fi
10869 fi
10870
10871 if test $ol_link_krb5 = yes ; then
10872         ol_with_kerberos=found
10873 fi
10874
10875 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10876         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10877
10878         for ac_hdr in krb.h des.h krb-archaeology.h 
10879 do
10880 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10881 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10882 echo "configure:10883: checking for $ac_hdr" >&5
10883 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10884   echo $ac_n "(cached) $ac_c" 1>&6
10885 else
10886   cat > conftest.$ac_ext <<EOF
10887 #line 10888 "configure"
10888 #include "confdefs.h"
10889 #include <$ac_hdr>
10890 EOF
10891 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10892 { (eval echo configure:10893: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10893 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10894 if test -z "$ac_err"; then
10895   rm -rf conftest*
10896   eval "ac_cv_header_$ac_safe=yes"
10897 else
10898   echo "$ac_err" >&5
10899   echo "configure: failed program was:" >&5
10900   cat conftest.$ac_ext >&5
10901   rm -rf conftest*
10902   eval "ac_cv_header_$ac_safe=no"
10903 fi
10904 rm -f conftest*
10905 fi
10906 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10907   echo "$ac_t""yes" 1>&6
10908     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10909   cat >> confdefs.h <<EOF
10910 #define $ac_tr_hdr 1
10911 EOF
10912  
10913 else
10914   echo "$ac_t""no" 1>&6
10915 fi
10916 done
10917
10918
10919         if test $ac_cv_header_krb_h = yes ; then
10920                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10921 echo "configure:10922: checking for main in -lkrb" >&5
10922 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10923 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10924   echo $ac_n "(cached) $ac_c" 1>&6
10925 else
10926   ac_save_LIBS="$LIBS"
10927 LIBS="-lkrb -ldes $LIBS"
10928 cat > conftest.$ac_ext <<EOF
10929 #line 10930 "configure"
10930 #include "confdefs.h"
10931
10932 int main() {
10933 main()
10934 ; return 0; }
10935 EOF
10936 if { (eval echo configure:10937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10937   rm -rf conftest*
10938   eval "ac_cv_lib_$ac_lib_var=yes"
10939 else
10940   echo "configure: failed program was:" >&5
10941   cat conftest.$ac_ext >&5
10942   rm -rf conftest*
10943   eval "ac_cv_lib_$ac_lib_var=no"
10944 fi
10945 rm -f conftest*
10946 LIBS="$ac_save_LIBS"
10947
10948 fi
10949 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10950   echo "$ac_t""yes" 1>&6
10951   have_k4=yes
10952 else
10953   echo "$ac_t""no" 1>&6
10954 have_k4=no
10955 fi
10956
10957
10958                 if test $have_k4 = yes ; then
10959                         ol_with_kerberos=found
10960                         ol_link_krb4=yes
10961
10962                         cat >> confdefs.h <<\EOF
10963 #define HAVE_KRB4 1
10964 EOF
10965
10966
10967                         KRB4_LIBS="-lkrb -ldes"
10968
10969                         if test $ac_cv_header_krb_archaeology_h = yes ; then
10970                                 cat >> confdefs.h <<\EOF
10971 #define HAVE_KTH_KERBEROS 1
10972 EOF
10973
10974                         fi
10975                 fi
10976         fi
10977 fi
10978
10979 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
10980         ol_link_kpasswd=yes
10981 fi
10982
10983 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
10984         ol_link_kbind=yes
10985
10986 elif test $ol_enable_kbind = yes ; then
10987         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
10988 fi
10989
10990 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
10991         cat >> confdefs.h <<\EOF
10992 #define HAVE_KERBEROS 1
10993 EOF
10994
10995
10996 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
10997         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
10998 fi
10999
11000 ol_link_tls=no
11001 if test $ol_with_tls != no ; then
11002         for ac_hdr in openssl/ssl.h ssl.h
11003 do
11004 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11005 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11006 echo "configure:11007: checking for $ac_hdr" >&5
11007 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11008   echo $ac_n "(cached) $ac_c" 1>&6
11009 else
11010   cat > conftest.$ac_ext <<EOF
11011 #line 11012 "configure"
11012 #include "confdefs.h"
11013 #include <$ac_hdr>
11014 EOF
11015 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11016 { (eval echo configure:11017: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11017 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11018 if test -z "$ac_err"; then
11019   rm -rf conftest*
11020   eval "ac_cv_header_$ac_safe=yes"
11021 else
11022   echo "$ac_err" >&5
11023   echo "configure: failed program was:" >&5
11024   cat conftest.$ac_ext >&5
11025   rm -rf conftest*
11026   eval "ac_cv_header_$ac_safe=no"
11027 fi
11028 rm -f conftest*
11029 fi
11030 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11031   echo "$ac_t""yes" 1>&6
11032     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11033   cat >> confdefs.h <<EOF
11034 #define $ac_tr_hdr 1
11035 EOF
11036  
11037 else
11038   echo "$ac_t""no" 1>&6
11039 fi
11040 done
11041
11042         
11043         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
11044                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11045 echo "configure:11046: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11046 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11047 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11048   echo $ac_n "(cached) $ac_c" 1>&6
11049 else
11050   ac_save_LIBS="$LIBS"
11051 LIBS="-lssl -lcrypto $LIBS"
11052 cat > conftest.$ac_ext <<EOF
11053 #line 11054 "configure"
11054 #include "confdefs.h"
11055 /* Override any gcc2 internal prototype to avoid an error.  */
11056 /* We use char because int might match the return type of a gcc2
11057     builtin and then its argument prototype would still apply.  */
11058 char SSLeay_add_ssl_algorithms();
11059
11060 int main() {
11061 SSLeay_add_ssl_algorithms()
11062 ; return 0; }
11063 EOF
11064 if { (eval echo configure:11065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11065   rm -rf conftest*
11066   eval "ac_cv_lib_$ac_lib_var=yes"
11067 else
11068   echo "configure: failed program was:" >&5
11069   cat conftest.$ac_ext >&5
11070   rm -rf conftest*
11071   eval "ac_cv_lib_$ac_lib_var=no"
11072 fi
11073 rm -f conftest*
11074 LIBS="$ac_save_LIBS"
11075
11076 fi
11077 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11078   echo "$ac_t""yes" 1>&6
11079   have_ssleay=yes
11080                         need_rsaref=no
11081 else
11082   echo "$ac_t""no" 1>&6
11083 have_ssleay=no
11084 fi
11085
11086                         
11087                 if test $have_ssleay = no ; then
11088                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11089 echo "configure:11090: checking for SSL_library_init in -lssl" >&5
11090 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11091 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11092   echo $ac_n "(cached) $ac_c" 1>&6
11093 else
11094   ac_save_LIBS="$LIBS"
11095 LIBS="-lssl -lcrypto $LIBS"
11096 cat > conftest.$ac_ext <<EOF
11097 #line 11098 "configure"
11098 #include "confdefs.h"
11099 /* Override any gcc2 internal prototype to avoid an error.  */
11100 /* We use char because int might match the return type of a gcc2
11101     builtin and then its argument prototype would still apply.  */
11102 char SSL_library_init();
11103
11104 int main() {
11105 SSL_library_init()
11106 ; return 0; }
11107 EOF
11108 if { (eval echo configure:11109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11109   rm -rf conftest*
11110   eval "ac_cv_lib_$ac_lib_var=yes"
11111 else
11112   echo "configure: failed program was:" >&5
11113   cat conftest.$ac_ext >&5
11114   rm -rf conftest*
11115   eval "ac_cv_lib_$ac_lib_var=no"
11116 fi
11117 rm -f conftest*
11118 LIBS="$ac_save_LIBS"
11119
11120 fi
11121 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11122   echo "$ac_t""yes" 1>&6
11123   have_ssleay=yes
11124                                 need_rsaref=no
11125 else
11126   echo "$ac_t""no" 1>&6
11127 have_ssleay=no
11128 fi
11129
11130                 fi
11131
11132                 if test $have_ssleay = no ; then
11133                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11134 echo "configure:11135: checking for ssl3_accept in -lssl" >&5
11135 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11136 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11137   echo $ac_n "(cached) $ac_c" 1>&6
11138 else
11139   ac_save_LIBS="$LIBS"
11140 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11141 cat > conftest.$ac_ext <<EOF
11142 #line 11143 "configure"
11143 #include "confdefs.h"
11144 /* Override any gcc2 internal prototype to avoid an error.  */
11145 /* We use char because int might match the return type of a gcc2
11146     builtin and then its argument prototype would still apply.  */
11147 char ssl3_accept();
11148
11149 int main() {
11150 ssl3_accept()
11151 ; return 0; }
11152 EOF
11153 if { (eval echo configure:11154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11154   rm -rf conftest*
11155   eval "ac_cv_lib_$ac_lib_var=yes"
11156 else
11157   echo "configure: failed program was:" >&5
11158   cat conftest.$ac_ext >&5
11159   rm -rf conftest*
11160   eval "ac_cv_lib_$ac_lib_var=no"
11161 fi
11162 rm -f conftest*
11163 LIBS="$ac_save_LIBS"
11164
11165 fi
11166 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11167   echo "$ac_t""yes" 1>&6
11168   have_ssleay=yes
11169                                 need_rsaref=yes
11170 else
11171   echo "$ac_t""no" 1>&6
11172 have_ssleay=no
11173 fi
11174
11175                 fi
11176
11177                 if test $have_ssleay = yes ; then
11178                         ol_with_tls=found
11179                         ol_link_tls=yes
11180
11181                         cat >> confdefs.h <<\EOF
11182 #define HAVE_SSLEAY 1
11183 EOF
11184
11185
11186                         if test $need_rsaref = yes; then
11187                                 cat >> confdefs.h <<\EOF
11188 #define HAVE_RSAREF 1
11189 EOF
11190
11191
11192                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11193                         else
11194                                 TLS_LIBS="-lssl -lcrypto"
11195                         fi
11196                 fi
11197         fi
11198
11199 else
11200         echo "configure: warning: TLS data protection not supported!" 1>&2
11201 fi
11202
11203 if test $ol_link_tls = yes ; then
11204         cat >> confdefs.h <<\EOF
11205 #define HAVE_TLS 1
11206 EOF
11207
11208
11209 elif test $ol_with_tls = auto ; then
11210         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11211         echo "configure: warning: TLS data protection not supported!" 1>&2
11212
11213 elif test $ol_with_tls != no ; then
11214         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11215 fi
11216
11217 if test $ol_enable_lmpasswd != no; then
11218         if test $ol_link_tls != yes ; then
11219                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11220         fi
11221
11222         cat >> confdefs.h <<\EOF
11223 #define SLAPD_LMHASH 1
11224 EOF
11225
11226 fi
11227
11228 for ac_func in \
11229         ctime_r                 \
11230         gethostbyname_r gethostbyaddr_r \
11231
11232 do
11233 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11234 echo "configure:11235: checking for $ac_func" >&5
11235 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11236   echo $ac_n "(cached) $ac_c" 1>&6
11237 else
11238   cat > conftest.$ac_ext <<EOF
11239 #line 11240 "configure"
11240 #include "confdefs.h"
11241 /* System header to define __stub macros and hopefully few prototypes,
11242     which can conflict with char $ac_func(); below.  */
11243 #include <assert.h>
11244 /* Override any gcc2 internal prototype to avoid an error.  */
11245 /* We use char because int might match the return type of a gcc2
11246     builtin and then its argument prototype would still apply.  */
11247 char $ac_func();
11248 char (*f)();
11249
11250 int main() {
11251
11252 /* The GNU C library defines this for functions which it implements
11253     to always fail with ENOSYS.  Some functions are actually named
11254     something starting with __ and the normal name is an alias.  */
11255 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11256 choke me
11257 #else
11258 f = $ac_func;
11259 #endif
11260
11261 ; return 0; }
11262 EOF
11263 if { (eval echo configure:11264: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11264   rm -rf conftest*
11265   eval "ac_cv_func_$ac_func=yes"
11266 else
11267   echo "configure: failed program was:" >&5
11268   cat conftest.$ac_ext >&5
11269   rm -rf conftest*
11270   eval "ac_cv_func_$ac_func=no"
11271 fi
11272 rm -f conftest*
11273 fi
11274
11275 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11276   echo "$ac_t""yes" 1>&6
11277     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11278   cat >> confdefs.h <<EOF
11279 #define $ac_tr_func 1
11280 EOF
11281  
11282 else
11283   echo "$ac_t""no" 1>&6
11284 fi
11285 done
11286
11287
11288 if test "$ac_cv_func_ctime_r" = no ; then
11289         ol_cv_func_ctime_r_nargs=0
11290 else
11291         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11292 echo "configure:11293: checking number of arguments of ctime_r" >&5
11293 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11294   echo $ac_n "(cached) $ac_c" 1>&6
11295 else
11296   cat > conftest.$ac_ext <<EOF
11297 #line 11298 "configure"
11298 #include "confdefs.h"
11299 #include <time.h>
11300 int main() {
11301 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11302 ; return 0; }
11303 EOF
11304 if { (eval echo configure:11305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11305   rm -rf conftest*
11306   ol_cv_func_ctime_r_nargs3=yes
11307 else
11308   echo "configure: failed program was:" >&5
11309   cat conftest.$ac_ext >&5
11310   rm -rf conftest*
11311   ol_cv_func_ctime_r_nargs3=no
11312 fi
11313 rm -f conftest*
11314
11315         cat > conftest.$ac_ext <<EOF
11316 #line 11317 "configure"
11317 #include "confdefs.h"
11318 #include <time.h>
11319 int main() {
11320 time_t ti; char *buffer; ctime_r(&ti,buffer);
11321 ; return 0; }
11322 EOF
11323 if { (eval echo configure:11324: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11324   rm -rf conftest*
11325   ol_cv_func_ctime_r_nargs2=yes
11326 else
11327   echo "configure: failed program was:" >&5
11328   cat conftest.$ac_ext >&5
11329   rm -rf conftest*
11330   ol_cv_func_ctime_r_nargs2=no
11331 fi
11332 rm -f conftest*
11333
11334         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11335                 $ol_cv_func_ctime_r_nargs2 = no ; then
11336
11337                 ol_cv_func_ctime_r_nargs=3
11338
11339         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11340                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11341
11342                 ol_cv_func_ctime_r_nargs=2
11343
11344         else
11345                 ol_cv_func_ctime_r_nargs=0
11346         fi
11347   
11348 fi
11349
11350 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11351
11352   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11353         cat >> confdefs.h <<EOF
11354 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11355 EOF
11356
11357   fi
11358
11359 fi
11360
11361 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11362         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11363 echo "configure:11364: checking number of arguments of gethostbyname_r" >&5
11364 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11365   echo $ac_n "(cached) $ac_c" 1>&6
11366 else
11367   cat > conftest.$ac_ext <<EOF
11368 #line 11369 "configure"
11369 #include "confdefs.h"
11370 #include <sys/types.h>
11371 #include <sys/socket.h>
11372 #include <netinet/in.h>
11373 #include <netdb.h>
11374 #define BUFSIZE (sizeof(struct hostent)+10)
11375 int main() {
11376 struct hostent hent; char buffer[BUFSIZE];
11377                 int bufsize=BUFSIZE;int h_errno;
11378                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11379                         buffer, bufsize, &h_errno);
11380 ; return 0; }
11381 EOF
11382 if { (eval echo configure:11383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11383   rm -rf conftest*
11384   ol_cv_func_gethostbyname_r_nargs5=yes
11385 else
11386   echo "configure: failed program was:" >&5
11387   cat conftest.$ac_ext >&5
11388   rm -rf conftest*
11389   ol_cv_func_gethostbyname_r_nargs5=no
11390 fi
11391 rm -f conftest*
11392
11393         cat > conftest.$ac_ext <<EOF
11394 #line 11395 "configure"
11395 #include "confdefs.h"
11396 #include <sys/types.h>
11397 #include <sys/socket.h>
11398 #include <netinet/in.h>
11399 #include <netdb.h>
11400 #define BUFSIZE (sizeof(struct hostent)+10)
11401 int main() {
11402 struct hostent hent;struct hostent *rhent;
11403                 char buffer[BUFSIZE];
11404                 int bufsize=BUFSIZE;int h_errno;
11405                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11406                         &rhent, &h_errno);
11407 ; return 0; }
11408 EOF
11409 if { (eval echo configure:11410: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11410   rm -rf conftest*
11411   ol_cv_func_gethostbyname_r_nargs6=yes
11412 else
11413   echo "configure: failed program was:" >&5
11414   cat conftest.$ac_ext >&5
11415   rm -rf conftest*
11416   ol_cv_func_gethostbyname_r_nargs6=no
11417 fi
11418 rm -f conftest*
11419
11420         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11421                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11422
11423                 ol_cv_func_gethostbyname_r_nargs=5
11424
11425         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11426                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11427
11428                 ol_cv_func_gethostbyname_r_nargs=6
11429
11430         else
11431                 ol_cv_func_gethostbyname_r_nargs=0
11432         fi
11433   
11434 fi
11435
11436 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11437   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11438         cat >> confdefs.h <<EOF
11439 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11440 EOF
11441
11442   fi
11443
11444 else
11445         ol_cv_func_gethostbyname_r_nargs=0
11446 fi
11447  
11448 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11449         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11450 echo "configure:11451: checking number of arguments of gethostbyaddr_r" >&5
11451 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11452   echo $ac_n "(cached) $ac_c" 1>&6
11453 else
11454   cat > conftest.$ac_ext <<EOF
11455 #line 11456 "configure"
11456 #include "confdefs.h"
11457 #include <sys/types.h>
11458 #include <sys/socket.h>
11459 #include <netinet/in.h>
11460 #include <netdb.h>
11461 #define BUFSIZE (sizeof(struct hostent)+10)
11462 int main() {
11463 struct hostent hent; char buffer[BUFSIZE]; 
11464             struct in_addr add;
11465             size_t alen=sizeof(struct in_addr);
11466             int bufsize=BUFSIZE;int h_errno;
11467                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11468                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11469 ; return 0; }
11470 EOF
11471 if { (eval echo configure:11472: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11472   rm -rf conftest*
11473   ol_cv_func_gethostbyaddr_r_nargs7=yes
11474 else
11475   echo "configure: failed program was:" >&5
11476   cat conftest.$ac_ext >&5
11477   rm -rf conftest*
11478   ol_cv_func_gethostbyaddr_r_nargs7=no
11479 fi
11480 rm -f conftest*
11481
11482         cat > conftest.$ac_ext <<EOF
11483 #line 11484 "configure"
11484 #include "confdefs.h"
11485 #include <sys/types.h>
11486 #include <sys/socket.h>
11487 #include <netinet/in.h>
11488 #include <netdb.h>
11489 #define BUFSIZE (sizeof(struct hostent)+10)
11490 int main() {
11491 struct hostent hent;
11492                 struct hostent *rhent; char buffer[BUFSIZE]; 
11493                 struct in_addr add;
11494                 size_t alen=sizeof(struct in_addr);
11495                 int bufsize=BUFSIZE;int h_errno;
11496                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11497                         alen, AF_INET, &hent, buffer, bufsize, 
11498                         &rhent, &h_errno);
11499 ; return 0; }
11500 EOF
11501 if { (eval echo configure:11502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11502   rm -rf conftest*
11503   ol_cv_func_gethostbyaddr_r_nargs8=yes
11504 else
11505   echo "configure: failed program was:" >&5
11506   cat conftest.$ac_ext >&5
11507   rm -rf conftest*
11508   ol_cv_func_gethostbyaddr_r_nargs8=no
11509 fi
11510 rm -f conftest*
11511
11512         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11513                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11514
11515                 ol_cv_func_gethostbyaddr_r_nargs=7
11516
11517         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11518                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11519
11520                 ol_cv_func_gethostbyaddr_r_nargs=8
11521
11522         else
11523                 ol_cv_func_gethostbyaddr_r_nargs=0
11524         fi
11525   
11526 fi
11527
11528 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11529   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11530     cat >> confdefs.h <<EOF
11531 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11532 EOF
11533
11534   fi
11535
11536 else
11537         ol_cv_func_gethostbyaddr_r_nargs=0
11538 fi
11539
11540 if test "$ac_cv_func_ctime_r" = yes \
11541         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11542         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11543         -a "$ac_cv_func_gethostbyname_r" = yes \
11544         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11545         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11546         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11547         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11548         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11549         ; then
11550  
11551         cat >> confdefs.h <<\EOF
11552 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11553 EOF
11554
11555 fi
11556
11557 ol_link_threads=no
11558
11559 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11560         -o $ol_with_threads = nt ; then
11561
11562         
11563         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11564 echo "configure:11565: checking for _beginthread" >&5
11565 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11566   echo $ac_n "(cached) $ac_c" 1>&6
11567 else
11568   cat > conftest.$ac_ext <<EOF
11569 #line 11570 "configure"
11570 #include "confdefs.h"
11571 /* System header to define __stub macros and hopefully few prototypes,
11572     which can conflict with char _beginthread(); below.  */
11573 #include <assert.h>
11574 /* Override any gcc2 internal prototype to avoid an error.  */
11575 /* We use char because int might match the return type of a gcc2
11576     builtin and then its argument prototype would still apply.  */
11577 char _beginthread();
11578 char (*f)();
11579
11580 int main() {
11581
11582 /* The GNU C library defines this for functions which it implements
11583     to always fail with ENOSYS.  Some functions are actually named
11584     something starting with __ and the normal name is an alias.  */
11585 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11586 choke me
11587 #else
11588 f = _beginthread;
11589 #endif
11590
11591 ; return 0; }
11592 EOF
11593 if { (eval echo configure:11594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11594   rm -rf conftest*
11595   eval "ac_cv_func__beginthread=yes"
11596 else
11597   echo "configure: failed program was:" >&5
11598   cat conftest.$ac_ext >&5
11599   rm -rf conftest*
11600   eval "ac_cv_func__beginthread=no"
11601 fi
11602 rm -f conftest*
11603 fi
11604
11605 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11606   echo "$ac_t""yes" 1>&6
11607   :
11608 else
11609   echo "$ac_t""no" 1>&6
11610 fi
11611
11612
11613         if test $ac_cv_func__beginthread = yes ; then
11614                 cat >> confdefs.h <<\EOF
11615 #define HAVE_NT_THREADS 1
11616 EOF
11617
11618                 ol_cv_nt_threads=yes
11619         fi
11620
11621
11622         if test "$ol_cv_nt_threads" = yes ; then
11623                 ol_link_threads=nt
11624                 ol_with_threads=found
11625                 ol_with_yielding_select=yes
11626
11627                 cat >> confdefs.h <<\EOF
11628 #define HAVE_NT_SERVICE_MANAGER 1
11629 EOF
11630
11631                 cat >> confdefs.h <<\EOF
11632 #define HAVE_NT_EVENT_LOG 1
11633 EOF
11634
11635         fi
11636
11637         if test $ol_with_threads = nt ; then
11638                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11639         fi
11640 fi
11641
11642 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11643         -o $ol_with_threads = posix ; then
11644
11645         for ac_hdr in pthread.h
11646 do
11647 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11648 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11649 echo "configure:11650: checking for $ac_hdr" >&5
11650 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11651   echo $ac_n "(cached) $ac_c" 1>&6
11652 else
11653   cat > conftest.$ac_ext <<EOF
11654 #line 11655 "configure"
11655 #include "confdefs.h"
11656 #include <$ac_hdr>
11657 EOF
11658 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11659 { (eval echo configure:11660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11660 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11661 if test -z "$ac_err"; then
11662   rm -rf conftest*
11663   eval "ac_cv_header_$ac_safe=yes"
11664 else
11665   echo "$ac_err" >&5
11666   echo "configure: failed program was:" >&5
11667   cat conftest.$ac_ext >&5
11668   rm -rf conftest*
11669   eval "ac_cv_header_$ac_safe=no"
11670 fi
11671 rm -f conftest*
11672 fi
11673 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11674   echo "$ac_t""yes" 1>&6
11675     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11676   cat >> confdefs.h <<EOF
11677 #define $ac_tr_hdr 1
11678 EOF
11679  
11680 else
11681   echo "$ac_t""no" 1>&6
11682 fi
11683 done
11684
11685
11686         if test $ac_cv_header_pthread_h = yes ; then
11687                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11688 echo "configure:11689: checking POSIX thread version" >&5
11689 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11690   echo $ac_n "(cached) $ac_c" 1>&6
11691 else
11692   
11693         cat > conftest.$ac_ext <<EOF
11694 #line 11695 "configure"
11695 #include "confdefs.h"
11696
11697 #               include <pthread.h>
11698                 /* this check could be improved */
11699 #               ifdef PTHREAD_ONCE_INIT
11700                         pthread_version_final;
11701 #               endif
11702         
11703 EOF
11704 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11705   egrep "pthread_version_final" >/dev/null 2>&1; then
11706   rm -rf conftest*
11707   ol_pthread_final=yes
11708 else
11709   rm -rf conftest*
11710   ol_pthread_final=no
11711 fi
11712 rm -f conftest*
11713
11714
11715         cat > conftest.$ac_ext <<EOF
11716 #line 11717 "configure"
11717 #include "confdefs.h"
11718
11719 #               include <pthread.h>
11720                 /* this check could be improved */
11721 #               ifdef pthread_once_init
11722                         pthread_version_draft4;
11723 #               endif
11724         
11725 EOF
11726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11727   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11728   rm -rf conftest*
11729   ol_pthread_draft4=yes
11730 else
11731   rm -rf conftest*
11732   ol_pthread_draft4=no
11733 fi
11734 rm -f conftest*
11735
11736
11737         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11738                 ol_cv_pthread_version=final
11739         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11740                 ol_cv_pthread_version=draft4
11741         else
11742                 ol_cv_pthread_version=unknown
11743         fi
11744
11745 fi
11746
11747 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11748
11749
11750                 if test $ol_cv_pthread_version = final ; then
11751                         cat >> confdefs.h <<\EOF
11752 #define HAVE_PTHREADS_FINAL 1
11753 EOF
11754
11755                 elif test $ol_cv_pthread_version = draft4 ; then
11756                         cat >> confdefs.h <<\EOF
11757 #define HAVE_PTHREADS_D4 1
11758 EOF
11759
11760                 else
11761                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11762                 fi
11763
11764                 # consider threads found
11765                 ol_with_threads=found
11766
11767                 
11768         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11769 echo "configure:11770: checking for LinuxThreads pthread.h" >&5
11770 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11771   echo $ac_n "(cached) $ac_c" 1>&6
11772 else
11773   cat > conftest.$ac_ext <<EOF
11774 #line 11775 "configure"
11775 #include "confdefs.h"
11776 #include <pthread.h>
11777 EOF
11778 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11779   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11780   rm -rf conftest*
11781   ol_cv_header_linux_threads=yes
11782 else
11783   rm -rf conftest*
11784   ol_cv_header_linux_threads=no
11785 fi
11786 rm -f conftest*
11787
11788                 
11789 fi
11790
11791 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11792         if test $ol_cv_header_linux_threads = yes; then
11793                 cat >> confdefs.h <<\EOF
11794 #define HAVE_LINUX_THREADS 1
11795 EOF
11796
11797         fi
11798
11799                 
11800         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11801 echo "configure:11802: checking for GNU Pth pthread.h" >&5
11802 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11803   echo $ac_n "(cached) $ac_c" 1>&6
11804 else
11805   cat > conftest.$ac_ext <<EOF
11806 #line 11807 "configure"
11807 #include "confdefs.h"
11808 #include <pthread.h>
11809 #ifdef _POSIX_THREAD_IS_GNU_PTH
11810         __gnu_pth__;
11811 #endif
11812
11813 EOF
11814 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11815   egrep "__gnu_pth__" >/dev/null 2>&1; then
11816   rm -rf conftest*
11817   ol_cv_header_gnu_pth_pthread_h=yes
11818 else
11819   rm -rf conftest*
11820   ol_cv_header_gnu_pth_pthread_h=no
11821 fi
11822 rm -f conftest*
11823
11824                 
11825 fi
11826
11827 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11828
11829
11830                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11831                         for ac_hdr in sched.h
11832 do
11833 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11834 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11835 echo "configure:11836: checking for $ac_hdr" >&5
11836 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11837   echo $ac_n "(cached) $ac_c" 1>&6
11838 else
11839   cat > conftest.$ac_ext <<EOF
11840 #line 11841 "configure"
11841 #include "confdefs.h"
11842 #include <$ac_hdr>
11843 EOF
11844 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11845 { (eval echo configure:11846: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11846 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11847 if test -z "$ac_err"; then
11848   rm -rf conftest*
11849   eval "ac_cv_header_$ac_safe=yes"
11850 else
11851   echo "$ac_err" >&5
11852   echo "configure: failed program was:" >&5
11853   cat conftest.$ac_ext >&5
11854   rm -rf conftest*
11855   eval "ac_cv_header_$ac_safe=no"
11856 fi
11857 rm -f conftest*
11858 fi
11859 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11860   echo "$ac_t""yes" 1>&6
11861     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11862   cat >> confdefs.h <<EOF
11863 #define $ac_tr_hdr 1
11864 EOF
11865  
11866 else
11867   echo "$ac_t""no" 1>&6
11868 fi
11869 done
11870
11871                 fi
11872
11873                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11874                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11875 echo "configure:11876: checking for pthread_create in default libraries" >&5
11876 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11877   echo $ac_n "(cached) $ac_c" 1>&6
11878 else
11879   
11880                 if test "$cross_compiling" = yes; then
11881   cat > conftest.$ac_ext <<EOF
11882 #line 11883 "configure"
11883 #include "confdefs.h"
11884 /* pthread test headers */
11885 #include <pthread.h>
11886 #ifndef NULL
11887 #define NULL (void*)0
11888 #endif
11889
11890 static void *task(p)
11891         void *p;
11892 {
11893         return (void *) (p == NULL);
11894 }
11895
11896 int main() {
11897
11898         /* pthread test function */
11899         pthread_t t;
11900         int status;
11901         int detach = 1;
11902
11903 #ifdef HAVE_PTHREADS_FINAL
11904         /* Final pthreads */
11905         pthread_attr_t attr;
11906
11907         status = pthread_attr_init(&attr);
11908         if( status ) return status;
11909
11910 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11911         if( !detach ) {
11912 #if defined( PTHREAD_CREATE_JOINABLE )
11913                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11914 #else
11915                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11916 #endif
11917
11918 #ifdef PTHREAD_CREATE_DETACHED
11919         } else {
11920                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11921 #endif
11922         }
11923         if( status ) return status;
11924 #endif
11925
11926         status = pthread_create( &t, &attr, task, NULL );
11927         if( status ) return status;
11928
11929 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11930         if( detach ) {
11931                 /* give thread a chance to complete */
11932                 /* it should remain joinable and hence detachable */
11933                 sleep( 1 );
11934
11935                 status = pthread_detach( t );
11936                 if( status ) return status;
11937         }
11938 #endif
11939
11940 #else
11941         /* Draft 4 pthreads */
11942         status = pthread_create( &t, pthread_attr_default, task, NULL );
11943         if( status ) return status;
11944
11945         if( detach ) {
11946                 /* give thread a chance to complete */
11947                 /* it should remain joinable and hence detachable */
11948                 sleep( 1 );
11949
11950                 status = pthread_detach( &t );
11951                 if( status ) return status;
11952         }
11953 #endif
11954
11955 #ifdef HAVE_LINUX_THREADS
11956         pthread_kill_other_threads_np();
11957 #endif
11958
11959         return 0;
11960
11961 ; return 0; }
11962 EOF
11963 if { (eval echo configure:11964: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11964   rm -rf conftest*
11965   ol_cv_pthread_create=yes
11966 else
11967   echo "configure: failed program was:" >&5
11968   cat conftest.$ac_ext >&5
11969   rm -rf conftest*
11970   ol_cv_pthread_create=no
11971 fi
11972 rm -f conftest*
11973 else
11974   cat > conftest.$ac_ext <<EOF
11975 #line 11976 "configure"
11976 #include "confdefs.h"
11977 /* pthread test headers */
11978 #include <pthread.h>
11979 #ifndef NULL
11980 #define NULL (void*)0
11981 #endif
11982
11983 static void *task(p)
11984         void *p;
11985 {
11986         return (void *) (p == NULL);
11987 }
11988
11989
11990 int main(argc, argv)
11991         int argc;
11992         char **argv;
11993 {
11994
11995         /* pthread test function */
11996         pthread_t t;
11997         int status;
11998         int detach = 1;
11999
12000 #ifdef HAVE_PTHREADS_FINAL
12001         /* Final pthreads */
12002         pthread_attr_t attr;
12003
12004         status = pthread_attr_init(&attr);
12005         if( status ) return status;
12006
12007 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12008         if( !detach ) {
12009 #if defined( PTHREAD_CREATE_JOINABLE )
12010                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12011 #else
12012                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12013 #endif
12014
12015 #ifdef PTHREAD_CREATE_DETACHED
12016         } else {
12017                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12018 #endif
12019         }
12020         if( status ) return status;
12021 #endif
12022
12023         status = pthread_create( &t, &attr, task, NULL );
12024         if( status ) return status;
12025
12026 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12027         if( detach ) {
12028                 /* give thread a chance to complete */
12029                 /* it should remain joinable and hence detachable */
12030                 sleep( 1 );
12031
12032                 status = pthread_detach( t );
12033                 if( status ) return status;
12034         }
12035 #endif
12036
12037 #else
12038         /* Draft 4 pthreads */
12039         status = pthread_create( &t, pthread_attr_default, task, NULL );
12040         if( status ) return status;
12041
12042         if( detach ) {
12043                 /* give thread a chance to complete */
12044                 /* it should remain joinable and hence detachable */
12045                 sleep( 1 );
12046
12047                 status = pthread_detach( &t );
12048                 if( status ) return status;
12049         }
12050 #endif
12051
12052 #ifdef HAVE_LINUX_THREADS
12053         pthread_kill_other_threads_np();
12054 #endif
12055
12056         return 0;
12057
12058 }
12059
12060 EOF
12061 if { (eval echo configure:12062: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12062 then
12063   ol_cv_pthread_create=yes
12064 else
12065   echo "configure: failed program was:" >&5
12066   cat conftest.$ac_ext >&5
12067   rm -fr conftest*
12068   ol_cv_pthread_create=no
12069 fi
12070 rm -fr conftest*
12071 fi
12072
12073 fi
12074
12075 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12076
12077                 if test $ol_cv_pthread_create != no ; then
12078                         ol_link_threads=posix
12079                         ol_link_pthreads=""
12080                 fi
12081                 
12082                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12083 if test "$ol_link_threads" = no ; then
12084         # try -kthread
12085         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12086 echo "configure:12087: checking for pthread link with -kthread" >&5
12087 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12088   echo $ac_n "(cached) $ac_c" 1>&6
12089 else
12090   
12091                 # save the flags
12092                 ol_LIBS="$LIBS"
12093                 LIBS="-kthread $LIBS"
12094
12095                 if test "$cross_compiling" = yes; then
12096   cat > conftest.$ac_ext <<EOF
12097 #line 12098 "configure"
12098 #include "confdefs.h"
12099 /* pthread test headers */
12100 #include <pthread.h>
12101 #ifndef NULL
12102 #define NULL (void*)0
12103 #endif
12104
12105 static void *task(p)
12106         void *p;
12107 {
12108         return (void *) (p == NULL);
12109 }
12110
12111 int main() {
12112
12113         /* pthread test function */
12114         pthread_t t;
12115         int status;
12116         int detach = 1;
12117
12118 #ifdef HAVE_PTHREADS_FINAL
12119         /* Final pthreads */
12120         pthread_attr_t attr;
12121
12122         status = pthread_attr_init(&attr);
12123         if( status ) return status;
12124
12125 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12126         if( !detach ) {
12127 #if defined( PTHREAD_CREATE_JOINABLE )
12128                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12129 #else
12130                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12131 #endif
12132
12133 #ifdef PTHREAD_CREATE_DETACHED
12134         } else {
12135                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12136 #endif
12137         }
12138         if( status ) return status;
12139 #endif
12140
12141         status = pthread_create( &t, &attr, task, NULL );
12142         if( status ) return status;
12143
12144 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12145         if( detach ) {
12146                 /* give thread a chance to complete */
12147                 /* it should remain joinable and hence detachable */
12148                 sleep( 1 );
12149
12150                 status = pthread_detach( t );
12151                 if( status ) return status;
12152         }
12153 #endif
12154
12155 #else
12156         /* Draft 4 pthreads */
12157         status = pthread_create( &t, pthread_attr_default, task, NULL );
12158         if( status ) return status;
12159
12160         if( detach ) {
12161                 /* give thread a chance to complete */
12162                 /* it should remain joinable and hence detachable */
12163                 sleep( 1 );
12164
12165                 status = pthread_detach( &t );
12166                 if( status ) return status;
12167         }
12168 #endif
12169
12170 #ifdef HAVE_LINUX_THREADS
12171         pthread_kill_other_threads_np();
12172 #endif
12173
12174         return 0;
12175
12176 ; return 0; }
12177 EOF
12178 if { (eval echo configure:12179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12179   rm -rf conftest*
12180   ol_cv_pthread_kthread=yes
12181 else
12182   echo "configure: failed program was:" >&5
12183   cat conftest.$ac_ext >&5
12184   rm -rf conftest*
12185   ol_cv_pthread_kthread=no
12186 fi
12187 rm -f conftest*
12188 else
12189   cat > conftest.$ac_ext <<EOF
12190 #line 12191 "configure"
12191 #include "confdefs.h"
12192 /* pthread test headers */
12193 #include <pthread.h>
12194 #ifndef NULL
12195 #define NULL (void*)0
12196 #endif
12197
12198 static void *task(p)
12199         void *p;
12200 {
12201         return (void *) (p == NULL);
12202 }
12203
12204
12205 int main(argc, argv)
12206         int argc;
12207         char **argv;
12208 {
12209
12210         /* pthread test function */
12211         pthread_t t;
12212         int status;
12213         int detach = 1;
12214
12215 #ifdef HAVE_PTHREADS_FINAL
12216         /* Final pthreads */
12217         pthread_attr_t attr;
12218
12219         status = pthread_attr_init(&attr);
12220         if( status ) return status;
12221
12222 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12223         if( !detach ) {
12224 #if defined( PTHREAD_CREATE_JOINABLE )
12225                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12226 #else
12227                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12228 #endif
12229
12230 #ifdef PTHREAD_CREATE_DETACHED
12231         } else {
12232                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12233 #endif
12234         }
12235         if( status ) return status;
12236 #endif
12237
12238         status = pthread_create( &t, &attr, task, NULL );
12239         if( status ) return status;
12240
12241 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12242         if( detach ) {
12243                 /* give thread a chance to complete */
12244                 /* it should remain joinable and hence detachable */
12245                 sleep( 1 );
12246
12247                 status = pthread_detach( t );
12248                 if( status ) return status;
12249         }
12250 #endif
12251
12252 #else
12253         /* Draft 4 pthreads */
12254         status = pthread_create( &t, pthread_attr_default, task, NULL );
12255         if( status ) return status;
12256
12257         if( detach ) {
12258                 /* give thread a chance to complete */
12259                 /* it should remain joinable and hence detachable */
12260                 sleep( 1 );
12261
12262                 status = pthread_detach( &t );
12263                 if( status ) return status;
12264         }
12265 #endif
12266
12267 #ifdef HAVE_LINUX_THREADS
12268         pthread_kill_other_threads_np();
12269 #endif
12270
12271         return 0;
12272
12273 }
12274
12275 EOF
12276 if { (eval echo configure:12277: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12277 then
12278   ol_cv_pthread_kthread=yes
12279 else
12280   echo "configure: failed program was:" >&5
12281   cat conftest.$ac_ext >&5
12282   rm -fr conftest*
12283   ol_cv_pthread_kthread=no
12284 fi
12285 rm -fr conftest*
12286 fi
12287
12288
12289                 # restore the LIBS
12290                 LIBS="$ol_LIBS"
12291         
12292 fi
12293
12294 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12295
12296         if test $ol_cv_pthread_kthread = yes ; then
12297                 ol_link_pthreads="-kthread"
12298                 ol_link_threads=posix
12299         fi
12300 fi
12301
12302                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12303 if test "$ol_link_threads" = no ; then
12304         # try -pthread
12305         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12306 echo "configure:12307: checking for pthread link with -pthread" >&5
12307 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12308   echo $ac_n "(cached) $ac_c" 1>&6
12309 else
12310   
12311                 # save the flags
12312                 ol_LIBS="$LIBS"
12313                 LIBS="-pthread $LIBS"
12314
12315                 if test "$cross_compiling" = yes; then
12316   cat > conftest.$ac_ext <<EOF
12317 #line 12318 "configure"
12318 #include "confdefs.h"
12319 /* pthread test headers */
12320 #include <pthread.h>
12321 #ifndef NULL
12322 #define NULL (void*)0
12323 #endif
12324
12325 static void *task(p)
12326         void *p;
12327 {
12328         return (void *) (p == NULL);
12329 }
12330
12331 int main() {
12332
12333         /* pthread test function */
12334         pthread_t t;
12335         int status;
12336         int detach = 1;
12337
12338 #ifdef HAVE_PTHREADS_FINAL
12339         /* Final pthreads */
12340         pthread_attr_t attr;
12341
12342         status = pthread_attr_init(&attr);
12343         if( status ) return status;
12344
12345 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12346         if( !detach ) {
12347 #if defined( PTHREAD_CREATE_JOINABLE )
12348                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12349 #else
12350                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12351 #endif
12352
12353 #ifdef PTHREAD_CREATE_DETACHED
12354         } else {
12355                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12356 #endif
12357         }
12358         if( status ) return status;
12359 #endif
12360
12361         status = pthread_create( &t, &attr, task, NULL );
12362         if( status ) return status;
12363
12364 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12365         if( detach ) {
12366                 /* give thread a chance to complete */
12367                 /* it should remain joinable and hence detachable */
12368                 sleep( 1 );
12369
12370                 status = pthread_detach( t );
12371                 if( status ) return status;
12372         }
12373 #endif
12374
12375 #else
12376         /* Draft 4 pthreads */
12377         status = pthread_create( &t, pthread_attr_default, task, NULL );
12378         if( status ) return status;
12379
12380         if( detach ) {
12381                 /* give thread a chance to complete */
12382                 /* it should remain joinable and hence detachable */
12383                 sleep( 1 );
12384
12385                 status = pthread_detach( &t );
12386                 if( status ) return status;
12387         }
12388 #endif
12389
12390 #ifdef HAVE_LINUX_THREADS
12391         pthread_kill_other_threads_np();
12392 #endif
12393
12394         return 0;
12395
12396 ; return 0; }
12397 EOF
12398 if { (eval echo configure:12399: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12399   rm -rf conftest*
12400   ol_cv_pthread_pthread=yes
12401 else
12402   echo "configure: failed program was:" >&5
12403   cat conftest.$ac_ext >&5
12404   rm -rf conftest*
12405   ol_cv_pthread_pthread=no
12406 fi
12407 rm -f conftest*
12408 else
12409   cat > conftest.$ac_ext <<EOF
12410 #line 12411 "configure"
12411 #include "confdefs.h"
12412 /* pthread test headers */
12413 #include <pthread.h>
12414 #ifndef NULL
12415 #define NULL (void*)0
12416 #endif
12417
12418 static void *task(p)
12419         void *p;
12420 {
12421         return (void *) (p == NULL);
12422 }
12423
12424
12425 int main(argc, argv)
12426         int argc;
12427         char **argv;
12428 {
12429
12430         /* pthread test function */
12431         pthread_t t;
12432         int status;
12433         int detach = 1;
12434
12435 #ifdef HAVE_PTHREADS_FINAL
12436         /* Final pthreads */
12437         pthread_attr_t attr;
12438
12439         status = pthread_attr_init(&attr);
12440         if( status ) return status;
12441
12442 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12443         if( !detach ) {
12444 #if defined( PTHREAD_CREATE_JOINABLE )
12445                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12446 #else
12447                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12448 #endif
12449
12450 #ifdef PTHREAD_CREATE_DETACHED
12451         } else {
12452                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12453 #endif
12454         }
12455         if( status ) return status;
12456 #endif
12457
12458         status = pthread_create( &t, &attr, task, NULL );
12459         if( status ) return status;
12460
12461 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12462         if( detach ) {
12463                 /* give thread a chance to complete */
12464                 /* it should remain joinable and hence detachable */
12465                 sleep( 1 );
12466
12467                 status = pthread_detach( t );
12468                 if( status ) return status;
12469         }
12470 #endif
12471
12472 #else
12473         /* Draft 4 pthreads */
12474         status = pthread_create( &t, pthread_attr_default, task, NULL );
12475         if( status ) return status;
12476
12477         if( detach ) {
12478                 /* give thread a chance to complete */
12479                 /* it should remain joinable and hence detachable */
12480                 sleep( 1 );
12481
12482                 status = pthread_detach( &t );
12483                 if( status ) return status;
12484         }
12485 #endif
12486
12487 #ifdef HAVE_LINUX_THREADS
12488         pthread_kill_other_threads_np();
12489 #endif
12490
12491         return 0;
12492
12493 }
12494
12495 EOF
12496 if { (eval echo configure:12497: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12497 then
12498   ol_cv_pthread_pthread=yes
12499 else
12500   echo "configure: failed program was:" >&5
12501   cat conftest.$ac_ext >&5
12502   rm -fr conftest*
12503   ol_cv_pthread_pthread=no
12504 fi
12505 rm -fr conftest*
12506 fi
12507
12508
12509                 # restore the LIBS
12510                 LIBS="$ol_LIBS"
12511         
12512 fi
12513
12514 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12515
12516         if test $ol_cv_pthread_pthread = yes ; then
12517                 ol_link_pthreads="-pthread"
12518                 ol_link_threads=posix
12519         fi
12520 fi
12521
12522                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12523 if test "$ol_link_threads" = no ; then
12524         # try -pthreads
12525         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12526 echo "configure:12527: checking for pthread link with -pthreads" >&5
12527 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12528   echo $ac_n "(cached) $ac_c" 1>&6
12529 else
12530   
12531                 # save the flags
12532                 ol_LIBS="$LIBS"
12533                 LIBS="-pthreads $LIBS"
12534
12535                 if test "$cross_compiling" = yes; then
12536   cat > conftest.$ac_ext <<EOF
12537 #line 12538 "configure"
12538 #include "confdefs.h"
12539 /* pthread test headers */
12540 #include <pthread.h>
12541 #ifndef NULL
12542 #define NULL (void*)0
12543 #endif
12544
12545 static void *task(p)
12546         void *p;
12547 {
12548         return (void *) (p == NULL);
12549 }
12550
12551 int main() {
12552
12553         /* pthread test function */
12554         pthread_t t;
12555         int status;
12556         int detach = 1;
12557
12558 #ifdef HAVE_PTHREADS_FINAL
12559         /* Final pthreads */
12560         pthread_attr_t attr;
12561
12562         status = pthread_attr_init(&attr);
12563         if( status ) return status;
12564
12565 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12566         if( !detach ) {
12567 #if defined( PTHREAD_CREATE_JOINABLE )
12568                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12569 #else
12570                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12571 #endif
12572
12573 #ifdef PTHREAD_CREATE_DETACHED
12574         } else {
12575                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12576 #endif
12577         }
12578         if( status ) return status;
12579 #endif
12580
12581         status = pthread_create( &t, &attr, task, NULL );
12582         if( status ) return status;
12583
12584 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12585         if( detach ) {
12586                 /* give thread a chance to complete */
12587                 /* it should remain joinable and hence detachable */
12588                 sleep( 1 );
12589
12590                 status = pthread_detach( t );
12591                 if( status ) return status;
12592         }
12593 #endif
12594
12595 #else
12596         /* Draft 4 pthreads */
12597         status = pthread_create( &t, pthread_attr_default, task, NULL );
12598         if( status ) return status;
12599
12600         if( detach ) {
12601                 /* give thread a chance to complete */
12602                 /* it should remain joinable and hence detachable */
12603                 sleep( 1 );
12604
12605                 status = pthread_detach( &t );
12606                 if( status ) return status;
12607         }
12608 #endif
12609
12610 #ifdef HAVE_LINUX_THREADS
12611         pthread_kill_other_threads_np();
12612 #endif
12613
12614         return 0;
12615
12616 ; return 0; }
12617 EOF
12618 if { (eval echo configure:12619: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12619   rm -rf conftest*
12620   ol_cv_pthread_pthreads=yes
12621 else
12622   echo "configure: failed program was:" >&5
12623   cat conftest.$ac_ext >&5
12624   rm -rf conftest*
12625   ol_cv_pthread_pthreads=no
12626 fi
12627 rm -f conftest*
12628 else
12629   cat > conftest.$ac_ext <<EOF
12630 #line 12631 "configure"
12631 #include "confdefs.h"
12632 /* pthread test headers */
12633 #include <pthread.h>
12634 #ifndef NULL
12635 #define NULL (void*)0
12636 #endif
12637
12638 static void *task(p)
12639         void *p;
12640 {
12641         return (void *) (p == NULL);
12642 }
12643
12644
12645 int main(argc, argv)
12646         int argc;
12647         char **argv;
12648 {
12649
12650         /* pthread test function */
12651         pthread_t t;
12652         int status;
12653         int detach = 1;
12654
12655 #ifdef HAVE_PTHREADS_FINAL
12656         /* Final pthreads */
12657         pthread_attr_t attr;
12658
12659         status = pthread_attr_init(&attr);
12660         if( status ) return status;
12661
12662 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12663         if( !detach ) {
12664 #if defined( PTHREAD_CREATE_JOINABLE )
12665                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12666 #else
12667                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12668 #endif
12669
12670 #ifdef PTHREAD_CREATE_DETACHED
12671         } else {
12672                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12673 #endif
12674         }
12675         if( status ) return status;
12676 #endif
12677
12678         status = pthread_create( &t, &attr, task, NULL );
12679         if( status ) return status;
12680
12681 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12682         if( detach ) {
12683                 /* give thread a chance to complete */
12684                 /* it should remain joinable and hence detachable */
12685                 sleep( 1 );
12686
12687                 status = pthread_detach( t );
12688                 if( status ) return status;
12689         }
12690 #endif
12691
12692 #else
12693         /* Draft 4 pthreads */
12694         status = pthread_create( &t, pthread_attr_default, task, NULL );
12695         if( status ) return status;
12696
12697         if( detach ) {
12698                 /* give thread a chance to complete */
12699                 /* it should remain joinable and hence detachable */
12700                 sleep( 1 );
12701
12702                 status = pthread_detach( &t );
12703                 if( status ) return status;
12704         }
12705 #endif
12706
12707 #ifdef HAVE_LINUX_THREADS
12708         pthread_kill_other_threads_np();
12709 #endif
12710
12711         return 0;
12712
12713 }
12714
12715 EOF
12716 if { (eval echo configure:12717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12717 then
12718   ol_cv_pthread_pthreads=yes
12719 else
12720   echo "configure: failed program was:" >&5
12721   cat conftest.$ac_ext >&5
12722   rm -fr conftest*
12723   ol_cv_pthread_pthreads=no
12724 fi
12725 rm -fr conftest*
12726 fi
12727
12728
12729                 # restore the LIBS
12730                 LIBS="$ol_LIBS"
12731         
12732 fi
12733
12734 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12735
12736         if test $ol_cv_pthread_pthreads = yes ; then
12737                 ol_link_pthreads="-pthreads"
12738                 ol_link_threads=posix
12739         fi
12740 fi
12741
12742                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12743 if test "$ol_link_threads" = no ; then
12744         # try -mthreads
12745         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12746 echo "configure:12747: checking for pthread link with -mthreads" >&5
12747 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12748   echo $ac_n "(cached) $ac_c" 1>&6
12749 else
12750   
12751                 # save the flags
12752                 ol_LIBS="$LIBS"
12753                 LIBS="-mthreads $LIBS"
12754
12755                 if test "$cross_compiling" = yes; then
12756   cat > conftest.$ac_ext <<EOF
12757 #line 12758 "configure"
12758 #include "confdefs.h"
12759 /* pthread test headers */
12760 #include <pthread.h>
12761 #ifndef NULL
12762 #define NULL (void*)0
12763 #endif
12764
12765 static void *task(p)
12766         void *p;
12767 {
12768         return (void *) (p == NULL);
12769 }
12770
12771 int main() {
12772
12773         /* pthread test function */
12774         pthread_t t;
12775         int status;
12776         int detach = 1;
12777
12778 #ifdef HAVE_PTHREADS_FINAL
12779         /* Final pthreads */
12780         pthread_attr_t attr;
12781
12782         status = pthread_attr_init(&attr);
12783         if( status ) return status;
12784
12785 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12786         if( !detach ) {
12787 #if defined( PTHREAD_CREATE_JOINABLE )
12788                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12789 #else
12790                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12791 #endif
12792
12793 #ifdef PTHREAD_CREATE_DETACHED
12794         } else {
12795                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12796 #endif
12797         }
12798         if( status ) return status;
12799 #endif
12800
12801         status = pthread_create( &t, &attr, task, NULL );
12802         if( status ) return status;
12803
12804 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12805         if( detach ) {
12806                 /* give thread a chance to complete */
12807                 /* it should remain joinable and hence detachable */
12808                 sleep( 1 );
12809
12810                 status = pthread_detach( t );
12811                 if( status ) return status;
12812         }
12813 #endif
12814
12815 #else
12816         /* Draft 4 pthreads */
12817         status = pthread_create( &t, pthread_attr_default, task, NULL );
12818         if( status ) return status;
12819
12820         if( detach ) {
12821                 /* give thread a chance to complete */
12822                 /* it should remain joinable and hence detachable */
12823                 sleep( 1 );
12824
12825                 status = pthread_detach( &t );
12826                 if( status ) return status;
12827         }
12828 #endif
12829
12830 #ifdef HAVE_LINUX_THREADS
12831         pthread_kill_other_threads_np();
12832 #endif
12833
12834         return 0;
12835
12836 ; return 0; }
12837 EOF
12838 if { (eval echo configure:12839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12839   rm -rf conftest*
12840   ol_cv_pthread_mthreads=yes
12841 else
12842   echo "configure: failed program was:" >&5
12843   cat conftest.$ac_ext >&5
12844   rm -rf conftest*
12845   ol_cv_pthread_mthreads=no
12846 fi
12847 rm -f conftest*
12848 else
12849   cat > conftest.$ac_ext <<EOF
12850 #line 12851 "configure"
12851 #include "confdefs.h"
12852 /* pthread test headers */
12853 #include <pthread.h>
12854 #ifndef NULL
12855 #define NULL (void*)0
12856 #endif
12857
12858 static void *task(p)
12859         void *p;
12860 {
12861         return (void *) (p == NULL);
12862 }
12863
12864
12865 int main(argc, argv)
12866         int argc;
12867         char **argv;
12868 {
12869
12870         /* pthread test function */
12871         pthread_t t;
12872         int status;
12873         int detach = 1;
12874
12875 #ifdef HAVE_PTHREADS_FINAL
12876         /* Final pthreads */
12877         pthread_attr_t attr;
12878
12879         status = pthread_attr_init(&attr);
12880         if( status ) return status;
12881
12882 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12883         if( !detach ) {
12884 #if defined( PTHREAD_CREATE_JOINABLE )
12885                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12886 #else
12887                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12888 #endif
12889
12890 #ifdef PTHREAD_CREATE_DETACHED
12891         } else {
12892                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12893 #endif
12894         }
12895         if( status ) return status;
12896 #endif
12897
12898         status = pthread_create( &t, &attr, task, NULL );
12899         if( status ) return status;
12900
12901 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12902         if( detach ) {
12903                 /* give thread a chance to complete */
12904                 /* it should remain joinable and hence detachable */
12905                 sleep( 1 );
12906
12907                 status = pthread_detach( t );
12908                 if( status ) return status;
12909         }
12910 #endif
12911
12912 #else
12913         /* Draft 4 pthreads */
12914         status = pthread_create( &t, pthread_attr_default, task, NULL );
12915         if( status ) return status;
12916
12917         if( detach ) {
12918                 /* give thread a chance to complete */
12919                 /* it should remain joinable and hence detachable */
12920                 sleep( 1 );
12921
12922                 status = pthread_detach( &t );
12923                 if( status ) return status;
12924         }
12925 #endif
12926
12927 #ifdef HAVE_LINUX_THREADS
12928         pthread_kill_other_threads_np();
12929 #endif
12930
12931         return 0;
12932
12933 }
12934
12935 EOF
12936 if { (eval echo configure:12937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12937 then
12938   ol_cv_pthread_mthreads=yes
12939 else
12940   echo "configure: failed program was:" >&5
12941   cat conftest.$ac_ext >&5
12942   rm -fr conftest*
12943   ol_cv_pthread_mthreads=no
12944 fi
12945 rm -fr conftest*
12946 fi
12947
12948
12949                 # restore the LIBS
12950                 LIBS="$ol_LIBS"
12951         
12952 fi
12953
12954 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12955
12956         if test $ol_cv_pthread_mthreads = yes ; then
12957                 ol_link_pthreads="-mthreads"
12958                 ol_link_threads=posix
12959         fi
12960 fi
12961
12962                 # Pthread try link: -thread (ol_cv_pthread_thread)
12963 if test "$ol_link_threads" = no ; then
12964         # try -thread
12965         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12966 echo "configure:12967: checking for pthread link with -thread" >&5
12967 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12968   echo $ac_n "(cached) $ac_c" 1>&6
12969 else
12970   
12971                 # save the flags
12972                 ol_LIBS="$LIBS"
12973                 LIBS="-thread $LIBS"
12974
12975                 if test "$cross_compiling" = yes; then
12976   cat > conftest.$ac_ext <<EOF
12977 #line 12978 "configure"
12978 #include "confdefs.h"
12979 /* pthread test headers */
12980 #include <pthread.h>
12981 #ifndef NULL
12982 #define NULL (void*)0
12983 #endif
12984
12985 static void *task(p)
12986         void *p;
12987 {
12988         return (void *) (p == NULL);
12989 }
12990
12991 int main() {
12992
12993         /* pthread test function */
12994         pthread_t t;
12995         int status;
12996         int detach = 1;
12997
12998 #ifdef HAVE_PTHREADS_FINAL
12999         /* Final pthreads */
13000         pthread_attr_t attr;
13001
13002         status = pthread_attr_init(&attr);
13003         if( status ) return status;
13004
13005 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13006         if( !detach ) {
13007 #if defined( PTHREAD_CREATE_JOINABLE )
13008                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13009 #else
13010                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13011 #endif
13012
13013 #ifdef PTHREAD_CREATE_DETACHED
13014         } else {
13015                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13016 #endif
13017         }
13018         if( status ) return status;
13019 #endif
13020
13021         status = pthread_create( &t, &attr, task, NULL );
13022         if( status ) return status;
13023
13024 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13025         if( detach ) {
13026                 /* give thread a chance to complete */
13027                 /* it should remain joinable and hence detachable */
13028                 sleep( 1 );
13029
13030                 status = pthread_detach( t );
13031                 if( status ) return status;
13032         }
13033 #endif
13034
13035 #else
13036         /* Draft 4 pthreads */
13037         status = pthread_create( &t, pthread_attr_default, task, NULL );
13038         if( status ) return status;
13039
13040         if( detach ) {
13041                 /* give thread a chance to complete */
13042                 /* it should remain joinable and hence detachable */
13043                 sleep( 1 );
13044
13045                 status = pthread_detach( &t );
13046                 if( status ) return status;
13047         }
13048 #endif
13049
13050 #ifdef HAVE_LINUX_THREADS
13051         pthread_kill_other_threads_np();
13052 #endif
13053
13054         return 0;
13055
13056 ; return 0; }
13057 EOF
13058 if { (eval echo configure:13059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13059   rm -rf conftest*
13060   ol_cv_pthread_thread=yes
13061 else
13062   echo "configure: failed program was:" >&5
13063   cat conftest.$ac_ext >&5
13064   rm -rf conftest*
13065   ol_cv_pthread_thread=no
13066 fi
13067 rm -f conftest*
13068 else
13069   cat > conftest.$ac_ext <<EOF
13070 #line 13071 "configure"
13071 #include "confdefs.h"
13072 /* pthread test headers */
13073 #include <pthread.h>
13074 #ifndef NULL
13075 #define NULL (void*)0
13076 #endif
13077
13078 static void *task(p)
13079         void *p;
13080 {
13081         return (void *) (p == NULL);
13082 }
13083
13084
13085 int main(argc, argv)
13086         int argc;
13087         char **argv;
13088 {
13089
13090         /* pthread test function */
13091         pthread_t t;
13092         int status;
13093         int detach = 1;
13094
13095 #ifdef HAVE_PTHREADS_FINAL
13096         /* Final pthreads */
13097         pthread_attr_t attr;
13098
13099         status = pthread_attr_init(&attr);
13100         if( status ) return status;
13101
13102 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13103         if( !detach ) {
13104 #if defined( PTHREAD_CREATE_JOINABLE )
13105                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13106 #else
13107                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13108 #endif
13109
13110 #ifdef PTHREAD_CREATE_DETACHED
13111         } else {
13112                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13113 #endif
13114         }
13115         if( status ) return status;
13116 #endif
13117
13118         status = pthread_create( &t, &attr, task, NULL );
13119         if( status ) return status;
13120
13121 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13122         if( detach ) {
13123                 /* give thread a chance to complete */
13124                 /* it should remain joinable and hence detachable */
13125                 sleep( 1 );
13126
13127                 status = pthread_detach( t );
13128                 if( status ) return status;
13129         }
13130 #endif
13131
13132 #else
13133         /* Draft 4 pthreads */
13134         status = pthread_create( &t, pthread_attr_default, task, NULL );
13135         if( status ) return status;
13136
13137         if( detach ) {
13138                 /* give thread a chance to complete */
13139                 /* it should remain joinable and hence detachable */
13140                 sleep( 1 );
13141
13142                 status = pthread_detach( &t );
13143                 if( status ) return status;
13144         }
13145 #endif
13146
13147 #ifdef HAVE_LINUX_THREADS
13148         pthread_kill_other_threads_np();
13149 #endif
13150
13151         return 0;
13152
13153 }
13154
13155 EOF
13156 if { (eval echo configure:13157: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13157 then
13158   ol_cv_pthread_thread=yes
13159 else
13160   echo "configure: failed program was:" >&5
13161   cat conftest.$ac_ext >&5
13162   rm -fr conftest*
13163   ol_cv_pthread_thread=no
13164 fi
13165 rm -fr conftest*
13166 fi
13167
13168
13169                 # restore the LIBS
13170                 LIBS="$ol_LIBS"
13171         
13172 fi
13173
13174 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13175
13176         if test $ol_cv_pthread_thread = yes ; then
13177                 ol_link_pthreads="-thread"
13178                 ol_link_threads=posix
13179         fi
13180 fi
13181
13182
13183                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13184 if test "$ol_link_threads" = no ; then
13185         # try -lpthread -lmach -lexc -lc_r
13186         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13187 echo "configure:13188: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13188 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13189   echo $ac_n "(cached) $ac_c" 1>&6
13190 else
13191   
13192                 # save the flags
13193                 ol_LIBS="$LIBS"
13194                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13195
13196                 if test "$cross_compiling" = yes; then
13197   cat > conftest.$ac_ext <<EOF
13198 #line 13199 "configure"
13199 #include "confdefs.h"
13200 /* pthread test headers */
13201 #include <pthread.h>
13202 #ifndef NULL
13203 #define NULL (void*)0
13204 #endif
13205
13206 static void *task(p)
13207         void *p;
13208 {
13209         return (void *) (p == NULL);
13210 }
13211
13212 int main() {
13213
13214         /* pthread test function */
13215         pthread_t t;
13216         int status;
13217         int detach = 1;
13218
13219 #ifdef HAVE_PTHREADS_FINAL
13220         /* Final pthreads */
13221         pthread_attr_t attr;
13222
13223         status = pthread_attr_init(&attr);
13224         if( status ) return status;
13225
13226 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13227         if( !detach ) {
13228 #if defined( PTHREAD_CREATE_JOINABLE )
13229                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13230 #else
13231                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13232 #endif
13233
13234 #ifdef PTHREAD_CREATE_DETACHED
13235         } else {
13236                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13237 #endif
13238         }
13239         if( status ) return status;
13240 #endif
13241
13242         status = pthread_create( &t, &attr, task, NULL );
13243         if( status ) return status;
13244
13245 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13246         if( detach ) {
13247                 /* give thread a chance to complete */
13248                 /* it should remain joinable and hence detachable */
13249                 sleep( 1 );
13250
13251                 status = pthread_detach( t );
13252                 if( status ) return status;
13253         }
13254 #endif
13255
13256 #else
13257         /* Draft 4 pthreads */
13258         status = pthread_create( &t, pthread_attr_default, task, NULL );
13259         if( status ) return status;
13260
13261         if( detach ) {
13262                 /* give thread a chance to complete */
13263                 /* it should remain joinable and hence detachable */
13264                 sleep( 1 );
13265
13266                 status = pthread_detach( &t );
13267                 if( status ) return status;
13268         }
13269 #endif
13270
13271 #ifdef HAVE_LINUX_THREADS
13272         pthread_kill_other_threads_np();
13273 #endif
13274
13275         return 0;
13276
13277 ; return 0; }
13278 EOF
13279 if { (eval echo configure:13280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13280   rm -rf conftest*
13281   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13282 else
13283   echo "configure: failed program was:" >&5
13284   cat conftest.$ac_ext >&5
13285   rm -rf conftest*
13286   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13287 fi
13288 rm -f conftest*
13289 else
13290   cat > conftest.$ac_ext <<EOF
13291 #line 13292 "configure"
13292 #include "confdefs.h"
13293 /* pthread test headers */
13294 #include <pthread.h>
13295 #ifndef NULL
13296 #define NULL (void*)0
13297 #endif
13298
13299 static void *task(p)
13300         void *p;
13301 {
13302         return (void *) (p == NULL);
13303 }
13304
13305
13306 int main(argc, argv)
13307         int argc;
13308         char **argv;
13309 {
13310
13311         /* pthread test function */
13312         pthread_t t;
13313         int status;
13314         int detach = 1;
13315
13316 #ifdef HAVE_PTHREADS_FINAL
13317         /* Final pthreads */
13318         pthread_attr_t attr;
13319
13320         status = pthread_attr_init(&attr);
13321         if( status ) return status;
13322
13323 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13324         if( !detach ) {
13325 #if defined( PTHREAD_CREATE_JOINABLE )
13326                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13327 #else
13328                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13329 #endif
13330
13331 #ifdef PTHREAD_CREATE_DETACHED
13332         } else {
13333                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13334 #endif
13335         }
13336         if( status ) return status;
13337 #endif
13338
13339         status = pthread_create( &t, &attr, task, NULL );
13340         if( status ) return status;
13341
13342 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13343         if( detach ) {
13344                 /* give thread a chance to complete */
13345                 /* it should remain joinable and hence detachable */
13346                 sleep( 1 );
13347
13348                 status = pthread_detach( t );
13349                 if( status ) return status;
13350         }
13351 #endif
13352
13353 #else
13354         /* Draft 4 pthreads */
13355         status = pthread_create( &t, pthread_attr_default, task, NULL );
13356         if( status ) return status;
13357
13358         if( detach ) {
13359                 /* give thread a chance to complete */
13360                 /* it should remain joinable and hence detachable */
13361                 sleep( 1 );
13362
13363                 status = pthread_detach( &t );
13364                 if( status ) return status;
13365         }
13366 #endif
13367
13368 #ifdef HAVE_LINUX_THREADS
13369         pthread_kill_other_threads_np();
13370 #endif
13371
13372         return 0;
13373
13374 }
13375
13376 EOF
13377 if { (eval echo configure:13378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13378 then
13379   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13380 else
13381   echo "configure: failed program was:" >&5
13382   cat conftest.$ac_ext >&5
13383   rm -fr conftest*
13384   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13385 fi
13386 rm -fr conftest*
13387 fi
13388
13389
13390                 # restore the LIBS
13391                 LIBS="$ol_LIBS"
13392         
13393 fi
13394
13395 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13396
13397         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13398                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13399                 ol_link_threads=posix
13400         fi
13401 fi
13402
13403                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13404 if test "$ol_link_threads" = no ; then
13405         # try -lpthread -lmach -lexc
13406         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13407 echo "configure:13408: checking for pthread link with -lpthread -lmach -lexc" >&5
13408 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13409   echo $ac_n "(cached) $ac_c" 1>&6
13410 else
13411   
13412                 # save the flags
13413                 ol_LIBS="$LIBS"
13414                 LIBS="-lpthread -lmach -lexc $LIBS"
13415
13416                 if test "$cross_compiling" = yes; then
13417   cat > conftest.$ac_ext <<EOF
13418 #line 13419 "configure"
13419 #include "confdefs.h"
13420 /* pthread test headers */
13421 #include <pthread.h>
13422 #ifndef NULL
13423 #define NULL (void*)0
13424 #endif
13425
13426 static void *task(p)
13427         void *p;
13428 {
13429         return (void *) (p == NULL);
13430 }
13431
13432 int main() {
13433
13434         /* pthread test function */
13435         pthread_t t;
13436         int status;
13437         int detach = 1;
13438
13439 #ifdef HAVE_PTHREADS_FINAL
13440         /* Final pthreads */
13441         pthread_attr_t attr;
13442
13443         status = pthread_attr_init(&attr);
13444         if( status ) return status;
13445
13446 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13447         if( !detach ) {
13448 #if defined( PTHREAD_CREATE_JOINABLE )
13449                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13450 #else
13451                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13452 #endif
13453
13454 #ifdef PTHREAD_CREATE_DETACHED
13455         } else {
13456                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13457 #endif
13458         }
13459         if( status ) return status;
13460 #endif
13461
13462         status = pthread_create( &t, &attr, task, NULL );
13463         if( status ) return status;
13464
13465 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13466         if( detach ) {
13467                 /* give thread a chance to complete */
13468                 /* it should remain joinable and hence detachable */
13469                 sleep( 1 );
13470
13471                 status = pthread_detach( t );
13472                 if( status ) return status;
13473         }
13474 #endif
13475
13476 #else
13477         /* Draft 4 pthreads */
13478         status = pthread_create( &t, pthread_attr_default, task, NULL );
13479         if( status ) return status;
13480
13481         if( detach ) {
13482                 /* give thread a chance to complete */
13483                 /* it should remain joinable and hence detachable */
13484                 sleep( 1 );
13485
13486                 status = pthread_detach( &t );
13487                 if( status ) return status;
13488         }
13489 #endif
13490
13491 #ifdef HAVE_LINUX_THREADS
13492         pthread_kill_other_threads_np();
13493 #endif
13494
13495         return 0;
13496
13497 ; return 0; }
13498 EOF
13499 if { (eval echo configure:13500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13500   rm -rf conftest*
13501   ol_cv_pthread_lpthread_lmach_lexc=yes
13502 else
13503   echo "configure: failed program was:" >&5
13504   cat conftest.$ac_ext >&5
13505   rm -rf conftest*
13506   ol_cv_pthread_lpthread_lmach_lexc=no
13507 fi
13508 rm -f conftest*
13509 else
13510   cat > conftest.$ac_ext <<EOF
13511 #line 13512 "configure"
13512 #include "confdefs.h"
13513 /* pthread test headers */
13514 #include <pthread.h>
13515 #ifndef NULL
13516 #define NULL (void*)0
13517 #endif
13518
13519 static void *task(p)
13520         void *p;
13521 {
13522         return (void *) (p == NULL);
13523 }
13524
13525
13526 int main(argc, argv)
13527         int argc;
13528         char **argv;
13529 {
13530
13531         /* pthread test function */
13532         pthread_t t;
13533         int status;
13534         int detach = 1;
13535
13536 #ifdef HAVE_PTHREADS_FINAL
13537         /* Final pthreads */
13538         pthread_attr_t attr;
13539
13540         status = pthread_attr_init(&attr);
13541         if( status ) return status;
13542
13543 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13544         if( !detach ) {
13545 #if defined( PTHREAD_CREATE_JOINABLE )
13546                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13547 #else
13548                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13549 #endif
13550
13551 #ifdef PTHREAD_CREATE_DETACHED
13552         } else {
13553                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13554 #endif
13555         }
13556         if( status ) return status;
13557 #endif
13558
13559         status = pthread_create( &t, &attr, task, NULL );
13560         if( status ) return status;
13561
13562 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13563         if( detach ) {
13564                 /* give thread a chance to complete */
13565                 /* it should remain joinable and hence detachable */
13566                 sleep( 1 );
13567
13568                 status = pthread_detach( t );
13569                 if( status ) return status;
13570         }
13571 #endif
13572
13573 #else
13574         /* Draft 4 pthreads */
13575         status = pthread_create( &t, pthread_attr_default, task, NULL );
13576         if( status ) return status;
13577
13578         if( detach ) {
13579                 /* give thread a chance to complete */
13580                 /* it should remain joinable and hence detachable */
13581                 sleep( 1 );
13582
13583                 status = pthread_detach( &t );
13584                 if( status ) return status;
13585         }
13586 #endif
13587
13588 #ifdef HAVE_LINUX_THREADS
13589         pthread_kill_other_threads_np();
13590 #endif
13591
13592         return 0;
13593
13594 }
13595
13596 EOF
13597 if { (eval echo configure:13598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13598 then
13599   ol_cv_pthread_lpthread_lmach_lexc=yes
13600 else
13601   echo "configure: failed program was:" >&5
13602   cat conftest.$ac_ext >&5
13603   rm -fr conftest*
13604   ol_cv_pthread_lpthread_lmach_lexc=no
13605 fi
13606 rm -fr conftest*
13607 fi
13608
13609
13610                 # restore the LIBS
13611                 LIBS="$ol_LIBS"
13612         
13613 fi
13614
13615 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13616
13617         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13618                 ol_link_pthreads="-lpthread -lmach -lexc"
13619                 ol_link_threads=posix
13620         fi
13621 fi
13622
13623
13624                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13625 if test "$ol_link_threads" = no ; then
13626         # try -lpthread -Wl,-woff,85
13627         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13628 echo "configure:13629: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13629 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13630   echo $ac_n "(cached) $ac_c" 1>&6
13631 else
13632   
13633                 # save the flags
13634                 ol_LIBS="$LIBS"
13635                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13636
13637                 if test "$cross_compiling" = yes; then
13638   cat > conftest.$ac_ext <<EOF
13639 #line 13640 "configure"
13640 #include "confdefs.h"
13641 /* pthread test headers */
13642 #include <pthread.h>
13643 #ifndef NULL
13644 #define NULL (void*)0
13645 #endif
13646
13647 static void *task(p)
13648         void *p;
13649 {
13650         return (void *) (p == NULL);
13651 }
13652
13653 int main() {
13654
13655         /* pthread test function */
13656         pthread_t t;
13657         int status;
13658         int detach = 1;
13659
13660 #ifdef HAVE_PTHREADS_FINAL
13661         /* Final pthreads */
13662         pthread_attr_t attr;
13663
13664         status = pthread_attr_init(&attr);
13665         if( status ) return status;
13666
13667 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13668         if( !detach ) {
13669 #if defined( PTHREAD_CREATE_JOINABLE )
13670                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13671 #else
13672                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13673 #endif
13674
13675 #ifdef PTHREAD_CREATE_DETACHED
13676         } else {
13677                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13678 #endif
13679         }
13680         if( status ) return status;
13681 #endif
13682
13683         status = pthread_create( &t, &attr, task, NULL );
13684         if( status ) return status;
13685
13686 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13687         if( detach ) {
13688                 /* give thread a chance to complete */
13689                 /* it should remain joinable and hence detachable */
13690                 sleep( 1 );
13691
13692                 status = pthread_detach( t );
13693                 if( status ) return status;
13694         }
13695 #endif
13696
13697 #else
13698         /* Draft 4 pthreads */
13699         status = pthread_create( &t, pthread_attr_default, task, NULL );
13700         if( status ) return status;
13701
13702         if( detach ) {
13703                 /* give thread a chance to complete */
13704                 /* it should remain joinable and hence detachable */
13705                 sleep( 1 );
13706
13707                 status = pthread_detach( &t );
13708                 if( status ) return status;
13709         }
13710 #endif
13711
13712 #ifdef HAVE_LINUX_THREADS
13713         pthread_kill_other_threads_np();
13714 #endif
13715
13716         return 0;
13717
13718 ; return 0; }
13719 EOF
13720 if { (eval echo configure:13721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13721   rm -rf conftest*
13722   ol_cv_pthread_lib_lpthread_woff=yes
13723 else
13724   echo "configure: failed program was:" >&5
13725   cat conftest.$ac_ext >&5
13726   rm -rf conftest*
13727   ol_cv_pthread_lib_lpthread_woff=no
13728 fi
13729 rm -f conftest*
13730 else
13731   cat > conftest.$ac_ext <<EOF
13732 #line 13733 "configure"
13733 #include "confdefs.h"
13734 /* pthread test headers */
13735 #include <pthread.h>
13736 #ifndef NULL
13737 #define NULL (void*)0
13738 #endif
13739
13740 static void *task(p)
13741         void *p;
13742 {
13743         return (void *) (p == NULL);
13744 }
13745
13746
13747 int main(argc, argv)
13748         int argc;
13749         char **argv;
13750 {
13751
13752         /* pthread test function */
13753         pthread_t t;
13754         int status;
13755         int detach = 1;
13756
13757 #ifdef HAVE_PTHREADS_FINAL
13758         /* Final pthreads */
13759         pthread_attr_t attr;
13760
13761         status = pthread_attr_init(&attr);
13762         if( status ) return status;
13763
13764 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13765         if( !detach ) {
13766 #if defined( PTHREAD_CREATE_JOINABLE )
13767                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13768 #else
13769                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13770 #endif
13771
13772 #ifdef PTHREAD_CREATE_DETACHED
13773         } else {
13774                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13775 #endif
13776         }
13777         if( status ) return status;
13778 #endif
13779
13780         status = pthread_create( &t, &attr, task, NULL );
13781         if( status ) return status;
13782
13783 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13784         if( detach ) {
13785                 /* give thread a chance to complete */
13786                 /* it should remain joinable and hence detachable */
13787                 sleep( 1 );
13788
13789                 status = pthread_detach( t );
13790                 if( status ) return status;
13791         }
13792 #endif
13793
13794 #else
13795         /* Draft 4 pthreads */
13796         status = pthread_create( &t, pthread_attr_default, task, NULL );
13797         if( status ) return status;
13798
13799         if( detach ) {
13800                 /* give thread a chance to complete */
13801                 /* it should remain joinable and hence detachable */
13802                 sleep( 1 );
13803
13804                 status = pthread_detach( &t );
13805                 if( status ) return status;
13806         }
13807 #endif
13808
13809 #ifdef HAVE_LINUX_THREADS
13810         pthread_kill_other_threads_np();
13811 #endif
13812
13813         return 0;
13814
13815 }
13816
13817 EOF
13818 if { (eval echo configure:13819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13819 then
13820   ol_cv_pthread_lib_lpthread_woff=yes
13821 else
13822   echo "configure: failed program was:" >&5
13823   cat conftest.$ac_ext >&5
13824   rm -fr conftest*
13825   ol_cv_pthread_lib_lpthread_woff=no
13826 fi
13827 rm -fr conftest*
13828 fi
13829
13830
13831                 # restore the LIBS
13832                 LIBS="$ol_LIBS"
13833         
13834 fi
13835
13836 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13837
13838         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13839                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13840                 ol_link_threads=posix
13841         fi
13842 fi
13843
13844
13845                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13846 if test "$ol_link_threads" = no ; then
13847         # try -lpthread
13848         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13849 echo "configure:13850: checking for pthread link with -lpthread" >&5
13850 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13851   echo $ac_n "(cached) $ac_c" 1>&6
13852 else
13853   
13854                 # save the flags
13855                 ol_LIBS="$LIBS"
13856                 LIBS="-lpthread $LIBS"
13857
13858                 if test "$cross_compiling" = yes; then
13859   cat > conftest.$ac_ext <<EOF
13860 #line 13861 "configure"
13861 #include "confdefs.h"
13862 /* pthread test headers */
13863 #include <pthread.h>
13864 #ifndef NULL
13865 #define NULL (void*)0
13866 #endif
13867
13868 static void *task(p)
13869         void *p;
13870 {
13871         return (void *) (p == NULL);
13872 }
13873
13874 int main() {
13875
13876         /* pthread test function */
13877         pthread_t t;
13878         int status;
13879         int detach = 1;
13880
13881 #ifdef HAVE_PTHREADS_FINAL
13882         /* Final pthreads */
13883         pthread_attr_t attr;
13884
13885         status = pthread_attr_init(&attr);
13886         if( status ) return status;
13887
13888 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13889         if( !detach ) {
13890 #if defined( PTHREAD_CREATE_JOINABLE )
13891                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13892 #else
13893                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13894 #endif
13895
13896 #ifdef PTHREAD_CREATE_DETACHED
13897         } else {
13898                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13899 #endif
13900         }
13901         if( status ) return status;
13902 #endif
13903
13904         status = pthread_create( &t, &attr, task, NULL );
13905         if( status ) return status;
13906
13907 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13908         if( detach ) {
13909                 /* give thread a chance to complete */
13910                 /* it should remain joinable and hence detachable */
13911                 sleep( 1 );
13912
13913                 status = pthread_detach( t );
13914                 if( status ) return status;
13915         }
13916 #endif
13917
13918 #else
13919         /* Draft 4 pthreads */
13920         status = pthread_create( &t, pthread_attr_default, task, NULL );
13921         if( status ) return status;
13922
13923         if( detach ) {
13924                 /* give thread a chance to complete */
13925                 /* it should remain joinable and hence detachable */
13926                 sleep( 1 );
13927
13928                 status = pthread_detach( &t );
13929                 if( status ) return status;
13930         }
13931 #endif
13932
13933 #ifdef HAVE_LINUX_THREADS
13934         pthread_kill_other_threads_np();
13935 #endif
13936
13937         return 0;
13938
13939 ; return 0; }
13940 EOF
13941 if { (eval echo configure:13942: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13942   rm -rf conftest*
13943   ol_cv_pthread_lpthread=yes
13944 else
13945   echo "configure: failed program was:" >&5
13946   cat conftest.$ac_ext >&5
13947   rm -rf conftest*
13948   ol_cv_pthread_lpthread=no
13949 fi
13950 rm -f conftest*
13951 else
13952   cat > conftest.$ac_ext <<EOF
13953 #line 13954 "configure"
13954 #include "confdefs.h"
13955 /* pthread test headers */
13956 #include <pthread.h>
13957 #ifndef NULL
13958 #define NULL (void*)0
13959 #endif
13960
13961 static void *task(p)
13962         void *p;
13963 {
13964         return (void *) (p == NULL);
13965 }
13966
13967
13968 int main(argc, argv)
13969         int argc;
13970         char **argv;
13971 {
13972
13973         /* pthread test function */
13974         pthread_t t;
13975         int status;
13976         int detach = 1;
13977
13978 #ifdef HAVE_PTHREADS_FINAL
13979         /* Final pthreads */
13980         pthread_attr_t attr;
13981
13982         status = pthread_attr_init(&attr);
13983         if( status ) return status;
13984
13985 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13986         if( !detach ) {
13987 #if defined( PTHREAD_CREATE_JOINABLE )
13988                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13989 #else
13990                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13991 #endif
13992
13993 #ifdef PTHREAD_CREATE_DETACHED
13994         } else {
13995                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13996 #endif
13997         }
13998         if( status ) return status;
13999 #endif
14000
14001         status = pthread_create( &t, &attr, task, NULL );
14002         if( status ) return status;
14003
14004 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14005         if( detach ) {
14006                 /* give thread a chance to complete */
14007                 /* it should remain joinable and hence detachable */
14008                 sleep( 1 );
14009
14010                 status = pthread_detach( t );
14011                 if( status ) return status;
14012         }
14013 #endif
14014
14015 #else
14016         /* Draft 4 pthreads */
14017         status = pthread_create( &t, pthread_attr_default, task, NULL );
14018         if( status ) return status;
14019
14020         if( detach ) {
14021                 /* give thread a chance to complete */
14022                 /* it should remain joinable and hence detachable */
14023                 sleep( 1 );
14024
14025                 status = pthread_detach( &t );
14026                 if( status ) return status;
14027         }
14028 #endif
14029
14030 #ifdef HAVE_LINUX_THREADS
14031         pthread_kill_other_threads_np();
14032 #endif
14033
14034         return 0;
14035
14036 }
14037
14038 EOF
14039 if { (eval echo configure:14040: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14040 then
14041   ol_cv_pthread_lpthread=yes
14042 else
14043   echo "configure: failed program was:" >&5
14044   cat conftest.$ac_ext >&5
14045   rm -fr conftest*
14046   ol_cv_pthread_lpthread=no
14047 fi
14048 rm -fr conftest*
14049 fi
14050
14051
14052                 # restore the LIBS
14053                 LIBS="$ol_LIBS"
14054         
14055 fi
14056
14057 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
14058
14059         if test $ol_cv_pthread_lpthread = yes ; then
14060                 ol_link_pthreads="-lpthread"
14061                 ol_link_threads=posix
14062         fi
14063 fi
14064
14065                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
14066 if test "$ol_link_threads" = no ; then
14067         # try -lc_r
14068         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
14069 echo "configure:14070: checking for pthread link with -lc_r" >&5
14070 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
14071   echo $ac_n "(cached) $ac_c" 1>&6
14072 else
14073   
14074                 # save the flags
14075                 ol_LIBS="$LIBS"
14076                 LIBS="-lc_r $LIBS"
14077
14078                 if test "$cross_compiling" = yes; then
14079   cat > conftest.$ac_ext <<EOF
14080 #line 14081 "configure"
14081 #include "confdefs.h"
14082 /* pthread test headers */
14083 #include <pthread.h>
14084 #ifndef NULL
14085 #define NULL (void*)0
14086 #endif
14087
14088 static void *task(p)
14089         void *p;
14090 {
14091         return (void *) (p == NULL);
14092 }
14093
14094 int main() {
14095
14096         /* pthread test function */
14097         pthread_t t;
14098         int status;
14099         int detach = 1;
14100
14101 #ifdef HAVE_PTHREADS_FINAL
14102         /* Final pthreads */
14103         pthread_attr_t attr;
14104
14105         status = pthread_attr_init(&attr);
14106         if( status ) return status;
14107
14108 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14109         if( !detach ) {
14110 #if defined( PTHREAD_CREATE_JOINABLE )
14111                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14112 #else
14113                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14114 #endif
14115
14116 #ifdef PTHREAD_CREATE_DETACHED
14117         } else {
14118                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14119 #endif
14120         }
14121         if( status ) return status;
14122 #endif
14123
14124         status = pthread_create( &t, &attr, task, NULL );
14125         if( status ) return status;
14126
14127 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14128         if( detach ) {
14129                 /* give thread a chance to complete */
14130                 /* it should remain joinable and hence detachable */
14131                 sleep( 1 );
14132
14133                 status = pthread_detach( t );
14134                 if( status ) return status;
14135         }
14136 #endif
14137
14138 #else
14139         /* Draft 4 pthreads */
14140         status = pthread_create( &t, pthread_attr_default, task, NULL );
14141         if( status ) return status;
14142
14143         if( detach ) {
14144                 /* give thread a chance to complete */
14145                 /* it should remain joinable and hence detachable */
14146                 sleep( 1 );
14147
14148                 status = pthread_detach( &t );
14149                 if( status ) return status;
14150         }
14151 #endif
14152
14153 #ifdef HAVE_LINUX_THREADS
14154         pthread_kill_other_threads_np();
14155 #endif
14156
14157         return 0;
14158
14159 ; return 0; }
14160 EOF
14161 if { (eval echo configure:14162: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14162   rm -rf conftest*
14163   ol_cv_pthread_lc_r=yes
14164 else
14165   echo "configure: failed program was:" >&5
14166   cat conftest.$ac_ext >&5
14167   rm -rf conftest*
14168   ol_cv_pthread_lc_r=no
14169 fi
14170 rm -f conftest*
14171 else
14172   cat > conftest.$ac_ext <<EOF
14173 #line 14174 "configure"
14174 #include "confdefs.h"
14175 /* pthread test headers */
14176 #include <pthread.h>
14177 #ifndef NULL
14178 #define NULL (void*)0
14179 #endif
14180
14181 static void *task(p)
14182         void *p;
14183 {
14184         return (void *) (p == NULL);
14185 }
14186
14187
14188 int main(argc, argv)
14189         int argc;
14190         char **argv;
14191 {
14192
14193         /* pthread test function */
14194         pthread_t t;
14195         int status;
14196         int detach = 1;
14197
14198 #ifdef HAVE_PTHREADS_FINAL
14199         /* Final pthreads */
14200         pthread_attr_t attr;
14201
14202         status = pthread_attr_init(&attr);
14203         if( status ) return status;
14204
14205 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14206         if( !detach ) {
14207 #if defined( PTHREAD_CREATE_JOINABLE )
14208                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14209 #else
14210                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14211 #endif
14212
14213 #ifdef PTHREAD_CREATE_DETACHED
14214         } else {
14215                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14216 #endif
14217         }
14218         if( status ) return status;
14219 #endif
14220
14221         status = pthread_create( &t, &attr, task, NULL );
14222         if( status ) return status;
14223
14224 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14225         if( detach ) {
14226                 /* give thread a chance to complete */
14227                 /* it should remain joinable and hence detachable */
14228                 sleep( 1 );
14229
14230                 status = pthread_detach( t );
14231                 if( status ) return status;
14232         }
14233 #endif
14234
14235 #else
14236         /* Draft 4 pthreads */
14237         status = pthread_create( &t, pthread_attr_default, task, NULL );
14238         if( status ) return status;
14239
14240         if( detach ) {
14241                 /* give thread a chance to complete */
14242                 /* it should remain joinable and hence detachable */
14243                 sleep( 1 );
14244
14245                 status = pthread_detach( &t );
14246                 if( status ) return status;
14247         }
14248 #endif
14249
14250 #ifdef HAVE_LINUX_THREADS
14251         pthread_kill_other_threads_np();
14252 #endif
14253
14254         return 0;
14255
14256 }
14257
14258 EOF
14259 if { (eval echo configure:14260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14260 then
14261   ol_cv_pthread_lc_r=yes
14262 else
14263   echo "configure: failed program was:" >&5
14264   cat conftest.$ac_ext >&5
14265   rm -fr conftest*
14266   ol_cv_pthread_lc_r=no
14267 fi
14268 rm -fr conftest*
14269 fi
14270
14271
14272                 # restore the LIBS
14273                 LIBS="$ol_LIBS"
14274         
14275 fi
14276
14277 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14278
14279         if test $ol_cv_pthread_lc_r = yes ; then
14280                 ol_link_pthreads="-lc_r"
14281                 ol_link_threads=posix
14282         fi
14283 fi
14284
14285
14286                 # Pthread try link: -threads (ol_cv_pthread_threads)
14287 if test "$ol_link_threads" = no ; then
14288         # try -threads
14289         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14290 echo "configure:14291: checking for pthread link with -threads" >&5
14291 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14292   echo $ac_n "(cached) $ac_c" 1>&6
14293 else
14294   
14295                 # save the flags
14296                 ol_LIBS="$LIBS"
14297                 LIBS="-threads $LIBS"
14298
14299                 if test "$cross_compiling" = yes; then
14300   cat > conftest.$ac_ext <<EOF
14301 #line 14302 "configure"
14302 #include "confdefs.h"
14303 /* pthread test headers */
14304 #include <pthread.h>
14305 #ifndef NULL
14306 #define NULL (void*)0
14307 #endif
14308
14309 static void *task(p)
14310         void *p;
14311 {
14312         return (void *) (p == NULL);
14313 }
14314
14315 int main() {
14316
14317         /* pthread test function */
14318         pthread_t t;
14319         int status;
14320         int detach = 1;
14321
14322 #ifdef HAVE_PTHREADS_FINAL
14323         /* Final pthreads */
14324         pthread_attr_t attr;
14325
14326         status = pthread_attr_init(&attr);
14327         if( status ) return status;
14328
14329 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14330         if( !detach ) {
14331 #if defined( PTHREAD_CREATE_JOINABLE )
14332                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14333 #else
14334                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14335 #endif
14336
14337 #ifdef PTHREAD_CREATE_DETACHED
14338         } else {
14339                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14340 #endif
14341         }
14342         if( status ) return status;
14343 #endif
14344
14345         status = pthread_create( &t, &attr, task, NULL );
14346         if( status ) return status;
14347
14348 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14349         if( detach ) {
14350                 /* give thread a chance to complete */
14351                 /* it should remain joinable and hence detachable */
14352                 sleep( 1 );
14353
14354                 status = pthread_detach( t );
14355                 if( status ) return status;
14356         }
14357 #endif
14358
14359 #else
14360         /* Draft 4 pthreads */
14361         status = pthread_create( &t, pthread_attr_default, task, NULL );
14362         if( status ) return status;
14363
14364         if( detach ) {
14365                 /* give thread a chance to complete */
14366                 /* it should remain joinable and hence detachable */
14367                 sleep( 1 );
14368
14369                 status = pthread_detach( &t );
14370                 if( status ) return status;
14371         }
14372 #endif
14373
14374 #ifdef HAVE_LINUX_THREADS
14375         pthread_kill_other_threads_np();
14376 #endif
14377
14378         return 0;
14379
14380 ; return 0; }
14381 EOF
14382 if { (eval echo configure:14383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14383   rm -rf conftest*
14384   ol_cv_pthread_threads=yes
14385 else
14386   echo "configure: failed program was:" >&5
14387   cat conftest.$ac_ext >&5
14388   rm -rf conftest*
14389   ol_cv_pthread_threads=no
14390 fi
14391 rm -f conftest*
14392 else
14393   cat > conftest.$ac_ext <<EOF
14394 #line 14395 "configure"
14395 #include "confdefs.h"
14396 /* pthread test headers */
14397 #include <pthread.h>
14398 #ifndef NULL
14399 #define NULL (void*)0
14400 #endif
14401
14402 static void *task(p)
14403         void *p;
14404 {
14405         return (void *) (p == NULL);
14406 }
14407
14408
14409 int main(argc, argv)
14410         int argc;
14411         char **argv;
14412 {
14413
14414         /* pthread test function */
14415         pthread_t t;
14416         int status;
14417         int detach = 1;
14418
14419 #ifdef HAVE_PTHREADS_FINAL
14420         /* Final pthreads */
14421         pthread_attr_t attr;
14422
14423         status = pthread_attr_init(&attr);
14424         if( status ) return status;
14425
14426 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14427         if( !detach ) {
14428 #if defined( PTHREAD_CREATE_JOINABLE )
14429                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14430 #else
14431                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14432 #endif
14433
14434 #ifdef PTHREAD_CREATE_DETACHED
14435         } else {
14436                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14437 #endif
14438         }
14439         if( status ) return status;
14440 #endif
14441
14442         status = pthread_create( &t, &attr, task, NULL );
14443         if( status ) return status;
14444
14445 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14446         if( detach ) {
14447                 /* give thread a chance to complete */
14448                 /* it should remain joinable and hence detachable */
14449                 sleep( 1 );
14450
14451                 status = pthread_detach( t );
14452                 if( status ) return status;
14453         }
14454 #endif
14455
14456 #else
14457         /* Draft 4 pthreads */
14458         status = pthread_create( &t, pthread_attr_default, task, NULL );
14459         if( status ) return status;
14460
14461         if( detach ) {
14462                 /* give thread a chance to complete */
14463                 /* it should remain joinable and hence detachable */
14464                 sleep( 1 );
14465
14466                 status = pthread_detach( &t );
14467                 if( status ) return status;
14468         }
14469 #endif
14470
14471 #ifdef HAVE_LINUX_THREADS
14472         pthread_kill_other_threads_np();
14473 #endif
14474
14475         return 0;
14476
14477 }
14478
14479 EOF
14480 if { (eval echo configure:14481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14481 then
14482   ol_cv_pthread_threads=yes
14483 else
14484   echo "configure: failed program was:" >&5
14485   cat conftest.$ac_ext >&5
14486   rm -fr conftest*
14487   ol_cv_pthread_threads=no
14488 fi
14489 rm -fr conftest*
14490 fi
14491
14492
14493                 # restore the LIBS
14494                 LIBS="$ol_LIBS"
14495         
14496 fi
14497
14498 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14499
14500         if test $ol_cv_pthread_threads = yes ; then
14501                 ol_link_pthreads="-threads"
14502                 ol_link_threads=posix
14503         fi
14504 fi
14505
14506
14507                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14508 if test "$ol_link_threads" = no ; then
14509         # try -lpthreads -lmach -lexc -lc_r
14510         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14511 echo "configure:14512: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14512 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14513   echo $ac_n "(cached) $ac_c" 1>&6
14514 else
14515   
14516                 # save the flags
14517                 ol_LIBS="$LIBS"
14518                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14519
14520                 if test "$cross_compiling" = yes; then
14521   cat > conftest.$ac_ext <<EOF
14522 #line 14523 "configure"
14523 #include "confdefs.h"
14524 /* pthread test headers */
14525 #include <pthread.h>
14526 #ifndef NULL
14527 #define NULL (void*)0
14528 #endif
14529
14530 static void *task(p)
14531         void *p;
14532 {
14533         return (void *) (p == NULL);
14534 }
14535
14536 int main() {
14537
14538         /* pthread test function */
14539         pthread_t t;
14540         int status;
14541         int detach = 1;
14542
14543 #ifdef HAVE_PTHREADS_FINAL
14544         /* Final pthreads */
14545         pthread_attr_t attr;
14546
14547         status = pthread_attr_init(&attr);
14548         if( status ) return status;
14549
14550 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14551         if( !detach ) {
14552 #if defined( PTHREAD_CREATE_JOINABLE )
14553                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14554 #else
14555                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14556 #endif
14557
14558 #ifdef PTHREAD_CREATE_DETACHED
14559         } else {
14560                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14561 #endif
14562         }
14563         if( status ) return status;
14564 #endif
14565
14566         status = pthread_create( &t, &attr, task, NULL );
14567         if( status ) return status;
14568
14569 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14570         if( detach ) {
14571                 /* give thread a chance to complete */
14572                 /* it should remain joinable and hence detachable */
14573                 sleep( 1 );
14574
14575                 status = pthread_detach( t );
14576                 if( status ) return status;
14577         }
14578 #endif
14579
14580 #else
14581         /* Draft 4 pthreads */
14582         status = pthread_create( &t, pthread_attr_default, task, NULL );
14583         if( status ) return status;
14584
14585         if( detach ) {
14586                 /* give thread a chance to complete */
14587                 /* it should remain joinable and hence detachable */
14588                 sleep( 1 );
14589
14590                 status = pthread_detach( &t );
14591                 if( status ) return status;
14592         }
14593 #endif
14594
14595 #ifdef HAVE_LINUX_THREADS
14596         pthread_kill_other_threads_np();
14597 #endif
14598
14599         return 0;
14600
14601 ; return 0; }
14602 EOF
14603 if { (eval echo configure:14604: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14604   rm -rf conftest*
14605   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14606 else
14607   echo "configure: failed program was:" >&5
14608   cat conftest.$ac_ext >&5
14609   rm -rf conftest*
14610   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14611 fi
14612 rm -f conftest*
14613 else
14614   cat > conftest.$ac_ext <<EOF
14615 #line 14616 "configure"
14616 #include "confdefs.h"
14617 /* pthread test headers */
14618 #include <pthread.h>
14619 #ifndef NULL
14620 #define NULL (void*)0
14621 #endif
14622
14623 static void *task(p)
14624         void *p;
14625 {
14626         return (void *) (p == NULL);
14627 }
14628
14629
14630 int main(argc, argv)
14631         int argc;
14632         char **argv;
14633 {
14634
14635         /* pthread test function */
14636         pthread_t t;
14637         int status;
14638         int detach = 1;
14639
14640 #ifdef HAVE_PTHREADS_FINAL
14641         /* Final pthreads */
14642         pthread_attr_t attr;
14643
14644         status = pthread_attr_init(&attr);
14645         if( status ) return status;
14646
14647 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14648         if( !detach ) {
14649 #if defined( PTHREAD_CREATE_JOINABLE )
14650                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14651 #else
14652                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14653 #endif
14654
14655 #ifdef PTHREAD_CREATE_DETACHED
14656         } else {
14657                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14658 #endif
14659         }
14660         if( status ) return status;
14661 #endif
14662
14663         status = pthread_create( &t, &attr, task, NULL );
14664         if( status ) return status;
14665
14666 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14667         if( detach ) {
14668                 /* give thread a chance to complete */
14669                 /* it should remain joinable and hence detachable */
14670                 sleep( 1 );
14671
14672                 status = pthread_detach( t );
14673                 if( status ) return status;
14674         }
14675 #endif
14676
14677 #else
14678         /* Draft 4 pthreads */
14679         status = pthread_create( &t, pthread_attr_default, task, NULL );
14680         if( status ) return status;
14681
14682         if( detach ) {
14683                 /* give thread a chance to complete */
14684                 /* it should remain joinable and hence detachable */
14685                 sleep( 1 );
14686
14687                 status = pthread_detach( &t );
14688                 if( status ) return status;
14689         }
14690 #endif
14691
14692 #ifdef HAVE_LINUX_THREADS
14693         pthread_kill_other_threads_np();
14694 #endif
14695
14696         return 0;
14697
14698 }
14699
14700 EOF
14701 if { (eval echo configure:14702: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14702 then
14703   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14704 else
14705   echo "configure: failed program was:" >&5
14706   cat conftest.$ac_ext >&5
14707   rm -fr conftest*
14708   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14709 fi
14710 rm -fr conftest*
14711 fi
14712
14713
14714                 # restore the LIBS
14715                 LIBS="$ol_LIBS"
14716         
14717 fi
14718
14719 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14720
14721         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14722                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14723                 ol_link_threads=posix
14724         fi
14725 fi
14726
14727                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14728 if test "$ol_link_threads" = no ; then
14729         # try -lpthreads -lmach -lexc
14730         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14731 echo "configure:14732: checking for pthread link with -lpthreads -lmach -lexc" >&5
14732 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14733   echo $ac_n "(cached) $ac_c" 1>&6
14734 else
14735   
14736                 # save the flags
14737                 ol_LIBS="$LIBS"
14738                 LIBS="-lpthreads -lmach -lexc $LIBS"
14739
14740                 if test "$cross_compiling" = yes; then
14741   cat > conftest.$ac_ext <<EOF
14742 #line 14743 "configure"
14743 #include "confdefs.h"
14744 /* pthread test headers */
14745 #include <pthread.h>
14746 #ifndef NULL
14747 #define NULL (void*)0
14748 #endif
14749
14750 static void *task(p)
14751         void *p;
14752 {
14753         return (void *) (p == NULL);
14754 }
14755
14756 int main() {
14757
14758         /* pthread test function */
14759         pthread_t t;
14760         int status;
14761         int detach = 1;
14762
14763 #ifdef HAVE_PTHREADS_FINAL
14764         /* Final pthreads */
14765         pthread_attr_t attr;
14766
14767         status = pthread_attr_init(&attr);
14768         if( status ) return status;
14769
14770 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14771         if( !detach ) {
14772 #if defined( PTHREAD_CREATE_JOINABLE )
14773                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14774 #else
14775                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14776 #endif
14777
14778 #ifdef PTHREAD_CREATE_DETACHED
14779         } else {
14780                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14781 #endif
14782         }
14783         if( status ) return status;
14784 #endif
14785
14786         status = pthread_create( &t, &attr, task, NULL );
14787         if( status ) return status;
14788
14789 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14790         if( detach ) {
14791                 /* give thread a chance to complete */
14792                 /* it should remain joinable and hence detachable */
14793                 sleep( 1 );
14794
14795                 status = pthread_detach( t );
14796                 if( status ) return status;
14797         }
14798 #endif
14799
14800 #else
14801         /* Draft 4 pthreads */
14802         status = pthread_create( &t, pthread_attr_default, task, NULL );
14803         if( status ) return status;
14804
14805         if( detach ) {
14806                 /* give thread a chance to complete */
14807                 /* it should remain joinable and hence detachable */
14808                 sleep( 1 );
14809
14810                 status = pthread_detach( &t );
14811                 if( status ) return status;
14812         }
14813 #endif
14814
14815 #ifdef HAVE_LINUX_THREADS
14816         pthread_kill_other_threads_np();
14817 #endif
14818
14819         return 0;
14820
14821 ; return 0; }
14822 EOF
14823 if { (eval echo configure:14824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14824   rm -rf conftest*
14825   ol_cv_pthread_lpthreads_lmach_lexc=yes
14826 else
14827   echo "configure: failed program was:" >&5
14828   cat conftest.$ac_ext >&5
14829   rm -rf conftest*
14830   ol_cv_pthread_lpthreads_lmach_lexc=no
14831 fi
14832 rm -f conftest*
14833 else
14834   cat > conftest.$ac_ext <<EOF
14835 #line 14836 "configure"
14836 #include "confdefs.h"
14837 /* pthread test headers */
14838 #include <pthread.h>
14839 #ifndef NULL
14840 #define NULL (void*)0
14841 #endif
14842
14843 static void *task(p)
14844         void *p;
14845 {
14846         return (void *) (p == NULL);
14847 }
14848
14849
14850 int main(argc, argv)
14851         int argc;
14852         char **argv;
14853 {
14854
14855         /* pthread test function */
14856         pthread_t t;
14857         int status;
14858         int detach = 1;
14859
14860 #ifdef HAVE_PTHREADS_FINAL
14861         /* Final pthreads */
14862         pthread_attr_t attr;
14863
14864         status = pthread_attr_init(&attr);
14865         if( status ) return status;
14866
14867 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14868         if( !detach ) {
14869 #if defined( PTHREAD_CREATE_JOINABLE )
14870                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14871 #else
14872                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14873 #endif
14874
14875 #ifdef PTHREAD_CREATE_DETACHED
14876         } else {
14877                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14878 #endif
14879         }
14880         if( status ) return status;
14881 #endif
14882
14883         status = pthread_create( &t, &attr, task, NULL );
14884         if( status ) return status;
14885
14886 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14887         if( detach ) {
14888                 /* give thread a chance to complete */
14889                 /* it should remain joinable and hence detachable */
14890                 sleep( 1 );
14891
14892                 status = pthread_detach( t );
14893                 if( status ) return status;
14894         }
14895 #endif
14896
14897 #else
14898         /* Draft 4 pthreads */
14899         status = pthread_create( &t, pthread_attr_default, task, NULL );
14900         if( status ) return status;
14901
14902         if( detach ) {
14903                 /* give thread a chance to complete */
14904                 /* it should remain joinable and hence detachable */
14905                 sleep( 1 );
14906
14907                 status = pthread_detach( &t );
14908                 if( status ) return status;
14909         }
14910 #endif
14911
14912 #ifdef HAVE_LINUX_THREADS
14913         pthread_kill_other_threads_np();
14914 #endif
14915
14916         return 0;
14917
14918 }
14919
14920 EOF
14921 if { (eval echo configure:14922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14922 then
14923   ol_cv_pthread_lpthreads_lmach_lexc=yes
14924 else
14925   echo "configure: failed program was:" >&5
14926   cat conftest.$ac_ext >&5
14927   rm -fr conftest*
14928   ol_cv_pthread_lpthreads_lmach_lexc=no
14929 fi
14930 rm -fr conftest*
14931 fi
14932
14933
14934                 # restore the LIBS
14935                 LIBS="$ol_LIBS"
14936         
14937 fi
14938
14939 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14940
14941         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14942                 ol_link_pthreads="-lpthreads -lmach -lexc"
14943                 ol_link_threads=posix
14944         fi
14945 fi
14946
14947                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14948 if test "$ol_link_threads" = no ; then
14949         # try -lpthreads -lexc
14950         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14951 echo "configure:14952: checking for pthread link with -lpthreads -lexc" >&5
14952 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14953   echo $ac_n "(cached) $ac_c" 1>&6
14954 else
14955   
14956                 # save the flags
14957                 ol_LIBS="$LIBS"
14958                 LIBS="-lpthreads -lexc $LIBS"
14959
14960                 if test "$cross_compiling" = yes; then
14961   cat > conftest.$ac_ext <<EOF
14962 #line 14963 "configure"
14963 #include "confdefs.h"
14964 /* pthread test headers */
14965 #include <pthread.h>
14966 #ifndef NULL
14967 #define NULL (void*)0
14968 #endif
14969
14970 static void *task(p)
14971         void *p;
14972 {
14973         return (void *) (p == NULL);
14974 }
14975
14976 int main() {
14977
14978         /* pthread test function */
14979         pthread_t t;
14980         int status;
14981         int detach = 1;
14982
14983 #ifdef HAVE_PTHREADS_FINAL
14984         /* Final pthreads */
14985         pthread_attr_t attr;
14986
14987         status = pthread_attr_init(&attr);
14988         if( status ) return status;
14989
14990 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14991         if( !detach ) {
14992 #if defined( PTHREAD_CREATE_JOINABLE )
14993                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14994 #else
14995                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14996 #endif
14997
14998 #ifdef PTHREAD_CREATE_DETACHED
14999         } else {
15000                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15001 #endif
15002         }
15003         if( status ) return status;
15004 #endif
15005
15006         status = pthread_create( &t, &attr, task, NULL );
15007         if( status ) return status;
15008
15009 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15010         if( detach ) {
15011                 /* give thread a chance to complete */
15012                 /* it should remain joinable and hence detachable */
15013                 sleep( 1 );
15014
15015                 status = pthread_detach( t );
15016                 if( status ) return status;
15017         }
15018 #endif
15019
15020 #else
15021         /* Draft 4 pthreads */
15022         status = pthread_create( &t, pthread_attr_default, task, NULL );
15023         if( status ) return status;
15024
15025         if( detach ) {
15026                 /* give thread a chance to complete */
15027                 /* it should remain joinable and hence detachable */
15028                 sleep( 1 );
15029
15030                 status = pthread_detach( &t );
15031                 if( status ) return status;
15032         }
15033 #endif
15034
15035 #ifdef HAVE_LINUX_THREADS
15036         pthread_kill_other_threads_np();
15037 #endif
15038
15039         return 0;
15040
15041 ; return 0; }
15042 EOF
15043 if { (eval echo configure:15044: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15044   rm -rf conftest*
15045   ol_cv_pthread_lpthreads_lexc=yes
15046 else
15047   echo "configure: failed program was:" >&5
15048   cat conftest.$ac_ext >&5
15049   rm -rf conftest*
15050   ol_cv_pthread_lpthreads_lexc=no
15051 fi
15052 rm -f conftest*
15053 else
15054   cat > conftest.$ac_ext <<EOF
15055 #line 15056 "configure"
15056 #include "confdefs.h"
15057 /* pthread test headers */
15058 #include <pthread.h>
15059 #ifndef NULL
15060 #define NULL (void*)0
15061 #endif
15062
15063 static void *task(p)
15064         void *p;
15065 {
15066         return (void *) (p == NULL);
15067 }
15068
15069
15070 int main(argc, argv)
15071         int argc;
15072         char **argv;
15073 {
15074
15075         /* pthread test function */
15076         pthread_t t;
15077         int status;
15078         int detach = 1;
15079
15080 #ifdef HAVE_PTHREADS_FINAL
15081         /* Final pthreads */
15082         pthread_attr_t attr;
15083
15084         status = pthread_attr_init(&attr);
15085         if( status ) return status;
15086
15087 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15088         if( !detach ) {
15089 #if defined( PTHREAD_CREATE_JOINABLE )
15090                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15091 #else
15092                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15093 #endif
15094
15095 #ifdef PTHREAD_CREATE_DETACHED
15096         } else {
15097                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15098 #endif
15099         }
15100         if( status ) return status;
15101 #endif
15102
15103         status = pthread_create( &t, &attr, task, NULL );
15104         if( status ) return status;
15105
15106 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15107         if( detach ) {
15108                 /* give thread a chance to complete */
15109                 /* it should remain joinable and hence detachable */
15110                 sleep( 1 );
15111
15112                 status = pthread_detach( t );
15113                 if( status ) return status;
15114         }
15115 #endif
15116
15117 #else
15118         /* Draft 4 pthreads */
15119         status = pthread_create( &t, pthread_attr_default, task, NULL );
15120         if( status ) return status;
15121
15122         if( detach ) {
15123                 /* give thread a chance to complete */
15124                 /* it should remain joinable and hence detachable */
15125                 sleep( 1 );
15126
15127                 status = pthread_detach( &t );
15128                 if( status ) return status;
15129         }
15130 #endif
15131
15132 #ifdef HAVE_LINUX_THREADS
15133         pthread_kill_other_threads_np();
15134 #endif
15135
15136         return 0;
15137
15138 }
15139
15140 EOF
15141 if { (eval echo configure:15142: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15142 then
15143   ol_cv_pthread_lpthreads_lexc=yes
15144 else
15145   echo "configure: failed program was:" >&5
15146   cat conftest.$ac_ext >&5
15147   rm -fr conftest*
15148   ol_cv_pthread_lpthreads_lexc=no
15149 fi
15150 rm -fr conftest*
15151 fi
15152
15153
15154                 # restore the LIBS
15155                 LIBS="$ol_LIBS"
15156         
15157 fi
15158
15159 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
15160
15161         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
15162                 ol_link_pthreads="-lpthreads -lexc"
15163                 ol_link_threads=posix
15164         fi
15165 fi
15166
15167
15168                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
15169 if test "$ol_link_threads" = no ; then
15170         # try -lpthreads
15171         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
15172 echo "configure:15173: checking for pthread link with -lpthreads" >&5
15173 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
15174   echo $ac_n "(cached) $ac_c" 1>&6
15175 else
15176   
15177                 # save the flags
15178                 ol_LIBS="$LIBS"
15179                 LIBS="-lpthreads $LIBS"
15180
15181                 if test "$cross_compiling" = yes; then
15182   cat > conftest.$ac_ext <<EOF
15183 #line 15184 "configure"
15184 #include "confdefs.h"
15185 /* pthread test headers */
15186 #include <pthread.h>
15187 #ifndef NULL
15188 #define NULL (void*)0
15189 #endif
15190
15191 static void *task(p)
15192         void *p;
15193 {
15194         return (void *) (p == NULL);
15195 }
15196
15197 int main() {
15198
15199         /* pthread test function */
15200         pthread_t t;
15201         int status;
15202         int detach = 1;
15203
15204 #ifdef HAVE_PTHREADS_FINAL
15205         /* Final pthreads */
15206         pthread_attr_t attr;
15207
15208         status = pthread_attr_init(&attr);
15209         if( status ) return status;
15210
15211 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15212         if( !detach ) {
15213 #if defined( PTHREAD_CREATE_JOINABLE )
15214                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15215 #else
15216                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15217 #endif
15218
15219 #ifdef PTHREAD_CREATE_DETACHED
15220         } else {
15221                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15222 #endif
15223         }
15224         if( status ) return status;
15225 #endif
15226
15227         status = pthread_create( &t, &attr, task, NULL );
15228         if( status ) return status;
15229
15230 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15231         if( detach ) {
15232                 /* give thread a chance to complete */
15233                 /* it should remain joinable and hence detachable */
15234                 sleep( 1 );
15235
15236                 status = pthread_detach( t );
15237                 if( status ) return status;
15238         }
15239 #endif
15240
15241 #else
15242         /* Draft 4 pthreads */
15243         status = pthread_create( &t, pthread_attr_default, task, NULL );
15244         if( status ) return status;
15245
15246         if( detach ) {
15247                 /* give thread a chance to complete */
15248                 /* it should remain joinable and hence detachable */
15249                 sleep( 1 );
15250
15251                 status = pthread_detach( &t );
15252                 if( status ) return status;
15253         }
15254 #endif
15255
15256 #ifdef HAVE_LINUX_THREADS
15257         pthread_kill_other_threads_np();
15258 #endif
15259
15260         return 0;
15261
15262 ; return 0; }
15263 EOF
15264 if { (eval echo configure:15265: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15265   rm -rf conftest*
15266   ol_cv_pthread_lib_lpthreads=yes
15267 else
15268   echo "configure: failed program was:" >&5
15269   cat conftest.$ac_ext >&5
15270   rm -rf conftest*
15271   ol_cv_pthread_lib_lpthreads=no
15272 fi
15273 rm -f conftest*
15274 else
15275   cat > conftest.$ac_ext <<EOF
15276 #line 15277 "configure"
15277 #include "confdefs.h"
15278 /* pthread test headers */
15279 #include <pthread.h>
15280 #ifndef NULL
15281 #define NULL (void*)0
15282 #endif
15283
15284 static void *task(p)
15285         void *p;
15286 {
15287         return (void *) (p == NULL);
15288 }
15289
15290
15291 int main(argc, argv)
15292         int argc;
15293         char **argv;
15294 {
15295
15296         /* pthread test function */
15297         pthread_t t;
15298         int status;
15299         int detach = 1;
15300
15301 #ifdef HAVE_PTHREADS_FINAL
15302         /* Final pthreads */
15303         pthread_attr_t attr;
15304
15305         status = pthread_attr_init(&attr);
15306         if( status ) return status;
15307
15308 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15309         if( !detach ) {
15310 #if defined( PTHREAD_CREATE_JOINABLE )
15311                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15312 #else
15313                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15314 #endif
15315
15316 #ifdef PTHREAD_CREATE_DETACHED
15317         } else {
15318                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15319 #endif
15320         }
15321         if( status ) return status;
15322 #endif
15323
15324         status = pthread_create( &t, &attr, task, NULL );
15325         if( status ) return status;
15326
15327 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15328         if( detach ) {
15329                 /* give thread a chance to complete */
15330                 /* it should remain joinable and hence detachable */
15331                 sleep( 1 );
15332
15333                 status = pthread_detach( t );
15334                 if( status ) return status;
15335         }
15336 #endif
15337
15338 #else
15339         /* Draft 4 pthreads */
15340         status = pthread_create( &t, pthread_attr_default, task, NULL );
15341         if( status ) return status;
15342
15343         if( detach ) {
15344                 /* give thread a chance to complete */
15345                 /* it should remain joinable and hence detachable */
15346                 sleep( 1 );
15347
15348                 status = pthread_detach( &t );
15349                 if( status ) return status;
15350         }
15351 #endif
15352
15353 #ifdef HAVE_LINUX_THREADS
15354         pthread_kill_other_threads_np();
15355 #endif
15356
15357         return 0;
15358
15359 }
15360
15361 EOF
15362 if { (eval echo configure:15363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15363 then
15364   ol_cv_pthread_lib_lpthreads=yes
15365 else
15366   echo "configure: failed program was:" >&5
15367   cat conftest.$ac_ext >&5
15368   rm -fr conftest*
15369   ol_cv_pthread_lib_lpthreads=no
15370 fi
15371 rm -fr conftest*
15372 fi
15373
15374
15375                 # restore the LIBS
15376                 LIBS="$ol_LIBS"
15377         
15378 fi
15379
15380 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15381
15382         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15383                 ol_link_pthreads="-lpthreads"
15384                 ol_link_threads=posix
15385         fi
15386 fi
15387
15388
15389                 if test $ol_link_threads != no ; then
15390                         cat >> confdefs.h <<\EOF
15391 #define HAVE_PTHREADS 1
15392 EOF
15393
15394
15395                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15396
15397                                                 save_CPPFLAGS="$CPPFLAGS"
15398                         save_LIBS="$LIBS"
15399                         LIBS="$LTHREAD_LIBS $LIBS"
15400
15401                                                                                                 for ac_func in sched_yield pthread_yield
15402 do
15403 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15404 echo "configure:15405: checking for $ac_func" >&5
15405 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15406   echo $ac_n "(cached) $ac_c" 1>&6
15407 else
15408   cat > conftest.$ac_ext <<EOF
15409 #line 15410 "configure"
15410 #include "confdefs.h"
15411 /* System header to define __stub macros and hopefully few prototypes,
15412     which can conflict with char $ac_func(); below.  */
15413 #include <assert.h>
15414 /* Override any gcc2 internal prototype to avoid an error.  */
15415 /* We use char because int might match the return type of a gcc2
15416     builtin and then its argument prototype would still apply.  */
15417 char $ac_func();
15418 char (*f)();
15419
15420 int main() {
15421
15422 /* The GNU C library defines this for functions which it implements
15423     to always fail with ENOSYS.  Some functions are actually named
15424     something starting with __ and the normal name is an alias.  */
15425 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15426 choke me
15427 #else
15428 f = $ac_func;
15429 #endif
15430
15431 ; return 0; }
15432 EOF
15433 if { (eval echo configure:15434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15434   rm -rf conftest*
15435   eval "ac_cv_func_$ac_func=yes"
15436 else
15437   echo "configure: failed program was:" >&5
15438   cat conftest.$ac_ext >&5
15439   rm -rf conftest*
15440   eval "ac_cv_func_$ac_func=no"
15441 fi
15442 rm -f conftest*
15443 fi
15444
15445 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15446   echo "$ac_t""yes" 1>&6
15447     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15448   cat >> confdefs.h <<EOF
15449 #define $ac_tr_func 1
15450 EOF
15451  
15452 else
15453   echo "$ac_t""no" 1>&6
15454 fi
15455 done
15456
15457
15458                         if test $ac_cv_func_sched_yield = no -a \
15459                                 $ac_cv_func_pthread_yield = no ; then
15460                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15461 echo "configure:15462: checking for sched_yield in -lrt" >&5
15462 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15463 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15464   echo $ac_n "(cached) $ac_c" 1>&6
15465 else
15466   ac_save_LIBS="$LIBS"
15467 LIBS="-lrt  $LIBS"
15468 cat > conftest.$ac_ext <<EOF
15469 #line 15470 "configure"
15470 #include "confdefs.h"
15471 /* Override any gcc2 internal prototype to avoid an error.  */
15472 /* We use char because int might match the return type of a gcc2
15473     builtin and then its argument prototype would still apply.  */
15474 char sched_yield();
15475
15476 int main() {
15477 sched_yield()
15478 ; return 0; }
15479 EOF
15480 if { (eval echo configure:15481: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15481   rm -rf conftest*
15482   eval "ac_cv_lib_$ac_lib_var=yes"
15483 else
15484   echo "configure: failed program was:" >&5
15485   cat conftest.$ac_ext >&5
15486   rm -rf conftest*
15487   eval "ac_cv_lib_$ac_lib_var=no"
15488 fi
15489 rm -f conftest*
15490 LIBS="$ac_save_LIBS"
15491
15492 fi
15493 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15494   echo "$ac_t""yes" 1>&6
15495   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15496                                         cat >> confdefs.h <<\EOF
15497 #define HAVE_SCHED_YIELD 1
15498 EOF
15499
15500                                         ac_cv_func_sched_yield=yes
15501 else
15502   echo "$ac_t""no" 1>&6
15503 ac_cv_func_sched_yield=no
15504 fi
15505
15506                         fi
15507                         if test $ac_cv_func_sched_yield = no -a \
15508                                 $ac_cv_func_pthread_yield = no ; then
15509                                                                                                 for ac_func in thr_yield
15510 do
15511 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15512 echo "configure:15513: checking for $ac_func" >&5
15513 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15514   echo $ac_n "(cached) $ac_c" 1>&6
15515 else
15516   cat > conftest.$ac_ext <<EOF
15517 #line 15518 "configure"
15518 #include "confdefs.h"
15519 /* System header to define __stub macros and hopefully few prototypes,
15520     which can conflict with char $ac_func(); below.  */
15521 #include <assert.h>
15522 /* Override any gcc2 internal prototype to avoid an error.  */
15523 /* We use char because int might match the return type of a gcc2
15524     builtin and then its argument prototype would still apply.  */
15525 char $ac_func();
15526 char (*f)();
15527
15528 int main() {
15529
15530 /* The GNU C library defines this for functions which it implements
15531     to always fail with ENOSYS.  Some functions are actually named
15532     something starting with __ and the normal name is an alias.  */
15533 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15534 choke me
15535 #else
15536 f = $ac_func;
15537 #endif
15538
15539 ; return 0; }
15540 EOF
15541 if { (eval echo configure:15542: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15542   rm -rf conftest*
15543   eval "ac_cv_func_$ac_func=yes"
15544 else
15545   echo "configure: failed program was:" >&5
15546   cat conftest.$ac_ext >&5
15547   rm -rf conftest*
15548   eval "ac_cv_func_$ac_func=no"
15549 fi
15550 rm -f conftest*
15551 fi
15552
15553 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15554   echo "$ac_t""yes" 1>&6
15555     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15556   cat >> confdefs.h <<EOF
15557 #define $ac_tr_func 1
15558 EOF
15559  
15560 else
15561   echo "$ac_t""no" 1>&6
15562 fi
15563 done
15564
15565                         fi
15566                         if test $ac_cv_func_sched_yield = no -a \
15567                                 $ac_cv_func_pthread_yield = no -a \
15568                                 "$ac_cv_func_thr_yield" = no ; then
15569                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15570                         fi
15571
15572                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15573 do
15574 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15575 echo "configure:15576: checking for $ac_func" >&5
15576 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15577   echo $ac_n "(cached) $ac_c" 1>&6
15578 else
15579   cat > conftest.$ac_ext <<EOF
15580 #line 15581 "configure"
15581 #include "confdefs.h"
15582 /* System header to define __stub macros and hopefully few prototypes,
15583     which can conflict with char $ac_func(); below.  */
15584 #include <assert.h>
15585 /* Override any gcc2 internal prototype to avoid an error.  */
15586 /* We use char because int might match the return type of a gcc2
15587     builtin and then its argument prototype would still apply.  */
15588 char $ac_func();
15589 char (*f)();
15590
15591 int main() {
15592
15593 /* The GNU C library defines this for functions which it implements
15594     to always fail with ENOSYS.  Some functions are actually named
15595     something starting with __ and the normal name is an alias.  */
15596 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15597 choke me
15598 #else
15599 f = $ac_func;
15600 #endif
15601
15602 ; return 0; }
15603 EOF
15604 if { (eval echo configure:15605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15605   rm -rf conftest*
15606   eval "ac_cv_func_$ac_func=yes"
15607 else
15608   echo "configure: failed program was:" >&5
15609   cat conftest.$ac_ext >&5
15610   rm -rf conftest*
15611   eval "ac_cv_func_$ac_func=no"
15612 fi
15613 rm -f conftest*
15614 fi
15615
15616 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15617   echo "$ac_t""yes" 1>&6
15618     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15619   cat >> confdefs.h <<EOF
15620 #define $ac_tr_func 1
15621 EOF
15622  
15623 else
15624   echo "$ac_t""no" 1>&6
15625 fi
15626 done
15627
15628
15629                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15630 echo "configure:15631: checking for pthread_detach with <pthread.h>" >&5
15631 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15632   echo $ac_n "(cached) $ac_c" 1>&6
15633 else
15634   
15635                                                                 cat > conftest.$ac_ext <<EOF
15636 #line 15637 "configure"
15637 #include "confdefs.h"
15638
15639 #include <pthread.h>
15640 #ifndef NULL
15641 #define NULL (void*)0
15642 #endif
15643
15644 int main() {
15645 pthread_detach(NULL);
15646 ; return 0; }
15647 EOF
15648 if { (eval echo configure:15649: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15649   rm -rf conftest*
15650   ol_cv_func_pthread_detach=yes
15651 else
15652   echo "configure: failed program was:" >&5
15653   cat conftest.$ac_ext >&5
15654   rm -rf conftest*
15655   ol_cv_func_pthread_detach=no
15656 fi
15657 rm -f conftest*
15658                         
15659 fi
15660
15661 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15662
15663                         if test $ol_cv_func_pthread_detach = no ; then
15664                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15665                         fi
15666
15667                         cat >> confdefs.h <<\EOF
15668 #define HAVE_PTHREAD_DETACH 1
15669 EOF
15670
15671
15672                                                 for ac_func in \
15673                                 pthread_setconcurrency \
15674                                 pthread_getconcurrency \
15675                                 thr_setconcurrency \
15676                                 thr_getconcurrency \
15677                         
15678 do
15679 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15680 echo "configure:15681: checking for $ac_func" >&5
15681 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15682   echo $ac_n "(cached) $ac_c" 1>&6
15683 else
15684   cat > conftest.$ac_ext <<EOF
15685 #line 15686 "configure"
15686 #include "confdefs.h"
15687 /* System header to define __stub macros and hopefully few prototypes,
15688     which can conflict with char $ac_func(); below.  */
15689 #include <assert.h>
15690 /* Override any gcc2 internal prototype to avoid an error.  */
15691 /* We use char because int might match the return type of a gcc2
15692     builtin and then its argument prototype would still apply.  */
15693 char $ac_func();
15694 char (*f)();
15695
15696 int main() {
15697
15698 /* The GNU C library defines this for functions which it implements
15699     to always fail with ENOSYS.  Some functions are actually named
15700     something starting with __ and the normal name is an alias.  */
15701 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15702 choke me
15703 #else
15704 f = $ac_func;
15705 #endif
15706
15707 ; return 0; }
15708 EOF
15709 if { (eval echo configure:15710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15710   rm -rf conftest*
15711   eval "ac_cv_func_$ac_func=yes"
15712 else
15713   echo "configure: failed program was:" >&5
15714   cat conftest.$ac_ext >&5
15715   rm -rf conftest*
15716   eval "ac_cv_func_$ac_func=no"
15717 fi
15718 rm -f conftest*
15719 fi
15720
15721 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15722   echo "$ac_t""yes" 1>&6
15723     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15724   cat >> confdefs.h <<EOF
15725 #define $ac_tr_func 1
15726 EOF
15727  
15728 else
15729   echo "$ac_t""no" 1>&6
15730 fi
15731 done
15732
15733
15734                         
15735         for ac_func in pthread_kill_other_threads_np
15736 do
15737 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15738 echo "configure:15739: checking for $ac_func" >&5
15739 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15740   echo $ac_n "(cached) $ac_c" 1>&6
15741 else
15742   cat > conftest.$ac_ext <<EOF
15743 #line 15744 "configure"
15744 #include "confdefs.h"
15745 /* System header to define __stub macros and hopefully few prototypes,
15746     which can conflict with char $ac_func(); below.  */
15747 #include <assert.h>
15748 /* Override any gcc2 internal prototype to avoid an error.  */
15749 /* We use char because int might match the return type of a gcc2
15750     builtin and then its argument prototype would still apply.  */
15751 char $ac_func();
15752 char (*f)();
15753
15754 int main() {
15755
15756 /* The GNU C library defines this for functions which it implements
15757     to always fail with ENOSYS.  Some functions are actually named
15758     something starting with __ and the normal name is an alias.  */
15759 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15760 choke me
15761 #else
15762 f = $ac_func;
15763 #endif
15764
15765 ; return 0; }
15766 EOF
15767 if { (eval echo configure:15768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15768   rm -rf conftest*
15769   eval "ac_cv_func_$ac_func=yes"
15770 else
15771   echo "configure: failed program was:" >&5
15772   cat conftest.$ac_ext >&5
15773   rm -rf conftest*
15774   eval "ac_cv_func_$ac_func=no"
15775 fi
15776 rm -f conftest*
15777 fi
15778
15779 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15780   echo "$ac_t""yes" 1>&6
15781     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15782   cat >> confdefs.h <<EOF
15783 #define $ac_tr_func 1
15784 EOF
15785  
15786 else
15787   echo "$ac_t""no" 1>&6
15788 fi
15789 done
15790
15791         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15792 echo "configure:15793: checking for LinuxThreads implementation" >&5
15793 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15794   echo $ac_n "(cached) $ac_c" 1>&6
15795 else
15796   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15797 fi
15798
15799 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15800
15801                         
15802         
15803         
15804         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15805 echo "configure:15806: checking for LinuxThreads consistency" >&5
15806 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15807   echo $ac_n "(cached) $ac_c" 1>&6
15808 else
15809   
15810                 if test $ol_cv_header_linux_threads = yes -a \
15811                         $ol_cv_sys_linux_threads = yes; then
15812                         ol_cv_linux_threads=yes
15813                 elif test $ol_cv_header_linux_threads = no -a \
15814                         $ol_cv_sys_linux_threads = no; then
15815                         ol_cv_linux_threads=no
15816                 else
15817                         ol_cv_linux_threads=error
15818                 fi
15819         
15820 fi
15821
15822 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15823
15824
15825                         if test $ol_cv_linux_threads = error; then
15826                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15827                         fi
15828
15829                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15830 echo "configure:15831: checking if pthread_create() works" >&5
15831 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15832   echo $ac_n "(cached) $ac_c" 1>&6
15833 else
15834   
15835                         if test "$cross_compiling" = yes; then
15836                                 ol_cv_pthread_create_works=yes
15837 else
15838   cat > conftest.$ac_ext <<EOF
15839 #line 15840 "configure"
15840 #include "confdefs.h"
15841 /* pthread test headers */
15842 #include <pthread.h>
15843 #ifndef NULL
15844 #define NULL (void*)0
15845 #endif
15846
15847 static void *task(p)
15848         void *p;
15849 {
15850         return (void *) (p == NULL);
15851 }
15852
15853
15854 int main(argc, argv)
15855         int argc;
15856         char **argv;
15857 {
15858
15859         /* pthread test function */
15860         pthread_t t;
15861         int status;
15862         int detach = 1;
15863
15864 #ifdef HAVE_PTHREADS_FINAL
15865         /* Final pthreads */
15866         pthread_attr_t attr;
15867
15868         status = pthread_attr_init(&attr);
15869         if( status ) return status;
15870
15871 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15872         if( !detach ) {
15873 #if defined( PTHREAD_CREATE_JOINABLE )
15874                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15875 #else
15876                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15877 #endif
15878
15879 #ifdef PTHREAD_CREATE_DETACHED
15880         } else {
15881                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15882 #endif
15883         }
15884         if( status ) return status;
15885 #endif
15886
15887         status = pthread_create( &t, &attr, task, NULL );
15888         if( status ) return status;
15889
15890 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15891         if( detach ) {
15892                 /* give thread a chance to complete */
15893                 /* it should remain joinable and hence detachable */
15894                 sleep( 1 );
15895
15896                 status = pthread_detach( t );
15897                 if( status ) return status;
15898         }
15899 #endif
15900
15901 #else
15902         /* Draft 4 pthreads */
15903         status = pthread_create( &t, pthread_attr_default, task, NULL );
15904         if( status ) return status;
15905
15906         if( detach ) {
15907                 /* give thread a chance to complete */
15908                 /* it should remain joinable and hence detachable */
15909                 sleep( 1 );
15910
15911                 status = pthread_detach( &t );
15912                 if( status ) return status;
15913         }
15914 #endif
15915
15916 #ifdef HAVE_LINUX_THREADS
15917         pthread_kill_other_threads_np();
15918 #endif
15919
15920         return 0;
15921
15922 }
15923
15924 EOF
15925 if { (eval echo configure:15926: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15926 then
15927   ol_cv_pthread_create_works=yes
15928 else
15929   echo "configure: failed program was:" >&5
15930   cat conftest.$ac_ext >&5
15931   rm -fr conftest*
15932   ol_cv_pthread_create_works=no
15933 fi
15934 rm -fr conftest*
15935 fi
15936
15937 fi
15938
15939 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15940
15941                         if test $ol_cv_pthread_create_works = no ; then
15942                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15943                         fi
15944
15945                                                 if test $ol_with_yielding_select = auto ; then
15946                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15947 echo "configure:15948: checking if select yields when using pthreads" >&5
15948 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15949   echo $ac_n "(cached) $ac_c" 1>&6
15950 else
15951   
15952                                 if test "$cross_compiling" = yes; then
15953   ol_cv_pthread_select_yields=cross
15954 else
15955   cat > conftest.$ac_ext <<EOF
15956 #line 15957 "configure"
15957 #include "confdefs.h"
15958
15959 #include <sys/types.h>
15960 #include <sys/time.h>
15961 #include <unistd.h>
15962 #include <pthread.h>
15963 #ifndef NULL
15964 #define NULL (void*) 0
15965 #endif
15966
15967 static int fildes[2];
15968
15969 static void *task(p)
15970         void *p;
15971 {
15972         int i;
15973         struct timeval tv;
15974
15975         fd_set rfds;
15976
15977         tv.tv_sec=10;
15978         tv.tv_usec=0;
15979
15980         FD_ZERO(&rfds);
15981         FD_SET(fildes[0], &rfds);
15982
15983         /* we're not interested in any fds */
15984         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
15985
15986         if(i < 0) {
15987                 perror("select");
15988                 exit(10);
15989         }
15990
15991         exit(0); /* if we exit here, the select blocked the whole process */
15992 }
15993
15994 int main(argc, argv)
15995         int argc;
15996         char **argv;
15997 {
15998         pthread_t t;
15999
16000         /* create a pipe to select */
16001         if(pipe(&fildes[0])) {
16002                 perror("select");
16003                 exit(1);
16004         }
16005
16006 #ifdef HAVE_PTHREAD_SETCONCURRENCY
16007         (void) pthread_setconcurrency(2);
16008 #else
16009 #ifdef HAVE_THR_SETCONCURRENCY
16010         /* Set Solaris LWP concurrency to 2 */
16011         thr_setconcurrency(2);
16012 #endif
16013 #endif
16014
16015 #if HAVE_PTHREADS_D4
16016         pthread_create(&t, pthread_attr_default, task, NULL);
16017 #else
16018         pthread_create(&t, NULL, task, NULL);
16019 #endif
16020
16021 #if HAVE_SCHED_YIELD
16022         sched_yield();  /* make sure task runs first */
16023 #else
16024 #ifdef HAVE_PTHREAD_YIELD
16025         pthread_yield();        /* make sure task runs first */
16026 #endif
16027 #endif
16028
16029         exit(2);
16030 }
16031 EOF
16032 if { (eval echo configure:16033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16033 then
16034   ol_cv_pthread_select_yields=no
16035 else
16036   echo "configure: failed program was:" >&5
16037   cat conftest.$ac_ext >&5
16038   rm -fr conftest*
16039   ol_cv_pthread_select_yields=yes
16040 fi
16041 rm -fr conftest*
16042 fi
16043
16044 fi
16045
16046 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
16047
16048                                 if test $ol_cv_pthread_select_yields = cross ; then
16049                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
16050                                 fi
16051
16052                                 if test $ol_cv_pthread_select_yields = yes ; then
16053                                         ol_with_yielding_select=yes
16054                                 fi
16055                         fi
16056
16057                                                 CPPFLAGS="$save_CPPFLAGS"
16058                         LIBS="$save_LIBS"
16059                 else
16060                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
16061                 fi
16062         fi
16063
16064         if test $ol_with_threads = posix ; then
16065                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
16066         fi
16067 fi
16068
16069 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16070         -o $ol_with_threads = mach ; then
16071
16072                 for ac_hdr in mach/cthreads.h cthreads.h
16073 do
16074 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16075 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16076 echo "configure:16077: checking for $ac_hdr" >&5
16077 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16078   echo $ac_n "(cached) $ac_c" 1>&6
16079 else
16080   cat > conftest.$ac_ext <<EOF
16081 #line 16082 "configure"
16082 #include "confdefs.h"
16083 #include <$ac_hdr>
16084 EOF
16085 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16086 { (eval echo configure:16087: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16087 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16088 if test -z "$ac_err"; then
16089   rm -rf conftest*
16090   eval "ac_cv_header_$ac_safe=yes"
16091 else
16092   echo "$ac_err" >&5
16093   echo "configure: failed program was:" >&5
16094   cat conftest.$ac_ext >&5
16095   rm -rf conftest*
16096   eval "ac_cv_header_$ac_safe=no"
16097 fi
16098 rm -f conftest*
16099 fi
16100 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16101   echo "$ac_t""yes" 1>&6
16102     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16103   cat >> confdefs.h <<EOF
16104 #define $ac_tr_hdr 1
16105 EOF
16106  
16107 else
16108   echo "$ac_t""no" 1>&6
16109 fi
16110 done
16111
16112         if test $ac_cv_header_mach_cthreads_h = yes ; then
16113                 ol_with_threads=found
16114
16115                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16116 echo "configure:16117: checking for cthread_fork" >&5
16117 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16118   echo $ac_n "(cached) $ac_c" 1>&6
16119 else
16120   cat > conftest.$ac_ext <<EOF
16121 #line 16122 "configure"
16122 #include "confdefs.h"
16123 /* System header to define __stub macros and hopefully few prototypes,
16124     which can conflict with char cthread_fork(); below.  */
16125 #include <assert.h>
16126 /* Override any gcc2 internal prototype to avoid an error.  */
16127 /* We use char because int might match the return type of a gcc2
16128     builtin and then its argument prototype would still apply.  */
16129 char cthread_fork();
16130 char (*f)();
16131
16132 int main() {
16133
16134 /* The GNU C library defines this for functions which it implements
16135     to always fail with ENOSYS.  Some functions are actually named
16136     something starting with __ and the normal name is an alias.  */
16137 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16138 choke me
16139 #else
16140 f = cthread_fork;
16141 #endif
16142
16143 ; return 0; }
16144 EOF
16145 if { (eval echo configure:16146: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16146   rm -rf conftest*
16147   eval "ac_cv_func_cthread_fork=yes"
16148 else
16149   echo "configure: failed program was:" >&5
16150   cat conftest.$ac_ext >&5
16151   rm -rf conftest*
16152   eval "ac_cv_func_cthread_fork=no"
16153 fi
16154 rm -f conftest*
16155 fi
16156
16157 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16158   echo "$ac_t""yes" 1>&6
16159   ol_link_threads=yes
16160 else
16161   echo "$ac_t""no" 1>&6
16162 fi
16163
16164
16165                 if test $ol_link_threads = no ; then
16166                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
16167 echo "configure:16168: checking for cthread_fork with -all_load" >&5
16168 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
16169   echo $ac_n "(cached) $ac_c" 1>&6
16170 else
16171   
16172                                                                 save_LIBS="$LIBS"
16173                                 LIBS="-all_load $LIBS"
16174                                 cat > conftest.$ac_ext <<EOF
16175 #line 16176 "configure"
16176 #include "confdefs.h"
16177 #include <mach/cthreads.h>
16178 int main() {
16179
16180                                         cthread_fork((void *)0, (void *)0);
16181                                         
16182 ; return 0; }
16183 EOF
16184 if { (eval echo configure:16185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16185   rm -rf conftest*
16186   ol_cv_cthread_all_load=yes
16187 else
16188   echo "configure: failed program was:" >&5
16189   cat conftest.$ac_ext >&5
16190   rm -rf conftest*
16191   ol_cv_cthread_all_load=no
16192 fi
16193 rm -f conftest*
16194                                                                 LIBS="$save_LIBS"
16195                         
16196 fi
16197
16198 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
16199
16200                         if test $ol_cv_cthread_all_load = yes ; then
16201                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
16202                                 ol_link_threads=mach
16203                                 ol_with_threads=found
16204                         fi
16205                 fi
16206
16207         elif test $ac_cv_header_cthreads_h = yes ; then
16208                                 
16209                 ol_with_threads=found
16210  
16211                                 save_LIBS="$LIBS"
16212                 LIBS="$LIBS -lthreads"
16213                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16214 echo "configure:16215: checking for cthread_fork" >&5
16215 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16216   echo $ac_n "(cached) $ac_c" 1>&6
16217 else
16218   cat > conftest.$ac_ext <<EOF
16219 #line 16220 "configure"
16220 #include "confdefs.h"
16221 /* System header to define __stub macros and hopefully few prototypes,
16222     which can conflict with char cthread_fork(); below.  */
16223 #include <assert.h>
16224 /* Override any gcc2 internal prototype to avoid an error.  */
16225 /* We use char because int might match the return type of a gcc2
16226     builtin and then its argument prototype would still apply.  */
16227 char cthread_fork();
16228 char (*f)();
16229
16230 int main() {
16231
16232 /* The GNU C library defines this for functions which it implements
16233     to always fail with ENOSYS.  Some functions are actually named
16234     something starting with __ and the normal name is an alias.  */
16235 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16236 choke me
16237 #else
16238 f = cthread_fork;
16239 #endif
16240
16241 ; return 0; }
16242 EOF
16243 if { (eval echo configure:16244: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16244   rm -rf conftest*
16245   eval "ac_cv_func_cthread_fork=yes"
16246 else
16247   echo "configure: failed program was:" >&5
16248   cat conftest.$ac_ext >&5
16249   rm -rf conftest*
16250   eval "ac_cv_func_cthread_fork=no"
16251 fi
16252 rm -f conftest*
16253 fi
16254
16255 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16256   echo "$ac_t""yes" 1>&6
16257   ol_link_threads=yes
16258 else
16259   echo "$ac_t""no" 1>&6
16260 fi
16261
16262                 LIBS="$save_LIBS"
16263
16264                 if test $ol_link_threads = yes ; then
16265                         LTHREAD_LIBS="-lthreads"
16266                         ol_link_threads=mach
16267                         ol_with_threads=found
16268                 else
16269                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16270                 fi
16271
16272         elif test $ol_with_threads = mach ; then
16273                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16274         fi
16275
16276         if test $ol_link_threads = mach ; then
16277                 cat >> confdefs.h <<\EOF
16278 #define HAVE_MACH_CTHREADS 1
16279 EOF
16280
16281         elif test $ol_with_threads = found ; then
16282                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16283         fi
16284 fi
16285
16286 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16287         -o $ol_with_threads = pth ; then
16288
16289         for ac_hdr in pth.h
16290 do
16291 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16292 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16293 echo "configure:16294: checking for $ac_hdr" >&5
16294 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16295   echo $ac_n "(cached) $ac_c" 1>&6
16296 else
16297   cat > conftest.$ac_ext <<EOF
16298 #line 16299 "configure"
16299 #include "confdefs.h"
16300 #include <$ac_hdr>
16301 EOF
16302 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16303 { (eval echo configure:16304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16304 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16305 if test -z "$ac_err"; then
16306   rm -rf conftest*
16307   eval "ac_cv_header_$ac_safe=yes"
16308 else
16309   echo "$ac_err" >&5
16310   echo "configure: failed program was:" >&5
16311   cat conftest.$ac_ext >&5
16312   rm -rf conftest*
16313   eval "ac_cv_header_$ac_safe=no"
16314 fi
16315 rm -f conftest*
16316 fi
16317 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16318   echo "$ac_t""yes" 1>&6
16319     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16320   cat >> confdefs.h <<EOF
16321 #define $ac_tr_hdr 1
16322 EOF
16323  
16324 else
16325   echo "$ac_t""no" 1>&6
16326 fi
16327 done
16328
16329
16330         if test $ac_cv_header_pth_h = yes ; then
16331                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16332 echo "configure:16333: checking for pth_version in -lpth" >&5
16333 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16334 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16335   echo $ac_n "(cached) $ac_c" 1>&6
16336 else
16337   ac_save_LIBS="$LIBS"
16338 LIBS="-lpth  $LIBS"
16339 cat > conftest.$ac_ext <<EOF
16340 #line 16341 "configure"
16341 #include "confdefs.h"
16342 /* Override any gcc2 internal prototype to avoid an error.  */
16343 /* We use char because int might match the return type of a gcc2
16344     builtin and then its argument prototype would still apply.  */
16345 char pth_version();
16346
16347 int main() {
16348 pth_version()
16349 ; return 0; }
16350 EOF
16351 if { (eval echo configure:16352: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16352   rm -rf conftest*
16353   eval "ac_cv_lib_$ac_lib_var=yes"
16354 else
16355   echo "configure: failed program was:" >&5
16356   cat conftest.$ac_ext >&5
16357   rm -rf conftest*
16358   eval "ac_cv_lib_$ac_lib_var=no"
16359 fi
16360 rm -f conftest*
16361 LIBS="$ac_save_LIBS"
16362
16363 fi
16364 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16365   echo "$ac_t""yes" 1>&6
16366   have_pth=yes
16367 else
16368   echo "$ac_t""no" 1>&6
16369 have_pth=no
16370 fi
16371
16372
16373                 if test $have_pth = yes ; then
16374                         cat >> confdefs.h <<\EOF
16375 #define HAVE_GNU_PTH 1
16376 EOF
16377
16378                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16379                         ol_link_threads=pth
16380                         ol_with_threads=found
16381
16382                         if test $ol_with_yielding_select = auto ; then
16383                                 ol_with_yielding_select=yes
16384                         fi
16385                 fi
16386         fi
16387 fi
16388
16389 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16390         -o $ol_with_threads = lwp ; then
16391
16392                 for ac_hdr in thread.h synch.h
16393 do
16394 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16395 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16396 echo "configure:16397: checking for $ac_hdr" >&5
16397 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16398   echo $ac_n "(cached) $ac_c" 1>&6
16399 else
16400   cat > conftest.$ac_ext <<EOF
16401 #line 16402 "configure"
16402 #include "confdefs.h"
16403 #include <$ac_hdr>
16404 EOF
16405 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16406 { (eval echo configure:16407: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16407 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16408 if test -z "$ac_err"; then
16409   rm -rf conftest*
16410   eval "ac_cv_header_$ac_safe=yes"
16411 else
16412   echo "$ac_err" >&5
16413   echo "configure: failed program was:" >&5
16414   cat conftest.$ac_ext >&5
16415   rm -rf conftest*
16416   eval "ac_cv_header_$ac_safe=no"
16417 fi
16418 rm -f conftest*
16419 fi
16420 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16421   echo "$ac_t""yes" 1>&6
16422     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16423   cat >> confdefs.h <<EOF
16424 #define $ac_tr_hdr 1
16425 EOF
16426  
16427 else
16428   echo "$ac_t""no" 1>&6
16429 fi
16430 done
16431
16432         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16433                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16434 echo "configure:16435: checking for thr_create in -lthread" >&5
16435 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16436 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16437   echo $ac_n "(cached) $ac_c" 1>&6
16438 else
16439   ac_save_LIBS="$LIBS"
16440 LIBS="-lthread  $LIBS"
16441 cat > conftest.$ac_ext <<EOF
16442 #line 16443 "configure"
16443 #include "confdefs.h"
16444 /* Override any gcc2 internal prototype to avoid an error.  */
16445 /* We use char because int might match the return type of a gcc2
16446     builtin and then its argument prototype would still apply.  */
16447 char thr_create();
16448
16449 int main() {
16450 thr_create()
16451 ; return 0; }
16452 EOF
16453 if { (eval echo configure:16454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16454   rm -rf conftest*
16455   eval "ac_cv_lib_$ac_lib_var=yes"
16456 else
16457   echo "configure: failed program was:" >&5
16458   cat conftest.$ac_ext >&5
16459   rm -rf conftest*
16460   eval "ac_cv_lib_$ac_lib_var=no"
16461 fi
16462 rm -f conftest*
16463 LIBS="$ac_save_LIBS"
16464
16465 fi
16466 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16467   echo "$ac_t""yes" 1>&6
16468   have_thr=yes
16469 else
16470   echo "$ac_t""no" 1>&6
16471 have_thr=no
16472 fi
16473
16474
16475                 if test $have_thr = yes ; then
16476                         cat >> confdefs.h <<\EOF
16477 #define HAVE_THR 1
16478 EOF
16479
16480                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16481                         ol_link_threads=thr
16482
16483                         if test $ol_with_yielding_select = auto ; then
16484                                 ol_with_yielding_select=yes
16485                         fi
16486
16487                                                 for ac_func in \
16488                                 thr_setconcurrency \
16489                                 thr_getconcurrency \
16490                         
16491 do
16492 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16493 echo "configure:16494: checking for $ac_func" >&5
16494 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16495   echo $ac_n "(cached) $ac_c" 1>&6
16496 else
16497   cat > conftest.$ac_ext <<EOF
16498 #line 16499 "configure"
16499 #include "confdefs.h"
16500 /* System header to define __stub macros and hopefully few prototypes,
16501     which can conflict with char $ac_func(); below.  */
16502 #include <assert.h>
16503 /* Override any gcc2 internal prototype to avoid an error.  */
16504 /* We use char because int might match the return type of a gcc2
16505     builtin and then its argument prototype would still apply.  */
16506 char $ac_func();
16507 char (*f)();
16508
16509 int main() {
16510
16511 /* The GNU C library defines this for functions which it implements
16512     to always fail with ENOSYS.  Some functions are actually named
16513     something starting with __ and the normal name is an alias.  */
16514 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16515 choke me
16516 #else
16517 f = $ac_func;
16518 #endif
16519
16520 ; return 0; }
16521 EOF
16522 if { (eval echo configure:16523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16523   rm -rf conftest*
16524   eval "ac_cv_func_$ac_func=yes"
16525 else
16526   echo "configure: failed program was:" >&5
16527   cat conftest.$ac_ext >&5
16528   rm -rf conftest*
16529   eval "ac_cv_func_$ac_func=no"
16530 fi
16531 rm -f conftest*
16532 fi
16533
16534 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16535   echo "$ac_t""yes" 1>&6
16536     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16537   cat >> confdefs.h <<EOF
16538 #define $ac_tr_func 1
16539 EOF
16540  
16541 else
16542   echo "$ac_t""no" 1>&6
16543 fi
16544 done
16545
16546                 fi
16547         fi
16548
16549                 for ac_hdr in lwp/lwp.h
16550 do
16551 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16552 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16553 echo "configure:16554: checking for $ac_hdr" >&5
16554 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16555   echo $ac_n "(cached) $ac_c" 1>&6
16556 else
16557   cat > conftest.$ac_ext <<EOF
16558 #line 16559 "configure"
16559 #include "confdefs.h"
16560 #include <$ac_hdr>
16561 EOF
16562 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16563 { (eval echo configure:16564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16564 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16565 if test -z "$ac_err"; then
16566   rm -rf conftest*
16567   eval "ac_cv_header_$ac_safe=yes"
16568 else
16569   echo "$ac_err" >&5
16570   echo "configure: failed program was:" >&5
16571   cat conftest.$ac_ext >&5
16572   rm -rf conftest*
16573   eval "ac_cv_header_$ac_safe=no"
16574 fi
16575 rm -f conftest*
16576 fi
16577 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16578   echo "$ac_t""yes" 1>&6
16579     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16580   cat >> confdefs.h <<EOF
16581 #define $ac_tr_hdr 1
16582 EOF
16583  
16584 else
16585   echo "$ac_t""no" 1>&6
16586 fi
16587 done
16588
16589         if test $ac_cv_header_lwp_lwp_h = yes ; then
16590                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16591 echo "configure:16592: checking for lwp_create in -llwp" >&5
16592 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16593 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16594   echo $ac_n "(cached) $ac_c" 1>&6
16595 else
16596   ac_save_LIBS="$LIBS"
16597 LIBS="-llwp  $LIBS"
16598 cat > conftest.$ac_ext <<EOF
16599 #line 16600 "configure"
16600 #include "confdefs.h"
16601 /* Override any gcc2 internal prototype to avoid an error.  */
16602 /* We use char because int might match the return type of a gcc2
16603     builtin and then its argument prototype would still apply.  */
16604 char lwp_create();
16605
16606 int main() {
16607 lwp_create()
16608 ; return 0; }
16609 EOF
16610 if { (eval echo configure:16611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16611   rm -rf conftest*
16612   eval "ac_cv_lib_$ac_lib_var=yes"
16613 else
16614   echo "configure: failed program was:" >&5
16615   cat conftest.$ac_ext >&5
16616   rm -rf conftest*
16617   eval "ac_cv_lib_$ac_lib_var=no"
16618 fi
16619 rm -f conftest*
16620 LIBS="$ac_save_LIBS"
16621
16622 fi
16623 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16624   echo "$ac_t""yes" 1>&6
16625   have_lwp=yes
16626 else
16627   echo "$ac_t""no" 1>&6
16628 have_lwp=no
16629 fi
16630
16631
16632                 if test $have_lwp = yes ; then
16633                         cat >> confdefs.h <<\EOF
16634 #define HAVE_LWP 1
16635 EOF
16636
16637                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16638                         ol_link_threads=lwp
16639
16640                         if test $ol_with_yielding_select = auto ; then
16641                                 ol_with_yielding_select=no
16642                         fi
16643                 fi
16644         fi
16645 fi
16646
16647 if test $ol_with_yielding_select = yes ; then
16648         cat >> confdefs.h <<\EOF
16649 #define HAVE_YIELDING_SELECT 1
16650 EOF
16651
16652 fi
16653
16654 if test $ol_with_threads = manual ; then
16655                 ol_link_threads=yes
16656
16657         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16658
16659         for ac_hdr in pthread.h sched.h
16660 do
16661 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16662 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16663 echo "configure:16664: checking for $ac_hdr" >&5
16664 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16665   echo $ac_n "(cached) $ac_c" 1>&6
16666 else
16667   cat > conftest.$ac_ext <<EOF
16668 #line 16669 "configure"
16669 #include "confdefs.h"
16670 #include <$ac_hdr>
16671 EOF
16672 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16673 { (eval echo configure:16674: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16674 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16675 if test -z "$ac_err"; then
16676   rm -rf conftest*
16677   eval "ac_cv_header_$ac_safe=yes"
16678 else
16679   echo "$ac_err" >&5
16680   echo "configure: failed program was:" >&5
16681   cat conftest.$ac_ext >&5
16682   rm -rf conftest*
16683   eval "ac_cv_header_$ac_safe=no"
16684 fi
16685 rm -f conftest*
16686 fi
16687 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16688   echo "$ac_t""yes" 1>&6
16689     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16690   cat >> confdefs.h <<EOF
16691 #define $ac_tr_hdr 1
16692 EOF
16693  
16694 else
16695   echo "$ac_t""no" 1>&6
16696 fi
16697 done
16698
16699         for ac_func in sched_yield pthread_yield
16700 do
16701 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16702 echo "configure:16703: checking for $ac_func" >&5
16703 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16704   echo $ac_n "(cached) $ac_c" 1>&6
16705 else
16706   cat > conftest.$ac_ext <<EOF
16707 #line 16708 "configure"
16708 #include "confdefs.h"
16709 /* System header to define __stub macros and hopefully few prototypes,
16710     which can conflict with char $ac_func(); below.  */
16711 #include <assert.h>
16712 /* Override any gcc2 internal prototype to avoid an error.  */
16713 /* We use char because int might match the return type of a gcc2
16714     builtin and then its argument prototype would still apply.  */
16715 char $ac_func();
16716 char (*f)();
16717
16718 int main() {
16719
16720 /* The GNU C library defines this for functions which it implements
16721     to always fail with ENOSYS.  Some functions are actually named
16722     something starting with __ and the normal name is an alias.  */
16723 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16724 choke me
16725 #else
16726 f = $ac_func;
16727 #endif
16728
16729 ; return 0; }
16730 EOF
16731 if { (eval echo configure:16732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16732   rm -rf conftest*
16733   eval "ac_cv_func_$ac_func=yes"
16734 else
16735   echo "configure: failed program was:" >&5
16736   cat conftest.$ac_ext >&5
16737   rm -rf conftest*
16738   eval "ac_cv_func_$ac_func=no"
16739 fi
16740 rm -f conftest*
16741 fi
16742
16743 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16744   echo "$ac_t""yes" 1>&6
16745     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16746   cat >> confdefs.h <<EOF
16747 #define $ac_tr_func 1
16748 EOF
16749  
16750 else
16751   echo "$ac_t""no" 1>&6
16752 fi
16753 done
16754
16755         
16756         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16757 echo "configure:16758: checking for LinuxThreads pthread.h" >&5
16758 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16759   echo $ac_n "(cached) $ac_c" 1>&6
16760 else
16761   cat > conftest.$ac_ext <<EOF
16762 #line 16763 "configure"
16763 #include "confdefs.h"
16764 #include <pthread.h>
16765 EOF
16766 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16767   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16768   rm -rf conftest*
16769   ol_cv_header_linux_threads=yes
16770 else
16771   rm -rf conftest*
16772   ol_cv_header_linux_threads=no
16773 fi
16774 rm -f conftest*
16775
16776                 
16777 fi
16778
16779 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16780         if test $ol_cv_header_linux_threads = yes; then
16781                 cat >> confdefs.h <<\EOF
16782 #define HAVE_LINUX_THREADS 1
16783 EOF
16784
16785         fi
16786
16787
16788         for ac_hdr in mach/cthreads.h
16789 do
16790 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16791 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16792 echo "configure:16793: checking for $ac_hdr" >&5
16793 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16794   echo $ac_n "(cached) $ac_c" 1>&6
16795 else
16796   cat > conftest.$ac_ext <<EOF
16797 #line 16798 "configure"
16798 #include "confdefs.h"
16799 #include <$ac_hdr>
16800 EOF
16801 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16802 { (eval echo configure:16803: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16803 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16804 if test -z "$ac_err"; then
16805   rm -rf conftest*
16806   eval "ac_cv_header_$ac_safe=yes"
16807 else
16808   echo "$ac_err" >&5
16809   echo "configure: failed program was:" >&5
16810   cat conftest.$ac_ext >&5
16811   rm -rf conftest*
16812   eval "ac_cv_header_$ac_safe=no"
16813 fi
16814 rm -f conftest*
16815 fi
16816 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16817   echo "$ac_t""yes" 1>&6
16818     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16819   cat >> confdefs.h <<EOF
16820 #define $ac_tr_hdr 1
16821 EOF
16822  
16823 else
16824   echo "$ac_t""no" 1>&6
16825 fi
16826 done
16827
16828         for ac_hdr in lwp/lwp.h
16829 do
16830 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16831 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16832 echo "configure:16833: checking for $ac_hdr" >&5
16833 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16834   echo $ac_n "(cached) $ac_c" 1>&6
16835 else
16836   cat > conftest.$ac_ext <<EOF
16837 #line 16838 "configure"
16838 #include "confdefs.h"
16839 #include <$ac_hdr>
16840 EOF
16841 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16842 { (eval echo configure:16843: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16843 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16844 if test -z "$ac_err"; then
16845   rm -rf conftest*
16846   eval "ac_cv_header_$ac_safe=yes"
16847 else
16848   echo "$ac_err" >&5
16849   echo "configure: failed program was:" >&5
16850   cat conftest.$ac_ext >&5
16851   rm -rf conftest*
16852   eval "ac_cv_header_$ac_safe=no"
16853 fi
16854 rm -f conftest*
16855 fi
16856 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16857   echo "$ac_t""yes" 1>&6
16858     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16859   cat >> confdefs.h <<EOF
16860 #define $ac_tr_hdr 1
16861 EOF
16862  
16863 else
16864   echo "$ac_t""no" 1>&6
16865 fi
16866 done
16867
16868         for ac_hdr in thread.h synch.h
16869 do
16870 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16871 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16872 echo "configure:16873: checking for $ac_hdr" >&5
16873 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16874   echo $ac_n "(cached) $ac_c" 1>&6
16875 else
16876   cat > conftest.$ac_ext <<EOF
16877 #line 16878 "configure"
16878 #include "confdefs.h"
16879 #include <$ac_hdr>
16880 EOF
16881 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16882 { (eval echo configure:16883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16883 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16884 if test -z "$ac_err"; then
16885   rm -rf conftest*
16886   eval "ac_cv_header_$ac_safe=yes"
16887 else
16888   echo "$ac_err" >&5
16889   echo "configure: failed program was:" >&5
16890   cat conftest.$ac_ext >&5
16891   rm -rf conftest*
16892   eval "ac_cv_header_$ac_safe=no"
16893 fi
16894 rm -f conftest*
16895 fi
16896 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16897   echo "$ac_t""yes" 1>&6
16898     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16899   cat >> confdefs.h <<EOF
16900 #define $ac_tr_hdr 1
16901 EOF
16902  
16903 else
16904   echo "$ac_t""no" 1>&6
16905 fi
16906 done
16907
16908 fi
16909
16910 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16911                         cat >> confdefs.h <<\EOF
16912 #define REENTRANT 1
16913 EOF
16914
16915         cat >> confdefs.h <<\EOF
16916 #define _REENTRANT 1
16917 EOF
16918
16919         cat >> confdefs.h <<\EOF
16920 #define THREAD_SAFE 1
16921 EOF
16922
16923         cat >> confdefs.h <<\EOF
16924 #define _THREAD_SAFE 1
16925 EOF
16926
16927         cat >> confdefs.h <<\EOF
16928 #define THREADSAFE 1
16929 EOF
16930
16931         cat >> confdefs.h <<\EOF
16932 #define _THREADSAFE 1
16933 EOF
16934
16935         cat >> confdefs.h <<\EOF
16936 #define _SGI_MP_SOURCE 1
16937 EOF
16938
16939
16940                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16941 echo "configure:16942: checking for thread specific errno" >&5
16942 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16943   echo $ac_n "(cached) $ac_c" 1>&6
16944 else
16945   
16946                 cat > conftest.$ac_ext <<EOF
16947 #line 16948 "configure"
16948 #include "confdefs.h"
16949 #include <errno.h>
16950 int main() {
16951 errno = 0;
16952 ; return 0; }
16953 EOF
16954 if { (eval echo configure:16955: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16955   rm -rf conftest*
16956   ol_cv_errno_thread_specific=yes
16957 else
16958   echo "configure: failed program was:" >&5
16959   cat conftest.$ac_ext >&5
16960   rm -rf conftest*
16961   ol_cv_errno_thread_specific=no
16962 fi
16963 rm -f conftest*
16964         
16965 fi
16966
16967 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16968
16969                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
16970 echo "configure:16971: checking for thread specific h_errno" >&5
16971 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
16972   echo $ac_n "(cached) $ac_c" 1>&6
16973 else
16974   
16975                 cat > conftest.$ac_ext <<EOF
16976 #line 16977 "configure"
16977 #include "confdefs.h"
16978 #include <netdb.h>
16979 int main() {
16980 h_errno = 0;
16981 ; return 0; }
16982 EOF
16983 if { (eval echo configure:16984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16984   rm -rf conftest*
16985   ol_cv_h_errno_thread_specific=yes
16986 else
16987   echo "configure: failed program was:" >&5
16988   cat conftest.$ac_ext >&5
16989   rm -rf conftest*
16990   ol_cv_h_errno_thread_specific=no
16991 fi
16992 rm -f conftest*
16993         
16994 fi
16995
16996 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
16997
16998         if test $ol_cv_errno_thread_specific != yes \
16999                 -o $ol_cv_h_errno_thread_specific != yes ; then
17000                 LIBS="$LTHREAD_LIBS $LIBS"
17001                 LTHREAD_LIBS=""
17002         fi
17003
17004 fi  
17005
17006 if test $ol_link_threads = no ; then
17007         if test $ol_with_threads = yes ; then
17008                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
17009         fi
17010
17011         if test $ol_with_threads = auto ; then
17012                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
17013                 ol_with_threads=no
17014         fi
17015
17016         cat >> confdefs.h <<\EOF
17017 #define NO_THREADS 1
17018 EOF
17019
17020         LTHREAD_LIBS=""
17021 fi
17022
17023 if test $ol_link_threads != no ; then
17024         cat >> confdefs.h <<\EOF
17025 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
17026 EOF
17027
17028 fi
17029
17030 ol_link_ldbm=no 
17031
17032 if test $ol_with_ldbm_api = auto \
17033         -o $ol_with_ldbm_api = berkeley \
17034         -o $ol_with_ldbm_api = bcompat ; then
17035
17036         if test $ol_with_ldbm_api = bcompat; then \
17037                 for ac_hdr in db_185.h db.h
17038 do
17039 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17040 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17041 echo "configure:17042: checking for $ac_hdr" >&5
17042 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17043   echo $ac_n "(cached) $ac_c" 1>&6
17044 else
17045   cat > conftest.$ac_ext <<EOF
17046 #line 17047 "configure"
17047 #include "confdefs.h"
17048 #include <$ac_hdr>
17049 EOF
17050 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17051 { (eval echo configure:17052: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17052 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17053 if test -z "$ac_err"; then
17054   rm -rf conftest*
17055   eval "ac_cv_header_$ac_safe=yes"
17056 else
17057   echo "$ac_err" >&5
17058   echo "configure: failed program was:" >&5
17059   cat conftest.$ac_ext >&5
17060   rm -rf conftest*
17061   eval "ac_cv_header_$ac_safe=no"
17062 fi
17063 rm -f conftest*
17064 fi
17065 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17066   echo "$ac_t""yes" 1>&6
17067     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17068   cat >> confdefs.h <<EOF
17069 #define $ac_tr_hdr 1
17070 EOF
17071  
17072 else
17073   echo "$ac_t""no" 1>&6
17074 fi
17075 done
17076
17077 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17078         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17079 echo "configure:17080: checking if Berkeley DB header compatibility" >&5
17080 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17081   echo $ac_n "(cached) $ac_c" 1>&6
17082 else
17083   
17084                 cat > conftest.$ac_ext <<EOF
17085 #line 17086 "configure"
17086 #include "confdefs.h"
17087
17088 #if HAVE_DB_185_H
17089 #       include <db_185.h>
17090 #else
17091 #       include <db.h>
17092 #endif
17093
17094  /* this check could be improved */
17095 #ifndef DB_VERSION_MAJOR
17096 #       define DB_VERSION_MAJOR 1
17097 #endif
17098
17099 #if DB_VERSION_MAJOR == 1 
17100         __db_version_1
17101 #endif
17102
17103 EOF
17104 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17105   egrep "__db_version_1" >/dev/null 2>&1; then
17106   rm -rf conftest*
17107   ol_cv_header_db1=yes
17108 else
17109   rm -rf conftest*
17110   ol_cv_header_db1=no
17111 fi
17112 rm -f conftest*
17113
17114 fi
17115
17116 echo "$ac_t""$ol_cv_header_db1" 1>&6
17117
17118         if test $ol_cv_header_db1 = yes ; then
17119                 ol_cv_lib_db=no
17120 if test $ol_cv_lib_db = no ; then
17121         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17122 echo "configure:17123: checking for Berkeley DB link (default)" >&5
17123 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17124   echo $ac_n "(cached) $ac_c" 1>&6
17125 else
17126   
17127         ol_DB_LIB=
17128         ol_LIBS=$LIBS
17129         LIBS="$ol_DB_LIB $LIBS"
17130
17131         cat > conftest.$ac_ext <<EOF
17132 #line 17133 "configure"
17133 #include "confdefs.h"
17134
17135 #ifdef HAVE_DB_185_H
17136 # include <db_185.h>
17137 #else
17138 # include <db.h>
17139 #endif
17140
17141 #ifndef DB_VERSION_MAJOR
17142 # define DB_VERSION_MAJOR 1
17143 #endif
17144
17145 #ifndef NULL
17146 #define NULL ((void*)0)
17147 #endif
17148
17149 int main() {
17150
17151 #if DB_VERSION_MAJOR > 1
17152         {
17153                 char *version;
17154                 int major, minor, patch;
17155
17156                 version = db_version( &major, &minor, &patch );
17157
17158                 if( major != DB_VERSION_MAJOR ||
17159                         minor < DB_VERSION_MINOR )
17160                 {
17161                         printf("Berkeley DB version mismatch\n"
17162                                 "\texpected: %s\n\tgot: %s\n",
17163                                 DB_VERSION_STRING, version);
17164                         return 1;
17165                 }
17166         }
17167 #endif
17168
17169 #if DB_VERSION_MAJOR > 2
17170         db_env_create( NULL, 0 );
17171 #elif DB_VERSION_MAJOR > 1
17172         db_appexit( NULL );
17173 #else
17174         (void) dbopen( NULL, 0, 0, 0, NULL);
17175 #endif
17176
17177 ; return 0; }
17178 EOF
17179 if { (eval echo configure:17180: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17180   rm -rf conftest*
17181   ol_cv_db_none=yes
17182 else
17183   echo "configure: failed program was:" >&5
17184   cat conftest.$ac_ext >&5
17185   rm -rf conftest*
17186   ol_cv_db_none=no
17187 fi
17188 rm -f conftest*
17189
17190         LIBS="$ol_LIBS"
17191
17192 fi
17193
17194 echo "$ac_t""$ol_cv_db_none" 1>&6
17195
17196         if test $ol_cv_db_none = yes ; then
17197                 ol_cv_lib_db=yes
17198         fi
17199 fi
17200
17201 if test $ol_cv_lib_db = no ; then
17202         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17203 echo "configure:17204: checking for Berkeley DB link (-ldb4)" >&5
17204 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17205   echo $ac_n "(cached) $ac_c" 1>&6
17206 else
17207   
17208         ol_DB_LIB=-ldb4
17209         ol_LIBS=$LIBS
17210         LIBS="$ol_DB_LIB $LIBS"
17211
17212         cat > conftest.$ac_ext <<EOF
17213 #line 17214 "configure"
17214 #include "confdefs.h"
17215
17216 #ifdef HAVE_DB_185_H
17217 # include <db_185.h>
17218 #else
17219 # include <db.h>
17220 #endif
17221
17222 #ifndef DB_VERSION_MAJOR
17223 # define DB_VERSION_MAJOR 1
17224 #endif
17225
17226 #ifndef NULL
17227 #define NULL ((void*)0)
17228 #endif
17229
17230 int main() {
17231
17232 #if DB_VERSION_MAJOR > 1
17233         {
17234                 char *version;
17235                 int major, minor, patch;
17236
17237                 version = db_version( &major, &minor, &patch );
17238
17239                 if( major != DB_VERSION_MAJOR ||
17240                         minor < DB_VERSION_MINOR )
17241                 {
17242                         printf("Berkeley DB version mismatch\n"
17243                                 "\texpected: %s\n\tgot: %s\n",
17244                                 DB_VERSION_STRING, version);
17245                         return 1;
17246                 }
17247         }
17248 #endif
17249
17250 #if DB_VERSION_MAJOR > 2
17251         db_env_create( NULL, 0 );
17252 #elif DB_VERSION_MAJOR > 1
17253         db_appexit( NULL );
17254 #else
17255         (void) dbopen( NULL, 0, 0, 0, NULL);
17256 #endif
17257
17258 ; return 0; }
17259 EOF
17260 if { (eval echo configure:17261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17261   rm -rf conftest*
17262   ol_cv_db_db4=yes
17263 else
17264   echo "configure: failed program was:" >&5
17265   cat conftest.$ac_ext >&5
17266   rm -rf conftest*
17267   ol_cv_db_db4=no
17268 fi
17269 rm -f conftest*
17270
17271         LIBS="$ol_LIBS"
17272
17273 fi
17274
17275 echo "$ac_t""$ol_cv_db_db4" 1>&6
17276
17277         if test $ol_cv_db_db4 = yes ; then
17278                 ol_cv_lib_db=-ldb4
17279         fi
17280 fi
17281
17282 if test $ol_cv_lib_db = no ; then
17283         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17284 echo "configure:17285: checking for Berkeley DB link (-ldb)" >&5
17285 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17286   echo $ac_n "(cached) $ac_c" 1>&6
17287 else
17288   
17289         ol_DB_LIB=-ldb
17290         ol_LIBS=$LIBS
17291         LIBS="$ol_DB_LIB $LIBS"
17292
17293         cat > conftest.$ac_ext <<EOF
17294 #line 17295 "configure"
17295 #include "confdefs.h"
17296
17297 #ifdef HAVE_DB_185_H
17298 # include <db_185.h>
17299 #else
17300 # include <db.h>
17301 #endif
17302
17303 #ifndef DB_VERSION_MAJOR
17304 # define DB_VERSION_MAJOR 1
17305 #endif
17306
17307 #ifndef NULL
17308 #define NULL ((void*)0)
17309 #endif
17310
17311 int main() {
17312
17313 #if DB_VERSION_MAJOR > 1
17314         {
17315                 char *version;
17316                 int major, minor, patch;
17317
17318                 version = db_version( &major, &minor, &patch );
17319
17320                 if( major != DB_VERSION_MAJOR ||
17321                         minor < DB_VERSION_MINOR )
17322                 {
17323                         printf("Berkeley DB version mismatch\n"
17324                                 "\texpected: %s\n\tgot: %s\n",
17325                                 DB_VERSION_STRING, version);
17326                         return 1;
17327                 }
17328         }
17329 #endif
17330
17331 #if DB_VERSION_MAJOR > 2
17332         db_env_create( NULL, 0 );
17333 #elif DB_VERSION_MAJOR > 1
17334         db_appexit( NULL );
17335 #else
17336         (void) dbopen( NULL, 0, 0, 0, NULL);
17337 #endif
17338
17339 ; return 0; }
17340 EOF
17341 if { (eval echo configure:17342: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17342   rm -rf conftest*
17343   ol_cv_db_db=yes
17344 else
17345   echo "configure: failed program was:" >&5
17346   cat conftest.$ac_ext >&5
17347   rm -rf conftest*
17348   ol_cv_db_db=no
17349 fi
17350 rm -f conftest*
17351
17352         LIBS="$ol_LIBS"
17353
17354 fi
17355
17356 echo "$ac_t""$ol_cv_db_db" 1>&6
17357
17358         if test $ol_cv_db_db = yes ; then
17359                 ol_cv_lib_db=-ldb
17360         fi
17361 fi
17362
17363 if test $ol_cv_lib_db = no ; then
17364         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17365 echo "configure:17366: checking for Berkeley DB link (-ldb3)" >&5
17366 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17367   echo $ac_n "(cached) $ac_c" 1>&6
17368 else
17369   
17370         ol_DB_LIB=-ldb3
17371         ol_LIBS=$LIBS
17372         LIBS="$ol_DB_LIB $LIBS"
17373
17374         cat > conftest.$ac_ext <<EOF
17375 #line 17376 "configure"
17376 #include "confdefs.h"
17377
17378 #ifdef HAVE_DB_185_H
17379 # include <db_185.h>
17380 #else
17381 # include <db.h>
17382 #endif
17383
17384 #ifndef DB_VERSION_MAJOR
17385 # define DB_VERSION_MAJOR 1
17386 #endif
17387
17388 #ifndef NULL
17389 #define NULL ((void*)0)
17390 #endif
17391
17392 int main() {
17393
17394 #if DB_VERSION_MAJOR > 1
17395         {
17396                 char *version;
17397                 int major, minor, patch;
17398
17399                 version = db_version( &major, &minor, &patch );
17400
17401                 if( major != DB_VERSION_MAJOR ||
17402                         minor < DB_VERSION_MINOR )
17403                 {
17404                         printf("Berkeley DB version mismatch\n"
17405                                 "\texpected: %s\n\tgot: %s\n",
17406                                 DB_VERSION_STRING, version);
17407                         return 1;
17408                 }
17409         }
17410 #endif
17411
17412 #if DB_VERSION_MAJOR > 2
17413         db_env_create( NULL, 0 );
17414 #elif DB_VERSION_MAJOR > 1
17415         db_appexit( NULL );
17416 #else
17417         (void) dbopen( NULL, 0, 0, 0, NULL);
17418 #endif
17419
17420 ; return 0; }
17421 EOF
17422 if { (eval echo configure:17423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17423   rm -rf conftest*
17424   ol_cv_db_db3=yes
17425 else
17426   echo "configure: failed program was:" >&5
17427   cat conftest.$ac_ext >&5
17428   rm -rf conftest*
17429   ol_cv_db_db3=no
17430 fi
17431 rm -f conftest*
17432
17433         LIBS="$ol_LIBS"
17434
17435 fi
17436
17437 echo "$ac_t""$ol_cv_db_db3" 1>&6
17438
17439         if test $ol_cv_db_db3 = yes ; then
17440                 ol_cv_lib_db=-ldb3
17441         fi
17442 fi
17443
17444 if test $ol_cv_lib_db = no ; then
17445         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17446 echo "configure:17447: checking for Berkeley DB link (-ldb2)" >&5
17447 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17448   echo $ac_n "(cached) $ac_c" 1>&6
17449 else
17450   
17451         ol_DB_LIB=-ldb2
17452         ol_LIBS=$LIBS
17453         LIBS="$ol_DB_LIB $LIBS"
17454
17455         cat > conftest.$ac_ext <<EOF
17456 #line 17457 "configure"
17457 #include "confdefs.h"
17458
17459 #ifdef HAVE_DB_185_H
17460 # include <db_185.h>
17461 #else
17462 # include <db.h>
17463 #endif
17464
17465 #ifndef DB_VERSION_MAJOR
17466 # define DB_VERSION_MAJOR 1
17467 #endif
17468
17469 #ifndef NULL
17470 #define NULL ((void*)0)
17471 #endif
17472
17473 int main() {
17474
17475 #if DB_VERSION_MAJOR > 1
17476         {
17477                 char *version;
17478                 int major, minor, patch;
17479
17480                 version = db_version( &major, &minor, &patch );
17481
17482                 if( major != DB_VERSION_MAJOR ||
17483                         minor < DB_VERSION_MINOR )
17484                 {
17485                         printf("Berkeley DB version mismatch\n"
17486                                 "\texpected: %s\n\tgot: %s\n",
17487                                 DB_VERSION_STRING, version);
17488                         return 1;
17489                 }
17490         }
17491 #endif
17492
17493 #if DB_VERSION_MAJOR > 2
17494         db_env_create( NULL, 0 );
17495 #elif DB_VERSION_MAJOR > 1
17496         db_appexit( NULL );
17497 #else
17498         (void) dbopen( NULL, 0, 0, 0, NULL);
17499 #endif
17500
17501 ; return 0; }
17502 EOF
17503 if { (eval echo configure:17504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17504   rm -rf conftest*
17505   ol_cv_db_db2=yes
17506 else
17507   echo "configure: failed program was:" >&5
17508   cat conftest.$ac_ext >&5
17509   rm -rf conftest*
17510   ol_cv_db_db2=no
17511 fi
17512 rm -f conftest*
17513
17514         LIBS="$ol_LIBS"
17515
17516 fi
17517
17518 echo "$ac_t""$ol_cv_db_db2" 1>&6
17519
17520         if test $ol_cv_db_db2 = yes ; then
17521                 ol_cv_lib_db=-ldb2
17522         fi
17523 fi
17524
17525 if test $ol_cv_lib_db = no ; then
17526         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17527 echo "configure:17528: checking for Berkeley DB link (-ldb1)" >&5
17528 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17529   echo $ac_n "(cached) $ac_c" 1>&6
17530 else
17531   
17532         ol_DB_LIB=-ldb1
17533         ol_LIBS=$LIBS
17534         LIBS="$ol_DB_LIB $LIBS"
17535
17536         cat > conftest.$ac_ext <<EOF
17537 #line 17538 "configure"
17538 #include "confdefs.h"
17539
17540 #ifdef HAVE_DB_185_H
17541 # include <db_185.h>
17542 #else
17543 # include <db.h>
17544 #endif
17545
17546 #ifndef DB_VERSION_MAJOR
17547 # define DB_VERSION_MAJOR 1
17548 #endif
17549
17550 #ifndef NULL
17551 #define NULL ((void*)0)
17552 #endif
17553
17554 int main() {
17555
17556 #if DB_VERSION_MAJOR > 1
17557         {
17558                 char *version;
17559                 int major, minor, patch;
17560
17561                 version = db_version( &major, &minor, &patch );
17562
17563                 if( major != DB_VERSION_MAJOR ||
17564                         minor < DB_VERSION_MINOR )
17565                 {
17566                         printf("Berkeley DB version mismatch\n"
17567                                 "\texpected: %s\n\tgot: %s\n",
17568                                 DB_VERSION_STRING, version);
17569                         return 1;
17570                 }
17571         }
17572 #endif
17573
17574 #if DB_VERSION_MAJOR > 2
17575         db_env_create( NULL, 0 );
17576 #elif DB_VERSION_MAJOR > 1
17577         db_appexit( NULL );
17578 #else
17579         (void) dbopen( NULL, 0, 0, 0, NULL);
17580 #endif
17581
17582 ; return 0; }
17583 EOF
17584 if { (eval echo configure:17585: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17585   rm -rf conftest*
17586   ol_cv_db_db1=yes
17587 else
17588   echo "configure: failed program was:" >&5
17589   cat conftest.$ac_ext >&5
17590   rm -rf conftest*
17591   ol_cv_db_db1=no
17592 fi
17593 rm -f conftest*
17594
17595         LIBS="$ol_LIBS"
17596
17597 fi
17598
17599 echo "$ac_t""$ol_cv_db_db1" 1>&6
17600
17601         if test $ol_cv_db_db1 = yes ; then
17602                 ol_cv_lib_db=-ldb1
17603         fi
17604 fi
17605
17606
17607                 if test "$ol_cv_lib_db" != no ; then
17608                         ol_cv_berkeley_db=yes
17609                 fi
17610         fi
17611 fi
17612
17613         else
17614                 ol_cv_berkeley_db=no
17615 for ac_hdr in db.h
17616 do
17617 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17618 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17619 echo "configure:17620: checking for $ac_hdr" >&5
17620 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17621   echo $ac_n "(cached) $ac_c" 1>&6
17622 else
17623   cat > conftest.$ac_ext <<EOF
17624 #line 17625 "configure"
17625 #include "confdefs.h"
17626 #include <$ac_hdr>
17627 EOF
17628 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17629 { (eval echo configure:17630: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17630 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17631 if test -z "$ac_err"; then
17632   rm -rf conftest*
17633   eval "ac_cv_header_$ac_safe=yes"
17634 else
17635   echo "$ac_err" >&5
17636   echo "configure: failed program was:" >&5
17637   cat conftest.$ac_ext >&5
17638   rm -rf conftest*
17639   eval "ac_cv_header_$ac_safe=no"
17640 fi
17641 rm -f conftest*
17642 fi
17643 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17644   echo "$ac_t""yes" 1>&6
17645     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17646   cat >> confdefs.h <<EOF
17647 #define $ac_tr_hdr 1
17648 EOF
17649  
17650 else
17651   echo "$ac_t""no" 1>&6
17652 fi
17653 done
17654
17655 if test $ac_cv_header_db_h = yes; then
17656         ol_cv_lib_db=no
17657 if test $ol_cv_lib_db = no ; then
17658         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17659 echo "configure:17660: checking for Berkeley DB link (default)" >&5
17660 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17661   echo $ac_n "(cached) $ac_c" 1>&6
17662 else
17663   
17664         ol_DB_LIB=
17665         ol_LIBS=$LIBS
17666         LIBS="$ol_DB_LIB $LIBS"
17667
17668         cat > conftest.$ac_ext <<EOF
17669 #line 17670 "configure"
17670 #include "confdefs.h"
17671
17672 #ifdef HAVE_DB_185_H
17673 # include <db_185.h>
17674 #else
17675 # include <db.h>
17676 #endif
17677
17678 #ifndef DB_VERSION_MAJOR
17679 # define DB_VERSION_MAJOR 1
17680 #endif
17681
17682 #ifndef NULL
17683 #define NULL ((void*)0)
17684 #endif
17685
17686 int main() {
17687
17688 #if DB_VERSION_MAJOR > 1
17689         {
17690                 char *version;
17691                 int major, minor, patch;
17692
17693                 version = db_version( &major, &minor, &patch );
17694
17695                 if( major != DB_VERSION_MAJOR ||
17696                         minor < DB_VERSION_MINOR )
17697                 {
17698                         printf("Berkeley DB version mismatch\n"
17699                                 "\texpected: %s\n\tgot: %s\n",
17700                                 DB_VERSION_STRING, version);
17701                         return 1;
17702                 }
17703         }
17704 #endif
17705
17706 #if DB_VERSION_MAJOR > 2
17707         db_env_create( NULL, 0 );
17708 #elif DB_VERSION_MAJOR > 1
17709         db_appexit( NULL );
17710 #else
17711         (void) dbopen( NULL, 0, 0, 0, NULL);
17712 #endif
17713
17714 ; return 0; }
17715 EOF
17716 if { (eval echo configure:17717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17717   rm -rf conftest*
17718   ol_cv_db_none=yes
17719 else
17720   echo "configure: failed program was:" >&5
17721   cat conftest.$ac_ext >&5
17722   rm -rf conftest*
17723   ol_cv_db_none=no
17724 fi
17725 rm -f conftest*
17726
17727         LIBS="$ol_LIBS"
17728
17729 fi
17730
17731 echo "$ac_t""$ol_cv_db_none" 1>&6
17732
17733         if test $ol_cv_db_none = yes ; then
17734                 ol_cv_lib_db=yes
17735         fi
17736 fi
17737
17738 if test $ol_cv_lib_db = no ; then
17739         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17740 echo "configure:17741: checking for Berkeley DB link (-ldb4)" >&5
17741 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17742   echo $ac_n "(cached) $ac_c" 1>&6
17743 else
17744   
17745         ol_DB_LIB=-ldb4
17746         ol_LIBS=$LIBS
17747         LIBS="$ol_DB_LIB $LIBS"
17748
17749         cat > conftest.$ac_ext <<EOF
17750 #line 17751 "configure"
17751 #include "confdefs.h"
17752
17753 #ifdef HAVE_DB_185_H
17754 # include <db_185.h>
17755 #else
17756 # include <db.h>
17757 #endif
17758
17759 #ifndef DB_VERSION_MAJOR
17760 # define DB_VERSION_MAJOR 1
17761 #endif
17762
17763 #ifndef NULL
17764 #define NULL ((void*)0)
17765 #endif
17766
17767 int main() {
17768
17769 #if DB_VERSION_MAJOR > 1
17770         {
17771                 char *version;
17772                 int major, minor, patch;
17773
17774                 version = db_version( &major, &minor, &patch );
17775
17776                 if( major != DB_VERSION_MAJOR ||
17777                         minor < DB_VERSION_MINOR )
17778                 {
17779                         printf("Berkeley DB version mismatch\n"
17780                                 "\texpected: %s\n\tgot: %s\n",
17781                                 DB_VERSION_STRING, version);
17782                         return 1;
17783                 }
17784         }
17785 #endif
17786
17787 #if DB_VERSION_MAJOR > 2
17788         db_env_create( NULL, 0 );
17789 #elif DB_VERSION_MAJOR > 1
17790         db_appexit( NULL );
17791 #else
17792         (void) dbopen( NULL, 0, 0, 0, NULL);
17793 #endif
17794
17795 ; return 0; }
17796 EOF
17797 if { (eval echo configure:17798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17798   rm -rf conftest*
17799   ol_cv_db_db4=yes
17800 else
17801   echo "configure: failed program was:" >&5
17802   cat conftest.$ac_ext >&5
17803   rm -rf conftest*
17804   ol_cv_db_db4=no
17805 fi
17806 rm -f conftest*
17807
17808         LIBS="$ol_LIBS"
17809
17810 fi
17811
17812 echo "$ac_t""$ol_cv_db_db4" 1>&6
17813
17814         if test $ol_cv_db_db4 = yes ; then
17815                 ol_cv_lib_db=-ldb4
17816         fi
17817 fi
17818
17819 if test $ol_cv_lib_db = no ; then
17820         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17821 echo "configure:17822: checking for Berkeley DB link (-ldb)" >&5
17822 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17823   echo $ac_n "(cached) $ac_c" 1>&6
17824 else
17825   
17826         ol_DB_LIB=-ldb
17827         ol_LIBS=$LIBS
17828         LIBS="$ol_DB_LIB $LIBS"
17829
17830         cat > conftest.$ac_ext <<EOF
17831 #line 17832 "configure"
17832 #include "confdefs.h"
17833
17834 #ifdef HAVE_DB_185_H
17835 # include <db_185.h>
17836 #else
17837 # include <db.h>
17838 #endif
17839
17840 #ifndef DB_VERSION_MAJOR
17841 # define DB_VERSION_MAJOR 1
17842 #endif
17843
17844 #ifndef NULL
17845 #define NULL ((void*)0)
17846 #endif
17847
17848 int main() {
17849
17850 #if DB_VERSION_MAJOR > 1
17851         {
17852                 char *version;
17853                 int major, minor, patch;
17854
17855                 version = db_version( &major, &minor, &patch );
17856
17857                 if( major != DB_VERSION_MAJOR ||
17858                         minor < DB_VERSION_MINOR )
17859                 {
17860                         printf("Berkeley DB version mismatch\n"
17861                                 "\texpected: %s\n\tgot: %s\n",
17862                                 DB_VERSION_STRING, version);
17863                         return 1;
17864                 }
17865         }
17866 #endif
17867
17868 #if DB_VERSION_MAJOR > 2
17869         db_env_create( NULL, 0 );
17870 #elif DB_VERSION_MAJOR > 1
17871         db_appexit( NULL );
17872 #else
17873         (void) dbopen( NULL, 0, 0, 0, NULL);
17874 #endif
17875
17876 ; return 0; }
17877 EOF
17878 if { (eval echo configure:17879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17879   rm -rf conftest*
17880   ol_cv_db_db=yes
17881 else
17882   echo "configure: failed program was:" >&5
17883   cat conftest.$ac_ext >&5
17884   rm -rf conftest*
17885   ol_cv_db_db=no
17886 fi
17887 rm -f conftest*
17888
17889         LIBS="$ol_LIBS"
17890
17891 fi
17892
17893 echo "$ac_t""$ol_cv_db_db" 1>&6
17894
17895         if test $ol_cv_db_db = yes ; then
17896                 ol_cv_lib_db=-ldb
17897         fi
17898 fi
17899
17900 if test $ol_cv_lib_db = no ; then
17901         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17902 echo "configure:17903: checking for Berkeley DB link (-ldb3)" >&5
17903 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17904   echo $ac_n "(cached) $ac_c" 1>&6
17905 else
17906   
17907         ol_DB_LIB=-ldb3
17908         ol_LIBS=$LIBS
17909         LIBS="$ol_DB_LIB $LIBS"
17910
17911         cat > conftest.$ac_ext <<EOF
17912 #line 17913 "configure"
17913 #include "confdefs.h"
17914
17915 #ifdef HAVE_DB_185_H
17916 # include <db_185.h>
17917 #else
17918 # include <db.h>
17919 #endif
17920
17921 #ifndef DB_VERSION_MAJOR
17922 # define DB_VERSION_MAJOR 1
17923 #endif
17924
17925 #ifndef NULL
17926 #define NULL ((void*)0)
17927 #endif
17928
17929 int main() {
17930
17931 #if DB_VERSION_MAJOR > 1
17932         {
17933                 char *version;
17934                 int major, minor, patch;
17935
17936                 version = db_version( &major, &minor, &patch );
17937
17938                 if( major != DB_VERSION_MAJOR ||
17939                         minor < DB_VERSION_MINOR )
17940                 {
17941                         printf("Berkeley DB version mismatch\n"
17942                                 "\texpected: %s\n\tgot: %s\n",
17943                                 DB_VERSION_STRING, version);
17944                         return 1;
17945                 }
17946         }
17947 #endif
17948
17949 #if DB_VERSION_MAJOR > 2
17950         db_env_create( NULL, 0 );
17951 #elif DB_VERSION_MAJOR > 1
17952         db_appexit( NULL );
17953 #else
17954         (void) dbopen( NULL, 0, 0, 0, NULL);
17955 #endif
17956
17957 ; return 0; }
17958 EOF
17959 if { (eval echo configure:17960: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17960   rm -rf conftest*
17961   ol_cv_db_db3=yes
17962 else
17963   echo "configure: failed program was:" >&5
17964   cat conftest.$ac_ext >&5
17965   rm -rf conftest*
17966   ol_cv_db_db3=no
17967 fi
17968 rm -f conftest*
17969
17970         LIBS="$ol_LIBS"
17971
17972 fi
17973
17974 echo "$ac_t""$ol_cv_db_db3" 1>&6
17975
17976         if test $ol_cv_db_db3 = yes ; then
17977                 ol_cv_lib_db=-ldb3
17978         fi
17979 fi
17980
17981 if test $ol_cv_lib_db = no ; then
17982         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17983 echo "configure:17984: checking for Berkeley DB link (-ldb2)" >&5
17984 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17985   echo $ac_n "(cached) $ac_c" 1>&6
17986 else
17987   
17988         ol_DB_LIB=-ldb2
17989         ol_LIBS=$LIBS
17990         LIBS="$ol_DB_LIB $LIBS"
17991
17992         cat > conftest.$ac_ext <<EOF
17993 #line 17994 "configure"
17994 #include "confdefs.h"
17995
17996 #ifdef HAVE_DB_185_H
17997 # include <db_185.h>
17998 #else
17999 # include <db.h>
18000 #endif
18001
18002 #ifndef DB_VERSION_MAJOR
18003 # define DB_VERSION_MAJOR 1
18004 #endif
18005
18006 #ifndef NULL
18007 #define NULL ((void*)0)
18008 #endif
18009
18010 int main() {
18011
18012 #if DB_VERSION_MAJOR > 1
18013         {
18014                 char *version;
18015                 int major, minor, patch;
18016
18017                 version = db_version( &major, &minor, &patch );
18018
18019                 if( major != DB_VERSION_MAJOR ||
18020                         minor < DB_VERSION_MINOR )
18021                 {
18022                         printf("Berkeley DB version mismatch\n"
18023                                 "\texpected: %s\n\tgot: %s\n",
18024                                 DB_VERSION_STRING, version);
18025                         return 1;
18026                 }
18027         }
18028 #endif
18029
18030 #if DB_VERSION_MAJOR > 2
18031         db_env_create( NULL, 0 );
18032 #elif DB_VERSION_MAJOR > 1
18033         db_appexit( NULL );
18034 #else
18035         (void) dbopen( NULL, 0, 0, 0, NULL);
18036 #endif
18037
18038 ; return 0; }
18039 EOF
18040 if { (eval echo configure:18041: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18041   rm -rf conftest*
18042   ol_cv_db_db2=yes
18043 else
18044   echo "configure: failed program was:" >&5
18045   cat conftest.$ac_ext >&5
18046   rm -rf conftest*
18047   ol_cv_db_db2=no
18048 fi
18049 rm -f conftest*
18050
18051         LIBS="$ol_LIBS"
18052
18053 fi
18054
18055 echo "$ac_t""$ol_cv_db_db2" 1>&6
18056
18057         if test $ol_cv_db_db2 = yes ; then
18058                 ol_cv_lib_db=-ldb2
18059         fi
18060 fi
18061
18062 if test $ol_cv_lib_db = no ; then
18063         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18064 echo "configure:18065: checking for Berkeley DB link (-ldb1)" >&5
18065 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18066   echo $ac_n "(cached) $ac_c" 1>&6
18067 else
18068   
18069         ol_DB_LIB=-ldb1
18070         ol_LIBS=$LIBS
18071         LIBS="$ol_DB_LIB $LIBS"
18072
18073         cat > conftest.$ac_ext <<EOF
18074 #line 18075 "configure"
18075 #include "confdefs.h"
18076
18077 #ifdef HAVE_DB_185_H
18078 # include <db_185.h>
18079 #else
18080 # include <db.h>
18081 #endif
18082
18083 #ifndef DB_VERSION_MAJOR
18084 # define DB_VERSION_MAJOR 1
18085 #endif
18086
18087 #ifndef NULL
18088 #define NULL ((void*)0)
18089 #endif
18090
18091 int main() {
18092
18093 #if DB_VERSION_MAJOR > 1
18094         {
18095                 char *version;
18096                 int major, minor, patch;
18097
18098                 version = db_version( &major, &minor, &patch );
18099
18100                 if( major != DB_VERSION_MAJOR ||
18101                         minor < DB_VERSION_MINOR )
18102                 {
18103                         printf("Berkeley DB version mismatch\n"
18104                                 "\texpected: %s\n\tgot: %s\n",
18105                                 DB_VERSION_STRING, version);
18106                         return 1;
18107                 }
18108         }
18109 #endif
18110
18111 #if DB_VERSION_MAJOR > 2
18112         db_env_create( NULL, 0 );
18113 #elif DB_VERSION_MAJOR > 1
18114         db_appexit( NULL );
18115 #else
18116         (void) dbopen( NULL, 0, 0, 0, NULL);
18117 #endif
18118
18119 ; return 0; }
18120 EOF
18121 if { (eval echo configure:18122: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18122   rm -rf conftest*
18123   ol_cv_db_db1=yes
18124 else
18125   echo "configure: failed program was:" >&5
18126   cat conftest.$ac_ext >&5
18127   rm -rf conftest*
18128   ol_cv_db_db1=no
18129 fi
18130 rm -f conftest*
18131
18132         LIBS="$ol_LIBS"
18133
18134 fi
18135
18136 echo "$ac_t""$ol_cv_db_db1" 1>&6
18137
18138         if test $ol_cv_db_db1 = yes ; then
18139                 ol_cv_lib_db=-ldb1
18140         fi
18141 fi
18142
18143
18144         if test "$ol_cv_lib_db" != no ; then
18145                 ol_cv_berkeley_db=yes
18146                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18147 echo "configure:18148: checking for Berkeley DB thread support" >&5
18148 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18149   echo $ac_n "(cached) $ac_c" 1>&6
18150 else
18151   
18152         ol_LIBS="$LIBS"
18153         if test $ol_cv_lib_db != yes ; then
18154                 LIBS="$ol_cv_lib_db"
18155         fi
18156
18157         if test "$cross_compiling" = yes; then
18158   ol_cv_berkeley_db_thread=cross
18159 else
18160   cat > conftest.$ac_ext <<EOF
18161 #line 18162 "configure"
18162 #include "confdefs.h"
18163
18164 #ifdef HAVE_DB_185_H
18165         choke me;
18166 #else
18167 #include <db.h>
18168 #endif
18169 #ifndef NULL
18170 #define NULL ((void *)0)
18171 #endif
18172 main()
18173 {
18174         int rc;
18175         u_int32_t flags = DB_CREATE |
18176 #ifdef DB_PRIVATE
18177                 DB_PRIVATE |
18178 #endif
18179                 DB_THREAD;
18180
18181 #if DB_VERSION_MAJOR > 2
18182         DB_ENV *env = NULL;
18183
18184         rc = db_env_create( &env, 0 );
18185
18186         flags |= DB_INIT_MPOOL;
18187 #ifdef DB_MPOOL_PRIVATE
18188         flags |= DB_MPOOL_PRIVATE;
18189 #endif
18190
18191         if( rc ) {
18192                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18193                 return rc;
18194         }
18195
18196 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18197         rc = env->open( env, NULL, flags, 0 );
18198 #else
18199         rc = env->open( env, NULL, NULL, flags, 0 );
18200 #endif
18201
18202         if ( rc == 0 ) {
18203                 rc = env->close( env, 0 );
18204         }
18205
18206         if( rc ) {
18207                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18208                 return rc;
18209         }
18210
18211 #else
18212         DB_ENV env;
18213         memset( &env, '\0', sizeof(env) );
18214
18215         rc = db_appinit( NULL, NULL, &env, flags );
18216
18217         if( rc == 0 ) {
18218                 db_appexit( &env );
18219         }
18220
18221         unlink("__db_mpool.share");
18222         unlink("__db_lock.share");
18223 #endif
18224
18225         return rc;
18226 }
18227 EOF
18228 if { (eval echo configure:18229: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18229 then
18230   ol_cv_berkeley_db_thread=yes
18231 else
18232   echo "configure: failed program was:" >&5
18233   cat conftest.$ac_ext >&5
18234   rm -fr conftest*
18235   ol_cv_berkeley_db_thread=no
18236 fi
18237 rm -fr conftest*
18238 fi
18239
18240
18241         LIBS="$ol_LIBS"
18242
18243         if test $ol_cv_berkeley_db_thread != no ; then
18244                 cat >> confdefs.h <<\EOF
18245 #define HAVE_BERKELEY_DB_THREAD 1
18246 EOF
18247
18248         fi
18249
18250 fi
18251
18252 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18253         fi
18254 fi
18255
18256         fi
18257
18258         if test $ol_cv_berkeley_db != no ; then
18259                 cat >> confdefs.h <<\EOF
18260 #define HAVE_BERKELEY_DB 1
18261 EOF
18262
18263
18264                 ol_link_ldbm=berkeley
18265                 ol_with_ldbm_api=berkeley
18266
18267                 if test $ol_with_ldbm_type = hash ; then
18268                         cat >> confdefs.h <<\EOF
18269 #define LDBM_USE_DBHASH 1
18270 EOF
18271
18272                 else
18273                         cat >> confdefs.h <<\EOF
18274 #define LDBM_USE_DBBTREE 1
18275 EOF
18276
18277                 fi
18278
18279                                                 if test $ol_cv_lib_db != yes ; then
18280                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18281                 fi
18282         fi
18283 fi
18284
18285 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18286         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18287 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18288         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18289 echo "configure:18290: checking Berkeley DB version for BDB backend" >&5
18290 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18291   echo $ac_n "(cached) $ac_c" 1>&6
18292 else
18293   
18294         cat > conftest.$ac_ext <<EOF
18295 #line 18296 "configure"
18296 #include "confdefs.h"
18297
18298 #include <db.h>
18299
18300  /* this check could be improved */
18301 #ifndef DB_VERSION_MAJOR
18302 #       define DB_VERSION_MAJOR 1
18303 #endif
18304
18305 /* require 4.0 or later */
18306 #if DB_VERSION_MAJOR >= 4 
18307         __db_version_compat
18308 #endif
18309         
18310 EOF
18311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18312   egrep "__db_version_compat" >/dev/null 2>&1; then
18313   rm -rf conftest*
18314   ol_cv_bdb_compat=yes
18315 else
18316   rm -rf conftest*
18317   ol_cv_bdb_compat=no
18318 fi
18319 rm -f conftest*
18320
18321 fi
18322
18323 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18324
18325
18326         if test $ol_cv_bdb_compat = yes ; then
18327                 ol_enable_bdb=yes
18328         elif test $ol_enable_bdb = yes ; then
18329                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18330         else
18331                 ol_enable_bdb=no
18332         fi
18333 fi
18334
18335 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18336         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18337         ol_with_ldbm_api=none
18338 fi
18339
18340 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18341         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18342 echo "configure:18343: checking for MDBM library" >&5
18343 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18344   echo $ac_n "(cached) $ac_c" 1>&6
18345 else
18346         ol_LIBS="$LIBS"
18347         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18348 echo "configure:18349: checking for mdbm_set_chain" >&5
18349 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18350   echo $ac_n "(cached) $ac_c" 1>&6
18351 else
18352   cat > conftest.$ac_ext <<EOF
18353 #line 18354 "configure"
18354 #include "confdefs.h"
18355 /* System header to define __stub macros and hopefully few prototypes,
18356     which can conflict with char mdbm_set_chain(); below.  */
18357 #include <assert.h>
18358 /* Override any gcc2 internal prototype to avoid an error.  */
18359 /* We use char because int might match the return type of a gcc2
18360     builtin and then its argument prototype would still apply.  */
18361 char mdbm_set_chain();
18362 char (*f)();
18363
18364 int main() {
18365
18366 /* The GNU C library defines this for functions which it implements
18367     to always fail with ENOSYS.  Some functions are actually named
18368     something starting with __ and the normal name is an alias.  */
18369 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18370 choke me
18371 #else
18372 f = mdbm_set_chain;
18373 #endif
18374
18375 ; return 0; }
18376 EOF
18377 if { (eval echo configure:18378: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18378   rm -rf conftest*
18379   eval "ac_cv_func_mdbm_set_chain=yes"
18380 else
18381   echo "configure: failed program was:" >&5
18382   cat conftest.$ac_ext >&5
18383   rm -rf conftest*
18384   eval "ac_cv_func_mdbm_set_chain=no"
18385 fi
18386 rm -f conftest*
18387 fi
18388
18389 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18390   echo "$ac_t""yes" 1>&6
18391   ol_cv_lib_mdbm=yes
18392 else
18393   echo "$ac_t""no" 1>&6
18394
18395                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18396 echo "configure:18397: checking for mdbm_set_chain in -lmdbm" >&5
18397 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18398 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18399   echo $ac_n "(cached) $ac_c" 1>&6
18400 else
18401   ac_save_LIBS="$LIBS"
18402 LIBS="-lmdbm  $LIBS"
18403 cat > conftest.$ac_ext <<EOF
18404 #line 18405 "configure"
18405 #include "confdefs.h"
18406 /* Override any gcc2 internal prototype to avoid an error.  */
18407 /* We use char because int might match the return type of a gcc2
18408     builtin and then its argument prototype would still apply.  */
18409 char mdbm_set_chain();
18410
18411 int main() {
18412 mdbm_set_chain()
18413 ; return 0; }
18414 EOF
18415 if { (eval echo configure:18416: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18416   rm -rf conftest*
18417   eval "ac_cv_lib_$ac_lib_var=yes"
18418 else
18419   echo "configure: failed program was:" >&5
18420   cat conftest.$ac_ext >&5
18421   rm -rf conftest*
18422   eval "ac_cv_lib_$ac_lib_var=no"
18423 fi
18424 rm -f conftest*
18425 LIBS="$ac_save_LIBS"
18426
18427 fi
18428 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18429   echo "$ac_t""yes" 1>&6
18430   ol_cv_lib_mdbm=-lmdbm
18431 else
18432   echo "$ac_t""no" 1>&6
18433 ol_cv_lib_mdbm=no
18434 fi
18435
18436         
18437 fi
18438
18439         LIBS="$ol_LIBS"
18440
18441 fi
18442
18443 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18444
18445
18446  for ac_hdr in mdbm.h
18447 do
18448 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18449 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18450 echo "configure:18451: checking for $ac_hdr" >&5
18451 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18452   echo $ac_n "(cached) $ac_c" 1>&6
18453 else
18454   cat > conftest.$ac_ext <<EOF
18455 #line 18456 "configure"
18456 #include "confdefs.h"
18457 #include <$ac_hdr>
18458 EOF
18459 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18460 { (eval echo configure:18461: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18461 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18462 if test -z "$ac_err"; then
18463   rm -rf conftest*
18464   eval "ac_cv_header_$ac_safe=yes"
18465 else
18466   echo "$ac_err" >&5
18467   echo "configure: failed program was:" >&5
18468   cat conftest.$ac_ext >&5
18469   rm -rf conftest*
18470   eval "ac_cv_header_$ac_safe=no"
18471 fi
18472 rm -f conftest*
18473 fi
18474 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18475   echo "$ac_t""yes" 1>&6
18476     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18477   cat >> confdefs.h <<EOF
18478 #define $ac_tr_hdr 1
18479 EOF
18480  
18481 else
18482   echo "$ac_t""no" 1>&6
18483 fi
18484 done
18485
18486  echo $ac_n "checking for db""... $ac_c" 1>&6
18487 echo "configure:18488: checking for db" >&5
18488 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18489   echo $ac_n "(cached) $ac_c" 1>&6
18490 else
18491   
18492         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18493                 ol_cv_mdbm=no
18494         else
18495                 ol_cv_mdbm=yes
18496         fi
18497
18498 fi
18499
18500 echo "$ac_t""$ol_cv_mdbm" 1>&6
18501  if test $ol_cv_mdbm = yes ; then
18502         cat >> confdefs.h <<\EOF
18503 #define HAVE_MDBM 1
18504 EOF
18505
18506  fi
18507
18508
18509         if test $ol_cv_mdbm = yes ; then
18510                 ol_link_ldbm=mdbm
18511                 ol_with_ldbm_api=mdbm
18512                 if test $ol_cv_lib_mdbm != yes ; then
18513                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18514                 fi
18515         fi
18516 fi
18517
18518 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18519         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18520 echo "configure:18521: checking for GDBM library" >&5
18521 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18522   echo $ac_n "(cached) $ac_c" 1>&6
18523 else
18524         ol_LIBS="$LIBS"
18525         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18526 echo "configure:18527: checking for gdbm_open" >&5
18527 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18528   echo $ac_n "(cached) $ac_c" 1>&6
18529 else
18530   cat > conftest.$ac_ext <<EOF
18531 #line 18532 "configure"
18532 #include "confdefs.h"
18533 /* System header to define __stub macros and hopefully few prototypes,
18534     which can conflict with char gdbm_open(); below.  */
18535 #include <assert.h>
18536 /* Override any gcc2 internal prototype to avoid an error.  */
18537 /* We use char because int might match the return type of a gcc2
18538     builtin and then its argument prototype would still apply.  */
18539 char gdbm_open();
18540 char (*f)();
18541
18542 int main() {
18543
18544 /* The GNU C library defines this for functions which it implements
18545     to always fail with ENOSYS.  Some functions are actually named
18546     something starting with __ and the normal name is an alias.  */
18547 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18548 choke me
18549 #else
18550 f = gdbm_open;
18551 #endif
18552
18553 ; return 0; }
18554 EOF
18555 if { (eval echo configure:18556: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18556   rm -rf conftest*
18557   eval "ac_cv_func_gdbm_open=yes"
18558 else
18559   echo "configure: failed program was:" >&5
18560   cat conftest.$ac_ext >&5
18561   rm -rf conftest*
18562   eval "ac_cv_func_gdbm_open=no"
18563 fi
18564 rm -f conftest*
18565 fi
18566
18567 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18568   echo "$ac_t""yes" 1>&6
18569   ol_cv_lib_gdbm=yes
18570 else
18571   echo "$ac_t""no" 1>&6
18572
18573                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18574 echo "configure:18575: checking for gdbm_open in -lgdbm" >&5
18575 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18576 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18577   echo $ac_n "(cached) $ac_c" 1>&6
18578 else
18579   ac_save_LIBS="$LIBS"
18580 LIBS="-lgdbm  $LIBS"
18581 cat > conftest.$ac_ext <<EOF
18582 #line 18583 "configure"
18583 #include "confdefs.h"
18584 /* Override any gcc2 internal prototype to avoid an error.  */
18585 /* We use char because int might match the return type of a gcc2
18586     builtin and then its argument prototype would still apply.  */
18587 char gdbm_open();
18588
18589 int main() {
18590 gdbm_open()
18591 ; return 0; }
18592 EOF
18593 if { (eval echo configure:18594: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18594   rm -rf conftest*
18595   eval "ac_cv_lib_$ac_lib_var=yes"
18596 else
18597   echo "configure: failed program was:" >&5
18598   cat conftest.$ac_ext >&5
18599   rm -rf conftest*
18600   eval "ac_cv_lib_$ac_lib_var=no"
18601 fi
18602 rm -f conftest*
18603 LIBS="$ac_save_LIBS"
18604
18605 fi
18606 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18607   echo "$ac_t""yes" 1>&6
18608   ol_cv_lib_gdbm=-lgdbm
18609 else
18610   echo "$ac_t""no" 1>&6
18611 ol_cv_lib_gdbm=no
18612 fi
18613
18614         
18615 fi
18616
18617         LIBS="$ol_LIBS"
18618
18619 fi
18620
18621 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18622
18623
18624  for ac_hdr in gdbm.h
18625 do
18626 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18627 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18628 echo "configure:18629: checking for $ac_hdr" >&5
18629 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18630   echo $ac_n "(cached) $ac_c" 1>&6
18631 else
18632   cat > conftest.$ac_ext <<EOF
18633 #line 18634 "configure"
18634 #include "confdefs.h"
18635 #include <$ac_hdr>
18636 EOF
18637 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18638 { (eval echo configure:18639: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18639 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18640 if test -z "$ac_err"; then
18641   rm -rf conftest*
18642   eval "ac_cv_header_$ac_safe=yes"
18643 else
18644   echo "$ac_err" >&5
18645   echo "configure: failed program was:" >&5
18646   cat conftest.$ac_ext >&5
18647   rm -rf conftest*
18648   eval "ac_cv_header_$ac_safe=no"
18649 fi
18650 rm -f conftest*
18651 fi
18652 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18653   echo "$ac_t""yes" 1>&6
18654     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18655   cat >> confdefs.h <<EOF
18656 #define $ac_tr_hdr 1
18657 EOF
18658  
18659 else
18660   echo "$ac_t""no" 1>&6
18661 fi
18662 done
18663
18664  echo $ac_n "checking for db""... $ac_c" 1>&6
18665 echo "configure:18666: checking for db" >&5
18666 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18667   echo $ac_n "(cached) $ac_c" 1>&6
18668 else
18669   
18670         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18671                 ol_cv_gdbm=no
18672         else
18673                 ol_cv_gdbm=yes
18674         fi
18675
18676 fi
18677
18678 echo "$ac_t""$ol_cv_gdbm" 1>&6
18679  if test $ol_cv_gdbm = yes ; then
18680         cat >> confdefs.h <<\EOF
18681 #define HAVE_GDBM 1
18682 EOF
18683
18684  fi
18685
18686
18687         if test $ol_cv_gdbm = yes ; then
18688                 ol_link_ldbm=gdbm
18689                 ol_with_ldbm_api=gdbm
18690
18691                 if test $ol_cv_lib_gdbm != yes ; then
18692                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18693                 fi
18694         fi
18695 fi
18696
18697 if test $ol_with_ldbm_api = ndbm ; then
18698         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18699 echo "configure:18700: checking for NDBM library" >&5
18700 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18701   echo $ac_n "(cached) $ac_c" 1>&6
18702 else
18703         ol_LIBS="$LIBS"
18704         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18705 echo "configure:18706: checking for dbm_open" >&5
18706 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18707   echo $ac_n "(cached) $ac_c" 1>&6
18708 else
18709   cat > conftest.$ac_ext <<EOF
18710 #line 18711 "configure"
18711 #include "confdefs.h"
18712 /* System header to define __stub macros and hopefully few prototypes,
18713     which can conflict with char dbm_open(); below.  */
18714 #include <assert.h>
18715 /* Override any gcc2 internal prototype to avoid an error.  */
18716 /* We use char because int might match the return type of a gcc2
18717     builtin and then its argument prototype would still apply.  */
18718 char dbm_open();
18719 char (*f)();
18720
18721 int main() {
18722
18723 /* The GNU C library defines this for functions which it implements
18724     to always fail with ENOSYS.  Some functions are actually named
18725     something starting with __ and the normal name is an alias.  */
18726 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18727 choke me
18728 #else
18729 f = dbm_open;
18730 #endif
18731
18732 ; return 0; }
18733 EOF
18734 if { (eval echo configure:18735: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18735   rm -rf conftest*
18736   eval "ac_cv_func_dbm_open=yes"
18737 else
18738   echo "configure: failed program was:" >&5
18739   cat conftest.$ac_ext >&5
18740   rm -rf conftest*
18741   eval "ac_cv_func_dbm_open=no"
18742 fi
18743 rm -f conftest*
18744 fi
18745
18746 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18747   echo "$ac_t""yes" 1>&6
18748   ol_cv_lib_ndbm=yes
18749 else
18750   echo "$ac_t""no" 1>&6
18751
18752                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18753 echo "configure:18754: checking for dbm_open in -lndbm" >&5
18754 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18755 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18756   echo $ac_n "(cached) $ac_c" 1>&6
18757 else
18758   ac_save_LIBS="$LIBS"
18759 LIBS="-lndbm  $LIBS"
18760 cat > conftest.$ac_ext <<EOF
18761 #line 18762 "configure"
18762 #include "confdefs.h"
18763 /* Override any gcc2 internal prototype to avoid an error.  */
18764 /* We use char because int might match the return type of a gcc2
18765     builtin and then its argument prototype would still apply.  */
18766 char dbm_open();
18767
18768 int main() {
18769 dbm_open()
18770 ; return 0; }
18771 EOF
18772 if { (eval echo configure:18773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18773   rm -rf conftest*
18774   eval "ac_cv_lib_$ac_lib_var=yes"
18775 else
18776   echo "configure: failed program was:" >&5
18777   cat conftest.$ac_ext >&5
18778   rm -rf conftest*
18779   eval "ac_cv_lib_$ac_lib_var=no"
18780 fi
18781 rm -f conftest*
18782 LIBS="$ac_save_LIBS"
18783
18784 fi
18785 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18786   echo "$ac_t""yes" 1>&6
18787   ol_cv_lib_ndbm=-lndbm
18788 else
18789   echo "$ac_t""no" 1>&6
18790
18791                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18792 echo "configure:18793: checking for dbm_open in -ldbm" >&5
18793 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18794 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18795   echo $ac_n "(cached) $ac_c" 1>&6
18796 else
18797   ac_save_LIBS="$LIBS"
18798 LIBS="-ldbm  $LIBS"
18799 cat > conftest.$ac_ext <<EOF
18800 #line 18801 "configure"
18801 #include "confdefs.h"
18802 /* Override any gcc2 internal prototype to avoid an error.  */
18803 /* We use char because int might match the return type of a gcc2
18804     builtin and then its argument prototype would still apply.  */
18805 char dbm_open();
18806
18807 int main() {
18808 dbm_open()
18809 ; return 0; }
18810 EOF
18811 if { (eval echo configure:18812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18812   rm -rf conftest*
18813   eval "ac_cv_lib_$ac_lib_var=yes"
18814 else
18815   echo "configure: failed program was:" >&5
18816   cat conftest.$ac_ext >&5
18817   rm -rf conftest*
18818   eval "ac_cv_lib_$ac_lib_var=no"
18819 fi
18820 rm -f conftest*
18821 LIBS="$ac_save_LIBS"
18822
18823 fi
18824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18825   echo "$ac_t""yes" 1>&6
18826   ol_cv_lib_ndbm=-ldbm
18827 else
18828   echo "$ac_t""no" 1>&6
18829 ol_cv_lib_ndbm=no
18830 fi
18831                 
18832 fi
18833
18834         
18835 fi
18836
18837         LIBS="$ol_LIBS"
18838
18839 fi
18840
18841 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
18842
18843
18844  for ac_hdr in ndbm.h
18845 do
18846 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18847 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18848 echo "configure:18849: checking for $ac_hdr" >&5
18849 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18850   echo $ac_n "(cached) $ac_c" 1>&6
18851 else
18852   cat > conftest.$ac_ext <<EOF
18853 #line 18854 "configure"
18854 #include "confdefs.h"
18855 #include <$ac_hdr>
18856 EOF
18857 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18858 { (eval echo configure:18859: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18859 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18860 if test -z "$ac_err"; then
18861   rm -rf conftest*
18862   eval "ac_cv_header_$ac_safe=yes"
18863 else
18864   echo "$ac_err" >&5
18865   echo "configure: failed program was:" >&5
18866   cat conftest.$ac_ext >&5
18867   rm -rf conftest*
18868   eval "ac_cv_header_$ac_safe=no"
18869 fi
18870 rm -f conftest*
18871 fi
18872 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18873   echo "$ac_t""yes" 1>&6
18874     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18875   cat >> confdefs.h <<EOF
18876 #define $ac_tr_hdr 1
18877 EOF
18878  
18879 else
18880   echo "$ac_t""no" 1>&6
18881 fi
18882 done
18883
18884  echo $ac_n "checking for db""... $ac_c" 1>&6
18885 echo "configure:18886: checking for db" >&5
18886 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
18887   echo $ac_n "(cached) $ac_c" 1>&6
18888 else
18889   
18890         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
18891                 ol_cv_ndbm=no
18892         else
18893                 ol_cv_ndbm=yes
18894         fi
18895
18896 fi
18897
18898 echo "$ac_t""$ol_cv_ndbm" 1>&6
18899  if test $ol_cv_ndbm = yes ; then
18900         cat >> confdefs.h <<\EOF
18901 #define HAVE_NDBM 1
18902 EOF
18903
18904  fi
18905
18906
18907         if test $ol_cv_ndbm = yes ; then
18908                 ol_link_ldbm=ndbm
18909                 ol_with_ldbm_api=ndbm
18910
18911                 if test $ol_cv_lib_ndbm != yes ; then
18912                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
18913                 fi
18914         fi
18915 fi
18916
18917 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
18918         echo "configure: warning: could not find suitable LDBM backend" 1>&2
18919         if test $ol_enable_ldbm = yes ; then
18920                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
18921         fi
18922
18923         echo "configure: warning: disabling LDBM" 1>&2
18924         ol_enable_ldbm=no
18925 fi
18926
18927 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
18928         BUILD_LIBS_DYNAMIC=shared
18929         cat >> confdefs.h <<\EOF
18930 #define LDAP_LIBS_DYNAMIC 1
18931 EOF
18932
18933 else
18934         BUILD_LIBS_DYNAMIC=static
18935 fi
18936
18937 if test $ol_enable_wrappers != no ; then
18938         for ac_hdr in tcpd.h
18939 do
18940 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18941 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18942 echo "configure:18943: checking for $ac_hdr" >&5
18943 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18944   echo $ac_n "(cached) $ac_c" 1>&6
18945 else
18946   cat > conftest.$ac_ext <<EOF
18947 #line 18948 "configure"
18948 #include "confdefs.h"
18949 #include <$ac_hdr>
18950 EOF
18951 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18952 { (eval echo configure:18953: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18953 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18954 if test -z "$ac_err"; then
18955   rm -rf conftest*
18956   eval "ac_cv_header_$ac_safe=yes"
18957 else
18958   echo "$ac_err" >&5
18959   echo "configure: failed program was:" >&5
18960   cat conftest.$ac_ext >&5
18961   rm -rf conftest*
18962   eval "ac_cv_header_$ac_safe=no"
18963 fi
18964 rm -f conftest*
18965 fi
18966 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18967   echo "$ac_t""yes" 1>&6
18968     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18969   cat >> confdefs.h <<EOF
18970 #define $ac_tr_hdr 1
18971 EOF
18972  
18973                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
18974 echo "configure:18975: checking for TCP wrappers library" >&5
18975                 save_LIBS="$LIBS"
18976                 LIBS="$LIBS -lwrap"
18977                 cat > conftest.$ac_ext <<EOF
18978 #line 18979 "configure"
18979 #include "confdefs.h"
18980
18981 #include <tcpd.h>
18982 int allow_severity = 0;
18983 int deny_severity  = 0;
18984
18985 struct request_info *req;
18986                 
18987 int main() {
18988
18989 hosts_access(req)
18990                 
18991 ; return 0; }
18992 EOF
18993 if { (eval echo configure:18994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18994   rm -rf conftest*
18995   echo "$ac_t""-lwrap" 1>&6
18996                 have_wrappers=yes
18997                 LIBS="$save_LIBS"
18998 else
18999   echo "configure: failed program was:" >&5
19000   cat conftest.$ac_ext >&5
19001   rm -rf conftest*
19002   
19003                                 LIBS="$LIBS -lnsl"
19004                 cat > conftest.$ac_ext <<EOF
19005 #line 19006 "configure"
19006 #include "confdefs.h"
19007
19008 #include <tcpd.h>
19009 int allow_severity = 0;
19010 int deny_severity  = 0;
19011
19012 struct request_info *req;
19013                 
19014 int main() {
19015
19016 hosts_access(req)
19017                 
19018 ; return 0; }
19019 EOF
19020 if { (eval echo configure:19021: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19021   rm -rf conftest*
19022   echo "$ac_t""-lwrap -lnsl" 1>&6
19023                 have_wrappers=yes
19024                 LIBS="$save_LIBS -lnsl"
19025 else
19026   echo "configure: failed program was:" >&5
19027   cat conftest.$ac_ext >&5
19028   rm -rf conftest*
19029   
19030                 echo "$ac_t""no" 1>&6
19031                 have_wrappers=no
19032                 LIBS=$save_LIBS
19033 fi
19034 rm -f conftest*
19035 fi
19036 rm -f conftest*
19037 else
19038   echo "$ac_t""no" 1>&6
19039 have_wrappers=no
19040 fi
19041 done
19042
19043
19044         if test $have_wrappers = yes ; then
19045                 cat >> confdefs.h <<\EOF
19046 #define HAVE_TCPD 1
19047 EOF
19048
19049                 WRAP_LIBS="-lwrap"
19050         elif test $ol_enable_wrappers = yes ; then
19051                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19052         else
19053                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19054                 WRAP_LIBS=""
19055         fi
19056 fi
19057
19058 if test $ol_enable_syslog != no ; then
19059         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19060 echo "configure:19061: checking for openlog" >&5
19061 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19062   echo $ac_n "(cached) $ac_c" 1>&6
19063 else
19064   cat > conftest.$ac_ext <<EOF
19065 #line 19066 "configure"
19066 #include "confdefs.h"
19067 /* System header to define __stub macros and hopefully few prototypes,
19068     which can conflict with char openlog(); below.  */
19069 #include <assert.h>
19070 /* Override any gcc2 internal prototype to avoid an error.  */
19071 /* We use char because int might match the return type of a gcc2
19072     builtin and then its argument prototype would still apply.  */
19073 char openlog();
19074 char (*f)();
19075
19076 int main() {
19077
19078 /* The GNU C library defines this for functions which it implements
19079     to always fail with ENOSYS.  Some functions are actually named
19080     something starting with __ and the normal name is an alias.  */
19081 #if defined (__stub_openlog) || defined (__stub___openlog)
19082 choke me
19083 #else
19084 f = openlog;
19085 #endif
19086
19087 ; return 0; }
19088 EOF
19089 if { (eval echo configure:19090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19090   rm -rf conftest*
19091   eval "ac_cv_func_openlog=yes"
19092 else
19093   echo "configure: failed program was:" >&5
19094   cat conftest.$ac_ext >&5
19095   rm -rf conftest*
19096   eval "ac_cv_func_openlog=no"
19097 fi
19098 rm -f conftest*
19099 fi
19100
19101 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19102   echo "$ac_t""yes" 1>&6
19103   :
19104 else
19105   echo "$ac_t""no" 1>&6
19106 fi
19107
19108         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19109                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19110         fi
19111         ol_enable_syslog=$ac_cv_func_openlog
19112 fi
19113
19114
19115 ol_link_sql=no
19116 if test $ol_enable_sql != no ; then
19117         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19118 echo "configure:19119: checking for SQLDriverConnect in -liodbc" >&5
19119 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19120 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19121   echo $ac_n "(cached) $ac_c" 1>&6
19122 else
19123   ac_save_LIBS="$LIBS"
19124 LIBS="-liodbc  $LIBS"
19125 cat > conftest.$ac_ext <<EOF
19126 #line 19127 "configure"
19127 #include "confdefs.h"
19128 /* Override any gcc2 internal prototype to avoid an error.  */
19129 /* We use char because int might match the return type of a gcc2
19130     builtin and then its argument prototype would still apply.  */
19131 char SQLDriverConnect();
19132
19133 int main() {
19134 SQLDriverConnect()
19135 ; return 0; }
19136 EOF
19137 if { (eval echo configure:19138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19138   rm -rf conftest*
19139   eval "ac_cv_lib_$ac_lib_var=yes"
19140 else
19141   echo "configure: failed program was:" >&5
19142   cat conftest.$ac_ext >&5
19143   rm -rf conftest*
19144   eval "ac_cv_lib_$ac_lib_var=no"
19145 fi
19146 rm -f conftest*
19147 LIBS="$ac_save_LIBS"
19148
19149 fi
19150 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19151   echo "$ac_t""yes" 1>&6
19152   have_iodbc=yes
19153 else
19154   echo "$ac_t""no" 1>&6
19155 have_iodbc=no
19156 fi
19157
19158         if test $have_iodbc = yes ; then
19159                 ol_link_sql="-liodbc"
19160         else
19161                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19162 echo "configure:19163: checking for SQLDriverConnect in -lodbc" >&5
19163 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19164 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19165   echo $ac_n "(cached) $ac_c" 1>&6
19166 else
19167   ac_save_LIBS="$LIBS"
19168 LIBS="-lodbc  $LIBS"
19169 cat > conftest.$ac_ext <<EOF
19170 #line 19171 "configure"
19171 #include "confdefs.h"
19172 /* Override any gcc2 internal prototype to avoid an error.  */
19173 /* We use char because int might match the return type of a gcc2
19174     builtin and then its argument prototype would still apply.  */
19175 char SQLDriverConnect();
19176
19177 int main() {
19178 SQLDriverConnect()
19179 ; return 0; }
19180 EOF
19181 if { (eval echo configure:19182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19182   rm -rf conftest*
19183   eval "ac_cv_lib_$ac_lib_var=yes"
19184 else
19185   echo "configure: failed program was:" >&5
19186   cat conftest.$ac_ext >&5
19187   rm -rf conftest*
19188   eval "ac_cv_lib_$ac_lib_var=no"
19189 fi
19190 rm -f conftest*
19191 LIBS="$ac_save_LIBS"
19192
19193 fi
19194 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19195   echo "$ac_t""yes" 1>&6
19196   have_odbc=yes
19197 else
19198   echo "$ac_t""no" 1>&6
19199 have_odbc=no
19200 fi
19201
19202                 if test $have_odbc = yes ; then
19203                         ol_link_sql="-lodbc"
19204                 fi
19205         fi
19206
19207         if test $ol_link_sql != no ; then
19208                 SLAPD_SQL_LIBS="$ol_link_sql"
19209
19210         elif test $ol_enable_sql != auto ; then
19211                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19212         fi
19213 fi
19214
19215 if test $ol_enable_tcl != no ; then
19216         for ac_hdr in tcl.h
19217 do
19218 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19219 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19220 echo "configure:19221: checking for $ac_hdr" >&5
19221 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19222   echo $ac_n "(cached) $ac_c" 1>&6
19223 else
19224   cat > conftest.$ac_ext <<EOF
19225 #line 19226 "configure"
19226 #include "confdefs.h"
19227 #include <$ac_hdr>
19228 EOF
19229 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19230 { (eval echo configure:19231: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19231 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19232 if test -z "$ac_err"; then
19233   rm -rf conftest*
19234   eval "ac_cv_header_$ac_safe=yes"
19235 else
19236   echo "$ac_err" >&5
19237   echo "configure: failed program was:" >&5
19238   cat conftest.$ac_ext >&5
19239   rm -rf conftest*
19240   eval "ac_cv_header_$ac_safe=no"
19241 fi
19242 rm -f conftest*
19243 fi
19244 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19245   echo "$ac_t""yes" 1>&6
19246     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19247   cat >> confdefs.h <<EOF
19248 #define $ac_tr_hdr 1
19249 EOF
19250  
19251 else
19252   echo "$ac_t""no" 1>&6
19253 fi
19254 done
19255
19256
19257         if test $ac_cv_header_tcl_h != yes ; then
19258                 have_tcl=no
19259         else
19260                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19261                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19262 echo "configure:19263: checking for main in -l$lib" >&5
19263 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19264 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19265   echo $ac_n "(cached) $ac_c" 1>&6
19266 else
19267   ac_save_LIBS="$LIBS"
19268 LIBS="-l$lib  $LIBS"
19269 cat > conftest.$ac_ext <<EOF
19270 #line 19271 "configure"
19271 #include "confdefs.h"
19272
19273 int main() {
19274 main()
19275 ; return 0; }
19276 EOF
19277 if { (eval echo configure:19278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19278   rm -rf conftest*
19279   eval "ac_cv_lib_$ac_lib_var=yes"
19280 else
19281   echo "configure: failed program was:" >&5
19282   cat conftest.$ac_ext >&5
19283   rm -rf conftest*
19284   eval "ac_cv_lib_$ac_lib_var=no"
19285 fi
19286 rm -f conftest*
19287 LIBS="$ac_save_LIBS"
19288
19289 fi
19290 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19291   echo "$ac_t""yes" 1>&6
19292   have_tcl=yes
19293                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19294                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19295                            else
19296                                         MOD_TCL_LIB="-l${lib}"
19297                            fi;break
19298 else
19299   echo "$ac_t""no" 1>&6
19300 have_tcl=no
19301 fi
19302
19303                 done
19304         fi
19305
19306         if test $have_tcl != yes ; then
19307                 echo "configure: warning: could not find -ltcl" 1>&2
19308                 if test $ol_enable_tcl = yes ; then
19309                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19310                 fi
19311
19312                 ol_enable_tcl=no
19313         fi
19314 fi
19315
19316 ol_link_termcap=no
19317 for ac_hdr in termcap.h ncurses.h
19318 do
19319 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19320 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19321 echo "configure:19322: checking for $ac_hdr" >&5
19322 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19323   echo $ac_n "(cached) $ac_c" 1>&6
19324 else
19325   cat > conftest.$ac_ext <<EOF
19326 #line 19327 "configure"
19327 #include "confdefs.h"
19328 #include <$ac_hdr>
19329 EOF
19330 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19331 { (eval echo configure:19332: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19332 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19333 if test -z "$ac_err"; then
19334   rm -rf conftest*
19335   eval "ac_cv_header_$ac_safe=yes"
19336 else
19337   echo "$ac_err" >&5
19338   echo "configure: failed program was:" >&5
19339   cat conftest.$ac_ext >&5
19340   rm -rf conftest*
19341   eval "ac_cv_header_$ac_safe=no"
19342 fi
19343 rm -f conftest*
19344 fi
19345 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19346   echo "$ac_t""yes" 1>&6
19347     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19348   cat >> confdefs.h <<EOF
19349 #define $ac_tr_hdr 1
19350 EOF
19351  
19352 else
19353   echo "$ac_t""no" 1>&6
19354 fi
19355 done
19356
19357
19358 if test $ol_link_termcap = no ; then
19359         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19360 echo "configure:19361: checking for tputs in -ltermcap" >&5
19361 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19362 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19363   echo $ac_n "(cached) $ac_c" 1>&6
19364 else
19365   ac_save_LIBS="$LIBS"
19366 LIBS="-ltermcap  $LIBS"
19367 cat > conftest.$ac_ext <<EOF
19368 #line 19369 "configure"
19369 #include "confdefs.h"
19370 /* Override any gcc2 internal prototype to avoid an error.  */
19371 /* We use char because int might match the return type of a gcc2
19372     builtin and then its argument prototype would still apply.  */
19373 char tputs();
19374
19375 int main() {
19376 tputs()
19377 ; return 0; }
19378 EOF
19379 if { (eval echo configure:19380: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19380   rm -rf conftest*
19381   eval "ac_cv_lib_$ac_lib_var=yes"
19382 else
19383   echo "configure: failed program was:" >&5
19384   cat conftest.$ac_ext >&5
19385   rm -rf conftest*
19386   eval "ac_cv_lib_$ac_lib_var=no"
19387 fi
19388 rm -f conftest*
19389 LIBS="$ac_save_LIBS"
19390
19391 fi
19392 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19393   echo "$ac_t""yes" 1>&6
19394   have_termcap=yes
19395 else
19396   echo "$ac_t""no" 1>&6
19397 have_termcap=no
19398 fi
19399
19400         if test $have_termcap = yes ; then
19401                 cat >> confdefs.h <<\EOF
19402 #define HAVE_TERMCAP 1
19403 EOF
19404
19405                 ol_link_termcap=yes
19406                 TERMCAP_LIBS=-ltermcap
19407         fi
19408 fi
19409
19410 if test $ol_link_termcap = no ; then
19411         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19412 echo "configure:19413: checking for initscr in -lncurses" >&5
19413 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19414 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19415   echo $ac_n "(cached) $ac_c" 1>&6
19416 else
19417   ac_save_LIBS="$LIBS"
19418 LIBS="-lncurses  $LIBS"
19419 cat > conftest.$ac_ext <<EOF
19420 #line 19421 "configure"
19421 #include "confdefs.h"
19422 /* Override any gcc2 internal prototype to avoid an error.  */
19423 /* We use char because int might match the return type of a gcc2
19424     builtin and then its argument prototype would still apply.  */
19425 char initscr();
19426
19427 int main() {
19428 initscr()
19429 ; return 0; }
19430 EOF
19431 if { (eval echo configure:19432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19432   rm -rf conftest*
19433   eval "ac_cv_lib_$ac_lib_var=yes"
19434 else
19435   echo "configure: failed program was:" >&5
19436   cat conftest.$ac_ext >&5
19437   rm -rf conftest*
19438   eval "ac_cv_lib_$ac_lib_var=no"
19439 fi
19440 rm -f conftest*
19441 LIBS="$ac_save_LIBS"
19442
19443 fi
19444 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19445   echo "$ac_t""yes" 1>&6
19446   have_ncurses=yes
19447 else
19448   echo "$ac_t""no" 1>&6
19449 have_ncurses=no
19450 fi
19451
19452         if test $have_ncurses = yes ; then
19453                 cat >> confdefs.h <<\EOF
19454 #define HAVE_NCURSES 1
19455 EOF
19456
19457                 ol_link_termcap=yes
19458                 TERMCAP_LIBS=-lncurses
19459         fi
19460 fi
19461
19462 if test $ol_link_termcap = no ; then
19463         cat >> confdefs.h <<\EOF
19464 #define NO_TERMCAP 1
19465 EOF
19466
19467         TERMCAP_LIBS=
19468 fi
19469
19470 ol_link_sasl=no
19471 ol_link_spasswd=no
19472 if test $ol_with_cyrus_sasl != no ; then
19473         for ac_hdr in sasl/sasl.h sasl.h
19474 do
19475 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19476 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19477 echo "configure:19478: checking for $ac_hdr" >&5
19478 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19479   echo $ac_n "(cached) $ac_c" 1>&6
19480 else
19481   cat > conftest.$ac_ext <<EOF
19482 #line 19483 "configure"
19483 #include "confdefs.h"
19484 #include <$ac_hdr>
19485 EOF
19486 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19487 { (eval echo configure:19488: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19488 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19489 if test -z "$ac_err"; then
19490   rm -rf conftest*
19491   eval "ac_cv_header_$ac_safe=yes"
19492 else
19493   echo "$ac_err" >&5
19494   echo "configure: failed program was:" >&5
19495   cat conftest.$ac_ext >&5
19496   rm -rf conftest*
19497   eval "ac_cv_header_$ac_safe=no"
19498 fi
19499 rm -f conftest*
19500 fi
19501 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19502   echo "$ac_t""yes" 1>&6
19503     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19504   cat >> confdefs.h <<EOF
19505 #define $ac_tr_hdr 1
19506 EOF
19507  
19508 else
19509   echo "$ac_t""no" 1>&6
19510 fi
19511 done
19512
19513
19514         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19515                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19516 echo "configure:19517: checking for sasl_client_init in -lsasl2" >&5
19517 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19518 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19519   echo $ac_n "(cached) $ac_c" 1>&6
19520 else
19521   ac_save_LIBS="$LIBS"
19522 LIBS="-lsasl2  $LIBS"
19523 cat > conftest.$ac_ext <<EOF
19524 #line 19525 "configure"
19525 #include "confdefs.h"
19526 /* Override any gcc2 internal prototype to avoid an error.  */
19527 /* We use char because int might match the return type of a gcc2
19528     builtin and then its argument prototype would still apply.  */
19529 char sasl_client_init();
19530
19531 int main() {
19532 sasl_client_init()
19533 ; return 0; }
19534 EOF
19535 if { (eval echo configure:19536: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19536   rm -rf conftest*
19537   eval "ac_cv_lib_$ac_lib_var=yes"
19538 else
19539   echo "configure: failed program was:" >&5
19540   cat conftest.$ac_ext >&5
19541   rm -rf conftest*
19542   eval "ac_cv_lib_$ac_lib_var=no"
19543 fi
19544 rm -f conftest*
19545 LIBS="$ac_save_LIBS"
19546
19547 fi
19548 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19549   echo "$ac_t""yes" 1>&6
19550   ol_link_sasl="-lsasl2"
19551 else
19552   echo "$ac_t""no" 1>&6
19553 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19554 echo "configure:19555: checking for sasl_client_init in -lsasl" >&5
19555 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19556 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19557   echo $ac_n "(cached) $ac_c" 1>&6
19558 else
19559   ac_save_LIBS="$LIBS"
19560 LIBS="-lsasl  $LIBS"
19561 cat > conftest.$ac_ext <<EOF
19562 #line 19563 "configure"
19563 #include "confdefs.h"
19564 /* Override any gcc2 internal prototype to avoid an error.  */
19565 /* We use char because int might match the return type of a gcc2
19566     builtin and then its argument prototype would still apply.  */
19567 char sasl_client_init();
19568
19569 int main() {
19570 sasl_client_init()
19571 ; return 0; }
19572 EOF
19573 if { (eval echo configure:19574: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19574   rm -rf conftest*
19575   eval "ac_cv_lib_$ac_lib_var=yes"
19576 else
19577   echo "configure: failed program was:" >&5
19578   cat conftest.$ac_ext >&5
19579   rm -rf conftest*
19580   eval "ac_cv_lib_$ac_lib_var=no"
19581 fi
19582 rm -f conftest*
19583 LIBS="$ac_save_LIBS"
19584
19585 fi
19586 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19587   echo "$ac_t""yes" 1>&6
19588   ol_link_sasl="-lsasl"
19589 else
19590   echo "$ac_t""no" 1>&6
19591 fi
19592
19593 fi
19594
19595         fi
19596
19597         if test $ol_link_sasl = no ; then
19598                 if test $ol_with_cyrus_sasl != auto ; then
19599                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19600                 else
19601                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19602                         echo "configure: warning: SASL authentication not supported!" 1>&2
19603                         if test $ol_link_tls = no ; then
19604                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19605                         fi
19606                 fi
19607         else
19608                 echo $ac_n "checking Cyrus SASL library version""... $ac_c" 1>&6
19609 echo "configure:19610: checking Cyrus SASL library version" >&5
19610 if eval "test \"\${ol_cv_sasl_compat+set}\" = set"; then
19611   echo $ac_n "(cached) $ac_c" 1>&6
19612 else
19613   
19614         cat > conftest.$ac_ext <<EOF
19615 #line 19616 "configure"
19616 #include "confdefs.h"
19617
19618 #ifdef HAVE_SASL_SASL_H
19619 #include <sasl/sasl.h>
19620 #else
19621 #include <sasl.h>
19622 #endif
19623
19624 /* require 2.1.3 or later */
19625 #if SASL_VERSION_MAJOR == 1  && SASL_VERSION_MINOR >= 5
19626         char *__sasl_compat = "1.5.x okay";
19627 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR > 1
19628         __sasl_compat "2.2+ or better okay (we guess)";
19629 #elif SASL_VERSION_MAJOR == 2  && SASL_VERSION_MINOR == 1 \
19630         && SASL_VERSION_STEP >=3
19631         __sasl_compat = "2.1.3+ or better okay";
19632 #endif
19633         
19634 EOF
19635 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19636   egrep "__sasl_compat" >/dev/null 2>&1; then
19637   rm -rf conftest*
19638   ol_cv_sasl_compat=yes
19639 else
19640   rm -rf conftest*
19641   ol_cv_sasl_compat=no
19642 fi
19643 rm -f conftest*
19644
19645 fi
19646
19647 echo "$ac_t""$ol_cv_sasl_compat" 1>&6
19648
19649                 if test $ol_cv_sasl_compat = no ; then
19650                         ol_link_sasl=no
19651                         { echo "configure: error: Cyrus SASL library located but incompatible" 1>&2; exit 1; }
19652                 fi
19653
19654                 cat >> confdefs.h <<\EOF
19655 #define HAVE_CYRUS_SASL 1
19656 EOF
19657
19658                 SASL_LIBS="$ol_link_sasl"
19659                 if test $ol_enable_spasswd != no ; then
19660                         ol_link_spasswd=yes
19661                 fi
19662         fi
19663
19664 else
19665         echo "configure: warning: SASL authentication not supported!" 1>&2
19666         if test $ol_link_tls = no ; then
19667                 echo "configure: warning: Strong authentication not supported!" 1>&2
19668         fi
19669 fi
19670
19671 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19672         dev=no
19673         if test -r /dev/urandom ; then
19674                 dev="/dev/urandom";
19675         elif test -r /idev/urandom ; then
19676                 dev="/idev/urandom";
19677         elif test -r /dev/srandom ; then
19678                 dev="/dev/srandom";
19679         elif test -r /dev/random ; then
19680                 dev="/dev/random";
19681         elif test -r /idev/random ; then
19682                 dev="/idev/random";
19683         fi
19684
19685         if test $dev != no ; then
19686                 cat >> confdefs.h <<EOF
19687 #define URANDOM_DEVICE "$dev"
19688 EOF
19689
19690         fi
19691 fi
19692
19693 ol_link_fetch=no
19694 if test $ol_with_fetch != no ; then
19695         ol_LIBS=$LIBS
19696 LIBS="-lfetch -lcom_err $LIBS"
19697 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19698 echo "configure:19699: checking fetch(3) library" >&5
19699 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19700   echo $ac_n "(cached) $ac_c" 1>&6
19701 else
19702   
19703         cat > conftest.$ac_ext <<EOF
19704 #line 19705 "configure"
19705 #include "confdefs.h"
19706
19707 #include <sys/param.h>
19708 #include <stdio.h>
19709 #include <fetch.h>
19710 int main() {
19711 struct url *u = fetchParseURL("file:///"); 
19712 ; return 0; }
19713 EOF
19714 if { (eval echo configure:19715: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19715   rm -rf conftest*
19716   ol_cv_lib_fetch=yes
19717 else
19718   echo "configure: failed program was:" >&5
19719   cat conftest.$ac_ext >&5
19720   rm -rf conftest*
19721   ol_cv_lib_fetch=no
19722 fi
19723 rm -f conftest*
19724 fi
19725
19726 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19727 LIBS=$ol_LIBS
19728 if test $ol_cv_lib_fetch != no ; then
19729         ol_link_fetch="-lfetch -lcom_err"
19730         cat >> confdefs.h <<\EOF
19731 #define HAVE_FETCH 1
19732 EOF
19733
19734 fi
19735
19736
19737         if test $ol_cv_lib_fetch != no ; then
19738                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19739                 ol_link_fetch=freebsd
19740
19741         elif test $ol_with_fetch != auto ; then
19742                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19743         fi 
19744 fi
19745
19746 ol_link_readline=no
19747 if test $ol_with_readline != no ; then
19748         for ac_hdr in readline/readline.h readline/history.h
19749 do
19750 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19751 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19752 echo "configure:19753: checking for $ac_hdr" >&5
19753 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19754   echo $ac_n "(cached) $ac_c" 1>&6
19755 else
19756   cat > conftest.$ac_ext <<EOF
19757 #line 19758 "configure"
19758 #include "confdefs.h"
19759 #include <$ac_hdr>
19760 EOF
19761 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19762 { (eval echo configure:19763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19763 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19764 if test -z "$ac_err"; then
19765   rm -rf conftest*
19766   eval "ac_cv_header_$ac_safe=yes"
19767 else
19768   echo "$ac_err" >&5
19769   echo "configure: failed program was:" >&5
19770   cat conftest.$ac_ext >&5
19771   rm -rf conftest*
19772   eval "ac_cv_header_$ac_safe=no"
19773 fi
19774 rm -f conftest*
19775 fi
19776 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19777   echo "$ac_t""yes" 1>&6
19778     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19779   cat >> confdefs.h <<EOF
19780 #define $ac_tr_hdr 1
19781 EOF
19782  
19783 else
19784   echo "$ac_t""no" 1>&6
19785 fi
19786 done
19787
19788
19789         if test $ac_cv_header_readline_readline_h = yes ; then
19790                 save_LIBS="$LIBS"
19791                 LIBS="$TERMCAP_LIBS $LIBS"
19792                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
19793 echo "configure:19794: checking for readline in -lreadline" >&5
19794 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
19795 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19796   echo $ac_n "(cached) $ac_c" 1>&6
19797 else
19798   ac_save_LIBS="$LIBS"
19799 LIBS="-lreadline  $LIBS"
19800 cat > conftest.$ac_ext <<EOF
19801 #line 19802 "configure"
19802 #include "confdefs.h"
19803 /* Override any gcc2 internal prototype to avoid an error.  */
19804 /* We use char because int might match the return type of a gcc2
19805     builtin and then its argument prototype would still apply.  */
19806 char readline();
19807
19808 int main() {
19809 readline()
19810 ; return 0; }
19811 EOF
19812 if { (eval echo configure:19813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19813   rm -rf conftest*
19814   eval "ac_cv_lib_$ac_lib_var=yes"
19815 else
19816   echo "configure: failed program was:" >&5
19817   cat conftest.$ac_ext >&5
19818   rm -rf conftest*
19819   eval "ac_cv_lib_$ac_lib_var=no"
19820 fi
19821 rm -f conftest*
19822 LIBS="$ac_save_LIBS"
19823
19824 fi
19825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19826   echo "$ac_t""yes" 1>&6
19827   have_readline=yes
19828 else
19829   echo "$ac_t""no" 1>&6
19830 have_readline=no
19831 fi
19832
19833                 LIBS="$save_LIBS"
19834                         
19835                 if test $have_readline = yes ; then
19836                         ol_with_readline=found
19837                         ol_link_readline=yes
19838
19839                         READLINE_LIBS="-lreadline"
19840                 fi
19841         fi
19842 fi
19843
19844 if test $ol_link_readline = yes ; then
19845         cat >> confdefs.h <<\EOF
19846 #define HAVE_READLINE 1
19847 EOF
19848
19849 fi
19850
19851
19852 if test $ol_enable_crypt != no ; then
19853         echo $ac_n "checking for crypt""... $ac_c" 1>&6
19854 echo "configure:19855: checking for crypt" >&5
19855 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
19856   echo $ac_n "(cached) $ac_c" 1>&6
19857 else
19858   cat > conftest.$ac_ext <<EOF
19859 #line 19860 "configure"
19860 #include "confdefs.h"
19861 /* System header to define __stub macros and hopefully few prototypes,
19862     which can conflict with char crypt(); below.  */
19863 #include <assert.h>
19864 /* Override any gcc2 internal prototype to avoid an error.  */
19865 /* We use char because int might match the return type of a gcc2
19866     builtin and then its argument prototype would still apply.  */
19867 char crypt();
19868 char (*f)();
19869
19870 int main() {
19871
19872 /* The GNU C library defines this for functions which it implements
19873     to always fail with ENOSYS.  Some functions are actually named
19874     something starting with __ and the normal name is an alias.  */
19875 #if defined (__stub_crypt) || defined (__stub___crypt)
19876 choke me
19877 #else
19878 f = crypt;
19879 #endif
19880
19881 ; return 0; }
19882 EOF
19883 if { (eval echo configure:19884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19884   rm -rf conftest*
19885   eval "ac_cv_func_crypt=yes"
19886 else
19887   echo "configure: failed program was:" >&5
19888   cat conftest.$ac_ext >&5
19889   rm -rf conftest*
19890   eval "ac_cv_func_crypt=no"
19891 fi
19892 rm -f conftest*
19893 fi
19894
19895 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
19896   echo "$ac_t""yes" 1>&6
19897   have_crypt=yes
19898 else
19899   echo "$ac_t""no" 1>&6
19900
19901                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
19902 echo "configure:19903: checking for crypt in -lcrypt" >&5
19903 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
19904 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19905   echo $ac_n "(cached) $ac_c" 1>&6
19906 else
19907   ac_save_LIBS="$LIBS"
19908 LIBS="-lcrypt  $LIBS"
19909 cat > conftest.$ac_ext <<EOF
19910 #line 19911 "configure"
19911 #include "confdefs.h"
19912 /* Override any gcc2 internal prototype to avoid an error.  */
19913 /* We use char because int might match the return type of a gcc2
19914     builtin and then its argument prototype would still apply.  */
19915 char crypt();
19916
19917 int main() {
19918 crypt()
19919 ; return 0; }
19920 EOF
19921 if { (eval echo configure:19922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19922   rm -rf conftest*
19923   eval "ac_cv_lib_$ac_lib_var=yes"
19924 else
19925   echo "configure: failed program was:" >&5
19926   cat conftest.$ac_ext >&5
19927   rm -rf conftest*
19928   eval "ac_cv_lib_$ac_lib_var=no"
19929 fi
19930 rm -f conftest*
19931 LIBS="$ac_save_LIBS"
19932
19933 fi
19934 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19935   echo "$ac_t""yes" 1>&6
19936   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
19937                         have_crypt=yes
19938 else
19939   echo "$ac_t""no" 1>&6
19940 have_crypt=no
19941 fi
19942
19943 fi
19944
19945
19946         if test $have_crypt = yes ; then
19947                 cat >> confdefs.h <<\EOF
19948 #define HAVE_CRYPT 1
19949 EOF
19950
19951         else
19952                 echo "configure: warning: could not find crypt" 1>&2
19953                 if test $ol_enable_crypt = yes ; then
19954                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
19955                 fi
19956
19957                 echo "configure: warning: disabling crypt support" 1>&2
19958                 ol_enable_crypt=no
19959         fi
19960 fi
19961
19962 if test $ol_enable_proctitle != no ; then
19963         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
19964 echo "configure:19965: checking for setproctitle" >&5
19965 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
19966   echo $ac_n "(cached) $ac_c" 1>&6
19967 else
19968   cat > conftest.$ac_ext <<EOF
19969 #line 19970 "configure"
19970 #include "confdefs.h"
19971 /* System header to define __stub macros and hopefully few prototypes,
19972     which can conflict with char setproctitle(); below.  */
19973 #include <assert.h>
19974 /* Override any gcc2 internal prototype to avoid an error.  */
19975 /* We use char because int might match the return type of a gcc2
19976     builtin and then its argument prototype would still apply.  */
19977 char setproctitle();
19978 char (*f)();
19979
19980 int main() {
19981
19982 /* The GNU C library defines this for functions which it implements
19983     to always fail with ENOSYS.  Some functions are actually named
19984     something starting with __ and the normal name is an alias.  */
19985 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
19986 choke me
19987 #else
19988 f = setproctitle;
19989 #endif
19990
19991 ; return 0; }
19992 EOF
19993 if { (eval echo configure:19994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19994   rm -rf conftest*
19995   eval "ac_cv_func_setproctitle=yes"
19996 else
19997   echo "configure: failed program was:" >&5
19998   cat conftest.$ac_ext >&5
19999   rm -rf conftest*
20000   eval "ac_cv_func_setproctitle=no"
20001 fi
20002 rm -f conftest*
20003 fi
20004
20005 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
20006   echo "$ac_t""yes" 1>&6
20007   have_setproctitle=yes
20008 else
20009   echo "$ac_t""no" 1>&6
20010
20011                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
20012 echo "configure:20013: checking for setproctitle in -lutil" >&5
20013 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
20014 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20015   echo $ac_n "(cached) $ac_c" 1>&6
20016 else
20017   ac_save_LIBS="$LIBS"
20018 LIBS="-lutil  $LIBS"
20019 cat > conftest.$ac_ext <<EOF
20020 #line 20021 "configure"
20021 #include "confdefs.h"
20022 /* Override any gcc2 internal prototype to avoid an error.  */
20023 /* We use char because int might match the return type of a gcc2
20024     builtin and then its argument prototype would still apply.  */
20025 char setproctitle();
20026
20027 int main() {
20028 setproctitle()
20029 ; return 0; }
20030 EOF
20031 if { (eval echo configure:20032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20032   rm -rf conftest*
20033   eval "ac_cv_lib_$ac_lib_var=yes"
20034 else
20035   echo "configure: failed program was:" >&5
20036   cat conftest.$ac_ext >&5
20037   rm -rf conftest*
20038   eval "ac_cv_lib_$ac_lib_var=no"
20039 fi
20040 rm -f conftest*
20041 LIBS="$ac_save_LIBS"
20042
20043 fi
20044 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20045   echo "$ac_t""yes" 1>&6
20046   have_setproctitle=yes
20047                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20048 else
20049   echo "$ac_t""no" 1>&6
20050 have_setproctitle=no
20051                         LIBOBJS="$LIBOBJS setproctitle.o"
20052                         LIBSRCS="$LIBSRCS setproctitle.c"
20053 fi
20054
20055 fi
20056
20057
20058         if test $have_setproctitle = yes ; then
20059                 cat >> confdefs.h <<\EOF
20060 #define HAVE_SETPROCTITLE 1
20061 EOF
20062
20063         fi
20064 fi
20065
20066 if test $ol_enable_slp != no ; then
20067         for ac_hdr in slp.h 
20068 do
20069 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20070 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20071 echo "configure:20072: checking for $ac_hdr" >&5
20072 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20073   echo $ac_n "(cached) $ac_c" 1>&6
20074 else
20075   cat > conftest.$ac_ext <<EOF
20076 #line 20077 "configure"
20077 #include "confdefs.h"
20078 #include <$ac_hdr>
20079 EOF
20080 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20081 { (eval echo configure:20082: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20082 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20083 if test -z "$ac_err"; then
20084   rm -rf conftest*
20085   eval "ac_cv_header_$ac_safe=yes"
20086 else
20087   echo "$ac_err" >&5
20088   echo "configure: failed program was:" >&5
20089   cat conftest.$ac_ext >&5
20090   rm -rf conftest*
20091   eval "ac_cv_header_$ac_safe=no"
20092 fi
20093 rm -f conftest*
20094 fi
20095 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20096   echo "$ac_t""yes" 1>&6
20097     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20098   cat >> confdefs.h <<EOF
20099 #define $ac_tr_hdr 1
20100 EOF
20101  
20102 else
20103   echo "$ac_t""no" 1>&6
20104 fi
20105 done
20106
20107
20108         if test $ac_cv_header_slp_h = yes ; then
20109                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20110 echo "configure:20111: checking for SLPOpen in -lslp" >&5
20111 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20112 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20113   echo $ac_n "(cached) $ac_c" 1>&6
20114 else
20115   ac_save_LIBS="$LIBS"
20116 LIBS="-lslp  $LIBS"
20117 cat > conftest.$ac_ext <<EOF
20118 #line 20119 "configure"
20119 #include "confdefs.h"
20120 /* Override any gcc2 internal prototype to avoid an error.  */
20121 /* We use char because int might match the return type of a gcc2
20122     builtin and then its argument prototype would still apply.  */
20123 char SLPOpen();
20124
20125 int main() {
20126 SLPOpen()
20127 ; return 0; }
20128 EOF
20129 if { (eval echo configure:20130: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20130   rm -rf conftest*
20131   eval "ac_cv_lib_$ac_lib_var=yes"
20132 else
20133   echo "configure: failed program was:" >&5
20134   cat conftest.$ac_ext >&5
20135   rm -rf conftest*
20136   eval "ac_cv_lib_$ac_lib_var=no"
20137 fi
20138 rm -f conftest*
20139 LIBS="$ac_save_LIBS"
20140
20141 fi
20142 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20143   echo "$ac_t""yes" 1>&6
20144   have_slp=yes
20145 else
20146   echo "$ac_t""no" 1>&6
20147 have_slp=no
20148 fi
20149
20150                 if test $have_slp = yes ; then
20151                         cat >> confdefs.h <<\EOF
20152 #define HAVE_SLP 1
20153 EOF
20154
20155                         SLAPD_SLP_LIBS=-lslp
20156                 fi
20157
20158         elif test $ol_enable_slp = yes ; then
20159                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20160         fi
20161 fi
20162
20163 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20164 echo "configure:20165: checking for ANSI C header files" >&5
20165 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20166   echo $ac_n "(cached) $ac_c" 1>&6
20167 else
20168   cat > conftest.$ac_ext <<EOF
20169 #line 20170 "configure"
20170 #include "confdefs.h"
20171 #include <stdlib.h>
20172 #include <stdarg.h>
20173 #include <string.h>
20174 #include <float.h>
20175 EOF
20176 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20177 { (eval echo configure:20178: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20178 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20179 if test -z "$ac_err"; then
20180   rm -rf conftest*
20181   ac_cv_header_stdc=yes
20182 else
20183   echo "$ac_err" >&5
20184   echo "configure: failed program was:" >&5
20185   cat conftest.$ac_ext >&5
20186   rm -rf conftest*
20187   ac_cv_header_stdc=no
20188 fi
20189 rm -f conftest*
20190
20191 if test $ac_cv_header_stdc = yes; then
20192   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20193 cat > conftest.$ac_ext <<EOF
20194 #line 20195 "configure"
20195 #include "confdefs.h"
20196 #include <string.h>
20197 EOF
20198 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20199   egrep "memchr" >/dev/null 2>&1; then
20200   :
20201 else
20202   rm -rf conftest*
20203   ac_cv_header_stdc=no
20204 fi
20205 rm -f conftest*
20206
20207 fi
20208
20209 if test $ac_cv_header_stdc = yes; then
20210   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20211 cat > conftest.$ac_ext <<EOF
20212 #line 20213 "configure"
20213 #include "confdefs.h"
20214 #include <stdlib.h>
20215 EOF
20216 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20217   egrep "free" >/dev/null 2>&1; then
20218   :
20219 else
20220   rm -rf conftest*
20221   ac_cv_header_stdc=no
20222 fi
20223 rm -f conftest*
20224
20225 fi
20226
20227 if test $ac_cv_header_stdc = yes; then
20228   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20229 if test "$cross_compiling" = yes; then
20230   :
20231 else
20232   cat > conftest.$ac_ext <<EOF
20233 #line 20234 "configure"
20234 #include "confdefs.h"
20235 #include <ctype.h>
20236 #if ((' ' & 0x0FF) == 0x020)
20237 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20238 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20239 #else
20240 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20241  || ('j' <= (c) && (c) <= 'r') \
20242  || ('s' <= (c) && (c) <= 'z'))
20243 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20244 #endif
20245 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20246 int main () { int i; for (i = 0; i < 256; i++)
20247 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20248 exit (0); }
20249
20250 EOF
20251 if { (eval echo configure:20252: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20252 then
20253   :
20254 else
20255   echo "configure: failed program was:" >&5
20256   cat conftest.$ac_ext >&5
20257   rm -fr conftest*
20258   ac_cv_header_stdc=no
20259 fi
20260 rm -fr conftest*
20261 fi
20262
20263 fi
20264 fi
20265
20266 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20267 if test $ac_cv_header_stdc = yes; then
20268   cat >> confdefs.h <<\EOF
20269 #define STDC_HEADERS 1
20270 EOF
20271
20272 fi
20273
20274 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20275 echo "configure:20276: checking for mode_t" >&5
20276 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20277   echo $ac_n "(cached) $ac_c" 1>&6
20278 else
20279   cat > conftest.$ac_ext <<EOF
20280 #line 20281 "configure"
20281 #include "confdefs.h"
20282 #include <sys/types.h>
20283 #if STDC_HEADERS
20284 #include <stdlib.h>
20285 #include <stddef.h>
20286 #endif
20287
20288 EOF
20289 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20290   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20291   rm -rf conftest*
20292   eval "ac_cv_type_mode_t=yes"
20293 else
20294   rm -rf conftest*
20295   eval "ac_cv_type_mode_t=no"
20296 fi
20297 rm -f conftest*
20298
20299 fi
20300 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20301   echo "$ac_t""yes" 1>&6
20302 else
20303   echo "$ac_t""no" 1>&6
20304   cat >> confdefs.h <<EOF
20305 #define mode_t int
20306 EOF
20307
20308 fi
20309
20310 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20311 echo "configure:20312: checking for off_t" >&5
20312 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20313   echo $ac_n "(cached) $ac_c" 1>&6
20314 else
20315   cat > conftest.$ac_ext <<EOF
20316 #line 20317 "configure"
20317 #include "confdefs.h"
20318 #include <sys/types.h>
20319 #if STDC_HEADERS
20320 #include <stdlib.h>
20321 #include <stddef.h>
20322 #endif
20323
20324 EOF
20325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20326   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20327   rm -rf conftest*
20328   eval "ac_cv_type_off_t=yes"
20329 else
20330   rm -rf conftest*
20331   eval "ac_cv_type_off_t=no"
20332 fi
20333 rm -f conftest*
20334
20335 fi
20336 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20337   echo "$ac_t""yes" 1>&6
20338 else
20339   echo "$ac_t""no" 1>&6
20340   cat >> confdefs.h <<EOF
20341 #define off_t long
20342 EOF
20343
20344 fi
20345
20346 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20347 echo "configure:20348: checking for pid_t" >&5
20348 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20349   echo $ac_n "(cached) $ac_c" 1>&6
20350 else
20351   cat > conftest.$ac_ext <<EOF
20352 #line 20353 "configure"
20353 #include "confdefs.h"
20354 #include <sys/types.h>
20355 #if STDC_HEADERS
20356 #include <stdlib.h>
20357 #include <stddef.h>
20358 #endif
20359
20360 EOF
20361 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20362   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20363   rm -rf conftest*
20364   eval "ac_cv_type_pid_t=yes"
20365 else
20366   rm -rf conftest*
20367   eval "ac_cv_type_pid_t=no"
20368 fi
20369 rm -f conftest*
20370
20371 fi
20372 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20373   echo "$ac_t""yes" 1>&6
20374 else
20375   echo "$ac_t""no" 1>&6
20376   cat >> confdefs.h <<EOF
20377 #define pid_t int
20378 EOF
20379
20380 fi
20381
20382 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20383 echo "configure:20384: checking for ptrdiff_t" >&5
20384 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20385   echo $ac_n "(cached) $ac_c" 1>&6
20386 else
20387   cat > conftest.$ac_ext <<EOF
20388 #line 20389 "configure"
20389 #include "confdefs.h"
20390 #include <stddef.h>
20391 int main() {
20392 ptrdiff_t p
20393 ; return 0; }
20394 EOF
20395 if { (eval echo configure:20396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20396   rm -rf conftest*
20397   am_cv_type_ptrdiff_t=yes
20398 else
20399   echo "configure: failed program was:" >&5
20400   cat conftest.$ac_ext >&5
20401   rm -rf conftest*
20402   am_cv_type_ptrdiff_t=no
20403 fi
20404 rm -f conftest*
20405 fi
20406
20407 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20408    if test $am_cv_type_ptrdiff_t = yes; then
20409      cat >> confdefs.h <<\EOF
20410 #define HAVE_PTRDIFF_T 1
20411 EOF
20412
20413    fi
20414
20415 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20416 echo "configure:20417: checking return type of signal handlers" >&5
20417 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20418   echo $ac_n "(cached) $ac_c" 1>&6
20419 else
20420   cat > conftest.$ac_ext <<EOF
20421 #line 20422 "configure"
20422 #include "confdefs.h"
20423 #include <sys/types.h>
20424 #include <signal.h>
20425 #ifdef signal
20426 #undef signal
20427 #endif
20428 #ifdef __cplusplus
20429 extern "C" void (*signal (int, void (*)(int)))(int);
20430 #else
20431 void (*signal ()) ();
20432 #endif
20433
20434 int main() {
20435 int i;
20436 ; return 0; }
20437 EOF
20438 if { (eval echo configure:20439: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20439   rm -rf conftest*
20440   ac_cv_type_signal=void
20441 else
20442   echo "configure: failed program was:" >&5
20443   cat conftest.$ac_ext >&5
20444   rm -rf conftest*
20445   ac_cv_type_signal=int
20446 fi
20447 rm -f conftest*
20448 fi
20449
20450 echo "$ac_t""$ac_cv_type_signal" 1>&6
20451 cat >> confdefs.h <<EOF
20452 #define RETSIGTYPE $ac_cv_type_signal
20453 EOF
20454
20455
20456 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20457 echo "configure:20458: checking for size_t" >&5
20458 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20459   echo $ac_n "(cached) $ac_c" 1>&6
20460 else
20461   cat > conftest.$ac_ext <<EOF
20462 #line 20463 "configure"
20463 #include "confdefs.h"
20464 #include <sys/types.h>
20465 #if STDC_HEADERS
20466 #include <stdlib.h>
20467 #include <stddef.h>
20468 #endif
20469
20470 EOF
20471 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20472   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20473   rm -rf conftest*
20474   eval "ac_cv_type_size_t=yes"
20475 else
20476   rm -rf conftest*
20477   eval "ac_cv_type_size_t=no"
20478 fi
20479 rm -f conftest*
20480
20481 fi
20482 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20483   echo "$ac_t""yes" 1>&6
20484 else
20485   echo "$ac_t""no" 1>&6
20486   cat >> confdefs.h <<EOF
20487 #define size_t unsigned
20488 EOF
20489
20490 fi
20491
20492
20493 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20494 echo "configure:20495: checking for ssize_t" >&5
20495 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20496   echo $ac_n "(cached) $ac_c" 1>&6
20497 else
20498   cat > conftest.$ac_ext <<EOF
20499 #line 20500 "configure"
20500 #include "confdefs.h"
20501 #include <sys/types.h>
20502 #if STDC_HEADERS
20503 #include <stdlib.h>
20504 #include <stddef.h>
20505 #endif
20506
20507 EOF
20508 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20509   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20510   rm -rf conftest*
20511   eval "ac_cv_type_ssize_t=yes"
20512 else
20513   rm -rf conftest*
20514   eval "ac_cv_type_ssize_t=no"
20515 fi
20516 rm -f conftest*
20517
20518 fi
20519 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20520   echo "$ac_t""yes" 1>&6
20521 else
20522   echo "$ac_t""no" 1>&6
20523   cat >> confdefs.h <<EOF
20524 #define ssize_t signed int
20525 EOF
20526
20527 fi
20528
20529 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20530 echo "configure:20531: checking for caddr_t" >&5
20531 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20532   echo $ac_n "(cached) $ac_c" 1>&6
20533 else
20534   cat > conftest.$ac_ext <<EOF
20535 #line 20536 "configure"
20536 #include "confdefs.h"
20537 #include <sys/types.h>
20538 #if STDC_HEADERS
20539 #include <stdlib.h>
20540 #include <stddef.h>
20541 #endif
20542
20543 EOF
20544 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20545   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20546   rm -rf conftest*
20547   eval "ac_cv_type_caddr_t=yes"
20548 else
20549   rm -rf conftest*
20550   eval "ac_cv_type_caddr_t=no"
20551 fi
20552 rm -f conftest*
20553
20554 fi
20555 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20556   echo "$ac_t""yes" 1>&6
20557 else
20558   echo "$ac_t""no" 1>&6
20559   cat >> confdefs.h <<EOF
20560 #define caddr_t char *
20561 EOF
20562
20563 fi
20564
20565
20566 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20567 echo "configure:20568: checking for socklen_t" >&5
20568 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20569   echo $ac_n "(cached) $ac_c" 1>&6
20570 else
20571   cat > conftest.$ac_ext <<EOF
20572 #line 20573 "configure"
20573 #include "confdefs.h"
20574
20575 #ifdef HAVE_SYS_TYPES_H
20576 #include <sys/types.h>
20577 #endif
20578 #ifdef HAVE_SYS_SOCKET_H
20579 #include <sys/socket.h>
20580 #endif
20581
20582 int main() {
20583 socklen_t len;
20584 ; return 0; }
20585 EOF
20586 if { (eval echo configure:20587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20587   rm -rf conftest*
20588   ol_cv_type_socklen_t=yes
20589 else
20590   echo "configure: failed program was:" >&5
20591   cat conftest.$ac_ext >&5
20592   rm -rf conftest*
20593   ol_cv_type_socklen_t=no
20594 fi
20595 rm -f conftest*
20596 fi
20597
20598 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20599   if test $ol_cv_type_socklen_t = no; then
20600     cat >> confdefs.h <<\EOF
20601 #define socklen_t int
20602 EOF
20603
20604   fi
20605  
20606 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20607 echo "configure:20608: checking for member st_blksize in aggregate type struct stat" >&5
20608 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20609   echo $ac_n "(cached) $ac_c" 1>&6
20610 else
20611   cat > conftest.$ac_ext <<EOF
20612 #line 20613 "configure"
20613 #include "confdefs.h"
20614 #include <sys/types.h>
20615 #include <sys/stat.h>
20616 int main() {
20617 struct stat foo; foo.st_blksize;
20618 ; return 0; }
20619 EOF
20620 if { (eval echo configure:20621: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20621   rm -rf conftest*
20622   ac_cv_c_struct_member_st_blksize=yes
20623 else
20624   echo "configure: failed program was:" >&5
20625   cat conftest.$ac_ext >&5
20626   rm -rf conftest*
20627   ac_cv_c_struct_member_st_blksize=no
20628 fi
20629 rm -f conftest*
20630 fi
20631
20632 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20633 st_blksize="$ac_cv_c_struct_member_st_blksize"
20634 if test $ac_cv_c_struct_member_st_blksize = yes; then
20635   cat >> confdefs.h <<\EOF
20636 #define HAVE_ST_BLKSIZE 1
20637 EOF
20638
20639 fi
20640
20641 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20642 echo "configure:20643: checking whether time.h and sys/time.h may both be included" >&5
20643 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20644   echo $ac_n "(cached) $ac_c" 1>&6
20645 else
20646   cat > conftest.$ac_ext <<EOF
20647 #line 20648 "configure"
20648 #include "confdefs.h"
20649 #include <sys/types.h>
20650 #include <sys/time.h>
20651 #include <time.h>
20652 int main() {
20653 struct tm *tp;
20654 ; return 0; }
20655 EOF
20656 if { (eval echo configure:20657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20657   rm -rf conftest*
20658   ac_cv_header_time=yes
20659 else
20660   echo "configure: failed program was:" >&5
20661   cat conftest.$ac_ext >&5
20662   rm -rf conftest*
20663   ac_cv_header_time=no
20664 fi
20665 rm -f conftest*
20666 fi
20667
20668 echo "$ac_t""$ac_cv_header_time" 1>&6
20669 if test $ac_cv_header_time = yes; then
20670   cat >> confdefs.h <<\EOF
20671 #define TIME_WITH_SYS_TIME 1
20672 EOF
20673
20674 fi
20675
20676 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20677 echo "configure:20678: checking whether struct tm is in sys/time.h or time.h" >&5
20678 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20679   echo $ac_n "(cached) $ac_c" 1>&6
20680 else
20681   cat > conftest.$ac_ext <<EOF
20682 #line 20683 "configure"
20683 #include "confdefs.h"
20684 #include <sys/types.h>
20685 #include <time.h>
20686 int main() {
20687 struct tm *tp; tp->tm_sec;
20688 ; return 0; }
20689 EOF
20690 if { (eval echo configure:20691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20691   rm -rf conftest*
20692   ac_cv_struct_tm=time.h
20693 else
20694   echo "configure: failed program was:" >&5
20695   cat conftest.$ac_ext >&5
20696   rm -rf conftest*
20697   ac_cv_struct_tm=sys/time.h
20698 fi
20699 rm -f conftest*
20700 fi
20701
20702 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20703 if test $ac_cv_struct_tm = sys/time.h; then
20704   cat >> confdefs.h <<\EOF
20705 #define TM_IN_SYS_TIME 1
20706 EOF
20707
20708 fi
20709
20710 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20711 echo "configure:20712: checking for uid_t in sys/types.h" >&5
20712 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
20713   echo $ac_n "(cached) $ac_c" 1>&6
20714 else
20715   cat > conftest.$ac_ext <<EOF
20716 #line 20717 "configure"
20717 #include "confdefs.h"
20718 #include <sys/types.h>
20719 EOF
20720 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20721   egrep "uid_t" >/dev/null 2>&1; then
20722   rm -rf conftest*
20723   ac_cv_type_uid_t=yes
20724 else
20725   rm -rf conftest*
20726   ac_cv_type_uid_t=no
20727 fi
20728 rm -f conftest*
20729
20730 fi
20731
20732 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20733 if test $ac_cv_type_uid_t = no; then
20734   cat >> confdefs.h <<\EOF
20735 #define uid_t int
20736 EOF
20737
20738   cat >> confdefs.h <<\EOF
20739 #define gid_t int
20740 EOF
20741
20742 fi
20743
20744 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20745 echo "configure:20746: checking for sig_atomic_t" >&5
20746 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20747   echo $ac_n "(cached) $ac_c" 1>&6
20748 else
20749   cat > conftest.$ac_ext <<EOF
20750 #line 20751 "configure"
20751 #include "confdefs.h"
20752 #include <signal.h>
20753 int main() {
20754 sig_atomic_t atomic;
20755 ; return 0; }
20756 EOF
20757 if { (eval echo configure:20758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20758   rm -rf conftest*
20759   ol_cv_type_sig_atomic_t=yes
20760 else
20761   echo "configure: failed program was:" >&5
20762   cat conftest.$ac_ext >&5
20763   rm -rf conftest*
20764   ol_cv_type_sig_atomic_t=no
20765 fi
20766 rm -f conftest*
20767 fi
20768
20769 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20770   if test $ol_cv_type_sig_atomic_t = no; then
20771     cat >> confdefs.h <<\EOF
20772 #define sig_atomic_t int
20773 EOF
20774
20775   fi
20776  
20777
20778
20779 # test for pw_gecos in struct passwd
20780 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
20781 echo "configure:20782: checking struct passwd for pw_gecos" >&5
20782 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
20783   echo $ac_n "(cached) $ac_c" 1>&6
20784 else
20785   
20786         cat > conftest.$ac_ext <<EOF
20787 #line 20788 "configure"
20788 #include "confdefs.h"
20789 #include <pwd.h>
20790 int main() {
20791
20792         struct passwd pwd;
20793         pwd.pw_gecos = pwd.pw_name;
20794
20795 ; return 0; }
20796 EOF
20797 if { (eval echo configure:20798: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20798   rm -rf conftest*
20799   ol_cv_struct_passwd_pw_gecos=yes
20800 else
20801   echo "configure: failed program was:" >&5
20802   cat conftest.$ac_ext >&5
20803   rm -rf conftest*
20804   ol_cv_struct_passwd_pw_gecos=no
20805 fi
20806 rm -f conftest*
20807 fi
20808
20809 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
20810 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
20811         cat >> confdefs.h <<\EOF
20812 #define HAVE_PW_GECOS 1
20813 EOF
20814
20815 fi
20816
20817 # test for pw_passwd in struct passwd
20818 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
20819 echo "configure:20820: checking struct passwd for pw_passwd" >&5
20820 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
20821   echo $ac_n "(cached) $ac_c" 1>&6
20822 else
20823   
20824         cat > conftest.$ac_ext <<EOF
20825 #line 20826 "configure"
20826 #include "confdefs.h"
20827 #include <pwd.h>
20828 int main() {
20829
20830         struct passwd pwd;
20831         pwd.pw_passwd = pwd.pw_name;
20832
20833 ; return 0; }
20834 EOF
20835 if { (eval echo configure:20836: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20836   rm -rf conftest*
20837   ol_cv_struct_passwd_pw_passwd=yes
20838 else
20839   echo "configure: failed program was:" >&5
20840   cat conftest.$ac_ext >&5
20841   rm -rf conftest*
20842   ol_cv_struct_passwd_pw_passwd=no
20843 fi
20844 rm -f conftest*
20845 fi
20846
20847 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
20848 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
20849         cat >> confdefs.h <<\EOF
20850 #define HAVE_PW_PASSWD 1
20851 EOF
20852
20853 fi
20854
20855
20856 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
20857 echo "configure:20858: checking if toupper() requires islower()" >&5
20858 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
20859   echo $ac_n "(cached) $ac_c" 1>&6
20860 else
20861   
20862         if test "$cross_compiling" = yes; then
20863   ol_cv_c_upper_lower=safe
20864 else
20865   cat > conftest.$ac_ext <<EOF
20866 #line 20867 "configure"
20867 #include "confdefs.h"
20868
20869 #include <ctype.h>
20870 main()
20871 {
20872         if ('C' == toupper('C'))
20873                 exit(0);
20874         else
20875                 exit(1);
20876 }
20877 EOF
20878 if { (eval echo configure:20879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20879 then
20880   ol_cv_c_upper_lower=no
20881 else
20882   echo "configure: failed program was:" >&5
20883   cat conftest.$ac_ext >&5
20884   rm -fr conftest*
20885   ol_cv_c_upper_lower=yes
20886 fi
20887 rm -fr conftest*
20888 fi
20889
20890 fi
20891
20892 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
20893 if test $ol_cv_c_upper_lower != no ; then
20894         cat >> confdefs.h <<\EOF
20895 #define C_UPPER_LOWER 1
20896 EOF
20897
20898 fi
20899
20900 echo $ac_n "checking for working const""... $ac_c" 1>&6
20901 echo "configure:20902: checking for working const" >&5
20902 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
20903   echo $ac_n "(cached) $ac_c" 1>&6
20904 else
20905   cat > conftest.$ac_ext <<EOF
20906 #line 20907 "configure"
20907 #include "confdefs.h"
20908
20909 int main() {
20910
20911 /* Ultrix mips cc rejects this.  */
20912 typedef int charset[2]; const charset x;
20913 /* SunOS 4.1.1 cc rejects this.  */
20914 char const *const *ccp;
20915 char **p;
20916 /* NEC SVR4.0.2 mips cc rejects this.  */
20917 struct point {int x, y;};
20918 static struct point const zero = {0,0};
20919 /* AIX XL C 1.02.0.0 rejects this.
20920    It does not let you subtract one const X* pointer from another in an arm
20921    of an if-expression whose if-part is not a constant expression */
20922 const char *g = "string";
20923 ccp = &g + (g ? g-g : 0);
20924 /* HPUX 7.0 cc rejects these. */
20925 ++ccp;
20926 p = (char**) ccp;
20927 ccp = (char const *const *) p;
20928 { /* SCO 3.2v4 cc rejects this.  */
20929   char *t;
20930   char const *s = 0 ? (char *) 0 : (char const *) 0;
20931
20932   *t++ = 0;
20933 }
20934 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20935   int x[] = {25, 17};
20936   const int *foo = &x[0];
20937   ++foo;
20938 }
20939 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20940   typedef const int *iptr;
20941   iptr p = 0;
20942   ++p;
20943 }
20944 { /* AIX XL C 1.02.0.0 rejects this saying
20945      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20946   struct s { int j; const int *ap[3]; };
20947   struct s *b; b->j = 5;
20948 }
20949 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20950   const int foo = 10;
20951 }
20952
20953 ; return 0; }
20954 EOF
20955 if { (eval echo configure:20956: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20956   rm -rf conftest*
20957   ac_cv_c_const=yes
20958 else
20959   echo "configure: failed program was:" >&5
20960   cat conftest.$ac_ext >&5
20961   rm -rf conftest*
20962   ac_cv_c_const=no
20963 fi
20964 rm -f conftest*
20965 fi
20966
20967 echo "$ac_t""$ac_cv_c_const" 1>&6
20968 if test $ac_cv_c_const = no; then
20969   cat >> confdefs.h <<\EOF
20970 #define const 
20971 EOF
20972
20973 fi
20974
20975 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
20976 echo "configure:20977: checking if compiler understands volatile" >&5
20977 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
20978   echo $ac_n "(cached) $ac_c" 1>&6
20979 else
20980   cat > conftest.$ac_ext <<EOF
20981 #line 20982 "configure"
20982 #include "confdefs.h"
20983 int x, y, z;
20984 int main() {
20985 volatile int a; int * volatile b = x ? &y : &z;
20986       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
20987       *b = 0;
20988 ; return 0; }
20989 EOF
20990 if { (eval echo configure:20991: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20991   rm -rf conftest*
20992   ol_cv_c_volatile=yes
20993 else
20994   echo "configure: failed program was:" >&5
20995   cat conftest.$ac_ext >&5
20996   rm -rf conftest*
20997   ol_cv_c_volatile=no
20998 fi
20999 rm -f conftest*
21000 fi
21001
21002 echo "$ac_t""$ol_cv_c_volatile" 1>&6
21003   if test $ol_cv_c_volatile = yes; then
21004     : 
21005   else
21006     cat >> confdefs.h <<\EOF
21007 #define volatile 
21008 EOF
21009
21010   fi
21011  
21012
21013 if test $cross_compiling = yes ; then
21014         cat >> confdefs.h <<\EOF
21015 #define CROSS_COMPILING 1
21016 EOF
21017
21018 else
21019         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21020 echo "configure:21021: checking whether byte ordering is bigendian" >&5
21021 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21022   echo $ac_n "(cached) $ac_c" 1>&6
21023 else
21024   ac_cv_c_bigendian=unknown
21025 # See if sys/param.h defines the BYTE_ORDER macro.
21026 cat > conftest.$ac_ext <<EOF
21027 #line 21028 "configure"
21028 #include "confdefs.h"
21029 #include <sys/types.h>
21030 #include <sys/param.h>
21031 int main() {
21032
21033 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21034  bogus endian macros
21035 #endif
21036 ; return 0; }
21037 EOF
21038 if { (eval echo configure:21039: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21039   rm -rf conftest*
21040   # It does; now see whether it defined to BIG_ENDIAN or not.
21041 cat > conftest.$ac_ext <<EOF
21042 #line 21043 "configure"
21043 #include "confdefs.h"
21044 #include <sys/types.h>
21045 #include <sys/param.h>
21046 int main() {
21047
21048 #if BYTE_ORDER != BIG_ENDIAN
21049  not big endian
21050 #endif
21051 ; return 0; }
21052 EOF
21053 if { (eval echo configure:21054: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21054   rm -rf conftest*
21055   ac_cv_c_bigendian=yes
21056 else
21057   echo "configure: failed program was:" >&5
21058   cat conftest.$ac_ext >&5
21059   rm -rf conftest*
21060   ac_cv_c_bigendian=no
21061 fi
21062 rm -f conftest*
21063 else
21064   echo "configure: failed program was:" >&5
21065   cat conftest.$ac_ext >&5
21066 fi
21067 rm -f conftest*
21068 if test $ac_cv_c_bigendian = unknown; then
21069 if test "$cross_compiling" = yes; then
21070     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21071 else
21072   cat > conftest.$ac_ext <<EOF
21073 #line 21074 "configure"
21074 #include "confdefs.h"
21075 main () {
21076   /* Are we little or big endian?  From Harbison&Steele.  */
21077   union
21078   {
21079     long l;
21080     char c[sizeof (long)];
21081   } u;
21082   u.l = 1;
21083   exit (u.c[sizeof (long) - 1] == 1);
21084 }
21085 EOF
21086 if { (eval echo configure:21087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21087 then
21088   ac_cv_c_bigendian=no
21089 else
21090   echo "configure: failed program was:" >&5
21091   cat conftest.$ac_ext >&5
21092   rm -fr conftest*
21093   ac_cv_c_bigendian=yes
21094 fi
21095 rm -fr conftest*
21096 fi
21097
21098 fi
21099 fi
21100
21101 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21102 if test $ac_cv_c_bigendian = yes; then
21103   cat >> confdefs.h <<\EOF
21104 #define WORDS_BIGENDIAN 1
21105 EOF
21106
21107 fi
21108
21109 fi
21110
21111 echo $ac_n "checking size of short""... $ac_c" 1>&6
21112 echo "configure:21113: checking size of short" >&5 
21113 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21114   echo $ac_n "(cached) $ac_c" 1>&6
21115 else
21116   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21117   cat > conftest.$ac_ext <<EOF
21118 #line 21119 "configure"
21119 #include "confdefs.h"
21120 #include "confdefs.h" 
21121 #include <sys/types.h> 
21122  
21123
21124 int main() {
21125 switch (0) case 0: case (sizeof (short) == $ac_size):;
21126 ; return 0; }
21127 EOF
21128 if { (eval echo configure:21129: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21129   rm -rf conftest*
21130   ac_cv_sizeof_short=$ac_size
21131 else
21132   echo "configure: failed program was:" >&5
21133   cat conftest.$ac_ext >&5
21134 fi
21135 rm -f conftest* 
21136   if test x$ac_cv_sizeof_short != x ; then break; fi 
21137 done 
21138
21139 fi
21140  
21141 if test x$ac_cv_sizeof_short = x ; then 
21142   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21143 fi 
21144 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21145 cat >> confdefs.h <<EOF
21146 #define SIZEOF_SHORT $ac_cv_sizeof_short
21147 EOF
21148  
21149  
21150 echo $ac_n "checking size of int""... $ac_c" 1>&6
21151 echo "configure:21152: checking size of int" >&5 
21152 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21153   echo $ac_n "(cached) $ac_c" 1>&6
21154 else
21155   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21156   cat > conftest.$ac_ext <<EOF
21157 #line 21158 "configure"
21158 #include "confdefs.h"
21159 #include "confdefs.h" 
21160 #include <sys/types.h> 
21161  
21162
21163 int main() {
21164 switch (0) case 0: case (sizeof (int) == $ac_size):;
21165 ; return 0; }
21166 EOF
21167 if { (eval echo configure:21168: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21168   rm -rf conftest*
21169   ac_cv_sizeof_int=$ac_size
21170 else
21171   echo "configure: failed program was:" >&5
21172   cat conftest.$ac_ext >&5
21173 fi
21174 rm -f conftest* 
21175   if test x$ac_cv_sizeof_int != x ; then break; fi 
21176 done 
21177
21178 fi
21179  
21180 if test x$ac_cv_sizeof_int = x ; then 
21181   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21182 fi 
21183 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21184 cat >> confdefs.h <<EOF
21185 #define SIZEOF_INT $ac_cv_sizeof_int
21186 EOF
21187  
21188  
21189 echo $ac_n "checking size of long""... $ac_c" 1>&6
21190 echo "configure:21191: checking size of long" >&5 
21191 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21192   echo $ac_n "(cached) $ac_c" 1>&6
21193 else
21194   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21195   cat > conftest.$ac_ext <<EOF
21196 #line 21197 "configure"
21197 #include "confdefs.h"
21198 #include "confdefs.h" 
21199 #include <sys/types.h> 
21200  
21201
21202 int main() {
21203 switch (0) case 0: case (sizeof (long) == $ac_size):;
21204 ; return 0; }
21205 EOF
21206 if { (eval echo configure:21207: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21207   rm -rf conftest*
21208   ac_cv_sizeof_long=$ac_size
21209 else
21210   echo "configure: failed program was:" >&5
21211   cat conftest.$ac_ext >&5
21212 fi
21213 rm -f conftest* 
21214   if test x$ac_cv_sizeof_long != x ; then break; fi 
21215 done 
21216
21217 fi
21218  
21219 if test x$ac_cv_sizeof_long = x ; then 
21220   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21221 fi 
21222 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21223 cat >> confdefs.h <<EOF
21224 #define SIZEOF_LONG $ac_cv_sizeof_long
21225 EOF
21226  
21227
21228
21229 if test "$ac_cv_sizeof_int" -lt 4 ; then
21230         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21231
21232         cat >> confdefs.h <<\EOF
21233 #define LBER_INT_T long
21234 EOF
21235
21236 else
21237         cat >> confdefs.h <<\EOF
21238 #define LBER_INT_T int
21239 EOF
21240
21241 fi
21242
21243 cat >> confdefs.h <<\EOF
21244 #define LBER_LEN_T long
21245 EOF
21246
21247 cat >> confdefs.h <<\EOF
21248 #define LBER_SOCKET_T int
21249 EOF
21250
21251 cat >> confdefs.h <<\EOF
21252 #define LBER_TAG_T long
21253 EOF
21254
21255
21256 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21257 echo "configure:21258: checking for 8-bit clean memcmp" >&5
21258 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21259   echo $ac_n "(cached) $ac_c" 1>&6
21260 else
21261   if test "$cross_compiling" = yes; then
21262   ac_cv_func_memcmp_clean=no
21263 else
21264   cat > conftest.$ac_ext <<EOF
21265 #line 21266 "configure"
21266 #include "confdefs.h"
21267
21268 main()
21269 {
21270   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21271   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21272 }
21273
21274 EOF
21275 if { (eval echo configure:21276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21276 then
21277   ac_cv_func_memcmp_clean=yes
21278 else
21279   echo "configure: failed program was:" >&5
21280   cat conftest.$ac_ext >&5
21281   rm -fr conftest*
21282   ac_cv_func_memcmp_clean=no
21283 fi
21284 rm -fr conftest*
21285 fi
21286
21287 fi
21288
21289 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21290 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21291
21292 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21293 echo "configure:21294: checking for strftime" >&5
21294 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21295   echo $ac_n "(cached) $ac_c" 1>&6
21296 else
21297   cat > conftest.$ac_ext <<EOF
21298 #line 21299 "configure"
21299 #include "confdefs.h"
21300 /* System header to define __stub macros and hopefully few prototypes,
21301     which can conflict with char strftime(); below.  */
21302 #include <assert.h>
21303 /* Override any gcc2 internal prototype to avoid an error.  */
21304 /* We use char because int might match the return type of a gcc2
21305     builtin and then its argument prototype would still apply.  */
21306 char strftime();
21307 char (*f)();
21308
21309 int main() {
21310
21311 /* The GNU C library defines this for functions which it implements
21312     to always fail with ENOSYS.  Some functions are actually named
21313     something starting with __ and the normal name is an alias.  */
21314 #if defined (__stub_strftime) || defined (__stub___strftime)
21315 choke me
21316 #else
21317 f = strftime;
21318 #endif
21319
21320 ; return 0; }
21321 EOF
21322 if { (eval echo configure:21323: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21323   rm -rf conftest*
21324   eval "ac_cv_func_strftime=yes"
21325 else
21326   echo "configure: failed program was:" >&5
21327   cat conftest.$ac_ext >&5
21328   rm -rf conftest*
21329   eval "ac_cv_func_strftime=no"
21330 fi
21331 rm -f conftest*
21332 fi
21333
21334 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21335   echo "$ac_t""yes" 1>&6
21336   cat >> confdefs.h <<\EOF
21337 #define HAVE_STRFTIME 1
21338 EOF
21339
21340 else
21341   echo "$ac_t""no" 1>&6
21342 # strftime is in -lintl on SCO UNIX.
21343 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21344 echo "configure:21345: checking for strftime in -lintl" >&5
21345 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21346 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21347   echo $ac_n "(cached) $ac_c" 1>&6
21348 else
21349   ac_save_LIBS="$LIBS"
21350 LIBS="-lintl  $LIBS"
21351 cat > conftest.$ac_ext <<EOF
21352 #line 21353 "configure"
21353 #include "confdefs.h"
21354 /* Override any gcc2 internal prototype to avoid an error.  */
21355 /* We use char because int might match the return type of a gcc2
21356     builtin and then its argument prototype would still apply.  */
21357 char strftime();
21358
21359 int main() {
21360 strftime()
21361 ; return 0; }
21362 EOF
21363 if { (eval echo configure:21364: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21364   rm -rf conftest*
21365   eval "ac_cv_lib_$ac_lib_var=yes"
21366 else
21367   echo "configure: failed program was:" >&5
21368   cat conftest.$ac_ext >&5
21369   rm -rf conftest*
21370   eval "ac_cv_lib_$ac_lib_var=no"
21371 fi
21372 rm -f conftest*
21373 LIBS="$ac_save_LIBS"
21374
21375 fi
21376 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21377   echo "$ac_t""yes" 1>&6
21378   cat >> confdefs.h <<\EOF
21379 #define HAVE_STRFTIME 1
21380 EOF
21381
21382 LIBS="-lintl $LIBS"
21383 else
21384   echo "$ac_t""no" 1>&6
21385 fi
21386
21387 fi
21388
21389
21390 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21391 echo "configure:21392: checking for inet_aton()" >&5
21392 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21393   echo $ac_n "(cached) $ac_c" 1>&6
21394 else
21395   cat > conftest.$ac_ext <<EOF
21396 #line 21397 "configure"
21397 #include "confdefs.h"
21398
21399 #ifdef HAVE_SYS_TYPES_H
21400 #       include <sys/types.h>
21401 #endif
21402 #ifdef HAVE_SYS_SOCKET_H
21403 #       include <sys/socket.h>
21404 #       ifdef HAVE_SYS_SELECT_H
21405 #               include <sys/select.h>
21406 #       endif
21407 #       include <netinet/in.h>
21408 #       ifdef HAVE_ARPA_INET_H
21409 #               include <arpa/inet.h>
21410 #       endif
21411 #endif
21412
21413 int main() {
21414 struct in_addr in;
21415 int rc = inet_aton( "255.255.255.255", &in );
21416 ; return 0; }
21417 EOF
21418 if { (eval echo configure:21419: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21419   rm -rf conftest*
21420   ol_cv_func_inet_aton=yes
21421 else
21422   echo "configure: failed program was:" >&5
21423   cat conftest.$ac_ext >&5
21424   rm -rf conftest*
21425   ol_cv_func_inet_aton=no
21426 fi
21427 rm -f conftest*
21428 fi
21429
21430 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21431   if test $ol_cv_func_inet_aton != no; then
21432     cat >> confdefs.h <<\EOF
21433 #define HAVE_INET_ATON 1
21434 EOF
21435
21436   fi
21437  
21438
21439 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21440 echo "configure:21441: checking for _spawnlp" >&5
21441 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21442   echo $ac_n "(cached) $ac_c" 1>&6
21443 else
21444   cat > conftest.$ac_ext <<EOF
21445 #line 21446 "configure"
21446 #include "confdefs.h"
21447 /* System header to define __stub macros and hopefully few prototypes,
21448     which can conflict with char _spawnlp(); below.  */
21449 #include <assert.h>
21450 /* Override any gcc2 internal prototype to avoid an error.  */
21451 /* We use char because int might match the return type of a gcc2
21452     builtin and then its argument prototype would still apply.  */
21453 char _spawnlp();
21454 char (*f)();
21455
21456 int main() {
21457
21458 /* The GNU C library defines this for functions which it implements
21459     to always fail with ENOSYS.  Some functions are actually named
21460     something starting with __ and the normal name is an alias.  */
21461 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21462 choke me
21463 #else
21464 f = _spawnlp;
21465 #endif
21466
21467 ; return 0; }
21468 EOF
21469 if { (eval echo configure:21470: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21470   rm -rf conftest*
21471   eval "ac_cv_func__spawnlp=yes"
21472 else
21473   echo "configure: failed program was:" >&5
21474   cat conftest.$ac_ext >&5
21475   rm -rf conftest*
21476   eval "ac_cv_func__spawnlp=no"
21477 fi
21478 rm -f conftest*
21479 fi
21480
21481 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21482   echo "$ac_t""yes" 1>&6
21483   cat >> confdefs.h <<\EOF
21484 #define HAVE_SPAWNLP 1
21485 EOF
21486
21487 else
21488   echo "$ac_t""no" 1>&6
21489 fi
21490
21491
21492 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21493 echo "configure:21494: checking for _snprintf" >&5
21494 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21495   echo $ac_n "(cached) $ac_c" 1>&6
21496 else
21497   cat > conftest.$ac_ext <<EOF
21498 #line 21499 "configure"
21499 #include "confdefs.h"
21500 /* System header to define __stub macros and hopefully few prototypes,
21501     which can conflict with char _snprintf(); below.  */
21502 #include <assert.h>
21503 /* Override any gcc2 internal prototype to avoid an error.  */
21504 /* We use char because int might match the return type of a gcc2
21505     builtin and then its argument prototype would still apply.  */
21506 char _snprintf();
21507 char (*f)();
21508
21509 int main() {
21510
21511 /* The GNU C library defines this for functions which it implements
21512     to always fail with ENOSYS.  Some functions are actually named
21513     something starting with __ and the normal name is an alias.  */
21514 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21515 choke me
21516 #else
21517 f = _snprintf;
21518 #endif
21519
21520 ; return 0; }
21521 EOF
21522 if { (eval echo configure:21523: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21523   rm -rf conftest*
21524   eval "ac_cv_func__snprintf=yes"
21525 else
21526   echo "configure: failed program was:" >&5
21527   cat conftest.$ac_ext >&5
21528   rm -rf conftest*
21529   eval "ac_cv_func__snprintf=no"
21530 fi
21531 rm -f conftest*
21532 fi
21533
21534 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21535   echo "$ac_t""yes" 1>&6
21536   ac_cv_func_snprintf=yes
21537         cat >> confdefs.h <<\EOF
21538 #define snprintf _snprintf
21539 EOF
21540
21541
21542 else
21543   echo "$ac_t""no" 1>&6
21544 fi
21545
21546
21547 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21548 echo "configure:21549: checking for _vsnprintf" >&5
21549 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21550   echo $ac_n "(cached) $ac_c" 1>&6
21551 else
21552   cat > conftest.$ac_ext <<EOF
21553 #line 21554 "configure"
21554 #include "confdefs.h"
21555 /* System header to define __stub macros and hopefully few prototypes,
21556     which can conflict with char _vsnprintf(); below.  */
21557 #include <assert.h>
21558 /* Override any gcc2 internal prototype to avoid an error.  */
21559 /* We use char because int might match the return type of a gcc2
21560     builtin and then its argument prototype would still apply.  */
21561 char _vsnprintf();
21562 char (*f)();
21563
21564 int main() {
21565
21566 /* The GNU C library defines this for functions which it implements
21567     to always fail with ENOSYS.  Some functions are actually named
21568     something starting with __ and the normal name is an alias.  */
21569 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21570 choke me
21571 #else
21572 f = _vsnprintf;
21573 #endif
21574
21575 ; return 0; }
21576 EOF
21577 if { (eval echo configure:21578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21578   rm -rf conftest*
21579   eval "ac_cv_func__vsnprintf=yes"
21580 else
21581   echo "configure: failed program was:" >&5
21582   cat conftest.$ac_ext >&5
21583   rm -rf conftest*
21584   eval "ac_cv_func__vsnprintf=no"
21585 fi
21586 rm -f conftest*
21587 fi
21588
21589 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21590   echo "$ac_t""yes" 1>&6
21591   ac_cv_func_vsnprintf=yes
21592         cat >> confdefs.h <<\EOF
21593 #define vsnprintf _vsnprintf
21594 EOF
21595
21596
21597 else
21598   echo "$ac_t""no" 1>&6
21599 fi
21600
21601
21602 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21603 echo "configure:21604: checking for vprintf" >&5
21604 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21605   echo $ac_n "(cached) $ac_c" 1>&6
21606 else
21607   cat > conftest.$ac_ext <<EOF
21608 #line 21609 "configure"
21609 #include "confdefs.h"
21610 /* System header to define __stub macros and hopefully few prototypes,
21611     which can conflict with char vprintf(); below.  */
21612 #include <assert.h>
21613 /* Override any gcc2 internal prototype to avoid an error.  */
21614 /* We use char because int might match the return type of a gcc2
21615     builtin and then its argument prototype would still apply.  */
21616 char vprintf();
21617 char (*f)();
21618
21619 int main() {
21620
21621 /* The GNU C library defines this for functions which it implements
21622     to always fail with ENOSYS.  Some functions are actually named
21623     something starting with __ and the normal name is an alias.  */
21624 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21625 choke me
21626 #else
21627 f = vprintf;
21628 #endif
21629
21630 ; return 0; }
21631 EOF
21632 if { (eval echo configure:21633: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21633   rm -rf conftest*
21634   eval "ac_cv_func_vprintf=yes"
21635 else
21636   echo "configure: failed program was:" >&5
21637   cat conftest.$ac_ext >&5
21638   rm -rf conftest*
21639   eval "ac_cv_func_vprintf=no"
21640 fi
21641 rm -f conftest*
21642 fi
21643
21644 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21645   echo "$ac_t""yes" 1>&6
21646   cat >> confdefs.h <<\EOF
21647 #define HAVE_VPRINTF 1
21648 EOF
21649
21650 else
21651   echo "$ac_t""no" 1>&6
21652 fi
21653
21654 if test "$ac_cv_func_vprintf" != yes; then
21655 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21656 echo "configure:21657: checking for _doprnt" >&5
21657 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21658   echo $ac_n "(cached) $ac_c" 1>&6
21659 else
21660   cat > conftest.$ac_ext <<EOF
21661 #line 21662 "configure"
21662 #include "confdefs.h"
21663 /* System header to define __stub macros and hopefully few prototypes,
21664     which can conflict with char _doprnt(); below.  */
21665 #include <assert.h>
21666 /* Override any gcc2 internal prototype to avoid an error.  */
21667 /* We use char because int might match the return type of a gcc2
21668     builtin and then its argument prototype would still apply.  */
21669 char _doprnt();
21670 char (*f)();
21671
21672 int main() {
21673
21674 /* The GNU C library defines this for functions which it implements
21675     to always fail with ENOSYS.  Some functions are actually named
21676     something starting with __ and the normal name is an alias.  */
21677 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21678 choke me
21679 #else
21680 f = _doprnt;
21681 #endif
21682
21683 ; return 0; }
21684 EOF
21685 if { (eval echo configure:21686: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21686   rm -rf conftest*
21687   eval "ac_cv_func__doprnt=yes"
21688 else
21689   echo "configure: failed program was:" >&5
21690   cat conftest.$ac_ext >&5
21691   rm -rf conftest*
21692   eval "ac_cv_func__doprnt=no"
21693 fi
21694 rm -f conftest*
21695 fi
21696
21697 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21698   echo "$ac_t""yes" 1>&6
21699   cat >> confdefs.h <<\EOF
21700 #define HAVE_DOPRNT 1
21701 EOF
21702
21703 else
21704   echo "$ac_t""no" 1>&6
21705 fi
21706
21707 fi
21708
21709
21710 if test $ac_cv_func_vprintf = yes ; then
21711                 for ac_func in vsnprintf vsprintf
21712 do
21713 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21714 echo "configure:21715: checking for $ac_func" >&5
21715 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21716   echo $ac_n "(cached) $ac_c" 1>&6
21717 else
21718   cat > conftest.$ac_ext <<EOF
21719 #line 21720 "configure"
21720 #include "confdefs.h"
21721 /* System header to define __stub macros and hopefully few prototypes,
21722     which can conflict with char $ac_func(); below.  */
21723 #include <assert.h>
21724 /* Override any gcc2 internal prototype to avoid an error.  */
21725 /* We use char because int might match the return type of a gcc2
21726     builtin and then its argument prototype would still apply.  */
21727 char $ac_func();
21728 char (*f)();
21729
21730 int main() {
21731
21732 /* The GNU C library defines this for functions which it implements
21733     to always fail with ENOSYS.  Some functions are actually named
21734     something starting with __ and the normal name is an alias.  */
21735 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21736 choke me
21737 #else
21738 f = $ac_func;
21739 #endif
21740
21741 ; return 0; }
21742 EOF
21743 if { (eval echo configure:21744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21744   rm -rf conftest*
21745   eval "ac_cv_func_$ac_func=yes"
21746 else
21747   echo "configure: failed program was:" >&5
21748   cat conftest.$ac_ext >&5
21749   rm -rf conftest*
21750   eval "ac_cv_func_$ac_func=no"
21751 fi
21752 rm -f conftest*
21753 fi
21754
21755 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21756   echo "$ac_t""yes" 1>&6
21757     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21758   cat >> confdefs.h <<EOF
21759 #define $ac_tr_func 1
21760 EOF
21761  
21762 else
21763   echo "$ac_t""no" 1>&6
21764 fi
21765 done
21766
21767 fi
21768
21769 for ac_func in \
21770         bcopy                   \
21771         closesocket             \
21772         chroot                  \
21773         endgrent                \
21774         endpwent                \
21775         fcntl                   \
21776         flock                   \
21777         getdtablesize   \
21778         getgrgid                \
21779         gethostname             \
21780         getpass                 \
21781         getpassphrase   \
21782         getpwuid                \
21783         getpwnam                \
21784         getspnam                \
21785         gettimeofday    \
21786         initgroups              \
21787         lockf                   \
21788         memcpy                  \
21789         memmove                 \
21790         mkstemp                 \
21791         mktemp                  \
21792         pipe                    \
21793         read                    \
21794         recv                    \
21795         recvfrom                \
21796         recvmsg                 \
21797         setpwfile               \
21798         setgid                  \
21799         setegid                 \
21800         setsid                  \
21801         setuid                  \
21802         seteuid                 \
21803         sigaction               \
21804         signal                  \
21805         sigset                  \
21806         strdup                  \
21807         strerror                \
21808         strpbrk                 \
21809         strrchr                 \
21810         strsep                  \
21811         strstr                  \
21812         strtol                  \
21813         strtoul                 \
21814         strspn                  \
21815         sysconf                 \
21816         usleep                  \
21817         waitpid                 \
21818         wait4                   \
21819         write                   \
21820         send                    \
21821         sendto                  \
21822
21823 do
21824 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21825 echo "configure:21826: checking for $ac_func" >&5
21826 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21827   echo $ac_n "(cached) $ac_c" 1>&6
21828 else
21829   cat > conftest.$ac_ext <<EOF
21830 #line 21831 "configure"
21831 #include "confdefs.h"
21832 /* System header to define __stub macros and hopefully few prototypes,
21833     which can conflict with char $ac_func(); below.  */
21834 #include <assert.h>
21835 /* Override any gcc2 internal prototype to avoid an error.  */
21836 /* We use char because int might match the return type of a gcc2
21837     builtin and then its argument prototype would still apply.  */
21838 char $ac_func();
21839 char (*f)();
21840
21841 int main() {
21842
21843 /* The GNU C library defines this for functions which it implements
21844     to always fail with ENOSYS.  Some functions are actually named
21845     something starting with __ and the normal name is an alias.  */
21846 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21847 choke me
21848 #else
21849 f = $ac_func;
21850 #endif
21851
21852 ; return 0; }
21853 EOF
21854 if { (eval echo configure:21855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21855   rm -rf conftest*
21856   eval "ac_cv_func_$ac_func=yes"
21857 else
21858   echo "configure: failed program was:" >&5
21859   cat conftest.$ac_ext >&5
21860   rm -rf conftest*
21861   eval "ac_cv_func_$ac_func=no"
21862 fi
21863 rm -f conftest*
21864 fi
21865
21866 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21867   echo "$ac_t""yes" 1>&6
21868     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21869   cat >> confdefs.h <<EOF
21870 #define $ac_tr_func 1
21871 EOF
21872  
21873 else
21874   echo "$ac_t""no" 1>&6
21875 fi
21876 done
21877
21878
21879 for ac_func in getopt
21880 do
21881 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21882 echo "configure:21883: checking for $ac_func" >&5
21883 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21884   echo $ac_n "(cached) $ac_c" 1>&6
21885 else
21886   cat > conftest.$ac_ext <<EOF
21887 #line 21888 "configure"
21888 #include "confdefs.h"
21889 /* System header to define __stub macros and hopefully few prototypes,
21890     which can conflict with char $ac_func(); below.  */
21891 #include <assert.h>
21892 /* Override any gcc2 internal prototype to avoid an error.  */
21893 /* We use char because int might match the return type of a gcc2
21894     builtin and then its argument prototype would still apply.  */
21895 char $ac_func();
21896 char (*f)();
21897
21898 int main() {
21899
21900 /* The GNU C library defines this for functions which it implements
21901     to always fail with ENOSYS.  Some functions are actually named
21902     something starting with __ and the normal name is an alias.  */
21903 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21904 choke me
21905 #else
21906 f = $ac_func;
21907 #endif
21908
21909 ; return 0; }
21910 EOF
21911 if { (eval echo configure:21912: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21912   rm -rf conftest*
21913   eval "ac_cv_func_$ac_func=yes"
21914 else
21915   echo "configure: failed program was:" >&5
21916   cat conftest.$ac_ext >&5
21917   rm -rf conftest*
21918   eval "ac_cv_func_$ac_func=no"
21919 fi
21920 rm -f conftest*
21921 fi
21922
21923 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21924   echo "$ac_t""yes" 1>&6
21925     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21926   cat >> confdefs.h <<EOF
21927 #define $ac_tr_func 1
21928 EOF
21929  
21930 else
21931   echo "$ac_t""no" 1>&6
21932 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
21933 fi
21934 done
21935
21936
21937
21938 if test "$ac_cv_func_getopt" != yes; then
21939         LIBSRCS="$LIBSRCS getopt.c"
21940 fi
21941
21942 # Check Configuration
21943 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
21944 echo "configure:21945: checking declaration of sys_errlist" >&5
21945 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
21946   echo $ac_n "(cached) $ac_c" 1>&6
21947 else
21948   
21949         cat > conftest.$ac_ext <<EOF
21950 #line 21951 "configure"
21951 #include "confdefs.h"
21952
21953 #include <stdio.h>
21954 #include <sys/types.h>
21955 #include <errno.h>
21956 #ifdef WINNT
21957 #include <stdlib.h>
21958 #endif 
21959 int main() {
21960 char *c = (char *) *sys_errlist
21961 ; return 0; }
21962 EOF
21963 if { (eval echo configure:21964: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21964   rm -rf conftest*
21965   ol_cv_dcl_sys_errlist=yes
21966         ol_cv_have_sys_errlist=yes
21967 else
21968   echo "configure: failed program was:" >&5
21969   cat conftest.$ac_ext >&5
21970   rm -rf conftest*
21971   ol_cv_dcl_sys_errlist=no
21972 fi
21973 rm -f conftest*
21974 fi
21975
21976 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
21977 #
21978 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
21979 if test $ol_cv_dcl_sys_errlist = no ; then
21980         cat >> confdefs.h <<\EOF
21981 #define DECL_SYS_ERRLIST 1
21982 EOF
21983
21984
21985         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
21986 echo "configure:21987: checking existence of sys_errlist" >&5
21987 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
21988   echo $ac_n "(cached) $ac_c" 1>&6
21989 else
21990   
21991                 cat > conftest.$ac_ext <<EOF
21992 #line 21993 "configure"
21993 #include "confdefs.h"
21994 #include <errno.h>
21995 int main() {
21996 char *c = (char *) *sys_errlist
21997 ; return 0; }
21998 EOF
21999 if { (eval echo configure:22000: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
22000   rm -rf conftest*
22001   ol_cv_have_sys_errlist=yes
22002 else
22003   echo "configure: failed program was:" >&5
22004   cat conftest.$ac_ext >&5
22005   rm -rf conftest*
22006   ol_cv_have_sys_errlist=no
22007 fi
22008 rm -f conftest*
22009 fi
22010
22011 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
22012 fi
22013 if test $ol_cv_have_sys_errlist = yes ; then
22014         cat >> confdefs.h <<\EOF
22015 #define HAVE_SYS_ERRLIST 1
22016 EOF
22017
22018 fi
22019
22020
22021
22022 if test "$ol_enable_debug" != no ; then
22023         cat >> confdefs.h <<\EOF
22024 #define LDAP_DEBUG 1
22025 EOF
22026
22027 fi
22028 if test "$ol_enable_syslog" = yes ; then
22029         cat >> confdefs.h <<\EOF
22030 #define LDAP_SYSLOG 1
22031 EOF
22032
22033 fi
22034 if test "$ol_enable_cache" = no ; then
22035         cat >> confdefs.h <<\EOF
22036 #define LDAP_NOCACHE 1
22037 EOF
22038
22039 fi
22040 if test "$ol_link_kbind" != no ; then
22041         cat >> confdefs.h <<\EOF
22042 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22043 EOF
22044
22045 fi
22046 if test "$ol_enable_proctitle" != no ; then
22047         cat >> confdefs.h <<\EOF
22048 #define LDAP_PROCTITLE 1
22049 EOF
22050
22051 fi
22052 if test "$ol_enable_referrals" != no ; then
22053         cat >> confdefs.h <<\EOF
22054 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22055 EOF
22056
22057 fi
22058 if test "$ol_enable_local" != no; then
22059         cat >> confdefs.h <<\EOF
22060 #define LDAP_PF_LOCAL 1
22061 EOF
22062
22063 fi
22064 if test "$ol_link_ipv6" != no; then
22065         cat >> confdefs.h <<\EOF
22066 #define LDAP_PF_INET6 1
22067 EOF
22068
22069 fi
22070 if test "$ol_enable_cleartext" != no ; then
22071         cat >> confdefs.h <<\EOF
22072 #define SLAPD_CLEARTEXT 1
22073 EOF
22074
22075 fi
22076 if test "$ol_enable_crypt" != no ; then
22077         cat >> confdefs.h <<\EOF
22078 #define SLAPD_CRYPT 1
22079 EOF
22080
22081 fi
22082 if test "$ol_link_kpasswd" != no ; then
22083         cat >> confdefs.h <<\EOF
22084 #define SLAPD_KPASSWD 1
22085 EOF
22086
22087 fi
22088 if test "$ol_link_spasswd" != no ; then
22089         cat >> confdefs.h <<\EOF
22090 #define SLAPD_SPASSWD 1
22091 EOF
22092
22093 fi
22094 if test "$ol_enable_phonetic" != no ; then
22095         cat >> confdefs.h <<\EOF
22096 #define SLAPD_PHONETIC 1
22097 EOF
22098
22099 fi
22100 if test "$ol_enable_rlookups" != no ; then
22101         cat >> confdefs.h <<\EOF
22102 #define SLAPD_RLOOKUPS 1
22103 EOF
22104
22105 fi
22106 if test "$ol_enable_aci" != no ; then
22107         cat >> confdefs.h <<\EOF
22108 #define SLAPD_ACI_ENABLED 1
22109 EOF
22110
22111 fi
22112
22113 if test "$ol_link_modules" != no ; then
22114         cat >> confdefs.h <<\EOF
22115 #define SLAPD_MODULES 1
22116 EOF
22117
22118         BUILD_SLAPD=yes
22119         SLAPD_MODULES_LDFLAGS="-dlopen self"
22120 fi
22121
22122 if test "$ol_enable_bdb" != no ; then
22123         cat >> confdefs.h <<\EOF
22124 #define SLAPD_BDB 1
22125 EOF
22126
22127         BUILD_SLAPD=yes
22128         BUILD_BDB=yes
22129         if test "$ol_with_bdb_module" != static ; then
22130                 cat >> confdefs.h <<\EOF
22131 #define SLAPD_BDB_DYNAMIC 1
22132 EOF
22133
22134                 BUILD_BDB=mod
22135                 BUILD_BDB_DYNAMIC=shared
22136                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22137         else
22138                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22139         fi
22140 fi
22141
22142 if test "$ol_link_dnssrv" != no ; then
22143         cat >> confdefs.h <<\EOF
22144 #define SLAPD_DNSSRV 1
22145 EOF
22146
22147         BUILD_SLAPD=yes
22148         BUILD_DNSSRV=yes
22149         if test "$ol_with_dnssrv_module" != static ; then
22150                 cat >> confdefs.h <<\EOF
22151 #define SLAPD_DNSSRV_DYNAMIC 1
22152 EOF
22153
22154                 BUILD_DNSSRV=mod
22155                 BUILD_DNSSRV_DYNAMIC=shared
22156                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22157         else
22158                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22159         fi
22160 fi
22161
22162 if test "$ol_enable_ldap" != no ; then
22163         cat >> confdefs.h <<\EOF
22164 #define SLAPD_LDAP 1
22165 EOF
22166
22167         BUILD_SLAPD=yes
22168         BUILD_LDAP=yes
22169         if test "$ol_with_ldap_module" != static ; then
22170                 cat >> confdefs.h <<\EOF
22171 #define SLAPD_LDAP_DYNAMIC 1
22172 EOF
22173
22174                 BUILD_LDAP=mod
22175                 BUILD_LDAP_DYNAMIC=shared
22176                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22177         else
22178                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22179         fi
22180 fi
22181
22182 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22183         cat >> confdefs.h <<\EOF
22184 #define SLAPD_LDBM 1
22185 EOF
22186
22187         BUILD_SLAPD=yes
22188         BUILD_LDBM=yes
22189         LDBM_LIB="-lldbm"
22190         if test "$ol_with_ldbm_module" != static ; then
22191                 cat >> confdefs.h <<\EOF
22192 #define SLAPD_LDBM_DYNAMIC 1
22193 EOF
22194
22195                 BUILD_LDBM=mod
22196                 BUILD_LDBM_DYNAMIC=shared
22197                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22198         else
22199                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22200         fi
22201 fi
22202
22203 if test "$ol_enable_meta" != no ; then
22204         if test "$ol_enable_ldap" = no ; then
22205                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22206         fi
22207         if test "$ol_enable_rewrite" = no ; then
22208                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22209         fi
22210         cat >> confdefs.h <<\EOF
22211 #define SLAPD_META 1
22212 EOF
22213
22214         BUILD_SLAPD=yes
22215         BUILD_META=yes
22216         BUILD_LDAP=yes
22217         BUILD_REWRITE=yes
22218         if test "$ol_with_meta_module" != static ; then
22219                 cat >> confdefs.h <<\EOF
22220 #define SLAPD_META_DYNAMIC 1
22221 EOF
22222
22223                 BUILD_META=mod
22224                 BUILD_META_DYNAMIC=shared
22225                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22226         else
22227                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22228         fi
22229 fi
22230
22231 if test "$ol_enable_monitor" != no ; then
22232         cat >> confdefs.h <<\EOF
22233 #define SLAPD_MONITOR 1
22234 EOF
22235
22236         BUILD_SLAPD=yes
22237         BUILD_MONITOR=yes
22238         if test "$ol_with_monitor_module" != static ; then
22239                 cat >> confdefs.h <<\EOF
22240 #define SLAPD_MONITOR_DYNAMIC 1
22241 EOF
22242
22243                 BUILD_MONITOR=mod
22244                 BUILD_MONITOR_DYNAMIC=shared
22245                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22246         else
22247                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22248         fi
22249 fi
22250
22251 if test "$ol_enable_null" != no ; then
22252         cat >> confdefs.h <<\EOF
22253 #define SLAPD_NULL 1
22254 EOF
22255
22256         BUILD_SLAPD=yes
22257         BUILD_NULL=yes
22258         if test "$ol_with_null_module" != static ; then
22259                 cat >> confdefs.h <<\EOF
22260 #define SLAPD_NULL_DYNAMIC 1
22261 EOF
22262
22263                 BUILD_NULL=mod
22264                 BUILD_NULL_DYNAMIC=shared
22265                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22266         else
22267                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22268         fi
22269 fi
22270
22271 if test "$ol_enable_passwd" != no ; then
22272         cat >> confdefs.h <<\EOF
22273 #define SLAPD_PASSWD 1
22274 EOF
22275
22276         BUILD_SLAPD=yes
22277         BUILD_PASSWD=yes
22278         if test "$ol_with_passwd_module" != static ; then
22279                 cat >> confdefs.h <<\EOF
22280 #define SLAPD_PASSWD_DYNAMIC 1
22281 EOF
22282
22283                 BUILD_PASSWD=mod
22284                 BUILD_PASSWD_DYNAMIC=shared
22285                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22286         else
22287                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22288         fi
22289 fi
22290
22291 if test "$ol_link_perl" != no ; then
22292         cat >> confdefs.h <<\EOF
22293 #define SLAPD_PERL 1
22294 EOF
22295
22296         BUILD_SLAPD=yes
22297         BUILD_PERL=yes
22298         if test "$ol_with_perl_module" != static ; then
22299                 cat >> confdefs.h <<\EOF
22300 #define SLAPD_PERL_DYNAMIC 1
22301 EOF
22302
22303                 BUILD_PERL=mod
22304                 BUILD_PERL_DYNAMIC=shared
22305                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22306         else
22307                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22308         fi
22309 fi
22310
22311 if test "$ol_enable_shell" != no ; then
22312         cat >> confdefs.h <<\EOF
22313 #define SLAPD_SHELL 1
22314 EOF
22315
22316         BUILD_SLAPD=yes
22317         BUILD_SHELL=yes
22318         if test "$ol_with_shell_module" != static ; then
22319                 cat >> confdefs.h <<\EOF
22320 #define SLAPD_SHELL_DYNAMIC 1
22321 EOF
22322
22323                 BUILD_SHELL=mod
22324                 BUILD_SHELL_DYNAMIC=shared
22325                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22326         else
22327                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22328         fi
22329 fi
22330
22331 if test "$ol_enable_tcl" != no ; then
22332         cat >> confdefs.h <<\EOF
22333 #define SLAPD_TCL 1
22334 EOF
22335
22336         BUILD_SLAPD=yes
22337         BUILD_TCL=yes
22338         if test "$ol_with_tcl_module" != static; then
22339                 cat >> confdefs.h <<\EOF
22340 #define SLAPD_TCL_DYNAMIC 1
22341 EOF
22342
22343                 BUILD_TCL=mod
22344                 BUILD_TCL_DYNAMIC=shared
22345                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
22346         else
22347                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
22348         fi
22349 fi
22350
22351 if test "$ol_link_sql" != no ; then
22352         cat >> confdefs.h <<\EOF
22353 #define SLAPD_SQL 1
22354 EOF
22355
22356         BUILD_SLAPD=yes
22357         BUILD_SQL=yes
22358         if test "$ol_with_sql_module" != static; then
22359                 cat >> confdefs.h <<\EOF
22360 #define SLAPD_SQL_DYNAMIC 1
22361 EOF
22362
22363                 BUILD_SQL=mod
22364                 BUILD_SQL_DYNAMIC=shared
22365                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22366         else
22367                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22368         fi
22369 fi
22370
22371 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22372         $BUILD_SLAPD = yes ; then
22373         BUILD_SLURPD=yes
22374 fi
22375
22376 if test "$ol_enable_rewrite" != no ; then
22377         cat >> confdefs.h <<\EOF
22378 #define ENABLE_REWRITE 1
22379 EOF
22380
22381         BUILD_REWRITE=yes
22382 fi
22383
22384
22385
22386 if test "$ac_cv_mingw32" = yes ; then
22387         PLAT=NT
22388         SLAPD_MODULES_LDFLAGS=
22389 else
22390         PLAT=UNIX
22391 fi
22392
22393
22394
22395
22396
22397
22398   
22399   
22400   
22401   
22402   
22403   
22404   
22405   
22406   
22407   
22408   
22409   
22410   
22411   
22412   
22413   
22414   
22415   
22416   
22417   
22418   
22419   
22420   
22421   
22422
22423
22424
22425
22426
22427
22428
22429
22430
22431
22432
22433
22434
22435
22436
22437
22438
22439
22440
22441
22442
22443
22444
22445
22446
22447
22448
22449
22450
22451
22452
22453
22454
22455
22456
22457
22458
22459
22460
22461 # Check whether --with-xxinstall or --without-xxinstall was given.
22462 if test "${with_xxinstall+set}" = set; then
22463   withval="$with_xxinstall"
22464   :
22465 fi
22466
22467
22468
22469 trap '' 1 2 15
22470
22471 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22472
22473 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22474 # Let make expand exec_prefix.
22475 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22476
22477 # Any assignment to VPATH causes Sun make to only execute
22478 # the first set of double-colon rules, so remove it if not needed.
22479 # If there is a colon in the path, we need to keep it.
22480 if test "x$srcdir" = x.; then
22481   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22482 fi
22483
22484 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22485
22486 DEFS=-DHAVE_CONFIG_H
22487
22488 # Without the "./", some shells look in PATH for config.status.
22489 : ${CONFIG_STATUS=./config.status}
22490
22491 echo creating $CONFIG_STATUS
22492 rm -f $CONFIG_STATUS
22493 cat > $CONFIG_STATUS <<EOF
22494 #! /bin/sh
22495 # Generated automatically by configure.
22496 # Run this file to recreate the current configuration.
22497 # This directory was configured as follows,
22498 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22499 #
22500 # $0 $ac_configure_args
22501 #
22502 # Compiler output produced by configure, useful for debugging
22503 # configure, is in ./config.log if it exists.
22504
22505 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22506 for ac_option
22507 do
22508   case "\$ac_option" in
22509   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22510     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22511     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22512   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22513     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22514     exit 0 ;;
22515   -help | --help | --hel | --he | --h)
22516     echo "\$ac_cs_usage"; exit 0 ;;
22517   *) echo "\$ac_cs_usage"; exit 1 ;;
22518   esac
22519 done
22520
22521 ac_given_srcdir=$srcdir
22522 ac_given_INSTALL="$INSTALL"
22523
22524 trap 'rm -fr `echo "\
22525 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22526 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22527 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22528 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22529 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22530 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22531 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22532 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22533 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22534 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22535 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22536 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22537 include/Makefile:build/top.mk:include/Makefile.in \
22538 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22539 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22540 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22541 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22542 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22543 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22544 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22545 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22546 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22547 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22548 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22549 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22550 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22551 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22552 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22553 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22554 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22555 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22556 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22557 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22558 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22559 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22560 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22561 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22562 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22563 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22564 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22565 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22566 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22567  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22568 EOF
22569 cat >> $CONFIG_STATUS <<EOF
22570
22571 # Protect against being on the right side of a sed subst in config.status.
22572 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22573  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22574 $ac_vpsub
22575 $extrasub
22576 s%@SHELL@%$SHELL%g
22577 s%@CFLAGS@%$CFLAGS%g
22578 s%@CPPFLAGS@%$CPPFLAGS%g
22579 s%@CXXFLAGS@%$CXXFLAGS%g
22580 s%@FFLAGS@%$FFLAGS%g
22581 s%@DEFS@%$DEFS%g
22582 s%@LDFLAGS@%$LDFLAGS%g
22583 s%@LIBS@%$LIBS%g
22584 s%@exec_prefix@%$exec_prefix%g
22585 s%@prefix@%$prefix%g
22586 s%@program_transform_name@%$program_transform_name%g
22587 s%@bindir@%$bindir%g
22588 s%@sbindir@%$sbindir%g
22589 s%@libexecdir@%$libexecdir%g
22590 s%@datadir@%$datadir%g
22591 s%@sysconfdir@%$sysconfdir%g
22592 s%@sharedstatedir@%$sharedstatedir%g
22593 s%@localstatedir@%$localstatedir%g
22594 s%@libdir@%$libdir%g
22595 s%@includedir@%$includedir%g
22596 s%@oldincludedir@%$oldincludedir%g
22597 s%@infodir@%$infodir%g
22598 s%@mandir@%$mandir%g
22599 s%@host@%$host%g
22600 s%@host_alias@%$host_alias%g
22601 s%@host_cpu@%$host_cpu%g
22602 s%@host_vendor@%$host_vendor%g
22603 s%@host_os@%$host_os%g
22604 s%@target@%$target%g
22605 s%@target_alias@%$target_alias%g
22606 s%@target_cpu@%$target_cpu%g
22607 s%@target_vendor@%$target_vendor%g
22608 s%@target_os@%$target_os%g
22609 s%@build@%$build%g
22610 s%@build_alias@%$build_alias%g
22611 s%@build_cpu@%$build_cpu%g
22612 s%@build_vendor@%$build_vendor%g
22613 s%@build_os@%$build_os%g
22614 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22615 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22616 s%@INSTALL_DATA@%$INSTALL_DATA%g
22617 s%@PACKAGE@%$PACKAGE%g
22618 s%@VERSION@%$VERSION%g
22619 s%@ACLOCAL@%$ACLOCAL%g
22620 s%@AUTOCONF@%$AUTOCONF%g
22621 s%@AUTOMAKE@%$AUTOMAKE%g
22622 s%@AUTOHEADER@%$AUTOHEADER%g
22623 s%@MAKEINFO@%$MAKEINFO%g
22624 s%@install_sh@%$install_sh%g
22625 s%@AMTAR@%$AMTAR%g
22626 s%@AWK@%$AWK%g
22627 s%@AMTARFLAGS@%$AMTARFLAGS%g
22628 s%@SET_MAKE@%$SET_MAKE%g
22629 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22630 s%@top_builddir@%$top_builddir%g
22631 s%@ldap_subdir@%$ldap_subdir%g
22632 s%@CC@%$CC%g
22633 s%@AR@%$AR%g
22634 s%@LN_S@%$LN_S%g
22635 s%@OBJEXT@%$OBJEXT%g
22636 s%@EXEEXT@%$EXEEXT%g
22637 s%@ECHO@%$ECHO%g
22638 s%@RANLIB@%$RANLIB%g
22639 s%@STRIP@%$STRIP%g
22640 s%@DLLTOOL@%$DLLTOOL%g
22641 s%@AS@%$AS%g
22642 s%@OBJDUMP@%$OBJDUMP%g
22643 s%@CPP@%$CPP%g
22644 s%@LIBTOOL@%$LIBTOOL%g
22645 s%@LN_H@%$LN_H%g
22646 s%@SENDMAIL@%$SENDMAIL%g
22647 s%@EDITOR@%$EDITOR%g
22648 s%@PERLBIN@%$PERLBIN%g
22649 s%@OL_MKDEP@%$OL_MKDEP%g
22650 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22651 s%@LIBOBJS@%$LIBOBJS%g
22652 s%@LIBSRCS@%$LIBSRCS%g
22653 s%@PLAT@%$PLAT%g
22654 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22655 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22656 s%@BUILD_BDB@%$BUILD_BDB%g
22657 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22658 s%@BUILD_LDAP@%$BUILD_LDAP%g
22659 s%@BUILD_LDBM@%$BUILD_LDBM%g
22660 s%@BUILD_META@%$BUILD_META%g
22661 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
22662 s%@BUILD_NULL@%$BUILD_NULL%g
22663 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
22664 s%@BUILD_PERL@%$BUILD_PERL%g
22665 s%@BUILD_SHELL@%$BUILD_SHELL%g
22666 s%@BUILD_SQL@%$BUILD_SQL%g
22667 s%@BUILD_TCL@%$BUILD_TCL%g
22668 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
22669 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
22670 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
22671 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
22672 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
22673 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
22674 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
22675 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
22676 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
22677 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
22678 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
22679 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
22680 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
22681 s%@LDBM_LIB@%$LDBM_LIB%g
22682 s%@LDAP_LIBS@%$LDAP_LIBS%g
22683 s%@LDIF_LIBS@%$LDIF_LIBS%g
22684 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
22685 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
22686 s%@LDBM_LIBS@%$LDBM_LIBS%g
22687 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
22688 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
22689 s%@WRAP_LIBS@%$WRAP_LIBS%g
22690 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
22691 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
22692 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
22693 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
22694 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
22695 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
22696 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
22697 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
22698 s%@KRB4_LIBS@%$KRB4_LIBS%g
22699 s%@KRB5_LIBS@%$KRB5_LIBS%g
22700 s%@READLINE_LIBS@%$READLINE_LIBS%g
22701 s%@SASL_LIBS@%$SASL_LIBS%g
22702 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
22703 s%@TLS_LIBS@%$TLS_LIBS%g
22704 s%@MODULES_LIBS@%$MODULES_LIBS%g
22705 s%@AUTH_LIBS@%$AUTH_LIBS%g
22706 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
22707 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
22708 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
22709 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
22710
22711 CEOF
22712 EOF
22713
22714 cat >> $CONFIG_STATUS <<\EOF
22715
22716 # Split the substitutions into bite-sized pieces for seds with
22717 # small command number limits, like on Digital OSF/1 and HP-UX.
22718 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
22719 ac_file=1 # Number of current file.
22720 ac_beg=1 # First line for current file.
22721 ac_end=$ac_max_sed_cmds # Line after last line for current file.
22722 ac_more_lines=:
22723 ac_sed_cmds=""
22724 while $ac_more_lines; do
22725   if test $ac_beg -gt 1; then
22726     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
22727   else
22728     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
22729   fi
22730   if test ! -s conftest.s$ac_file; then
22731     ac_more_lines=false
22732     rm -f conftest.s$ac_file
22733   else
22734     if test -z "$ac_sed_cmds"; then
22735       ac_sed_cmds="sed -f conftest.s$ac_file"
22736     else
22737       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
22738     fi
22739     ac_file=`expr $ac_file + 1`
22740     ac_beg=$ac_end
22741     ac_end=`expr $ac_end + $ac_max_sed_cmds`
22742   fi
22743 done
22744 if test -z "$ac_sed_cmds"; then
22745   ac_sed_cmds=cat
22746 fi
22747 EOF
22748
22749 cat >> $CONFIG_STATUS <<EOF
22750
22751 CONFIG_FILES=\${CONFIG_FILES-"\
22752 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22753 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22754 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22755 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22756 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22757 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22758 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22759 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22760 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22761 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22762 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22763 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22764 include/Makefile:build/top.mk:include/Makefile.in \
22765 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22766 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22767 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22768 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22769 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22770 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22771 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22772 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22773 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22774 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22775 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22776 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22777 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22778 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22779 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22780 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22781 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22782 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22783 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22784 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22785 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22786 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22787 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22788 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22789 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22790 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22791 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22792 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22793 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22794 "}
22795 EOF
22796 cat >> $CONFIG_STATUS <<\EOF
22797 for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
22798   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22799   case "$ac_file" in
22800   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22801        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22802   *) ac_file_in="${ac_file}.in" ;;
22803   esac
22804
22805   # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
22806
22807   # Remove last slash and all that follows it.  Not all systems have dirname.
22808   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22809   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22810     # The file is in a subdirectory.
22811     test ! -d "$ac_dir" && mkdir "$ac_dir"
22812     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
22813     # A "../" for each directory in $ac_dir_suffix.
22814     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
22815   else
22816     ac_dir_suffix= ac_dots=
22817   fi
22818
22819   case "$ac_given_srcdir" in
22820   .)  srcdir=.
22821       if test -z "$ac_dots"; then top_srcdir=.
22822       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
22823   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
22824   *) # Relative path.
22825     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
22826     top_srcdir="$ac_dots$ac_given_srcdir" ;;
22827   esac
22828
22829   case "$ac_given_INSTALL" in
22830   [/$]*) INSTALL="$ac_given_INSTALL" ;;
22831   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
22832   esac
22833
22834   echo creating "$ac_file"
22835   rm -f "$ac_file"
22836   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
22837   case "$ac_file" in
22838   *[Mm]akefile*) ac_comsub="1i\\
22839 # $configure_input" ;;
22840   *) ac_comsub= ;;
22841   esac
22842
22843   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22844   sed -e "$ac_comsub
22845 s%@configure_input@%$configure_input%g
22846 s%@srcdir@%$srcdir%g
22847 s%@top_srcdir@%$top_srcdir%g
22848 s%@INSTALL@%$INSTALL%g
22849 " $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
22850 fi; done
22851 rm -f conftest.s*
22852
22853 # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22854 # NAME is the cpp macro being defined and VALUE is the value it is being given.
22855 #
22856 # ac_d sets the value in "#define NAME VALUE" lines.
22857 ac_dA='s%^\([   ]*\)#\([        ]*define[       ][      ]*\)'
22858 ac_dB='\([      ][      ]*\)[^  ]*%\1#\2'
22859 ac_dC='\3'
22860 ac_dD='%g'
22861 # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22862 ac_uA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22863 ac_uB='\([      ]\)%\1#\2define\3'
22864 ac_uC=' '
22865 ac_uD='\4%g'
22866 # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22867 ac_eA='s%^\([   ]*\)#\([        ]*\)undef\([    ][      ]*\)'
22868 ac_eB='$%\1#\2define\3'
22869 ac_eC=' '
22870 ac_eD='%g'
22871
22872 if test "${CONFIG_HEADERS+set}" != set; then
22873 EOF
22874 cat >> $CONFIG_STATUS <<EOF
22875   CONFIG_HEADERS="include/portable.h include/ldap_features.h include/lber_types.h"
22876 EOF
22877 cat >> $CONFIG_STATUS <<\EOF
22878 fi
22879 for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
22880   # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22881   case "$ac_file" in
22882   *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
22883        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
22884   *) ac_file_in="${ac_file}.in" ;;
22885   esac
22886
22887   echo creating $ac_file
22888
22889   rm -f conftest.frag conftest.in conftest.out
22890   ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
22891   cat $ac_file_inputs > conftest.in
22892
22893 EOF
22894
22895 # Transform confdefs.h into a sed script conftest.vals that substitutes
22896 # the proper values into config.h.in to produce config.h.  And first:
22897 # Protect against being on the right side of a sed subst in config.status.
22898 # Protect against being in an unquoted here document in config.status.
22899 rm -f conftest.vals
22900 cat > conftest.hdr <<\EOF
22901 s/[\\&%]/\\&/g
22902 s%[\\$`]%\\&%g
22903 s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
22904 s%ac_d%ac_u%gp
22905 s%ac_u%ac_e%gp
22906 EOF
22907 sed -n -f conftest.hdr confdefs.h > conftest.vals
22908 rm -f conftest.hdr
22909
22910 # This sed command replaces #undef with comments.  This is necessary, for
22911 # example, in the case of _POSIX_SOURCE, which is predefined and required
22912 # on some systems where configure will not decide to define it.
22913 cat >> conftest.vals <<\EOF
22914 s%^[    ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
22915 EOF
22916
22917 # Break up conftest.vals because some shells have a limit on
22918 # the size of here documents, and old seds have small limits too.
22919
22920 rm -f conftest.tail
22921 while :
22922 do
22923   ac_lines=`grep -c . conftest.vals`
22924   # grep -c gives empty output for an empty file on some AIX systems.
22925   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
22926   # Write a limited-size here document to conftest.frag.
22927   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
22928   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
22929   echo 'CEOF
22930   sed -f conftest.frag conftest.in > conftest.out
22931   rm -f conftest.in
22932   mv conftest.out conftest.in
22933 ' >> $CONFIG_STATUS
22934   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
22935   rm -f conftest.vals
22936   mv conftest.tail conftest.vals
22937 done
22938 rm -f conftest.vals
22939
22940 cat >> $CONFIG_STATUS <<\EOF
22941   rm -f conftest.frag conftest.h
22942   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
22943   cat conftest.in >> conftest.h
22944   rm -f conftest.in
22945   if cmp -s $ac_file conftest.h 2>/dev/null; then
22946     echo "$ac_file is unchanged"
22947     rm -f conftest.h
22948   else
22949     # Remove last slash and all that follows it.  Not all systems have dirname.
22950       ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
22951       if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22952       # The file is in a subdirectory.
22953       test ! -d "$ac_dir" && mkdir "$ac_dir"
22954     fi
22955     rm -f $ac_file
22956     mv conftest.h $ac_file
22957   fi
22958 fi; done
22959
22960 EOF
22961 cat >> $CONFIG_STATUS <<EOF
22962
22963 EOF
22964 cat >> $CONFIG_STATUS <<\EOF
22965
22966 date > stamp-h
22967 echo Please run \"make depend\" to build dependencies
22968
22969 exit 0
22970 EOF
22971 chmod +x $CONFIG_STATUS
22972 rm -fr confdefs* $ac_clean_files
22973 test "$no_create" = yes || $SHELL $CONFIG_STATUS || exit 1
22974