]> git.sur5r.net Git - openldap/blob - configure
Align --help
[openldap] / configure
1 #! /bin/sh
2 # $OpenLDAP$
3 # from OpenLDAP: pkg/ldap/configure.in,v 1.410 2002/04/08 07:43:22 ando Exp  
4
5 # Copyright 1998-2002 The OpenLDAP Foundation.  All Rights Reserved.
6
7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted only as authorized by the OpenLDAP
9 # Public License.  A copy of this license is available at
10 # http://www.OpenLDAP.org/license.html or in file LICENSE in the
11 # top-level directory of the distribution.
12
13 echo "Copyright 1998-2002 The OpenLDAP Foundation,  All Rights Reserved."
14 echo "  Restrictions apply, see COPYRIGHT and LICENSE files."
15
16 # Guess values for system-dependent variables and create Makefiles.
17 # Generated automatically using autoconf version 2.13.1 
18 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
19 #
20 # This configure script is free software; the Free Software Foundation
21 # gives unlimited permission to copy, distribute and modify it.
22
23 # Defaults:
24 ac_help=
25 ac_default_prefix=/usr/local
26 # Any additions from configure.in:
27 ac_default_prefix=/usr/local
28 ac_help="$ac_help
29   --with-subdir=DIR       change default subdirectory used for installs"
30 ac_help="$ac_help
31   --enable-debug          enable debugging [yes]"
32 ac_help="$ac_help
33   --enable-syslog         enable syslog support [auto]"
34 ac_help="$ac_help
35   --enable-proctitle      enable proctitle support [yes]"
36 ac_help="$ac_help
37   --enable-cache          enable caching (experimental) [no]"
38 ac_help="$ac_help
39   --enable-referrals      enable LDAPv2+ Referrals (experimental) [no]"
40 ac_help="$ac_help
41   --enable-kbind          enable LDAPv2+ Kerberos IV bind (deprecated) [no]"
42 ac_help="$ac_help
43   --enable-ipv6           enable IPv6 support [auto]"
44 ac_help="$ac_help
45   --enable-local          enable AF_LOCAL (AF_UNIX) socket support [auto]"
46 ac_help="$ac_help
47   --enable-rewrite        enable rewrite [no]"
48 ac_help="$ac_help
49   --enable-x-compile      enable cross compiling [no]"
50 ac_help="$ac_help
51   --with-cyrus-sasl       with Cyrus SASL support [auto]"
52 ac_help="$ac_help
53   --with-fetch            with fetch URL support [auto]"
54 ac_help="$ac_help
55   --with-kerberos         with Kerberos support [auto]"
56 ac_help="$ac_help
57   --with-readline         with readline support [auto]"
58 ac_help="$ac_help
59   --with-threads          with threads [auto]"
60 ac_help="$ac_help
61   --with-tls              with TLS/SSL support [auto]"
62 ac_help="$ac_help
63   --with-yielding-select  with implicitly yielding select [auto]"
64 ac_help="$ac_help
65
66 SLAPD (Standalone LDAP Daemon) Options:"
67 ac_help="$ac_help
68   --enable-slapd          enable building slapd [yes]"
69 ac_help="$ac_help
70     --enable-aci          enable per-object ACIs (experimental) [no]"
71 ac_help="$ac_help
72     --enable-cleartext    enable cleartext passwords [yes]"
73 ac_help="$ac_help
74     --enable-crypt        enable crypt(3) passwords [no]"
75 ac_help="$ac_help
76     --enable-dynamic      enable linking built binaries with dynamic libs [no]"
77 ac_help="$ac_help
78     --enable-kpasswd      enable Kerberos password verification [no]"
79 ac_help="$ac_help
80     --enable-lmpasswd     enable LAN Manager passwords [no]"
81 ac_help="$ac_help
82     --enable-spasswd      enable (Cyrus) SASL password verification [no]"
83 ac_help="$ac_help
84     --enable-modules      enable dynamic module support [no]"
85 ac_help="$ac_help
86     --enable-phonetic     enable phonetic/soundex [no]"
87 ac_help="$ac_help
88     --enable-rlookups     enable reverse lookups [no]"
89 ac_help="$ac_help
90     --enable-slp          enable SLPv2 support [no]"
91 ac_help="$ac_help
92     --enable-wrappers     enable tcp wrapper support [no]"
93 ac_help="$ac_help
94     --enable-bdb          enable Berkeley DB backend [yes]"
95 ac_help="$ac_help
96     --with-bdb-module     module type [static]"
97 ac_help="$ac_help
98     --enable-dnssrv       enable dnssrv backend [no]"
99 ac_help="$ac_help
100     --with-dnssrv-module  module type [static]"
101 ac_help="$ac_help
102     --enable-ldap         enable ldap backend [no]"
103 ac_help="$ac_help
104     --with-ldap-module    module type [static]"
105 ac_help="$ac_help
106     --enable-ldbm         enable ldbm backend [no]"
107 ac_help="$ac_help
108     --with-ldbm-api       with LDBM API [auto]"
109 ac_help="$ac_help
110     --with-ldbm-module    module type [static]"
111 ac_help="$ac_help
112     --with-ldbm-type      use LDBM type [auto]"
113 ac_help="$ac_help
114     --enable-meta         enable metadirectory backend [no]"
115 ac_help="$ac_help
116     --with-meta-module    module type [static]"
117 ac_help="$ac_help
118     --enable-monitor      enable monitor backend [no]"
119 ac_help="$ac_help
120     --with-monitor-module module type [static]"
121 ac_help="$ac_help
122     --enable-null         enable null backend [no]"
123 ac_help="$ac_help
124     --with-null-module    module type [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]"
129 ac_help="$ac_help
130     --enable-perl         enable perl backend [no]"
131 ac_help="$ac_help
132     --with-perl-module    module type [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]"
137 ac_help="$ac_help
138     --enable-sql          enable sql backend [no]"
139 ac_help="$ac_help
140     --with-sql-module     module type [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]"
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-rewrite
1555         # Check whether --enable-rewrite or --disable-rewrite was given.
1556 if test "${enable_rewrite+set}" = set; then
1557   enableval="$enable_rewrite"
1558   
1559         ol_arg=invalid
1560         for ol_val in auto 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-rewrite" 1>&2; exit 1; }
1567         fi
1568         ol_enable_rewrite="$ol_arg"
1569
1570 else
1571         ol_enable_rewrite="no"
1572 fi
1573 # end --enable-rewrite
1574 # OpenLDAP --enable-x_compile
1575         # Check whether --enable-x_compile or --disable-x_compile was given.
1576 if test "${enable_x_compile+set}" = set; then
1577   enableval="$enable_x_compile"
1578   
1579         ol_arg=invalid
1580         for ol_val in yes no ; do
1581                 if test "$enableval" = "$ol_val" ; then
1582                         ol_arg="$ol_val"
1583                 fi
1584         done
1585         if test "$ol_arg" = "invalid" ; then
1586                 { echo "configure: error: bad value $enableval for --enable-x_compile" 1>&2; exit 1; }
1587         fi
1588         ol_enable_x_compile="$ol_arg"
1589
1590 else
1591         ol_enable_x_compile="no"
1592 fi
1593 # end --enable-x_compile
1594
1595
1596 # OpenLDAP --with-cyrus_sasl
1597         # Check whether --with-cyrus_sasl or --without-cyrus_sasl was given.
1598 if test "${with_cyrus_sasl+set}" = set; then
1599   withval="$with_cyrus_sasl"
1600   
1601         ol_arg=invalid
1602         for ol_val in auto yes no  ; do
1603                 if test "$withval" = "$ol_val" ; then
1604                         ol_arg="$ol_val"
1605                 fi
1606         done
1607         if test "$ol_arg" = "invalid" ; then
1608                 { echo "configure: error: bad value $withval for --with-cyrus_sasl" 1>&2; exit 1; }
1609         fi
1610         ol_with_cyrus_sasl="$ol_arg"
1611
1612 else
1613         ol_with_cyrus_sasl="auto"
1614 fi
1615 # end --with-cyrus_sasl
1616
1617 # OpenLDAP --with-fetch
1618         # Check whether --with-fetch or --without-fetch was given.
1619 if test "${with_fetch+set}" = set; then
1620   withval="$with_fetch"
1621   
1622         ol_arg=invalid
1623         for ol_val in auto yes no  ; do
1624                 if test "$withval" = "$ol_val" ; then
1625                         ol_arg="$ol_val"
1626                 fi
1627         done
1628         if test "$ol_arg" = "invalid" ; then
1629                 { echo "configure: error: bad value $withval for --with-fetch" 1>&2; exit 1; }
1630         fi
1631         ol_with_fetch="$ol_arg"
1632
1633 else
1634         ol_with_fetch="auto"
1635 fi
1636 # end --with-fetch
1637
1638 # OpenLDAP --with-kerberos
1639         # Check whether --with-kerberos or --without-kerberos was given.
1640 if test "${with_kerberos+set}" = set; then
1641   withval="$with_kerberos"
1642   
1643         ol_arg=invalid
1644         for ol_val in auto k5 k5only k425 kth k4 afs yes no ; do
1645                 if test "$withval" = "$ol_val" ; then
1646                         ol_arg="$ol_val"
1647                 fi
1648         done
1649         if test "$ol_arg" = "invalid" ; then
1650                 { echo "configure: error: bad value $withval for --with-kerberos" 1>&2; exit 1; }
1651         fi
1652         ol_with_kerberos="$ol_arg"
1653
1654 else
1655         ol_with_kerberos="auto"
1656 fi
1657 # end --with-kerberos
1658
1659 # OpenLDAP --with-readline
1660         # Check whether --with-readline or --without-readline was given.
1661 if test "${with_readline+set}" = set; then
1662   withval="$with_readline"
1663   
1664         ol_arg=invalid
1665         for ol_val in auto yes no  ; do
1666                 if test "$withval" = "$ol_val" ; then
1667                         ol_arg="$ol_val"
1668                 fi
1669         done
1670         if test "$ol_arg" = "invalid" ; then
1671                 { echo "configure: error: bad value $withval for --with-readline" 1>&2; exit 1; }
1672         fi
1673         ol_with_readline="$ol_arg"
1674
1675 else
1676         ol_with_readline="auto"
1677 fi
1678 # end --with-readline
1679
1680 # OpenLDAP --with-threads
1681         # Check whether --with-threads or --without-threads was given.
1682 if test "${with_threads+set}" = set; then
1683   withval="$with_threads"
1684   
1685         ol_arg=invalid
1686         for ol_val in auto nt posix mach pth lwp yes no manual  ; do
1687                 if test "$withval" = "$ol_val" ; then
1688                         ol_arg="$ol_val"
1689                 fi
1690         done
1691         if test "$ol_arg" = "invalid" ; then
1692                 { echo "configure: error: bad value $withval for --with-threads" 1>&2; exit 1; }
1693         fi
1694         ol_with_threads="$ol_arg"
1695
1696 else
1697         ol_with_threads="auto"
1698 fi
1699 # end --with-threads
1700
1701 # OpenLDAP --with-tls
1702         # Check whether --with-tls or --without-tls was given.
1703 if test "${with_tls+set}" = set; then
1704   withval="$with_tls"
1705   
1706         ol_arg=invalid
1707         for ol_val in auto ssleay openssl yes no  ; do
1708                 if test "$withval" = "$ol_val" ; then
1709                         ol_arg="$ol_val"
1710                 fi
1711         done
1712         if test "$ol_arg" = "invalid" ; then
1713                 { echo "configure: error: bad value $withval for --with-tls" 1>&2; exit 1; }
1714         fi
1715         ol_with_tls="$ol_arg"
1716
1717 else
1718         ol_with_tls="auto"
1719 fi
1720 # end --with-tls
1721
1722 # OpenLDAP --with-yielding_select
1723         # Check whether --with-yielding_select or --without-yielding_select was given.
1724 if test "${with_yielding_select+set}" = set; then
1725   withval="$with_yielding_select"
1726   
1727         ol_arg=invalid
1728         for ol_val in auto yes no manual  ; do
1729                 if test "$withval" = "$ol_val" ; then
1730                         ol_arg="$ol_val"
1731                 fi
1732         done
1733         if test "$ol_arg" = "invalid" ; then
1734                 { echo "configure: error: bad value $withval for --with-yielding_select" 1>&2; exit 1; }
1735         fi
1736         ol_with_yielding_select="$ol_arg"
1737
1738 else
1739         ol_with_yielding_select="auto"
1740 fi
1741 # end --with-yielding_select
1742
1743
1744
1745 # Check whether --with-xxslapdoptions or --without-xxslapdoptions was given.
1746 if test "${with_xxslapdoptions+set}" = set; then
1747   withval="$with_xxslapdoptions"
1748   :
1749 fi
1750
1751 # OpenLDAP --enable-slapd
1752         # Check whether --enable-slapd or --disable-slapd was given.
1753 if test "${enable_slapd+set}" = set; then
1754   enableval="$enable_slapd"
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-slapd" 1>&2; exit 1; }
1764         fi
1765         ol_enable_slapd="$ol_arg"
1766
1767 else
1768         ol_enable_slapd="yes"
1769 fi
1770 # end --enable-slapd
1771 # OpenLDAP --enable-aci
1772         # Check whether --enable-aci or --disable-aci was given.
1773 if test "${enable_aci+set}" = set; then
1774   enableval="$enable_aci"
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-aci" 1>&2; exit 1; }
1784         fi
1785         ol_enable_aci="$ol_arg"
1786
1787 else
1788         ol_enable_aci="no"
1789 fi
1790 # end --enable-aci
1791 # OpenLDAP --enable-cleartext
1792         # Check whether --enable-cleartext or --disable-cleartext was given.
1793 if test "${enable_cleartext+set}" = set; then
1794   enableval="$enable_cleartext"
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-cleartext" 1>&2; exit 1; }
1804         fi
1805         ol_enable_cleartext="$ol_arg"
1806
1807 else
1808         ol_enable_cleartext="yes"
1809 fi
1810 # end --enable-cleartext
1811 # OpenLDAP --enable-crypt
1812         # Check whether --enable-crypt or --disable-crypt was given.
1813 if test "${enable_crypt+set}" = set; then
1814   enableval="$enable_crypt"
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-crypt" 1>&2; exit 1; }
1824         fi
1825         ol_enable_crypt="$ol_arg"
1826
1827 else
1828         ol_enable_crypt="no"
1829 fi
1830 # end --enable-crypt
1831 # OpenLDAP --enable-dynamic
1832         # Check whether --enable-dynamic or --disable-dynamic was given.
1833 if test "${enable_dynamic+set}" = set; then
1834   enableval="$enable_dynamic"
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-dynamic" 1>&2; exit 1; }
1844         fi
1845         ol_enable_dynamic="$ol_arg"
1846
1847 else
1848         ol_enable_dynamic="no"
1849 fi
1850 # end --enable-dynamic
1851 # OpenLDAP --enable-kpasswd
1852         # Check whether --enable-kpasswd or --disable-kpasswd was given.
1853 if test "${enable_kpasswd+set}" = set; then
1854   enableval="$enable_kpasswd"
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-kpasswd" 1>&2; exit 1; }
1864         fi
1865         ol_enable_kpasswd="$ol_arg"
1866
1867 else
1868         ol_enable_kpasswd="no"
1869 fi
1870 # end --enable-kpasswd
1871 # OpenLDAP --enable-lmpasswd
1872         # Check whether --enable-lmpasswd or --disable-lmpasswd was given.
1873 if test "${enable_lmpasswd+set}" = set; then
1874   enableval="$enable_lmpasswd"
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-lmpasswd" 1>&2; exit 1; }
1884         fi
1885         ol_enable_lmpasswd="$ol_arg"
1886
1887 else
1888         ol_enable_lmpasswd="no"
1889 fi
1890 # end --enable-lmpasswd
1891 # OpenLDAP --enable-spasswd
1892         # Check whether --enable-spasswd or --disable-spasswd was given.
1893 if test "${enable_spasswd+set}" = set; then
1894   enableval="$enable_spasswd"
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-spasswd" 1>&2; exit 1; }
1904         fi
1905         ol_enable_spasswd="$ol_arg"
1906
1907 else
1908         ol_enable_spasswd="no"
1909 fi
1910 # end --enable-spasswd
1911 # OpenLDAP --enable-modules
1912         # Check whether --enable-modules or --disable-modules was given.
1913 if test "${enable_modules+set}" = set; then
1914   enableval="$enable_modules"
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-modules" 1>&2; exit 1; }
1924         fi
1925         ol_enable_modules="$ol_arg"
1926
1927 else
1928         ol_enable_modules="no"
1929 fi
1930 # end --enable-modules
1931 # OpenLDAP --enable-phonetic
1932         # Check whether --enable-phonetic or --disable-phonetic was given.
1933 if test "${enable_phonetic+set}" = set; then
1934   enableval="$enable_phonetic"
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-phonetic" 1>&2; exit 1; }
1944         fi
1945         ol_enable_phonetic="$ol_arg"
1946
1947 else
1948         ol_enable_phonetic="no"
1949 fi
1950 # end --enable-phonetic
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 SLAPD_MODULES_LIST=
2925
2926 SLAPD_STATIC_BACKENDS=
2927 SLAPD_DYNAMIC_BACKENDS=
2928
2929 SLAPD_PERL_LDFLAGS=
2930 MOD_PERL_LDFLAGS=
2931 PERL_CPPFLAGS=
2932
2933 SLAPD_SQL_LDFLAGS=
2934 SLAPD_SQL_LIBS=
2935 SLAPD_SQL_INCLUDES=
2936
2937 MOD_TCL_LIB=
2938 KRB4_LIBS=
2939 KRB5_LIBS=
2940 READLINE_LIBS=
2941 SASL_LIBS=
2942 TERMCAP_LIBS=
2943 TLS_LIBS=
2944 MODULES_LIBS=
2945 AUTH_LIBS=
2946
2947 SLAPD_SLP_LIBS=
2948
2949
2950 # Find a good install program.  We prefer a C program (faster),
2951 # so one script is as good as another.  But avoid the broken or
2952 # incompatible versions:
2953 # SysV /etc/install, /usr/sbin/install
2954 # SunOS /usr/etc/install
2955 # IRIX /sbin/install
2956 # AIX /bin/install
2957 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2958 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
2959 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2960 # ./install, which can be erroneously created by make from ./install.sh.
2961 echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
2962 echo "configure:2963: checking for a BSD compatible install" >&5
2963 if test -z "$INSTALL"; then
2964 if eval "test \"\${ac_cv_path_install+set}\" = set"; then
2965   echo $ac_n "(cached) $ac_c" 1>&6
2966 else
2967     IFS="${IFS=         }"; ac_save_IFS="$IFS"; IFS=":"
2968   for ac_dir in $PATH; do
2969     # Account for people who put trailing slashes in PATH elements.
2970     case "$ac_dir/" in
2971     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
2972     *)
2973       # OSF1 and SCO ODT 3.0 have their own names for install.
2974       # Don't use installbsd from OSF since it installs stuff as root
2975       # by default.
2976       for ac_prog in ginstall scoinst install; do
2977         if test -f $ac_dir/$ac_prog; then
2978           if test $ac_prog = install &&
2979             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
2980             # AIX install.  It has an incompatible calling convention.
2981             :
2982           elif test $ac_prog = install &&
2983             grep pwplus $ac_dir/$ac_prog >/dev/null 2>&1; then
2984             # program-specific install script used by HP pwplus--don't use.
2985             :
2986           else
2987             ac_cv_path_install="$ac_dir/$ac_prog -c"
2988             break 2
2989           fi
2990         fi
2991       done
2992       ;;
2993     esac
2994   done
2995   IFS="$ac_save_IFS"
2996
2997 fi
2998   if test "${ac_cv_path_install+set}" = set; then
2999     INSTALL="$ac_cv_path_install"
3000   else
3001     # As a last resort, use the slow shell script.  We don't cache a
3002     # path for INSTALL within a source directory, because that will
3003     # break other packages using the cache if that directory is
3004     # removed, or if the path is relative.
3005     INSTALL="$ac_install_sh"
3006   fi
3007 fi
3008 echo "$ac_t""$INSTALL" 1>&6
3009
3010 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3011 # It thinks the first close brace ends the variable substitution.
3012 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3013
3014 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3015
3016 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3017
3018
3019 cat >> confdefs.h <<\EOF
3020 #define HAVE_MKVERSION 1
3021 EOF
3022
3023
3024
3025
3026 ol_aix_threads=no
3027 case "$target" in
3028 *-*-aix*)       if test -z "$CC" ; then
3029                 case "$ol_with_threads" in
3030                 auto | yes |  posix) ol_aix_threads=yes ;;
3031                 esac
3032         fi
3033 ;;
3034 esac
3035
3036 if test $ol_aix_threads = yes ; then
3037         if test -z "${CC}" ; then
3038                 for ac_prog in cc_r xlc_r cc
3039 do
3040 # Extract the first word of "$ac_prog", so it can be a program name with args.
3041 set dummy $ac_prog; ac_word=$2
3042 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3043 echo "configure:3044: checking for $ac_word" >&5
3044 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3045   echo $ac_n "(cached) $ac_c" 1>&6
3046 else
3047   if test -n "$CC"; then
3048   ac_cv_prog_CC="$CC" # Let the user override the test.
3049 else
3050   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3051   ac_dummy="$PATH"
3052   for ac_dir in $ac_dummy; do
3053     test -z "$ac_dir" && ac_dir=.
3054     if test -f $ac_dir/$ac_word; then
3055       ac_cv_prog_CC="$ac_prog"
3056       break
3057     fi
3058   done
3059   IFS="$ac_save_ifs"
3060 fi
3061 fi
3062 CC="$ac_cv_prog_CC"
3063 if test -n "$CC"; then
3064   echo "$ac_t""$CC" 1>&6
3065 else
3066   echo "$ac_t""no" 1>&6
3067 fi
3068
3069 test -n "$CC" && break
3070 done
3071
3072
3073                 if test "$CC" = cc ; then
3074                                                 if test $ol_with_threads != auto ; then
3075                                 { echo "configure: error: --with-threads requires cc_r (or other suitable compiler) on AIX" 1>&2; exit 1; }
3076                         else
3077                                 echo "configure: warning: disabling threads, no cc_r on AIX" 1>&2
3078                         fi
3079                         ol_with_threads=no
3080                 fi
3081         fi
3082
3083         if test "${CC}" = "cc_r" -o "${CC}" = "xlc_r" ; then
3084                 ol_with_threads=posix
3085                 ol_cv_pthread_create=yes
3086         fi
3087 fi
3088
3089 if test -z "${CC}"; then
3090         for ac_prog in cc
3091 do
3092 # Extract the first word of "$ac_prog", so it can be a program name with args.
3093 set dummy $ac_prog; ac_word=$2
3094 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3095 echo "configure:3096: checking for $ac_word" >&5
3096 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3097   echo $ac_n "(cached) $ac_c" 1>&6
3098 else
3099   if test -n "$CC"; then
3100   ac_cv_prog_CC="$CC" # Let the user override the test.
3101 else
3102   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3103   ac_dummy="$PATH"
3104   for ac_dir in $ac_dummy; do
3105     test -z "$ac_dir" && ac_dir=.
3106     if test -f $ac_dir/$ac_word; then
3107       ac_cv_prog_CC="$ac_prog"
3108       break
3109     fi
3110   done
3111   IFS="$ac_save_ifs"
3112 fi
3113 fi
3114 CC="$ac_cv_prog_CC"
3115 if test -n "$CC"; then
3116   echo "$ac_t""$CC" 1>&6
3117 else
3118   echo "$ac_t""no" 1>&6
3119 fi
3120
3121 test -n "$CC" && break
3122 done
3123
3124 fi
3125
3126
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="ar"
3161
3162
3163
3164
3165 # Find the correct PATH separator.  Usually this is `:', but
3166 # DJGPP uses `;' like DOS.
3167 if test "X${PATH_SEPARATOR+set}" != Xset; then
3168   UNAME=${UNAME-`uname 2>/dev/null`}
3169   case X$UNAME in
3170     *-DOS) lt_cv_sys_path_separator=';' ;;
3171     *)     lt_cv_sys_path_separator=':' ;;
3172   esac
3173   PATH_SEPARATOR=$lt_cv_sys_path_separator
3174 fi
3175
3176 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
3177 echo "configure:3178: checking for Cygwin environment" >&5
3178 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
3179   echo $ac_n "(cached) $ac_c" 1>&6
3180 else
3181   cat > conftest.$ac_ext <<EOF
3182 #line 3183 "configure"
3183 #include "confdefs.h"
3184
3185 int main() {
3186
3187 #ifndef __CYGWIN__
3188 #define __CYGWIN__ __CYGWIN32__
3189 #endif
3190 return __CYGWIN__;
3191 ; return 0; }
3192 EOF
3193 if { (eval echo configure:3194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3194   rm -rf conftest*
3195   ac_cv_cygwin=yes
3196 else
3197   echo "configure: failed program was:" >&5
3198   cat conftest.$ac_ext >&5
3199   rm -rf conftest*
3200   ac_cv_cygwin=no
3201 fi
3202 rm -f conftest*
3203 fi
3204
3205 echo "$ac_t""$ac_cv_cygwin" 1>&6
3206 CYGWIN=
3207 test "$ac_cv_cygwin" = yes && CYGWIN=yes
3208 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
3209 echo "configure:3210: checking for mingw32 environment" >&5
3210 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
3211   echo $ac_n "(cached) $ac_c" 1>&6
3212 else
3213   cat > conftest.$ac_ext <<EOF
3214 #line 3215 "configure"
3215 #include "confdefs.h"
3216
3217 int main() {
3218 return __MINGW32__;
3219 ; return 0; }
3220 EOF
3221 if { (eval echo configure:3222: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3222   rm -rf conftest*
3223   ac_cv_mingw32=yes
3224 else
3225   echo "configure: failed program was:" >&5
3226   cat conftest.$ac_ext >&5
3227   rm -rf conftest*
3228   ac_cv_mingw32=no
3229 fi
3230 rm -f conftest*
3231 fi
3232
3233 echo "$ac_t""$ac_cv_mingw32" 1>&6
3234 MINGW32=
3235 test "$ac_cv_mingw32" = yes && MINGW32=yes
3236 echo $ac_n "checking for EMX OS/2 environment""... $ac_c" 1>&6
3237 echo "configure:3238: checking for EMX OS/2 environment" >&5
3238 if eval "test \"\${ac_cv_emxos2+set}\" = set"; then
3239   echo $ac_n "(cached) $ac_c" 1>&6
3240 else
3241   cat > conftest.$ac_ext <<EOF
3242 #line 3243 "configure"
3243 #include "confdefs.h"
3244
3245 int main() {
3246 return __EMX__;
3247 ; return 0; }
3248 EOF
3249 if { (eval echo configure:3250: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3250   rm -rf conftest*
3251   ac_cv_emxos2=yes
3252 else
3253   echo "configure: failed program was:" >&5
3254   cat conftest.$ac_ext >&5
3255   rm -rf conftest*
3256   ac_cv_emxos2=no
3257 fi
3258 rm -f conftest*
3259 fi
3260
3261 echo "$ac_t""$ac_cv_emxos2" 1>&6
3262 EMXOS2=
3263 test "$ac_cv_emxos2" = yes && EMXOS2=yes
3264 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
3265 echo "configure:3266: checking how to run the C preprocessor" >&5
3266 # On Suns, sometimes $CPP names a directory.
3267 if test -n "$CPP" && test -d "$CPP"; then
3268   CPP=
3269 fi
3270 if test -z "$CPP"; then
3271 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
3272   echo $ac_n "(cached) $ac_c" 1>&6
3273 else
3274     # This must be in double quotes, not single quotes, because CPP may get
3275   # substituted into the Makefile and "${CC-cc}" will confuse make.
3276   CPP="${CC-cc} -E"
3277   # On the NeXT, cc -E runs the code through the compiler's parser,
3278   # not just through cpp.
3279   cat > conftest.$ac_ext <<EOF
3280 #line 3281 "configure"
3281 #include "confdefs.h"
3282 #include <assert.h>
3283 Syntax Error
3284 EOF
3285 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3286 { (eval echo configure:3287: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3287 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3288 if test -z "$ac_err"; then
3289   :
3290 else
3291   echo "$ac_err" >&5
3292   echo "configure: failed program was:" >&5
3293   cat conftest.$ac_ext >&5
3294   rm -rf conftest*
3295   CPP="${CC-cc} -E -traditional-cpp"
3296   cat > conftest.$ac_ext <<EOF
3297 #line 3298 "configure"
3298 #include "confdefs.h"
3299 #include <assert.h>
3300 Syntax Error
3301 EOF
3302 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3303 { (eval echo configure:3304: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3304 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3305 if test -z "$ac_err"; then
3306   :
3307 else
3308   echo "$ac_err" >&5
3309   echo "configure: failed program was:" >&5
3310   cat conftest.$ac_ext >&5
3311   rm -rf conftest*
3312   CPP="${CC-cc} -nologo -E"
3313   cat > conftest.$ac_ext <<EOF
3314 #line 3315 "configure"
3315 #include "confdefs.h"
3316 #include <assert.h>
3317 Syntax Error
3318 EOF
3319 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
3320 { (eval echo configure:3321: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
3321 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
3322 if test -z "$ac_err"; then
3323   :
3324 else
3325   echo "$ac_err" >&5
3326   echo "configure: failed program was:" >&5
3327   cat conftest.$ac_ext >&5
3328   rm -rf conftest*
3329   CPP=/lib/cpp
3330 fi
3331 rm -f conftest*
3332 fi
3333 rm -f conftest*
3334 fi
3335 rm -f conftest*
3336   ac_cv_prog_CPP="$CPP"
3337 fi
3338   CPP="$ac_cv_prog_CPP"
3339 else
3340   ac_cv_prog_CPP="$CPP"
3341 fi
3342 echo "$ac_t""$CPP" 1>&6
3343
3344 # Check whether --enable-fast-install or --disable-fast-install was given.
3345 if test "${enable_fast_install+set}" = set; then
3346   enableval="$enable_fast_install"
3347   p=${PACKAGE-default}
3348 case $enableval in
3349 yes) enable_fast_install=yes ;;
3350 no) enable_fast_install=no ;;
3351 *)
3352   enable_fast_install=no
3353   # Look at the argument we got.  We use all the common list separators.
3354   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
3355   for pkg in $enableval; do
3356     if test "X$pkg" = "X$p"; then
3357       enable_fast_install=yes
3358     fi
3359   done
3360   IFS="$ac_save_ifs"
3361   ;;
3362 esac
3363 else
3364   enable_fast_install=yes
3365 fi
3366
3367 # Extract the first word of "gcc", so it can be a program name with args.
3368 set dummy gcc; ac_word=$2
3369 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3370 echo "configure:3371: checking for $ac_word" >&5
3371 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3372   echo $ac_n "(cached) $ac_c" 1>&6
3373 else
3374   if test -n "$CC"; then
3375   ac_cv_prog_CC="$CC" # Let the user override the test.
3376 else
3377   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3378   ac_dummy="$PATH"
3379   for ac_dir in $ac_dummy; do
3380     test -z "$ac_dir" && ac_dir=.
3381     if test -f $ac_dir/$ac_word; then
3382       ac_cv_prog_CC="gcc"
3383       break
3384     fi
3385   done
3386   IFS="$ac_save_ifs"
3387 fi
3388 fi
3389 CC="$ac_cv_prog_CC"
3390 if test -n "$CC"; then
3391   echo "$ac_t""$CC" 1>&6
3392 else
3393   echo "$ac_t""no" 1>&6
3394 fi
3395
3396 if test -z "$CC"; then
3397   # Extract the first word of "cc", so it can be a program name with args.
3398 set dummy cc; ac_word=$2
3399 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3400 echo "configure:3401: checking for $ac_word" >&5
3401 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3402   echo $ac_n "(cached) $ac_c" 1>&6
3403 else
3404   if test -n "$CC"; then
3405   ac_cv_prog_CC="$CC" # Let the user override the test.
3406 else
3407   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3408   ac_prog_rejected=no
3409   ac_dummy="$PATH"
3410   for ac_dir in $ac_dummy; do
3411     test -z "$ac_dir" && ac_dir=.
3412     if test -f $ac_dir/$ac_word; then
3413       if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
3414         ac_prog_rejected=yes
3415         continue
3416       fi
3417       ac_cv_prog_CC="cc"
3418       break
3419     fi
3420   done
3421   IFS="$ac_save_ifs"
3422 if test $ac_prog_rejected = yes; then
3423   # We found a bogon in the path, so make sure we never use it.
3424   set dummy $ac_cv_prog_CC
3425   shift
3426   if test $# -gt 0; then
3427     # We chose a different compiler from the bogus one.
3428     # However, it has the same basename, so the bogon will be chosen
3429     # first if we set CC to just the basename; use the full file name.
3430     shift
3431     set dummy "$ac_dir/$ac_word" "$@"
3432     shift
3433     ac_cv_prog_CC="$@"
3434   fi
3435 fi
3436 fi
3437 fi
3438 CC="$ac_cv_prog_CC"
3439 if test -n "$CC"; then
3440   echo "$ac_t""$CC" 1>&6
3441 else
3442   echo "$ac_t""no" 1>&6
3443 fi
3444
3445   if test -z "$CC"; then
3446     case "`uname -s`" in
3447     *win32* | *WIN32* | *CYGWIN*)
3448       # Extract the first word of "cl", so it can be a program name with args.
3449 set dummy cl; ac_word=$2
3450 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
3451 echo "configure:3452: checking for $ac_word" >&5
3452 if eval "test \"\${ac_cv_prog_CC+set}\" = set"; then
3453   echo $ac_n "(cached) $ac_c" 1>&6
3454 else
3455   if test -n "$CC"; then
3456   ac_cv_prog_CC="$CC" # Let the user override the test.
3457 else
3458   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
3459   ac_dummy="$PATH"
3460   for ac_dir in $ac_dummy; do
3461     test -z "$ac_dir" && ac_dir=.
3462     if test -f $ac_dir/$ac_word; then
3463       ac_cv_prog_CC="cl"
3464       break
3465     fi
3466   done
3467   IFS="$ac_save_ifs"
3468 fi
3469 fi
3470 CC="$ac_cv_prog_CC"
3471 if test -n "$CC"; then
3472   echo "$ac_t""$CC" 1>&6
3473 else
3474   echo "$ac_t""no" 1>&6
3475 fi
3476  ;;
3477     esac
3478   fi
3479   test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
3480 fi
3481
3482 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works""... $ac_c" 1>&6
3483 echo "configure:3484: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) works" >&5
3484
3485 ac_ext=c
3486 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3487 ac_cpp='$CPP $CPPFLAGS'
3488 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3489 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3490 cross_compiling=$ac_cv_prog_cc_cross
3491
3492 cat > conftest.$ac_ext << EOF
3493
3494 #line 3495 "configure"
3495 #include "confdefs.h"
3496
3497 main(){return(0);}
3498 EOF
3499 if { (eval echo configure:3500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
3500   ac_cv_prog_cc_works=yes
3501   # If we can't run a trivial program, we are probably using a cross compiler.
3502   if (./conftest; exit) 2>/dev/null; then
3503     ac_cv_prog_cc_cross=no
3504   else
3505     ac_cv_prog_cc_cross=yes
3506   fi
3507 else
3508   echo "configure: failed program was:" >&5
3509   cat conftest.$ac_ext >&5
3510   ac_cv_prog_cc_works=no
3511 fi
3512 rm -fr conftest*
3513 ac_ext=c
3514 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
3515 ac_cpp='$CPP $CPPFLAGS'
3516 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
3517 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
3518 cross_compiling=$ac_cv_prog_cc_cross
3519
3520 echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
3521 if test $ac_cv_prog_cc_works = no; then
3522   { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
3523 fi
3524 echo $ac_n "checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
3525 echo "configure:3526: checking whether the C compiler ($CC $CFLAGS $CPPFLAGS $LDFLAGS) is a cross-compiler" >&5
3526 echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
3527 cross_compiling=$ac_cv_prog_cc_cross
3528
3529 echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
3530 echo "configure:3531: checking whether we are using GNU C" >&5
3531 if eval "test \"\${ac_cv_prog_gcc+set}\" = set"; then
3532   echo $ac_n "(cached) $ac_c" 1>&6
3533 else
3534   cat > conftest.c <<EOF
3535 #ifdef __GNUC__
3536   yes;
3537 #endif
3538 EOF
3539 if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:3540: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
3540   ac_cv_prog_gcc=yes
3541 else
3542   ac_cv_prog_gcc=no
3543 fi
3544 fi
3545
3546 echo "$ac_t""$ac_cv_prog_gcc" 1>&6
3547
3548 if test $ac_cv_prog_gcc = yes; then
3549   GCC=yes
3550 else
3551   GCC=
3552 fi
3553
3554 ac_test_CFLAGS="${CFLAGS+set}"
3555 ac_save_CFLAGS="$CFLAGS"
3556 CFLAGS=
3557 echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
3558 echo "configure:3559: checking whether ${CC-cc} accepts -g" >&5
3559 if eval "test \"\${ac_cv_prog_cc_g+set}\" = set"; then
3560   echo $ac_n "(cached) $ac_c" 1>&6
3561 else
3562   echo 'void f(){}' > conftest.c
3563 if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
3564   ac_cv_prog_cc_g=yes
3565 else
3566   ac_cv_prog_cc_g=no
3567 fi
3568 rm -f conftest*
3569
3570 fi
3571
3572 echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
3573 if test "$ac_test_CFLAGS" = set; then
3574   CFLAGS="$ac_save_CFLAGS"
3575 elif test $ac_cv_prog_cc_g = yes; then
3576   if test "$GCC" = yes; then
3577     CFLAGS="-g -O2"
3578   else
3579     CFLAGS="-g"
3580   fi
3581 else
3582   if test "$GCC" = yes; then
3583     CFLAGS="-O2"
3584   else
3585     CFLAGS=
3586   fi
3587 fi
3588
3589 # Check whether --with-gnu-ld or --without-gnu-ld was given.
3590 if test "${with_gnu_ld+set}" = set; then
3591   withval="$with_gnu_ld"
3592   test "$withval" = no || with_gnu_ld=yes
3593 else
3594   with_gnu_ld=no
3595 fi
3596
3597 ac_prog=ld
3598 if test "$GCC" = yes; then
3599   # Check if gcc -print-prog-name=ld gives a path.
3600   echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
3601 echo "configure:3602: checking for ld used by GCC" >&5
3602   case $host in
3603   *-*-mingw*)
3604     # gcc leaves a trailing carriage return which upsets mingw
3605     ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
3606   *)
3607     ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
3608   esac
3609   case $ac_prog in
3610     # Accept absolute paths.
3611     [\\/]* | [A-Za-z]:[\\/]*)
3612       re_direlt='/[^/][^/]*/\.\./'
3613       # Canonicalize the path of ld
3614       ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
3615       while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
3616         ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
3617       done
3618       test -z "$LD" && LD="$ac_prog"
3619       ;;
3620   "")
3621     # If it fails, then pretend we aren't using GCC.
3622     ac_prog=ld
3623     ;;
3624   *)
3625     # If it is relative, then search for the first ld in PATH.
3626     with_gnu_ld=unknown
3627     ;;
3628   esac
3629 elif test "$with_gnu_ld" = yes; then
3630   echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
3631 echo "configure:3632: checking for GNU ld" >&5
3632 else
3633   echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
3634 echo "configure:3635: checking for non-GNU ld" >&5
3635 fi
3636 if eval "test \"\${lt_cv_path_LD+set}\" = set"; then
3637   echo $ac_n "(cached) $ac_c" 1>&6
3638 else
3639   if test -z "$LD"; then
3640   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3641   for ac_dir in $PATH; do
3642     test -z "$ac_dir" && ac_dir=.
3643     if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
3644       lt_cv_path_LD="$ac_dir/$ac_prog"
3645       # Check to see if the program is GNU ld.  I'd rather use --version,
3646       # but apparently some GNU ld's only accept -v.
3647       # Break only if it was the GNU/non-GNU ld that we prefer.
3648       if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
3649         test "$with_gnu_ld" != no && break
3650       else
3651         test "$with_gnu_ld" != yes && break
3652       fi
3653     fi
3654   done
3655   IFS="$ac_save_ifs"
3656 else
3657   lt_cv_path_LD="$LD" # Let the user override the test with a path.
3658 fi
3659 fi
3660
3661 LD="$lt_cv_path_LD"
3662 if test -n "$LD"; then
3663   echo "$ac_t""$LD" 1>&6
3664 else
3665   echo "$ac_t""no" 1>&6
3666 fi
3667 test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
3668 echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
3669 echo "configure:3670: checking if the linker ($LD) is GNU ld" >&5
3670 if eval "test \"\${lt_cv_prog_gnu_ld+set}\" = set"; then
3671   echo $ac_n "(cached) $ac_c" 1>&6
3672 else
3673   # I'd rather use --version here, but apparently some GNU ld's only accept -v.
3674 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
3675   lt_cv_prog_gnu_ld=yes
3676 else
3677   lt_cv_prog_gnu_ld=no
3678 fi
3679 fi
3680
3681 echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
3682 with_gnu_ld=$lt_cv_prog_gnu_ld
3683
3684
3685 echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
3686 echo "configure:3687: checking for $LD option to reload object files" >&5
3687 if eval "test \"\${lt_cv_ld_reload_flag+set}\" = set"; then
3688   echo $ac_n "(cached) $ac_c" 1>&6
3689 else
3690   lt_cv_ld_reload_flag='-r'
3691 fi
3692
3693 echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
3694 reload_flag=$lt_cv_ld_reload_flag
3695 test -n "$reload_flag" && reload_flag=" $reload_flag"
3696
3697 echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
3698 echo "configure:3699: checking for BSD-compatible nm" >&5
3699 if eval "test \"\${lt_cv_path_NM+set}\" = set"; then
3700   echo $ac_n "(cached) $ac_c" 1>&6
3701 else
3702   if test -n "$NM"; then
3703   # Let the user override the test.
3704   lt_cv_path_NM="$NM"
3705 else
3706   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
3707   for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
3708     test -z "$ac_dir" && ac_dir=.
3709     tmp_nm=$ac_dir/${ac_tool_prefix}nm
3710     if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
3711       # Check to see if the nm accepts a BSD-compat flag.
3712       # Adding the `sed 1q' prevents false positives on HP-UX, which says:
3713       #   nm: unknown option "B" ignored
3714       # Tru64's nm complains that /dev/null is an invalid object file
3715       if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
3716         lt_cv_path_NM="$tmp_nm -B"
3717         break
3718       elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
3719         lt_cv_path_NM="$tmp_nm -p"
3720         break
3721       else
3722         lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
3723         continue # so that we can try to find one that supports BSD flags
3724       fi
3725     fi
3726   done
3727   IFS="$ac_save_ifs"
3728   test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
3729 fi
3730 fi
3731
3732 NM="$lt_cv_path_NM"
3733 echo "$ac_t""$NM" 1>&6
3734
3735 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
3736 echo "configure:3737: checking whether ln -s works" >&5
3737 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
3738   echo $ac_n "(cached) $ac_c" 1>&6
3739 else
3740   rm -f conftestdata
3741 if ln -s X conftestdata 2>/dev/null
3742 then
3743   rm -f conftestdata
3744   ac_cv_prog_LN_S="ln -s"
3745 else
3746   ac_cv_prog_LN_S=ln
3747 fi
3748 fi
3749 LN_S="$ac_cv_prog_LN_S"
3750 if test "$ac_cv_prog_LN_S" = "ln -s"; then
3751   echo "$ac_t""yes" 1>&6
3752 else
3753   echo "$ac_t""no" 1>&6
3754 fi
3755
3756 echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
3757 echo "configure:3758: checking how to recognise dependant libraries" >&5
3758 if eval "test \"\${lt_cv_deplibs_check_method+set}\" = set"; then
3759   echo $ac_n "(cached) $ac_c" 1>&6
3760 else
3761   lt_cv_file_magic_cmd='$MAGIC_CMD'
3762 lt_cv_file_magic_test_file=
3763 lt_cv_deplibs_check_method='unknown'
3764 # Need to set the preceding variable on all platforms that support
3765 # interlibrary dependencies.
3766 # 'none' -- dependencies not supported.
3767 # `unknown' -- same as none, but documents that we really don't know.
3768 # 'pass_all' -- all dependencies passed with no checks.
3769 # 'test_compile' -- check by making test program.
3770 # 'file_magic [[regex]]' -- check by looking for files in library path
3771 # which responds to the $file_magic_cmd with a given egrep regex.
3772 # If you have `file' or equivalent on your system and you're not sure
3773 # whether `pass_all' will *always* work, you probably want this one.
3774
3775 case $host_os in
3776 aix4* | aix5*)
3777   lt_cv_deplibs_check_method=pass_all
3778   ;;
3779
3780 beos*)
3781   lt_cv_deplibs_check_method=pass_all
3782   ;;
3783
3784 bsdi4*)
3785   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
3786   lt_cv_file_magic_cmd='/usr/bin/file -L'
3787   lt_cv_file_magic_test_file=/shlib/libc.so
3788   ;;
3789
3790 cygwin* | mingw* | pw32*)
3791   lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
3792   lt_cv_file_magic_cmd='$OBJDUMP -f'
3793   ;;
3794
3795 darwin* | rhapsody*)
3796   lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
3797   lt_cv_file_magic_cmd='/usr/bin/file -L'
3798   case "$host_os" in
3799   rhapsody* | darwin1.[012])
3800     lt_cv_file_magic_test_file=`echo /System/Library/Frameworks/System.framework/Versions/*/System | head -1`
3801     ;;
3802   *) # Darwin 1.3 on
3803     lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
3804     ;;
3805   esac
3806   ;;
3807
3808 freebsd*)
3809   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3810     case $host_cpu in
3811     i*86 )
3812       # Not sure whether the presence of OpenBSD here was a mistake.
3813       # Let's accept both of them until this is cleared up.
3814       lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
3815       lt_cv_file_magic_cmd=/usr/bin/file
3816       lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3817       ;;
3818     esac
3819   else
3820     lt_cv_deplibs_check_method=pass_all
3821   fi
3822   ;;
3823
3824 gnu*)
3825   lt_cv_deplibs_check_method=pass_all
3826   ;;
3827
3828 hpux10.20*|hpux11*)
3829   lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
3830   lt_cv_file_magic_cmd=/usr/bin/file
3831   lt_cv_file_magic_test_file=/usr/lib/libc.sl
3832   ;;
3833
3834 irix5* | irix6*)
3835   case $host_os in
3836   irix5*)
3837     # this will be overridden with pass_all, but let us keep it just in case
3838     lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
3839     ;;
3840   *)
3841     case $LD in
3842     *-32|*"-32 ") libmagic=32-bit;;
3843     *-n32|*"-n32 ") libmagic=N32;;
3844     *-64|*"-64 ") libmagic=64-bit;;
3845     *) libmagic=never-match;;
3846     esac
3847     # this will be overridden with pass_all, but let us keep it just in case
3848     lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
3849     ;;
3850   esac
3851   lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
3852   lt_cv_deplibs_check_method=pass_all
3853   ;;
3854
3855 # This must be Linux ELF.
3856 linux-gnu*)
3857   case $host_cpu in
3858   alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
3859     lt_cv_deplibs_check_method=pass_all ;;
3860   *)
3861     # glibc up to 2.1.1 does not perform some relocations on ARM
3862     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
3863   esac
3864   lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
3865   ;;
3866
3867 netbsd*)
3868   if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
3869     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
3870   else
3871     lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
3872   fi
3873   ;;
3874
3875 newos6*)
3876   lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
3877   lt_cv_file_magic_cmd=/usr/bin/file
3878   lt_cv_file_magic_test_file=/usr/lib/libnls.so
3879   ;;
3880
3881 openbsd*)
3882   lt_cv_file_magic_cmd=/usr/bin/file
3883   lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
3884   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
3885     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object'
3886   else
3887     lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library'
3888   fi
3889   ;;
3890
3891 osf3* | osf4* | osf5*)
3892   # this will be overridden with pass_all, but let us keep it just in case
3893   lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
3894   lt_cv_file_magic_test_file=/shlib/libc.so
3895   lt_cv_deplibs_check_method=pass_all
3896   ;;
3897
3898 sco3.2v5*)
3899   lt_cv_deplibs_check_method=pass_all
3900   ;;
3901
3902 solaris*)
3903   lt_cv_deplibs_check_method=pass_all
3904   lt_cv_file_magic_test_file=/lib/libc.so
3905   ;;
3906
3907 sysv5uw[78]* | sysv4*uw2*)
3908   lt_cv_deplibs_check_method=pass_all
3909   ;;
3910
3911 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
3912   case $host_vendor in
3913   motorola)
3914     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]'
3915     lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
3916     ;;
3917   ncr)
3918     lt_cv_deplibs_check_method=pass_all
3919     ;;
3920   sequent)
3921     lt_cv_file_magic_cmd='/bin/file'
3922     lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
3923     ;;
3924   sni)
3925     lt_cv_file_magic_cmd='/bin/file'
3926     lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
3927     lt_cv_file_magic_test_file=/lib/libc.so
3928     ;;
3929   esac
3930   ;;
3931 esac
3932
3933 fi
3934
3935 echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
3936 file_magic_cmd=$lt_cv_file_magic_cmd
3937 deplibs_check_method=$lt_cv_deplibs_check_method
3938
3939 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
3940 echo "configure:3941: checking for object suffix" >&5
3941 if eval "test \"\${ac_cv_objext+set}\" = set"; then
3942   echo $ac_n "(cached) $ac_c" 1>&6
3943 else
3944   rm -f conftest*
3945 echo 'int i = 1;' > conftest.$ac_ext
3946 if { (eval echo configure:3947: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
3947   for ac_file in conftest.*; do
3948     case $ac_file in
3949     *.c) ;;
3950     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
3951     esac
3952   done
3953 else
3954   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
3955 fi
3956 rm -f conftest*
3957 fi
3958
3959 echo "$ac_t""$ac_cv_objext" 1>&6
3960 OBJEXT=$ac_cv_objext
3961 ac_objext=$ac_cv_objext
3962
3963
3964
3965
3966 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
3967 echo "configure:3968: checking for executable suffix" >&5
3968 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
3969   echo $ac_n "(cached) $ac_c" 1>&6
3970 else
3971   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
3972   ac_cv_exeext=.exe
3973 else
3974   rm -f conftest*
3975   echo 'int main () { return 0; }' > conftest.$ac_ext
3976   ac_cv_exeext=
3977   if { (eval echo configure:3978: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
3978     for file in conftest.*; do
3979       case $file in
3980       *.c | *.C | *.o | *.obj | *.xcoff) ;;
3981       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
3982       esac
3983     done
3984   else
3985     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
3986   fi
3987   rm -f conftest*
3988   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
3989 fi
3990 fi
3991
3992 EXEEXT=""
3993 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
3994 echo "$ac_t""${ac_cv_exeext}" 1>&6
3995 ac_exeext=$EXEEXT
3996
3997 if test $host != $build; then
3998   ac_tool_prefix=${host_alias}-
3999 else
4000   ac_tool_prefix=
4001 fi
4002
4003
4004
4005
4006 # Check for command to grab the raw symbol name followed by C symbol from nm.
4007 echo $ac_n "checking command to parse $NM output""... $ac_c" 1>&6
4008 echo "configure:4009: checking command to parse $NM output" >&5
4009 if eval "test \"\${lt_cv_sys_global_symbol_pipe+set}\" = set"; then
4010   echo $ac_n "(cached) $ac_c" 1>&6
4011 else
4012   
4013 # These are sane defaults that work on at least a few old systems.
4014 # [They come from Ultrix.  What could be older than Ultrix?!! ;)]
4015
4016 # Character class describing NM global symbol codes.
4017 symcode='[BCDEGRST]'
4018
4019 # Regexp to match symbols that can be accessed directly from C.
4020 sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
4021
4022 # Transform the above into a raw symbol and a C symbol.
4023 symxfrm='\1 \2\3 \3'
4024
4025 # Transform an extracted symbol line into a proper C declaration
4026 lt_cv_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern char \1;/p'"
4027
4028 # Transform an extracted symbol line into symbol name and symbol address
4029 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'"
4030
4031 # Define system-specific variables.
4032 case $host_os in
4033 aix*)
4034   symcode='[BCDT]'
4035   ;;
4036 cygwin* | mingw* | pw32*)
4037   symcode='[ABCDGISTW]'
4038   ;;
4039 hpux*) # Its linker distinguishes data from code symbols
4040   lt_cv_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern char \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
4041   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'"
4042   ;;
4043 irix*)
4044   symcode='[BCDEGRST]'
4045   ;;
4046 solaris* | sysv5*)
4047   symcode='[BDT]'
4048   ;;
4049 sysv4)
4050   symcode='[DFNSTU]'
4051   ;;
4052 esac
4053
4054 # Handle CRLF in mingw tool chain
4055 opt_cr=
4056 case $host_os in
4057 mingw*)
4058   opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp
4059   ;;
4060 esac
4061
4062 # If we're using GNU nm, then use its standard symbol codes.
4063 if $NM -V 2>&1 | egrep '(GNU|with BFD)' > /dev/null; then
4064   symcode='[ABCDGISTW]'
4065 fi
4066
4067 # Try without a prefix undercore, then with it.
4068 for ac_symprfx in "" "_"; do
4069
4070   # Write the raw and C identifiers.
4071 lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[         ]\($symcode$symcode*\)[         ][      ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'"
4072
4073   # Check to see that the pipe works correctly.
4074   pipe_works=no
4075   rm -f conftest*
4076   cat > conftest.$ac_ext <<EOF
4077 #ifdef __cplusplus
4078 extern "C" {
4079 #endif
4080 char nm_test_var;
4081 void nm_test_func(){}
4082 #ifdef __cplusplus
4083 }
4084 #endif
4085 int main(){nm_test_var='a';nm_test_func();return(0);}
4086 EOF
4087
4088   if { (eval echo configure:4089: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4089     # Now try to grab the symbols.
4090     nlist=conftest.nm
4091     if { (eval echo configure:4092: \"$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
4092       # Try sorting and uniquifying the output.
4093       if sort "$nlist" | uniq > "$nlist"T; then
4094         mv -f "$nlist"T "$nlist"
4095       else
4096         rm -f "$nlist"T
4097       fi
4098
4099       # Make sure that we snagged all the symbols we need.
4100       if egrep ' nm_test_var$' "$nlist" >/dev/null; then
4101         if egrep ' nm_test_func$' "$nlist" >/dev/null; then
4102           cat <<EOF > conftest.$ac_ext
4103 #ifdef __cplusplus
4104 extern "C" {
4105 #endif
4106
4107 EOF
4108           # Now generate the symbol file.
4109           eval "$lt_cv_global_symbol_to_cdecl"' < "$nlist" >> conftest.$ac_ext'
4110
4111           cat <<EOF >> conftest.$ac_ext
4112 #if defined (__STDC__) && __STDC__
4113 # define lt_ptr void *
4114 #else
4115 # define lt_ptr char *
4116 # define const
4117 #endif
4118
4119 /* The mapping between symbol names and symbols. */
4120 const struct {
4121   const char *name;
4122   lt_ptr address;
4123 }
4124 lt_preloaded_symbols[] =
4125 {
4126 EOF
4127           sed "s/^$symcode$symcode* \(.*\) \(.*\)$/  {\"\2\", (lt_ptr) \&\2},/" < "$nlist" >> conftest.$ac_ext
4128           cat <<\EOF >> conftest.$ac_ext
4129   {0, (lt_ptr) 0}
4130 };
4131
4132 #ifdef __cplusplus
4133 }
4134 #endif
4135 EOF
4136           # Now try linking the two files.
4137           mv conftest.$ac_objext conftstm.$ac_objext
4138           save_LIBS="$LIBS"
4139           save_CFLAGS="$CFLAGS"
4140           LIBS="conftstm.$ac_objext"
4141           CFLAGS="$CFLAGS$no_builtin_flag"
4142           if { (eval echo configure:4143: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
4143             pipe_works=yes
4144           fi
4145           LIBS="$save_LIBS"
4146           CFLAGS="$save_CFLAGS"
4147         else
4148           echo "cannot find nm_test_func in $nlist" >&5
4149         fi
4150       else
4151         echo "cannot find nm_test_var in $nlist" >&5
4152       fi
4153     else
4154       echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
4155     fi
4156   else
4157     echo "$progname: failed program was:" >&5
4158     cat conftest.$ac_ext >&5
4159   fi
4160   rm -f conftest* conftst*
4161
4162   # Do not use the global_symbol_pipe unless it works.
4163   if test "$pipe_works" = yes; then
4164     break
4165   else
4166     lt_cv_sys_global_symbol_pipe=
4167   fi
4168 done
4169
4170 fi
4171
4172 global_symbol_pipe="$lt_cv_sys_global_symbol_pipe"
4173 if test -z "$lt_cv_sys_global_symbol_pipe"; then
4174   global_symbol_to_cdecl=
4175   global_symbol_to_c_name_address=
4176 else
4177   global_symbol_to_cdecl="$lt_cv_global_symbol_to_cdecl"
4178   global_symbol_to_c_name_address="$lt_cv_global_symbol_to_c_name_address"
4179 fi
4180 if test -z "$global_symbol_pipe$global_symbol_to_cdec$global_symbol_to_c_name_address";
4181 then
4182   echo "$ac_t""failed" 1>&6
4183 else
4184   echo "$ac_t""ok" 1>&6
4185 fi
4186
4187 for ac_hdr in dlfcn.h
4188 do
4189 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
4190 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
4191 echo "configure:4192: checking for $ac_hdr" >&5
4192 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
4193   echo $ac_n "(cached) $ac_c" 1>&6
4194 else
4195   cat > conftest.$ac_ext <<EOF
4196 #line 4197 "configure"
4197 #include "confdefs.h"
4198 #include <$ac_hdr>
4199 EOF
4200 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
4201 { (eval echo configure:4202: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
4202 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
4203 if test -z "$ac_err"; then
4204   rm -rf conftest*
4205   eval "ac_cv_header_$ac_safe=yes"
4206 else
4207   echo "$ac_err" >&5
4208   echo "configure: failed program was:" >&5
4209   cat conftest.$ac_ext >&5
4210   rm -rf conftest*
4211   eval "ac_cv_header_$ac_safe=no"
4212 fi
4213 rm -f conftest*
4214 fi
4215 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
4216   echo "$ac_t""yes" 1>&6
4217     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
4218   cat >> confdefs.h <<EOF
4219 #define $ac_tr_hdr 1
4220 EOF
4221  
4222 else
4223   echo "$ac_t""no" 1>&6
4224 fi
4225 done
4226
4227
4228
4229
4230
4231 # Only perform the check for file, if the check method requires it
4232 case $deplibs_check_method in
4233 file_magic*)
4234   if test "$file_magic_cmd" = '$MAGIC_CMD'; then
4235     echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
4236 echo "configure:4237: checking for ${ac_tool_prefix}file" >&5
4237 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4238   echo $ac_n "(cached) $ac_c" 1>&6
4239 else
4240   case $MAGIC_CMD in
4241   /*)
4242   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4243   ;;
4244   ?:/*)
4245   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4246   ;;
4247   *)
4248   ac_save_MAGIC_CMD="$MAGIC_CMD"
4249   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4250   ac_dummy="/usr/bin:$PATH"
4251   for ac_dir in $ac_dummy; do
4252     test -z "$ac_dir" && ac_dir=.
4253     if test -f $ac_dir/${ac_tool_prefix}file; then
4254       lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
4255       if test -n "$file_magic_test_file"; then
4256         case $deplibs_check_method in
4257         "file_magic "*)
4258           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4259           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4260           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4261             egrep "$file_magic_regex" > /dev/null; then
4262             :
4263           else
4264             cat <<EOF 1>&2
4265
4266 *** Warning: the command libtool uses to detect shared libraries,
4267 *** $file_magic_cmd, produces output that libtool cannot recognize.
4268 *** The result is that libtool may fail to recognize shared libraries
4269 *** as such.  This will affect the creation of libtool libraries that
4270 *** depend on shared libraries, but programs linked with such libtool
4271 *** libraries will work regardless of this problem.  Nevertheless, you
4272 *** may want to report the problem to your system manager and/or to
4273 *** bug-libtool@gnu.org
4274
4275 EOF
4276           fi ;;
4277         esac
4278       fi
4279       break
4280     fi
4281   done
4282   IFS="$ac_save_ifs"
4283   MAGIC_CMD="$ac_save_MAGIC_CMD"
4284   ;;
4285 esac
4286 fi
4287
4288 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4289 if test -n "$MAGIC_CMD"; then
4290   echo "$ac_t""$MAGIC_CMD" 1>&6
4291 else
4292   echo "$ac_t""no" 1>&6
4293 fi
4294
4295 if test -z "$lt_cv_path_MAGIC_CMD"; then
4296   if test -n "$ac_tool_prefix"; then
4297     echo $ac_n "checking for file""... $ac_c" 1>&6
4298 echo "configure:4299: checking for file" >&5
4299 if eval "test \"\${lt_cv_path_MAGIC_CMD+set}\" = set"; then
4300   echo $ac_n "(cached) $ac_c" 1>&6
4301 else
4302   case $MAGIC_CMD in
4303   /*)
4304   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
4305   ;;
4306   ?:/*)
4307   lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
4308   ;;
4309   *)
4310   ac_save_MAGIC_CMD="$MAGIC_CMD"
4311   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4312   ac_dummy="/usr/bin:$PATH"
4313   for ac_dir in $ac_dummy; do
4314     test -z "$ac_dir" && ac_dir=.
4315     if test -f $ac_dir/file; then
4316       lt_cv_path_MAGIC_CMD="$ac_dir/file"
4317       if test -n "$file_magic_test_file"; then
4318         case $deplibs_check_method in
4319         "file_magic "*)
4320           file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
4321           MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4322           if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
4323             egrep "$file_magic_regex" > /dev/null; then
4324             :
4325           else
4326             cat <<EOF 1>&2
4327
4328 *** Warning: the command libtool uses to detect shared libraries,
4329 *** $file_magic_cmd, produces output that libtool cannot recognize.
4330 *** The result is that libtool may fail to recognize shared libraries
4331 *** as such.  This will affect the creation of libtool libraries that
4332 *** depend on shared libraries, but programs linked with such libtool
4333 *** libraries will work regardless of this problem.  Nevertheless, you
4334 *** may want to report the problem to your system manager and/or to
4335 *** bug-libtool@gnu.org
4336
4337 EOF
4338           fi ;;
4339         esac
4340       fi
4341       break
4342     fi
4343   done
4344   IFS="$ac_save_ifs"
4345   MAGIC_CMD="$ac_save_MAGIC_CMD"
4346   ;;
4347 esac
4348 fi
4349
4350 MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
4351 if test -n "$MAGIC_CMD"; then
4352   echo "$ac_t""$MAGIC_CMD" 1>&6
4353 else
4354   echo "$ac_t""no" 1>&6
4355 fi
4356
4357   else
4358     MAGIC_CMD=:
4359   fi
4360 fi
4361
4362   fi
4363   ;;
4364 esac
4365
4366 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4367 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4368 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4369 echo "configure:4370: checking for $ac_word" >&5
4370 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4371   echo $ac_n "(cached) $ac_c" 1>&6
4372 else
4373   if test -n "$RANLIB"; then
4374   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4375 else
4376   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4377   ac_dummy="$PATH"
4378   for ac_dir in $ac_dummy; do
4379     test -z "$ac_dir" && ac_dir=.
4380     if test -f $ac_dir/$ac_word; then
4381       ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4382       break
4383     fi
4384   done
4385   IFS="$ac_save_ifs"
4386 fi
4387 fi
4388 RANLIB="$ac_cv_prog_RANLIB"
4389 if test -n "$RANLIB"; then
4390   echo "$ac_t""$RANLIB" 1>&6
4391 else
4392   echo "$ac_t""no" 1>&6
4393 fi
4394
4395
4396 if test -z "$ac_cv_prog_RANLIB"; then
4397 if test -n "$ac_tool_prefix"; then
4398   # Extract the first word of "ranlib", so it can be a program name with args.
4399 set dummy ranlib; ac_word=$2
4400 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4401 echo "configure:4402: checking for $ac_word" >&5
4402 if eval "test \"\${ac_cv_prog_RANLIB+set}\" = set"; then
4403   echo $ac_n "(cached) $ac_c" 1>&6
4404 else
4405   if test -n "$RANLIB"; then
4406   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4407 else
4408   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4409   ac_dummy="$PATH"
4410   for ac_dir in $ac_dummy; do
4411     test -z "$ac_dir" && ac_dir=.
4412     if test -f $ac_dir/$ac_word; then
4413       ac_cv_prog_RANLIB="ranlib"
4414       break
4415     fi
4416   done
4417   IFS="$ac_save_ifs"
4418   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
4419 fi
4420 fi
4421 RANLIB="$ac_cv_prog_RANLIB"
4422 if test -n "$RANLIB"; then
4423   echo "$ac_t""$RANLIB" 1>&6
4424 else
4425   echo "$ac_t""no" 1>&6
4426 fi
4427
4428 else
4429   RANLIB=":"
4430 fi
4431 fi
4432
4433 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
4434 set dummy ${ac_tool_prefix}strip; ac_word=$2
4435 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4436 echo "configure:4437: checking for $ac_word" >&5
4437 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4438   echo $ac_n "(cached) $ac_c" 1>&6
4439 else
4440   if test -n "$STRIP"; then
4441   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4442 else
4443   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4444   ac_dummy="$PATH"
4445   for ac_dir in $ac_dummy; do
4446     test -z "$ac_dir" && ac_dir=.
4447     if test -f $ac_dir/$ac_word; then
4448       ac_cv_prog_STRIP="${ac_tool_prefix}strip"
4449       break
4450     fi
4451   done
4452   IFS="$ac_save_ifs"
4453 fi
4454 fi
4455 STRIP="$ac_cv_prog_STRIP"
4456 if test -n "$STRIP"; then
4457   echo "$ac_t""$STRIP" 1>&6
4458 else
4459   echo "$ac_t""no" 1>&6
4460 fi
4461
4462
4463 if test -z "$ac_cv_prog_STRIP"; then
4464 if test -n "$ac_tool_prefix"; then
4465   # Extract the first word of "strip", so it can be a program name with args.
4466 set dummy strip; ac_word=$2
4467 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4468 echo "configure:4469: checking for $ac_word" >&5
4469 if eval "test \"\${ac_cv_prog_STRIP+set}\" = set"; then
4470   echo $ac_n "(cached) $ac_c" 1>&6
4471 else
4472   if test -n "$STRIP"; then
4473   ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
4474 else
4475   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4476   ac_dummy="$PATH"
4477   for ac_dir in $ac_dummy; do
4478     test -z "$ac_dir" && ac_dir=.
4479     if test -f $ac_dir/$ac_word; then
4480       ac_cv_prog_STRIP="strip"
4481       break
4482     fi
4483   done
4484   IFS="$ac_save_ifs"
4485   test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
4486 fi
4487 fi
4488 STRIP="$ac_cv_prog_STRIP"
4489 if test -n "$STRIP"; then
4490   echo "$ac_t""$STRIP" 1>&6
4491 else
4492   echo "$ac_t""no" 1>&6
4493 fi
4494
4495 else
4496   STRIP=":"
4497 fi
4498 fi
4499
4500
4501 enable_dlopen=yes
4502 enable_win32_dll=yes
4503
4504 # Check whether --enable-libtool-lock or --disable-libtool-lock was given.
4505 if test "${enable_libtool_lock+set}" = set; then
4506   enableval="$enable_libtool_lock"
4507   :
4508 fi
4509
4510 test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
4511
4512 # Some flags need to be propagated to the compiler or linker for good
4513 # libtool support.
4514 case $host in
4515 *-*-irix6*)
4516   # Find out which ABI we are using.
4517   echo '#line 4518 "configure"' > conftest.$ac_ext
4518   if { (eval echo configure:4519: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
4519     case `/usr/bin/file conftest.$ac_objext` in
4520     *32-bit*)
4521       LD="${LD-ld} -32"
4522       ;;
4523     *N32*)
4524       LD="${LD-ld} -n32"
4525       ;;
4526     *64-bit*)
4527       LD="${LD-ld} -64"
4528       ;;
4529     esac
4530   fi
4531   rm -rf conftest*
4532   ;;
4533
4534 *-*-sco3.2v5*)
4535   # On SCO OpenServer 5, we need -belf to get full-featured binaries.
4536   SAVE_CFLAGS="$CFLAGS"
4537   CFLAGS="$CFLAGS -belf"
4538   echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
4539 echo "configure:4540: checking whether the C compiler needs -belf" >&5
4540 if eval "test \"\${lt_cv_cc_needs_belf+set}\" = set"; then
4541   echo $ac_n "(cached) $ac_c" 1>&6
4542 else
4543   
4544      ac_ext=c
4545 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4546 ac_cpp='$CPP $CPPFLAGS'
4547 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4548 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4549 cross_compiling=$ac_cv_prog_cc_cross
4550
4551      cat > conftest.$ac_ext <<EOF
4552 #line 4553 "configure"
4553 #include "confdefs.h"
4554
4555 int main() {
4556
4557 ; return 0; }
4558 EOF
4559 if { (eval echo configure:4560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4560   rm -rf conftest*
4561   lt_cv_cc_needs_belf=yes
4562 else
4563   echo "configure: failed program was:" >&5
4564   cat conftest.$ac_ext >&5
4565   rm -rf conftest*
4566   lt_cv_cc_needs_belf=no
4567 fi
4568 rm -f conftest*
4569      ac_ext=c
4570 # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
4571 ac_cpp='$CPP $CPPFLAGS'
4572 ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
4573 ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
4574 cross_compiling=$ac_cv_prog_cc_cross
4575
4576 fi
4577
4578 echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
4579   if test x"$lt_cv_cc_needs_belf" != x"yes"; then
4580     # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
4581     CFLAGS="$SAVE_CFLAGS"
4582   fi
4583   ;;
4584
4585 *-*-cygwin* | *-*-mingw* | *-*-pw32*)
4586   # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
4587 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
4588 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4589 echo "configure:4590: checking for $ac_word" >&5
4590 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4591   echo $ac_n "(cached) $ac_c" 1>&6
4592 else
4593   if test -n "$DLLTOOL"; then
4594   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4595 else
4596   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4597   ac_dummy="$PATH"
4598   for ac_dir in $ac_dummy; do
4599     test -z "$ac_dir" && ac_dir=.
4600     if test -f $ac_dir/$ac_word; then
4601       ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
4602       break
4603     fi
4604   done
4605   IFS="$ac_save_ifs"
4606 fi
4607 fi
4608 DLLTOOL="$ac_cv_prog_DLLTOOL"
4609 if test -n "$DLLTOOL"; then
4610   echo "$ac_t""$DLLTOOL" 1>&6
4611 else
4612   echo "$ac_t""no" 1>&6
4613 fi
4614
4615
4616 if test -z "$ac_cv_prog_DLLTOOL"; then
4617 if test -n "$ac_tool_prefix"; then
4618   # Extract the first word of "dlltool", so it can be a program name with args.
4619 set dummy dlltool; ac_word=$2
4620 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4621 echo "configure:4622: checking for $ac_word" >&5
4622 if eval "test \"\${ac_cv_prog_DLLTOOL+set}\" = set"; then
4623   echo $ac_n "(cached) $ac_c" 1>&6
4624 else
4625   if test -n "$DLLTOOL"; then
4626   ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
4627 else
4628   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4629   ac_dummy="$PATH"
4630   for ac_dir in $ac_dummy; do
4631     test -z "$ac_dir" && ac_dir=.
4632     if test -f $ac_dir/$ac_word; then
4633       ac_cv_prog_DLLTOOL="dlltool"
4634       break
4635     fi
4636   done
4637   IFS="$ac_save_ifs"
4638   test -z "$ac_cv_prog_DLLTOOL" && ac_cv_prog_DLLTOOL="false"
4639 fi
4640 fi
4641 DLLTOOL="$ac_cv_prog_DLLTOOL"
4642 if test -n "$DLLTOOL"; then
4643   echo "$ac_t""$DLLTOOL" 1>&6
4644 else
4645   echo "$ac_t""no" 1>&6
4646 fi
4647
4648 else
4649   DLLTOOL="false"
4650 fi
4651 fi
4652
4653   # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
4654 set dummy ${ac_tool_prefix}as; ac_word=$2
4655 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4656 echo "configure:4657: checking for $ac_word" >&5
4657 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4658   echo $ac_n "(cached) $ac_c" 1>&6
4659 else
4660   if test -n "$AS"; then
4661   ac_cv_prog_AS="$AS" # Let the user override the test.
4662 else
4663   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4664   ac_dummy="$PATH"
4665   for ac_dir in $ac_dummy; do
4666     test -z "$ac_dir" && ac_dir=.
4667     if test -f $ac_dir/$ac_word; then
4668       ac_cv_prog_AS="${ac_tool_prefix}as"
4669       break
4670     fi
4671   done
4672   IFS="$ac_save_ifs"
4673 fi
4674 fi
4675 AS="$ac_cv_prog_AS"
4676 if test -n "$AS"; then
4677   echo "$ac_t""$AS" 1>&6
4678 else
4679   echo "$ac_t""no" 1>&6
4680 fi
4681
4682
4683 if test -z "$ac_cv_prog_AS"; then
4684 if test -n "$ac_tool_prefix"; then
4685   # Extract the first word of "as", so it can be a program name with args.
4686 set dummy as; ac_word=$2
4687 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4688 echo "configure:4689: checking for $ac_word" >&5
4689 if eval "test \"\${ac_cv_prog_AS+set}\" = set"; then
4690   echo $ac_n "(cached) $ac_c" 1>&6
4691 else
4692   if test -n "$AS"; then
4693   ac_cv_prog_AS="$AS" # Let the user override the test.
4694 else
4695   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4696   ac_dummy="$PATH"
4697   for ac_dir in $ac_dummy; do
4698     test -z "$ac_dir" && ac_dir=.
4699     if test -f $ac_dir/$ac_word; then
4700       ac_cv_prog_AS="as"
4701       break
4702     fi
4703   done
4704   IFS="$ac_save_ifs"
4705   test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="false"
4706 fi
4707 fi
4708 AS="$ac_cv_prog_AS"
4709 if test -n "$AS"; then
4710   echo "$ac_t""$AS" 1>&6
4711 else
4712   echo "$ac_t""no" 1>&6
4713 fi
4714
4715 else
4716   AS="false"
4717 fi
4718 fi
4719
4720   # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
4721 set dummy ${ac_tool_prefix}objdump; ac_word=$2
4722 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4723 echo "configure:4724: checking for $ac_word" >&5
4724 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4725   echo $ac_n "(cached) $ac_c" 1>&6
4726 else
4727   if test -n "$OBJDUMP"; then
4728   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4729 else
4730   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4731   ac_dummy="$PATH"
4732   for ac_dir in $ac_dummy; do
4733     test -z "$ac_dir" && ac_dir=.
4734     if test -f $ac_dir/$ac_word; then
4735       ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
4736       break
4737     fi
4738   done
4739   IFS="$ac_save_ifs"
4740 fi
4741 fi
4742 OBJDUMP="$ac_cv_prog_OBJDUMP"
4743 if test -n "$OBJDUMP"; then
4744   echo "$ac_t""$OBJDUMP" 1>&6
4745 else
4746   echo "$ac_t""no" 1>&6
4747 fi
4748
4749
4750 if test -z "$ac_cv_prog_OBJDUMP"; then
4751 if test -n "$ac_tool_prefix"; then
4752   # Extract the first word of "objdump", so it can be a program name with args.
4753 set dummy objdump; ac_word=$2
4754 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
4755 echo "configure:4756: checking for $ac_word" >&5
4756 if eval "test \"\${ac_cv_prog_OBJDUMP+set}\" = set"; then
4757   echo $ac_n "(cached) $ac_c" 1>&6
4758 else
4759   if test -n "$OBJDUMP"; then
4760   ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
4761 else
4762   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
4763   ac_dummy="$PATH"
4764   for ac_dir in $ac_dummy; do
4765     test -z "$ac_dir" && ac_dir=.
4766     if test -f $ac_dir/$ac_word; then
4767       ac_cv_prog_OBJDUMP="objdump"
4768       break
4769     fi
4770   done
4771   IFS="$ac_save_ifs"
4772   test -z "$ac_cv_prog_OBJDUMP" && ac_cv_prog_OBJDUMP="false"
4773 fi
4774 fi
4775 OBJDUMP="$ac_cv_prog_OBJDUMP"
4776 if test -n "$OBJDUMP"; then
4777   echo "$ac_t""$OBJDUMP" 1>&6
4778 else
4779   echo "$ac_t""no" 1>&6
4780 fi
4781
4782 else
4783   OBJDUMP="false"
4784 fi
4785 fi
4786
4787
4788   # recent cygwin and mingw systems supply a stub DllMain which the user
4789   # can override, but on older systems we have to supply one
4790   echo $ac_n "checking if libtool should supply DllMain function""... $ac_c" 1>&6
4791 echo "configure:4792: checking if libtool should supply DllMain function" >&5
4792 if eval "test \"\${lt_cv_need_dllmain+set}\" = set"; then
4793   echo $ac_n "(cached) $ac_c" 1>&6
4794 else
4795   cat > conftest.$ac_ext <<EOF
4796 #line 4797 "configure"
4797 #include "confdefs.h"
4798
4799 int main() {
4800 extern int __attribute__((__stdcall__)) DllMain(void*, int, void*);
4801       DllMain (0, 0, 0);
4802 ; return 0; }
4803 EOF
4804 if { (eval echo configure:4805: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4805   rm -rf conftest*
4806   lt_cv_need_dllmain=no
4807 else
4808   echo "configure: failed program was:" >&5
4809   cat conftest.$ac_ext >&5
4810   rm -rf conftest*
4811   lt_cv_need_dllmain=yes
4812 fi
4813 rm -f conftest*
4814 fi
4815
4816 echo "$ac_t""$lt_cv_need_dllmain" 1>&6
4817
4818   case $host/$CC in
4819   *-*-cygwin*/gcc*-mno-cygwin*|*-*-mingw*)
4820     # old mingw systems require "-dll" to link a DLL, while more recent ones
4821     # require "-mdll"
4822     SAVE_CFLAGS="$CFLAGS"
4823     CFLAGS="$CFLAGS -mdll"
4824     echo $ac_n "checking how to link DLLs""... $ac_c" 1>&6
4825 echo "configure:4826: checking how to link DLLs" >&5
4826 if eval "test \"\${lt_cv_cc_dll_switch+set}\" = set"; then
4827   echo $ac_n "(cached) $ac_c" 1>&6
4828 else
4829   cat > conftest.$ac_ext <<EOF
4830 #line 4831 "configure"
4831 #include "confdefs.h"
4832
4833 int main() {
4834
4835 ; return 0; }
4836 EOF
4837 if { (eval echo configure:4838: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
4838   rm -rf conftest*
4839   lt_cv_cc_dll_switch=-mdll
4840 else
4841   echo "configure: failed program was:" >&5
4842   cat conftest.$ac_ext >&5
4843   rm -rf conftest*
4844   lt_cv_cc_dll_switch=-dll
4845 fi
4846 rm -f conftest*
4847 fi
4848
4849 echo "$ac_t""$lt_cv_cc_dll_switch" 1>&6
4850     CFLAGS="$SAVE_CFLAGS" ;;
4851   *-*-cygwin* | *-*-pw32*)
4852     # cygwin systems need to pass --dll to the linker, and not link
4853     # crt.o which will require a WinMain@16 definition.
4854     lt_cv_cc_dll_switch="-Wl,--dll -nostartfiles" ;;
4855   esac
4856   ;;
4857   
4858 esac
4859
4860 # Sed substitution that helps us do robust quoting.  It backslashifies
4861 # metacharacters that are still active within double-quoted strings.
4862 Xsed='sed -e s/^X//'
4863 sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'
4864
4865 # Same as above, but do not quote variable references.
4866 double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'
4867
4868 # Sed substitution to delay expansion of an escaped shell variable in a
4869 # double_quote_subst'ed string.
4870 delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
4871
4872 # Constants:
4873 rm="rm -f"
4874
4875 # Global variables:
4876 default_ofile=libtool
4877 can_build_shared=yes
4878
4879 # All known linkers require a `.a' archive for static linking (except M$VC,
4880 # which needs '.lib').
4881 libext=a
4882 ltmain="$ac_aux_dir/ltmain.sh"
4883 ofile="$default_ofile"
4884 with_gnu_ld="$lt_cv_prog_gnu_ld"
4885 need_locks="$enable_libtool_lock"
4886
4887 old_CC="$CC"
4888 old_CFLAGS="$CFLAGS"
4889
4890 # Set sane defaults for various variables
4891 test -z "$AR" && AR=ar
4892 test -z "$AR_FLAGS" && AR_FLAGS=cru
4893 test -z "$AS" && AS=as
4894 test -z "$CC" && CC=cc
4895 test -z "$DLLTOOL" && DLLTOOL=dlltool
4896 test -z "$LD" && LD=ld
4897 test -z "$LN_S" && LN_S="ln -s"
4898 test -z "$MAGIC_CMD" && MAGIC_CMD=file
4899 test -z "$NM" && NM=nm
4900 test -z "$OBJDUMP" && OBJDUMP=objdump
4901 test -z "$RANLIB" && RANLIB=:
4902 test -z "$STRIP" && STRIP=:
4903 test -z "$ac_objext" && ac_objext=o
4904
4905 if test x"$host" != x"$build"; then
4906   ac_tool_prefix=${host_alias}-
4907 else
4908   ac_tool_prefix=
4909 fi
4910
4911 # Transform linux* to *-*-linux-gnu*, to support old configure scripts.
4912 case $host_os in
4913 linux-gnu*) ;;
4914 linux*) host=`echo $host | sed 's/^\(.*-.*-linux\)\(.*\)$/\1-gnu\2/'`
4915 esac
4916
4917 case $host_os in
4918 aix3*)
4919   # AIX sometimes has problems with the GCC collect2 program.  For some
4920   # reason, if we set the COLLECT_NAMES environment variable, the problems
4921   # vanish in a puff of smoke.
4922   if test "X${COLLECT_NAMES+set}" != Xset; then
4923     COLLECT_NAMES=
4924     export COLLECT_NAMES
4925   fi
4926   ;;
4927 esac
4928
4929 # Determine commands to create old-style static archives.
4930 old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs'
4931 old_postinstall_cmds='chmod 644 $oldlib'
4932 old_postuninstall_cmds=
4933
4934 if test -n "$RANLIB"; then
4935   case $host_os in
4936   openbsd*)
4937     old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds"
4938     ;;
4939   *)
4940     old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds"
4941     ;;
4942   esac
4943   old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
4944 fi
4945
4946 # Allow CC to be a program name with arguments.
4947 set dummy $CC
4948 compiler="$2"
4949
4950 echo $ac_n "checking for objdir""... $ac_c" 1>&6
4951 echo "configure:4952: checking for objdir" >&5
4952 rm -f .libs 2>/dev/null
4953 mkdir .libs 2>/dev/null
4954 if test -d .libs; then
4955   objdir=.libs
4956 else
4957   # MS-DOS does not allow filenames that begin with a dot.
4958   objdir=_libs
4959 fi
4960 rmdir .libs 2>/dev/null
4961 echo "$ac_t""$objdir" 1>&6
4962
4963
4964 # Check whether --with-pic or --without-pic was given.
4965 if test "${with_pic+set}" = set; then
4966   withval="$with_pic"
4967   pic_mode="$withval"
4968 else
4969   pic_mode=default
4970 fi
4971
4972 test -z "$pic_mode" && pic_mode=default
4973
4974 # We assume here that the value for lt_cv_prog_cc_pic will not be cached
4975 # in isolation, and that seeing it set (from the cache) indicates that
4976 # the associated values are set (in the cache) correctly too.
4977 echo $ac_n "checking for $compiler option to produce PIC""... $ac_c" 1>&6
4978 echo "configure:4979: checking for $compiler option to produce PIC" >&5
4979 if eval "test \"\${lt_cv_prog_cc_pic+set}\" = set"; then
4980   echo $ac_n "(cached) $ac_c" 1>&6
4981 else
4982    lt_cv_prog_cc_pic=
4983   lt_cv_prog_cc_shlib=
4984   lt_cv_prog_cc_wl=
4985   lt_cv_prog_cc_static=
4986   lt_cv_prog_cc_no_builtin=
4987   lt_cv_prog_cc_can_build_shared=$can_build_shared
4988
4989   if test "$GCC" = yes; then
4990     lt_cv_prog_cc_wl='-Wl,'
4991     lt_cv_prog_cc_static='-static'
4992
4993     case $host_os in
4994     aix*)
4995       # Below there is a dirty hack to force normal static linking with -ldl
4996       # The problem is because libdl dynamically linked with both libc and
4997       # libC (AIX C++ library), which obviously doesn't included in libraries
4998       # list by gcc. This cause undefined symbols with -static flags.
4999       # This hack allows C programs to be linked with "-static -ldl", but
5000       # not sure about C++ programs.
5001       lt_cv_prog_cc_static="$lt_cv_prog_cc_static ${lt_cv_prog_cc_wl}-lC"
5002       ;;
5003     amigaos*)
5004       # FIXME: we need at least 68020 code to build shared libraries, but
5005       # adding the `-m68020' flag to GCC prevents building anything better,
5006       # like `-m68040'.
5007       lt_cv_prog_cc_pic='-m68020 -resident32 -malways-restore-a4'
5008       ;;
5009     beos* | irix5* | irix6* | osf3* | osf4* | osf5*)
5010       # PIC is the default for these OSes.
5011       ;;
5012     darwin* | rhapsody*)
5013       # PIC is the default on this platform
5014       # Common symbols not allowed in MH_DYLIB files
5015       lt_cv_prog_cc_pic='-fno-common'
5016       ;;
5017     cygwin* | mingw* | pw32* | os2*)
5018       # This hack is so that the source file can tell whether it is being
5019       # built for inclusion in a dll (and should export symbols for example).
5020       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5021       ;;
5022     sysv4*MP*)
5023       if test -d /usr/nec; then
5024          lt_cv_prog_cc_pic=-Kconform_pic
5025       fi
5026       ;;
5027     *)
5028       lt_cv_prog_cc_pic='-fPIC'
5029       ;;
5030     esac
5031   else
5032     # PORTME Check for PIC flags for the system compiler.
5033     case $host_os in
5034     aix3* | aix4* | aix5*)
5035       lt_cv_prog_cc_wl='-Wl,'
5036       # All AIX code is PIC.
5037       if test "$host_cpu" = ia64; then
5038         # AIX 5 now supports IA64 processor
5039         lt_cv_prog_cc_static='-Bstatic'
5040       else
5041         lt_cv_prog_cc_static='-bnso -bI:/lib/syscalls.exp'
5042       fi
5043       ;;
5044
5045     hpux9* | hpux10* | hpux11*)
5046       # Is there a better lt_cv_prog_cc_static that works with the bundled CC?
5047       lt_cv_prog_cc_wl='-Wl,'
5048       lt_cv_prog_cc_static="${lt_cv_prog_cc_wl}-a ${lt_cv_prog_cc_wl}archive"
5049       lt_cv_prog_cc_pic='+Z'
5050       ;;
5051
5052     irix5* | irix6*)
5053       lt_cv_prog_cc_wl='-Wl,'
5054       lt_cv_prog_cc_static='-non_shared'
5055       # PIC (with -KPIC) is the default.
5056       ;;
5057
5058     cygwin* | mingw* | pw32* | os2*)
5059       # This hack is so that the source file can tell whether it is being
5060       # built for inclusion in a dll (and should export symbols for example).
5061       lt_cv_prog_cc_pic='-DDLL_EXPORT'
5062       ;;
5063
5064     newsos6)
5065       lt_cv_prog_cc_pic='-KPIC'
5066       lt_cv_prog_cc_static='-Bstatic'
5067       ;;
5068
5069     osf3* | osf4* | osf5*)
5070       # All OSF/1 code is PIC.
5071       lt_cv_prog_cc_wl='-Wl,'
5072       lt_cv_prog_cc_static='-non_shared'
5073       ;;
5074
5075     sco3.2v5*)
5076       lt_cv_prog_cc_pic='-Kpic'
5077       lt_cv_prog_cc_static='-dn'
5078       lt_cv_prog_cc_shlib='-belf'
5079       ;;
5080
5081     solaris*)
5082       lt_cv_prog_cc_pic='-KPIC'
5083       lt_cv_prog_cc_static='-Bstatic'
5084       lt_cv_prog_cc_wl='-Wl,'
5085       ;;
5086
5087     sunos4*)
5088       lt_cv_prog_cc_pic='-PIC'
5089       lt_cv_prog_cc_static='-Bstatic'
5090       lt_cv_prog_cc_wl='-Qoption ld '
5091       ;;
5092
5093     sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
5094       lt_cv_prog_cc_pic='-KPIC'
5095       lt_cv_prog_cc_static='-Bstatic'
5096       if test "x$host_vendor" = xsni; then
5097         lt_cv_prog_cc_wl='-LD'
5098       else
5099         lt_cv_prog_cc_wl='-Wl,'
5100       fi
5101       ;;
5102
5103     uts4*)
5104       lt_cv_prog_cc_pic='-pic'
5105       lt_cv_prog_cc_static='-Bstatic'
5106       ;;
5107
5108     sysv4*MP*)
5109       if test -d /usr/nec ;then
5110         lt_cv_prog_cc_pic='-Kconform_pic'
5111         lt_cv_prog_cc_static='-Bstatic'
5112       fi
5113       ;;
5114
5115     *)
5116       lt_cv_prog_cc_can_build_shared=no
5117       ;;
5118     esac
5119   fi
5120
5121 fi
5122
5123 if test -z "$lt_cv_prog_cc_pic"; then
5124   echo "$ac_t""none" 1>&6
5125 else
5126   echo "$ac_t""$lt_cv_prog_cc_pic" 1>&6
5127
5128   # Check to make sure the pic_flag actually works.
5129   echo $ac_n "checking if $compiler PIC flag $lt_cv_prog_cc_pic works""... $ac_c" 1>&6
5130 echo "configure:5131: checking if $compiler PIC flag $lt_cv_prog_cc_pic works" >&5
5131   if eval "test \"\${lt_cv_prog_cc_pic_works+set}\" = set"; then
5132   echo $ac_n "(cached) $ac_c" 1>&6
5133 else
5134       save_CFLAGS="$CFLAGS"
5135     CFLAGS="$CFLAGS $lt_cv_prog_cc_pic -DPIC"
5136     cat > conftest.$ac_ext <<EOF
5137 #line 5138 "configure"
5138 #include "confdefs.h"
5139
5140 int main() {
5141
5142 ; return 0; }
5143 EOF
5144 if { (eval echo configure:5145: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5145   rm -rf conftest*
5146         case $host_os in
5147       hpux9* | hpux10* | hpux11*)
5148         # On HP-UX, both CC and GCC only warn that PIC is supported... then
5149         # they create non-PIC objects.  So, if there were any warnings, we
5150         # assume that PIC is not supported.
5151         if test -s conftest.err; then
5152           lt_cv_prog_cc_pic_works=no
5153         else
5154           lt_cv_prog_cc_pic_works=yes
5155         fi
5156         ;;
5157       *)
5158         lt_cv_prog_cc_pic_works=yes
5159         ;;
5160       esac
5161     
5162 else
5163   echo "configure: failed program was:" >&5
5164   cat conftest.$ac_ext >&5
5165   rm -rf conftest*
5166         lt_cv_prog_cc_pic_works=no
5167     
5168 fi
5169 rm -f conftest*
5170     CFLAGS="$save_CFLAGS"
5171   
5172 fi
5173
5174
5175   if test "X$lt_cv_prog_cc_pic_works" = Xno; then
5176     lt_cv_prog_cc_pic=
5177     lt_cv_prog_cc_can_build_shared=no
5178   else
5179     lt_cv_prog_cc_pic=" $lt_cv_prog_cc_pic"
5180   fi
5181
5182   echo "$ac_t""$lt_cv_prog_cc_pic_works" 1>&6
5183 fi
5184
5185 # Check for any special shared library compilation flags.
5186 if test -n "$lt_cv_prog_cc_shlib"; then
5187   echo "configure: warning: \`$CC' requires \`$lt_cv_prog_cc_shlib' to build shared libraries" 1>&2
5188   if echo "$old_CC $old_CFLAGS " | egrep -e "[  ]$lt_cv_prog_cc_shlib[  ]" >/dev/null; then :
5189   else
5190    echo "configure: warning: add \`$lt_cv_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" 1>&2
5191     lt_cv_prog_cc_can_build_shared=no
5192   fi
5193 fi
5194
5195 echo $ac_n "checking if $compiler static flag $lt_cv_prog_cc_static works""... $ac_c" 1>&6
5196 echo "configure:5197: checking if $compiler static flag $lt_cv_prog_cc_static works" >&5
5197 if eval "test \"\${lt_cv_prog_cc_static_works+set}\" = set"; then
5198   echo $ac_n "(cached) $ac_c" 1>&6
5199 else
5200     lt_cv_prog_cc_static_works=no
5201   save_LDFLAGS="$LDFLAGS"
5202   LDFLAGS="$LDFLAGS $lt_cv_prog_cc_static"
5203   cat > conftest.$ac_ext <<EOF
5204 #line 5205 "configure"
5205 #include "confdefs.h"
5206
5207 int main() {
5208
5209 ; return 0; }
5210 EOF
5211 if { (eval echo configure:5212: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
5212   rm -rf conftest*
5213   lt_cv_prog_cc_static_works=yes
5214 else
5215   echo "configure: failed program was:" >&5
5216   cat conftest.$ac_ext >&5
5217 fi
5218 rm -f conftest*
5219   LDFLAGS="$save_LDFLAGS"
5220
5221 fi
5222
5223
5224 # Belt *and* braces to stop my trousers falling down:
5225 test "X$lt_cv_prog_cc_static_works" = Xno && lt_cv_prog_cc_static=
5226 echo "$ac_t""$lt_cv_prog_cc_static_works" 1>&6
5227
5228 pic_flag="$lt_cv_prog_cc_pic"
5229 special_shlib_compile_flags="$lt_cv_prog_cc_shlib"
5230 wl="$lt_cv_prog_cc_wl"
5231 link_static_flag="$lt_cv_prog_cc_static"
5232 no_builtin_flag="$lt_cv_prog_cc_no_builtin"
5233 can_build_shared="$lt_cv_prog_cc_can_build_shared"
5234
5235
5236 # Check to see if options -o and -c are simultaneously supported by compiler
5237 echo $ac_n "checking if $compiler supports -c -o file.$ac_objext""... $ac_c" 1>&6
5238 echo "configure:5239: checking if $compiler supports -c -o file.$ac_objext" >&5
5239 if eval "test \"\${lt_cv_compiler_c_o+set}\" = set"; then
5240   echo $ac_n "(cached) $ac_c" 1>&6
5241 else
5242   
5243 $rm -r conftest 2>/dev/null
5244 mkdir conftest
5245 cd conftest
5246 echo "int some_variable = 0;" > conftest.$ac_ext
5247 mkdir out
5248 # According to Tom Tromey, Ian Lance Taylor reported there are C compilers
5249 # that will create temporary files in the current directory regardless of
5250 # the output directory.  Thus, making CWD read-only will cause this test
5251 # to fail, enabling locking or at least warning the user not to do parallel
5252 # builds.
5253 chmod -w .
5254 save_CFLAGS="$CFLAGS"
5255 CFLAGS="$CFLAGS -o out/conftest2.$ac_objext"
5256 compiler_c_o=no
5257 if { (eval echo configure:5258: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>out/conftest.err; } && test -s out/conftest2.$ac_objext; then
5258   # The compiler can only warn and ignore the option if not recognized
5259   # So say no if there are warnings
5260   if test -s out/conftest.err; then
5261     lt_cv_compiler_c_o=no
5262   else
5263     lt_cv_compiler_c_o=yes
5264   fi
5265 else
5266   # Append any errors to the config.log.
5267   cat out/conftest.err 1>&5
5268   lt_cv_compiler_c_o=no
5269 fi
5270 CFLAGS="$save_CFLAGS"
5271 chmod u+w .
5272 $rm conftest* out/*
5273 rmdir out
5274 cd ..
5275 rmdir conftest
5276 $rm -r conftest 2>/dev/null
5277
5278 fi
5279
5280 compiler_c_o=$lt_cv_compiler_c_o
5281 echo "$ac_t""$compiler_c_o" 1>&6
5282
5283 if test x"$compiler_c_o" = x"yes"; then
5284   # Check to see if we can write to a .lo
5285   echo $ac_n "checking if $compiler supports -c -o file.lo""... $ac_c" 1>&6
5286 echo "configure:5287: checking if $compiler supports -c -o file.lo" >&5
5287   if eval "test \"\${lt_cv_compiler_o_lo+set}\" = set"; then
5288   echo $ac_n "(cached) $ac_c" 1>&6
5289 else
5290   
5291   lt_cv_compiler_o_lo=no
5292   save_CFLAGS="$CFLAGS"
5293   CFLAGS="$CFLAGS -c -o conftest.lo"
5294   save_objext="$ac_objext"
5295   ac_objext=lo
5296   cat > conftest.$ac_ext <<EOF
5297 #line 5298 "configure"
5298 #include "confdefs.h"
5299
5300 int main() {
5301 int some_variable = 0;
5302 ; return 0; }
5303 EOF
5304 if { (eval echo configure:5305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5305   rm -rf conftest*
5306       # The compiler can only warn and ignore the option if not recognized
5307     # So say no if there are warnings
5308     if test -s conftest.err; then
5309       lt_cv_compiler_o_lo=no
5310     else
5311       lt_cv_compiler_o_lo=yes
5312     fi
5313   
5314 else
5315   echo "configure: failed program was:" >&5
5316   cat conftest.$ac_ext >&5
5317 fi
5318 rm -f conftest*
5319   ac_objext="$save_objext"
5320   CFLAGS="$save_CFLAGS"
5321   
5322 fi
5323
5324   compiler_o_lo=$lt_cv_compiler_o_lo
5325   echo "$ac_t""$compiler_o_lo" 1>&6
5326 else
5327   compiler_o_lo=no
5328 fi
5329
5330 # Check to see if we can do hard links to lock some files if needed
5331 hard_links="nottested"
5332 if test "$compiler_c_o" = no && test "$need_locks" != no; then
5333   # do not overwrite the value of need_locks provided by the user
5334   echo $ac_n "checking if we can lock with hard links""... $ac_c" 1>&6
5335 echo "configure:5336: checking if we can lock with hard links" >&5
5336   hard_links=yes
5337   $rm conftest*
5338   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5339   touch conftest.a
5340   ln conftest.a conftest.b 2>&5 || hard_links=no
5341   ln conftest.a conftest.b 2>/dev/null && hard_links=no
5342   echo "$ac_t""$hard_links" 1>&6
5343   if test "$hard_links" = no; then
5344     echo "configure: warning: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" 1>&2
5345     need_locks=warn
5346   fi
5347 else
5348   need_locks=no
5349 fi
5350
5351 if test "$GCC" = yes; then
5352   # Check to see if options -fno-rtti -fno-exceptions are supported by compiler
5353   echo $ac_n "checking if $compiler supports -fno-rtti -fno-exceptions""... $ac_c" 1>&6
5354 echo "configure:5355: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
5355   echo "int some_variable = 0;" > conftest.$ac_ext
5356   save_CFLAGS="$CFLAGS"
5357   CFLAGS="$CFLAGS -fno-rtti -fno-exceptions -c conftest.$ac_ext"
5358   compiler_rtti_exceptions=no
5359   cat > conftest.$ac_ext <<EOF
5360 #line 5361 "configure"
5361 #include "confdefs.h"
5362
5363 int main() {
5364 int some_variable = 0;
5365 ; return 0; }
5366 EOF
5367 if { (eval echo configure:5368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
5368   rm -rf conftest*
5369       # The compiler can only warn and ignore the option if not recognized
5370     # So say no if there are warnings
5371     if test -s conftest.err; then
5372       compiler_rtti_exceptions=no
5373     else
5374       compiler_rtti_exceptions=yes
5375     fi
5376   
5377 else
5378   echo "configure: failed program was:" >&5
5379   cat conftest.$ac_ext >&5
5380 fi
5381 rm -f conftest*
5382   CFLAGS="$save_CFLAGS"
5383   echo "$ac_t""$compiler_rtti_exceptions" 1>&6
5384
5385   if test "$compiler_rtti_exceptions" = "yes"; then
5386     no_builtin_flag=' -fno-builtin -fno-rtti -fno-exceptions'
5387   else
5388     no_builtin_flag=' -fno-builtin'
5389   fi
5390 fi
5391
5392 # See if the linker supports building shared libraries.
5393 echo $ac_n "checking whether the linker ($LD) supports shared libraries""... $ac_c" 1>&6
5394 echo "configure:5395: checking whether the linker ($LD) supports shared libraries" >&5
5395
5396 allow_undefined_flag=
5397 no_undefined_flag=
5398 need_lib_prefix=unknown
5399 need_version=unknown
5400 # when you set need_version to no, make sure it does not cause -set_version
5401 # flags to be left without arguments
5402 archive_cmds=
5403 archive_expsym_cmds=
5404 old_archive_from_new_cmds=
5405 old_archive_from_expsyms_cmds=
5406 export_dynamic_flag_spec=
5407 whole_archive_flag_spec=
5408 thread_safe_flag_spec=
5409 hardcode_into_libs=no
5410 hardcode_libdir_flag_spec=
5411 hardcode_libdir_separator=
5412 hardcode_direct=no
5413 hardcode_minus_L=no
5414 hardcode_shlibpath_var=unsupported
5415 runpath_var=
5416 link_all_deplibs=unknown
5417 always_export_symbols=no
5418 export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | sed '\''s/.* //'\'' | sort | uniq > $export_symbols'
5419 # include_expsyms should be a list of space-separated symbols to be *always*
5420 # included in the symbol list
5421 include_expsyms=
5422 # exclude_expsyms can be an egrep regular expression of symbols to exclude
5423 # it will be wrapped by ` (' and `)$', so one must not match beginning or
5424 # end of line.  Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
5425 # as well as any symbol that contains `d'.
5426 exclude_expsyms="_GLOBAL_OFFSET_TABLE_"
5427 # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
5428 # platforms (ab)use it in PIC code, but their linkers get confused if
5429 # the symbol is explicitly referenced.  Since portable code cannot
5430 # rely on this symbol name, it's probably fine to never include it in
5431 # preloaded symbol tables.
5432 extract_expsyms_cmds=
5433
5434 case $host_os in
5435 cygwin* | mingw* | pw32*)
5436   # FIXME: the MSVC++ port hasn't been tested in a loooong time
5437   # When not using gcc, we currently assume that we are using
5438   # Microsoft Visual C++.
5439   if test "$GCC" != yes; then
5440     with_gnu_ld=no
5441   fi
5442   ;;
5443 openbsd*)
5444   with_gnu_ld=no
5445   ;;
5446 esac
5447
5448 ld_shlibs=yes
5449 if test "$with_gnu_ld" = yes; then
5450   # If archive_cmds runs LD, not CC, wlarc should be empty
5451   wlarc='${wl}'
5452
5453   # See if GNU ld supports shared libraries.
5454   case $host_os in
5455   aix3* | aix4* | aix5*)
5456     # On AIX, the GNU linker is very broken
5457     # Note:Check GNU linker on AIX 5-IA64 when/if it becomes available.
5458     ld_shlibs=no
5459     cat <<EOF 1>&2
5460
5461 *** Warning: the GNU linker, at least up to release 2.9.1, is reported
5462 *** to be unable to reliably create shared libraries on AIX.
5463 *** Therefore, libtool is disabling shared libraries support.  If you
5464 *** really care for shared libraries, you may want to modify your PATH
5465 *** so that a non-GNU linker is found, and then restart.
5466
5467 EOF
5468     ;;
5469
5470   amigaos*)
5471     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)'
5472     hardcode_libdir_flag_spec='-L$libdir'
5473     hardcode_minus_L=yes
5474
5475     # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
5476     # that the semantics of dynamic libraries on AmigaOS, at least up
5477     # to version 4, is to share data among multiple programs linked
5478     # with the same dynamic library.  Since this doesn't match the
5479     # behavior of shared libraries on other platforms, we can use
5480     # them.
5481     ld_shlibs=no
5482     ;;
5483
5484   beos*)
5485     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5486       allow_undefined_flag=unsupported
5487       # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
5488       # support --undefined.  This deserves some investigation.  FIXME
5489       archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5490     else
5491       ld_shlibs=no
5492     fi
5493     ;;
5494
5495   cygwin* | mingw* | pw32*)
5496     # hardcode_libdir_flag_spec is actually meaningless, as there is
5497     # no search path for DLLs.
5498     hardcode_libdir_flag_spec='-L$libdir'
5499     allow_undefined_flag=unsupported
5500     always_export_symbols=yes
5501
5502     extract_expsyms_cmds='test -f $output_objdir/impgen.c || \
5503       sed -e "/^# \/\* impgen\.c starts here \*\//,/^# \/\* impgen.c ends here \*\// { s/^# //;s/^# *$//; p; }" -e d < $''0 > $output_objdir/impgen.c~
5504       test -f $output_objdir/impgen.exe || (cd $output_objdir && \
5505       if test "x$HOST_CC" != "x" ; then $HOST_CC -o impgen impgen.c ; \
5506       else $CC -o impgen impgen.c ; fi)~
5507       $output_objdir/impgen $dir/$soroot > $output_objdir/$soname-def'
5508
5509     old_archive_from_expsyms_cmds='$DLLTOOL --as=$AS --dllname $soname --def $output_objdir/$soname-def --output-lib $output_objdir/$newlib'
5510
5511     # cygwin and mingw dlls have different entry points and sets of symbols
5512     # to exclude.
5513     # FIXME: what about values for MSVC?
5514     dll_entry=__cygwin_dll_entry@12
5515     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12~
5516     case $host_os in
5517     mingw*)
5518       # mingw values
5519       dll_entry=_DllMainCRTStartup@12
5520       dll_exclude_symbols=DllMain@12,DllMainCRTStartup@12,DllEntryPoint@12~
5521       ;;
5522     esac
5523
5524     # mingw and cygwin differ, and it's simplest to just exclude the union
5525     # of the two symbol sets.
5526     dll_exclude_symbols=DllMain@12,_cygwin_dll_entry@12,_cygwin_noncygwin_dll_entry@12,DllMainCRTStartup@12,DllEntryPoint@12
5527
5528     # recent cygwin and mingw systems supply a stub DllMain which the user
5529     # can override, but on older systems we have to supply one (in ltdll.c)
5530     if test "x$lt_cv_need_dllmain" = "xyes"; then
5531       ltdll_obj='$output_objdir/$soname-ltdll.'"$ac_objext "
5532       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~
5533         test -f $output_objdir/$soname-ltdll.$ac_objext || (cd $output_objdir && $CC -c $soname-ltdll.c)~'
5534     else
5535       ltdll_obj=
5536       ltdll_cmds=
5537     fi
5538
5539     # Extract the symbol export list from an `--export-all' def file,
5540     # then regenerate the def file from the symbol export list, so that
5541     # the compiled dll only exports the symbol export list.
5542     # Be careful not to strip the DATA tag left be newer dlltools.
5543     export_symbols_cmds="$ltdll_cmds"'
5544       $DLLTOOL --export-all --exclude-symbols '$dll_exclude_symbols' --output-def $output_objdir/$soname-def '$ltdll_obj'$libobjs $convenience~
5545       sed -e "1,/EXPORTS/d" -e "s/ @ [0-9]*//" -e "s/ *;.*$//" < $output_objdir/$soname-def > $export_symbols'
5546
5547     # If the export-symbols file already is a .def file (1st line
5548     # is EXPORTS), use it as is.
5549     # If DATA tags from a recent dlltool are present, honour them!
5550     archive_expsym_cmds='if test "x`head -1 $export_symbols`" = xEXPORTS; then
5551         cp $export_symbols $output_objdir/$soname-def;
5552       else
5553         echo EXPORTS > $output_objdir/$soname-def;
5554         _lt_hint=1;
5555         cat $export_symbols | while read symbol; do
5556          set dummy \$symbol;
5557          case \$# in
5558            2) echo "   \$2 @ \$_lt_hint ; " >> $output_objdir/$soname-def;;
5559            *) echo "     \$2 @ \$_lt_hint \$3 ; " >> $output_objdir/$soname-def;;
5560          esac;
5561          _lt_hint=`expr 1 + \$_lt_hint`;
5562         done;
5563       fi~
5564       '"$ltdll_cmds"'
5565       $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~
5566       $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~
5567       $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~
5568       $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~
5569       $CC $output_objdir/$soname-exp '$lt_cv_cc_dll_switch' -Wl,-e,'$dll_entry' -o $output_objdir/$soname '$ltdll_obj'$libobjs $deplibs $compiler_flags'
5570     ;;
5571
5572   netbsd*)
5573     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5574       archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
5575       wlarc=
5576     else
5577       archive_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5578       archive_expsym_cmds='$CC -shared -nodefaultlibs $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5579     fi
5580     ;;
5581
5582   solaris* | sysv5*)
5583     if $LD -v 2>&1 | egrep 'BFD 2\.8' > /dev/null; then
5584       ld_shlibs=no
5585       cat <<EOF 1>&2
5586
5587 *** Warning: The releases 2.8.* of the GNU linker cannot reliably
5588 *** create shared libraries on Solaris systems.  Therefore, libtool
5589 *** is disabling shared libraries support.  We urge you to upgrade GNU
5590 *** binutils to release 2.9.1 or newer.  Another option is to modify
5591 *** your PATH or compiler configuration so that the native linker is
5592 *** used, and then restart.
5593
5594 EOF
5595     elif $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5596       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5597       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5598     else
5599       ld_shlibs=no
5600     fi
5601     ;;
5602
5603   sunos4*)
5604     archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5605     wlarc=
5606     hardcode_direct=yes
5607     hardcode_shlibpath_var=no
5608     ;;
5609
5610   *)
5611     if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then
5612       archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
5613       archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
5614     else
5615       ld_shlibs=no
5616     fi
5617     ;;
5618   esac
5619
5620   if test "$ld_shlibs" = yes; then
5621     runpath_var=LD_RUN_PATH
5622     hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir'
5623     export_dynamic_flag_spec='${wl}--export-dynamic'
5624     case $host_os in
5625     cygwin* | mingw* | pw32*)
5626       # dlltool doesn't understand --whole-archive et. al.
5627       whole_archive_flag_spec=
5628       ;;
5629     *)
5630       # ancient GNU ld didn't support --whole-archive et. al.
5631       if $LD --help 2>&1 | egrep 'no-whole-archive' > /dev/null; then
5632         whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
5633       else
5634         whole_archive_flag_spec=
5635       fi
5636       ;;
5637     esac
5638   fi
5639 else
5640   # PORTME fill in a description of your system's linker (not GNU ld)
5641   case $host_os in
5642   aix3*)
5643     allow_undefined_flag=unsupported
5644     always_export_symbols=yes
5645     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'
5646     # Note: this linker hardcodes the directories in LIBPATH if there
5647     # are no directories specified by -L.
5648     hardcode_minus_L=yes
5649     if test "$GCC" = yes && test -z "$link_static_flag"; then
5650       # Neither direct hardcoding nor static linking is supported with a
5651       # broken collect2.
5652       hardcode_direct=unsupported
5653     fi
5654     ;;
5655
5656   aix4* | aix5*)
5657     if test "$host_cpu" = ia64; then
5658       # On IA64, the linker does run time linking by default, so we don't
5659       # have to do anything special.
5660       aix_use_runtimelinking=no
5661       exp_sym_flag='-Bexport'
5662       no_entry_flag=""
5663     else
5664       aix_use_runtimelinking=no
5665
5666       # Test if we are trying to use run time linking or normal
5667       # AIX style linking. If -brtl is somewhere in LDFLAGS, we
5668       # need to do runtime linking.
5669       case $host_os in aix4.[23]|aix4.[23].*|aix5*)
5670         for ld_flag in $LDFLAGS; do
5671           if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
5672             aix_use_runtimelinking=yes
5673             break
5674           fi
5675         done
5676       esac
5677
5678       exp_sym_flag='-bexport'
5679       no_entry_flag='-bnoentry'
5680     fi
5681
5682     # When large executables or shared objects are built, AIX ld can
5683     # have problems creating the table of contents.  If linking a library
5684     # or program results in "error TOC overflow" add -mminimal-toc to
5685     # CXXFLAGS/CFLAGS for g++/gcc.  In the cases where that is not
5686     # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
5687
5688     hardcode_direct=yes
5689     archive_cmds=''
5690     hardcode_libdir_separator=':'
5691     if test "$GCC" = yes; then
5692       case $host_os in aix4.[012]|aix4.[012].*)
5693         collect2name=`${CC} -print-prog-name=collect2`
5694         if test -f "$collect2name" && \
5695           strings "$collect2name" | grep resolve_lib_name >/dev/null
5696         then
5697           # We have reworked collect2
5698           hardcode_direct=yes
5699         else
5700           # We have old collect2
5701           hardcode_direct=unsupported
5702           # It fails to find uninstalled libraries when the uninstalled
5703           # path is not listed in the libpath.  Setting hardcode_minus_L
5704           # to unsupported forces relinking
5705           hardcode_minus_L=yes
5706           hardcode_libdir_flag_spec='-L$libdir'
5707           hardcode_libdir_separator=
5708         fi
5709       esac
5710
5711       shared_flag='-shared'
5712     else
5713       # not using gcc
5714       if test "$host_cpu" = ia64; then
5715         shared_flag='${wl}-G'
5716       else
5717         if test "$aix_use_runtimelinking" = yes; then
5718           shared_flag='${wl}-G'
5719         else
5720           shared_flag='${wl}-bM:SRE'
5721         fi
5722       fi
5723     fi
5724
5725     # It seems that -bexpall can do strange things, so it is better to
5726     # generate a list of symbols to export.
5727     always_export_symbols=yes
5728     if test "$aix_use_runtimelinking" = yes; then
5729       # Warning - without using the other runtime loading flags (-brtl),
5730       # -berok will link without error, but may produce a broken library.
5731       allow_undefined_flag='-berok'
5732       hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:/usr/lib:/lib'
5733       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"
5734     else
5735       if test "$host_cpu" = ia64; then
5736         hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
5737         allow_undefined_flag="-z nodefs"
5738         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"
5739       else
5740         hardcode_libdir_flag_spec='${wl}-bnolibpath ${wl}-blibpath:$libdir:/usr/lib:/lib'
5741         # Warning - without using the other run time loading flags,
5742         # -berok will link without error, but may produce a broken library.
5743         allow_undefined_flag='${wl}-berok'
5744         # This is a bit strange, but is similar to how AIX traditionally builds
5745         # it's shared libraries.
5746         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'
5747       fi
5748     fi
5749     ;;
5750
5751   amigaos*)
5752     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)'
5753     hardcode_libdir_flag_spec='-L$libdir'
5754     hardcode_minus_L=yes
5755     # see comment about different semantics on the GNU ld section
5756     ld_shlibs=no
5757     ;;
5758
5759   cygwin* | mingw* | pw32*)
5760     # When not using gcc, we currently assume that we are using
5761     # Microsoft Visual C++.
5762     # hardcode_libdir_flag_spec is actually meaningless, as there is
5763     # no search path for DLLs.
5764     hardcode_libdir_flag_spec=' '
5765     allow_undefined_flag=unsupported
5766     # Tell ltmain to make .lib files, not .a files.
5767     libext=lib
5768     # FIXME: Setting linknames here is a bad hack.
5769     archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | sed -e '\''s/ -lc$//'\''` -link -dll~linknames='
5770     # The linker will automatically build a .lib file if we build a DLL.
5771     old_archive_from_new_cmds='true'
5772     # FIXME: Should let the user specify the lib program.
5773     old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs'
5774     fix_srcfile_path='`cygpath -w "$srcfile"`'
5775     ;;
5776
5777   darwin* | rhapsody*)
5778     case "$host_os" in
5779     rhapsody* | darwin1.[012])
5780       allow_undefined_flag='-undefined suppress'
5781       ;;
5782     *) # Darwin 1.3 on
5783       allow_undefined_flag='-flat_namespace -undefined suppress'
5784       ;;
5785     esac
5786     # FIXME: Relying on posixy $() will cause problems for
5787     #        cross-compilation, but unfortunately the echo tests do not
5788     #        yet detect zsh echo's removal of \ escapes.
5789     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'
5790     # We need to add '_' to the symbols in $export_symbols first
5791     #archive_expsym_cmds="$archive_cmds"' && strip -s $export_symbols'
5792     hardcode_direct=yes
5793     hardcode_shlibpath_var=no
5794     whole_archive_flag_spec='-all_load $convenience'
5795     ;;
5796
5797   freebsd1*)
5798     ld_shlibs=no
5799     ;;
5800
5801   # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
5802   # support.  Future versions do this automatically, but an explicit c++rt0.o
5803   # does not break anything, and helps significantly (at the cost of a little
5804   # extra space).
5805   freebsd2.2*)
5806     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
5807     hardcode_libdir_flag_spec='-R$libdir'
5808     hardcode_direct=yes
5809     hardcode_shlibpath_var=no
5810     ;;
5811
5812   # Unfortunately, older versions of FreeBSD 2 do not have this feature.
5813   freebsd2*)
5814     archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5815     hardcode_direct=yes
5816     hardcode_minus_L=yes
5817     hardcode_shlibpath_var=no
5818     ;;
5819
5820   # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
5821   freebsd*)
5822     archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
5823     hardcode_libdir_flag_spec='-R$libdir'
5824     hardcode_direct=yes
5825     hardcode_shlibpath_var=no
5826     ;;
5827
5828   hpux9* | hpux10* | hpux11*)
5829     case $host_os in
5830     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' ;;
5831     *) archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;;
5832     esac
5833     hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
5834     hardcode_libdir_separator=:
5835     hardcode_direct=yes
5836     hardcode_minus_L=yes # Not in the search PATH, but as the default
5837                          # location of the library.
5838     export_dynamic_flag_spec='${wl}-E'
5839     ;;
5840
5841   irix5* | irix6*)
5842     if test "$GCC" = yes; then
5843       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'
5844     else
5845       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'
5846     fi
5847     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5848     hardcode_libdir_separator=:
5849     link_all_deplibs=yes
5850     ;;
5851
5852   netbsd*)
5853     if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
5854       archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'  # a.out
5855     else
5856       archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags'      # ELF
5857     fi
5858     hardcode_libdir_flag_spec='-R$libdir'
5859     hardcode_direct=yes
5860     hardcode_shlibpath_var=no
5861     ;;
5862
5863   newsos6)
5864     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5865     hardcode_direct=yes
5866     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5867     hardcode_libdir_separator=:
5868     hardcode_shlibpath_var=no
5869     ;;
5870
5871   openbsd*)
5872     hardcode_direct=yes
5873     hardcode_shlibpath_var=no
5874     if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
5875       archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5876       hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5877       export_dynamic_flag_spec='${wl}-E'
5878     else
5879       case "$host_os" in
5880       openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
5881         archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
5882         hardcode_libdir_flag_spec='-R$libdir'
5883         ;;
5884       *)
5885         archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $linker_flags'
5886         hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
5887         ;;
5888       esac
5889     fi
5890     ;;
5891
5892   os2*)
5893     hardcode_libdir_flag_spec='-L$libdir'
5894     hardcode_minus_L=yes
5895     allow_undefined_flag=unsupported
5896     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'
5897     old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
5898     ;;
5899
5900   osf3*)
5901     if test "$GCC" = yes; then
5902       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5903       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'
5904     else
5905       allow_undefined_flag=' -expect_unresolved \*'
5906       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'
5907     fi
5908     hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5909     hardcode_libdir_separator=:
5910     ;;
5911
5912   osf4* | osf5*)        # as osf3* with the addition of -msym flag
5913     if test "$GCC" = yes; then
5914       allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
5915       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'
5916       hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
5917     else
5918       allow_undefined_flag=' -expect_unresolved \*'
5919       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'
5920       archive_expsym_cmds='for i in `cat $export_symbols`; do printf "-exported_symbol " >> $lib.exp; echo "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~
5921       $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'
5922
5923       #Both c and cxx compiler support -rpath directly
5924       hardcode_libdir_flag_spec='-rpath $libdir'
5925     fi
5926     hardcode_libdir_separator=:
5927     ;;
5928
5929   sco3.2v5*)
5930     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
5931     hardcode_shlibpath_var=no
5932     runpath_var=LD_RUN_PATH
5933     hardcode_runpath_var=yes
5934     export_dynamic_flag_spec='${wl}-Bexport'
5935     ;;
5936
5937   solaris*)
5938     # gcc --version < 3.0 without binutils cannot create self contained
5939     # shared libraries reliably, requiring libgcc.a to resolve some of
5940     # the object symbols generated in some cases.  Libraries that use
5941     # assert need libgcc.a to resolve __eprintf, for example.  Linking
5942     # a copy of libgcc.a into every shared library to guarantee resolving
5943     # such symbols causes other problems:  According to Tim Van Holder
5944     # <tim.van.holder@pandora.be>, C++ libraries end up with a separate
5945     # (to the application) exception stack for one thing.
5946     no_undefined_flag=' -z defs'
5947     if test "$GCC" = yes; then
5948       case `$CC --version 2>/dev/null` in
5949       [12].*)
5950         cat <<EOF 1>&2
5951
5952 *** Warning: Releases of GCC earlier than version 3.0 cannot reliably
5953 *** create self contained shared libraries on Solaris systems, without
5954 *** introducing a dependency on libgcc.a.  Therefore, libtool is disabling
5955 *** -no-undefined support, which will at least allow you to build shared
5956 *** libraries.  However, you may find that when you link such libraries
5957 *** into an application without using GCC, you have to manually add
5958 *** \`gcc --print-libgcc-file-name\` to the link command.  We urge you to
5959 *** upgrade to a newer version of GCC.  Another option is to rebuild your
5960 *** current GCC to use the GNU linker from GNU binutils 2.9.1 or newer.
5961
5962 EOF
5963         no_undefined_flag=
5964         ;;
5965       esac
5966     fi
5967     # $CC -shared without GNU ld will not create a library from C++
5968     # object files and a static libstdc++, better avoid it by now
5969     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
5970     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
5971                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
5972     hardcode_libdir_flag_spec='-R$libdir'
5973     hardcode_shlibpath_var=no
5974     case $host_os in
5975     solaris2.[0-5] | solaris2.[0-5].*) ;;
5976     *) # Supported since Solaris 2.6 (maybe 2.5.1?)
5977       whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;;
5978     esac
5979     link_all_deplibs=yes
5980     ;;
5981
5982   sunos4*)
5983     if test "x$host_vendor" = xsequent; then
5984       # Use $CC to link under sequent, because it throws in some extra .o
5985       # files that make .init and .fini sections work.
5986       archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
5987     else
5988       archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
5989     fi
5990     hardcode_libdir_flag_spec='-L$libdir'
5991     hardcode_direct=yes
5992     hardcode_minus_L=yes
5993     hardcode_shlibpath_var=no
5994     ;;
5995
5996   sysv4)
5997     if test "x$host_vendor" = xsno; then
5998       archive_cmds='$LD -G -Bsymbolic -h $soname -o $lib $libobjs $deplibs $linker_flags'
5999       hardcode_direct=yes # is this really true???
6000     else
6001       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6002       hardcode_direct=no #Motorola manual says yes, but my tests say they lie
6003     fi
6004     runpath_var='LD_RUN_PATH'
6005     hardcode_shlibpath_var=no
6006     ;;
6007
6008   sysv4.3*)
6009     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6010     hardcode_shlibpath_var=no
6011     export_dynamic_flag_spec='-Bexport'
6012     ;;
6013
6014   sysv5*)
6015     no_undefined_flag=' -z text'
6016     # $CC -shared without GNU ld will not create a library from C++
6017     # object files and a static libstdc++, better avoid it by now
6018     archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
6019     archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~
6020                 $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp'
6021     hardcode_libdir_flag_spec=
6022     hardcode_shlibpath_var=no
6023     runpath_var='LD_RUN_PATH'
6024     ;;
6025
6026   uts4*)
6027     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6028     hardcode_libdir_flag_spec='-L$libdir'
6029     hardcode_shlibpath_var=no
6030     ;;
6031
6032   dgux*)
6033     archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6034     hardcode_libdir_flag_spec='-L$libdir'
6035     hardcode_shlibpath_var=no
6036     ;;
6037
6038   sysv4*MP*)
6039     if test -d /usr/nec; then
6040       archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
6041       hardcode_shlibpath_var=no
6042       runpath_var=LD_RUN_PATH
6043       hardcode_runpath_var=yes
6044       ld_shlibs=yes
6045     fi
6046     ;;
6047
6048   sysv4.2uw2*)
6049     archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
6050     hardcode_direct=yes
6051     hardcode_minus_L=no
6052     hardcode_shlibpath_var=no
6053     hardcode_runpath_var=yes
6054     runpath_var=LD_RUN_PATH
6055     ;;
6056
6057   sysv5uw7* | unixware7*)
6058     no_undefined_flag='${wl}-z ${wl}text'
6059     if test "$GCC" = yes; then
6060       archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6061     else
6062       archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
6063     fi
6064     runpath_var='LD_RUN_PATH'
6065     hardcode_shlibpath_var=no
6066     ;;
6067
6068   *)
6069     ld_shlibs=no
6070     ;;
6071   esac
6072 fi
6073 echo "$ac_t""$ld_shlibs" 1>&6
6074 test "$ld_shlibs" = no && can_build_shared=no
6075
6076 # Check hardcoding attributes.
6077 echo $ac_n "checking how to hardcode library paths into programs""... $ac_c" 1>&6
6078 echo "configure:6079: checking how to hardcode library paths into programs" >&5
6079 hardcode_action=
6080 if test -n "$hardcode_libdir_flag_spec" || \
6081    test -n "$runpath_var"; then
6082
6083   # We can hardcode non-existant directories.
6084   if test "$hardcode_direct" != no &&
6085      # If the only mechanism to avoid hardcoding is shlibpath_var, we
6086      # have to relink, otherwise we might link with an installed library
6087      # when we should be linking with a yet-to-be-installed one
6088      ## test "$hardcode_shlibpath_var" != no &&
6089      test "$hardcode_minus_L" != no; then
6090     # Linking always hardcodes the temporary library directory.
6091     hardcode_action=relink
6092   else
6093     # We can link without hardcoding, and we can hardcode nonexisting dirs.
6094     hardcode_action=immediate
6095   fi
6096 else
6097   # We cannot hardcode anything, or else we can only hardcode existing
6098   # directories.
6099   hardcode_action=unsupported
6100 fi
6101 echo "$ac_t""$hardcode_action" 1>&6
6102
6103 striplib=
6104 old_striplib=
6105 echo $ac_n "checking whether stripping libraries is possible""... $ac_c" 1>&6
6106 echo "configure:6107: checking whether stripping libraries is possible" >&5
6107 if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then
6108   test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
6109   test -z "$striplib" && striplib="$STRIP --strip-unneeded"
6110   echo "$ac_t""yes" 1>&6
6111 else
6112   echo "$ac_t""no" 1>&6
6113 fi
6114
6115 reload_cmds='$LD$reload_flag -o $output$reload_objs'
6116 test -z "$deplibs_check_method" && deplibs_check_method=unknown
6117
6118 # PORTME Fill in your ld.so characteristics
6119 echo $ac_n "checking dynamic linker characteristics""... $ac_c" 1>&6
6120 echo "configure:6121: checking dynamic linker characteristics" >&5
6121 library_names_spec=
6122 libname_spec='lib$name'
6123 soname_spec=
6124 postinstall_cmds=
6125 postuninstall_cmds=
6126 finish_cmds=
6127 finish_eval=
6128 shlibpath_var=
6129 shlibpath_overrides_runpath=unknown
6130 version_type=none
6131 dynamic_linker="$host_os ld.so"
6132 sys_lib_dlsearch_path_spec="/lib /usr/lib"
6133 sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
6134
6135 case $host_os in
6136 aix3*)
6137   version_type=linux
6138   library_names_spec='${libname}${release}.so$versuffix $libname.a'
6139   shlibpath_var=LIBPATH
6140
6141   # AIX has no versioning support, so we append a major version to the name.
6142   soname_spec='${libname}${release}.so$major'
6143   ;;
6144
6145 aix4* | aix5*)
6146   version_type=linux
6147   if test "$host_cpu" = ia64; then
6148     # AIX 5 supports IA64
6149     library_names_spec='${libname}${release}.so$major ${libname}${release}.so$versuffix $libname.so'
6150     shlibpath_var=LD_LIBRARY_PATH
6151   else
6152     # With GCC up to 2.95.x, collect2 would create an import file
6153     # for dependence libraries.  The import file would start with
6154     # the line `#! .'.  This would cause the generated library to
6155     # depend on `.', always an invalid library.  This was fixed in
6156     # development snapshots of GCC prior to 3.0.
6157     case $host_os in
6158       aix4 | aix4.[01] | aix4.[01].*)
6159         if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
6160              echo ' yes '
6161              echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then
6162           :
6163         else
6164           can_build_shared=no
6165         fi
6166         ;;
6167     esac
6168     # AIX (on Power*) has no versioning support, so currently we can
6169     # not hardcode correct soname into executable. Probably we can
6170     # add versioning support to collect2, so additional links can
6171     # be useful in future.
6172     if test "$aix_use_runtimelinking" = yes; then
6173       # If using run time linking (on AIX 4.2 or later) use lib<name>.so
6174       # instead of lib<name>.a to let people know that these are not
6175       # typical AIX shared libraries.
6176       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6177     else
6178       # We preserve .a as extension for shared libraries through AIX4.2
6179       # and later when we are not doing run time linking.
6180       library_names_spec='${libname}${release}.a $libname.a'
6181       soname_spec='${libname}${release}.so$major'
6182     fi
6183     shlibpath_var=LIBPATH
6184   fi
6185   ;;
6186
6187 amigaos*)
6188   library_names_spec='$libname.ixlibrary $libname.a'
6189   # Create ${libname}_ixlibrary.a entries in /sys/libs.
6190   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'
6191   ;;
6192
6193 beos*)
6194   library_names_spec='${libname}.so'
6195   dynamic_linker="$host_os ld.so"
6196   shlibpath_var=LIBRARY_PATH
6197   ;;
6198
6199 bsdi4*)
6200   version_type=linux
6201   need_version=no
6202   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6203   soname_spec='${libname}${release}.so$major'
6204   finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
6205   shlibpath_var=LD_LIBRARY_PATH
6206   sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
6207   sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
6208   export_dynamic_flag_spec=-rdynamic
6209   # the default ld.so.conf also contains /usr/contrib/lib and
6210   # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
6211   # libtool to hard-code these into programs
6212   ;;
6213
6214 cygwin* | mingw* | pw32*)
6215   version_type=windows
6216   need_version=no
6217   need_lib_prefix=no
6218   case $GCC,$host_os in
6219   yes,cygwin*)
6220     library_names_spec='$libname.dll.a'
6221     soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6222     postinstall_cmds='dlpath=`bash 2>&1 -c '\''. $dir/${file}i;echo \$dlname'\''`~
6223       dldir=$destdir/`dirname \$dlpath`~
6224       test -d \$dldir || mkdir -p \$dldir~
6225       $install_prog .libs/$dlname \$dldir/$dlname'
6226     postuninstall_cmds='dldll=`bash 2>&1 -c '\''. $file; echo \$dlname'\''`~
6227       dlpath=$dir/\$dldll~
6228        $rm \$dlpath'
6229     ;;
6230   yes,mingw*)
6231     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll'
6232     sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | sed -e "s/^libraries://" -e "s/;/ /g"`
6233     ;;
6234   yes,pw32*)
6235     library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | sed -e 's/./-/g'`${versuffix}.dll'
6236     ;;
6237   *)
6238     library_names_spec='${libname}`echo ${release} | sed -e 's/[.]/-/g'`${versuffix}.dll $libname.lib'
6239     ;;
6240   esac
6241   dynamic_linker='Win32 ld.exe'
6242   # FIXME: first we should search . and the directory the executable is in
6243   shlibpath_var=PATH
6244   ;;
6245
6246 darwin* | rhapsody*)
6247   dynamic_linker="$host_os dyld"
6248   version_type=darwin
6249   need_lib_prefix=no
6250   need_version=no
6251   # FIXME: Relying on posixy $() will cause problems for
6252   #        cross-compilation, but unfortunately the echo tests do not
6253   #        yet detect zsh echo's removal of \ escapes.
6254   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)'
6255   soname_spec='${libname}${release}${major}.$(test .$module = .yes && echo so || echo dylib)'
6256   shlibpath_overrides_runpath=yes
6257   shlibpath_var=DYLD_LIBRARY_PATH
6258   ;;
6259
6260 freebsd1*)
6261   dynamic_linker=no
6262   ;;
6263
6264 freebsd*)
6265   objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout`
6266   version_type=freebsd-$objformat
6267   case $version_type in
6268     freebsd-elf*)
6269       library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6270       need_version=no
6271       need_lib_prefix=no
6272       ;;
6273     freebsd-*)
6274       library_names_spec='${libname}${release}.so$versuffix $libname.so$versuffix'
6275       need_version=yes
6276       ;;
6277   esac
6278   shlibpath_var=LD_LIBRARY_PATH
6279   case $host_os in
6280   freebsd2*)
6281     shlibpath_overrides_runpath=yes
6282     ;;
6283   *)
6284     shlibpath_overrides_runpath=no
6285     hardcode_into_libs=yes
6286     ;;
6287   esac
6288   ;;
6289
6290 gnu*)
6291   version_type=linux
6292   need_lib_prefix=no
6293   need_version=no
6294   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so${major} ${libname}.so'
6295   soname_spec='${libname}${release}.so$major'
6296   shlibpath_var=LD_LIBRARY_PATH
6297   hardcode_into_libs=yes
6298   ;;
6299
6300 hpux9* | hpux10* | hpux11*)
6301   # Give a soname corresponding to the major version so that dld.sl refuses to
6302   # link against other versions.
6303   dynamic_linker="$host_os dld.sl"
6304   version_type=sunos
6305   need_lib_prefix=no
6306   need_version=no
6307   shlibpath_var=SHLIB_PATH
6308   shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
6309   library_names_spec='${libname}${release}.sl$versuffix ${libname}${release}.sl$major $libname.sl'
6310   soname_spec='${libname}${release}.sl$major'
6311   # HP-UX runs *really* slowly unless shared libraries are mode 555.
6312   postinstall_cmds='chmod 555 $lib'
6313   ;;
6314
6315 irix5* | irix6*)
6316   version_type=irix
6317   need_lib_prefix=no
6318   need_version=no
6319   soname_spec='${libname}${release}.so$major'
6320   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so $libname.so'
6321   case $host_os in
6322   irix5*)
6323     libsuff= shlibsuff=
6324     ;;
6325   *)
6326     case $LD in # libtool.m4 will add one of these switches to LD
6327     *-32|*"-32 ") libsuff= shlibsuff= libmagic=32-bit;;
6328     *-n32|*"-n32 ") libsuff=32 shlibsuff=N32 libmagic=N32;;
6329     *-64|*"-64 ") libsuff=64 shlibsuff=64 libmagic=64-bit;;
6330     *) libsuff= shlibsuff= libmagic=never-match;;
6331     esac
6332     ;;
6333   esac
6334   shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
6335   shlibpath_overrides_runpath=no
6336   sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
6337   sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
6338   ;;
6339
6340 # No shared lib support for Linux oldld, aout, or coff.
6341 linux-gnuoldld* | linux-gnuaout* | linux-gnucoff*)
6342   dynamic_linker=no
6343   ;;
6344
6345 # This must be Linux ELF.
6346 linux-gnu*)
6347   version_type=linux
6348   need_lib_prefix=no
6349   need_version=no
6350   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6351   soname_spec='${libname}${release}.so$major'
6352   finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
6353   shlibpath_var=LD_LIBRARY_PATH
6354   shlibpath_overrides_runpath=no
6355   # This implies no fast_install, which is unacceptable.
6356   # Some rework will be needed to allow for fast_install
6357   # before this can be enabled.
6358   hardcode_into_libs=yes
6359
6360   # We used to test for /lib/ld.so.1 and disable shared libraries on
6361   # powerpc, because MkLinux only supported shared libraries with the
6362   # GNU dynamic linker.  Since this was broken with cross compilers,
6363   # most powerpc-linux boxes support dynamic linking these days and
6364   # people can always --disable-shared, the test was removed, and we
6365   # assume the GNU/Linux dynamic linker is in use.
6366   dynamic_linker='GNU/Linux ld.so'
6367   ;;
6368
6369 netbsd*)
6370   version_type=sunos
6371   need_lib_prefix=no
6372   need_version=no
6373   if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
6374     library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6375     finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6376     dynamic_linker='NetBSD (a.out) ld.so'
6377   else
6378     library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major ${libname}${release}.so ${libname}.so'
6379     soname_spec='${libname}${release}.so$major'
6380     dynamic_linker='NetBSD ld.elf_so'
6381   fi
6382   shlibpath_var=LD_LIBRARY_PATH
6383   shlibpath_overrides_runpath=yes
6384   hardcode_into_libs=yes
6385   ;;
6386
6387 newsos6)
6388   version_type=linux
6389   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6390   shlibpath_var=LD_LIBRARY_PATH
6391   shlibpath_overrides_runpath=yes
6392   ;;
6393
6394 openbsd*)
6395   version_type=sunos
6396   need_lib_prefix=no
6397   need_version=no
6398   if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
6399     case "$host_os" in
6400     openbsd2.[89] | openbsd2.[89].*)
6401       shlibpath_overrides_runpath=no
6402       ;;
6403     *)
6404       shlibpath_overrides_runpath=yes
6405       ;;
6406     esac
6407   else
6408     shlibpath_overrides_runpath=yes
6409   fi
6410   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6411   finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
6412   shlibpath_var=LD_LIBRARY_PATH
6413   ;;
6414
6415 os2*)
6416   libname_spec='$name'
6417   need_lib_prefix=no
6418   library_names_spec='$libname.dll $libname.a'
6419   dynamic_linker='OS/2 ld.exe'
6420   shlibpath_var=LIBPATH
6421   ;;
6422
6423 osf3* | osf4* | osf5*)
6424   version_type=osf
6425   need_version=no
6426   soname_spec='${libname}${release}.so'
6427   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so $libname.so'
6428   shlibpath_var=LD_LIBRARY_PATH
6429   sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
6430   sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
6431   ;;
6432
6433 sco3.2v5*)
6434   version_type=osf
6435   soname_spec='${libname}${release}.so$major'
6436   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6437   shlibpath_var=LD_LIBRARY_PATH
6438   ;;
6439
6440 solaris*)
6441   version_type=linux
6442   need_lib_prefix=no
6443   need_version=no
6444   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6445   soname_spec='${libname}${release}.so$major'
6446   shlibpath_var=LD_LIBRARY_PATH
6447   shlibpath_overrides_runpath=yes
6448   hardcode_into_libs=yes
6449   # ldd complains unless libraries are executable
6450   postinstall_cmds='chmod +x $lib'
6451   ;;
6452
6453 sunos4*)
6454   version_type=sunos
6455   library_names_spec='${libname}${release}.so$versuffix ${libname}.so$versuffix'
6456   finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
6457   shlibpath_var=LD_LIBRARY_PATH
6458   shlibpath_overrides_runpath=yes
6459   if test "$with_gnu_ld" = yes; then
6460     need_lib_prefix=no
6461   fi
6462   need_version=yes
6463   ;;
6464
6465 sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
6466   version_type=linux
6467   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6468   soname_spec='${libname}${release}.so$major'
6469   shlibpath_var=LD_LIBRARY_PATH
6470   case $host_vendor in
6471     sni)
6472       shlibpath_overrides_runpath=no
6473       ;;
6474     motorola)
6475       need_lib_prefix=no
6476       need_version=no
6477       shlibpath_overrides_runpath=no
6478       sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
6479       ;;
6480   esac
6481   ;;
6482
6483 uts4*)
6484   version_type=linux
6485   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6486   soname_spec='${libname}${release}.so$major'
6487   shlibpath_var=LD_LIBRARY_PATH
6488   ;;
6489
6490 dgux*)
6491   version_type=linux
6492   need_lib_prefix=no
6493   need_version=no
6494   library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
6495   soname_spec='${libname}${release}.so$major'
6496   shlibpath_var=LD_LIBRARY_PATH
6497   ;;
6498
6499 sysv4*MP*)
6500   if test -d /usr/nec ;then
6501     version_type=linux
6502     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
6503     soname_spec='$libname.so.$major'
6504     shlibpath_var=LD_LIBRARY_PATH
6505   fi
6506   ;;
6507
6508 *)
6509   dynamic_linker=no
6510   ;;
6511 esac
6512 echo "$ac_t""$dynamic_linker" 1>&6
6513 test "$dynamic_linker" = no && can_build_shared=no
6514
6515 # Report the final consequences.
6516 echo $ac_n "checking if libtool supports shared libraries""... $ac_c" 1>&6
6517 echo "configure:6518: checking if libtool supports shared libraries" >&5
6518 echo "$ac_t""$can_build_shared" 1>&6
6519
6520 echo $ac_n "checking whether to build shared libraries""... $ac_c" 1>&6
6521 echo "configure:6522: checking whether to build shared libraries" >&5
6522 test "$can_build_shared" = "no" && enable_shared=no
6523
6524 # On AIX, shared libraries and static libraries use the same namespace, and
6525 # are all built from PIC.
6526 case "$host_os" in
6527 aix3*)
6528   test "$enable_shared" = yes && enable_static=no
6529   if test -n "$RANLIB"; then
6530     archive_cmds="$archive_cmds~\$RANLIB \$lib"
6531     postinstall_cmds='$RANLIB $lib'
6532   fi
6533   ;;
6534
6535 aix4*)
6536   if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
6537     test "$enable_shared" = yes && enable_static=no
6538   fi
6539   ;;
6540 esac
6541 echo "$ac_t""$enable_shared" 1>&6
6542
6543 echo $ac_n "checking whether to build static libraries""... $ac_c" 1>&6
6544 echo "configure:6545: checking whether to build static libraries" >&5
6545 # Make sure either enable_shared or enable_static is yes.
6546 test "$enable_shared" = yes || enable_static=yes
6547 echo "$ac_t""$enable_static" 1>&6
6548
6549 if test "$hardcode_action" = relink; then
6550   # Fast installation is not supported
6551   enable_fast_install=no
6552 elif test "$shlibpath_overrides_runpath" = yes ||
6553      test "$enable_shared" = no; then
6554   # Fast installation is not necessary
6555   enable_fast_install=needless
6556 fi
6557
6558 variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
6559 if test "$GCC" = yes; then
6560   variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
6561 fi
6562
6563 if test "x$enable_dlopen" != xyes; then
6564   enable_dlopen=unknown
6565   enable_dlopen_self=unknown
6566   enable_dlopen_self_static=unknown
6567 else
6568   lt_cv_dlopen=no
6569   lt_cv_dlopen_libs=
6570
6571   case $host_os in
6572   beos*)
6573     lt_cv_dlopen="load_add_on"
6574     lt_cv_dlopen_libs=
6575     lt_cv_dlopen_self=yes
6576     ;;
6577
6578   cygwin* | mingw* | pw32*)
6579     lt_cv_dlopen="LoadLibrary"
6580     lt_cv_dlopen_libs=
6581    ;;
6582
6583   *)
6584     echo $ac_n "checking for shl_load""... $ac_c" 1>&6
6585 echo "configure:6586: checking for shl_load" >&5
6586 if eval "test \"\${ac_cv_func_shl_load+set}\" = set"; then
6587   echo $ac_n "(cached) $ac_c" 1>&6
6588 else
6589   cat > conftest.$ac_ext <<EOF
6590 #line 6591 "configure"
6591 #include "confdefs.h"
6592 /* System header to define __stub macros and hopefully few prototypes,
6593     which can conflict with char shl_load(); below.  */
6594 #include <assert.h>
6595 /* Override any gcc2 internal prototype to avoid an error.  */
6596 /* We use char because int might match the return type of a gcc2
6597     builtin and then its argument prototype would still apply.  */
6598 char shl_load();
6599 char (*f)();
6600
6601 int main() {
6602
6603 /* The GNU C library defines this for functions which it implements
6604     to always fail with ENOSYS.  Some functions are actually named
6605     something starting with __ and the normal name is an alias.  */
6606 #if defined (__stub_shl_load) || defined (__stub___shl_load)
6607 choke me
6608 #else
6609 f = shl_load;
6610 #endif
6611
6612 ; return 0; }
6613 EOF
6614 if { (eval echo configure:6615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6615   rm -rf conftest*
6616   eval "ac_cv_func_shl_load=yes"
6617 else
6618   echo "configure: failed program was:" >&5
6619   cat conftest.$ac_ext >&5
6620   rm -rf conftest*
6621   eval "ac_cv_func_shl_load=no"
6622 fi
6623 rm -f conftest*
6624 fi
6625
6626 if eval "test \"`echo '$ac_cv_func_'shl_load`\" = yes"; then
6627   echo "$ac_t""yes" 1>&6
6628   lt_cv_dlopen="shl_load"
6629 else
6630   echo "$ac_t""no" 1>&6
6631 echo $ac_n "checking for shl_load in -ldld""... $ac_c" 1>&6
6632 echo "configure:6633: checking for shl_load in -ldld" >&5
6633 ac_lib_var=`echo dld'_'shl_load | sed 'y%./+-:%__p__%'`
6634 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6635   echo $ac_n "(cached) $ac_c" 1>&6
6636 else
6637   ac_save_LIBS="$LIBS"
6638 LIBS="-ldld  $LIBS"
6639 cat > conftest.$ac_ext <<EOF
6640 #line 6641 "configure"
6641 #include "confdefs.h"
6642 /* Override any gcc2 internal prototype to avoid an error.  */
6643 /* We use char because int might match the return type of a gcc2
6644     builtin and then its argument prototype would still apply.  */
6645 char shl_load();
6646
6647 int main() {
6648 shl_load()
6649 ; return 0; }
6650 EOF
6651 if { (eval echo configure:6652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6652   rm -rf conftest*
6653   eval "ac_cv_lib_$ac_lib_var=yes"
6654 else
6655   echo "configure: failed program was:" >&5
6656   cat conftest.$ac_ext >&5
6657   rm -rf conftest*
6658   eval "ac_cv_lib_$ac_lib_var=no"
6659 fi
6660 rm -f conftest*
6661 LIBS="$ac_save_LIBS"
6662
6663 fi
6664 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6665   echo "$ac_t""yes" 1>&6
6666   lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"
6667 else
6668   echo "$ac_t""no" 1>&6
6669 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
6670 echo "configure:6671: checking for dlopen" >&5
6671 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
6672   echo $ac_n "(cached) $ac_c" 1>&6
6673 else
6674   cat > conftest.$ac_ext <<EOF
6675 #line 6676 "configure"
6676 #include "confdefs.h"
6677 /* System header to define __stub macros and hopefully few prototypes,
6678     which can conflict with char dlopen(); below.  */
6679 #include <assert.h>
6680 /* Override any gcc2 internal prototype to avoid an error.  */
6681 /* We use char because int might match the return type of a gcc2
6682     builtin and then its argument prototype would still apply.  */
6683 char dlopen();
6684 char (*f)();
6685
6686 int main() {
6687
6688 /* The GNU C library defines this for functions which it implements
6689     to always fail with ENOSYS.  Some functions are actually named
6690     something starting with __ and the normal name is an alias.  */
6691 #if defined (__stub_dlopen) || defined (__stub___dlopen)
6692 choke me
6693 #else
6694 f = dlopen;
6695 #endif
6696
6697 ; return 0; }
6698 EOF
6699 if { (eval echo configure:6700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6700   rm -rf conftest*
6701   eval "ac_cv_func_dlopen=yes"
6702 else
6703   echo "configure: failed program was:" >&5
6704   cat conftest.$ac_ext >&5
6705   rm -rf conftest*
6706   eval "ac_cv_func_dlopen=no"
6707 fi
6708 rm -f conftest*
6709 fi
6710
6711 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
6712   echo "$ac_t""yes" 1>&6
6713   lt_cv_dlopen="dlopen"
6714 else
6715   echo "$ac_t""no" 1>&6
6716 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
6717 echo "configure:6718: checking for dlopen in -ldl" >&5
6718 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
6719 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6720   echo $ac_n "(cached) $ac_c" 1>&6
6721 else
6722   ac_save_LIBS="$LIBS"
6723 LIBS="-ldl  $LIBS"
6724 cat > conftest.$ac_ext <<EOF
6725 #line 6726 "configure"
6726 #include "confdefs.h"
6727 /* Override any gcc2 internal prototype to avoid an error.  */
6728 /* We use char because int might match the return type of a gcc2
6729     builtin and then its argument prototype would still apply.  */
6730 char dlopen();
6731
6732 int main() {
6733 dlopen()
6734 ; return 0; }
6735 EOF
6736 if { (eval echo configure:6737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6737   rm -rf conftest*
6738   eval "ac_cv_lib_$ac_lib_var=yes"
6739 else
6740   echo "configure: failed program was:" >&5
6741   cat conftest.$ac_ext >&5
6742   rm -rf conftest*
6743   eval "ac_cv_lib_$ac_lib_var=no"
6744 fi
6745 rm -f conftest*
6746 LIBS="$ac_save_LIBS"
6747
6748 fi
6749 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6750   echo "$ac_t""yes" 1>&6
6751   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
6752 else
6753   echo "$ac_t""no" 1>&6
6754 echo $ac_n "checking for dlopen in -lsvld""... $ac_c" 1>&6
6755 echo "configure:6756: checking for dlopen in -lsvld" >&5
6756 ac_lib_var=`echo svld'_'dlopen | sed 'y%./+-:%__p__%'`
6757 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6758   echo $ac_n "(cached) $ac_c" 1>&6
6759 else
6760   ac_save_LIBS="$LIBS"
6761 LIBS="-lsvld  $LIBS"
6762 cat > conftest.$ac_ext <<EOF
6763 #line 6764 "configure"
6764 #include "confdefs.h"
6765 /* Override any gcc2 internal prototype to avoid an error.  */
6766 /* We use char because int might match the return type of a gcc2
6767     builtin and then its argument prototype would still apply.  */
6768 char dlopen();
6769
6770 int main() {
6771 dlopen()
6772 ; return 0; }
6773 EOF
6774 if { (eval echo configure:6775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6775   rm -rf conftest*
6776   eval "ac_cv_lib_$ac_lib_var=yes"
6777 else
6778   echo "configure: failed program was:" >&5
6779   cat conftest.$ac_ext >&5
6780   rm -rf conftest*
6781   eval "ac_cv_lib_$ac_lib_var=no"
6782 fi
6783 rm -f conftest*
6784 LIBS="$ac_save_LIBS"
6785
6786 fi
6787 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6788   echo "$ac_t""yes" 1>&6
6789   lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
6790 else
6791   echo "$ac_t""no" 1>&6
6792 echo $ac_n "checking for dld_link in -ldld""... $ac_c" 1>&6
6793 echo "configure:6794: checking for dld_link in -ldld" >&5
6794 ac_lib_var=`echo dld'_'dld_link | sed 'y%./+-:%__p__%'`
6795 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
6796   echo $ac_n "(cached) $ac_c" 1>&6
6797 else
6798   ac_save_LIBS="$LIBS"
6799 LIBS="-ldld  $LIBS"
6800 cat > conftest.$ac_ext <<EOF
6801 #line 6802 "configure"
6802 #include "confdefs.h"
6803 /* Override any gcc2 internal prototype to avoid an error.  */
6804 /* We use char because int might match the return type of a gcc2
6805     builtin and then its argument prototype would still apply.  */
6806 char dld_link();
6807
6808 int main() {
6809 dld_link()
6810 ; return 0; }
6811 EOF
6812 if { (eval echo configure:6813: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
6813   rm -rf conftest*
6814   eval "ac_cv_lib_$ac_lib_var=yes"
6815 else
6816   echo "configure: failed program was:" >&5
6817   cat conftest.$ac_ext >&5
6818   rm -rf conftest*
6819   eval "ac_cv_lib_$ac_lib_var=no"
6820 fi
6821 rm -f conftest*
6822 LIBS="$ac_save_LIBS"
6823
6824 fi
6825 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
6826   echo "$ac_t""yes" 1>&6
6827   lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"
6828 else
6829   echo "$ac_t""no" 1>&6
6830 fi
6831
6832               
6833 fi
6834
6835             
6836 fi
6837
6838           
6839 fi
6840
6841         
6842 fi
6843
6844       
6845 fi
6846
6847     ;;
6848   esac
6849
6850   if test "x$lt_cv_dlopen" != xno; then
6851     enable_dlopen=yes
6852   else
6853     enable_dlopen=no
6854   fi
6855
6856   case $lt_cv_dlopen in
6857   dlopen)
6858     save_CPPFLAGS="$CPPFLAGS"
6859         test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
6860
6861     save_LDFLAGS="$LDFLAGS"
6862     eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
6863
6864     save_LIBS="$LIBS"
6865     LIBS="$lt_cv_dlopen_libs $LIBS"
6866
6867     echo $ac_n "checking whether a program can dlopen itself""... $ac_c" 1>&6
6868 echo "configure:6869: checking whether a program can dlopen itself" >&5
6869 if eval "test \"\${lt_cv_dlopen_self+set}\" = set"; then
6870   echo $ac_n "(cached) $ac_c" 1>&6
6871 else
6872           if test "$cross_compiling" = yes; then :
6873   lt_cv_dlopen_self=cross
6874 else
6875     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6876   lt_status=$lt_dlunknown
6877   cat > conftest.$ac_ext <<EOF
6878 #line 6879 "configure"
6879 #include "confdefs.h"
6880
6881 #if HAVE_DLFCN_H
6882 #include <dlfcn.h>
6883 #endif
6884
6885 #include <stdio.h>
6886
6887 #ifdef RTLD_GLOBAL
6888 #  define LT_DLGLOBAL           RTLD_GLOBAL
6889 #else
6890 #  ifdef DL_GLOBAL
6891 #    define LT_DLGLOBAL         DL_GLOBAL
6892 #  else
6893 #    define LT_DLGLOBAL         0
6894 #  endif
6895 #endif
6896
6897 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6898    find out it does not work in some platform. */
6899 #ifndef LT_DLLAZY_OR_NOW
6900 #  ifdef RTLD_LAZY
6901 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6902 #  else
6903 #    ifdef DL_LAZY
6904 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6905 #    else
6906 #      ifdef RTLD_NOW
6907 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
6908 #      else
6909 #        ifdef DL_NOW
6910 #          define LT_DLLAZY_OR_NOW      DL_NOW
6911 #        else
6912 #          define LT_DLLAZY_OR_NOW      0
6913 #        endif
6914 #      endif
6915 #    endif
6916 #  endif
6917 #endif
6918
6919 #ifdef __cplusplus
6920 extern "C" void exit (int);
6921 #endif
6922
6923 void fnord() { int i=42;}
6924 int main ()
6925 {
6926   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
6927   int status = $lt_dlunknown;
6928
6929   if (self)
6930     {
6931       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
6932       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
6933       /* dlclose (self); */
6934     }
6935
6936     exit (status);
6937 }
6938 EOF
6939   if { (eval echo configure:6940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
6940     (./conftest; exit; ) 2>/dev/null
6941     lt_status=$?
6942     case x$lt_status in
6943       x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
6944       x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
6945       x$lt_unknown|x*) lt_cv_dlopen_self=no ;;
6946     esac
6947   else :
6948     # compilation failed
6949     lt_cv_dlopen_self=no
6950   fi
6951 fi
6952 rm -fr conftest*
6953
6954     
6955 fi
6956
6957 echo "$ac_t""$lt_cv_dlopen_self" 1>&6
6958
6959     if test "x$lt_cv_dlopen_self" = xyes; then
6960       LDFLAGS="$LDFLAGS $link_static_flag"
6961       echo $ac_n "checking whether a statically linked program can dlopen itself""... $ac_c" 1>&6
6962 echo "configure:6963: checking whether a statically linked program can dlopen itself" >&5
6963 if eval "test \"\${lt_cv_dlopen_self_static+set}\" = set"; then
6964   echo $ac_n "(cached) $ac_c" 1>&6
6965 else
6966           if test "$cross_compiling" = yes; then :
6967   lt_cv_dlopen_self_static=cross
6968 else
6969     lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
6970   lt_status=$lt_dlunknown
6971   cat > conftest.$ac_ext <<EOF
6972 #line 6973 "configure"
6973 #include "confdefs.h"
6974
6975 #if HAVE_DLFCN_H
6976 #include <dlfcn.h>
6977 #endif
6978
6979 #include <stdio.h>
6980
6981 #ifdef RTLD_GLOBAL
6982 #  define LT_DLGLOBAL           RTLD_GLOBAL
6983 #else
6984 #  ifdef DL_GLOBAL
6985 #    define LT_DLGLOBAL         DL_GLOBAL
6986 #  else
6987 #    define LT_DLGLOBAL         0
6988 #  endif
6989 #endif
6990
6991 /* We may have to define LT_DLLAZY_OR_NOW in the command line if we
6992    find out it does not work in some platform. */
6993 #ifndef LT_DLLAZY_OR_NOW
6994 #  ifdef RTLD_LAZY
6995 #    define LT_DLLAZY_OR_NOW            RTLD_LAZY
6996 #  else
6997 #    ifdef DL_LAZY
6998 #      define LT_DLLAZY_OR_NOW          DL_LAZY
6999 #    else
7000 #      ifdef RTLD_NOW
7001 #        define LT_DLLAZY_OR_NOW        RTLD_NOW
7002 #      else
7003 #        ifdef DL_NOW
7004 #          define LT_DLLAZY_OR_NOW      DL_NOW
7005 #        else
7006 #          define LT_DLLAZY_OR_NOW      0
7007 #        endif
7008 #      endif
7009 #    endif
7010 #  endif
7011 #endif
7012
7013 #ifdef __cplusplus
7014 extern "C" void exit (int);
7015 #endif
7016
7017 void fnord() { int i=42;}
7018 int main ()
7019 {
7020   void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
7021   int status = $lt_dlunknown;
7022
7023   if (self)
7024     {
7025       if (dlsym (self,"fnord"))       status = $lt_dlno_uscore;
7026       else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
7027       /* dlclose (self); */
7028     }
7029
7030     exit (status);
7031 }
7032 EOF
7033   if { (eval echo configure:7034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} 2>/dev/null; then
7034     (./conftest; exit; ) 2>/dev/null
7035     lt_status=$?
7036     case x$lt_status in
7037       x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
7038       x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
7039       x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;;
7040     esac
7041   else :
7042     # compilation failed
7043     lt_cv_dlopen_self_static=no
7044   fi
7045 fi
7046 rm -fr conftest*
7047
7048       
7049 fi
7050
7051 echo "$ac_t""$lt_cv_dlopen_self_static" 1>&6
7052     fi
7053
7054     CPPFLAGS="$save_CPPFLAGS"
7055     LDFLAGS="$save_LDFLAGS"
7056     LIBS="$save_LIBS"
7057     ;;
7058   esac
7059
7060   case $lt_cv_dlopen_self in
7061   yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
7062   *) enable_dlopen_self=unknown ;;
7063   esac
7064
7065   case $lt_cv_dlopen_self_static in
7066   yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
7067   *) enable_dlopen_self_static=unknown ;;
7068   esac
7069 fi
7070
7071
7072 if test "$enable_shared" = yes && test "$GCC" = yes; then
7073   case $archive_cmds in
7074   *'~'*)
7075     # FIXME: we may have to deal with multi-command sequences.
7076     ;;
7077   '$CC '*)
7078     # Test whether the compiler implicitly links with -lc since on some
7079     # systems, -lgcc has to come before -lc. If gcc already passes -lc
7080     # to ld, don't add -lc before -lgcc.
7081     echo $ac_n "checking whether -lc should be explicitly linked in""... $ac_c" 1>&6
7082 echo "configure:7083: checking whether -lc should be explicitly linked in" >&5
7083     if eval "test \"\${lt_cv_archive_cmds_need_lc+set}\" = set"; then
7084   echo $ac_n "(cached) $ac_c" 1>&6
7085 else
7086   $rm conftest*
7087     echo 'static int dummy;' > conftest.$ac_ext
7088
7089     if { (eval echo configure:7090: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
7090       soname=conftest
7091       lib=conftest
7092       libobjs=conftest.$ac_objext
7093       deplibs=
7094       wl=$lt_cv_prog_cc_wl
7095       compiler_flags=-v
7096       linker_flags=-v
7097       verstring=
7098       output_objdir=.
7099       libname=conftest
7100       save_allow_undefined_flag=$allow_undefined_flag
7101       allow_undefined_flag=
7102       if { (eval echo configure:7103: \"$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; }
7103       then
7104         lt_cv_archive_cmds_need_lc=no
7105       else
7106         lt_cv_archive_cmds_need_lc=yes
7107       fi
7108       allow_undefined_flag=$save_allow_undefined_flag
7109     else
7110       cat conftest.err 1>&5
7111     fi
7112 fi
7113
7114     echo "$ac_t""$lt_cv_archive_cmds_need_lc" 1>&6
7115     ;;
7116   esac
7117 fi
7118 need_lc=${lt_cv_archive_cmds_need_lc-yes}
7119
7120 # The second clause should only fire when bootstrapping the
7121 # libtool distribution, otherwise you forgot to ship ltmain.sh
7122 # with your package, and you will get complaints that there are
7123 # no rules to generate ltmain.sh.
7124 if test -f "$ltmain"; then
7125   :
7126 else
7127   # If there is no Makefile yet, we rely on a make rule to execute
7128   # `config.status --recheck' to rerun these tests and create the
7129   # libtool script then.
7130   test -f Makefile && make "$ltmain"
7131 fi
7132
7133 if test -f "$ltmain"; then
7134   trap "$rm \"${ofile}T\"; exit 1" 1 2 15
7135   $rm -f "${ofile}T"
7136
7137   echo creating $ofile
7138
7139   # Now quote all the things that may contain metacharacters while being
7140   # careful not to overquote the AC_SUBSTed values.  We take copies of the
7141   # variables and quote the copies for generation of the libtool script.
7142   for var in echo old_CC old_CFLAGS \
7143     AR AR_FLAGS CC LD LN_S NM SHELL \
7144     reload_flag reload_cmds wl \
7145     pic_flag link_static_flag no_builtin_flag export_dynamic_flag_spec \
7146     thread_safe_flag_spec whole_archive_flag_spec libname_spec \
7147     library_names_spec soname_spec \
7148     RANLIB old_archive_cmds old_archive_from_new_cmds old_postinstall_cmds \
7149     old_postuninstall_cmds archive_cmds archive_expsym_cmds postinstall_cmds \
7150     postuninstall_cmds extract_expsyms_cmds old_archive_from_expsyms_cmds \
7151     old_striplib striplib file_magic_cmd export_symbols_cmds \
7152     deplibs_check_method allow_undefined_flag no_undefined_flag \
7153     finish_cmds finish_eval global_symbol_pipe global_symbol_to_cdecl \
7154     global_symbol_to_c_name_address \
7155     hardcode_libdir_flag_spec hardcode_libdir_separator  \
7156     sys_lib_search_path_spec sys_lib_dlsearch_path_spec \
7157     compiler_c_o compiler_o_lo need_locks exclude_expsyms include_expsyms; do
7158
7159     case $var in
7160     reload_cmds | old_archive_cmds | old_archive_from_new_cmds | \
7161     old_postinstall_cmds | old_postuninstall_cmds | \
7162     export_symbols_cmds | archive_cmds | archive_expsym_cmds | \
7163     extract_expsyms_cmds | old_archive_from_expsyms_cmds | \
7164     postinstall_cmds | postuninstall_cmds | \
7165     finish_cmds | sys_lib_search_path_spec | sys_lib_dlsearch_path_spec)
7166       # Double-quote double-evaled strings.
7167       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\""
7168       ;;
7169     *)
7170       eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\""
7171       ;;
7172     esac
7173   done
7174
7175   cat <<__EOF__ > "${ofile}T"
7176 #! $SHELL
7177
7178 # `$echo "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
7179 # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP)
7180 # NOTE: Changes made to this file will be lost: look at ltmain.sh.
7181 #
7182 # Copyright (C) 1996-2000 Free Software Foundation, Inc.
7183 # Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
7184 #
7185 # This program is free software; you can redistribute it and/or modify
7186 # it under the terms of the GNU General Public License as published by
7187 # the Free Software Foundation; either version 2 of the License, or
7188 # (at your option) any later version.
7189 #
7190 # This program is distributed in the hope that it will be useful, but
7191 # WITHOUT ANY WARRANTY; without even the implied warranty of
7192 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
7193 # General Public License for more details.
7194 #
7195 # You should have received a copy of the GNU General Public License
7196 # along with this program; if not, write to the Free Software
7197 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7198 #
7199 # As a special exception to the GNU General Public License, if you
7200 # distribute this file as part of a program that contains a
7201 # configuration script generated by Autoconf, you may include it under
7202 # the same distribution terms that you use for the rest of that program.
7203
7204 # Sed that helps us avoid accidentally triggering echo(1) options like -n.
7205 Xsed="sed -e s/^X//"
7206
7207 # The HP-UX ksh and POSIX shell print the target directory to stdout
7208 # if CDPATH is set.
7209 if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi
7210
7211 # ### BEGIN LIBTOOL CONFIG
7212
7213 # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
7214
7215 # Shell to use when invoking shell scripts.
7216 SHELL=$lt_SHELL
7217
7218 # Whether or not to build shared libraries.
7219 build_libtool_libs=$enable_shared
7220
7221 # Whether or not to build static libraries.
7222 build_old_libs=$enable_static
7223
7224 # Whether or not to add -lc for building shared libraries.
7225 build_libtool_need_lc=$need_lc
7226
7227 # Whether or not to optimize for fast installation.
7228 fast_install=$enable_fast_install
7229
7230 # The host system.
7231 host_alias=$host_alias
7232 host=$host
7233
7234 # An echo program that does not interpret backslashes.
7235 echo=$lt_echo
7236
7237 # The archiver.
7238 AR=$lt_AR
7239 AR_FLAGS=$lt_AR_FLAGS
7240
7241 # The default C compiler.
7242 CC=$lt_CC
7243
7244 # Is the compiler the GNU C compiler?
7245 with_gcc=$GCC
7246
7247 # The linker used to build libraries.
7248 LD=$lt_LD
7249
7250 # Whether we need hard or soft links.
7251 LN_S=$lt_LN_S
7252
7253 # A BSD-compatible nm program.
7254 NM=$lt_NM
7255
7256 # A symbol stripping program
7257 STRIP=$STRIP
7258
7259 # Used to examine libraries when file_magic_cmd begins "file"
7260 MAGIC_CMD=$MAGIC_CMD
7261
7262 # Used on cygwin: DLL creation program.
7263 DLLTOOL="$DLLTOOL"
7264
7265 # Used on cygwin: object dumper.
7266 OBJDUMP="$OBJDUMP"
7267
7268 # Used on cygwin: assembler.
7269 AS="$AS"
7270
7271 # The name of the directory that contains temporary libtool files.
7272 objdir=$objdir
7273
7274 # How to create reloadable object files.
7275 reload_flag=$lt_reload_flag
7276 reload_cmds=$lt_reload_cmds
7277
7278 # How to pass a linker flag through the compiler.
7279 wl=$lt_wl
7280
7281 # Object file suffix (normally "o").
7282 objext="$ac_objext"
7283
7284 # Old archive suffix (normally "a").
7285 libext="$libext"
7286
7287 # Executable file suffix (normally "").
7288 exeext="$exeext"
7289
7290 # Additional compiler flags for building library objects.
7291 pic_flag=$lt_pic_flag
7292 pic_mode=$pic_mode
7293
7294 # Does compiler simultaneously support -c and -o options?
7295 compiler_c_o=$lt_compiler_c_o
7296
7297 # Can we write directly to a .lo ?
7298 compiler_o_lo=$lt_compiler_o_lo
7299
7300 # Must we lock files when doing compilation ?
7301 need_locks=$lt_need_locks
7302
7303 # Do we need the lib prefix for modules?
7304 need_lib_prefix=$need_lib_prefix
7305
7306 # Do we need a version for libraries?
7307 need_version=$need_version
7308
7309 # Whether dlopen is supported.
7310 dlopen_support=$enable_dlopen
7311
7312 # Whether dlopen of programs is supported.
7313 dlopen_self=$enable_dlopen_self
7314
7315 # Whether dlopen of statically linked programs is supported.
7316 dlopen_self_static=$enable_dlopen_self_static
7317
7318 # Compiler flag to prevent dynamic linking.
7319 link_static_flag=$lt_link_static_flag
7320
7321 # Compiler flag to turn off builtin functions.
7322 no_builtin_flag=$lt_no_builtin_flag
7323
7324 # Compiler flag to allow reflexive dlopens.
7325 export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
7326
7327 # Compiler flag to generate shared objects directly from archives.
7328 whole_archive_flag_spec=$lt_whole_archive_flag_spec
7329
7330 # Compiler flag to generate thread-safe objects.
7331 thread_safe_flag_spec=$lt_thread_safe_flag_spec
7332
7333 # Library versioning type.
7334 version_type=$version_type
7335
7336 # Format of library name prefix.
7337 libname_spec=$lt_libname_spec
7338
7339 # List of archive names.  First name is the real one, the rest are links.
7340 # The last name is the one that the linker finds with -lNAME.
7341 library_names_spec=$lt_library_names_spec
7342
7343 # The coded name of the library, if different from the real name.
7344 soname_spec=$lt_soname_spec
7345
7346 # Commands used to build and install an old-style archive.
7347 RANLIB=$lt_RANLIB
7348 old_archive_cmds=$lt_old_archive_cmds
7349 old_postinstall_cmds=$lt_old_postinstall_cmds
7350 old_postuninstall_cmds=$lt_old_postuninstall_cmds
7351
7352 # Create an old-style archive from a shared archive.
7353 old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
7354
7355 # Create a temporary old-style archive to link instead of a shared archive.
7356 old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
7357
7358 # Commands used to build and install a shared archive.
7359 archive_cmds=$lt_archive_cmds
7360 archive_expsym_cmds=$lt_archive_expsym_cmds
7361 postinstall_cmds=$lt_postinstall_cmds
7362 postuninstall_cmds=$lt_postuninstall_cmds
7363
7364 # Commands to strip libraries.
7365 old_striplib=$lt_old_striplib
7366 striplib=$lt_striplib
7367
7368 # Method to check whether dependent libraries are shared objects.
7369 deplibs_check_method=$lt_deplibs_check_method
7370
7371 # Command to use when deplibs_check_method == file_magic.
7372 file_magic_cmd=$lt_file_magic_cmd
7373
7374 # Flag that allows shared libraries with undefined symbols to be built.
7375 allow_undefined_flag=$lt_allow_undefined_flag
7376
7377 # Flag that forces no undefined symbols.
7378 no_undefined_flag=$lt_no_undefined_flag
7379
7380 # Commands used to finish a libtool library installation in a directory.
7381 finish_cmds=$lt_finish_cmds
7382
7383 # Same as above, but a single script fragment to be evaled but not shown.
7384 finish_eval=$lt_finish_eval
7385
7386 # Take the output of nm and produce a listing of raw symbols and C names.
7387 global_symbol_pipe=$lt_global_symbol_pipe
7388
7389 # Transform the output of nm in a proper C declaration
7390 global_symbol_to_cdecl=$lt_global_symbol_to_cdecl
7391
7392 # Transform the output of nm in a C name address pair
7393 global_symbol_to_c_name_address=$lt_global_symbol_to_c_name_address
7394
7395 # This is the shared library runtime path variable.
7396 runpath_var=$runpath_var
7397
7398 # This is the shared library path variable.
7399 shlibpath_var=$shlibpath_var
7400
7401 # Is shlibpath searched before the hard-coded library search path?
7402 shlibpath_overrides_runpath=$shlibpath_overrides_runpath
7403
7404 # How to hardcode a shared library path into an executable.
7405 hardcode_action=$hardcode_action
7406
7407 # Whether we should hardcode library paths into libraries.
7408 hardcode_into_libs=$hardcode_into_libs
7409
7410 # Flag to hardcode \$libdir into a binary during linking.
7411 # This must work even if \$libdir does not exist.
7412 hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
7413
7414 # Whether we need a single -rpath flag with a separated argument.
7415 hardcode_libdir_separator=$lt_hardcode_libdir_separator
7416
7417 # Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
7418 # resulting binary.
7419 hardcode_direct=$hardcode_direct
7420
7421 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the
7422 # resulting binary.
7423 hardcode_minus_L=$hardcode_minus_L
7424
7425 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into
7426 # the resulting binary.
7427 hardcode_shlibpath_var=$hardcode_shlibpath_var
7428
7429 # Variables whose values should be saved in libtool wrapper scripts and
7430 # restored at relink time.
7431 variables_saved_for_relink="$variables_saved_for_relink"
7432
7433 # Whether libtool must link a program against all its dependency libraries.
7434 link_all_deplibs=$link_all_deplibs
7435
7436 # Compile-time system search path for libraries
7437 sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
7438
7439 # Run-time system search path for libraries
7440 sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
7441
7442 # Fix the shell variable \$srcfile for the compiler.
7443 fix_srcfile_path="$fix_srcfile_path"
7444
7445 # Set to yes if exported symbols are required.
7446 always_export_symbols=$always_export_symbols
7447
7448 # The commands to list exported symbols.
7449 export_symbols_cmds=$lt_export_symbols_cmds
7450
7451 # The commands to extract the exported symbol list from a shared archive.
7452 extract_expsyms_cmds=$lt_extract_expsyms_cmds
7453
7454 # Symbols that should not be listed in the preloaded symbols.
7455 exclude_expsyms=$lt_exclude_expsyms
7456
7457 # Symbols that must always be exported.
7458 include_expsyms=$lt_include_expsyms
7459
7460 # ### END LIBTOOL CONFIG
7461
7462 __EOF__
7463
7464   case $host_os in
7465   aix3*)
7466     cat <<\EOF >> "${ofile}T"
7467
7468 # AIX sometimes has problems with the GCC collect2 program.  For some
7469 # reason, if we set the COLLECT_NAMES environment variable, the problems
7470 # vanish in a puff of smoke.
7471 if test "X${COLLECT_NAMES+set}" != Xset; then
7472   COLLECT_NAMES=
7473   export COLLECT_NAMES
7474 fi
7475 EOF
7476     ;;
7477   esac
7478
7479   case $host_os in
7480   cygwin* | mingw* | pw32* | os2*)
7481     cat <<'EOF' >> "${ofile}T"
7482       # This is a source program that is used to create dlls on Windows
7483       # Don't remove nor modify the starting and closing comments
7484 # /* ltdll.c starts here */
7485 # #define WIN32_LEAN_AND_MEAN
7486 # #include <windows.h>
7487 # #undef WIN32_LEAN_AND_MEAN
7488 # #include <stdio.h>
7489 #
7490 # #ifndef __CYGWIN__
7491 # #  ifdef __CYGWIN32__
7492 # #    define __CYGWIN__ __CYGWIN32__
7493 # #  endif
7494 # #endif
7495 #
7496 # #ifdef __cplusplus
7497 # extern "C" {
7498 # #endif
7499 # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved);
7500 # #ifdef __cplusplus
7501 # }
7502 # #endif
7503 #
7504 # #ifdef __CYGWIN__
7505 # #include <cygwin/cygwin_dll.h>
7506 # DECLARE_CYGWIN_DLL( DllMain );
7507 # #endif
7508 # HINSTANCE __hDllInstance_base;
7509 #
7510 # BOOL APIENTRY
7511 # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
7512 # {
7513 #   __hDllInstance_base = hInst;
7514 #   return TRUE;
7515 # }
7516 # /* ltdll.c ends here */
7517         # This is a source program that is used to create import libraries
7518         # on Windows for dlls which lack them. Don't remove nor modify the
7519         # starting and closing comments
7520 # /* impgen.c starts here */
7521 # /*   Copyright (C) 1999-2000 Free Software Foundation, Inc.
7522 #
7523 #  This file is part of GNU libtool.
7524 #
7525 #  This program is free software; you can redistribute it and/or modify
7526 #  it under the terms of the GNU General Public License as published by
7527 #  the Free Software Foundation; either version 2 of the License, or
7528 #  (at your option) any later version.
7529 #
7530 #  This program is distributed in the hope that it will be useful,
7531 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
7532 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
7533 #  GNU General Public License for more details.
7534 #
7535 #  You should have received a copy of the GNU General Public License
7536 #  along with this program; if not, write to the Free Software
7537 #  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
7538 #  */
7539 #
7540 # #include <stdio.h>            /* for printf() */
7541 # #include <unistd.h>           /* for open(), lseek(), read() */
7542 # #include <fcntl.h>            /* for O_RDONLY, O_BINARY */
7543 # #include <string.h>           /* for strdup() */
7544 #
7545 # /* O_BINARY isn't required (or even defined sometimes) under Unix */
7546 # #ifndef O_BINARY
7547 # #define O_BINARY 0
7548 # #endif
7549 #
7550 # static unsigned int
7551 # pe_get16 (fd, offset)
7552 #      int fd;
7553 #      int offset;
7554 # {
7555 #   unsigned char b[2];
7556 #   lseek (fd, offset, SEEK_SET);
7557 #   read (fd, b, 2);
7558 #   return b[0] + (b[1]<<8);
7559 # }
7560 #
7561 # static unsigned int
7562 # pe_get32 (fd, offset)
7563 #     int fd;
7564 #     int offset;
7565 # {
7566 #   unsigned char b[4];
7567 #   lseek (fd, offset, SEEK_SET);
7568 #   read (fd, b, 4);
7569 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7570 # }
7571 #
7572 # static unsigned int
7573 # pe_as32 (ptr)
7574 #      void *ptr;
7575 # {
7576 #   unsigned char *b = ptr;
7577 #   return b[0] + (b[1]<<8) + (b[2]<<16) + (b[3]<<24);
7578 # }
7579 #
7580 # int
7581 # main (argc, argv)
7582 #     int argc;
7583 #     char *argv[];
7584 # {
7585 #     int dll;
7586 #     unsigned long pe_header_offset, opthdr_ofs, num_entries, i;
7587 #     unsigned long export_rva, export_size, nsections, secptr, expptr;
7588 #     unsigned long name_rvas, nexp;
7589 #     unsigned char *expdata, *erva;
7590 #     char *filename, *dll_name;
7591 #
7592 #     filename = argv[1];
7593 #
7594 #     dll = open(filename, O_RDONLY|O_BINARY);
7595 #     if (dll < 1)
7596 #       return 1;
7597 #
7598 #     dll_name = filename;
7599 #
7600 #     for (i=0; filename[i]; i++)
7601 #       if (filename[i] == '/' || filename[i] == '\\'  || filename[i] == ':')
7602 #           dll_name = filename + i +1;
7603 #
7604 #     pe_header_offset = pe_get32 (dll, 0x3c);
7605 #     opthdr_ofs = pe_header_offset + 4 + 20;
7606 #     num_entries = pe_get32 (dll, opthdr_ofs + 92);
7607 #
7608 #     if (num_entries < 1) /* no exports */
7609 #       return 1;
7610 #
7611 #     export_rva = pe_get32 (dll, opthdr_ofs + 96);
7612 #     export_size = pe_get32 (dll, opthdr_ofs + 100);
7613 #     nsections = pe_get16 (dll, pe_header_offset + 4 +2);
7614 #     secptr = (pe_header_offset + 4 + 20 +
7615 #             pe_get16 (dll, pe_header_offset + 4 + 16));
7616 #
7617 #     expptr = 0;
7618 #     for (i = 0; i < nsections; i++)
7619 #     {
7620 #       char sname[8];
7621 #       unsigned long secptr1 = secptr + 40 * i;
7622 #       unsigned long vaddr = pe_get32 (dll, secptr1 + 12);
7623 #       unsigned long vsize = pe_get32 (dll, secptr1 + 16);
7624 #       unsigned long fptr = pe_get32 (dll, secptr1 + 20);
7625 #       lseek(dll, secptr1, SEEK_SET);
7626 #       read(dll, sname, 8);
7627 #       if (vaddr <= export_rva && vaddr+vsize > export_rva)
7628 #       {
7629 #           expptr = fptr + (export_rva - vaddr);
7630 #           if (export_rva + export_size > vaddr + vsize)
7631 #               export_size = vsize - (export_rva - vaddr);
7632 #           break;
7633 #       }
7634 #     }
7635 #
7636 #     expdata = (unsigned char*)malloc(export_size);
7637 #     lseek (dll, expptr, SEEK_SET);
7638 #     read (dll, expdata, export_size);
7639 #     erva = expdata - export_rva;
7640 #
7641 #     nexp = pe_as32 (expdata+24);
7642 #     name_rvas = pe_as32 (expdata+32);
7643 #
7644 #     printf ("EXPORTS\n");
7645 #     for (i = 0; i<nexp; i++)
7646 #     {
7647 #       unsigned long name_rva = pe_as32 (erva+name_rvas+i*4);
7648 #       printf ("\t%s @ %ld ;\n", erva+name_rva, 1+ i);
7649 #     }
7650 #
7651 #     return 0;
7652 # }
7653 # /* impgen.c ends here */
7654
7655 EOF
7656     ;;
7657   esac
7658
7659   # We use sed instead of cat because bash on DJGPP gets confused if
7660   # if finds mixed CR/LF and LF-only lines.  Since sed operates in
7661   # text mode, it properly converts lines to CR/LF.  This bash problem
7662   # is reportedly fixed, but why not run on old versions too?
7663   sed '$q' "$ltmain" >> "${ofile}T" || (rm -f "${ofile}T"; exit 1)
7664
7665   mv -f "${ofile}T" "$ofile" || \
7666     (rm -f "$ofile" && cp "${ofile}T" "$ofile" && rm -f "${ofile}T")
7667   chmod +x "$ofile"
7668 fi
7669
7670
7671
7672
7673
7674 # This can be used to rebuild libtool when needed
7675 LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh"
7676
7677 # Always use our own libtool.
7678 LIBTOOL='$(SHELL) $(top_builddir)/libtool'
7679
7680 # Prevent multiple expansion
7681
7682
7683
7684 for ac_prog in mawk gawk nawk awk
7685 do
7686 # Extract the first word of "$ac_prog", so it can be a program name with args.
7687 set dummy $ac_prog; ac_word=$2
7688 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7689 echo "configure:7690: checking for $ac_word" >&5
7690 if eval "test \"\${ac_cv_prog_AWK+set}\" = set"; then
7691   echo $ac_n "(cached) $ac_c" 1>&6
7692 else
7693   if test -n "$AWK"; then
7694   ac_cv_prog_AWK="$AWK" # Let the user override the test.
7695 else
7696   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7697   ac_dummy="$PATH"
7698   for ac_dir in $ac_dummy; do
7699     test -z "$ac_dir" && ac_dir=.
7700     if test -f $ac_dir/$ac_word; then
7701       ac_cv_prog_AWK="$ac_prog"
7702       break
7703     fi
7704   done
7705   IFS="$ac_save_ifs"
7706 fi
7707 fi
7708 AWK="$ac_cv_prog_AWK"
7709 if test -n "$AWK"; then
7710   echo "$ac_t""$AWK" 1>&6
7711 else
7712   echo "$ac_t""no" 1>&6
7713 fi
7714
7715 test -n "$AWK" && break
7716 done
7717
7718 # test for ln hardlink support
7719 echo $ac_n "checking whether ln works""... $ac_c" 1>&6
7720 echo "configure:7721: checking whether ln works" >&5
7721 if eval "test \"\${ol_cv_prog_LN_H+set}\" = set"; then
7722   echo $ac_n "(cached) $ac_c" 1>&6
7723 else
7724   rm -f conftest.src conftest.dst
7725 echo "conftest" > conftest.src
7726 if ln conftest.src conftest.dst 2>/dev/null
7727 then
7728   ol_cv_prog_LN_H="ln"
7729 else
7730   ol_cv_prog_LN_H="cp"
7731 fi
7732 rm -f conftest.src conftest.dst
7733
7734 fi
7735 LN_H="$ol_cv_prog_LN_H"
7736 if test "$ol_cv_prog_LN_H" = "ln"; then
7737         echo "$ac_t""yes" 1>&6
7738 else
7739         echo "$ac_t""no" 1>&6
7740 fi
7741
7742 echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
7743 echo "configure:7744: checking whether ln -s works" >&5
7744 if eval "test \"\${ac_cv_prog_LN_S+set}\" = set"; then
7745   echo $ac_n "(cached) $ac_c" 1>&6
7746 else
7747   rm -f conftestdata
7748 if ln -s X conftestdata 2>/dev/null
7749 then
7750   rm -f conftestdata
7751   ac_cv_prog_LN_S="ln -s"
7752 else
7753   ac_cv_prog_LN_S=ln
7754 fi
7755 fi
7756 LN_S="$ac_cv_prog_LN_S"
7757 if test "$ac_cv_prog_LN_S" = "ln -s"; then
7758   echo "$ac_t""yes" 1>&6
7759 else
7760   echo "$ac_t""no" 1>&6
7761 fi
7762
7763
7764 # Extract the first word of "sendmail", so it can be a program name with args.
7765 set dummy sendmail; ac_word=$2
7766 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7767 echo "configure:7768: checking for $ac_word" >&5
7768 if eval "test \"\${ac_cv_path_SENDMAIL+set}\" = set"; then
7769   echo $ac_n "(cached) $ac_c" 1>&6
7770 else
7771   case "$SENDMAIL" in
7772   /*)
7773   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a path.
7774   ;;
7775   ?:/*)
7776   ac_cv_path_SENDMAIL="$SENDMAIL" # Let the user override the test with a dos path.
7777   ;;
7778   *)
7779   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7780   ac_dummy="$PATH:/usr/libexec:/usr/lib:/usr/sbin:/usr/etc:/etc"
7781   for ac_dir in $ac_dummy; do 
7782     test -z "$ac_dir" && ac_dir=.
7783     if test -f $ac_dir/$ac_word; then
7784       ac_cv_path_SENDMAIL="$ac_dir/$ac_word"
7785       break
7786     fi
7787   done
7788   IFS="$ac_save_ifs"
7789   test -z "$ac_cv_path_SENDMAIL" && ac_cv_path_SENDMAIL="/usr/lib/sendmail"
7790   ;;
7791 esac
7792 fi
7793 SENDMAIL="$ac_cv_path_SENDMAIL"
7794 if test -n "$SENDMAIL"; then
7795   echo "$ac_t""$SENDMAIL" 1>&6
7796 else
7797   echo "$ac_t""no" 1>&6
7798 fi
7799
7800 # Extract the first word of "vi", so it can be a program name with args.
7801 set dummy vi; ac_word=$2
7802 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7803 echo "configure:7804: checking for $ac_word" >&5
7804 if eval "test \"\${ac_cv_path_EDITOR+set}\" = set"; then
7805   echo $ac_n "(cached) $ac_c" 1>&6
7806 else
7807   case "$EDITOR" in
7808   /*)
7809   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a path.
7810   ;;
7811   ?:/*)
7812   ac_cv_path_EDITOR="$EDITOR" # Let the user override the test with a dos path.
7813   ;;
7814   *)
7815   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7816   ac_dummy="$PATH:/usr/ucb"
7817   for ac_dir in $ac_dummy; do 
7818     test -z "$ac_dir" && ac_dir=.
7819     if test -f $ac_dir/$ac_word; then
7820       ac_cv_path_EDITOR="$ac_dir/$ac_word"
7821       break
7822     fi
7823   done
7824   IFS="$ac_save_ifs"
7825   test -z "$ac_cv_path_EDITOR" && ac_cv_path_EDITOR="/usr/ucb/vi"
7826   ;;
7827 esac
7828 fi
7829 EDITOR="$ac_cv_path_EDITOR"
7830 if test -n "$EDITOR"; then
7831   echo "$ac_t""$EDITOR" 1>&6
7832 else
7833   echo "$ac_t""no" 1>&6
7834 fi
7835
7836 # Extract the first word of "finger", so it can be a program name with args.
7837 set dummy finger; ac_word=$2
7838 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7839 echo "configure:7840: checking for $ac_word" >&5
7840 if eval "test \"\${ac_cv_path_FINGER+set}\" = set"; then
7841   echo $ac_n "(cached) $ac_c" 1>&6
7842 else
7843   case "$FINGER" in
7844   /*)
7845   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a path.
7846   ;;
7847   ?:/*)
7848   ac_cv_path_FINGER="$FINGER" # Let the user override the test with a dos path.
7849   ;;
7850   *)
7851   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7852   ac_dummy="$PATH:/usr/ucb"
7853   for ac_dir in $ac_dummy; do 
7854     test -z "$ac_dir" && ac_dir=.
7855     if test -f $ac_dir/$ac_word; then
7856       ac_cv_path_FINGER="$ac_dir/$ac_word"
7857       break
7858     fi
7859   done
7860   IFS="$ac_save_ifs"
7861   test -z "$ac_cv_path_FINGER" && ac_cv_path_FINGER="/usr/ucb/finger"
7862   ;;
7863 esac
7864 fi
7865 FINGER="$ac_cv_path_FINGER"
7866 if test -n "$FINGER"; then
7867   echo "$ac_t""$FINGER" 1>&6
7868 else
7869   echo "$ac_t""no" 1>&6
7870 fi
7871
7872
7873 ol_link_perl=no
7874 if test $ol_enable_perl != no ; then
7875         # Extract the first word of "perl", so it can be a program name with args.
7876 set dummy perl; ac_word=$2
7877 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
7878 echo "configure:7879: checking for $ac_word" >&5
7879 if eval "test \"\${ac_cv_path_PERLBIN+set}\" = set"; then
7880   echo $ac_n "(cached) $ac_c" 1>&6
7881 else
7882   case "$PERLBIN" in
7883   /*)
7884   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a path.
7885   ;;
7886   ?:/*)
7887   ac_cv_path_PERLBIN="$PERLBIN" # Let the user override the test with a dos path.
7888   ;;
7889   *)
7890   IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
7891   ac_dummy="$PATH"
7892   for ac_dir in $ac_dummy; do 
7893     test -z "$ac_dir" && ac_dir=.
7894     if test -f $ac_dir/$ac_word; then
7895       ac_cv_path_PERLBIN="$ac_dir/$ac_word"
7896       break
7897     fi
7898   done
7899   IFS="$ac_save_ifs"
7900   test -z "$ac_cv_path_PERLBIN" && ac_cv_path_PERLBIN="/usr/bin/perl"
7901   ;;
7902 esac
7903 fi
7904 PERLBIN="$ac_cv_path_PERLBIN"
7905 if test -n "$PERLBIN"; then
7906   echo "$ac_t""$PERLBIN" 1>&6
7907 else
7908   echo "$ac_t""no" 1>&6
7909 fi
7910
7911
7912         if test "no$PERLBIN" = "no" ; then
7913                 if test $ol_enable_perl = yes ; then
7914                         { echo "configure: error: could not locate perl" 1>&2; exit 1; }
7915                 fi
7916
7917         else
7918                 PERL_CPPFLAGS="`$PERLBIN -MExtUtils::Embed -e ccopts`"
7919                 if test x"$ol_with_perl_module" = "xstatic" ; then
7920                         SLAPD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7921                 else
7922                         MOD_PERL_LDFLAGS="`$PERLBIN -MExtUtils::Embed -e ldopts|sed -e s/-lc//`"
7923                 fi
7924                                 ol_link_perl=yes
7925         fi
7926 fi
7927
7928 echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
7929 echo "configure:7930: checking how to run the C preprocessor" >&5
7930 # On Suns, sometimes $CPP names a directory.
7931 if test -n "$CPP" && test -d "$CPP"; then
7932   CPP=
7933 fi
7934 if test -z "$CPP"; then
7935 if eval "test \"\${ac_cv_prog_CPP+set}\" = set"; then
7936   echo $ac_n "(cached) $ac_c" 1>&6
7937 else
7938     # This must be in double quotes, not single quotes, because CPP may get
7939   # substituted into the Makefile and "${CC-cc}" will confuse make.
7940   CPP="${CC-cc} -E"
7941   # On the NeXT, cc -E runs the code through the compiler's parser,
7942   # not just through cpp.
7943   cat > conftest.$ac_ext <<EOF
7944 #line 7945 "configure"
7945 #include "confdefs.h"
7946 #include <assert.h>
7947 Syntax Error
7948 EOF
7949 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7950 { (eval echo configure:7951: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7951 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7952 if test -z "$ac_err"; then
7953   :
7954 else
7955   echo "$ac_err" >&5
7956   echo "configure: failed program was:" >&5
7957   cat conftest.$ac_ext >&5
7958   rm -rf conftest*
7959   CPP="${CC-cc} -E -traditional-cpp"
7960   cat > conftest.$ac_ext <<EOF
7961 #line 7962 "configure"
7962 #include "confdefs.h"
7963 #include <assert.h>
7964 Syntax Error
7965 EOF
7966 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7967 { (eval echo configure:7968: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7968 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7969 if test -z "$ac_err"; then
7970   :
7971 else
7972   echo "$ac_err" >&5
7973   echo "configure: failed program was:" >&5
7974   cat conftest.$ac_ext >&5
7975   rm -rf conftest*
7976   CPP="${CC-cc} -nologo -E"
7977   cat > conftest.$ac_ext <<EOF
7978 #line 7979 "configure"
7979 #include "confdefs.h"
7980 #include <assert.h>
7981 Syntax Error
7982 EOF
7983 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
7984 { (eval echo configure:7985: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
7985 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
7986 if test -z "$ac_err"; then
7987   :
7988 else
7989   echo "$ac_err" >&5
7990   echo "configure: failed program was:" >&5
7991   cat conftest.$ac_ext >&5
7992   rm -rf conftest*
7993   CPP=/lib/cpp
7994 fi
7995 rm -f conftest*
7996 fi
7997 rm -f conftest*
7998 fi
7999 rm -f conftest*
8000   ac_cv_prog_CPP="$CPP"
8001 fi
8002   CPP="$ac_cv_prog_CPP"
8003 else
8004   ac_cv_prog_CPP="$CPP"
8005 fi
8006 echo "$ac_t""$CPP" 1>&6
8007
8008
8009 if test $cross_compiling = yes -a $ol_enable_x_compile = yes; then
8010         echo "configure: warning: cross compiling....  some functionality will be removed." 1>&2
8011
8012 elif test $cross_compiling = no -a $ol_enable_x_compile = yes; then
8013         echo "configure: warning: programs compiled here do run here..." 1>&2
8014         { echo "configure: error:   if not cross compiling, use --disable-x-compile." 1>&2; exit 1; }
8015
8016 elif test $cross_compiling = yes -a $ol_enable_x_compile = no; then
8017         echo "configure: warning: programs compiled here do not run here..." 1>&2
8018         { echo "configure: error:   if cross compiling,  add --enable-x-compile." 1>&2; exit 1; }
8019 fi
8020
8021
8022 echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
8023 echo "configure:8024: checking for Cygwin environment" >&5
8024 if eval "test \"\${ac_cv_cygwin+set}\" = set"; then
8025   echo $ac_n "(cached) $ac_c" 1>&6
8026 else
8027   cat > conftest.$ac_ext <<EOF
8028 #line 8029 "configure"
8029 #include "confdefs.h"
8030
8031 int main() {
8032
8033 #ifndef __CYGWIN__
8034 #define __CYGWIN__ __CYGWIN32__
8035 #endif
8036 return __CYGWIN__;
8037 ; return 0; }
8038 EOF
8039 if { (eval echo configure:8040: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8040   rm -rf conftest*
8041   ac_cv_cygwin=yes
8042 else
8043   echo "configure: failed program was:" >&5
8044   cat conftest.$ac_ext >&5
8045   rm -rf conftest*
8046   ac_cv_cygwin=no
8047 fi
8048 rm -f conftest*
8049 fi
8050
8051 echo "$ac_t""$ac_cv_cygwin" 1>&6
8052 CYGWIN=
8053 test "$ac_cv_cygwin" = yes && CYGWIN=yes
8054 echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
8055 echo "configure:8056: checking for mingw32 environment" >&5
8056 if eval "test \"\${ac_cv_mingw32+set}\" = set"; then
8057   echo $ac_n "(cached) $ac_c" 1>&6
8058 else
8059   cat > conftest.$ac_ext <<EOF
8060 #line 8061 "configure"
8061 #include "confdefs.h"
8062
8063 int main() {
8064 return __MINGW32__;
8065 ; return 0; }
8066 EOF
8067 if { (eval echo configure:8068: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8068   rm -rf conftest*
8069   ac_cv_mingw32=yes
8070 else
8071   echo "configure: failed program was:" >&5
8072   cat conftest.$ac_ext >&5
8073   rm -rf conftest*
8074   ac_cv_mingw32=no
8075 fi
8076 rm -f conftest*
8077 fi
8078
8079 echo "$ac_t""$ac_cv_mingw32" 1>&6
8080 MINGW32=
8081 test "$ac_cv_mingw32" = yes && MINGW32=yes
8082
8083
8084
8085 echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
8086 echo "configure:8087: checking for executable suffix" >&5
8087 if eval "test \"\${ac_cv_exeext+set}\" = set"; then
8088   echo $ac_n "(cached) $ac_c" 1>&6
8089 else
8090   if test "$CYGWIN" = yes || test "$MINGW32" = yes || test "$EMXOS2" = yes; then
8091   ac_cv_exeext=.exe
8092 else
8093   rm -f conftest*
8094   echo 'int main () { return 0; }' > conftest.$ac_ext
8095   ac_cv_exeext=
8096   if { (eval echo configure:8097: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
8097     for file in conftest.*; do
8098       case $file in
8099       *.c | *.C | *.o | *.obj | *.xcoff) ;;
8100       *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
8101       esac
8102     done
8103   else
8104     { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
8105   fi
8106   rm -f conftest*
8107   test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
8108 fi
8109 fi
8110
8111 EXEEXT=""
8112 test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
8113 echo "$ac_t""${ac_cv_exeext}" 1>&6
8114 ac_exeext=$EXEEXT
8115
8116 echo $ac_n "checking for object suffix""... $ac_c" 1>&6
8117 echo "configure:8118: checking for object suffix" >&5
8118 if eval "test \"\${ac_cv_objext+set}\" = set"; then
8119   echo $ac_n "(cached) $ac_c" 1>&6
8120 else
8121   rm -f conftest*
8122 echo 'int i = 1;' > conftest.$ac_ext
8123 if { (eval echo configure:8124: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8124   for ac_file in conftest.*; do
8125     case $ac_file in
8126     *.c) ;;
8127     *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
8128     esac
8129   done
8130 else
8131   { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
8132 fi
8133 rm -f conftest*
8134 fi
8135
8136 echo "$ac_t""$ac_cv_objext" 1>&6
8137 OBJEXT=$ac_cv_objext
8138 ac_objext=$ac_cv_objext
8139
8140
8141 cat >> confdefs.h <<EOF
8142 #define EXEEXT "${EXEEXT}"
8143 EOF
8144
8145
8146 echo $ac_n "checking for be_app in -lbe""... $ac_c" 1>&6
8147 echo "configure:8148: checking for be_app in -lbe" >&5
8148 ac_lib_var=`echo be'_'be_app | sed 'y%./+-:%__p__%'`
8149 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8150   echo $ac_n "(cached) $ac_c" 1>&6
8151 else
8152   ac_save_LIBS="$LIBS"
8153 LIBS="-lbe -lroot -lnet $LIBS"
8154 cat > conftest.$ac_ext <<EOF
8155 #line 8156 "configure"
8156 #include "confdefs.h"
8157 /* Override any gcc2 internal prototype to avoid an error.  */
8158 /* We use char because int might match the return type of a gcc2
8159     builtin and then its argument prototype would still apply.  */
8160 char be_app();
8161
8162 int main() {
8163 be_app()
8164 ; return 0; }
8165 EOF
8166 if { (eval echo configure:8167: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8167   rm -rf conftest*
8168   eval "ac_cv_lib_$ac_lib_var=yes"
8169 else
8170   echo "configure: failed program was:" >&5
8171   cat conftest.$ac_ext >&5
8172   rm -rf conftest*
8173   eval "ac_cv_lib_$ac_lib_var=no"
8174 fi
8175 rm -f conftest*
8176 LIBS="$ac_save_LIBS"
8177
8178 fi
8179 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8180   echo "$ac_t""yes" 1>&6
8181   LIBS="$LIBS -lbe -lroot -lnet"
8182 else
8183   echo "$ac_t""no" 1>&6
8184 :
8185 fi
8186
8187
8188
8189
8190
8191 echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
8192 echo "configure:8193: checking for ${CC-cc} option to accept ANSI C" >&5
8193 if eval "test \"\${am_cv_prog_cc_stdc+set}\" = set"; then
8194   echo $ac_n "(cached) $ac_c" 1>&6
8195 else
8196   am_cv_prog_cc_stdc=no
8197 ac_save_CC="$CC"
8198 # Don't try gcc -ansi; that turns off useful extensions and
8199 # breaks some systems' header files.
8200 # AIX                   -qlanglvl=ansi
8201 # Ultrix and OSF/1      -std1
8202 # HP-UX 10.20 and later -Ae
8203 # HP-UX older versions  -Aa -D_HPUX_SOURCE
8204 # SVR4                  -Xc -D__EXTENSIONS__
8205 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
8206 do
8207   CC="$ac_save_CC $ac_arg"
8208   cat > conftest.$ac_ext <<EOF
8209 #line 8210 "configure"
8210 #include "confdefs.h"
8211 #include <stdarg.h>
8212 #include <stdio.h>
8213 #include <sys/types.h>
8214 #include <sys/stat.h>
8215 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
8216 struct buf { int x; };
8217 FILE * (*rcsopen) (struct buf *, struct stat *, int);
8218 static char *e (p, i)
8219      char **p;
8220      int i;
8221 {
8222   return p[i];
8223 }
8224 static char *f (char * (*g) (char **, int), char **p, ...)
8225 {
8226   char *s;
8227   va_list v;
8228   va_start (v,p);
8229   s = g (p, va_arg (v,int));
8230   va_end (v);
8231   return s;
8232 }
8233 int test (int i, double x);
8234 struct s1 {int (*f) (int a);};
8235 struct s2 {int (*f) (double a);};
8236 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
8237 int argc;
8238 char **argv;
8239
8240 int main() {
8241
8242 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
8243
8244 ; return 0; }
8245 EOF
8246 if { (eval echo configure:8247: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8247   rm -rf conftest*
8248   am_cv_prog_cc_stdc="$ac_arg"; break
8249 else
8250   echo "configure: failed program was:" >&5
8251   cat conftest.$ac_ext >&5
8252 fi
8253 rm -f conftest*
8254 done
8255 CC="$ac_save_CC"
8256
8257 fi
8258
8259 if test -z "$am_cv_prog_cc_stdc"; then
8260   echo "$ac_t""none needed" 1>&6
8261 else
8262   echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
8263 fi
8264 case "x$am_cv_prog_cc_stdc" in
8265   x|xno) ;;
8266   *) CC="$CC $am_cv_prog_cc_stdc" ;;
8267 esac
8268
8269 if test "X${am_cv_prog_cc_stdc}" = "Xno" ; then
8270         { echo "configure: error: OpenLDAP requires compiler to support STDC constructs." 1>&2; exit 1; }
8271 fi
8272
8273 # test for make depend flag
8274 OL_MKDEP=
8275 OL_MKDEP_FLAGS=
8276 if test -z "${MKDEP}"; then
8277         OL_MKDEP="${CC-cc}"
8278         if test -z "${MKDEP_FLAGS}"; then
8279                 echo $ac_n "checking for ${OL_MKDEP} depend flag""... $ac_c" 1>&6
8280 echo "configure:8281: checking for ${OL_MKDEP} depend flag" >&5
8281 if eval "test \"\${ol_cv_mkdep+set}\" = set"; then
8282   echo $ac_n "(cached) $ac_c" 1>&6
8283 else
8284   
8285                         ol_cv_mkdep=no
8286                         for flag in "-M" "-xM"; do
8287                                 cat > conftest.c <<EOF
8288  noCode;
8289 EOF
8290                                 if { ac_try='$OL_MKDEP $flag conftest.c'; { (eval echo configure:8291: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } \
8291                                         | egrep '^conftest\.'"${ac_objext}" >/dev/null 2>&1
8292                                 then
8293                                         if test ! -f conftest."${ac_object}" ; then
8294                                                 ol_cv_mkdep=$flag
8295                                                 OL_MKDEP_FLAGS="$flag"
8296                                                 break
8297                                         fi
8298                                 fi
8299                         done
8300                         rm -f conftest*
8301                 
8302 fi
8303
8304 echo "$ac_t""$ol_cv_mkdep" 1>&6
8305         else
8306                 cc_cv_mkdep=yes
8307                 OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8308         fi
8309 else
8310         cc_cv_mkdep=yes
8311         OL_MKDEP="${MKDEP}"
8312         OL_MKDEP_FLAGS="${MKDEP_FLAGS}"
8313 fi
8314
8315
8316
8317 if test "${ol_cv_mkdep}" = no ; then
8318         # this will soon become an error
8319         echo "configure: warning: do not know how to generate dependencies" 1>&2
8320 fi
8321
8322 echo $ac_n "checking for afopen in -ls""... $ac_c" 1>&6
8323 echo "configure:8324: checking for afopen in -ls" >&5
8324 ac_lib_var=`echo s'_'afopen | sed 'y%./+-:%__p__%'`
8325 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8326   echo $ac_n "(cached) $ac_c" 1>&6
8327 else
8328   ac_save_LIBS="$LIBS"
8329 LIBS="-ls  $LIBS"
8330 cat > conftest.$ac_ext <<EOF
8331 #line 8332 "configure"
8332 #include "confdefs.h"
8333 /* Override any gcc2 internal prototype to avoid an error.  */
8334 /* We use char because int might match the return type of a gcc2
8335     builtin and then its argument prototype would still apply.  */
8336 char afopen();
8337
8338 int main() {
8339 afopen()
8340 ; return 0; }
8341 EOF
8342 if { (eval echo configure:8343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8343   rm -rf conftest*
8344   eval "ac_cv_lib_$ac_lib_var=yes"
8345 else
8346   echo "configure: failed program was:" >&5
8347   cat conftest.$ac_ext >&5
8348   rm -rf conftest*
8349   eval "ac_cv_lib_$ac_lib_var=no"
8350 fi
8351 rm -f conftest*
8352 LIBS="$ac_save_LIBS"
8353
8354 fi
8355 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8356   echo "$ac_t""yes" 1>&6
8357   
8358         AUTH_LIBS=-ls
8359         cat >> confdefs.h <<\EOF
8360 #define HAVE_AIX_SECURITY 1
8361 EOF
8362
8363
8364 else
8365   echo "$ac_t""no" 1>&6
8366 fi
8367
8368
8369
8370 ol_link_modules=no
8371 if test $ol_enable_modules != no ; then
8372         for ac_hdr in ltdl.h
8373 do
8374 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8375 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8376 echo "configure:8377: checking for $ac_hdr" >&5
8377 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8378   echo $ac_n "(cached) $ac_c" 1>&6
8379 else
8380   cat > conftest.$ac_ext <<EOF
8381 #line 8382 "configure"
8382 #include "confdefs.h"
8383 #include <$ac_hdr>
8384 EOF
8385 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8386 { (eval echo configure:8387: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8387 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8388 if test -z "$ac_err"; then
8389   rm -rf conftest*
8390   eval "ac_cv_header_$ac_safe=yes"
8391 else
8392   echo "$ac_err" >&5
8393   echo "configure: failed program was:" >&5
8394   cat conftest.$ac_ext >&5
8395   rm -rf conftest*
8396   eval "ac_cv_header_$ac_safe=no"
8397 fi
8398 rm -f conftest*
8399 fi
8400 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8401   echo "$ac_t""yes" 1>&6
8402     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8403   cat >> confdefs.h <<EOF
8404 #define $ac_tr_hdr 1
8405 EOF
8406  
8407 else
8408   echo "$ac_t""no" 1>&6
8409 fi
8410 done
8411
8412
8413         if test $ac_cv_header_ltdl_h = no ; then
8414                 { echo "configure: error: could not locate libtool ltdl.h" 1>&2; exit 1; }
8415         fi
8416
8417         echo $ac_n "checking for lt_dlinit in -lltdl""... $ac_c" 1>&6
8418 echo "configure:8419: checking for lt_dlinit in -lltdl" >&5
8419 ac_lib_var=`echo ltdl'_'lt_dlinit | sed 'y%./+-:%__p__%'`
8420 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8421   echo $ac_n "(cached) $ac_c" 1>&6
8422 else
8423   ac_save_LIBS="$LIBS"
8424 LIBS="-lltdl  $LIBS"
8425 cat > conftest.$ac_ext <<EOF
8426 #line 8427 "configure"
8427 #include "confdefs.h"
8428 /* Override any gcc2 internal prototype to avoid an error.  */
8429 /* We use char because int might match the return type of a gcc2
8430     builtin and then its argument prototype would still apply.  */
8431 char lt_dlinit();
8432
8433 int main() {
8434 lt_dlinit()
8435 ; return 0; }
8436 EOF
8437 if { (eval echo configure:8438: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8438   rm -rf conftest*
8439   eval "ac_cv_lib_$ac_lib_var=yes"
8440 else
8441   echo "configure: failed program was:" >&5
8442   cat conftest.$ac_ext >&5
8443   rm -rf conftest*
8444   eval "ac_cv_lib_$ac_lib_var=no"
8445 fi
8446 rm -f conftest*
8447 LIBS="$ac_save_LIBS"
8448
8449 fi
8450 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8451   echo "$ac_t""yes" 1>&6
8452   
8453                 MODULES_LIBS=-lltdl
8454                 cat >> confdefs.h <<\EOF
8455 #define HAVE_LIBLTDL 1
8456 EOF
8457
8458         
8459 else
8460   echo "$ac_t""no" 1>&6
8461 fi
8462
8463
8464         if test "$ac_cv_lib_ltdl_lt_dlinit" = no ; then
8465                 { echo "configure: error: could not locate libtool -lltdl" 1>&2; exit 1; }
8466         fi
8467         ol_link_modules=yes
8468 else
8469         ol_with_bdb_module=static
8470         ol_with_dnssrv_module=static
8471         ol_with_ldap_module=static
8472         ol_with_ldbm_module=static
8473         ol_with_meta_module=static
8474         ol_with_monitor_module=static
8475         ol_with_null_module=static
8476         ol_with_passwd_module=static
8477         ol_with_perl_module=static
8478         ol_with_shell_module=static
8479         ol_with_tcl_module=static
8480         ol_with_sql_module=static
8481 fi
8482
8483 # test for EBCDIC
8484 echo $ac_n "checking for EBCDIC""... $ac_c" 1>&6
8485 echo "configure:8486: checking for EBCDIC" >&5
8486 if eval "test \"\${ol_cv_cpp_ebcdic+set}\" = set"; then
8487   echo $ac_n "(cached) $ac_c" 1>&6
8488 else
8489   
8490         cat > conftest.$ac_ext <<EOF
8491 #line 8492 "configure"
8492 #include "confdefs.h"
8493
8494 #if !('M' == 0xd4)
8495 #include <__ASCII__/generate_error.h>
8496 #endif
8497
8498 EOF
8499 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8500 { (eval echo configure:8501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8501 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8502 if test -z "$ac_err"; then
8503   rm -rf conftest*
8504   ol_cv_cpp_ebcdic=yes
8505 else
8506   echo "$ac_err" >&5
8507   echo "configure: failed program was:" >&5
8508   cat conftest.$ac_ext >&5
8509   rm -rf conftest*
8510   ol_cv_cpp_ebcdic=no
8511 fi
8512 rm -f conftest*
8513 fi
8514
8515 echo "$ac_t""$ol_cv_cpp_ebcdic" 1>&6
8516 if test $ol_cv_cpp_ebcdic = yes ; then
8517         cat >> confdefs.h <<\EOF
8518 #define HAVE_EBCDIC 1
8519 EOF
8520
8521 fi
8522
8523 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
8524 echo "configure:8525: checking for ANSI C header files" >&5
8525 if eval "test \"\${ol_cv_header_stdc+set}\" = set"; then
8526   echo $ac_n "(cached) $ac_c" 1>&6
8527 else
8528   cat > conftest.$ac_ext <<EOF
8529 #line 8530 "configure"
8530 #include "confdefs.h"
8531 #include <stdlib.h>
8532 #include <stdarg.h>
8533 #include <string.h>
8534 #include <float.h>
8535 EOF
8536 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8537 { (eval echo configure:8538: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8538 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8539 if test -z "$ac_err"; then
8540   rm -rf conftest*
8541   ol_cv_header_stdc=yes
8542 else
8543   echo "$ac_err" >&5
8544   echo "configure: failed program was:" >&5
8545   cat conftest.$ac_ext >&5
8546   rm -rf conftest*
8547   ol_cv_header_stdc=no
8548 fi
8549 rm -f conftest*
8550
8551 if test $ol_cv_header_stdc = yes; then
8552   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
8553 cat > conftest.$ac_ext <<EOF
8554 #line 8555 "configure"
8555 #include "confdefs.h"
8556 #include <string.h>
8557 EOF
8558 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8559   egrep "memchr" >/dev/null 2>&1; then
8560   :
8561 else
8562   rm -rf conftest*
8563   ol_cv_header_stdc=no
8564 fi
8565 rm -f conftest*
8566
8567 fi
8568
8569 if test $ol_cv_header_stdc = yes; then
8570   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
8571 cat > conftest.$ac_ext <<EOF
8572 #line 8573 "configure"
8573 #include "confdefs.h"
8574 #include <stdlib.h>
8575 EOF
8576 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8577   egrep "free" >/dev/null 2>&1; then
8578   :
8579 else
8580   rm -rf conftest*
8581   ol_cv_header_stdc=no
8582 fi
8583 rm -f conftest*
8584
8585 fi
8586
8587 if test $ol_cv_header_stdc = yes; then
8588   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8589 if test "$cross_compiling" = yes; then
8590   :
8591 else
8592   cat > conftest.$ac_ext <<EOF
8593 #line 8594 "configure"
8594 #include "confdefs.h"
8595 #include <ctype.h>
8596 #ifndef HAVE_EBCDIC
8597 #       define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8598 #       define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8599 #else
8600 #       define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8601                 || ('j' <= (c) && (c) <= 'r') \
8602                 || ('s' <= (c) && (c) <= 'z'))
8603 #       define TOUPPER(c)       (ISLOWER(c) ? ((c) | 0x40) : (c))
8604 #endif
8605 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8606 int main () { int i; for (i = 0; i < 256; i++)
8607 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
8608 exit (0); }
8609
8610 EOF
8611 if { (eval echo configure:8612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
8612 then
8613   :
8614 else
8615   echo "configure: failed program was:" >&5
8616   cat conftest.$ac_ext >&5
8617   rm -fr conftest*
8618   ol_cv_header_stdc=no
8619 fi
8620 rm -fr conftest*
8621 fi
8622
8623 fi
8624 fi
8625
8626 echo "$ac_t""$ol_cv_header_stdc" 1>&6
8627 if test $ol_cv_header_stdc = yes; then
8628   cat >> confdefs.h <<\EOF
8629 #define STDC_HEADERS 1
8630 EOF
8631
8632 fi
8633 ac_cv_header_stdc=disable
8634
8635
8636 if test $ol_cv_header_stdc != yes; then
8637         echo "configure: warning: could not locate Standard C compliant headers" 1>&2
8638 fi
8639
8640 ac_header_dirent=no
8641 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
8642 do
8643 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8644 echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
8645 echo "configure:8646: checking for $ac_hdr that defines DIR" >&5
8646 if eval "test \"\${ac_cv_header_dirent_$ac_safe+set}\" = set"; then
8647   echo $ac_n "(cached) $ac_c" 1>&6
8648 else
8649   cat > conftest.$ac_ext <<EOF
8650 #line 8651 "configure"
8651 #include "confdefs.h"
8652 #include <sys/types.h>
8653 #include <$ac_hdr>
8654 int main() {
8655 DIR *dirp = 0;
8656 ; return 0; }
8657 EOF
8658 if { (eval echo configure:8659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8659   rm -rf conftest*
8660   eval "ac_cv_header_dirent_$ac_safe=yes"
8661 else
8662   echo "configure: failed program was:" >&5
8663   cat conftest.$ac_ext >&5
8664   rm -rf conftest*
8665   eval "ac_cv_header_dirent_$ac_safe=no"
8666 fi
8667 rm -f conftest*
8668 fi
8669 if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
8670   echo "$ac_t""yes" 1>&6
8671     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8672   cat >> confdefs.h <<EOF
8673 #define $ac_tr_hdr 1
8674 EOF
8675  ac_header_dirent=$ac_hdr; break
8676 else
8677   echo "$ac_t""no" 1>&6
8678 fi
8679 done
8680 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
8681 if test $ac_header_dirent = dirent.h; then
8682 echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
8683 echo "configure:8684: checking for opendir in -ldir" >&5
8684 ac_lib_var=`echo dir'_'opendir | sed 'y%./+-:%__p__%'`
8685 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8686   echo $ac_n "(cached) $ac_c" 1>&6
8687 else
8688   ac_save_LIBS="$LIBS"
8689 LIBS="-ldir  $LIBS"
8690 cat > conftest.$ac_ext <<EOF
8691 #line 8692 "configure"
8692 #include "confdefs.h"
8693 /* Override any gcc2 internal prototype to avoid an error.  */
8694 /* We use char because int might match the return type of a gcc2
8695     builtin and then its argument prototype would still apply.  */
8696 char opendir();
8697
8698 int main() {
8699 opendir()
8700 ; return 0; }
8701 EOF
8702 if { (eval echo configure:8703: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8703   rm -rf conftest*
8704   eval "ac_cv_lib_$ac_lib_var=yes"
8705 else
8706   echo "configure: failed program was:" >&5
8707   cat conftest.$ac_ext >&5
8708   rm -rf conftest*
8709   eval "ac_cv_lib_$ac_lib_var=no"
8710 fi
8711 rm -f conftest*
8712 LIBS="$ac_save_LIBS"
8713
8714 fi
8715 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8716   echo "$ac_t""yes" 1>&6
8717   LIBS="$LIBS -ldir"
8718 else
8719   echo "$ac_t""no" 1>&6
8720 fi
8721
8722 else
8723 echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
8724 echo "configure:8725: checking for opendir in -lx" >&5
8725 ac_lib_var=`echo x'_'opendir | sed 'y%./+-:%__p__%'`
8726 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
8727   echo $ac_n "(cached) $ac_c" 1>&6
8728 else
8729   ac_save_LIBS="$LIBS"
8730 LIBS="-lx  $LIBS"
8731 cat > conftest.$ac_ext <<EOF
8732 #line 8733 "configure"
8733 #include "confdefs.h"
8734 /* Override any gcc2 internal prototype to avoid an error.  */
8735 /* We use char because int might match the return type of a gcc2
8736     builtin and then its argument prototype would still apply.  */
8737 char opendir();
8738
8739 int main() {
8740 opendir()
8741 ; return 0; }
8742 EOF
8743 if { (eval echo configure:8744: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8744   rm -rf conftest*
8745   eval "ac_cv_lib_$ac_lib_var=yes"
8746 else
8747   echo "configure: failed program was:" >&5
8748   cat conftest.$ac_ext >&5
8749   rm -rf conftest*
8750   eval "ac_cv_lib_$ac_lib_var=no"
8751 fi
8752 rm -f conftest*
8753 LIBS="$ac_save_LIBS"
8754
8755 fi
8756 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
8757   echo "$ac_t""yes" 1>&6
8758   LIBS="$LIBS -lx"
8759 else
8760   echo "$ac_t""no" 1>&6
8761 fi
8762
8763 fi
8764
8765 echo $ac_n "checking for sys/wait.h that is POSIX.1 compatible""... $ac_c" 1>&6
8766 echo "configure:8767: checking for sys/wait.h that is POSIX.1 compatible" >&5
8767 if eval "test \"\${ac_cv_header_sys_wait_h+set}\" = set"; then
8768   echo $ac_n "(cached) $ac_c" 1>&6
8769 else
8770   cat > conftest.$ac_ext <<EOF
8771 #line 8772 "configure"
8772 #include "confdefs.h"
8773 #include <sys/types.h>
8774 #include <sys/wait.h>
8775 #ifndef WEXITSTATUS
8776 #define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
8777 #endif
8778 #ifndef WIFEXITED
8779 #define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
8780 #endif
8781 int main() {
8782 int s;
8783 wait (&s);
8784 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
8785 ; return 0; }
8786 EOF
8787 if { (eval echo configure:8788: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
8788   rm -rf conftest*
8789   ac_cv_header_sys_wait_h=yes
8790 else
8791   echo "configure: failed program was:" >&5
8792   cat conftest.$ac_ext >&5
8793   rm -rf conftest*
8794   ac_cv_header_sys_wait_h=no
8795 fi
8796 rm -f conftest*
8797 fi
8798
8799 echo "$ac_t""$ac_cv_header_sys_wait_h" 1>&6
8800 if test $ac_cv_header_sys_wait_h = yes; then
8801   cat >> confdefs.h <<\EOF
8802 #define HAVE_SYS_WAIT_H 1
8803 EOF
8804
8805 fi
8806
8807 echo $ac_n "checking POSIX termios""... $ac_c" 1>&6
8808 echo "configure:8809: checking POSIX termios" >&5
8809 if eval "test \"\${am_cv_sys_posix_termios+set}\" = set"; then
8810   echo $ac_n "(cached) $ac_c" 1>&6
8811 else
8812   cat > conftest.$ac_ext <<EOF
8813 #line 8814 "configure"
8814 #include "confdefs.h"
8815 #include <sys/types.h>
8816 #include <unistd.h>
8817 #include <termios.h>
8818 int main() {
8819 /* SunOS 4.0.3 has termios.h but not the library calls.  */
8820    tcgetattr(0, 0);
8821 ; return 0; }
8822 EOF
8823 if { (eval echo configure:8824: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
8824   rm -rf conftest*
8825   am_cv_sys_posix_termios=yes
8826 else
8827   echo "configure: failed program was:" >&5
8828   cat conftest.$ac_ext >&5
8829   rm -rf conftest*
8830   am_cv_sys_posix_termios=no
8831 fi
8832 rm -f conftest*
8833 fi
8834
8835 echo "$ac_t""$am_cv_sys_posix_termios" 1>&6
8836
8837
8838  echo $ac_n "checking whether use of TIOCGWINSZ requires sys/ioctl.h""... $ac_c" 1>&6
8839 echo "configure:8840: checking whether use of TIOCGWINSZ requires sys/ioctl.h" >&5
8840 if eval "test \"\${am_cv_sys_tiocgwinsz_needs_sys_ioctl_h+set}\" = set"; then
8841   echo $ac_n "(cached) $ac_c" 1>&6
8842 else
8843   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=no
8844
8845   gwinsz_in_termios_h=no
8846   if test $am_cv_sys_posix_termios = yes; then
8847     cat > conftest.$ac_ext <<EOF
8848 #line 8849 "configure"
8849 #include "confdefs.h"
8850 #include <sys/types.h>
8851 #     include <termios.h>
8852 #     ifdef TIOCGWINSZ
8853         yes
8854 #     endif
8855     
8856 EOF
8857 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8858   egrep "yes" >/dev/null 2>&1; then
8859   rm -rf conftest*
8860   gwinsz_in_termios_h=yes
8861 fi
8862 rm -f conftest*
8863
8864   fi
8865
8866   if test $gwinsz_in_termios_h = no; then
8867     cat > conftest.$ac_ext <<EOF
8868 #line 8869 "configure"
8869 #include "confdefs.h"
8870 #include <sys/types.h>
8871 #     include <sys/ioctl.h>
8872 #     ifdef TIOCGWINSZ
8873         yes
8874 #     endif
8875     
8876 EOF
8877 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8878   egrep "yes" >/dev/null 2>&1; then
8879   rm -rf conftest*
8880   am_cv_sys_tiocgwinsz_needs_sys_ioctl_h=yes
8881 fi
8882 rm -f conftest*
8883
8884   fi
8885   
8886 fi
8887
8888 echo "$ac_t""$am_cv_sys_tiocgwinsz_needs_sys_ioctl_h" 1>&6
8889   if test $am_cv_sys_tiocgwinsz_needs_sys_ioctl_h = yes; then
8890     cat >> confdefs.h <<\EOF
8891 #define GWINSZ_IN_SYS_IOCTL 1
8892 EOF
8893
8894   fi
8895
8896 if test $am_cv_sys_posix_termios = yes ; then
8897         cat >> confdefs.h <<\EOF
8898 #define HAVE_POSIX_TERMIOS 1
8899 EOF
8900
8901 fi
8902
8903 for ac_hdr in \
8904         arpa/inet.h             \
8905         arpa/nameser.h  \
8906         assert.h                \
8907         conio.h                 \
8908         crypt.h                 \
8909         direct.h                \
8910         errno.h                 \
8911         fcntl.h                 \
8912         filio.h                 \
8913         getopt.h                \
8914         grp.h                   \
8915         io.h                    \
8916         libutil.h               \
8917         limits.h                \
8918         locale.h                \
8919         netinet/tcp.h   \
8920         malloc.h                \
8921         memory.h                \
8922         psap.h                  \
8923         pwd.h                   \
8924         process.h               \
8925         resolv.h                \
8926         sgtty.h                 \
8927         shadow.h                \
8928         stddef.h                \
8929         string.h                \
8930         strings.h               \
8931         sysexits.h              \
8932         sys/file.h              \
8933         sys/filio.h             \
8934         sys/errno.h             \
8935         sys/ioctl.h             \
8936         sys/param.h             \
8937         sys/resource.h  \
8938         sys/select.h    \
8939         sys/socket.h    \
8940         sys/syslog.h    \
8941         sys/time.h              \
8942         sys/types.h             \
8943         syslog.h                \
8944         termios.h               \
8945         unistd.h                \
8946         winsock.h               \
8947         winsock2.h              \
8948
8949 do
8950 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
8951 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
8952 echo "configure:8953: checking for $ac_hdr" >&5
8953 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
8954   echo $ac_n "(cached) $ac_c" 1>&6
8955 else
8956   cat > conftest.$ac_ext <<EOF
8957 #line 8958 "configure"
8958 #include "confdefs.h"
8959 #include <$ac_hdr>
8960 EOF
8961 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
8962 { (eval echo configure:8963: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
8963 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
8964 if test -z "$ac_err"; then
8965   rm -rf conftest*
8966   eval "ac_cv_header_$ac_safe=yes"
8967 else
8968   echo "$ac_err" >&5
8969   echo "configure: failed program was:" >&5
8970   cat conftest.$ac_ext >&5
8971   rm -rf conftest*
8972   eval "ac_cv_header_$ac_safe=no"
8973 fi
8974 rm -f conftest*
8975 fi
8976 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
8977   echo "$ac_t""yes" 1>&6
8978     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
8979   cat >> confdefs.h <<EOF
8980 #define $ac_tr_hdr 1
8981 EOF
8982  
8983 else
8984   echo "$ac_t""no" 1>&6
8985 fi
8986 done
8987
8988
8989
8990
8991 echo $ac_n "checking for dlopen""... $ac_c" 1>&6
8992 echo "configure:8993: checking for dlopen" >&5
8993 if eval "test \"\${ac_cv_func_dlopen+set}\" = set"; then
8994   echo $ac_n "(cached) $ac_c" 1>&6
8995 else
8996   cat > conftest.$ac_ext <<EOF
8997 #line 8998 "configure"
8998 #include "confdefs.h"
8999 /* System header to define __stub macros and hopefully few prototypes,
9000     which can conflict with char dlopen(); below.  */
9001 #include <assert.h>
9002 /* Override any gcc2 internal prototype to avoid an error.  */
9003 /* We use char because int might match the return type of a gcc2
9004     builtin and then its argument prototype would still apply.  */
9005 char dlopen();
9006 char (*f)();
9007
9008 int main() {
9009
9010 /* The GNU C library defines this for functions which it implements
9011     to always fail with ENOSYS.  Some functions are actually named
9012     something starting with __ and the normal name is an alias.  */
9013 #if defined (__stub_dlopen) || defined (__stub___dlopen)
9014 choke me
9015 #else
9016 f = dlopen;
9017 #endif
9018
9019 ; return 0; }
9020 EOF
9021 if { (eval echo configure:9022: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9022   rm -rf conftest*
9023   eval "ac_cv_func_dlopen=yes"
9024 else
9025   echo "configure: failed program was:" >&5
9026   cat conftest.$ac_ext >&5
9027   rm -rf conftest*
9028   eval "ac_cv_func_dlopen=no"
9029 fi
9030 rm -f conftest*
9031 fi
9032
9033 if eval "test \"`echo '$ac_cv_func_'dlopen`\" = yes"; then
9034   echo "$ac_t""yes" 1>&6
9035   :
9036 else
9037   echo "$ac_t""no" 1>&6
9038 echo $ac_n "checking for dlopen in -ldl""... $ac_c" 1>&6
9039 echo "configure:9040: checking for dlopen in -ldl" >&5
9040 ac_lib_var=`echo dl'_'dlopen | sed 'y%./+-:%__p__%'`
9041 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9042   echo $ac_n "(cached) $ac_c" 1>&6
9043 else
9044   ac_save_LIBS="$LIBS"
9045 LIBS="-ldl  $LIBS"
9046 cat > conftest.$ac_ext <<EOF
9047 #line 9048 "configure"
9048 #include "confdefs.h"
9049 /* Override any gcc2 internal prototype to avoid an error.  */
9050 /* We use char because int might match the return type of a gcc2
9051     builtin and then its argument prototype would still apply.  */
9052 char dlopen();
9053
9054 int main() {
9055 dlopen()
9056 ; return 0; }
9057 EOF
9058 if { (eval echo configure:9059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9059   rm -rf conftest*
9060   eval "ac_cv_lib_$ac_lib_var=yes"
9061 else
9062   echo "configure: failed program was:" >&5
9063   cat conftest.$ac_ext >&5
9064   rm -rf conftest*
9065   eval "ac_cv_lib_$ac_lib_var=no"
9066 fi
9067 rm -f conftest*
9068 LIBS="$ac_save_LIBS"
9069
9070 fi
9071 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9072   echo "$ac_t""yes" 1>&6
9073     ac_tr_lib=HAVE_LIB`echo dl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9074     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9075   cat >> confdefs.h <<EOF
9076 #define $ac_tr_lib 1
9077 EOF
9078
9079   LIBS="-ldl $LIBS"
9080
9081 else
9082   echo "$ac_t""no" 1>&6
9083 fi
9084
9085 fi
9086
9087
9088 echo $ac_n "checking for sigset in -lV3""... $ac_c" 1>&6
9089 echo "configure:9090: checking for sigset in -lV3" >&5
9090 ac_lib_var=`echo V3'_'sigset | sed 'y%./+-:%__p__%'`
9091 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9092   echo $ac_n "(cached) $ac_c" 1>&6
9093 else
9094   ac_save_LIBS="$LIBS"
9095 LIBS="-lV3  $LIBS"
9096 cat > conftest.$ac_ext <<EOF
9097 #line 9098 "configure"
9098 #include "confdefs.h"
9099 /* Override any gcc2 internal prototype to avoid an error.  */
9100 /* We use char because int might match the return type of a gcc2
9101     builtin and then its argument prototype would still apply.  */
9102 char sigset();
9103
9104 int main() {
9105 sigset()
9106 ; return 0; }
9107 EOF
9108 if { (eval echo configure:9109: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9109   rm -rf conftest*
9110   eval "ac_cv_lib_$ac_lib_var=yes"
9111 else
9112   echo "configure: failed program was:" >&5
9113   cat conftest.$ac_ext >&5
9114   rm -rf conftest*
9115   eval "ac_cv_lib_$ac_lib_var=no"
9116 fi
9117 rm -f conftest*
9118 LIBS="$ac_save_LIBS"
9119
9120 fi
9121 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9122   echo "$ac_t""yes" 1>&6
9123     ac_tr_lib=HAVE_LIB`echo V3 | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9124     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9125   cat >> confdefs.h <<EOF
9126 #define $ac_tr_lib 1
9127 EOF
9128
9129   LIBS="-lV3 $LIBS"
9130
9131 else
9132   echo "$ac_t""no" 1>&6
9133 fi
9134
9135
9136 echo $ac_n "checking for winsock""... $ac_c" 1>&6
9137 echo "configure:9138: checking for winsock" >&5
9138 save_LIBS="$LIBS"
9139 for curlib in ws2_32 wsock32; do
9140         LIBS="$LIBS -l$curlib"
9141         cat > conftest.$ac_ext <<EOF
9142 #line 9143 "configure"
9143 #include "confdefs.h"
9144
9145                         char socket@12();
9146                         char select@20();
9147                         char closesocket@4();
9148                         char gethostname@8();
9149                         
9150 int main() {
9151
9152                         socket@12();
9153                         select@20();
9154                         closesocket@4();
9155                         gethostname@8();
9156                         
9157 ; return 0; }
9158 EOF
9159 if { (eval echo configure:9160: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9160   rm -rf conftest*
9161   have_winsock=yes
9162 else
9163   echo "configure: failed program was:" >&5
9164   cat conftest.$ac_ext >&5
9165   rm -rf conftest*
9166   have_winsock=no
9167 fi
9168 rm -f conftest*
9169
9170         if test $have_winsock = yes; then
9171                 cat >> confdefs.h <<\EOF
9172 #define HAVE_WINSOCK 1
9173 EOF
9174
9175                 ac_cv_func_socket=yes
9176                 ac_cv_func_select=yes
9177                 ac_cv_func_closesocket=yes
9178                 ac_cv_func_gethostname=yes
9179                 if test $curlib = ws2_32; then
9180                         have_winsock=winsock2
9181                         cat >> confdefs.h <<\EOF
9182 #define HAVE_WINSOCK2 1
9183 EOF
9184
9185                 fi
9186                 break
9187         fi
9188         LIBS="$save_LIBS"
9189 done
9190 echo "$ac_t""$have_winsock" 1>&6
9191
9192
9193 echo $ac_n "checking for socket""... $ac_c" 1>&6
9194 echo "configure:9195: checking for socket" >&5
9195 if eval "test \"\${ac_cv_func_socket+set}\" = set"; then
9196   echo $ac_n "(cached) $ac_c" 1>&6
9197 else
9198   cat > conftest.$ac_ext <<EOF
9199 #line 9200 "configure"
9200 #include "confdefs.h"
9201 /* System header to define __stub macros and hopefully few prototypes,
9202     which can conflict with char socket(); below.  */
9203 #include <assert.h>
9204 /* Override any gcc2 internal prototype to avoid an error.  */
9205 /* We use char because int might match the return type of a gcc2
9206     builtin and then its argument prototype would still apply.  */
9207 char socket();
9208 char (*f)();
9209
9210 int main() {
9211
9212 /* The GNU C library defines this for functions which it implements
9213     to always fail with ENOSYS.  Some functions are actually named
9214     something starting with __ and the normal name is an alias.  */
9215 #if defined (__stub_socket) || defined (__stub___socket)
9216 choke me
9217 #else
9218 f = socket;
9219 #endif
9220
9221 ; return 0; }
9222 EOF
9223 if { (eval echo configure:9224: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9224   rm -rf conftest*
9225   eval "ac_cv_func_socket=yes"
9226 else
9227   echo "configure: failed program was:" >&5
9228   cat conftest.$ac_ext >&5
9229   rm -rf conftest*
9230   eval "ac_cv_func_socket=no"
9231 fi
9232 rm -f conftest*
9233 fi
9234
9235 if eval "test \"`echo '$ac_cv_func_'socket`\" = yes"; then
9236   echo "$ac_t""yes" 1>&6
9237   :
9238 else
9239   echo "$ac_t""no" 1>&6
9240         
9241         echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
9242 echo "configure:9243: checking for main in -lsocket" >&5
9243 ac_lib_var=`echo socket'_'main | sed 'y%./+-:%__p__%'`
9244 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9245   echo $ac_n "(cached) $ac_c" 1>&6
9246 else
9247   ac_save_LIBS="$LIBS"
9248 LIBS="-lsocket  $LIBS"
9249 cat > conftest.$ac_ext <<EOF
9250 #line 9251 "configure"
9251 #include "confdefs.h"
9252
9253 int main() {
9254 main()
9255 ; return 0; }
9256 EOF
9257 if { (eval echo configure:9258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9258   rm -rf conftest*
9259   eval "ac_cv_lib_$ac_lib_var=yes"
9260 else
9261   echo "configure: failed program was:" >&5
9262   cat conftest.$ac_ext >&5
9263   rm -rf conftest*
9264   eval "ac_cv_lib_$ac_lib_var=no"
9265 fi
9266 rm -f conftest*
9267 LIBS="$ac_save_LIBS"
9268
9269 fi
9270 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9271   echo "$ac_t""yes" 1>&6
9272     ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9273     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9274   cat >> confdefs.h <<EOF
9275 #define $ac_tr_lib 1
9276 EOF
9277
9278   LIBS="-lsocket $LIBS"
9279
9280 else
9281   echo "$ac_t""no" 1>&6
9282 fi
9283
9284         echo $ac_n "checking for main in -lnet""... $ac_c" 1>&6
9285 echo "configure:9286: checking for main in -lnet" >&5
9286 ac_lib_var=`echo net'_'main | sed 'y%./+-:%__p__%'`
9287 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9288   echo $ac_n "(cached) $ac_c" 1>&6
9289 else
9290   ac_save_LIBS="$LIBS"
9291 LIBS="-lnet  $LIBS"
9292 cat > conftest.$ac_ext <<EOF
9293 #line 9294 "configure"
9294 #include "confdefs.h"
9295
9296 int main() {
9297 main()
9298 ; return 0; }
9299 EOF
9300 if { (eval echo configure:9301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9301   rm -rf conftest*
9302   eval "ac_cv_lib_$ac_lib_var=yes"
9303 else
9304   echo "configure: failed program was:" >&5
9305   cat conftest.$ac_ext >&5
9306   rm -rf conftest*
9307   eval "ac_cv_lib_$ac_lib_var=no"
9308 fi
9309 rm -f conftest*
9310 LIBS="$ac_save_LIBS"
9311
9312 fi
9313 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9314   echo "$ac_t""yes" 1>&6
9315     ac_tr_lib=HAVE_LIB`echo net | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9316     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9317   cat >> confdefs.h <<EOF
9318 #define $ac_tr_lib 1
9319 EOF
9320
9321   LIBS="-lnet $LIBS"
9322
9323 else
9324   echo "$ac_t""no" 1>&6
9325 fi
9326
9327         echo $ac_n "checking for main in -lnsl_s""... $ac_c" 1>&6
9328 echo "configure:9329: checking for main in -lnsl_s" >&5
9329 ac_lib_var=`echo nsl_s'_'main | sed 'y%./+-:%__p__%'`
9330 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9331   echo $ac_n "(cached) $ac_c" 1>&6
9332 else
9333   ac_save_LIBS="$LIBS"
9334 LIBS="-lnsl_s  $LIBS"
9335 cat > conftest.$ac_ext <<EOF
9336 #line 9337 "configure"
9337 #include "confdefs.h"
9338
9339 int main() {
9340 main()
9341 ; return 0; }
9342 EOF
9343 if { (eval echo configure:9344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9344   rm -rf conftest*
9345   eval "ac_cv_lib_$ac_lib_var=yes"
9346 else
9347   echo "configure: failed program was:" >&5
9348   cat conftest.$ac_ext >&5
9349   rm -rf conftest*
9350   eval "ac_cv_lib_$ac_lib_var=no"
9351 fi
9352 rm -f conftest*
9353 LIBS="$ac_save_LIBS"
9354
9355 fi
9356 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9357   echo "$ac_t""yes" 1>&6
9358     ac_tr_lib=HAVE_LIB`echo nsl_s | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9359     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9360   cat >> confdefs.h <<EOF
9361 #define $ac_tr_lib 1
9362 EOF
9363
9364   LIBS="-lnsl_s $LIBS"
9365
9366 else
9367   echo "$ac_t""no" 1>&6
9368 fi
9369
9370         echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
9371 echo "configure:9372: checking for main in -lnsl" >&5
9372 ac_lib_var=`echo nsl'_'main | sed 'y%./+-:%__p__%'`
9373 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9374   echo $ac_n "(cached) $ac_c" 1>&6
9375 else
9376   ac_save_LIBS="$LIBS"
9377 LIBS="-lnsl  $LIBS"
9378 cat > conftest.$ac_ext <<EOF
9379 #line 9380 "configure"
9380 #include "confdefs.h"
9381
9382 int main() {
9383 main()
9384 ; return 0; }
9385 EOF
9386 if { (eval echo configure:9387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9387   rm -rf conftest*
9388   eval "ac_cv_lib_$ac_lib_var=yes"
9389 else
9390   echo "configure: failed program was:" >&5
9391   cat conftest.$ac_ext >&5
9392   rm -rf conftest*
9393   eval "ac_cv_lib_$ac_lib_var=no"
9394 fi
9395 rm -f conftest*
9396 LIBS="$ac_save_LIBS"
9397
9398 fi
9399 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9400   echo "$ac_t""yes" 1>&6
9401     ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9402     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9403   cat >> confdefs.h <<EOF
9404 #define $ac_tr_lib 1
9405 EOF
9406
9407   LIBS="-lnsl $LIBS"
9408
9409 else
9410   echo "$ac_t""no" 1>&6
9411 fi
9412
9413         echo $ac_n "checking for socket in -linet""... $ac_c" 1>&6
9414 echo "configure:9415: checking for socket in -linet" >&5
9415 ac_lib_var=`echo inet'_'socket | sed 'y%./+-:%__p__%'`
9416 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9417   echo $ac_n "(cached) $ac_c" 1>&6
9418 else
9419   ac_save_LIBS="$LIBS"
9420 LIBS="-linet  $LIBS"
9421 cat > conftest.$ac_ext <<EOF
9422 #line 9423 "configure"
9423 #include "confdefs.h"
9424 /* Override any gcc2 internal prototype to avoid an error.  */
9425 /* We use char because int might match the return type of a gcc2
9426     builtin and then its argument prototype would still apply.  */
9427 char socket();
9428
9429 int main() {
9430 socket()
9431 ; return 0; }
9432 EOF
9433 if { (eval echo configure:9434: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9434   rm -rf conftest*
9435   eval "ac_cv_lib_$ac_lib_var=yes"
9436 else
9437   echo "configure: failed program was:" >&5
9438   cat conftest.$ac_ext >&5
9439   rm -rf conftest*
9440   eval "ac_cv_lib_$ac_lib_var=no"
9441 fi
9442 rm -f conftest*
9443 LIBS="$ac_save_LIBS"
9444
9445 fi
9446 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9447   echo "$ac_t""yes" 1>&6
9448     ac_tr_lib=HAVE_LIB`echo inet | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9449     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9450   cat >> confdefs.h <<EOF
9451 #define $ac_tr_lib 1
9452 EOF
9453
9454   LIBS="-linet $LIBS"
9455
9456 else
9457   echo "$ac_t""no" 1>&6
9458 fi
9459
9460         echo $ac_n "checking for main in -lgen""... $ac_c" 1>&6
9461 echo "configure:9462: checking for main in -lgen" >&5
9462 ac_lib_var=`echo gen'_'main | sed 'y%./+-:%__p__%'`
9463 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
9464   echo $ac_n "(cached) $ac_c" 1>&6
9465 else
9466   ac_save_LIBS="$LIBS"
9467 LIBS="-lgen  $LIBS"
9468 cat > conftest.$ac_ext <<EOF
9469 #line 9470 "configure"
9470 #include "confdefs.h"
9471
9472 int main() {
9473 main()
9474 ; return 0; }
9475 EOF
9476 if { (eval echo configure:9477: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9477   rm -rf conftest*
9478   eval "ac_cv_lib_$ac_lib_var=yes"
9479 else
9480   echo "configure: failed program was:" >&5
9481   cat conftest.$ac_ext >&5
9482   rm -rf conftest*
9483   eval "ac_cv_lib_$ac_lib_var=no"
9484 fi
9485 rm -f conftest*
9486 LIBS="$ac_save_LIBS"
9487
9488 fi
9489 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
9490   echo "$ac_t""yes" 1>&6
9491     ac_tr_lib=HAVE_LIB`echo gen | sed -e 's/[^a-zA-Z0-9_]/_/g' \
9492     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
9493   cat >> confdefs.h <<EOF
9494 #define $ac_tr_lib 1
9495 EOF
9496
9497   LIBS="-lgen $LIBS"
9498
9499 else
9500   echo "$ac_t""no" 1>&6
9501 fi
9502
9503
9504 fi
9505
9506
9507 echo $ac_n "checking for select""... $ac_c" 1>&6
9508 echo "configure:9509: checking for select" >&5
9509 if eval "test \"\${ac_cv_func_select+set}\" = set"; then
9510   echo $ac_n "(cached) $ac_c" 1>&6
9511 else
9512   cat > conftest.$ac_ext <<EOF
9513 #line 9514 "configure"
9514 #include "confdefs.h"
9515 /* System header to define __stub macros and hopefully few prototypes,
9516     which can conflict with char select(); below.  */
9517 #include <assert.h>
9518 /* Override any gcc2 internal prototype to avoid an error.  */
9519 /* We use char because int might match the return type of a gcc2
9520     builtin and then its argument prototype would still apply.  */
9521 char select();
9522 char (*f)();
9523
9524 int main() {
9525
9526 /* The GNU C library defines this for functions which it implements
9527     to always fail with ENOSYS.  Some functions are actually named
9528     something starting with __ and the normal name is an alias.  */
9529 #if defined (__stub_select) || defined (__stub___select)
9530 choke me
9531 #else
9532 f = select;
9533 #endif
9534
9535 ; return 0; }
9536 EOF
9537 if { (eval echo configure:9538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9538   rm -rf conftest*
9539   eval "ac_cv_func_select=yes"
9540 else
9541   echo "configure: failed program was:" >&5
9542   cat conftest.$ac_ext >&5
9543   rm -rf conftest*
9544   eval "ac_cv_func_select=no"
9545 fi
9546 rm -f conftest*
9547 fi
9548
9549 if eval "test \"`echo '$ac_cv_func_'select`\" = yes"; then
9550   echo "$ac_t""yes" 1>&6
9551   :
9552 else
9553   echo "$ac_t""no" 1>&6
9554 { echo "configure: error: select() required." 1>&2; exit 1; }
9555 fi
9556
9557
9558 if test "${ac_cv_header_winsock_h}" != yes; then
9559                                 echo $ac_n "checking types of arguments for select()""... $ac_c" 1>&6
9560 echo "configure:9561: checking types of arguments for select()" >&5
9561  if eval "test \"\${ac_cv_func_select_arg234+set}\" = set"; then
9562   echo $ac_n "(cached) $ac_c" 1>&6
9563 else
9564    if eval "test \"\${ac_cv_func_select_arg1+set}\" = set"; then
9565   echo $ac_n "(cached) $ac_c" 1>&6
9566 else
9567     if eval "test \"\${ac_cv_func_select_arg5+set}\" = set"; then
9568   echo $ac_n "(cached) $ac_c" 1>&6
9569 else
9570      for ac_cv_func_select_arg234 in 'fd_set *' 'int *' 'void *'; do
9571      for ac_cv_func_select_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do
9572       for ac_cv_func_select_arg5 in 'struct timeval *' 'const struct timeval *'; do
9573        cat > conftest.$ac_ext <<EOF
9574 #line 9575 "configure"
9575 #include "confdefs.h"
9576 #ifdef HAVE_SYS_TYPES_H
9577 #include <sys/types.h>
9578 #endif
9579 #ifdef HAVE_SYS_TIME_H
9580 #include <sys/time.h>
9581 #endif
9582 #ifdef HAVE_SYS_SELECT_H
9583 #include <sys/select.h>
9584 #endif
9585 #ifdef HAVE_SYS_SOCKET_H
9586 #include <sys/socket.h>
9587 #endif
9588 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);
9589 int main() {
9590
9591 ; return 0; }
9592 EOF
9593 if { (eval echo configure:9594: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
9594   rm -rf conftest*
9595           ac_not_found=no ; break 3
9596 else
9597   echo "configure: failed program was:" >&5
9598   cat conftest.$ac_ext >&5
9599   rm -rf conftest*
9600   ac_not_found=yes
9601 fi
9602 rm -f conftest*
9603       done
9604      done
9605     done
9606    
9607 fi
9608   
9609 fi
9610  
9611 fi
9612  if test "$ac_not_found" = yes; then
9613   ac_cv_func_select_arg1=int 
9614   ac_cv_func_select_arg234='int *' 
9615   ac_cv_func_select_arg5='struct timeval *'
9616  fi
9617  echo "$ac_t""$ac_cv_func_select_arg1,$ac_cv_func_select_arg234,$ac_cv_func_select_arg5" 1>&6
9618  cat >> confdefs.h <<EOF
9619 #define SELECT_TYPE_ARG1 $ac_cv_func_select_arg1
9620 EOF
9621
9622  cat >> confdefs.h <<EOF
9623 #define SELECT_TYPE_ARG234 ($ac_cv_func_select_arg234)
9624 EOF
9625
9626  cat >> confdefs.h <<EOF
9627 #define SELECT_TYPE_ARG5 ($ac_cv_func_select_arg5)
9628 EOF
9629
9630
9631 fi
9632
9633
9634 for ac_hdr in regex.h 
9635 do
9636 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9637 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9638 echo "configure:9639: checking for $ac_hdr" >&5
9639 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9640   echo $ac_n "(cached) $ac_c" 1>&6
9641 else
9642   cat > conftest.$ac_ext <<EOF
9643 #line 9644 "configure"
9644 #include "confdefs.h"
9645 #include <$ac_hdr>
9646 EOF
9647 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9648 { (eval echo configure:9649: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9649 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9650 if test -z "$ac_err"; then
9651   rm -rf conftest*
9652   eval "ac_cv_header_$ac_safe=yes"
9653 else
9654   echo "$ac_err" >&5
9655   echo "configure: failed program was:" >&5
9656   cat conftest.$ac_ext >&5
9657   rm -rf conftest*
9658   eval "ac_cv_header_$ac_safe=no"
9659 fi
9660 rm -f conftest*
9661 fi
9662 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9663   echo "$ac_t""yes" 1>&6
9664     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9665   cat >> confdefs.h <<EOF
9666 #define $ac_tr_hdr 1
9667 EOF
9668  
9669 else
9670   echo "$ac_t""no" 1>&6
9671 fi
9672 done
9673
9674 if test "$ac_cv_header_regex_h" != yes ; then
9675         { echo "configure: error: POSIX regex.h required." 1>&2; exit 1; }
9676 fi
9677
9678 echo $ac_n "checking for library containing regfree""... $ac_c" 1>&6
9679 echo "configure:9680: checking for library containing regfree" >&5
9680 if eval "test \"\${ac_cv_search_regfree+set}\" = set"; then
9681   echo $ac_n "(cached) $ac_c" 1>&6
9682 else
9683   ac_func_search_save_LIBS="$LIBS"
9684 ac_cv_search_regfree="no"
9685 cat > conftest.$ac_ext <<EOF
9686 #line 9687 "configure"
9687 #include "confdefs.h"
9688 /* Override any gcc2 internal prototype to avoid an error.  */
9689 /* We use char because int might match the return type of a gcc2
9690     builtin and then its argument prototype would still apply.  */
9691 char regfree();
9692
9693 int main() {
9694 regfree()
9695 ; return 0; }
9696 EOF
9697 if { (eval echo configure:9698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9698   rm -rf conftest*
9699   ac_cv_search_regfree="none required"
9700 else
9701   echo "configure: failed program was:" >&5
9702   cat conftest.$ac_ext >&5
9703 fi
9704 rm -f conftest*
9705 test "$ac_cv_search_regfree" = "no" && for ac_lib in regex gnuregex; do
9706 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9707 cat > conftest.$ac_ext <<EOF
9708 #line 9709 "configure"
9709 #include "confdefs.h"
9710 /* Override any gcc2 internal prototype to avoid an error.  */
9711 /* We use char because int might match the return type of a gcc2
9712     builtin and then its argument prototype would still apply.  */
9713 char regfree();
9714
9715 int main() {
9716 regfree()
9717 ; return 0; }
9718 EOF
9719 if { (eval echo configure:9720: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9720   rm -rf conftest*
9721   ac_cv_search_regfree="-l$ac_lib"
9722 break
9723 else
9724   echo "configure: failed program was:" >&5
9725   cat conftest.$ac_ext >&5
9726 fi
9727 rm -f conftest*
9728 done
9729 LIBS="$ac_func_search_save_LIBS"
9730 fi
9731
9732 echo "$ac_t""$ac_cv_search_regfree" 1>&6
9733 if test "$ac_cv_search_regfree" != "no"; then
9734   test "$ac_cv_search_regfree" = "none required" || LIBS="$ac_cv_search_regfree $LIBS"
9735   :
9736 else :
9737   { echo "configure: error: POSIX regex required." 1>&2; exit 1; }
9738 fi
9739
9740
9741 echo $ac_n "checking for compatible POSIX regex""... $ac_c" 1>&6
9742 echo "configure:9743: checking for compatible POSIX regex" >&5
9743 if eval "test \"\${ol_cv_c_posix_regex+set}\" = set"; then
9744   echo $ac_n "(cached) $ac_c" 1>&6
9745 else
9746   
9747         if test "$cross_compiling" = yes; then
9748   ol_cv_c_posix_regex=cross
9749 else
9750   cat > conftest.$ac_ext <<EOF
9751 #line 9752 "configure"
9752 #include "confdefs.h"
9753
9754 #include <sys/types.h>
9755 #include <regex.h>
9756 static char *pattern, *string;
9757 main()
9758 {
9759         int rc;
9760         regex_t re;
9761
9762         pattern = "^A";
9763
9764         if(regcomp(&re, pattern, 0)) {
9765                 return -1;
9766         }
9767         
9768         string = "ALL MATCH";
9769         
9770         rc = regexec(&re, string, 0, (void*)0, 0);
9771
9772         regfree(&re);
9773
9774         return rc;
9775 }
9776 EOF
9777 if { (eval echo configure:9778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
9778 then
9779   ol_cv_c_posix_regex=yes
9780 else
9781   echo "configure: failed program was:" >&5
9782   cat conftest.$ac_ext >&5
9783   rm -fr conftest*
9784   ol_cv_c_posix_regex=no
9785 fi
9786 rm -fr conftest*
9787 fi
9788
9789 fi
9790
9791 echo "$ac_t""$ol_cv_c_posix_regex" 1>&6
9792
9793 if test "$ol_cv_c_posix_regex" = no ; then
9794         { echo "configure: error: broken POSIX regex!" 1>&2; exit 1; }
9795 fi
9796
9797
9798 have_uuid=no
9799 for ac_hdr in sys/uuid.h
9800 do
9801 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
9802 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
9803 echo "configure:9804: checking for $ac_hdr" >&5
9804 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
9805   echo $ac_n "(cached) $ac_c" 1>&6
9806 else
9807   cat > conftest.$ac_ext <<EOF
9808 #line 9809 "configure"
9809 #include "confdefs.h"
9810 #include <$ac_hdr>
9811 EOF
9812 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
9813 { (eval echo configure:9814: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
9814 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
9815 if test -z "$ac_err"; then
9816   rm -rf conftest*
9817   eval "ac_cv_header_$ac_safe=yes"
9818 else
9819   echo "$ac_err" >&5
9820   echo "configure: failed program was:" >&5
9821   cat conftest.$ac_ext >&5
9822   rm -rf conftest*
9823   eval "ac_cv_header_$ac_safe=no"
9824 fi
9825 rm -f conftest*
9826 fi
9827 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
9828   echo "$ac_t""yes" 1>&6
9829     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
9830   cat >> confdefs.h <<EOF
9831 #define $ac_tr_hdr 1
9832 EOF
9833  
9834 else
9835   echo "$ac_t""no" 1>&6
9836 fi
9837 done
9838
9839 if test $ac_cv_header_sys_uuid_h = yes ; then
9840         save_LIBS="$LIBS"
9841         
9842 echo $ac_n "checking for library containing uuid_to_str""... $ac_c" 1>&6
9843 echo "configure:9844: checking for library containing uuid_to_str" >&5
9844 if eval "test \"\${ac_cv_search_uuid_to_str+set}\" = set"; then
9845   echo $ac_n "(cached) $ac_c" 1>&6
9846 else
9847   ac_func_search_save_LIBS="$LIBS"
9848 ac_cv_search_uuid_to_str="no"
9849 cat > conftest.$ac_ext <<EOF
9850 #line 9851 "configure"
9851 #include "confdefs.h"
9852 /* Override any gcc2 internal prototype to avoid an error.  */
9853 /* We use char because int might match the return type of a gcc2
9854     builtin and then its argument prototype would still apply.  */
9855 char uuid_to_str();
9856
9857 int main() {
9858 uuid_to_str()
9859 ; return 0; }
9860 EOF
9861 if { (eval echo configure:9862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9862   rm -rf conftest*
9863   ac_cv_search_uuid_to_str="none required"
9864 else
9865   echo "configure: failed program was:" >&5
9866   cat conftest.$ac_ext >&5
9867 fi
9868 rm -f conftest*
9869 test "$ac_cv_search_uuid_to_str" = "no" && for ac_lib in uuid; do
9870 LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9871 cat > conftest.$ac_ext <<EOF
9872 #line 9873 "configure"
9873 #include "confdefs.h"
9874 /* Override any gcc2 internal prototype to avoid an error.  */
9875 /* We use char because int might match the return type of a gcc2
9876     builtin and then its argument prototype would still apply.  */
9877 char uuid_to_str();
9878
9879 int main() {
9880 uuid_to_str()
9881 ; return 0; }
9882 EOF
9883 if { (eval echo configure:9884: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9884   rm -rf conftest*
9885   ac_cv_search_uuid_to_str="-l$ac_lib"
9886 break
9887 else
9888   echo "configure: failed program was:" >&5
9889   cat conftest.$ac_ext >&5
9890 fi
9891 rm -f conftest*
9892 done
9893 LIBS="$ac_func_search_save_LIBS"
9894 fi
9895
9896 echo "$ac_t""$ac_cv_search_uuid_to_str" 1>&6
9897 if test "$ac_cv_search_uuid_to_str" != "no"; then
9898   test "$ac_cv_search_uuid_to_str" = "none required" || LIBS="$ac_cv_search_uuid_to_str $LIBS"
9899   have_uuid=yes
9900 else :
9901   :
9902 fi
9903         LIBS="$save_LIBS"
9904
9905         if test have_uuid = yes ; then
9906                 cat >> confdefs.h <<\EOF
9907 #define HAVE_UUID_TO_STR 1
9908 EOF
9909
9910
9911                 test "$ac_cv_search_uuid_to_str" = "none required" || \
9912                         SLAPD_LIBS="$SLAPD_LIBS $ac_cv_search_uuid_to_str"
9913         fi
9914 fi
9915
9916 if test $have_uuid = no ; then
9917         echo $ac_n "checking to see if -lrpcrt4 is needed for win32 UUID support""... $ac_c" 1>&6
9918 echo "configure:9919: checking to see if -lrpcrt4 is needed for win32 UUID support" >&5
9919         save_LIBS="$LIBS"
9920         LIBS="$LIBS -lrpcrt4"
9921         cat > conftest.$ac_ext <<EOF
9922 #line 9923 "configure"
9923 #include "confdefs.h"
9924
9925                 char UuidCreate@4();
9926                 char UuidToStringA@8();
9927                 
9928 int main() {
9929
9930                 UuidCreate@4();
9931                 UuidToStringA@8();
9932                 
9933 ; return 0; }
9934 EOF
9935 if { (eval echo configure:9936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9936   rm -rf conftest*
9937   need_rpcrt=yes
9938 else
9939   echo "configure: failed program was:" >&5
9940   cat conftest.$ac_ext >&5
9941   rm -rf conftest*
9942   need_rpcrt=no
9943 fi
9944 rm -f conftest*
9945         if test $need_rpcrt = yes; then
9946                 SLAPD_LIBS="$SLAPD_LIBS -lrpcrt4"
9947         fi
9948         LIBS="$save_LIBS"
9949         echo "$ac_t""$need_rpcrt" 1>&6
9950 fi
9951
9952 ol_link_dnssrv=no
9953 echo $ac_n "checking for res_query""... $ac_c" 1>&6
9954 echo "configure:9955: checking for res_query" >&5
9955 if eval "test \"\${ac_cv_func_res_query+set}\" = set"; then
9956   echo $ac_n "(cached) $ac_c" 1>&6
9957 else
9958   cat > conftest.$ac_ext <<EOF
9959 #line 9960 "configure"
9960 #include "confdefs.h"
9961 /* System header to define __stub macros and hopefully few prototypes,
9962     which can conflict with char res_query(); below.  */
9963 #include <assert.h>
9964 /* Override any gcc2 internal prototype to avoid an error.  */
9965 /* We use char because int might match the return type of a gcc2
9966     builtin and then its argument prototype would still apply.  */
9967 char res_query();
9968 char (*f)();
9969
9970 int main() {
9971
9972 /* The GNU C library defines this for functions which it implements
9973     to always fail with ENOSYS.  Some functions are actually named
9974     something starting with __ and the normal name is an alias.  */
9975 #if defined (__stub_res_query) || defined (__stub___res_query)
9976 choke me
9977 #else
9978 f = res_query;
9979 #endif
9980
9981 ; return 0; }
9982 EOF
9983 if { (eval echo configure:9984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
9984   rm -rf conftest*
9985   eval "ac_cv_func_res_query=yes"
9986 else
9987   echo "configure: failed program was:" >&5
9988   cat conftest.$ac_ext >&5
9989   rm -rf conftest*
9990   eval "ac_cv_func_res_query=no"
9991 fi
9992 rm -f conftest*
9993 fi
9994
9995 if eval "test \"`echo '$ac_cv_func_'res_query`\" = yes"; then
9996   echo "$ac_t""yes" 1>&6
9997   :
9998 else
9999   echo "$ac_t""no" 1>&6
10000 fi
10001
10002 if test $ac_cv_func_res_query = no ; then 
10003         echo $ac_n "checking for __res_query""... $ac_c" 1>&6
10004 echo "configure:10005: checking for __res_query" >&5
10005 if eval "test \"\${ac_cv_func___res_query+set}\" = set"; then
10006   echo $ac_n "(cached) $ac_c" 1>&6
10007 else
10008   cat > conftest.$ac_ext <<EOF
10009 #line 10010 "configure"
10010 #include "confdefs.h"
10011 /* System header to define __stub macros and hopefully few prototypes,
10012     which can conflict with char __res_query(); below.  */
10013 #include <assert.h>
10014 /* Override any gcc2 internal prototype to avoid an error.  */
10015 /* We use char because int might match the return type of a gcc2
10016     builtin and then its argument prototype would still apply.  */
10017 char __res_query();
10018 char (*f)();
10019
10020 int main() {
10021
10022 /* The GNU C library defines this for functions which it implements
10023     to always fail with ENOSYS.  Some functions are actually named
10024     something starting with __ and the normal name is an alias.  */
10025 #if defined (__stub___res_query) || defined (__stub_____res_query)
10026 choke me
10027 #else
10028 f = __res_query;
10029 #endif
10030
10031 ; return 0; }
10032 EOF
10033 if { (eval echo configure:10034: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10034   rm -rf conftest*
10035   eval "ac_cv_func___res_query=yes"
10036 else
10037   echo "configure: failed program was:" >&5
10038   cat conftest.$ac_ext >&5
10039   rm -rf conftest*
10040   eval "ac_cv_func___res_query=no"
10041 fi
10042 rm -f conftest*
10043 fi
10044
10045 if eval "test \"`echo '$ac_cv_func_'__res_query`\" = yes"; then
10046   echo "$ac_t""yes" 1>&6
10047   :
10048 else
10049   echo "$ac_t""no" 1>&6
10050 fi
10051
10052         ac_cv_func_res_query=$ac_cv_func___res_query
10053 fi
10054
10055 if test $ac_cv_func_res_query = no ; then 
10056         echo $ac_n "checking for res_query in -lbind""... $ac_c" 1>&6
10057 echo "configure:10058: checking for res_query in -lbind" >&5
10058 ac_lib_var=`echo bind'_'res_query | sed 'y%./+-:%__p__%'`
10059 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10060   echo $ac_n "(cached) $ac_c" 1>&6
10061 else
10062   ac_save_LIBS="$LIBS"
10063 LIBS="-lbind  $LIBS"
10064 cat > conftest.$ac_ext <<EOF
10065 #line 10066 "configure"
10066 #include "confdefs.h"
10067 /* Override any gcc2 internal prototype to avoid an error.  */
10068 /* We use char because int might match the return type of a gcc2
10069     builtin and then its argument prototype would still apply.  */
10070 char res_query();
10071
10072 int main() {
10073 res_query()
10074 ; return 0; }
10075 EOF
10076 if { (eval echo configure:10077: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10077   rm -rf conftest*
10078   eval "ac_cv_lib_$ac_lib_var=yes"
10079 else
10080   echo "configure: failed program was:" >&5
10081   cat conftest.$ac_ext >&5
10082   rm -rf conftest*
10083   eval "ac_cv_lib_$ac_lib_var=no"
10084 fi
10085 rm -f conftest*
10086 LIBS="$ac_save_LIBS"
10087
10088 fi
10089 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10090   echo "$ac_t""yes" 1>&6
10091     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10092     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10093   cat >> confdefs.h <<EOF
10094 #define $ac_tr_lib 1
10095 EOF
10096
10097   LIBS="-lbind $LIBS"
10098
10099 else
10100   echo "$ac_t""no" 1>&6
10101 fi
10102
10103         ac_cv_func_res_query=$ac_cv_lib_bind_res_query
10104 fi
10105
10106 if test $ac_cv_func_res_query = no ; then 
10107         echo $ac_n "checking for __res_query in -lbind""... $ac_c" 1>&6
10108 echo "configure:10109: checking for __res_query in -lbind" >&5
10109 ac_lib_var=`echo bind'_'__res_query | sed 'y%./+-:%__p__%'`
10110 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10111   echo $ac_n "(cached) $ac_c" 1>&6
10112 else
10113   ac_save_LIBS="$LIBS"
10114 LIBS="-lbind  $LIBS"
10115 cat > conftest.$ac_ext <<EOF
10116 #line 10117 "configure"
10117 #include "confdefs.h"
10118 /* Override any gcc2 internal prototype to avoid an error.  */
10119 /* We use char because int might match the return type of a gcc2
10120     builtin and then its argument prototype would still apply.  */
10121 char __res_query();
10122
10123 int main() {
10124 __res_query()
10125 ; return 0; }
10126 EOF
10127 if { (eval echo configure:10128: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10128   rm -rf conftest*
10129   eval "ac_cv_lib_$ac_lib_var=yes"
10130 else
10131   echo "configure: failed program was:" >&5
10132   cat conftest.$ac_ext >&5
10133   rm -rf conftest*
10134   eval "ac_cv_lib_$ac_lib_var=no"
10135 fi
10136 rm -f conftest*
10137 LIBS="$ac_save_LIBS"
10138
10139 fi
10140 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10141   echo "$ac_t""yes" 1>&6
10142     ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10143     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10144   cat >> confdefs.h <<EOF
10145 #define $ac_tr_lib 1
10146 EOF
10147
10148   LIBS="-lbind $LIBS"
10149
10150 else
10151   echo "$ac_t""no" 1>&6
10152 fi
10153
10154         ac_cv_func_res_query=$ac_cv_lib_bind___res_query
10155 fi
10156
10157 if test $ac_cv_func_res_query = no ; then 
10158         echo $ac_n "checking for res_query in -lresolv""... $ac_c" 1>&6
10159 echo "configure:10160: checking for res_query in -lresolv" >&5
10160 ac_lib_var=`echo resolv'_'res_query | sed 'y%./+-:%__p__%'`
10161 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10162   echo $ac_n "(cached) $ac_c" 1>&6
10163 else
10164   ac_save_LIBS="$LIBS"
10165 LIBS="-lresolv  $LIBS"
10166 cat > conftest.$ac_ext <<EOF
10167 #line 10168 "configure"
10168 #include "confdefs.h"
10169 /* Override any gcc2 internal prototype to avoid an error.  */
10170 /* We use char because int might match the return type of a gcc2
10171     builtin and then its argument prototype would still apply.  */
10172 char res_query();
10173
10174 int main() {
10175 res_query()
10176 ; return 0; }
10177 EOF
10178 if { (eval echo configure:10179: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10179   rm -rf conftest*
10180   eval "ac_cv_lib_$ac_lib_var=yes"
10181 else
10182   echo "configure: failed program was:" >&5
10183   cat conftest.$ac_ext >&5
10184   rm -rf conftest*
10185   eval "ac_cv_lib_$ac_lib_var=no"
10186 fi
10187 rm -f conftest*
10188 LIBS="$ac_save_LIBS"
10189
10190 fi
10191 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10192   echo "$ac_t""yes" 1>&6
10193     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10194     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10195   cat >> confdefs.h <<EOF
10196 #define $ac_tr_lib 1
10197 EOF
10198
10199   LIBS="-lresolv $LIBS"
10200
10201 else
10202   echo "$ac_t""no" 1>&6
10203 fi
10204
10205         ac_cv_func_res_query=$ac_cv_lib_resolv_res_query
10206 fi
10207
10208 if test $ac_cv_func_res_query = no ; then 
10209         echo $ac_n "checking for __res_query in -lresolv""... $ac_c" 1>&6
10210 echo "configure:10211: checking for __res_query in -lresolv" >&5
10211 ac_lib_var=`echo resolv'_'__res_query | sed 'y%./+-:%__p__%'`
10212 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10213   echo $ac_n "(cached) $ac_c" 1>&6
10214 else
10215   ac_save_LIBS="$LIBS"
10216 LIBS="-lresolv  $LIBS"
10217 cat > conftest.$ac_ext <<EOF
10218 #line 10219 "configure"
10219 #include "confdefs.h"
10220 /* Override any gcc2 internal prototype to avoid an error.  */
10221 /* We use char because int might match the return type of a gcc2
10222     builtin and then its argument prototype would still apply.  */
10223 char __res_query();
10224
10225 int main() {
10226 __res_query()
10227 ; return 0; }
10228 EOF
10229 if { (eval echo configure:10230: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10230   rm -rf conftest*
10231   eval "ac_cv_lib_$ac_lib_var=yes"
10232 else
10233   echo "configure: failed program was:" >&5
10234   cat conftest.$ac_ext >&5
10235   rm -rf conftest*
10236   eval "ac_cv_lib_$ac_lib_var=no"
10237 fi
10238 rm -f conftest*
10239 LIBS="$ac_save_LIBS"
10240
10241 fi
10242 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10243   echo "$ac_t""yes" 1>&6
10244     ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
10245     -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
10246   cat >> confdefs.h <<EOF
10247 #define $ac_tr_lib 1
10248 EOF
10249
10250   LIBS="-lresolv $LIBS"
10251
10252 else
10253   echo "$ac_t""no" 1>&6
10254 fi
10255
10256         ac_cv_func_res_query=$ac_cv_lib_resolv___res_query
10257 fi
10258
10259 if test "$ac_cv_func_res_query" = yes ; then
10260         cat >> confdefs.h <<\EOF
10261 #define HAVE_RES_QUERY 1
10262 EOF
10263
10264
10265         if test $ol_enable_dnssrv != no ; then
10266                 ol_link_dnssrv=yes
10267         fi
10268 fi
10269
10270 if test "$ol_enable_dnssrv" = yes -a "$ol_link_dnssrv" = no ; then
10271         { echo "configure: error: DNSSRV requires res_query()" 1>&2; exit 1; }
10272 fi
10273
10274 for ac_func in getaddrinfo gai_strerror inet_ntop 
10275 do
10276 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
10277 echo "configure:10278: checking for $ac_func" >&5
10278 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
10279   echo $ac_n "(cached) $ac_c" 1>&6
10280 else
10281   cat > conftest.$ac_ext <<EOF
10282 #line 10283 "configure"
10283 #include "confdefs.h"
10284 /* System header to define __stub macros and hopefully few prototypes,
10285     which can conflict with char $ac_func(); below.  */
10286 #include <assert.h>
10287 /* Override any gcc2 internal prototype to avoid an error.  */
10288 /* We use char because int might match the return type of a gcc2
10289     builtin and then its argument prototype would still apply.  */
10290 char $ac_func();
10291 char (*f)();
10292
10293 int main() {
10294
10295 /* The GNU C library defines this for functions which it implements
10296     to always fail with ENOSYS.  Some functions are actually named
10297     something starting with __ and the normal name is an alias.  */
10298 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10299 choke me
10300 #else
10301 f = $ac_func;
10302 #endif
10303
10304 ; return 0; }
10305 EOF
10306 if { (eval echo configure:10307: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10307   rm -rf conftest*
10308   eval "ac_cv_func_$ac_func=yes"
10309 else
10310   echo "configure: failed program was:" >&5
10311   cat conftest.$ac_ext >&5
10312   rm -rf conftest*
10313   eval "ac_cv_func_$ac_func=no"
10314 fi
10315 rm -f conftest*
10316 fi
10317
10318 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
10319   echo "$ac_t""yes" 1>&6
10320     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
10321   cat >> confdefs.h <<EOF
10322 #define $ac_tr_func 1
10323 EOF
10324  
10325 else
10326   echo "$ac_t""no" 1>&6
10327 fi
10328 done
10329
10330
10331 ol_link_ipv6=no
10332 if test $ac_cv_func_getaddrinfo = no -o $ac_cv_func_inet_ntop = no ; then
10333         if test $ol_enable_ipv6 = yes ; then
10334                 { echo "configure: error: IPv6 support requires getaddrinfo() and inet_ntop()" 1>&2; exit 1; }
10335         fi
10336 elif test $ol_enable_ipv6 != no ; then
10337         echo $ac_n "checking INET6_ADDRSTRLEN""... $ac_c" 1>&6
10338 echo "configure:10339: checking INET6_ADDRSTRLEN" >&5
10339 if eval "test \"\${ol_cv_inet6_addrstrlen+set}\" = set"; then
10340   echo $ac_n "(cached) $ac_c" 1>&6
10341 else
10342   
10343                 cat > conftest.$ac_ext <<EOF
10344 #line 10345 "configure"
10345 #include "confdefs.h"
10346
10347 #                       include <netinet/in.h>
10348 #                       ifdef INET6_ADDRSTRLEN
10349                                 __has_inet6_addrstrlen__;
10350 #                       endif
10351                 
10352 EOF
10353 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10354   egrep "__has_inet6_addrstrlen__" >/dev/null 2>&1; then
10355   rm -rf conftest*
10356   ol_cv_inet6_addrstrlen=yes
10357 else
10358   rm -rf conftest*
10359   ol_cv_inet6_addrstrlen=no
10360 fi
10361 rm -f conftest*
10362
10363 fi
10364
10365 echo "$ac_t""$ol_cv_inet6_addrstrlen" 1>&6
10366
10367         if test $ol_cv_inet6_addrstrlen = yes ; then
10368                 ol_link_ipv6=yes
10369         elif test $ol_enable_ipv6 = yes ; then
10370                 { echo "configure: error: IPv6 support requires INET6_ADDRSTRLEN" 1>&2; exit 1; }
10371         fi
10372 fi
10373
10374 if test $ol_enable_local != no ; then
10375         for ac_hdr in sys/un.h 
10376 do
10377 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10378 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10379 echo "configure:10380: checking for $ac_hdr" >&5
10380 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10381   echo $ac_n "(cached) $ac_c" 1>&6
10382 else
10383   cat > conftest.$ac_ext <<EOF
10384 #line 10385 "configure"
10385 #include "confdefs.h"
10386 #include <$ac_hdr>
10387 EOF
10388 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10389 { (eval echo configure:10390: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10390 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10391 if test -z "$ac_err"; then
10392   rm -rf conftest*
10393   eval "ac_cv_header_$ac_safe=yes"
10394 else
10395   echo "$ac_err" >&5
10396   echo "configure: failed program was:" >&5
10397   cat conftest.$ac_ext >&5
10398   rm -rf conftest*
10399   eval "ac_cv_header_$ac_safe=no"
10400 fi
10401 rm -f conftest*
10402 fi
10403 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10404   echo "$ac_t""yes" 1>&6
10405     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10406   cat >> confdefs.h <<EOF
10407 #define $ac_tr_hdr 1
10408 EOF
10409  
10410 else
10411   echo "$ac_t""no" 1>&6
10412 fi
10413 done
10414
10415
10416         if test $ol_enable_local = auto ; then
10417                 ol_enable_local=$ac_cv_header_sys_un_h
10418         elif test $ac_cv_header_sys_un_h = no ; then
10419                 { echo "configure: error: AF_LOCAL domain support requires sys/un.h" 1>&2; exit 1; }
10420         fi
10421 fi
10422
10423 ol_link_kbind=no
10424 ol_link_kpasswd=no
10425 ol_link_krb5=no
10426 ol_link_krb4=no
10427
10428 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10429         -o $ol_with_kerberos = k5 -o $ol_with_kerberos = k5only \
10430         -o $ol_with_kerberos = k425 ; then
10431
10432         for ac_hdr in krb5.h
10433 do
10434 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10435 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10436 echo "configure:10437: checking for $ac_hdr" >&5
10437 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10438   echo $ac_n "(cached) $ac_c" 1>&6
10439 else
10440   cat > conftest.$ac_ext <<EOF
10441 #line 10442 "configure"
10442 #include "confdefs.h"
10443 #include <$ac_hdr>
10444 EOF
10445 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10446 { (eval echo configure:10447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10447 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10448 if test -z "$ac_err"; then
10449   rm -rf conftest*
10450   eval "ac_cv_header_$ac_safe=yes"
10451 else
10452   echo "$ac_err" >&5
10453   echo "configure: failed program was:" >&5
10454   cat conftest.$ac_ext >&5
10455   rm -rf conftest*
10456   eval "ac_cv_header_$ac_safe=no"
10457 fi
10458 rm -f conftest*
10459 fi
10460 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10461   echo "$ac_t""yes" 1>&6
10462     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10463   cat >> confdefs.h <<EOF
10464 #define $ac_tr_hdr 1
10465 EOF
10466  
10467 else
10468   echo "$ac_t""no" 1>&6
10469 fi
10470 done
10471
10472
10473         if test $ac_cv_header_krb5_h = yes ; then
10474                                 for ac_hdr in heim_err.h
10475 do
10476 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10477 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10478 echo "configure:10479: checking for $ac_hdr" >&5
10479 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10480   echo $ac_n "(cached) $ac_c" 1>&6
10481 else
10482   cat > conftest.$ac_ext <<EOF
10483 #line 10484 "configure"
10484 #include "confdefs.h"
10485 #include <$ac_hdr>
10486 EOF
10487 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10488 { (eval echo configure:10489: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10489 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10490 if test -z "$ac_err"; then
10491   rm -rf conftest*
10492   eval "ac_cv_header_$ac_safe=yes"
10493 else
10494   echo "$ac_err" >&5
10495   echo "configure: failed program was:" >&5
10496   cat conftest.$ac_ext >&5
10497   rm -rf conftest*
10498   eval "ac_cv_header_$ac_safe=no"
10499 fi
10500 rm -f conftest*
10501 fi
10502 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10503   echo "$ac_t""yes" 1>&6
10504     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10505   cat >> confdefs.h <<EOF
10506 #define $ac_tr_hdr 1
10507 EOF
10508  
10509 else
10510   echo "$ac_t""no" 1>&6
10511 fi
10512 done
10513
10514                 if test $ac_cv_header_heim_err_h = yes ; then
10515                         krb5_impl=heimdal
10516                 else
10517                         krb5_impl=mit
10518                 fi
10519
10520                 if test $krb5_impl = mit; then
10521                         echo $ac_n "checking for main in -lk5crypto""... $ac_c" 1>&6
10522 echo "configure:10523: checking for main in -lk5crypto" >&5
10523 ac_lib_var=`echo k5crypto'_'main | sed 'y%./+-:%__p__%'`
10524 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10525   echo $ac_n "(cached) $ac_c" 1>&6
10526 else
10527   ac_save_LIBS="$LIBS"
10528 LIBS="-lk5crypto  $LIBS"
10529 cat > conftest.$ac_ext <<EOF
10530 #line 10531 "configure"
10531 #include "confdefs.h"
10532
10533 int main() {
10534 main()
10535 ; return 0; }
10536 EOF
10537 if { (eval echo configure:10538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10538   rm -rf conftest*
10539   eval "ac_cv_lib_$ac_lib_var=yes"
10540 else
10541   echo "configure: failed program was:" >&5
10542   cat conftest.$ac_ext >&5
10543   rm -rf conftest*
10544   eval "ac_cv_lib_$ac_lib_var=no"
10545 fi
10546 rm -f conftest*
10547 LIBS="$ac_save_LIBS"
10548
10549 fi
10550 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10551   echo "$ac_t""yes" 1>&6
10552   krb5crypto=k5crypto
10553 else
10554   echo "$ac_t""no" 1>&6
10555 krb5crypto=crypto
10556 fi
10557
10558
10559                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10560 echo "configure:10561: checking for main in -lkrb5" >&5
10561 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10562 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10563   echo $ac_n "(cached) $ac_c" 1>&6
10564 else
10565   ac_save_LIBS="$LIBS"
10566 LIBS="-lkrb5 -l$krb5crypto -lcom_err $LIBS"
10567 cat > conftest.$ac_ext <<EOF
10568 #line 10569 "configure"
10569 #include "confdefs.h"
10570
10571 int main() {
10572 main()
10573 ; return 0; }
10574 EOF
10575 if { (eval echo configure:10576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10576   rm -rf conftest*
10577   eval "ac_cv_lib_$ac_lib_var=yes"
10578 else
10579   echo "configure: failed program was:" >&5
10580   cat conftest.$ac_ext >&5
10581   rm -rf conftest*
10582   eval "ac_cv_lib_$ac_lib_var=no"
10583 fi
10584 rm -f conftest*
10585 LIBS="$ac_save_LIBS"
10586
10587 fi
10588 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10589   echo "$ac_t""yes" 1>&6
10590   have_krb5=yes
10591                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lcom_err"
10592 else
10593   echo "$ac_t""no" 1>&6
10594 have_krb5=no
10595 fi
10596
10597
10598                 elif test $krb5_impl = heimdal; then
10599                         echo $ac_n "checking for main in -ldes""... $ac_c" 1>&6
10600 echo "configure:10601: checking for main in -ldes" >&5
10601 ac_lib_var=`echo des'_'main | sed 'y%./+-:%__p__%'`
10602 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10603   echo $ac_n "(cached) $ac_c" 1>&6
10604 else
10605   ac_save_LIBS="$LIBS"
10606 LIBS="-ldes  $LIBS"
10607 cat > conftest.$ac_ext <<EOF
10608 #line 10609 "configure"
10609 #include "confdefs.h"
10610
10611 int main() {
10612 main()
10613 ; return 0; }
10614 EOF
10615 if { (eval echo configure:10616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10616   rm -rf conftest*
10617   eval "ac_cv_lib_$ac_lib_var=yes"
10618 else
10619   echo "configure: failed program was:" >&5
10620   cat conftest.$ac_ext >&5
10621   rm -rf conftest*
10622   eval "ac_cv_lib_$ac_lib_var=no"
10623 fi
10624 rm -f conftest*
10625 LIBS="$ac_save_LIBS"
10626
10627 fi
10628 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10629   echo "$ac_t""yes" 1>&6
10630   krb5crypto=des
10631 else
10632   echo "$ac_t""no" 1>&6
10633 krb5crypto=crypto
10634 fi
10635
10636
10637                         echo $ac_n "checking for main in -lkrb5""... $ac_c" 1>&6
10638 echo "configure:10639: checking for main in -lkrb5" >&5
10639 ac_lib_var=`echo krb5'_'main | sed 'y%./+-:%__p__%'`
10640 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10641   echo $ac_n "(cached) $ac_c" 1>&6
10642 else
10643   ac_save_LIBS="$LIBS"
10644 LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10645 cat > conftest.$ac_ext <<EOF
10646 #line 10647 "configure"
10647 #include "confdefs.h"
10648
10649 int main() {
10650 main()
10651 ; return 0; }
10652 EOF
10653 if { (eval echo configure:10654: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10654   rm -rf conftest*
10655   eval "ac_cv_lib_$ac_lib_var=yes"
10656 else
10657   echo "configure: failed program was:" >&5
10658   cat conftest.$ac_ext >&5
10659   rm -rf conftest*
10660   eval "ac_cv_lib_$ac_lib_var=no"
10661 fi
10662 rm -f conftest*
10663 LIBS="$ac_save_LIBS"
10664
10665 fi
10666 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10667   echo "$ac_t""yes" 1>&6
10668   have_krb5=yes
10669                                 KRB5_LIBS="-lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err"
10670 else
10671   echo "$ac_t""no" 1>&6
10672 have_krb5=no
10673 fi
10674
10675
10676                         cat >> confdefs.h <<\EOF
10677 #define HAVE_HEIMDAL_KERBEROS 1
10678 EOF
10679
10680
10681                 else
10682                         have_krb5=no
10683                         echo "configure: warning: Unrecongized Kerberos5 Implementation" 1>&2
10684                 fi
10685
10686                 if test $have_krb5 = yes ; then
10687                         ol_link_krb5=yes
10688
10689                         cat >> confdefs.h <<\EOF
10690 #define HAVE_KRB5 1
10691 EOF
10692
10693
10694                         if test $ol_enable_kpasswd != no ; then
10695                                 ol_link_kpasswd=yes;
10696                         fi
10697
10698                         if test $ol_with_kerberos = k5only ; then
10699                                 ol_with_kerberos=found
10700                         fi
10701
10702                 elif test $ol_with_kerberos != auto ; then
10703                         { echo "configure: error: Required Kerberos 5 support not available" 1>&2; exit 1; }
10704                 fi
10705
10706         fi
10707 fi
10708
10709 if test $ol_link_krb5 = yes -a \( $ol_with_kerberos = yes -o \
10710         $ol_with_kerberos = auto -o $ol_with_kerberos = k425 \) ; then
10711
10712         for ac_hdr in kerberosIV/krb.h kerberosIV/des.h
10713 do
10714 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10715 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10716 echo "configure:10717: checking for $ac_hdr" >&5
10717 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10718   echo $ac_n "(cached) $ac_c" 1>&6
10719 else
10720   cat > conftest.$ac_ext <<EOF
10721 #line 10722 "configure"
10722 #include "confdefs.h"
10723 #include <$ac_hdr>
10724 EOF
10725 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10726 { (eval echo configure:10727: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10727 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10728 if test -z "$ac_err"; then
10729   rm -rf conftest*
10730   eval "ac_cv_header_$ac_safe=yes"
10731 else
10732   echo "$ac_err" >&5
10733   echo "configure: failed program was:" >&5
10734   cat conftest.$ac_ext >&5
10735   rm -rf conftest*
10736   eval "ac_cv_header_$ac_safe=no"
10737 fi
10738 rm -f conftest*
10739 fi
10740 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10741   echo "$ac_t""yes" 1>&6
10742     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10743   cat >> confdefs.h <<EOF
10744 #define $ac_tr_hdr 1
10745 EOF
10746  
10747 else
10748   echo "$ac_t""no" 1>&6
10749 fi
10750 done
10751
10752
10753         if test $ac_cv_header_kerberosIV_krb_h = yes ; then
10754                 if test $krb5_impl = mit; then
10755                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10756 echo "configure:10757: checking for main in -lkrb4" >&5
10757 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10758 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10759   echo $ac_n "(cached) $ac_c" 1>&6
10760 else
10761   ac_save_LIBS="$LIBS"
10762 LIBS="-lkrb4 -ldes425 -lkrb5 -l$krb5crypto -lcom_err $LIBS"
10763 cat > conftest.$ac_ext <<EOF
10764 #line 10765 "configure"
10765 #include "confdefs.h"
10766
10767 int main() {
10768 main()
10769 ; return 0; }
10770 EOF
10771 if { (eval echo configure:10772: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10772   rm -rf conftest*
10773   eval "ac_cv_lib_$ac_lib_var=yes"
10774 else
10775   echo "configure: failed program was:" >&5
10776   cat conftest.$ac_ext >&5
10777   rm -rf conftest*
10778   eval "ac_cv_lib_$ac_lib_var=no"
10779 fi
10780 rm -f conftest*
10781 LIBS="$ac_save_LIBS"
10782
10783 fi
10784 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10785   echo "$ac_t""yes" 1>&6
10786   have_k425=yes
10787                                 KRB4_LIBS="-lkrb4 -ldes425"
10788 else
10789   echo "$ac_t""no" 1>&6
10790 have_k425=no
10791 fi
10792
10793
10794                 elif test $krb5_impl = heimdal; then
10795                         echo $ac_n "checking for main in -lkrb4""... $ac_c" 1>&6
10796 echo "configure:10797: checking for main in -lkrb4" >&5
10797 ac_lib_var=`echo krb4'_'main | sed 'y%./+-:%__p__%'`
10798 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10799   echo $ac_n "(cached) $ac_c" 1>&6
10800 else
10801   ac_save_LIBS="$LIBS"
10802 LIBS="-lkrb4 -lkrb5 -l$krb5crypto -lasn1 -lroken -lcom_err $LIBS"
10803 cat > conftest.$ac_ext <<EOF
10804 #line 10805 "configure"
10805 #include "confdefs.h"
10806
10807 int main() {
10808 main()
10809 ; return 0; }
10810 EOF
10811 if { (eval echo configure:10812: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10812   rm -rf conftest*
10813   eval "ac_cv_lib_$ac_lib_var=yes"
10814 else
10815   echo "configure: failed program was:" >&5
10816   cat conftest.$ac_ext >&5
10817   rm -rf conftest*
10818   eval "ac_cv_lib_$ac_lib_var=no"
10819 fi
10820 rm -f conftest*
10821 LIBS="$ac_save_LIBS"
10822
10823 fi
10824 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10825   echo "$ac_t""yes" 1>&6
10826   have_k425=yes
10827                                 KRB4_LIBS="-lkrb4"
10828 else
10829   echo "$ac_t""no" 1>&6
10830 have_k425=no
10831 fi
10832
10833
10834                 else
10835                         have_425=no
10836                         echo "configure: warning: Unrecongized Kerberos V Implementation" 1>&2
10837                 fi
10838
10839                 if test $have_k425 = yes ; then
10840                         ol_with_kerberos=found
10841                         ol_link_krb4=yes
10842
10843                         cat >> confdefs.h <<\EOF
10844 #define HAVE_KRB425 1
10845 EOF
10846
10847                         cat >> confdefs.h <<\EOF
10848 #define HAVE_KRB4 1
10849 EOF
10850
10851
10852                         echo $ac_n "checking for des_debug in Kerberos libraries""... $ac_c" 1>&6
10853 echo "configure:10854: checking for des_debug in Kerberos libraries" >&5
10854 if eval "test \"\${ol_cv_var_des_debug+set}\" = set"; then
10855   echo $ac_n "(cached) $ac_c" 1>&6
10856 else
10857   
10858                                                                 save_LIBS="$LIBS"
10859                                 LIBS="$KRB4_LIBS $KRB5_LIBS $LIBS"
10860                                 cat > conftest.$ac_ext <<EOF
10861 #line 10862 "configure"
10862 #include "confdefs.h"
10863
10864 #include <kerberosIV/krb.h>
10865 #include <kerberosIV/des.h>
10866 extern int des_debug;
10867
10868 int main() {
10869
10870 des_debug = 1;
10871
10872 ; return 0; }
10873 EOF
10874 if { (eval echo configure:10875: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10875   rm -rf conftest*
10876   ol_cv_var_des_debug=yes
10877 else
10878   echo "configure: failed program was:" >&5
10879   cat conftest.$ac_ext >&5
10880   rm -rf conftest*
10881   ol_cv_var_des_debug=no
10882 fi
10883 rm -f conftest*
10884                                                                 LIBS="$save_LIBS"
10885                         
10886 fi
10887
10888 echo "$ac_t""$ol_cv_var_des_debug" 1>&6
10889
10890                         if test $ol_cv_var_des_debug = yes ; then
10891                                 cat >> confdefs.h <<\EOF
10892 #define HAVE_DES_DEBUG 1
10893 EOF
10894
10895                         fi
10896
10897                         LIBS="$save_LIBS"
10898                 fi
10899         fi
10900 fi
10901
10902 if test $ol_link_krb5 = yes ; then
10903         ol_with_kerberos=found
10904 fi
10905
10906 if test $ol_with_kerberos = yes -o $ol_with_kerberos = auto \
10907         -o $ol_with_kerberos = k4 -o $ol_with_kerberos = kth ; then
10908
10909         for ac_hdr in krb.h des.h krb-archaeology.h 
10910 do
10911 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
10912 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
10913 echo "configure:10914: checking for $ac_hdr" >&5
10914 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
10915   echo $ac_n "(cached) $ac_c" 1>&6
10916 else
10917   cat > conftest.$ac_ext <<EOF
10918 #line 10919 "configure"
10919 #include "confdefs.h"
10920 #include <$ac_hdr>
10921 EOF
10922 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
10923 { (eval echo configure:10924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
10924 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
10925 if test -z "$ac_err"; then
10926   rm -rf conftest*
10927   eval "ac_cv_header_$ac_safe=yes"
10928 else
10929   echo "$ac_err" >&5
10930   echo "configure: failed program was:" >&5
10931   cat conftest.$ac_ext >&5
10932   rm -rf conftest*
10933   eval "ac_cv_header_$ac_safe=no"
10934 fi
10935 rm -f conftest*
10936 fi
10937 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
10938   echo "$ac_t""yes" 1>&6
10939     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
10940   cat >> confdefs.h <<EOF
10941 #define $ac_tr_hdr 1
10942 EOF
10943  
10944 else
10945   echo "$ac_t""no" 1>&6
10946 fi
10947 done
10948
10949
10950         if test $ac_cv_header_krb_h = yes ; then
10951                 echo $ac_n "checking for main in -lkrb""... $ac_c" 1>&6
10952 echo "configure:10953: checking for main in -lkrb" >&5
10953 ac_lib_var=`echo krb'_'main | sed 'y%./+-:%__p__%'`
10954 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
10955   echo $ac_n "(cached) $ac_c" 1>&6
10956 else
10957   ac_save_LIBS="$LIBS"
10958 LIBS="-lkrb -ldes $LIBS"
10959 cat > conftest.$ac_ext <<EOF
10960 #line 10961 "configure"
10961 #include "confdefs.h"
10962
10963 int main() {
10964 main()
10965 ; return 0; }
10966 EOF
10967 if { (eval echo configure:10968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
10968   rm -rf conftest*
10969   eval "ac_cv_lib_$ac_lib_var=yes"
10970 else
10971   echo "configure: failed program was:" >&5
10972   cat conftest.$ac_ext >&5
10973   rm -rf conftest*
10974   eval "ac_cv_lib_$ac_lib_var=no"
10975 fi
10976 rm -f conftest*
10977 LIBS="$ac_save_LIBS"
10978
10979 fi
10980 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
10981   echo "$ac_t""yes" 1>&6
10982   have_k4=yes
10983 else
10984   echo "$ac_t""no" 1>&6
10985 have_k4=no
10986 fi
10987
10988
10989                 if test $have_k4 = yes ; then
10990                         ol_with_kerberos=found
10991                         ol_link_krb4=yes
10992
10993                         cat >> confdefs.h <<\EOF
10994 #define HAVE_KRB4 1
10995 EOF
10996
10997
10998                         KRB4_LIBS="-lkrb -ldes"
10999
11000                         if test $ac_cv_header_krb_archaeology_h = yes ; then
11001                                 cat >> confdefs.h <<\EOF
11002 #define HAVE_KTH_KERBEROS 1
11003 EOF
11004
11005                         fi
11006                 fi
11007         fi
11008 fi
11009
11010 if test $ol_link_krb4 = yes -a $ol_enable_kpasswd != no ; then
11011         ol_link_kpasswd=yes
11012 fi
11013
11014 if test $ol_link_krb4 = yes -a $ol_enable_kbind != no ; then
11015         ol_link_kbind=yes
11016
11017 elif test $ol_enable_kbind = yes ; then
11018         { echo "configure: error: Kerberos IV detection failed" 1>&2; exit 1; }
11019 fi
11020
11021 if test $ol_link_krb4 = yes -o $ol_link_krb5 = yes ; then
11022         cat >> confdefs.h <<\EOF
11023 #define HAVE_KERBEROS 1
11024 EOF
11025
11026
11027 elif test $ol_with_kerberos != auto -a $ol_with_kerberos != no ; then
11028         { echo "configure: error: Kerberos detection failed" 1>&2; exit 1; }
11029 fi
11030
11031 ol_link_tls=no
11032 if test $ol_with_tls != no ; then
11033         for ac_hdr in openssl/ssl.h ssl.h
11034 do
11035 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11036 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11037 echo "configure:11038: checking for $ac_hdr" >&5
11038 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11039   echo $ac_n "(cached) $ac_c" 1>&6
11040 else
11041   cat > conftest.$ac_ext <<EOF
11042 #line 11043 "configure"
11043 #include "confdefs.h"
11044 #include <$ac_hdr>
11045 EOF
11046 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11047 { (eval echo configure:11048: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11048 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11049 if test -z "$ac_err"; then
11050   rm -rf conftest*
11051   eval "ac_cv_header_$ac_safe=yes"
11052 else
11053   echo "$ac_err" >&5
11054   echo "configure: failed program was:" >&5
11055   cat conftest.$ac_ext >&5
11056   rm -rf conftest*
11057   eval "ac_cv_header_$ac_safe=no"
11058 fi
11059 rm -f conftest*
11060 fi
11061 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11062   echo "$ac_t""yes" 1>&6
11063     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11064   cat >> confdefs.h <<EOF
11065 #define $ac_tr_hdr 1
11066 EOF
11067  
11068 else
11069   echo "$ac_t""no" 1>&6
11070 fi
11071 done
11072
11073         
11074         if test $ac_cv_header_openssl_ssl_h = yes -o $ac_cv_header_ssl_h = yes ; then
11075                 echo $ac_n "checking for SSLeay_add_ssl_algorithms in -lssl""... $ac_c" 1>&6
11076 echo "configure:11077: checking for SSLeay_add_ssl_algorithms in -lssl" >&5
11077 ac_lib_var=`echo ssl'_'SSLeay_add_ssl_algorithms | sed 'y%./+-:%__p__%'`
11078 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11079   echo $ac_n "(cached) $ac_c" 1>&6
11080 else
11081   ac_save_LIBS="$LIBS"
11082 LIBS="-lssl -lcrypto $LIBS"
11083 cat > conftest.$ac_ext <<EOF
11084 #line 11085 "configure"
11085 #include "confdefs.h"
11086 /* Override any gcc2 internal prototype to avoid an error.  */
11087 /* We use char because int might match the return type of a gcc2
11088     builtin and then its argument prototype would still apply.  */
11089 char SSLeay_add_ssl_algorithms();
11090
11091 int main() {
11092 SSLeay_add_ssl_algorithms()
11093 ; return 0; }
11094 EOF
11095 if { (eval echo configure:11096: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11096   rm -rf conftest*
11097   eval "ac_cv_lib_$ac_lib_var=yes"
11098 else
11099   echo "configure: failed program was:" >&5
11100   cat conftest.$ac_ext >&5
11101   rm -rf conftest*
11102   eval "ac_cv_lib_$ac_lib_var=no"
11103 fi
11104 rm -f conftest*
11105 LIBS="$ac_save_LIBS"
11106
11107 fi
11108 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11109   echo "$ac_t""yes" 1>&6
11110   have_ssleay=yes
11111                         need_rsaref=no
11112 else
11113   echo "$ac_t""no" 1>&6
11114 have_ssleay=no
11115 fi
11116
11117                         
11118                 if test $have_ssleay = no ; then
11119                         echo $ac_n "checking for SSL_library_init in -lssl""... $ac_c" 1>&6
11120 echo "configure:11121: checking for SSL_library_init in -lssl" >&5
11121 ac_lib_var=`echo ssl'_'SSL_library_init | sed 'y%./+-:%__p__%'`
11122 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11123   echo $ac_n "(cached) $ac_c" 1>&6
11124 else
11125   ac_save_LIBS="$LIBS"
11126 LIBS="-lssl -lcrypto $LIBS"
11127 cat > conftest.$ac_ext <<EOF
11128 #line 11129 "configure"
11129 #include "confdefs.h"
11130 /* Override any gcc2 internal prototype to avoid an error.  */
11131 /* We use char because int might match the return type of a gcc2
11132     builtin and then its argument prototype would still apply.  */
11133 char SSL_library_init();
11134
11135 int main() {
11136 SSL_library_init()
11137 ; return 0; }
11138 EOF
11139 if { (eval echo configure:11140: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11140   rm -rf conftest*
11141   eval "ac_cv_lib_$ac_lib_var=yes"
11142 else
11143   echo "configure: failed program was:" >&5
11144   cat conftest.$ac_ext >&5
11145   rm -rf conftest*
11146   eval "ac_cv_lib_$ac_lib_var=no"
11147 fi
11148 rm -f conftest*
11149 LIBS="$ac_save_LIBS"
11150
11151 fi
11152 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11153   echo "$ac_t""yes" 1>&6
11154   have_ssleay=yes
11155                                 need_rsaref=no
11156 else
11157   echo "$ac_t""no" 1>&6
11158 have_ssleay=no
11159 fi
11160
11161                 fi
11162
11163                 if test $have_ssleay = no ; then
11164                         echo $ac_n "checking for ssl3_accept in -lssl""... $ac_c" 1>&6
11165 echo "configure:11166: checking for ssl3_accept in -lssl" >&5
11166 ac_lib_var=`echo ssl'_'ssl3_accept | sed 'y%./+-:%__p__%'`
11167 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
11168   echo $ac_n "(cached) $ac_c" 1>&6
11169 else
11170   ac_save_LIBS="$LIBS"
11171 LIBS="-lssl -lcrypto -lRSAglue -lrsaref $LIBS"
11172 cat > conftest.$ac_ext <<EOF
11173 #line 11174 "configure"
11174 #include "confdefs.h"
11175 /* Override any gcc2 internal prototype to avoid an error.  */
11176 /* We use char because int might match the return type of a gcc2
11177     builtin and then its argument prototype would still apply.  */
11178 char ssl3_accept();
11179
11180 int main() {
11181 ssl3_accept()
11182 ; return 0; }
11183 EOF
11184 if { (eval echo configure:11185: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11185   rm -rf conftest*
11186   eval "ac_cv_lib_$ac_lib_var=yes"
11187 else
11188   echo "configure: failed program was:" >&5
11189   cat conftest.$ac_ext >&5
11190   rm -rf conftest*
11191   eval "ac_cv_lib_$ac_lib_var=no"
11192 fi
11193 rm -f conftest*
11194 LIBS="$ac_save_LIBS"
11195
11196 fi
11197 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
11198   echo "$ac_t""yes" 1>&6
11199   have_ssleay=yes
11200                                 need_rsaref=yes
11201 else
11202   echo "$ac_t""no" 1>&6
11203 have_ssleay=no
11204 fi
11205
11206                 fi
11207
11208                 if test $have_ssleay = yes ; then
11209                         ol_with_tls=found
11210                         ol_link_tls=yes
11211
11212                         cat >> confdefs.h <<\EOF
11213 #define HAVE_SSLEAY 1
11214 EOF
11215
11216
11217                         if test $need_rsaref = yes; then
11218                                 cat >> confdefs.h <<\EOF
11219 #define HAVE_RSAREF 1
11220 EOF
11221
11222
11223                                 TLS_LIBS="-lssl -lcrypto -lRSAglue -lrsaref"
11224                         else
11225                                 TLS_LIBS="-lssl -lcrypto"
11226                         fi
11227                 fi
11228         fi
11229
11230 else
11231         echo "configure: warning: TLS data protection not supported!" 1>&2
11232 fi
11233
11234 if test $ol_link_tls = yes ; then
11235         cat >> confdefs.h <<\EOF
11236 #define HAVE_TLS 1
11237 EOF
11238
11239
11240 elif test $ol_with_tls = auto ; then
11241         echo "configure: warning: Could not locate TLS/SSL package" 1>&2
11242         echo "configure: warning: TLS data protection not supported!" 1>&2
11243
11244 elif test $ol_with_tls != no ; then
11245         { echo "configure: error: Could not locate TLS/SSL package" 1>&2; exit 1; }
11246 fi
11247
11248 if test $ol_enable_lmpasswd != no; then
11249         if test $ol_link_tls != yes ; then
11250                 { echo "configure: error: LAN Manager passwords require OpenSSL" 1>&2; exit 1; }
11251         fi
11252
11253         cat >> confdefs.h <<\EOF
11254 #define SLAPD_LMHASH 1
11255 EOF
11256
11257 fi
11258
11259 for ac_func in \
11260         ctime_r                 \
11261         gethostbyname_r gethostbyaddr_r \
11262
11263 do
11264 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
11265 echo "configure:11266: checking for $ac_func" >&5
11266 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
11267   echo $ac_n "(cached) $ac_c" 1>&6
11268 else
11269   cat > conftest.$ac_ext <<EOF
11270 #line 11271 "configure"
11271 #include "confdefs.h"
11272 /* System header to define __stub macros and hopefully few prototypes,
11273     which can conflict with char $ac_func(); below.  */
11274 #include <assert.h>
11275 /* Override any gcc2 internal prototype to avoid an error.  */
11276 /* We use char because int might match the return type of a gcc2
11277     builtin and then its argument prototype would still apply.  */
11278 char $ac_func();
11279 char (*f)();
11280
11281 int main() {
11282
11283 /* The GNU C library defines this for functions which it implements
11284     to always fail with ENOSYS.  Some functions are actually named
11285     something starting with __ and the normal name is an alias.  */
11286 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
11287 choke me
11288 #else
11289 f = $ac_func;
11290 #endif
11291
11292 ; return 0; }
11293 EOF
11294 if { (eval echo configure:11295: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11295   rm -rf conftest*
11296   eval "ac_cv_func_$ac_func=yes"
11297 else
11298   echo "configure: failed program was:" >&5
11299   cat conftest.$ac_ext >&5
11300   rm -rf conftest*
11301   eval "ac_cv_func_$ac_func=no"
11302 fi
11303 rm -f conftest*
11304 fi
11305
11306 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
11307   echo "$ac_t""yes" 1>&6
11308     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
11309   cat >> confdefs.h <<EOF
11310 #define $ac_tr_func 1
11311 EOF
11312  
11313 else
11314   echo "$ac_t""no" 1>&6
11315 fi
11316 done
11317
11318
11319 if test "$ac_cv_func_ctime_r" = no ; then
11320         ol_cv_func_ctime_r_nargs=0
11321 else
11322         echo $ac_n "checking number of arguments of ctime_r""... $ac_c" 1>&6
11323 echo "configure:11324: checking number of arguments of ctime_r" >&5
11324 if eval "test \"\${ol_cv_func_ctime_r_nargs+set}\" = set"; then
11325   echo $ac_n "(cached) $ac_c" 1>&6
11326 else
11327   cat > conftest.$ac_ext <<EOF
11328 #line 11329 "configure"
11329 #include "confdefs.h"
11330 #include <time.h>
11331 int main() {
11332 time_t ti; char *buffer; ctime_r(&ti,buffer,32);
11333 ; return 0; }
11334 EOF
11335 if { (eval echo configure:11336: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11336   rm -rf conftest*
11337   ol_cv_func_ctime_r_nargs3=yes
11338 else
11339   echo "configure: failed program was:" >&5
11340   cat conftest.$ac_ext >&5
11341   rm -rf conftest*
11342   ol_cv_func_ctime_r_nargs3=no
11343 fi
11344 rm -f conftest*
11345
11346         cat > conftest.$ac_ext <<EOF
11347 #line 11348 "configure"
11348 #include "confdefs.h"
11349 #include <time.h>
11350 int main() {
11351 time_t ti; char *buffer; ctime_r(&ti,buffer);
11352 ; return 0; }
11353 EOF
11354 if { (eval echo configure:11355: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11355   rm -rf conftest*
11356   ol_cv_func_ctime_r_nargs2=yes
11357 else
11358   echo "configure: failed program was:" >&5
11359   cat conftest.$ac_ext >&5
11360   rm -rf conftest*
11361   ol_cv_func_ctime_r_nargs2=no
11362 fi
11363 rm -f conftest*
11364
11365         if test $ol_cv_func_ctime_r_nargs3 = yes -a \
11366                 $ol_cv_func_ctime_r_nargs2 = no ; then
11367
11368                 ol_cv_func_ctime_r_nargs=3
11369
11370         elif test $ol_cv_func_ctime_r_nargs3 = no -a \
11371                 $ol_cv_func_ctime_r_nargs2 = yes ; then
11372
11373                 ol_cv_func_ctime_r_nargs=2
11374
11375         else
11376                 ol_cv_func_ctime_r_nargs=0
11377         fi
11378   
11379 fi
11380
11381 echo "$ac_t""$ol_cv_func_ctime_r_nargs" 1>&6
11382
11383   if test $ol_cv_func_ctime_r_nargs -gt 1 ; then
11384         cat >> confdefs.h <<EOF
11385 #define CTIME_R_NARGS $ol_cv_func_ctime_r_nargs
11386 EOF
11387
11388   fi
11389
11390 fi
11391
11392 if test "$ac_cv_func_gethostbyname_r" = yes ; then
11393         echo $ac_n "checking number of arguments of gethostbyname_r""... $ac_c" 1>&6
11394 echo "configure:11395: checking number of arguments of gethostbyname_r" >&5
11395 if eval "test \"\${ol_cv_func_gethostbyname_r_nargs+set}\" = set"; then
11396   echo $ac_n "(cached) $ac_c" 1>&6
11397 else
11398   cat > conftest.$ac_ext <<EOF
11399 #line 11400 "configure"
11400 #include "confdefs.h"
11401 #include <sys/types.h>
11402 #include <sys/socket.h>
11403 #include <netinet/in.h>
11404 #include <netdb.h>
11405 #define BUFSIZE (sizeof(struct hostent)+10)
11406 int main() {
11407 struct hostent hent; char buffer[BUFSIZE];
11408                 int bufsize=BUFSIZE;int h_errno;
11409                 (void)gethostbyname_r("segovia.cs.purdue.edu", &hent,
11410                         buffer, bufsize, &h_errno);
11411 ; return 0; }
11412 EOF
11413 if { (eval echo configure:11414: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11414   rm -rf conftest*
11415   ol_cv_func_gethostbyname_r_nargs5=yes
11416 else
11417   echo "configure: failed program was:" >&5
11418   cat conftest.$ac_ext >&5
11419   rm -rf conftest*
11420   ol_cv_func_gethostbyname_r_nargs5=no
11421 fi
11422 rm -f conftest*
11423
11424         cat > conftest.$ac_ext <<EOF
11425 #line 11426 "configure"
11426 #include "confdefs.h"
11427 #include <sys/types.h>
11428 #include <sys/socket.h>
11429 #include <netinet/in.h>
11430 #include <netdb.h>
11431 #define BUFSIZE (sizeof(struct hostent)+10)
11432 int main() {
11433 struct hostent hent;struct hostent *rhent;
11434                 char buffer[BUFSIZE];
11435                 int bufsize=BUFSIZE;int h_errno;
11436                 (void)gethostbyname_r("localhost", &hent, buffer, bufsize,
11437                         &rhent, &h_errno);
11438 ; return 0; }
11439 EOF
11440 if { (eval echo configure:11441: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11441   rm -rf conftest*
11442   ol_cv_func_gethostbyname_r_nargs6=yes
11443 else
11444   echo "configure: failed program was:" >&5
11445   cat conftest.$ac_ext >&5
11446   rm -rf conftest*
11447   ol_cv_func_gethostbyname_r_nargs6=no
11448 fi
11449 rm -f conftest*
11450
11451         if test $ol_cv_func_gethostbyname_r_nargs5 = yes -a \
11452                 $ol_cv_func_gethostbyname_r_nargs6 = no ; then
11453
11454                 ol_cv_func_gethostbyname_r_nargs=5
11455
11456         elif test $ol_cv_func_gethostbyname_r_nargs5 = no -a \
11457                 $ol_cv_func_gethostbyname_r_nargs6 = yes ; then
11458
11459                 ol_cv_func_gethostbyname_r_nargs=6
11460
11461         else
11462                 ol_cv_func_gethostbyname_r_nargs=0
11463         fi
11464   
11465 fi
11466
11467 echo "$ac_t""$ol_cv_func_gethostbyname_r_nargs" 1>&6
11468   if test $ol_cv_func_gethostbyname_r_nargs -gt 1 ; then
11469         cat >> confdefs.h <<EOF
11470 #define GETHOSTBYNAME_R_NARGS $ol_cv_func_gethostbyname_r_nargs
11471 EOF
11472
11473   fi
11474
11475 else
11476         ol_cv_func_gethostbyname_r_nargs=0
11477 fi
11478  
11479 if test "$ac_cv_func_gethostbyaddr_r" = yes ; then
11480         echo $ac_n "checking number of arguments of gethostbyaddr_r""... $ac_c" 1>&6
11481 echo "configure:11482: checking number of arguments of gethostbyaddr_r" >&5
11482 if eval "test \"\${ol_cv_func_gethostbyaddr_r_nargs+set}\" = set"; then
11483   echo $ac_n "(cached) $ac_c" 1>&6
11484 else
11485   cat > conftest.$ac_ext <<EOF
11486 #line 11487 "configure"
11487 #include "confdefs.h"
11488 #include <sys/types.h>
11489 #include <sys/socket.h>
11490 #include <netinet/in.h>
11491 #include <netdb.h>
11492 #define BUFSIZE (sizeof(struct hostent)+10)
11493 int main() {
11494 struct hostent hent; char buffer[BUFSIZE]; 
11495             struct in_addr add;
11496             size_t alen=sizeof(struct in_addr);
11497             int bufsize=BUFSIZE;int h_errno;
11498                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11499                         alen, AF_INET, &hent, buffer, bufsize, &h_errno);
11500 ; return 0; }
11501 EOF
11502 if { (eval echo configure:11503: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11503   rm -rf conftest*
11504   ol_cv_func_gethostbyaddr_r_nargs7=yes
11505 else
11506   echo "configure: failed program was:" >&5
11507   cat conftest.$ac_ext >&5
11508   rm -rf conftest*
11509   ol_cv_func_gethostbyaddr_r_nargs7=no
11510 fi
11511 rm -f conftest*
11512
11513         cat > conftest.$ac_ext <<EOF
11514 #line 11515 "configure"
11515 #include "confdefs.h"
11516 #include <sys/types.h>
11517 #include <sys/socket.h>
11518 #include <netinet/in.h>
11519 #include <netdb.h>
11520 #define BUFSIZE (sizeof(struct hostent)+10)
11521 int main() {
11522 struct hostent hent;
11523                 struct hostent *rhent; char buffer[BUFSIZE]; 
11524                 struct in_addr add;
11525                 size_t alen=sizeof(struct in_addr);
11526                 int bufsize=BUFSIZE;int h_errno;
11527                 (void)gethostbyaddr_r( (void *)&(add.s_addr),
11528                         alen, AF_INET, &hent, buffer, bufsize, 
11529                         &rhent, &h_errno);
11530 ; return 0; }
11531 EOF
11532 if { (eval echo configure:11533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
11533   rm -rf conftest*
11534   ol_cv_func_gethostbyaddr_r_nargs8=yes
11535 else
11536   echo "configure: failed program was:" >&5
11537   cat conftest.$ac_ext >&5
11538   rm -rf conftest*
11539   ol_cv_func_gethostbyaddr_r_nargs8=no
11540 fi
11541 rm -f conftest*
11542
11543         if test $ol_cv_func_gethostbyaddr_r_nargs7 = yes -a \
11544                 $ol_cv_func_gethostbyaddr_r_nargs8 = no ; then
11545
11546                 ol_cv_func_gethostbyaddr_r_nargs=7
11547
11548         elif test $ol_cv_func_gethostbyaddr_r_nargs7 = no -a \
11549                 $ol_cv_func_gethostbyaddr_r_nargs8 = yes ; then
11550
11551                 ol_cv_func_gethostbyaddr_r_nargs=8
11552
11553         else
11554                 ol_cv_func_gethostbyaddr_r_nargs=0
11555         fi
11556   
11557 fi
11558
11559 echo "$ac_t""$ol_cv_func_gethostbyaddr_r_nargs" 1>&6
11560   if test $ol_cv_func_gethostbyaddr_r_nargs -gt 1 ; then
11561     cat >> confdefs.h <<EOF
11562 #define GETHOSTBYADDR_R_NARGS $ol_cv_func_gethostbyaddr_r_nargs
11563 EOF
11564
11565   fi
11566
11567 else
11568         ol_cv_func_gethostbyaddr_r_nargs=0
11569 fi
11570
11571 if test "$ac_cv_func_ctime_r" = yes \
11572         -a "$ol_cv_func_ctime_r_nargs" -ge 2 \
11573         -a "$ol_cv_func_ctime_r_nargs" -le 3 \
11574         -a "$ac_cv_func_gethostbyname_r" = yes \
11575         -a "$ol_cv_func_gethostbyname_r_nargs" -ge 5 \
11576         -a "$ol_cv_func_gethostbyname_r_nargs" -le 6 \
11577         -a "$ac_cv_func_gethostbyaddr_r" = yes \
11578         -a "$ol_cv_func_gethostbyaddr_r_nargs" -ge 5 \
11579         -a "$ol_cv_func_gethostbyaddr_r_nargs" -le 6 \
11580         ; then
11581  
11582         cat >> confdefs.h <<\EOF
11583 #define LDAP_API_FEATURE_X_OPENLDAP_REENTRANT 1
11584 EOF
11585
11586 fi
11587
11588 ol_link_threads=no
11589
11590 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11591         -o $ol_with_threads = nt ; then
11592
11593         
11594         echo $ac_n "checking for _beginthread""... $ac_c" 1>&6
11595 echo "configure:11596: checking for _beginthread" >&5
11596 if eval "test \"\${ac_cv_func__beginthread+set}\" = set"; then
11597   echo $ac_n "(cached) $ac_c" 1>&6
11598 else
11599   cat > conftest.$ac_ext <<EOF
11600 #line 11601 "configure"
11601 #include "confdefs.h"
11602 /* System header to define __stub macros and hopefully few prototypes,
11603     which can conflict with char _beginthread(); below.  */
11604 #include <assert.h>
11605 /* Override any gcc2 internal prototype to avoid an error.  */
11606 /* We use char because int might match the return type of a gcc2
11607     builtin and then its argument prototype would still apply.  */
11608 char _beginthread();
11609 char (*f)();
11610
11611 int main() {
11612
11613 /* The GNU C library defines this for functions which it implements
11614     to always fail with ENOSYS.  Some functions are actually named
11615     something starting with __ and the normal name is an alias.  */
11616 #if defined (__stub__beginthread) || defined (__stub____beginthread)
11617 choke me
11618 #else
11619 f = _beginthread;
11620 #endif
11621
11622 ; return 0; }
11623 EOF
11624 if { (eval echo configure:11625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11625   rm -rf conftest*
11626   eval "ac_cv_func__beginthread=yes"
11627 else
11628   echo "configure: failed program was:" >&5
11629   cat conftest.$ac_ext >&5
11630   rm -rf conftest*
11631   eval "ac_cv_func__beginthread=no"
11632 fi
11633 rm -f conftest*
11634 fi
11635
11636 if eval "test \"`echo '$ac_cv_func_'_beginthread`\" = yes"; then
11637   echo "$ac_t""yes" 1>&6
11638   :
11639 else
11640   echo "$ac_t""no" 1>&6
11641 fi
11642
11643
11644         if test $ac_cv_func__beginthread = yes ; then
11645                 cat >> confdefs.h <<\EOF
11646 #define HAVE_NT_THREADS 1
11647 EOF
11648
11649                 ol_cv_nt_threads=yes
11650         fi
11651
11652
11653         if test "$ol_cv_nt_threads" = yes ; then
11654                 ol_link_threads=nt
11655                 ol_with_threads=found
11656                 ol_with_yielding_select=yes
11657
11658                 cat >> confdefs.h <<\EOF
11659 #define HAVE_NT_SERVICE_MANAGER 1
11660 EOF
11661
11662                 cat >> confdefs.h <<\EOF
11663 #define HAVE_NT_EVENT_LOG 1
11664 EOF
11665
11666         fi
11667
11668         if test $ol_with_threads = nt ; then
11669                 { echo "configure: error: could not locate NT Threads" 1>&2; exit 1; }
11670         fi
11671 fi
11672
11673 if test $ol_with_threads = auto -o $ol_with_threads = yes \
11674         -o $ol_with_threads = posix ; then
11675
11676         for ac_hdr in pthread.h
11677 do
11678 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11679 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11680 echo "configure:11681: checking for $ac_hdr" >&5
11681 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11682   echo $ac_n "(cached) $ac_c" 1>&6
11683 else
11684   cat > conftest.$ac_ext <<EOF
11685 #line 11686 "configure"
11686 #include "confdefs.h"
11687 #include <$ac_hdr>
11688 EOF
11689 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11690 { (eval echo configure:11691: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11691 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11692 if test -z "$ac_err"; then
11693   rm -rf conftest*
11694   eval "ac_cv_header_$ac_safe=yes"
11695 else
11696   echo "$ac_err" >&5
11697   echo "configure: failed program was:" >&5
11698   cat conftest.$ac_ext >&5
11699   rm -rf conftest*
11700   eval "ac_cv_header_$ac_safe=no"
11701 fi
11702 rm -f conftest*
11703 fi
11704 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11705   echo "$ac_t""yes" 1>&6
11706     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11707   cat >> confdefs.h <<EOF
11708 #define $ac_tr_hdr 1
11709 EOF
11710  
11711 else
11712   echo "$ac_t""no" 1>&6
11713 fi
11714 done
11715
11716
11717         if test $ac_cv_header_pthread_h = yes ; then
11718                 echo $ac_n "checking POSIX thread version""... $ac_c" 1>&6
11719 echo "configure:11720: checking POSIX thread version" >&5
11720 if eval "test \"\${ol_cv_pthread_version+set}\" = set"; then
11721   echo $ac_n "(cached) $ac_c" 1>&6
11722 else
11723   
11724         cat > conftest.$ac_ext <<EOF
11725 #line 11726 "configure"
11726 #include "confdefs.h"
11727
11728 #               include <pthread.h>
11729                 /* this check could be improved */
11730 #               ifdef PTHREAD_ONCE_INIT
11731                         pthread_version_final;
11732 #               endif
11733         
11734 EOF
11735 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11736   egrep "pthread_version_final" >/dev/null 2>&1; then
11737   rm -rf conftest*
11738   ol_pthread_final=yes
11739 else
11740   rm -rf conftest*
11741   ol_pthread_final=no
11742 fi
11743 rm -f conftest*
11744
11745
11746         cat > conftest.$ac_ext <<EOF
11747 #line 11748 "configure"
11748 #include "confdefs.h"
11749
11750 #               include <pthread.h>
11751                 /* this check could be improved */
11752 #               ifdef pthread_once_init
11753                         pthread_version_draft4;
11754 #               endif
11755         
11756 EOF
11757 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11758   egrep "pthread_version_draft4" >/dev/null 2>&1; then
11759   rm -rf conftest*
11760   ol_pthread_draft4=yes
11761 else
11762   rm -rf conftest*
11763   ol_pthread_draft4=no
11764 fi
11765 rm -f conftest*
11766
11767
11768         if test $ol_pthread_final = yes -a $ol_pthread_draft4 = no; then
11769                 ol_cv_pthread_version=final
11770         elif test $ol_pthread_final = no -a $ol_pthread_draft4 = yes; then
11771                 ol_cv_pthread_version=draft4
11772         else
11773                 ol_cv_pthread_version=unknown
11774         fi
11775
11776 fi
11777
11778 echo "$ac_t""$ol_cv_pthread_version" 1>&6
11779
11780
11781                 if test $ol_cv_pthread_version = final ; then
11782                         cat >> confdefs.h <<\EOF
11783 #define HAVE_PTHREADS_FINAL 1
11784 EOF
11785
11786                 elif test $ol_cv_pthread_version = draft4 ; then
11787                         cat >> confdefs.h <<\EOF
11788 #define HAVE_PTHREADS_D4 1
11789 EOF
11790
11791                 else
11792                         { echo "configure: error: unknown pthread version" 1>&2; exit 1; }
11793                 fi
11794
11795                 # consider threads found
11796                 ol_with_threads=found
11797
11798                 
11799         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
11800 echo "configure:11801: checking for LinuxThreads pthread.h" >&5
11801 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
11802   echo $ac_n "(cached) $ac_c" 1>&6
11803 else
11804   cat > conftest.$ac_ext <<EOF
11805 #line 11806 "configure"
11806 #include "confdefs.h"
11807 #include <pthread.h>
11808 EOF
11809 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11810   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
11811   rm -rf conftest*
11812   ol_cv_header_linux_threads=yes
11813 else
11814   rm -rf conftest*
11815   ol_cv_header_linux_threads=no
11816 fi
11817 rm -f conftest*
11818
11819                 
11820 fi
11821
11822 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
11823         if test $ol_cv_header_linux_threads = yes; then
11824                 cat >> confdefs.h <<\EOF
11825 #define HAVE_LINUX_THREADS 1
11826 EOF
11827
11828         fi
11829
11830                 
11831         echo $ac_n "checking for GNU Pth pthread.h""... $ac_c" 1>&6
11832 echo "configure:11833: checking for GNU Pth pthread.h" >&5
11833 if eval "test \"\${ol_cv_header_gnu_pth_pthread_h+set}\" = set"; then
11834   echo $ac_n "(cached) $ac_c" 1>&6
11835 else
11836   cat > conftest.$ac_ext <<EOF
11837 #line 11838 "configure"
11838 #include "confdefs.h"
11839 #include <pthread.h>
11840 #ifdef _POSIX_THREAD_IS_GNU_PTH
11841         __gnu_pth__;
11842 #endif
11843
11844 EOF
11845 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11846   egrep "__gnu_pth__" >/dev/null 2>&1; then
11847   rm -rf conftest*
11848   ol_cv_header_gnu_pth_pthread_h=yes
11849 else
11850   rm -rf conftest*
11851   ol_cv_header_gnu_pth_pthread_h=no
11852 fi
11853 rm -f conftest*
11854
11855                 
11856 fi
11857
11858 echo "$ac_t""$ol_cv_header_gnu_pth_pthread_h" 1>&6
11859
11860
11861                 if test $ol_cv_header_gnu_pth_pthread_h = no ; then
11862                         for ac_hdr in sched.h
11863 do
11864 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
11865 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
11866 echo "configure:11867: checking for $ac_hdr" >&5
11867 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
11868   echo $ac_n "(cached) $ac_c" 1>&6
11869 else
11870   cat > conftest.$ac_ext <<EOF
11871 #line 11872 "configure"
11872 #include "confdefs.h"
11873 #include <$ac_hdr>
11874 EOF
11875 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
11876 { (eval echo configure:11877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
11877 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
11878 if test -z "$ac_err"; then
11879   rm -rf conftest*
11880   eval "ac_cv_header_$ac_safe=yes"
11881 else
11882   echo "$ac_err" >&5
11883   echo "configure: failed program was:" >&5
11884   cat conftest.$ac_ext >&5
11885   rm -rf conftest*
11886   eval "ac_cv_header_$ac_safe=no"
11887 fi
11888 rm -f conftest*
11889 fi
11890 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
11891   echo "$ac_t""yes" 1>&6
11892     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
11893   cat >> confdefs.h <<EOF
11894 #define $ac_tr_hdr 1
11895 EOF
11896  
11897 else
11898   echo "$ac_t""no" 1>&6
11899 fi
11900 done
11901
11902                 fi
11903
11904                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 
11905                                 echo $ac_n "checking for pthread_create in default libraries""... $ac_c" 1>&6
11906 echo "configure:11907: checking for pthread_create in default libraries" >&5
11907 if eval "test \"\${ol_cv_pthread_create+set}\" = set"; then
11908   echo $ac_n "(cached) $ac_c" 1>&6
11909 else
11910   
11911                 if test "$cross_compiling" = yes; then
11912   cat > conftest.$ac_ext <<EOF
11913 #line 11914 "configure"
11914 #include "confdefs.h"
11915 /* pthread test headers */
11916 #include <pthread.h>
11917 #ifndef NULL
11918 #define NULL (void*)0
11919 #endif
11920
11921 static void *task(p)
11922         void *p;
11923 {
11924         return (void *) (p == NULL);
11925 }
11926
11927 int main() {
11928
11929         /* pthread test function */
11930         pthread_t t;
11931         int status;
11932         int detach = 1;
11933
11934 #ifdef HAVE_PTHREADS_FINAL
11935         /* Final pthreads */
11936         pthread_attr_t attr;
11937
11938         status = pthread_attr_init(&attr);
11939         if( status ) return status;
11940
11941 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
11942         if( !detach ) {
11943 #if defined( PTHREAD_CREATE_JOINABLE )
11944                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
11945 #else
11946                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
11947 #endif
11948
11949 #ifdef PTHREAD_CREATE_DETACHED
11950         } else {
11951                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
11952 #endif
11953         }
11954         if( status ) return status;
11955 #endif
11956
11957         status = pthread_create( &t, &attr, task, NULL );
11958         if( status ) return status;
11959
11960 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
11961         if( detach ) {
11962                 /* give thread a chance to complete */
11963                 /* it should remain joinable and hence detachable */
11964                 sleep( 1 );
11965
11966                 status = pthread_detach( t );
11967                 if( status ) return status;
11968         }
11969 #endif
11970
11971 #else
11972         /* Draft 4 pthreads */
11973         status = pthread_create( &t, pthread_attr_default, task, NULL );
11974         if( status ) return status;
11975
11976         if( detach ) {
11977                 /* give thread a chance to complete */
11978                 /* it should remain joinable and hence detachable */
11979                 sleep( 1 );
11980
11981                 status = pthread_detach( &t );
11982                 if( status ) return status;
11983         }
11984 #endif
11985
11986 #ifdef HAVE_LINUX_THREADS
11987         pthread_kill_other_threads_np();
11988 #endif
11989
11990         return 0;
11991
11992 ; return 0; }
11993 EOF
11994 if { (eval echo configure:11995: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
11995   rm -rf conftest*
11996   ol_cv_pthread_create=yes
11997 else
11998   echo "configure: failed program was:" >&5
11999   cat conftest.$ac_ext >&5
12000   rm -rf conftest*
12001   ol_cv_pthread_create=no
12002 fi
12003 rm -f conftest*
12004 else
12005   cat > conftest.$ac_ext <<EOF
12006 #line 12007 "configure"
12007 #include "confdefs.h"
12008 /* pthread test headers */
12009 #include <pthread.h>
12010 #ifndef NULL
12011 #define NULL (void*)0
12012 #endif
12013
12014 static void *task(p)
12015         void *p;
12016 {
12017         return (void *) (p == NULL);
12018 }
12019
12020
12021 int main(argc, argv)
12022         int argc;
12023         char **argv;
12024 {
12025
12026         /* pthread test function */
12027         pthread_t t;
12028         int status;
12029         int detach = 1;
12030
12031 #ifdef HAVE_PTHREADS_FINAL
12032         /* Final pthreads */
12033         pthread_attr_t attr;
12034
12035         status = pthread_attr_init(&attr);
12036         if( status ) return status;
12037
12038 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12039         if( !detach ) {
12040 #if defined( PTHREAD_CREATE_JOINABLE )
12041                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12042 #else
12043                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12044 #endif
12045
12046 #ifdef PTHREAD_CREATE_DETACHED
12047         } else {
12048                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12049 #endif
12050         }
12051         if( status ) return status;
12052 #endif
12053
12054         status = pthread_create( &t, &attr, task, NULL );
12055         if( status ) return status;
12056
12057 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12058         if( detach ) {
12059                 /* give thread a chance to complete */
12060                 /* it should remain joinable and hence detachable */
12061                 sleep( 1 );
12062
12063                 status = pthread_detach( t );
12064                 if( status ) return status;
12065         }
12066 #endif
12067
12068 #else
12069         /* Draft 4 pthreads */
12070         status = pthread_create( &t, pthread_attr_default, task, NULL );
12071         if( status ) return status;
12072
12073         if( detach ) {
12074                 /* give thread a chance to complete */
12075                 /* it should remain joinable and hence detachable */
12076                 sleep( 1 );
12077
12078                 status = pthread_detach( &t );
12079                 if( status ) return status;
12080         }
12081 #endif
12082
12083 #ifdef HAVE_LINUX_THREADS
12084         pthread_kill_other_threads_np();
12085 #endif
12086
12087         return 0;
12088
12089 }
12090
12091 EOF
12092 if { (eval echo configure:12093: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12093 then
12094   ol_cv_pthread_create=yes
12095 else
12096   echo "configure: failed program was:" >&5
12097   cat conftest.$ac_ext >&5
12098   rm -fr conftest*
12099   ol_cv_pthread_create=no
12100 fi
12101 rm -fr conftest*
12102 fi
12103
12104 fi
12105
12106 echo "$ac_t""$ol_cv_pthread_create" 1>&6
12107
12108                 if test $ol_cv_pthread_create != no ; then
12109                         ol_link_threads=posix
12110                         ol_link_pthreads=""
12111                 fi
12112                 
12113                 # Pthread try link: -kthread (ol_cv_pthread_kthread)
12114 if test "$ol_link_threads" = no ; then
12115         # try -kthread
12116         echo $ac_n "checking for pthread link with -kthread""... $ac_c" 1>&6
12117 echo "configure:12118: checking for pthread link with -kthread" >&5
12118 if eval "test \"\${ol_cv_pthread_kthread+set}\" = set"; then
12119   echo $ac_n "(cached) $ac_c" 1>&6
12120 else
12121   
12122                 # save the flags
12123                 ol_LIBS="$LIBS"
12124                 LIBS="-kthread $LIBS"
12125
12126                 if test "$cross_compiling" = yes; then
12127   cat > conftest.$ac_ext <<EOF
12128 #line 12129 "configure"
12129 #include "confdefs.h"
12130 /* pthread test headers */
12131 #include <pthread.h>
12132 #ifndef NULL
12133 #define NULL (void*)0
12134 #endif
12135
12136 static void *task(p)
12137         void *p;
12138 {
12139         return (void *) (p == NULL);
12140 }
12141
12142 int main() {
12143
12144         /* pthread test function */
12145         pthread_t t;
12146         int status;
12147         int detach = 1;
12148
12149 #ifdef HAVE_PTHREADS_FINAL
12150         /* Final pthreads */
12151         pthread_attr_t attr;
12152
12153         status = pthread_attr_init(&attr);
12154         if( status ) return status;
12155
12156 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12157         if( !detach ) {
12158 #if defined( PTHREAD_CREATE_JOINABLE )
12159                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12160 #else
12161                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12162 #endif
12163
12164 #ifdef PTHREAD_CREATE_DETACHED
12165         } else {
12166                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12167 #endif
12168         }
12169         if( status ) return status;
12170 #endif
12171
12172         status = pthread_create( &t, &attr, task, NULL );
12173         if( status ) return status;
12174
12175 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12176         if( detach ) {
12177                 /* give thread a chance to complete */
12178                 /* it should remain joinable and hence detachable */
12179                 sleep( 1 );
12180
12181                 status = pthread_detach( t );
12182                 if( status ) return status;
12183         }
12184 #endif
12185
12186 #else
12187         /* Draft 4 pthreads */
12188         status = pthread_create( &t, pthread_attr_default, task, NULL );
12189         if( status ) return status;
12190
12191         if( detach ) {
12192                 /* give thread a chance to complete */
12193                 /* it should remain joinable and hence detachable */
12194                 sleep( 1 );
12195
12196                 status = pthread_detach( &t );
12197                 if( status ) return status;
12198         }
12199 #endif
12200
12201 #ifdef HAVE_LINUX_THREADS
12202         pthread_kill_other_threads_np();
12203 #endif
12204
12205         return 0;
12206
12207 ; return 0; }
12208 EOF
12209 if { (eval echo configure:12210: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12210   rm -rf conftest*
12211   ol_cv_pthread_kthread=yes
12212 else
12213   echo "configure: failed program was:" >&5
12214   cat conftest.$ac_ext >&5
12215   rm -rf conftest*
12216   ol_cv_pthread_kthread=no
12217 fi
12218 rm -f conftest*
12219 else
12220   cat > conftest.$ac_ext <<EOF
12221 #line 12222 "configure"
12222 #include "confdefs.h"
12223 /* pthread test headers */
12224 #include <pthread.h>
12225 #ifndef NULL
12226 #define NULL (void*)0
12227 #endif
12228
12229 static void *task(p)
12230         void *p;
12231 {
12232         return (void *) (p == NULL);
12233 }
12234
12235
12236 int main(argc, argv)
12237         int argc;
12238         char **argv;
12239 {
12240
12241         /* pthread test function */
12242         pthread_t t;
12243         int status;
12244         int detach = 1;
12245
12246 #ifdef HAVE_PTHREADS_FINAL
12247         /* Final pthreads */
12248         pthread_attr_t attr;
12249
12250         status = pthread_attr_init(&attr);
12251         if( status ) return status;
12252
12253 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12254         if( !detach ) {
12255 #if defined( PTHREAD_CREATE_JOINABLE )
12256                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12257 #else
12258                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12259 #endif
12260
12261 #ifdef PTHREAD_CREATE_DETACHED
12262         } else {
12263                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12264 #endif
12265         }
12266         if( status ) return status;
12267 #endif
12268
12269         status = pthread_create( &t, &attr, task, NULL );
12270         if( status ) return status;
12271
12272 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12273         if( detach ) {
12274                 /* give thread a chance to complete */
12275                 /* it should remain joinable and hence detachable */
12276                 sleep( 1 );
12277
12278                 status = pthread_detach( t );
12279                 if( status ) return status;
12280         }
12281 #endif
12282
12283 #else
12284         /* Draft 4 pthreads */
12285         status = pthread_create( &t, pthread_attr_default, task, NULL );
12286         if( status ) return status;
12287
12288         if( detach ) {
12289                 /* give thread a chance to complete */
12290                 /* it should remain joinable and hence detachable */
12291                 sleep( 1 );
12292
12293                 status = pthread_detach( &t );
12294                 if( status ) return status;
12295         }
12296 #endif
12297
12298 #ifdef HAVE_LINUX_THREADS
12299         pthread_kill_other_threads_np();
12300 #endif
12301
12302         return 0;
12303
12304 }
12305
12306 EOF
12307 if { (eval echo configure:12308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12308 then
12309   ol_cv_pthread_kthread=yes
12310 else
12311   echo "configure: failed program was:" >&5
12312   cat conftest.$ac_ext >&5
12313   rm -fr conftest*
12314   ol_cv_pthread_kthread=no
12315 fi
12316 rm -fr conftest*
12317 fi
12318
12319
12320                 # restore the LIBS
12321                 LIBS="$ol_LIBS"
12322         
12323 fi
12324
12325 echo "$ac_t""$ol_cv_pthread_kthread" 1>&6
12326
12327         if test $ol_cv_pthread_kthread = yes ; then
12328                 ol_link_pthreads="-kthread"
12329                 ol_link_threads=posix
12330         fi
12331 fi
12332
12333                 # Pthread try link: -pthread (ol_cv_pthread_pthread)
12334 if test "$ol_link_threads" = no ; then
12335         # try -pthread
12336         echo $ac_n "checking for pthread link with -pthread""... $ac_c" 1>&6
12337 echo "configure:12338: checking for pthread link with -pthread" >&5
12338 if eval "test \"\${ol_cv_pthread_pthread+set}\" = set"; then
12339   echo $ac_n "(cached) $ac_c" 1>&6
12340 else
12341   
12342                 # save the flags
12343                 ol_LIBS="$LIBS"
12344                 LIBS="-pthread $LIBS"
12345
12346                 if test "$cross_compiling" = yes; then
12347   cat > conftest.$ac_ext <<EOF
12348 #line 12349 "configure"
12349 #include "confdefs.h"
12350 /* pthread test headers */
12351 #include <pthread.h>
12352 #ifndef NULL
12353 #define NULL (void*)0
12354 #endif
12355
12356 static void *task(p)
12357         void *p;
12358 {
12359         return (void *) (p == NULL);
12360 }
12361
12362 int main() {
12363
12364         /* pthread test function */
12365         pthread_t t;
12366         int status;
12367         int detach = 1;
12368
12369 #ifdef HAVE_PTHREADS_FINAL
12370         /* Final pthreads */
12371         pthread_attr_t attr;
12372
12373         status = pthread_attr_init(&attr);
12374         if( status ) return status;
12375
12376 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12377         if( !detach ) {
12378 #if defined( PTHREAD_CREATE_JOINABLE )
12379                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12380 #else
12381                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12382 #endif
12383
12384 #ifdef PTHREAD_CREATE_DETACHED
12385         } else {
12386                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12387 #endif
12388         }
12389         if( status ) return status;
12390 #endif
12391
12392         status = pthread_create( &t, &attr, task, NULL );
12393         if( status ) return status;
12394
12395 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12396         if( detach ) {
12397                 /* give thread a chance to complete */
12398                 /* it should remain joinable and hence detachable */
12399                 sleep( 1 );
12400
12401                 status = pthread_detach( t );
12402                 if( status ) return status;
12403         }
12404 #endif
12405
12406 #else
12407         /* Draft 4 pthreads */
12408         status = pthread_create( &t, pthread_attr_default, task, NULL );
12409         if( status ) return status;
12410
12411         if( detach ) {
12412                 /* give thread a chance to complete */
12413                 /* it should remain joinable and hence detachable */
12414                 sleep( 1 );
12415
12416                 status = pthread_detach( &t );
12417                 if( status ) return status;
12418         }
12419 #endif
12420
12421 #ifdef HAVE_LINUX_THREADS
12422         pthread_kill_other_threads_np();
12423 #endif
12424
12425         return 0;
12426
12427 ; return 0; }
12428 EOF
12429 if { (eval echo configure:12430: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12430   rm -rf conftest*
12431   ol_cv_pthread_pthread=yes
12432 else
12433   echo "configure: failed program was:" >&5
12434   cat conftest.$ac_ext >&5
12435   rm -rf conftest*
12436   ol_cv_pthread_pthread=no
12437 fi
12438 rm -f conftest*
12439 else
12440   cat > conftest.$ac_ext <<EOF
12441 #line 12442 "configure"
12442 #include "confdefs.h"
12443 /* pthread test headers */
12444 #include <pthread.h>
12445 #ifndef NULL
12446 #define NULL (void*)0
12447 #endif
12448
12449 static void *task(p)
12450         void *p;
12451 {
12452         return (void *) (p == NULL);
12453 }
12454
12455
12456 int main(argc, argv)
12457         int argc;
12458         char **argv;
12459 {
12460
12461         /* pthread test function */
12462         pthread_t t;
12463         int status;
12464         int detach = 1;
12465
12466 #ifdef HAVE_PTHREADS_FINAL
12467         /* Final pthreads */
12468         pthread_attr_t attr;
12469
12470         status = pthread_attr_init(&attr);
12471         if( status ) return status;
12472
12473 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12474         if( !detach ) {
12475 #if defined( PTHREAD_CREATE_JOINABLE )
12476                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12477 #else
12478                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12479 #endif
12480
12481 #ifdef PTHREAD_CREATE_DETACHED
12482         } else {
12483                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12484 #endif
12485         }
12486         if( status ) return status;
12487 #endif
12488
12489         status = pthread_create( &t, &attr, task, NULL );
12490         if( status ) return status;
12491
12492 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12493         if( detach ) {
12494                 /* give thread a chance to complete */
12495                 /* it should remain joinable and hence detachable */
12496                 sleep( 1 );
12497
12498                 status = pthread_detach( t );
12499                 if( status ) return status;
12500         }
12501 #endif
12502
12503 #else
12504         /* Draft 4 pthreads */
12505         status = pthread_create( &t, pthread_attr_default, task, NULL );
12506         if( status ) return status;
12507
12508         if( detach ) {
12509                 /* give thread a chance to complete */
12510                 /* it should remain joinable and hence detachable */
12511                 sleep( 1 );
12512
12513                 status = pthread_detach( &t );
12514                 if( status ) return status;
12515         }
12516 #endif
12517
12518 #ifdef HAVE_LINUX_THREADS
12519         pthread_kill_other_threads_np();
12520 #endif
12521
12522         return 0;
12523
12524 }
12525
12526 EOF
12527 if { (eval echo configure:12528: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12528 then
12529   ol_cv_pthread_pthread=yes
12530 else
12531   echo "configure: failed program was:" >&5
12532   cat conftest.$ac_ext >&5
12533   rm -fr conftest*
12534   ol_cv_pthread_pthread=no
12535 fi
12536 rm -fr conftest*
12537 fi
12538
12539
12540                 # restore the LIBS
12541                 LIBS="$ol_LIBS"
12542         
12543 fi
12544
12545 echo "$ac_t""$ol_cv_pthread_pthread" 1>&6
12546
12547         if test $ol_cv_pthread_pthread = yes ; then
12548                 ol_link_pthreads="-pthread"
12549                 ol_link_threads=posix
12550         fi
12551 fi
12552
12553                 # Pthread try link: -pthreads (ol_cv_pthread_pthreads)
12554 if test "$ol_link_threads" = no ; then
12555         # try -pthreads
12556         echo $ac_n "checking for pthread link with -pthreads""... $ac_c" 1>&6
12557 echo "configure:12558: checking for pthread link with -pthreads" >&5
12558 if eval "test \"\${ol_cv_pthread_pthreads+set}\" = set"; then
12559   echo $ac_n "(cached) $ac_c" 1>&6
12560 else
12561   
12562                 # save the flags
12563                 ol_LIBS="$LIBS"
12564                 LIBS="-pthreads $LIBS"
12565
12566                 if test "$cross_compiling" = yes; then
12567   cat > conftest.$ac_ext <<EOF
12568 #line 12569 "configure"
12569 #include "confdefs.h"
12570 /* pthread test headers */
12571 #include <pthread.h>
12572 #ifndef NULL
12573 #define NULL (void*)0
12574 #endif
12575
12576 static void *task(p)
12577         void *p;
12578 {
12579         return (void *) (p == NULL);
12580 }
12581
12582 int main() {
12583
12584         /* pthread test function */
12585         pthread_t t;
12586         int status;
12587         int detach = 1;
12588
12589 #ifdef HAVE_PTHREADS_FINAL
12590         /* Final pthreads */
12591         pthread_attr_t attr;
12592
12593         status = pthread_attr_init(&attr);
12594         if( status ) return status;
12595
12596 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12597         if( !detach ) {
12598 #if defined( PTHREAD_CREATE_JOINABLE )
12599                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12600 #else
12601                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12602 #endif
12603
12604 #ifdef PTHREAD_CREATE_DETACHED
12605         } else {
12606                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12607 #endif
12608         }
12609         if( status ) return status;
12610 #endif
12611
12612         status = pthread_create( &t, &attr, task, NULL );
12613         if( status ) return status;
12614
12615 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12616         if( detach ) {
12617                 /* give thread a chance to complete */
12618                 /* it should remain joinable and hence detachable */
12619                 sleep( 1 );
12620
12621                 status = pthread_detach( t );
12622                 if( status ) return status;
12623         }
12624 #endif
12625
12626 #else
12627         /* Draft 4 pthreads */
12628         status = pthread_create( &t, pthread_attr_default, task, NULL );
12629         if( status ) return status;
12630
12631         if( detach ) {
12632                 /* give thread a chance to complete */
12633                 /* it should remain joinable and hence detachable */
12634                 sleep( 1 );
12635
12636                 status = pthread_detach( &t );
12637                 if( status ) return status;
12638         }
12639 #endif
12640
12641 #ifdef HAVE_LINUX_THREADS
12642         pthread_kill_other_threads_np();
12643 #endif
12644
12645         return 0;
12646
12647 ; return 0; }
12648 EOF
12649 if { (eval echo configure:12650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12650   rm -rf conftest*
12651   ol_cv_pthread_pthreads=yes
12652 else
12653   echo "configure: failed program was:" >&5
12654   cat conftest.$ac_ext >&5
12655   rm -rf conftest*
12656   ol_cv_pthread_pthreads=no
12657 fi
12658 rm -f conftest*
12659 else
12660   cat > conftest.$ac_ext <<EOF
12661 #line 12662 "configure"
12662 #include "confdefs.h"
12663 /* pthread test headers */
12664 #include <pthread.h>
12665 #ifndef NULL
12666 #define NULL (void*)0
12667 #endif
12668
12669 static void *task(p)
12670         void *p;
12671 {
12672         return (void *) (p == NULL);
12673 }
12674
12675
12676 int main(argc, argv)
12677         int argc;
12678         char **argv;
12679 {
12680
12681         /* pthread test function */
12682         pthread_t t;
12683         int status;
12684         int detach = 1;
12685
12686 #ifdef HAVE_PTHREADS_FINAL
12687         /* Final pthreads */
12688         pthread_attr_t attr;
12689
12690         status = pthread_attr_init(&attr);
12691         if( status ) return status;
12692
12693 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12694         if( !detach ) {
12695 #if defined( PTHREAD_CREATE_JOINABLE )
12696                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12697 #else
12698                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12699 #endif
12700
12701 #ifdef PTHREAD_CREATE_DETACHED
12702         } else {
12703                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12704 #endif
12705         }
12706         if( status ) return status;
12707 #endif
12708
12709         status = pthread_create( &t, &attr, task, NULL );
12710         if( status ) return status;
12711
12712 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12713         if( detach ) {
12714                 /* give thread a chance to complete */
12715                 /* it should remain joinable and hence detachable */
12716                 sleep( 1 );
12717
12718                 status = pthread_detach( t );
12719                 if( status ) return status;
12720         }
12721 #endif
12722
12723 #else
12724         /* Draft 4 pthreads */
12725         status = pthread_create( &t, pthread_attr_default, task, NULL );
12726         if( status ) return status;
12727
12728         if( detach ) {
12729                 /* give thread a chance to complete */
12730                 /* it should remain joinable and hence detachable */
12731                 sleep( 1 );
12732
12733                 status = pthread_detach( &t );
12734                 if( status ) return status;
12735         }
12736 #endif
12737
12738 #ifdef HAVE_LINUX_THREADS
12739         pthread_kill_other_threads_np();
12740 #endif
12741
12742         return 0;
12743
12744 }
12745
12746 EOF
12747 if { (eval echo configure:12748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12748 then
12749   ol_cv_pthread_pthreads=yes
12750 else
12751   echo "configure: failed program was:" >&5
12752   cat conftest.$ac_ext >&5
12753   rm -fr conftest*
12754   ol_cv_pthread_pthreads=no
12755 fi
12756 rm -fr conftest*
12757 fi
12758
12759
12760                 # restore the LIBS
12761                 LIBS="$ol_LIBS"
12762         
12763 fi
12764
12765 echo "$ac_t""$ol_cv_pthread_pthreads" 1>&6
12766
12767         if test $ol_cv_pthread_pthreads = yes ; then
12768                 ol_link_pthreads="-pthreads"
12769                 ol_link_threads=posix
12770         fi
12771 fi
12772
12773                 # Pthread try link: -mthreads (ol_cv_pthread_mthreads)
12774 if test "$ol_link_threads" = no ; then
12775         # try -mthreads
12776         echo $ac_n "checking for pthread link with -mthreads""... $ac_c" 1>&6
12777 echo "configure:12778: checking for pthread link with -mthreads" >&5
12778 if eval "test \"\${ol_cv_pthread_mthreads+set}\" = set"; then
12779   echo $ac_n "(cached) $ac_c" 1>&6
12780 else
12781   
12782                 # save the flags
12783                 ol_LIBS="$LIBS"
12784                 LIBS="-mthreads $LIBS"
12785
12786                 if test "$cross_compiling" = yes; then
12787   cat > conftest.$ac_ext <<EOF
12788 #line 12789 "configure"
12789 #include "confdefs.h"
12790 /* pthread test headers */
12791 #include <pthread.h>
12792 #ifndef NULL
12793 #define NULL (void*)0
12794 #endif
12795
12796 static void *task(p)
12797         void *p;
12798 {
12799         return (void *) (p == NULL);
12800 }
12801
12802 int main() {
12803
12804         /* pthread test function */
12805         pthread_t t;
12806         int status;
12807         int detach = 1;
12808
12809 #ifdef HAVE_PTHREADS_FINAL
12810         /* Final pthreads */
12811         pthread_attr_t attr;
12812
12813         status = pthread_attr_init(&attr);
12814         if( status ) return status;
12815
12816 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12817         if( !detach ) {
12818 #if defined( PTHREAD_CREATE_JOINABLE )
12819                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12820 #else
12821                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12822 #endif
12823
12824 #ifdef PTHREAD_CREATE_DETACHED
12825         } else {
12826                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12827 #endif
12828         }
12829         if( status ) return status;
12830 #endif
12831
12832         status = pthread_create( &t, &attr, task, NULL );
12833         if( status ) return status;
12834
12835 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12836         if( detach ) {
12837                 /* give thread a chance to complete */
12838                 /* it should remain joinable and hence detachable */
12839                 sleep( 1 );
12840
12841                 status = pthread_detach( t );
12842                 if( status ) return status;
12843         }
12844 #endif
12845
12846 #else
12847         /* Draft 4 pthreads */
12848         status = pthread_create( &t, pthread_attr_default, task, NULL );
12849         if( status ) return status;
12850
12851         if( detach ) {
12852                 /* give thread a chance to complete */
12853                 /* it should remain joinable and hence detachable */
12854                 sleep( 1 );
12855
12856                 status = pthread_detach( &t );
12857                 if( status ) return status;
12858         }
12859 #endif
12860
12861 #ifdef HAVE_LINUX_THREADS
12862         pthread_kill_other_threads_np();
12863 #endif
12864
12865         return 0;
12866
12867 ; return 0; }
12868 EOF
12869 if { (eval echo configure:12870: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
12870   rm -rf conftest*
12871   ol_cv_pthread_mthreads=yes
12872 else
12873   echo "configure: failed program was:" >&5
12874   cat conftest.$ac_ext >&5
12875   rm -rf conftest*
12876   ol_cv_pthread_mthreads=no
12877 fi
12878 rm -f conftest*
12879 else
12880   cat > conftest.$ac_ext <<EOF
12881 #line 12882 "configure"
12882 #include "confdefs.h"
12883 /* pthread test headers */
12884 #include <pthread.h>
12885 #ifndef NULL
12886 #define NULL (void*)0
12887 #endif
12888
12889 static void *task(p)
12890         void *p;
12891 {
12892         return (void *) (p == NULL);
12893 }
12894
12895
12896 int main(argc, argv)
12897         int argc;
12898         char **argv;
12899 {
12900
12901         /* pthread test function */
12902         pthread_t t;
12903         int status;
12904         int detach = 1;
12905
12906 #ifdef HAVE_PTHREADS_FINAL
12907         /* Final pthreads */
12908         pthread_attr_t attr;
12909
12910         status = pthread_attr_init(&attr);
12911         if( status ) return status;
12912
12913 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
12914         if( !detach ) {
12915 #if defined( PTHREAD_CREATE_JOINABLE )
12916                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
12917 #else
12918                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
12919 #endif
12920
12921 #ifdef PTHREAD_CREATE_DETACHED
12922         } else {
12923                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
12924 #endif
12925         }
12926         if( status ) return status;
12927 #endif
12928
12929         status = pthread_create( &t, &attr, task, NULL );
12930         if( status ) return status;
12931
12932 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
12933         if( detach ) {
12934                 /* give thread a chance to complete */
12935                 /* it should remain joinable and hence detachable */
12936                 sleep( 1 );
12937
12938                 status = pthread_detach( t );
12939                 if( status ) return status;
12940         }
12941 #endif
12942
12943 #else
12944         /* Draft 4 pthreads */
12945         status = pthread_create( &t, pthread_attr_default, task, NULL );
12946         if( status ) return status;
12947
12948         if( detach ) {
12949                 /* give thread a chance to complete */
12950                 /* it should remain joinable and hence detachable */
12951                 sleep( 1 );
12952
12953                 status = pthread_detach( &t );
12954                 if( status ) return status;
12955         }
12956 #endif
12957
12958 #ifdef HAVE_LINUX_THREADS
12959         pthread_kill_other_threads_np();
12960 #endif
12961
12962         return 0;
12963
12964 }
12965
12966 EOF
12967 if { (eval echo configure:12968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
12968 then
12969   ol_cv_pthread_mthreads=yes
12970 else
12971   echo "configure: failed program was:" >&5
12972   cat conftest.$ac_ext >&5
12973   rm -fr conftest*
12974   ol_cv_pthread_mthreads=no
12975 fi
12976 rm -fr conftest*
12977 fi
12978
12979
12980                 # restore the LIBS
12981                 LIBS="$ol_LIBS"
12982         
12983 fi
12984
12985 echo "$ac_t""$ol_cv_pthread_mthreads" 1>&6
12986
12987         if test $ol_cv_pthread_mthreads = yes ; then
12988                 ol_link_pthreads="-mthreads"
12989                 ol_link_threads=posix
12990         fi
12991 fi
12992
12993                 # Pthread try link: -thread (ol_cv_pthread_thread)
12994 if test "$ol_link_threads" = no ; then
12995         # try -thread
12996         echo $ac_n "checking for pthread link with -thread""... $ac_c" 1>&6
12997 echo "configure:12998: checking for pthread link with -thread" >&5
12998 if eval "test \"\${ol_cv_pthread_thread+set}\" = set"; then
12999   echo $ac_n "(cached) $ac_c" 1>&6
13000 else
13001   
13002                 # save the flags
13003                 ol_LIBS="$LIBS"
13004                 LIBS="-thread $LIBS"
13005
13006                 if test "$cross_compiling" = yes; then
13007   cat > conftest.$ac_ext <<EOF
13008 #line 13009 "configure"
13009 #include "confdefs.h"
13010 /* pthread test headers */
13011 #include <pthread.h>
13012 #ifndef NULL
13013 #define NULL (void*)0
13014 #endif
13015
13016 static void *task(p)
13017         void *p;
13018 {
13019         return (void *) (p == NULL);
13020 }
13021
13022 int main() {
13023
13024         /* pthread test function */
13025         pthread_t t;
13026         int status;
13027         int detach = 1;
13028
13029 #ifdef HAVE_PTHREADS_FINAL
13030         /* Final pthreads */
13031         pthread_attr_t attr;
13032
13033         status = pthread_attr_init(&attr);
13034         if( status ) return status;
13035
13036 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13037         if( !detach ) {
13038 #if defined( PTHREAD_CREATE_JOINABLE )
13039                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13040 #else
13041                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13042 #endif
13043
13044 #ifdef PTHREAD_CREATE_DETACHED
13045         } else {
13046                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13047 #endif
13048         }
13049         if( status ) return status;
13050 #endif
13051
13052         status = pthread_create( &t, &attr, task, NULL );
13053         if( status ) return status;
13054
13055 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13056         if( detach ) {
13057                 /* give thread a chance to complete */
13058                 /* it should remain joinable and hence detachable */
13059                 sleep( 1 );
13060
13061                 status = pthread_detach( t );
13062                 if( status ) return status;
13063         }
13064 #endif
13065
13066 #else
13067         /* Draft 4 pthreads */
13068         status = pthread_create( &t, pthread_attr_default, task, NULL );
13069         if( status ) return status;
13070
13071         if( detach ) {
13072                 /* give thread a chance to complete */
13073                 /* it should remain joinable and hence detachable */
13074                 sleep( 1 );
13075
13076                 status = pthread_detach( &t );
13077                 if( status ) return status;
13078         }
13079 #endif
13080
13081 #ifdef HAVE_LINUX_THREADS
13082         pthread_kill_other_threads_np();
13083 #endif
13084
13085         return 0;
13086
13087 ; return 0; }
13088 EOF
13089 if { (eval echo configure:13090: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13090   rm -rf conftest*
13091   ol_cv_pthread_thread=yes
13092 else
13093   echo "configure: failed program was:" >&5
13094   cat conftest.$ac_ext >&5
13095   rm -rf conftest*
13096   ol_cv_pthread_thread=no
13097 fi
13098 rm -f conftest*
13099 else
13100   cat > conftest.$ac_ext <<EOF
13101 #line 13102 "configure"
13102 #include "confdefs.h"
13103 /* pthread test headers */
13104 #include <pthread.h>
13105 #ifndef NULL
13106 #define NULL (void*)0
13107 #endif
13108
13109 static void *task(p)
13110         void *p;
13111 {
13112         return (void *) (p == NULL);
13113 }
13114
13115
13116 int main(argc, argv)
13117         int argc;
13118         char **argv;
13119 {
13120
13121         /* pthread test function */
13122         pthread_t t;
13123         int status;
13124         int detach = 1;
13125
13126 #ifdef HAVE_PTHREADS_FINAL
13127         /* Final pthreads */
13128         pthread_attr_t attr;
13129
13130         status = pthread_attr_init(&attr);
13131         if( status ) return status;
13132
13133 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13134         if( !detach ) {
13135 #if defined( PTHREAD_CREATE_JOINABLE )
13136                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13137 #else
13138                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13139 #endif
13140
13141 #ifdef PTHREAD_CREATE_DETACHED
13142         } else {
13143                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13144 #endif
13145         }
13146         if( status ) return status;
13147 #endif
13148
13149         status = pthread_create( &t, &attr, task, NULL );
13150         if( status ) return status;
13151
13152 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13153         if( detach ) {
13154                 /* give thread a chance to complete */
13155                 /* it should remain joinable and hence detachable */
13156                 sleep( 1 );
13157
13158                 status = pthread_detach( t );
13159                 if( status ) return status;
13160         }
13161 #endif
13162
13163 #else
13164         /* Draft 4 pthreads */
13165         status = pthread_create( &t, pthread_attr_default, task, NULL );
13166         if( status ) return status;
13167
13168         if( detach ) {
13169                 /* give thread a chance to complete */
13170                 /* it should remain joinable and hence detachable */
13171                 sleep( 1 );
13172
13173                 status = pthread_detach( &t );
13174                 if( status ) return status;
13175         }
13176 #endif
13177
13178 #ifdef HAVE_LINUX_THREADS
13179         pthread_kill_other_threads_np();
13180 #endif
13181
13182         return 0;
13183
13184 }
13185
13186 EOF
13187 if { (eval echo configure:13188: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13188 then
13189   ol_cv_pthread_thread=yes
13190 else
13191   echo "configure: failed program was:" >&5
13192   cat conftest.$ac_ext >&5
13193   rm -fr conftest*
13194   ol_cv_pthread_thread=no
13195 fi
13196 rm -fr conftest*
13197 fi
13198
13199
13200                 # restore the LIBS
13201                 LIBS="$ol_LIBS"
13202         
13203 fi
13204
13205 echo "$ac_t""$ol_cv_pthread_thread" 1>&6
13206
13207         if test $ol_cv_pthread_thread = yes ; then
13208                 ol_link_pthreads="-thread"
13209                 ol_link_threads=posix
13210         fi
13211 fi
13212
13213
13214                 # Pthread try link: -lpthread -lmach -lexc -lc_r (ol_cv_pthread_lpthread_lmach_lexc_lc_r)
13215 if test "$ol_link_threads" = no ; then
13216         # try -lpthread -lmach -lexc -lc_r
13217         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc -lc_r""... $ac_c" 1>&6
13218 echo "configure:13219: checking for pthread link with -lpthread -lmach -lexc -lc_r" >&5
13219 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc_lc_r+set}\" = set"; then
13220   echo $ac_n "(cached) $ac_c" 1>&6
13221 else
13222   
13223                 # save the flags
13224                 ol_LIBS="$LIBS"
13225                 LIBS="-lpthread -lmach -lexc -lc_r $LIBS"
13226
13227                 if test "$cross_compiling" = yes; then
13228   cat > conftest.$ac_ext <<EOF
13229 #line 13230 "configure"
13230 #include "confdefs.h"
13231 /* pthread test headers */
13232 #include <pthread.h>
13233 #ifndef NULL
13234 #define NULL (void*)0
13235 #endif
13236
13237 static void *task(p)
13238         void *p;
13239 {
13240         return (void *) (p == NULL);
13241 }
13242
13243 int main() {
13244
13245         /* pthread test function */
13246         pthread_t t;
13247         int status;
13248         int detach = 1;
13249
13250 #ifdef HAVE_PTHREADS_FINAL
13251         /* Final pthreads */
13252         pthread_attr_t attr;
13253
13254         status = pthread_attr_init(&attr);
13255         if( status ) return status;
13256
13257 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13258         if( !detach ) {
13259 #if defined( PTHREAD_CREATE_JOINABLE )
13260                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13261 #else
13262                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13263 #endif
13264
13265 #ifdef PTHREAD_CREATE_DETACHED
13266         } else {
13267                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13268 #endif
13269         }
13270         if( status ) return status;
13271 #endif
13272
13273         status = pthread_create( &t, &attr, task, NULL );
13274         if( status ) return status;
13275
13276 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13277         if( detach ) {
13278                 /* give thread a chance to complete */
13279                 /* it should remain joinable and hence detachable */
13280                 sleep( 1 );
13281
13282                 status = pthread_detach( t );
13283                 if( status ) return status;
13284         }
13285 #endif
13286
13287 #else
13288         /* Draft 4 pthreads */
13289         status = pthread_create( &t, pthread_attr_default, task, NULL );
13290         if( status ) return status;
13291
13292         if( detach ) {
13293                 /* give thread a chance to complete */
13294                 /* it should remain joinable and hence detachable */
13295                 sleep( 1 );
13296
13297                 status = pthread_detach( &t );
13298                 if( status ) return status;
13299         }
13300 #endif
13301
13302 #ifdef HAVE_LINUX_THREADS
13303         pthread_kill_other_threads_np();
13304 #endif
13305
13306         return 0;
13307
13308 ; return 0; }
13309 EOF
13310 if { (eval echo configure:13311: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13311   rm -rf conftest*
13312   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13313 else
13314   echo "configure: failed program was:" >&5
13315   cat conftest.$ac_ext >&5
13316   rm -rf conftest*
13317   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13318 fi
13319 rm -f conftest*
13320 else
13321   cat > conftest.$ac_ext <<EOF
13322 #line 13323 "configure"
13323 #include "confdefs.h"
13324 /* pthread test headers */
13325 #include <pthread.h>
13326 #ifndef NULL
13327 #define NULL (void*)0
13328 #endif
13329
13330 static void *task(p)
13331         void *p;
13332 {
13333         return (void *) (p == NULL);
13334 }
13335
13336
13337 int main(argc, argv)
13338         int argc;
13339         char **argv;
13340 {
13341
13342         /* pthread test function */
13343         pthread_t t;
13344         int status;
13345         int detach = 1;
13346
13347 #ifdef HAVE_PTHREADS_FINAL
13348         /* Final pthreads */
13349         pthread_attr_t attr;
13350
13351         status = pthread_attr_init(&attr);
13352         if( status ) return status;
13353
13354 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13355         if( !detach ) {
13356 #if defined( PTHREAD_CREATE_JOINABLE )
13357                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13358 #else
13359                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13360 #endif
13361
13362 #ifdef PTHREAD_CREATE_DETACHED
13363         } else {
13364                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13365 #endif
13366         }
13367         if( status ) return status;
13368 #endif
13369
13370         status = pthread_create( &t, &attr, task, NULL );
13371         if( status ) return status;
13372
13373 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13374         if( detach ) {
13375                 /* give thread a chance to complete */
13376                 /* it should remain joinable and hence detachable */
13377                 sleep( 1 );
13378
13379                 status = pthread_detach( t );
13380                 if( status ) return status;
13381         }
13382 #endif
13383
13384 #else
13385         /* Draft 4 pthreads */
13386         status = pthread_create( &t, pthread_attr_default, task, NULL );
13387         if( status ) return status;
13388
13389         if( detach ) {
13390                 /* give thread a chance to complete */
13391                 /* it should remain joinable and hence detachable */
13392                 sleep( 1 );
13393
13394                 status = pthread_detach( &t );
13395                 if( status ) return status;
13396         }
13397 #endif
13398
13399 #ifdef HAVE_LINUX_THREADS
13400         pthread_kill_other_threads_np();
13401 #endif
13402
13403         return 0;
13404
13405 }
13406
13407 EOF
13408 if { (eval echo configure:13409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13409 then
13410   ol_cv_pthread_lpthread_lmach_lexc_lc_r=yes
13411 else
13412   echo "configure: failed program was:" >&5
13413   cat conftest.$ac_ext >&5
13414   rm -fr conftest*
13415   ol_cv_pthread_lpthread_lmach_lexc_lc_r=no
13416 fi
13417 rm -fr conftest*
13418 fi
13419
13420
13421                 # restore the LIBS
13422                 LIBS="$ol_LIBS"
13423         
13424 fi
13425
13426 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc_lc_r" 1>&6
13427
13428         if test $ol_cv_pthread_lpthread_lmach_lexc_lc_r = yes ; then
13429                 ol_link_pthreads="-lpthread -lmach -lexc -lc_r"
13430                 ol_link_threads=posix
13431         fi
13432 fi
13433
13434                 # Pthread try link: -lpthread -lmach -lexc (ol_cv_pthread_lpthread_lmach_lexc)
13435 if test "$ol_link_threads" = no ; then
13436         # try -lpthread -lmach -lexc
13437         echo $ac_n "checking for pthread link with -lpthread -lmach -lexc""... $ac_c" 1>&6
13438 echo "configure:13439: checking for pthread link with -lpthread -lmach -lexc" >&5
13439 if eval "test \"\${ol_cv_pthread_lpthread_lmach_lexc+set}\" = set"; then
13440   echo $ac_n "(cached) $ac_c" 1>&6
13441 else
13442   
13443                 # save the flags
13444                 ol_LIBS="$LIBS"
13445                 LIBS="-lpthread -lmach -lexc $LIBS"
13446
13447                 if test "$cross_compiling" = yes; then
13448   cat > conftest.$ac_ext <<EOF
13449 #line 13450 "configure"
13450 #include "confdefs.h"
13451 /* pthread test headers */
13452 #include <pthread.h>
13453 #ifndef NULL
13454 #define NULL (void*)0
13455 #endif
13456
13457 static void *task(p)
13458         void *p;
13459 {
13460         return (void *) (p == NULL);
13461 }
13462
13463 int main() {
13464
13465         /* pthread test function */
13466         pthread_t t;
13467         int status;
13468         int detach = 1;
13469
13470 #ifdef HAVE_PTHREADS_FINAL
13471         /* Final pthreads */
13472         pthread_attr_t attr;
13473
13474         status = pthread_attr_init(&attr);
13475         if( status ) return status;
13476
13477 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13478         if( !detach ) {
13479 #if defined( PTHREAD_CREATE_JOINABLE )
13480                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13481 #else
13482                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13483 #endif
13484
13485 #ifdef PTHREAD_CREATE_DETACHED
13486         } else {
13487                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13488 #endif
13489         }
13490         if( status ) return status;
13491 #endif
13492
13493         status = pthread_create( &t, &attr, task, NULL );
13494         if( status ) return status;
13495
13496 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13497         if( detach ) {
13498                 /* give thread a chance to complete */
13499                 /* it should remain joinable and hence detachable */
13500                 sleep( 1 );
13501
13502                 status = pthread_detach( t );
13503                 if( status ) return status;
13504         }
13505 #endif
13506
13507 #else
13508         /* Draft 4 pthreads */
13509         status = pthread_create( &t, pthread_attr_default, task, NULL );
13510         if( status ) return status;
13511
13512         if( detach ) {
13513                 /* give thread a chance to complete */
13514                 /* it should remain joinable and hence detachable */
13515                 sleep( 1 );
13516
13517                 status = pthread_detach( &t );
13518                 if( status ) return status;
13519         }
13520 #endif
13521
13522 #ifdef HAVE_LINUX_THREADS
13523         pthread_kill_other_threads_np();
13524 #endif
13525
13526         return 0;
13527
13528 ; return 0; }
13529 EOF
13530 if { (eval echo configure:13531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13531   rm -rf conftest*
13532   ol_cv_pthread_lpthread_lmach_lexc=yes
13533 else
13534   echo "configure: failed program was:" >&5
13535   cat conftest.$ac_ext >&5
13536   rm -rf conftest*
13537   ol_cv_pthread_lpthread_lmach_lexc=no
13538 fi
13539 rm -f conftest*
13540 else
13541   cat > conftest.$ac_ext <<EOF
13542 #line 13543 "configure"
13543 #include "confdefs.h"
13544 /* pthread test headers */
13545 #include <pthread.h>
13546 #ifndef NULL
13547 #define NULL (void*)0
13548 #endif
13549
13550 static void *task(p)
13551         void *p;
13552 {
13553         return (void *) (p == NULL);
13554 }
13555
13556
13557 int main(argc, argv)
13558         int argc;
13559         char **argv;
13560 {
13561
13562         /* pthread test function */
13563         pthread_t t;
13564         int status;
13565         int detach = 1;
13566
13567 #ifdef HAVE_PTHREADS_FINAL
13568         /* Final pthreads */
13569         pthread_attr_t attr;
13570
13571         status = pthread_attr_init(&attr);
13572         if( status ) return status;
13573
13574 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13575         if( !detach ) {
13576 #if defined( PTHREAD_CREATE_JOINABLE )
13577                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13578 #else
13579                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13580 #endif
13581
13582 #ifdef PTHREAD_CREATE_DETACHED
13583         } else {
13584                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13585 #endif
13586         }
13587         if( status ) return status;
13588 #endif
13589
13590         status = pthread_create( &t, &attr, task, NULL );
13591         if( status ) return status;
13592
13593 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13594         if( detach ) {
13595                 /* give thread a chance to complete */
13596                 /* it should remain joinable and hence detachable */
13597                 sleep( 1 );
13598
13599                 status = pthread_detach( t );
13600                 if( status ) return status;
13601         }
13602 #endif
13603
13604 #else
13605         /* Draft 4 pthreads */
13606         status = pthread_create( &t, pthread_attr_default, task, NULL );
13607         if( status ) return status;
13608
13609         if( detach ) {
13610                 /* give thread a chance to complete */
13611                 /* it should remain joinable and hence detachable */
13612                 sleep( 1 );
13613
13614                 status = pthread_detach( &t );
13615                 if( status ) return status;
13616         }
13617 #endif
13618
13619 #ifdef HAVE_LINUX_THREADS
13620         pthread_kill_other_threads_np();
13621 #endif
13622
13623         return 0;
13624
13625 }
13626
13627 EOF
13628 if { (eval echo configure:13629: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13629 then
13630   ol_cv_pthread_lpthread_lmach_lexc=yes
13631 else
13632   echo "configure: failed program was:" >&5
13633   cat conftest.$ac_ext >&5
13634   rm -fr conftest*
13635   ol_cv_pthread_lpthread_lmach_lexc=no
13636 fi
13637 rm -fr conftest*
13638 fi
13639
13640
13641                 # restore the LIBS
13642                 LIBS="$ol_LIBS"
13643         
13644 fi
13645
13646 echo "$ac_t""$ol_cv_pthread_lpthread_lmach_lexc" 1>&6
13647
13648         if test $ol_cv_pthread_lpthread_lmach_lexc = yes ; then
13649                 ol_link_pthreads="-lpthread -lmach -lexc"
13650                 ol_link_threads=posix
13651         fi
13652 fi
13653
13654
13655                 # Pthread try link: -lpthread -Wl,-woff,85 (ol_cv_pthread_lib_lpthread_woff)
13656 if test "$ol_link_threads" = no ; then
13657         # try -lpthread -Wl,-woff,85
13658         echo $ac_n "checking for pthread link with -lpthread -Wl,-woff,85""... $ac_c" 1>&6
13659 echo "configure:13660: checking for pthread link with -lpthread -Wl,-woff,85" >&5
13660 if eval "test \"\${ol_cv_pthread_lib_lpthread_woff+set}\" = set"; then
13661   echo $ac_n "(cached) $ac_c" 1>&6
13662 else
13663   
13664                 # save the flags
13665                 ol_LIBS="$LIBS"
13666                 LIBS="-lpthread -Wl,-woff,85 $LIBS"
13667
13668                 if test "$cross_compiling" = yes; then
13669   cat > conftest.$ac_ext <<EOF
13670 #line 13671 "configure"
13671 #include "confdefs.h"
13672 /* pthread test headers */
13673 #include <pthread.h>
13674 #ifndef NULL
13675 #define NULL (void*)0
13676 #endif
13677
13678 static void *task(p)
13679         void *p;
13680 {
13681         return (void *) (p == NULL);
13682 }
13683
13684 int main() {
13685
13686         /* pthread test function */
13687         pthread_t t;
13688         int status;
13689         int detach = 1;
13690
13691 #ifdef HAVE_PTHREADS_FINAL
13692         /* Final pthreads */
13693         pthread_attr_t attr;
13694
13695         status = pthread_attr_init(&attr);
13696         if( status ) return status;
13697
13698 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13699         if( !detach ) {
13700 #if defined( PTHREAD_CREATE_JOINABLE )
13701                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13702 #else
13703                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13704 #endif
13705
13706 #ifdef PTHREAD_CREATE_DETACHED
13707         } else {
13708                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13709 #endif
13710         }
13711         if( status ) return status;
13712 #endif
13713
13714         status = pthread_create( &t, &attr, task, NULL );
13715         if( status ) return status;
13716
13717 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13718         if( detach ) {
13719                 /* give thread a chance to complete */
13720                 /* it should remain joinable and hence detachable */
13721                 sleep( 1 );
13722
13723                 status = pthread_detach( t );
13724                 if( status ) return status;
13725         }
13726 #endif
13727
13728 #else
13729         /* Draft 4 pthreads */
13730         status = pthread_create( &t, pthread_attr_default, task, NULL );
13731         if( status ) return status;
13732
13733         if( detach ) {
13734                 /* give thread a chance to complete */
13735                 /* it should remain joinable and hence detachable */
13736                 sleep( 1 );
13737
13738                 status = pthread_detach( &t );
13739                 if( status ) return status;
13740         }
13741 #endif
13742
13743 #ifdef HAVE_LINUX_THREADS
13744         pthread_kill_other_threads_np();
13745 #endif
13746
13747         return 0;
13748
13749 ; return 0; }
13750 EOF
13751 if { (eval echo configure:13752: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13752   rm -rf conftest*
13753   ol_cv_pthread_lib_lpthread_woff=yes
13754 else
13755   echo "configure: failed program was:" >&5
13756   cat conftest.$ac_ext >&5
13757   rm -rf conftest*
13758   ol_cv_pthread_lib_lpthread_woff=no
13759 fi
13760 rm -f conftest*
13761 else
13762   cat > conftest.$ac_ext <<EOF
13763 #line 13764 "configure"
13764 #include "confdefs.h"
13765 /* pthread test headers */
13766 #include <pthread.h>
13767 #ifndef NULL
13768 #define NULL (void*)0
13769 #endif
13770
13771 static void *task(p)
13772         void *p;
13773 {
13774         return (void *) (p == NULL);
13775 }
13776
13777
13778 int main(argc, argv)
13779         int argc;
13780         char **argv;
13781 {
13782
13783         /* pthread test function */
13784         pthread_t t;
13785         int status;
13786         int detach = 1;
13787
13788 #ifdef HAVE_PTHREADS_FINAL
13789         /* Final pthreads */
13790         pthread_attr_t attr;
13791
13792         status = pthread_attr_init(&attr);
13793         if( status ) return status;
13794
13795 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13796         if( !detach ) {
13797 #if defined( PTHREAD_CREATE_JOINABLE )
13798                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13799 #else
13800                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13801 #endif
13802
13803 #ifdef PTHREAD_CREATE_DETACHED
13804         } else {
13805                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13806 #endif
13807         }
13808         if( status ) return status;
13809 #endif
13810
13811         status = pthread_create( &t, &attr, task, NULL );
13812         if( status ) return status;
13813
13814 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13815         if( detach ) {
13816                 /* give thread a chance to complete */
13817                 /* it should remain joinable and hence detachable */
13818                 sleep( 1 );
13819
13820                 status = pthread_detach( t );
13821                 if( status ) return status;
13822         }
13823 #endif
13824
13825 #else
13826         /* Draft 4 pthreads */
13827         status = pthread_create( &t, pthread_attr_default, task, NULL );
13828         if( status ) return status;
13829
13830         if( detach ) {
13831                 /* give thread a chance to complete */
13832                 /* it should remain joinable and hence detachable */
13833                 sleep( 1 );
13834
13835                 status = pthread_detach( &t );
13836                 if( status ) return status;
13837         }
13838 #endif
13839
13840 #ifdef HAVE_LINUX_THREADS
13841         pthread_kill_other_threads_np();
13842 #endif
13843
13844         return 0;
13845
13846 }
13847
13848 EOF
13849 if { (eval echo configure:13850: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
13850 then
13851   ol_cv_pthread_lib_lpthread_woff=yes
13852 else
13853   echo "configure: failed program was:" >&5
13854   cat conftest.$ac_ext >&5
13855   rm -fr conftest*
13856   ol_cv_pthread_lib_lpthread_woff=no
13857 fi
13858 rm -fr conftest*
13859 fi
13860
13861
13862                 # restore the LIBS
13863                 LIBS="$ol_LIBS"
13864         
13865 fi
13866
13867 echo "$ac_t""$ol_cv_pthread_lib_lpthread_woff" 1>&6
13868
13869         if test $ol_cv_pthread_lib_lpthread_woff = yes ; then
13870                 ol_link_pthreads="-lpthread -Wl,-woff,85"
13871                 ol_link_threads=posix
13872         fi
13873 fi
13874
13875
13876                 # Pthread try link: -lpthread (ol_cv_pthread_lpthread)
13877 if test "$ol_link_threads" = no ; then
13878         # try -lpthread
13879         echo $ac_n "checking for pthread link with -lpthread""... $ac_c" 1>&6
13880 echo "configure:13881: checking for pthread link with -lpthread" >&5
13881 if eval "test \"\${ol_cv_pthread_lpthread+set}\" = set"; then
13882   echo $ac_n "(cached) $ac_c" 1>&6
13883 else
13884   
13885                 # save the flags
13886                 ol_LIBS="$LIBS"
13887                 LIBS="-lpthread $LIBS"
13888
13889                 if test "$cross_compiling" = yes; then
13890   cat > conftest.$ac_ext <<EOF
13891 #line 13892 "configure"
13892 #include "confdefs.h"
13893 /* pthread test headers */
13894 #include <pthread.h>
13895 #ifndef NULL
13896 #define NULL (void*)0
13897 #endif
13898
13899 static void *task(p)
13900         void *p;
13901 {
13902         return (void *) (p == NULL);
13903 }
13904
13905 int main() {
13906
13907         /* pthread test function */
13908         pthread_t t;
13909         int status;
13910         int detach = 1;
13911
13912 #ifdef HAVE_PTHREADS_FINAL
13913         /* Final pthreads */
13914         pthread_attr_t attr;
13915
13916         status = pthread_attr_init(&attr);
13917         if( status ) return status;
13918
13919 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
13920         if( !detach ) {
13921 #if defined( PTHREAD_CREATE_JOINABLE )
13922                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
13923 #else
13924                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
13925 #endif
13926
13927 #ifdef PTHREAD_CREATE_DETACHED
13928         } else {
13929                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
13930 #endif
13931         }
13932         if( status ) return status;
13933 #endif
13934
13935         status = pthread_create( &t, &attr, task, NULL );
13936         if( status ) return status;
13937
13938 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
13939         if( detach ) {
13940                 /* give thread a chance to complete */
13941                 /* it should remain joinable and hence detachable */
13942                 sleep( 1 );
13943
13944                 status = pthread_detach( t );
13945                 if( status ) return status;
13946         }
13947 #endif
13948
13949 #else
13950         /* Draft 4 pthreads */
13951         status = pthread_create( &t, pthread_attr_default, task, NULL );
13952         if( status ) return status;
13953
13954         if( detach ) {
13955                 /* give thread a chance to complete */
13956                 /* it should remain joinable and hence detachable */
13957                 sleep( 1 );
13958
13959                 status = pthread_detach( &t );
13960                 if( status ) return status;
13961         }
13962 #endif
13963
13964 #ifdef HAVE_LINUX_THREADS
13965         pthread_kill_other_threads_np();
13966 #endif
13967
13968         return 0;
13969
13970 ; return 0; }
13971 EOF
13972 if { (eval echo configure:13973: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
13973   rm -rf conftest*
13974   ol_cv_pthread_lpthread=yes
13975 else
13976   echo "configure: failed program was:" >&5
13977   cat conftest.$ac_ext >&5
13978   rm -rf conftest*
13979   ol_cv_pthread_lpthread=no
13980 fi
13981 rm -f conftest*
13982 else
13983   cat > conftest.$ac_ext <<EOF
13984 #line 13985 "configure"
13985 #include "confdefs.h"
13986 /* pthread test headers */
13987 #include <pthread.h>
13988 #ifndef NULL
13989 #define NULL (void*)0
13990 #endif
13991
13992 static void *task(p)
13993         void *p;
13994 {
13995         return (void *) (p == NULL);
13996 }
13997
13998
13999 int main(argc, argv)
14000         int argc;
14001         char **argv;
14002 {
14003
14004         /* pthread test function */
14005         pthread_t t;
14006         int status;
14007         int detach = 1;
14008
14009 #ifdef HAVE_PTHREADS_FINAL
14010         /* Final pthreads */
14011         pthread_attr_t attr;
14012
14013         status = pthread_attr_init(&attr);
14014         if( status ) return status;
14015
14016 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14017         if( !detach ) {
14018 #if defined( PTHREAD_CREATE_JOINABLE )
14019                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14020 #else
14021                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14022 #endif
14023
14024 #ifdef PTHREAD_CREATE_DETACHED
14025         } else {
14026                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14027 #endif
14028         }
14029         if( status ) return status;
14030 #endif
14031
14032         status = pthread_create( &t, &attr, task, NULL );
14033         if( status ) return status;
14034
14035 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14036         if( detach ) {
14037                 /* give thread a chance to complete */
14038                 /* it should remain joinable and hence detachable */
14039                 sleep( 1 );
14040
14041                 status = pthread_detach( t );
14042                 if( status ) return status;
14043         }
14044 #endif
14045
14046 #else
14047         /* Draft 4 pthreads */
14048         status = pthread_create( &t, pthread_attr_default, task, NULL );
14049         if( status ) return status;
14050
14051         if( detach ) {
14052                 /* give thread a chance to complete */
14053                 /* it should remain joinable and hence detachable */
14054                 sleep( 1 );
14055
14056                 status = pthread_detach( &t );
14057                 if( status ) return status;
14058         }
14059 #endif
14060
14061 #ifdef HAVE_LINUX_THREADS
14062         pthread_kill_other_threads_np();
14063 #endif
14064
14065         return 0;
14066
14067 }
14068
14069 EOF
14070 if { (eval echo configure:14071: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14071 then
14072   ol_cv_pthread_lpthread=yes
14073 else
14074   echo "configure: failed program was:" >&5
14075   cat conftest.$ac_ext >&5
14076   rm -fr conftest*
14077   ol_cv_pthread_lpthread=no
14078 fi
14079 rm -fr conftest*
14080 fi
14081
14082
14083                 # restore the LIBS
14084                 LIBS="$ol_LIBS"
14085         
14086 fi
14087
14088 echo "$ac_t""$ol_cv_pthread_lpthread" 1>&6
14089
14090         if test $ol_cv_pthread_lpthread = yes ; then
14091                 ol_link_pthreads="-lpthread"
14092                 ol_link_threads=posix
14093         fi
14094 fi
14095
14096                 # Pthread try link: -lc_r (ol_cv_pthread_lc_r)
14097 if test "$ol_link_threads" = no ; then
14098         # try -lc_r
14099         echo $ac_n "checking for pthread link with -lc_r""... $ac_c" 1>&6
14100 echo "configure:14101: checking for pthread link with -lc_r" >&5
14101 if eval "test \"\${ol_cv_pthread_lc_r+set}\" = set"; then
14102   echo $ac_n "(cached) $ac_c" 1>&6
14103 else
14104   
14105                 # save the flags
14106                 ol_LIBS="$LIBS"
14107                 LIBS="-lc_r $LIBS"
14108
14109                 if test "$cross_compiling" = yes; then
14110   cat > conftest.$ac_ext <<EOF
14111 #line 14112 "configure"
14112 #include "confdefs.h"
14113 /* pthread test headers */
14114 #include <pthread.h>
14115 #ifndef NULL
14116 #define NULL (void*)0
14117 #endif
14118
14119 static void *task(p)
14120         void *p;
14121 {
14122         return (void *) (p == NULL);
14123 }
14124
14125 int main() {
14126
14127         /* pthread test function */
14128         pthread_t t;
14129         int status;
14130         int detach = 1;
14131
14132 #ifdef HAVE_PTHREADS_FINAL
14133         /* Final pthreads */
14134         pthread_attr_t attr;
14135
14136         status = pthread_attr_init(&attr);
14137         if( status ) return status;
14138
14139 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14140         if( !detach ) {
14141 #if defined( PTHREAD_CREATE_JOINABLE )
14142                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14143 #else
14144                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14145 #endif
14146
14147 #ifdef PTHREAD_CREATE_DETACHED
14148         } else {
14149                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14150 #endif
14151         }
14152         if( status ) return status;
14153 #endif
14154
14155         status = pthread_create( &t, &attr, task, NULL );
14156         if( status ) return status;
14157
14158 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14159         if( detach ) {
14160                 /* give thread a chance to complete */
14161                 /* it should remain joinable and hence detachable */
14162                 sleep( 1 );
14163
14164                 status = pthread_detach( t );
14165                 if( status ) return status;
14166         }
14167 #endif
14168
14169 #else
14170         /* Draft 4 pthreads */
14171         status = pthread_create( &t, pthread_attr_default, task, NULL );
14172         if( status ) return status;
14173
14174         if( detach ) {
14175                 /* give thread a chance to complete */
14176                 /* it should remain joinable and hence detachable */
14177                 sleep( 1 );
14178
14179                 status = pthread_detach( &t );
14180                 if( status ) return status;
14181         }
14182 #endif
14183
14184 #ifdef HAVE_LINUX_THREADS
14185         pthread_kill_other_threads_np();
14186 #endif
14187
14188         return 0;
14189
14190 ; return 0; }
14191 EOF
14192 if { (eval echo configure:14193: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14193   rm -rf conftest*
14194   ol_cv_pthread_lc_r=yes
14195 else
14196   echo "configure: failed program was:" >&5
14197   cat conftest.$ac_ext >&5
14198   rm -rf conftest*
14199   ol_cv_pthread_lc_r=no
14200 fi
14201 rm -f conftest*
14202 else
14203   cat > conftest.$ac_ext <<EOF
14204 #line 14205 "configure"
14205 #include "confdefs.h"
14206 /* pthread test headers */
14207 #include <pthread.h>
14208 #ifndef NULL
14209 #define NULL (void*)0
14210 #endif
14211
14212 static void *task(p)
14213         void *p;
14214 {
14215         return (void *) (p == NULL);
14216 }
14217
14218
14219 int main(argc, argv)
14220         int argc;
14221         char **argv;
14222 {
14223
14224         /* pthread test function */
14225         pthread_t t;
14226         int status;
14227         int detach = 1;
14228
14229 #ifdef HAVE_PTHREADS_FINAL
14230         /* Final pthreads */
14231         pthread_attr_t attr;
14232
14233         status = pthread_attr_init(&attr);
14234         if( status ) return status;
14235
14236 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14237         if( !detach ) {
14238 #if defined( PTHREAD_CREATE_JOINABLE )
14239                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14240 #else
14241                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14242 #endif
14243
14244 #ifdef PTHREAD_CREATE_DETACHED
14245         } else {
14246                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14247 #endif
14248         }
14249         if( status ) return status;
14250 #endif
14251
14252         status = pthread_create( &t, &attr, task, NULL );
14253         if( status ) return status;
14254
14255 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14256         if( detach ) {
14257                 /* give thread a chance to complete */
14258                 /* it should remain joinable and hence detachable */
14259                 sleep( 1 );
14260
14261                 status = pthread_detach( t );
14262                 if( status ) return status;
14263         }
14264 #endif
14265
14266 #else
14267         /* Draft 4 pthreads */
14268         status = pthread_create( &t, pthread_attr_default, task, NULL );
14269         if( status ) return status;
14270
14271         if( detach ) {
14272                 /* give thread a chance to complete */
14273                 /* it should remain joinable and hence detachable */
14274                 sleep( 1 );
14275
14276                 status = pthread_detach( &t );
14277                 if( status ) return status;
14278         }
14279 #endif
14280
14281 #ifdef HAVE_LINUX_THREADS
14282         pthread_kill_other_threads_np();
14283 #endif
14284
14285         return 0;
14286
14287 }
14288
14289 EOF
14290 if { (eval echo configure:14291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14291 then
14292   ol_cv_pthread_lc_r=yes
14293 else
14294   echo "configure: failed program was:" >&5
14295   cat conftest.$ac_ext >&5
14296   rm -fr conftest*
14297   ol_cv_pthread_lc_r=no
14298 fi
14299 rm -fr conftest*
14300 fi
14301
14302
14303                 # restore the LIBS
14304                 LIBS="$ol_LIBS"
14305         
14306 fi
14307
14308 echo "$ac_t""$ol_cv_pthread_lc_r" 1>&6
14309
14310         if test $ol_cv_pthread_lc_r = yes ; then
14311                 ol_link_pthreads="-lc_r"
14312                 ol_link_threads=posix
14313         fi
14314 fi
14315
14316
14317                 # Pthread try link: -threads (ol_cv_pthread_threads)
14318 if test "$ol_link_threads" = no ; then
14319         # try -threads
14320         echo $ac_n "checking for pthread link with -threads""... $ac_c" 1>&6
14321 echo "configure:14322: checking for pthread link with -threads" >&5
14322 if eval "test \"\${ol_cv_pthread_threads+set}\" = set"; then
14323   echo $ac_n "(cached) $ac_c" 1>&6
14324 else
14325   
14326                 # save the flags
14327                 ol_LIBS="$LIBS"
14328                 LIBS="-threads $LIBS"
14329
14330                 if test "$cross_compiling" = yes; then
14331   cat > conftest.$ac_ext <<EOF
14332 #line 14333 "configure"
14333 #include "confdefs.h"
14334 /* pthread test headers */
14335 #include <pthread.h>
14336 #ifndef NULL
14337 #define NULL (void*)0
14338 #endif
14339
14340 static void *task(p)
14341         void *p;
14342 {
14343         return (void *) (p == NULL);
14344 }
14345
14346 int main() {
14347
14348         /* pthread test function */
14349         pthread_t t;
14350         int status;
14351         int detach = 1;
14352
14353 #ifdef HAVE_PTHREADS_FINAL
14354         /* Final pthreads */
14355         pthread_attr_t attr;
14356
14357         status = pthread_attr_init(&attr);
14358         if( status ) return status;
14359
14360 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14361         if( !detach ) {
14362 #if defined( PTHREAD_CREATE_JOINABLE )
14363                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14364 #else
14365                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14366 #endif
14367
14368 #ifdef PTHREAD_CREATE_DETACHED
14369         } else {
14370                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14371 #endif
14372         }
14373         if( status ) return status;
14374 #endif
14375
14376         status = pthread_create( &t, &attr, task, NULL );
14377         if( status ) return status;
14378
14379 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14380         if( detach ) {
14381                 /* give thread a chance to complete */
14382                 /* it should remain joinable and hence detachable */
14383                 sleep( 1 );
14384
14385                 status = pthread_detach( t );
14386                 if( status ) return status;
14387         }
14388 #endif
14389
14390 #else
14391         /* Draft 4 pthreads */
14392         status = pthread_create( &t, pthread_attr_default, task, NULL );
14393         if( status ) return status;
14394
14395         if( detach ) {
14396                 /* give thread a chance to complete */
14397                 /* it should remain joinable and hence detachable */
14398                 sleep( 1 );
14399
14400                 status = pthread_detach( &t );
14401                 if( status ) return status;
14402         }
14403 #endif
14404
14405 #ifdef HAVE_LINUX_THREADS
14406         pthread_kill_other_threads_np();
14407 #endif
14408
14409         return 0;
14410
14411 ; return 0; }
14412 EOF
14413 if { (eval echo configure:14414: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14414   rm -rf conftest*
14415   ol_cv_pthread_threads=yes
14416 else
14417   echo "configure: failed program was:" >&5
14418   cat conftest.$ac_ext >&5
14419   rm -rf conftest*
14420   ol_cv_pthread_threads=no
14421 fi
14422 rm -f conftest*
14423 else
14424   cat > conftest.$ac_ext <<EOF
14425 #line 14426 "configure"
14426 #include "confdefs.h"
14427 /* pthread test headers */
14428 #include <pthread.h>
14429 #ifndef NULL
14430 #define NULL (void*)0
14431 #endif
14432
14433 static void *task(p)
14434         void *p;
14435 {
14436         return (void *) (p == NULL);
14437 }
14438
14439
14440 int main(argc, argv)
14441         int argc;
14442         char **argv;
14443 {
14444
14445         /* pthread test function */
14446         pthread_t t;
14447         int status;
14448         int detach = 1;
14449
14450 #ifdef HAVE_PTHREADS_FINAL
14451         /* Final pthreads */
14452         pthread_attr_t attr;
14453
14454         status = pthread_attr_init(&attr);
14455         if( status ) return status;
14456
14457 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14458         if( !detach ) {
14459 #if defined( PTHREAD_CREATE_JOINABLE )
14460                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14461 #else
14462                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14463 #endif
14464
14465 #ifdef PTHREAD_CREATE_DETACHED
14466         } else {
14467                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14468 #endif
14469         }
14470         if( status ) return status;
14471 #endif
14472
14473         status = pthread_create( &t, &attr, task, NULL );
14474         if( status ) return status;
14475
14476 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14477         if( detach ) {
14478                 /* give thread a chance to complete */
14479                 /* it should remain joinable and hence detachable */
14480                 sleep( 1 );
14481
14482                 status = pthread_detach( t );
14483                 if( status ) return status;
14484         }
14485 #endif
14486
14487 #else
14488         /* Draft 4 pthreads */
14489         status = pthread_create( &t, pthread_attr_default, task, NULL );
14490         if( status ) return status;
14491
14492         if( detach ) {
14493                 /* give thread a chance to complete */
14494                 /* it should remain joinable and hence detachable */
14495                 sleep( 1 );
14496
14497                 status = pthread_detach( &t );
14498                 if( status ) return status;
14499         }
14500 #endif
14501
14502 #ifdef HAVE_LINUX_THREADS
14503         pthread_kill_other_threads_np();
14504 #endif
14505
14506         return 0;
14507
14508 }
14509
14510 EOF
14511 if { (eval echo configure:14512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14512 then
14513   ol_cv_pthread_threads=yes
14514 else
14515   echo "configure: failed program was:" >&5
14516   cat conftest.$ac_ext >&5
14517   rm -fr conftest*
14518   ol_cv_pthread_threads=no
14519 fi
14520 rm -fr conftest*
14521 fi
14522
14523
14524                 # restore the LIBS
14525                 LIBS="$ol_LIBS"
14526         
14527 fi
14528
14529 echo "$ac_t""$ol_cv_pthread_threads" 1>&6
14530
14531         if test $ol_cv_pthread_threads = yes ; then
14532                 ol_link_pthreads="-threads"
14533                 ol_link_threads=posix
14534         fi
14535 fi
14536
14537
14538                 # Pthread try link: -lpthreads -lmach -lexc -lc_r (ol_cv_pthread_lpthreads_lmach_lexc_lc_r)
14539 if test "$ol_link_threads" = no ; then
14540         # try -lpthreads -lmach -lexc -lc_r
14541         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc -lc_r""... $ac_c" 1>&6
14542 echo "configure:14543: checking for pthread link with -lpthreads -lmach -lexc -lc_r" >&5
14543 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc_lc_r+set}\" = set"; then
14544   echo $ac_n "(cached) $ac_c" 1>&6
14545 else
14546   
14547                 # save the flags
14548                 ol_LIBS="$LIBS"
14549                 LIBS="-lpthreads -lmach -lexc -lc_r $LIBS"
14550
14551                 if test "$cross_compiling" = yes; then
14552   cat > conftest.$ac_ext <<EOF
14553 #line 14554 "configure"
14554 #include "confdefs.h"
14555 /* pthread test headers */
14556 #include <pthread.h>
14557 #ifndef NULL
14558 #define NULL (void*)0
14559 #endif
14560
14561 static void *task(p)
14562         void *p;
14563 {
14564         return (void *) (p == NULL);
14565 }
14566
14567 int main() {
14568
14569         /* pthread test function */
14570         pthread_t t;
14571         int status;
14572         int detach = 1;
14573
14574 #ifdef HAVE_PTHREADS_FINAL
14575         /* Final pthreads */
14576         pthread_attr_t attr;
14577
14578         status = pthread_attr_init(&attr);
14579         if( status ) return status;
14580
14581 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14582         if( !detach ) {
14583 #if defined( PTHREAD_CREATE_JOINABLE )
14584                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14585 #else
14586                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14587 #endif
14588
14589 #ifdef PTHREAD_CREATE_DETACHED
14590         } else {
14591                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14592 #endif
14593         }
14594         if( status ) return status;
14595 #endif
14596
14597         status = pthread_create( &t, &attr, task, NULL );
14598         if( status ) return status;
14599
14600 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14601         if( detach ) {
14602                 /* give thread a chance to complete */
14603                 /* it should remain joinable and hence detachable */
14604                 sleep( 1 );
14605
14606                 status = pthread_detach( t );
14607                 if( status ) return status;
14608         }
14609 #endif
14610
14611 #else
14612         /* Draft 4 pthreads */
14613         status = pthread_create( &t, pthread_attr_default, task, NULL );
14614         if( status ) return status;
14615
14616         if( detach ) {
14617                 /* give thread a chance to complete */
14618                 /* it should remain joinable and hence detachable */
14619                 sleep( 1 );
14620
14621                 status = pthread_detach( &t );
14622                 if( status ) return status;
14623         }
14624 #endif
14625
14626 #ifdef HAVE_LINUX_THREADS
14627         pthread_kill_other_threads_np();
14628 #endif
14629
14630         return 0;
14631
14632 ; return 0; }
14633 EOF
14634 if { (eval echo configure:14635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14635   rm -rf conftest*
14636   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14637 else
14638   echo "configure: failed program was:" >&5
14639   cat conftest.$ac_ext >&5
14640   rm -rf conftest*
14641   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14642 fi
14643 rm -f conftest*
14644 else
14645   cat > conftest.$ac_ext <<EOF
14646 #line 14647 "configure"
14647 #include "confdefs.h"
14648 /* pthread test headers */
14649 #include <pthread.h>
14650 #ifndef NULL
14651 #define NULL (void*)0
14652 #endif
14653
14654 static void *task(p)
14655         void *p;
14656 {
14657         return (void *) (p == NULL);
14658 }
14659
14660
14661 int main(argc, argv)
14662         int argc;
14663         char **argv;
14664 {
14665
14666         /* pthread test function */
14667         pthread_t t;
14668         int status;
14669         int detach = 1;
14670
14671 #ifdef HAVE_PTHREADS_FINAL
14672         /* Final pthreads */
14673         pthread_attr_t attr;
14674
14675         status = pthread_attr_init(&attr);
14676         if( status ) return status;
14677
14678 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14679         if( !detach ) {
14680 #if defined( PTHREAD_CREATE_JOINABLE )
14681                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14682 #else
14683                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14684 #endif
14685
14686 #ifdef PTHREAD_CREATE_DETACHED
14687         } else {
14688                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14689 #endif
14690         }
14691         if( status ) return status;
14692 #endif
14693
14694         status = pthread_create( &t, &attr, task, NULL );
14695         if( status ) return status;
14696
14697 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14698         if( detach ) {
14699                 /* give thread a chance to complete */
14700                 /* it should remain joinable and hence detachable */
14701                 sleep( 1 );
14702
14703                 status = pthread_detach( t );
14704                 if( status ) return status;
14705         }
14706 #endif
14707
14708 #else
14709         /* Draft 4 pthreads */
14710         status = pthread_create( &t, pthread_attr_default, task, NULL );
14711         if( status ) return status;
14712
14713         if( detach ) {
14714                 /* give thread a chance to complete */
14715                 /* it should remain joinable and hence detachable */
14716                 sleep( 1 );
14717
14718                 status = pthread_detach( &t );
14719                 if( status ) return status;
14720         }
14721 #endif
14722
14723 #ifdef HAVE_LINUX_THREADS
14724         pthread_kill_other_threads_np();
14725 #endif
14726
14727         return 0;
14728
14729 }
14730
14731 EOF
14732 if { (eval echo configure:14733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14733 then
14734   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=yes
14735 else
14736   echo "configure: failed program was:" >&5
14737   cat conftest.$ac_ext >&5
14738   rm -fr conftest*
14739   ol_cv_pthread_lpthreads_lmach_lexc_lc_r=no
14740 fi
14741 rm -fr conftest*
14742 fi
14743
14744
14745                 # restore the LIBS
14746                 LIBS="$ol_LIBS"
14747         
14748 fi
14749
14750 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc_lc_r" 1>&6
14751
14752         if test $ol_cv_pthread_lpthreads_lmach_lexc_lc_r = yes ; then
14753                 ol_link_pthreads="-lpthreads -lmach -lexc -lc_r"
14754                 ol_link_threads=posix
14755         fi
14756 fi
14757
14758                 # Pthread try link: -lpthreads -lmach -lexc (ol_cv_pthread_lpthreads_lmach_lexc)
14759 if test "$ol_link_threads" = no ; then
14760         # try -lpthreads -lmach -lexc
14761         echo $ac_n "checking for pthread link with -lpthreads -lmach -lexc""... $ac_c" 1>&6
14762 echo "configure:14763: checking for pthread link with -lpthreads -lmach -lexc" >&5
14763 if eval "test \"\${ol_cv_pthread_lpthreads_lmach_lexc+set}\" = set"; then
14764   echo $ac_n "(cached) $ac_c" 1>&6
14765 else
14766   
14767                 # save the flags
14768                 ol_LIBS="$LIBS"
14769                 LIBS="-lpthreads -lmach -lexc $LIBS"
14770
14771                 if test "$cross_compiling" = yes; then
14772   cat > conftest.$ac_ext <<EOF
14773 #line 14774 "configure"
14774 #include "confdefs.h"
14775 /* pthread test headers */
14776 #include <pthread.h>
14777 #ifndef NULL
14778 #define NULL (void*)0
14779 #endif
14780
14781 static void *task(p)
14782         void *p;
14783 {
14784         return (void *) (p == NULL);
14785 }
14786
14787 int main() {
14788
14789         /* pthread test function */
14790         pthread_t t;
14791         int status;
14792         int detach = 1;
14793
14794 #ifdef HAVE_PTHREADS_FINAL
14795         /* Final pthreads */
14796         pthread_attr_t attr;
14797
14798         status = pthread_attr_init(&attr);
14799         if( status ) return status;
14800
14801 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14802         if( !detach ) {
14803 #if defined( PTHREAD_CREATE_JOINABLE )
14804                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14805 #else
14806                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14807 #endif
14808
14809 #ifdef PTHREAD_CREATE_DETACHED
14810         } else {
14811                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14812 #endif
14813         }
14814         if( status ) return status;
14815 #endif
14816
14817         status = pthread_create( &t, &attr, task, NULL );
14818         if( status ) return status;
14819
14820 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14821         if( detach ) {
14822                 /* give thread a chance to complete */
14823                 /* it should remain joinable and hence detachable */
14824                 sleep( 1 );
14825
14826                 status = pthread_detach( t );
14827                 if( status ) return status;
14828         }
14829 #endif
14830
14831 #else
14832         /* Draft 4 pthreads */
14833         status = pthread_create( &t, pthread_attr_default, task, NULL );
14834         if( status ) return status;
14835
14836         if( detach ) {
14837                 /* give thread a chance to complete */
14838                 /* it should remain joinable and hence detachable */
14839                 sleep( 1 );
14840
14841                 status = pthread_detach( &t );
14842                 if( status ) return status;
14843         }
14844 #endif
14845
14846 #ifdef HAVE_LINUX_THREADS
14847         pthread_kill_other_threads_np();
14848 #endif
14849
14850         return 0;
14851
14852 ; return 0; }
14853 EOF
14854 if { (eval echo configure:14855: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
14855   rm -rf conftest*
14856   ol_cv_pthread_lpthreads_lmach_lexc=yes
14857 else
14858   echo "configure: failed program was:" >&5
14859   cat conftest.$ac_ext >&5
14860   rm -rf conftest*
14861   ol_cv_pthread_lpthreads_lmach_lexc=no
14862 fi
14863 rm -f conftest*
14864 else
14865   cat > conftest.$ac_ext <<EOF
14866 #line 14867 "configure"
14867 #include "confdefs.h"
14868 /* pthread test headers */
14869 #include <pthread.h>
14870 #ifndef NULL
14871 #define NULL (void*)0
14872 #endif
14873
14874 static void *task(p)
14875         void *p;
14876 {
14877         return (void *) (p == NULL);
14878 }
14879
14880
14881 int main(argc, argv)
14882         int argc;
14883         char **argv;
14884 {
14885
14886         /* pthread test function */
14887         pthread_t t;
14888         int status;
14889         int detach = 1;
14890
14891 #ifdef HAVE_PTHREADS_FINAL
14892         /* Final pthreads */
14893         pthread_attr_t attr;
14894
14895         status = pthread_attr_init(&attr);
14896         if( status ) return status;
14897
14898 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
14899         if( !detach ) {
14900 #if defined( PTHREAD_CREATE_JOINABLE )
14901                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
14902 #else
14903                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
14904 #endif
14905
14906 #ifdef PTHREAD_CREATE_DETACHED
14907         } else {
14908                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
14909 #endif
14910         }
14911         if( status ) return status;
14912 #endif
14913
14914         status = pthread_create( &t, &attr, task, NULL );
14915         if( status ) return status;
14916
14917 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
14918         if( detach ) {
14919                 /* give thread a chance to complete */
14920                 /* it should remain joinable and hence detachable */
14921                 sleep( 1 );
14922
14923                 status = pthread_detach( t );
14924                 if( status ) return status;
14925         }
14926 #endif
14927
14928 #else
14929         /* Draft 4 pthreads */
14930         status = pthread_create( &t, pthread_attr_default, task, NULL );
14931         if( status ) return status;
14932
14933         if( detach ) {
14934                 /* give thread a chance to complete */
14935                 /* it should remain joinable and hence detachable */
14936                 sleep( 1 );
14937
14938                 status = pthread_detach( &t );
14939                 if( status ) return status;
14940         }
14941 #endif
14942
14943 #ifdef HAVE_LINUX_THREADS
14944         pthread_kill_other_threads_np();
14945 #endif
14946
14947         return 0;
14948
14949 }
14950
14951 EOF
14952 if { (eval echo configure:14953: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
14953 then
14954   ol_cv_pthread_lpthreads_lmach_lexc=yes
14955 else
14956   echo "configure: failed program was:" >&5
14957   cat conftest.$ac_ext >&5
14958   rm -fr conftest*
14959   ol_cv_pthread_lpthreads_lmach_lexc=no
14960 fi
14961 rm -fr conftest*
14962 fi
14963
14964
14965                 # restore the LIBS
14966                 LIBS="$ol_LIBS"
14967         
14968 fi
14969
14970 echo "$ac_t""$ol_cv_pthread_lpthreads_lmach_lexc" 1>&6
14971
14972         if test $ol_cv_pthread_lpthreads_lmach_lexc = yes ; then
14973                 ol_link_pthreads="-lpthreads -lmach -lexc"
14974                 ol_link_threads=posix
14975         fi
14976 fi
14977
14978                 # Pthread try link: -lpthreads -lexc (ol_cv_pthread_lpthreads_lexc)
14979 if test "$ol_link_threads" = no ; then
14980         # try -lpthreads -lexc
14981         echo $ac_n "checking for pthread link with -lpthreads -lexc""... $ac_c" 1>&6
14982 echo "configure:14983: checking for pthread link with -lpthreads -lexc" >&5
14983 if eval "test \"\${ol_cv_pthread_lpthreads_lexc+set}\" = set"; then
14984   echo $ac_n "(cached) $ac_c" 1>&6
14985 else
14986   
14987                 # save the flags
14988                 ol_LIBS="$LIBS"
14989                 LIBS="-lpthreads -lexc $LIBS"
14990
14991                 if test "$cross_compiling" = yes; then
14992   cat > conftest.$ac_ext <<EOF
14993 #line 14994 "configure"
14994 #include "confdefs.h"
14995 /* pthread test headers */
14996 #include <pthread.h>
14997 #ifndef NULL
14998 #define NULL (void*)0
14999 #endif
15000
15001 static void *task(p)
15002         void *p;
15003 {
15004         return (void *) (p == NULL);
15005 }
15006
15007 int main() {
15008
15009         /* pthread test function */
15010         pthread_t t;
15011         int status;
15012         int detach = 1;
15013
15014 #ifdef HAVE_PTHREADS_FINAL
15015         /* Final pthreads */
15016         pthread_attr_t attr;
15017
15018         status = pthread_attr_init(&attr);
15019         if( status ) return status;
15020
15021 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15022         if( !detach ) {
15023 #if defined( PTHREAD_CREATE_JOINABLE )
15024                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15025 #else
15026                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15027 #endif
15028
15029 #ifdef PTHREAD_CREATE_DETACHED
15030         } else {
15031                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15032 #endif
15033         }
15034         if( status ) return status;
15035 #endif
15036
15037         status = pthread_create( &t, &attr, task, NULL );
15038         if( status ) return status;
15039
15040 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15041         if( detach ) {
15042                 /* give thread a chance to complete */
15043                 /* it should remain joinable and hence detachable */
15044                 sleep( 1 );
15045
15046                 status = pthread_detach( t );
15047                 if( status ) return status;
15048         }
15049 #endif
15050
15051 #else
15052         /* Draft 4 pthreads */
15053         status = pthread_create( &t, pthread_attr_default, task, NULL );
15054         if( status ) return status;
15055
15056         if( detach ) {
15057                 /* give thread a chance to complete */
15058                 /* it should remain joinable and hence detachable */
15059                 sleep( 1 );
15060
15061                 status = pthread_detach( &t );
15062                 if( status ) return status;
15063         }
15064 #endif
15065
15066 #ifdef HAVE_LINUX_THREADS
15067         pthread_kill_other_threads_np();
15068 #endif
15069
15070         return 0;
15071
15072 ; return 0; }
15073 EOF
15074 if { (eval echo configure:15075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15075   rm -rf conftest*
15076   ol_cv_pthread_lpthreads_lexc=yes
15077 else
15078   echo "configure: failed program was:" >&5
15079   cat conftest.$ac_ext >&5
15080   rm -rf conftest*
15081   ol_cv_pthread_lpthreads_lexc=no
15082 fi
15083 rm -f conftest*
15084 else
15085   cat > conftest.$ac_ext <<EOF
15086 #line 15087 "configure"
15087 #include "confdefs.h"
15088 /* pthread test headers */
15089 #include <pthread.h>
15090 #ifndef NULL
15091 #define NULL (void*)0
15092 #endif
15093
15094 static void *task(p)
15095         void *p;
15096 {
15097         return (void *) (p == NULL);
15098 }
15099
15100
15101 int main(argc, argv)
15102         int argc;
15103         char **argv;
15104 {
15105
15106         /* pthread test function */
15107         pthread_t t;
15108         int status;
15109         int detach = 1;
15110
15111 #ifdef HAVE_PTHREADS_FINAL
15112         /* Final pthreads */
15113         pthread_attr_t attr;
15114
15115         status = pthread_attr_init(&attr);
15116         if( status ) return status;
15117
15118 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15119         if( !detach ) {
15120 #if defined( PTHREAD_CREATE_JOINABLE )
15121                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15122 #else
15123                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15124 #endif
15125
15126 #ifdef PTHREAD_CREATE_DETACHED
15127         } else {
15128                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15129 #endif
15130         }
15131         if( status ) return status;
15132 #endif
15133
15134         status = pthread_create( &t, &attr, task, NULL );
15135         if( status ) return status;
15136
15137 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15138         if( detach ) {
15139                 /* give thread a chance to complete */
15140                 /* it should remain joinable and hence detachable */
15141                 sleep( 1 );
15142
15143                 status = pthread_detach( t );
15144                 if( status ) return status;
15145         }
15146 #endif
15147
15148 #else
15149         /* Draft 4 pthreads */
15150         status = pthread_create( &t, pthread_attr_default, task, NULL );
15151         if( status ) return status;
15152
15153         if( detach ) {
15154                 /* give thread a chance to complete */
15155                 /* it should remain joinable and hence detachable */
15156                 sleep( 1 );
15157
15158                 status = pthread_detach( &t );
15159                 if( status ) return status;
15160         }
15161 #endif
15162
15163 #ifdef HAVE_LINUX_THREADS
15164         pthread_kill_other_threads_np();
15165 #endif
15166
15167         return 0;
15168
15169 }
15170
15171 EOF
15172 if { (eval echo configure:15173: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15173 then
15174   ol_cv_pthread_lpthreads_lexc=yes
15175 else
15176   echo "configure: failed program was:" >&5
15177   cat conftest.$ac_ext >&5
15178   rm -fr conftest*
15179   ol_cv_pthread_lpthreads_lexc=no
15180 fi
15181 rm -fr conftest*
15182 fi
15183
15184
15185                 # restore the LIBS
15186                 LIBS="$ol_LIBS"
15187         
15188 fi
15189
15190 echo "$ac_t""$ol_cv_pthread_lpthreads_lexc" 1>&6
15191
15192         if test $ol_cv_pthread_lpthreads_lexc = yes ; then
15193                 ol_link_pthreads="-lpthreads -lexc"
15194                 ol_link_threads=posix
15195         fi
15196 fi
15197
15198
15199                 # Pthread try link: -lpthreads (ol_cv_pthread_lib_lpthreads)
15200 if test "$ol_link_threads" = no ; then
15201         # try -lpthreads
15202         echo $ac_n "checking for pthread link with -lpthreads""... $ac_c" 1>&6
15203 echo "configure:15204: checking for pthread link with -lpthreads" >&5
15204 if eval "test \"\${ol_cv_pthread_lib_lpthreads+set}\" = set"; then
15205   echo $ac_n "(cached) $ac_c" 1>&6
15206 else
15207   
15208                 # save the flags
15209                 ol_LIBS="$LIBS"
15210                 LIBS="-lpthreads $LIBS"
15211
15212                 if test "$cross_compiling" = yes; then
15213   cat > conftest.$ac_ext <<EOF
15214 #line 15215 "configure"
15215 #include "confdefs.h"
15216 /* pthread test headers */
15217 #include <pthread.h>
15218 #ifndef NULL
15219 #define NULL (void*)0
15220 #endif
15221
15222 static void *task(p)
15223         void *p;
15224 {
15225         return (void *) (p == NULL);
15226 }
15227
15228 int main() {
15229
15230         /* pthread test function */
15231         pthread_t t;
15232         int status;
15233         int detach = 1;
15234
15235 #ifdef HAVE_PTHREADS_FINAL
15236         /* Final pthreads */
15237         pthread_attr_t attr;
15238
15239         status = pthread_attr_init(&attr);
15240         if( status ) return status;
15241
15242 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15243         if( !detach ) {
15244 #if defined( PTHREAD_CREATE_JOINABLE )
15245                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15246 #else
15247                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15248 #endif
15249
15250 #ifdef PTHREAD_CREATE_DETACHED
15251         } else {
15252                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15253 #endif
15254         }
15255         if( status ) return status;
15256 #endif
15257
15258         status = pthread_create( &t, &attr, task, NULL );
15259         if( status ) return status;
15260
15261 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15262         if( detach ) {
15263                 /* give thread a chance to complete */
15264                 /* it should remain joinable and hence detachable */
15265                 sleep( 1 );
15266
15267                 status = pthread_detach( t );
15268                 if( status ) return status;
15269         }
15270 #endif
15271
15272 #else
15273         /* Draft 4 pthreads */
15274         status = pthread_create( &t, pthread_attr_default, task, NULL );
15275         if( status ) return status;
15276
15277         if( detach ) {
15278                 /* give thread a chance to complete */
15279                 /* it should remain joinable and hence detachable */
15280                 sleep( 1 );
15281
15282                 status = pthread_detach( &t );
15283                 if( status ) return status;
15284         }
15285 #endif
15286
15287 #ifdef HAVE_LINUX_THREADS
15288         pthread_kill_other_threads_np();
15289 #endif
15290
15291         return 0;
15292
15293 ; return 0; }
15294 EOF
15295 if { (eval echo configure:15296: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15296   rm -rf conftest*
15297   ol_cv_pthread_lib_lpthreads=yes
15298 else
15299   echo "configure: failed program was:" >&5
15300   cat conftest.$ac_ext >&5
15301   rm -rf conftest*
15302   ol_cv_pthread_lib_lpthreads=no
15303 fi
15304 rm -f conftest*
15305 else
15306   cat > conftest.$ac_ext <<EOF
15307 #line 15308 "configure"
15308 #include "confdefs.h"
15309 /* pthread test headers */
15310 #include <pthread.h>
15311 #ifndef NULL
15312 #define NULL (void*)0
15313 #endif
15314
15315 static void *task(p)
15316         void *p;
15317 {
15318         return (void *) (p == NULL);
15319 }
15320
15321
15322 int main(argc, argv)
15323         int argc;
15324         char **argv;
15325 {
15326
15327         /* pthread test function */
15328         pthread_t t;
15329         int status;
15330         int detach = 1;
15331
15332 #ifdef HAVE_PTHREADS_FINAL
15333         /* Final pthreads */
15334         pthread_attr_t attr;
15335
15336         status = pthread_attr_init(&attr);
15337         if( status ) return status;
15338
15339 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15340         if( !detach ) {
15341 #if defined( PTHREAD_CREATE_JOINABLE )
15342                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15343 #else
15344                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15345 #endif
15346
15347 #ifdef PTHREAD_CREATE_DETACHED
15348         } else {
15349                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15350 #endif
15351         }
15352         if( status ) return status;
15353 #endif
15354
15355         status = pthread_create( &t, &attr, task, NULL );
15356         if( status ) return status;
15357
15358 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15359         if( detach ) {
15360                 /* give thread a chance to complete */
15361                 /* it should remain joinable and hence detachable */
15362                 sleep( 1 );
15363
15364                 status = pthread_detach( t );
15365                 if( status ) return status;
15366         }
15367 #endif
15368
15369 #else
15370         /* Draft 4 pthreads */
15371         status = pthread_create( &t, pthread_attr_default, task, NULL );
15372         if( status ) return status;
15373
15374         if( detach ) {
15375                 /* give thread a chance to complete */
15376                 /* it should remain joinable and hence detachable */
15377                 sleep( 1 );
15378
15379                 status = pthread_detach( &t );
15380                 if( status ) return status;
15381         }
15382 #endif
15383
15384 #ifdef HAVE_LINUX_THREADS
15385         pthread_kill_other_threads_np();
15386 #endif
15387
15388         return 0;
15389
15390 }
15391
15392 EOF
15393 if { (eval echo configure:15394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15394 then
15395   ol_cv_pthread_lib_lpthreads=yes
15396 else
15397   echo "configure: failed program was:" >&5
15398   cat conftest.$ac_ext >&5
15399   rm -fr conftest*
15400   ol_cv_pthread_lib_lpthreads=no
15401 fi
15402 rm -fr conftest*
15403 fi
15404
15405
15406                 # restore the LIBS
15407                 LIBS="$ol_LIBS"
15408         
15409 fi
15410
15411 echo "$ac_t""$ol_cv_pthread_lib_lpthreads" 1>&6
15412
15413         if test $ol_cv_pthread_lib_lpthreads = yes ; then
15414                 ol_link_pthreads="-lpthreads"
15415                 ol_link_threads=posix
15416         fi
15417 fi
15418
15419
15420                 if test $ol_link_threads != no ; then
15421                         cat >> confdefs.h <<\EOF
15422 #define HAVE_PTHREADS 1
15423 EOF
15424
15425
15426                         LTHREAD_LIBS="$LTHREAD_LIBS $ol_link_pthreads"
15427
15428                                                 save_CPPFLAGS="$CPPFLAGS"
15429                         save_LIBS="$LIBS"
15430                         LIBS="$LTHREAD_LIBS $LIBS"
15431
15432                                                                                                 for ac_func in sched_yield pthread_yield
15433 do
15434 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15435 echo "configure:15436: checking for $ac_func" >&5
15436 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15437   echo $ac_n "(cached) $ac_c" 1>&6
15438 else
15439   cat > conftest.$ac_ext <<EOF
15440 #line 15441 "configure"
15441 #include "confdefs.h"
15442 /* System header to define __stub macros and hopefully few prototypes,
15443     which can conflict with char $ac_func(); below.  */
15444 #include <assert.h>
15445 /* Override any gcc2 internal prototype to avoid an error.  */
15446 /* We use char because int might match the return type of a gcc2
15447     builtin and then its argument prototype would still apply.  */
15448 char $ac_func();
15449 char (*f)();
15450
15451 int main() {
15452
15453 /* The GNU C library defines this for functions which it implements
15454     to always fail with ENOSYS.  Some functions are actually named
15455     something starting with __ and the normal name is an alias.  */
15456 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15457 choke me
15458 #else
15459 f = $ac_func;
15460 #endif
15461
15462 ; return 0; }
15463 EOF
15464 if { (eval echo configure:15465: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15465   rm -rf conftest*
15466   eval "ac_cv_func_$ac_func=yes"
15467 else
15468   echo "configure: failed program was:" >&5
15469   cat conftest.$ac_ext >&5
15470   rm -rf conftest*
15471   eval "ac_cv_func_$ac_func=no"
15472 fi
15473 rm -f conftest*
15474 fi
15475
15476 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15477   echo "$ac_t""yes" 1>&6
15478     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15479   cat >> confdefs.h <<EOF
15480 #define $ac_tr_func 1
15481 EOF
15482  
15483 else
15484   echo "$ac_t""no" 1>&6
15485 fi
15486 done
15487
15488
15489                         if test $ac_cv_func_sched_yield = no -a \
15490                                 $ac_cv_func_pthread_yield = no ; then
15491                                                                 echo $ac_n "checking for sched_yield in -lrt""... $ac_c" 1>&6
15492 echo "configure:15493: checking for sched_yield in -lrt" >&5
15493 ac_lib_var=`echo rt'_'sched_yield | sed 'y%./+-:%__p__%'`
15494 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
15495   echo $ac_n "(cached) $ac_c" 1>&6
15496 else
15497   ac_save_LIBS="$LIBS"
15498 LIBS="-lrt  $LIBS"
15499 cat > conftest.$ac_ext <<EOF
15500 #line 15501 "configure"
15501 #include "confdefs.h"
15502 /* Override any gcc2 internal prototype to avoid an error.  */
15503 /* We use char because int might match the return type of a gcc2
15504     builtin and then its argument prototype would still apply.  */
15505 char sched_yield();
15506
15507 int main() {
15508 sched_yield()
15509 ; return 0; }
15510 EOF
15511 if { (eval echo configure:15512: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15512   rm -rf conftest*
15513   eval "ac_cv_lib_$ac_lib_var=yes"
15514 else
15515   echo "configure: failed program was:" >&5
15516   cat conftest.$ac_ext >&5
15517   rm -rf conftest*
15518   eval "ac_cv_lib_$ac_lib_var=no"
15519 fi
15520 rm -f conftest*
15521 LIBS="$ac_save_LIBS"
15522
15523 fi
15524 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
15525   echo "$ac_t""yes" 1>&6
15526   LTHREAD_LIBS="$LTHREAD_LIBS -lrt"
15527                                         cat >> confdefs.h <<\EOF
15528 #define HAVE_SCHED_YIELD 1
15529 EOF
15530
15531                                         ac_cv_func_sched_yield=yes
15532 else
15533   echo "$ac_t""no" 1>&6
15534 ac_cv_func_sched_yield=no
15535 fi
15536
15537                         fi
15538                         if test $ac_cv_func_sched_yield = no -a \
15539                                 $ac_cv_func_pthread_yield = no ; then
15540                                                                                                 for ac_func in thr_yield
15541 do
15542 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15543 echo "configure:15544: checking for $ac_func" >&5
15544 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15545   echo $ac_n "(cached) $ac_c" 1>&6
15546 else
15547   cat > conftest.$ac_ext <<EOF
15548 #line 15549 "configure"
15549 #include "confdefs.h"
15550 /* System header to define __stub macros and hopefully few prototypes,
15551     which can conflict with char $ac_func(); below.  */
15552 #include <assert.h>
15553 /* Override any gcc2 internal prototype to avoid an error.  */
15554 /* We use char because int might match the return type of a gcc2
15555     builtin and then its argument prototype would still apply.  */
15556 char $ac_func();
15557 char (*f)();
15558
15559 int main() {
15560
15561 /* The GNU C library defines this for functions which it implements
15562     to always fail with ENOSYS.  Some functions are actually named
15563     something starting with __ and the normal name is an alias.  */
15564 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15565 choke me
15566 #else
15567 f = $ac_func;
15568 #endif
15569
15570 ; return 0; }
15571 EOF
15572 if { (eval echo configure:15573: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15573   rm -rf conftest*
15574   eval "ac_cv_func_$ac_func=yes"
15575 else
15576   echo "configure: failed program was:" >&5
15577   cat conftest.$ac_ext >&5
15578   rm -rf conftest*
15579   eval "ac_cv_func_$ac_func=no"
15580 fi
15581 rm -f conftest*
15582 fi
15583
15584 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15585   echo "$ac_t""yes" 1>&6
15586     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15587   cat >> confdefs.h <<EOF
15588 #define $ac_tr_func 1
15589 EOF
15590  
15591 else
15592   echo "$ac_t""no" 1>&6
15593 fi
15594 done
15595
15596                         fi
15597                         if test $ac_cv_func_sched_yield = no -a \
15598                                 $ac_cv_func_pthread_yield = no -a \
15599                                 "$ac_cv_func_thr_yield" = no ; then
15600                                 echo "configure: warning: could not locate sched_yield() or pthread_yield()" 1>&2
15601                         fi
15602
15603                                                 for ac_func in pthread_kill pthread_rwlock_destroy
15604 do
15605 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15606 echo "configure:15607: checking for $ac_func" >&5
15607 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15608   echo $ac_n "(cached) $ac_c" 1>&6
15609 else
15610   cat > conftest.$ac_ext <<EOF
15611 #line 15612 "configure"
15612 #include "confdefs.h"
15613 /* System header to define __stub macros and hopefully few prototypes,
15614     which can conflict with char $ac_func(); below.  */
15615 #include <assert.h>
15616 /* Override any gcc2 internal prototype to avoid an error.  */
15617 /* We use char because int might match the return type of a gcc2
15618     builtin and then its argument prototype would still apply.  */
15619 char $ac_func();
15620 char (*f)();
15621
15622 int main() {
15623
15624 /* The GNU C library defines this for functions which it implements
15625     to always fail with ENOSYS.  Some functions are actually named
15626     something starting with __ and the normal name is an alias.  */
15627 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15628 choke me
15629 #else
15630 f = $ac_func;
15631 #endif
15632
15633 ; return 0; }
15634 EOF
15635 if { (eval echo configure:15636: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15636   rm -rf conftest*
15637   eval "ac_cv_func_$ac_func=yes"
15638 else
15639   echo "configure: failed program was:" >&5
15640   cat conftest.$ac_ext >&5
15641   rm -rf conftest*
15642   eval "ac_cv_func_$ac_func=no"
15643 fi
15644 rm -f conftest*
15645 fi
15646
15647 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15648   echo "$ac_t""yes" 1>&6
15649     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15650   cat >> confdefs.h <<EOF
15651 #define $ac_tr_func 1
15652 EOF
15653  
15654 else
15655   echo "$ac_t""no" 1>&6
15656 fi
15657 done
15658
15659
15660                                                                         echo $ac_n "checking for pthread_detach with <pthread.h>""... $ac_c" 1>&6
15661 echo "configure:15662: checking for pthread_detach with <pthread.h>" >&5
15662 if eval "test \"\${ol_cv_func_pthread_detach+set}\" = set"; then
15663   echo $ac_n "(cached) $ac_c" 1>&6
15664 else
15665   
15666                                                                 cat > conftest.$ac_ext <<EOF
15667 #line 15668 "configure"
15668 #include "confdefs.h"
15669
15670 #include <pthread.h>
15671 #ifndef NULL
15672 #define NULL (void*)0
15673 #endif
15674
15675 int main() {
15676 pthread_detach(NULL);
15677 ; return 0; }
15678 EOF
15679 if { (eval echo configure:15680: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15680   rm -rf conftest*
15681   ol_cv_func_pthread_detach=yes
15682 else
15683   echo "configure: failed program was:" >&5
15684   cat conftest.$ac_ext >&5
15685   rm -rf conftest*
15686   ol_cv_func_pthread_detach=no
15687 fi
15688 rm -f conftest*
15689                         
15690 fi
15691
15692 echo "$ac_t""$ol_cv_func_pthread_detach" 1>&6
15693
15694                         if test $ol_cv_func_pthread_detach = no ; then
15695                                 { echo "configure: error: could not locate pthread_detach()" 1>&2; exit 1; }
15696                         fi
15697
15698                         cat >> confdefs.h <<\EOF
15699 #define HAVE_PTHREAD_DETACH 1
15700 EOF
15701
15702
15703                                                 for ac_func in \
15704                                 pthread_setconcurrency \
15705                                 pthread_getconcurrency \
15706                                 thr_setconcurrency \
15707                                 thr_getconcurrency \
15708                         
15709 do
15710 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15711 echo "configure:15712: checking for $ac_func" >&5
15712 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15713   echo $ac_n "(cached) $ac_c" 1>&6
15714 else
15715   cat > conftest.$ac_ext <<EOF
15716 #line 15717 "configure"
15717 #include "confdefs.h"
15718 /* System header to define __stub macros and hopefully few prototypes,
15719     which can conflict with char $ac_func(); below.  */
15720 #include <assert.h>
15721 /* Override any gcc2 internal prototype to avoid an error.  */
15722 /* We use char because int might match the return type of a gcc2
15723     builtin and then its argument prototype would still apply.  */
15724 char $ac_func();
15725 char (*f)();
15726
15727 int main() {
15728
15729 /* The GNU C library defines this for functions which it implements
15730     to always fail with ENOSYS.  Some functions are actually named
15731     something starting with __ and the normal name is an alias.  */
15732 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15733 choke me
15734 #else
15735 f = $ac_func;
15736 #endif
15737
15738 ; return 0; }
15739 EOF
15740 if { (eval echo configure:15741: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15741   rm -rf conftest*
15742   eval "ac_cv_func_$ac_func=yes"
15743 else
15744   echo "configure: failed program was:" >&5
15745   cat conftest.$ac_ext >&5
15746   rm -rf conftest*
15747   eval "ac_cv_func_$ac_func=no"
15748 fi
15749 rm -f conftest*
15750 fi
15751
15752 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15753   echo "$ac_t""yes" 1>&6
15754     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15755   cat >> confdefs.h <<EOF
15756 #define $ac_tr_func 1
15757 EOF
15758  
15759 else
15760   echo "$ac_t""no" 1>&6
15761 fi
15762 done
15763
15764
15765                         
15766         for ac_func in pthread_kill_other_threads_np
15767 do
15768 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
15769 echo "configure:15770: checking for $ac_func" >&5
15770 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
15771   echo $ac_n "(cached) $ac_c" 1>&6
15772 else
15773   cat > conftest.$ac_ext <<EOF
15774 #line 15775 "configure"
15775 #include "confdefs.h"
15776 /* System header to define __stub macros and hopefully few prototypes,
15777     which can conflict with char $ac_func(); below.  */
15778 #include <assert.h>
15779 /* Override any gcc2 internal prototype to avoid an error.  */
15780 /* We use char because int might match the return type of a gcc2
15781     builtin and then its argument prototype would still apply.  */
15782 char $ac_func();
15783 char (*f)();
15784
15785 int main() {
15786
15787 /* The GNU C library defines this for functions which it implements
15788     to always fail with ENOSYS.  Some functions are actually named
15789     something starting with __ and the normal name is an alias.  */
15790 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15791 choke me
15792 #else
15793 f = $ac_func;
15794 #endif
15795
15796 ; return 0; }
15797 EOF
15798 if { (eval echo configure:15799: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
15799   rm -rf conftest*
15800   eval "ac_cv_func_$ac_func=yes"
15801 else
15802   echo "configure: failed program was:" >&5
15803   cat conftest.$ac_ext >&5
15804   rm -rf conftest*
15805   eval "ac_cv_func_$ac_func=no"
15806 fi
15807 rm -f conftest*
15808 fi
15809
15810 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
15811   echo "$ac_t""yes" 1>&6
15812     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
15813   cat >> confdefs.h <<EOF
15814 #define $ac_tr_func 1
15815 EOF
15816  
15817 else
15818   echo "$ac_t""no" 1>&6
15819 fi
15820 done
15821
15822         echo $ac_n "checking for LinuxThreads implementation""... $ac_c" 1>&6
15823 echo "configure:15824: checking for LinuxThreads implementation" >&5
15824 if eval "test \"\${ol_cv_sys_linux_threads+set}\" = set"; then
15825   echo $ac_n "(cached) $ac_c" 1>&6
15826 else
15827   ol_cv_sys_linux_threads=$ac_cv_func_pthread_kill_other_threads_np
15828 fi
15829
15830 echo "$ac_t""$ol_cv_sys_linux_threads" 1>&6
15831
15832                         
15833         
15834         
15835         echo $ac_n "checking for LinuxThreads consistency""... $ac_c" 1>&6
15836 echo "configure:15837: checking for LinuxThreads consistency" >&5
15837 if eval "test \"\${ol_cv_linux_threads+set}\" = set"; then
15838   echo $ac_n "(cached) $ac_c" 1>&6
15839 else
15840   
15841                 if test $ol_cv_header_linux_threads = yes -a \
15842                         $ol_cv_sys_linux_threads = yes; then
15843                         ol_cv_linux_threads=yes
15844                 elif test $ol_cv_header_linux_threads = no -a \
15845                         $ol_cv_sys_linux_threads = no; then
15846                         ol_cv_linux_threads=no
15847                 else
15848                         ol_cv_linux_threads=error
15849                 fi
15850         
15851 fi
15852
15853 echo "$ac_t""$ol_cv_linux_threads" 1>&6
15854
15855
15856                         if test $ol_cv_linux_threads = error; then
15857                                 { echo "configure: error: LinuxThreads header/library mismatch" 1>&2; exit 1; };
15858                         fi
15859
15860                         echo $ac_n "checking if pthread_create() works""... $ac_c" 1>&6
15861 echo "configure:15862: checking if pthread_create() works" >&5
15862 if eval "test \"\${ol_cv_pthread_create_works+set}\" = set"; then
15863   echo $ac_n "(cached) $ac_c" 1>&6
15864 else
15865   
15866                         if test "$cross_compiling" = yes; then
15867                                 ol_cv_pthread_create_works=yes
15868 else
15869   cat > conftest.$ac_ext <<EOF
15870 #line 15871 "configure"
15871 #include "confdefs.h"
15872 /* pthread test headers */
15873 #include <pthread.h>
15874 #ifndef NULL
15875 #define NULL (void*)0
15876 #endif
15877
15878 static void *task(p)
15879         void *p;
15880 {
15881         return (void *) (p == NULL);
15882 }
15883
15884
15885 int main(argc, argv)
15886         int argc;
15887         char **argv;
15888 {
15889
15890         /* pthread test function */
15891         pthread_t t;
15892         int status;
15893         int detach = 1;
15894
15895 #ifdef HAVE_PTHREADS_FINAL
15896         /* Final pthreads */
15897         pthread_attr_t attr;
15898
15899         status = pthread_attr_init(&attr);
15900         if( status ) return status;
15901
15902 #if defined( PTHREAD_CREATE_JOINABLE ) || defined( PTHREAD_UNDETACHED )
15903         if( !detach ) {
15904 #if defined( PTHREAD_CREATE_JOINABLE )
15905                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE);
15906 #else
15907                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_UNDETACHED);
15908 #endif
15909
15910 #ifdef PTHREAD_CREATE_DETACHED
15911         } else {
15912                 status = pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
15913 #endif
15914         }
15915         if( status ) return status;
15916 #endif
15917
15918         status = pthread_create( &t, &attr, task, NULL );
15919         if( status ) return status;
15920
15921 #if !defined( PTHREAD_CREATE_JOINABLE ) && !defined( PTHREAD_UNDETACHED )
15922         if( detach ) {
15923                 /* give thread a chance to complete */
15924                 /* it should remain joinable and hence detachable */
15925                 sleep( 1 );
15926
15927                 status = pthread_detach( t );
15928                 if( status ) return status;
15929         }
15930 #endif
15931
15932 #else
15933         /* Draft 4 pthreads */
15934         status = pthread_create( &t, pthread_attr_default, task, NULL );
15935         if( status ) return status;
15936
15937         if( detach ) {
15938                 /* give thread a chance to complete */
15939                 /* it should remain joinable and hence detachable */
15940                 sleep( 1 );
15941
15942                 status = pthread_detach( &t );
15943                 if( status ) return status;
15944         }
15945 #endif
15946
15947 #ifdef HAVE_LINUX_THREADS
15948         pthread_kill_other_threads_np();
15949 #endif
15950
15951         return 0;
15952
15953 }
15954
15955 EOF
15956 if { (eval echo configure:15957: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
15957 then
15958   ol_cv_pthread_create_works=yes
15959 else
15960   echo "configure: failed program was:" >&5
15961   cat conftest.$ac_ext >&5
15962   rm -fr conftest*
15963   ol_cv_pthread_create_works=no
15964 fi
15965 rm -fr conftest*
15966 fi
15967
15968 fi
15969
15970 echo "$ac_t""$ol_cv_pthread_create_works" 1>&6
15971
15972                         if test $ol_cv_pthread_create_works = no ; then
15973                                 { echo "configure: error: pthread_create is not usable, check environment settings" 1>&2; exit 1; }
15974                         fi
15975
15976                                                 if test $ol_with_yielding_select = auto ; then
15977                                 echo $ac_n "checking if select yields when using pthreads""... $ac_c" 1>&6
15978 echo "configure:15979: checking if select yields when using pthreads" >&5
15979 if eval "test \"\${ol_cv_pthread_select_yields+set}\" = set"; then
15980   echo $ac_n "(cached) $ac_c" 1>&6
15981 else
15982   
15983                                 if test "$cross_compiling" = yes; then
15984   ol_cv_pthread_select_yields=cross
15985 else
15986   cat > conftest.$ac_ext <<EOF
15987 #line 15988 "configure"
15988 #include "confdefs.h"
15989
15990 #include <sys/types.h>
15991 #include <sys/time.h>
15992 #include <unistd.h>
15993 #include <pthread.h>
15994 #ifndef NULL
15995 #define NULL (void*) 0
15996 #endif
15997
15998 static int fildes[2];
15999
16000 static void *task(p)
16001         void *p;
16002 {
16003         int i;
16004         struct timeval tv;
16005
16006         fd_set rfds;
16007
16008         tv.tv_sec=10;
16009         tv.tv_usec=0;
16010
16011         FD_ZERO(&rfds);
16012         FD_SET(fildes[0], &rfds);
16013
16014         /* we're not interested in any fds */
16015         i = select(FD_SETSIZE, &rfds, NULL, NULL, &tv);
16016
16017         if(i < 0) {
16018                 perror("select");
16019                 exit(10);
16020         }
16021
16022         exit(0); /* if we exit here, the select blocked the whole process */
16023 }
16024
16025 int main(argc, argv)
16026         int argc;
16027         char **argv;
16028 {
16029         pthread_t t;
16030
16031         /* create a pipe to select */
16032         if(pipe(&fildes[0])) {
16033                 perror("select");
16034                 exit(1);
16035         }
16036
16037 #ifdef HAVE_PTHREAD_SETCONCURRENCY
16038         (void) pthread_setconcurrency(2);
16039 #else
16040 #ifdef HAVE_THR_SETCONCURRENCY
16041         /* Set Solaris LWP concurrency to 2 */
16042         thr_setconcurrency(2);
16043 #endif
16044 #endif
16045
16046 #if HAVE_PTHREADS_D4
16047         pthread_create(&t, pthread_attr_default, task, NULL);
16048 #else
16049         pthread_create(&t, NULL, task, NULL);
16050 #endif
16051
16052 #if HAVE_SCHED_YIELD
16053         sched_yield();  /* make sure task runs first */
16054 #else
16055 #ifdef HAVE_PTHREAD_YIELD
16056         pthread_yield();        /* make sure task runs first */
16057 #endif
16058 #endif
16059
16060         exit(2);
16061 }
16062 EOF
16063 if { (eval echo configure:16064: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
16064 then
16065   ol_cv_pthread_select_yields=no
16066 else
16067   echo "configure: failed program was:" >&5
16068   cat conftest.$ac_ext >&5
16069   rm -fr conftest*
16070   ol_cv_pthread_select_yields=yes
16071 fi
16072 rm -fr conftest*
16073 fi
16074
16075 fi
16076
16077 echo "$ac_t""$ol_cv_pthread_select_yields" 1>&6
16078
16079                                 if test $ol_cv_pthread_select_yields = cross ; then
16080                                         { echo "configure: error: crossing compiling: use --with-yielding_select=yes|no|manual" 1>&2; exit 1; }
16081                                 fi
16082
16083                                 if test $ol_cv_pthread_select_yields = yes ; then
16084                                         ol_with_yielding_select=yes
16085                                 fi
16086                         fi
16087
16088                                                 CPPFLAGS="$save_CPPFLAGS"
16089                         LIBS="$save_LIBS"
16090                 else
16091                         { echo "configure: error: could not locate usable POSIX Threads" 1>&2; exit 1; }
16092                 fi
16093         fi
16094
16095         if test $ol_with_threads = posix ; then
16096                 { echo "configure: error: could not locate POSIX Threads" 1>&2; exit 1; }
16097         fi
16098 fi
16099
16100 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16101         -o $ol_with_threads = mach ; then
16102
16103                 for ac_hdr in mach/cthreads.h cthreads.h
16104 do
16105 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16106 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16107 echo "configure:16108: checking for $ac_hdr" >&5
16108 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16109   echo $ac_n "(cached) $ac_c" 1>&6
16110 else
16111   cat > conftest.$ac_ext <<EOF
16112 #line 16113 "configure"
16113 #include "confdefs.h"
16114 #include <$ac_hdr>
16115 EOF
16116 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16117 { (eval echo configure:16118: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16118 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16119 if test -z "$ac_err"; then
16120   rm -rf conftest*
16121   eval "ac_cv_header_$ac_safe=yes"
16122 else
16123   echo "$ac_err" >&5
16124   echo "configure: failed program was:" >&5
16125   cat conftest.$ac_ext >&5
16126   rm -rf conftest*
16127   eval "ac_cv_header_$ac_safe=no"
16128 fi
16129 rm -f conftest*
16130 fi
16131 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16132   echo "$ac_t""yes" 1>&6
16133     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16134   cat >> confdefs.h <<EOF
16135 #define $ac_tr_hdr 1
16136 EOF
16137  
16138 else
16139   echo "$ac_t""no" 1>&6
16140 fi
16141 done
16142
16143         if test $ac_cv_header_mach_cthreads_h = yes ; then
16144                 ol_with_threads=found
16145
16146                                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16147 echo "configure:16148: checking for cthread_fork" >&5
16148 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16149   echo $ac_n "(cached) $ac_c" 1>&6
16150 else
16151   cat > conftest.$ac_ext <<EOF
16152 #line 16153 "configure"
16153 #include "confdefs.h"
16154 /* System header to define __stub macros and hopefully few prototypes,
16155     which can conflict with char cthread_fork(); below.  */
16156 #include <assert.h>
16157 /* Override any gcc2 internal prototype to avoid an error.  */
16158 /* We use char because int might match the return type of a gcc2
16159     builtin and then its argument prototype would still apply.  */
16160 char cthread_fork();
16161 char (*f)();
16162
16163 int main() {
16164
16165 /* The GNU C library defines this for functions which it implements
16166     to always fail with ENOSYS.  Some functions are actually named
16167     something starting with __ and the normal name is an alias.  */
16168 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16169 choke me
16170 #else
16171 f = cthread_fork;
16172 #endif
16173
16174 ; return 0; }
16175 EOF
16176 if { (eval echo configure:16177: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16177   rm -rf conftest*
16178   eval "ac_cv_func_cthread_fork=yes"
16179 else
16180   echo "configure: failed program was:" >&5
16181   cat conftest.$ac_ext >&5
16182   rm -rf conftest*
16183   eval "ac_cv_func_cthread_fork=no"
16184 fi
16185 rm -f conftest*
16186 fi
16187
16188 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16189   echo "$ac_t""yes" 1>&6
16190   ol_link_threads=yes
16191 else
16192   echo "$ac_t""no" 1>&6
16193 fi
16194
16195
16196                 if test $ol_link_threads = no ; then
16197                                                                         echo $ac_n "checking for cthread_fork with -all_load""... $ac_c" 1>&6
16198 echo "configure:16199: checking for cthread_fork with -all_load" >&5
16199 if eval "test \"\${ol_cv_cthread_all_load+set}\" = set"; then
16200   echo $ac_n "(cached) $ac_c" 1>&6
16201 else
16202   
16203                                                                 save_LIBS="$LIBS"
16204                                 LIBS="-all_load $LIBS"
16205                                 cat > conftest.$ac_ext <<EOF
16206 #line 16207 "configure"
16207 #include "confdefs.h"
16208 #include <mach/cthreads.h>
16209 int main() {
16210
16211                                         cthread_fork((void *)0, (void *)0);
16212                                         
16213 ; return 0; }
16214 EOF
16215 if { (eval echo configure:16216: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16216   rm -rf conftest*
16217   ol_cv_cthread_all_load=yes
16218 else
16219   echo "configure: failed program was:" >&5
16220   cat conftest.$ac_ext >&5
16221   rm -rf conftest*
16222   ol_cv_cthread_all_load=no
16223 fi
16224 rm -f conftest*
16225                                                                 LIBS="$save_LIBS"
16226                         
16227 fi
16228
16229 echo "$ac_t""$ol_cv_cthread_all_load" 1>&6
16230
16231                         if test $ol_cv_cthread_all_load = yes ; then
16232                                 LTHREAD_LIBS="$LTHREAD_LIBS -all_load"
16233                                 ol_link_threads=mach
16234                                 ol_with_threads=found
16235                         fi
16236                 fi
16237
16238         elif test $ac_cv_header_cthreads_h = yes ; then
16239                                 
16240                 ol_with_threads=found
16241  
16242                                 save_LIBS="$LIBS"
16243                 LIBS="$LIBS -lthreads"
16244                 echo $ac_n "checking for cthread_fork""... $ac_c" 1>&6
16245 echo "configure:16246: checking for cthread_fork" >&5
16246 if eval "test \"\${ac_cv_func_cthread_fork+set}\" = set"; then
16247   echo $ac_n "(cached) $ac_c" 1>&6
16248 else
16249   cat > conftest.$ac_ext <<EOF
16250 #line 16251 "configure"
16251 #include "confdefs.h"
16252 /* System header to define __stub macros and hopefully few prototypes,
16253     which can conflict with char cthread_fork(); below.  */
16254 #include <assert.h>
16255 /* Override any gcc2 internal prototype to avoid an error.  */
16256 /* We use char because int might match the return type of a gcc2
16257     builtin and then its argument prototype would still apply.  */
16258 char cthread_fork();
16259 char (*f)();
16260
16261 int main() {
16262
16263 /* The GNU C library defines this for functions which it implements
16264     to always fail with ENOSYS.  Some functions are actually named
16265     something starting with __ and the normal name is an alias.  */
16266 #if defined (__stub_cthread_fork) || defined (__stub___cthread_fork)
16267 choke me
16268 #else
16269 f = cthread_fork;
16270 #endif
16271
16272 ; return 0; }
16273 EOF
16274 if { (eval echo configure:16275: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16275   rm -rf conftest*
16276   eval "ac_cv_func_cthread_fork=yes"
16277 else
16278   echo "configure: failed program was:" >&5
16279   cat conftest.$ac_ext >&5
16280   rm -rf conftest*
16281   eval "ac_cv_func_cthread_fork=no"
16282 fi
16283 rm -f conftest*
16284 fi
16285
16286 if eval "test \"`echo '$ac_cv_func_'cthread_fork`\" = yes"; then
16287   echo "$ac_t""yes" 1>&6
16288   ol_link_threads=yes
16289 else
16290   echo "$ac_t""no" 1>&6
16291 fi
16292
16293                 LIBS="$save_LIBS"
16294
16295                 if test $ol_link_threads = yes ; then
16296                         LTHREAD_LIBS="-lthreads"
16297                         ol_link_threads=mach
16298                         ol_with_threads=found
16299                 else
16300                         { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16301                 fi
16302
16303         elif test $ol_with_threads = mach ; then
16304                 { echo "configure: error: could not locate Mach CThreads" 1>&2; exit 1; }
16305         fi
16306
16307         if test $ol_link_threads = mach ; then
16308                 cat >> confdefs.h <<\EOF
16309 #define HAVE_MACH_CTHREADS 1
16310 EOF
16311
16312         elif test $ol_with_threads = found ; then
16313                 { echo "configure: error: could not link with Mach CThreads" 1>&2; exit 1; }
16314         fi
16315 fi
16316
16317 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16318         -o $ol_with_threads = pth ; then
16319
16320         for ac_hdr in pth.h
16321 do
16322 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16323 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16324 echo "configure:16325: checking for $ac_hdr" >&5
16325 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16326   echo $ac_n "(cached) $ac_c" 1>&6
16327 else
16328   cat > conftest.$ac_ext <<EOF
16329 #line 16330 "configure"
16330 #include "confdefs.h"
16331 #include <$ac_hdr>
16332 EOF
16333 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16334 { (eval echo configure:16335: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16335 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16336 if test -z "$ac_err"; then
16337   rm -rf conftest*
16338   eval "ac_cv_header_$ac_safe=yes"
16339 else
16340   echo "$ac_err" >&5
16341   echo "configure: failed program was:" >&5
16342   cat conftest.$ac_ext >&5
16343   rm -rf conftest*
16344   eval "ac_cv_header_$ac_safe=no"
16345 fi
16346 rm -f conftest*
16347 fi
16348 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16349   echo "$ac_t""yes" 1>&6
16350     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16351   cat >> confdefs.h <<EOF
16352 #define $ac_tr_hdr 1
16353 EOF
16354  
16355 else
16356   echo "$ac_t""no" 1>&6
16357 fi
16358 done
16359
16360
16361         if test $ac_cv_header_pth_h = yes ; then
16362                 echo $ac_n "checking for pth_version in -lpth""... $ac_c" 1>&6
16363 echo "configure:16364: checking for pth_version in -lpth" >&5
16364 ac_lib_var=`echo pth'_'pth_version | sed 'y%./+-:%__p__%'`
16365 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16366   echo $ac_n "(cached) $ac_c" 1>&6
16367 else
16368   ac_save_LIBS="$LIBS"
16369 LIBS="-lpth  $LIBS"
16370 cat > conftest.$ac_ext <<EOF
16371 #line 16372 "configure"
16372 #include "confdefs.h"
16373 /* Override any gcc2 internal prototype to avoid an error.  */
16374 /* We use char because int might match the return type of a gcc2
16375     builtin and then its argument prototype would still apply.  */
16376 char pth_version();
16377
16378 int main() {
16379 pth_version()
16380 ; return 0; }
16381 EOF
16382 if { (eval echo configure:16383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16383   rm -rf conftest*
16384   eval "ac_cv_lib_$ac_lib_var=yes"
16385 else
16386   echo "configure: failed program was:" >&5
16387   cat conftest.$ac_ext >&5
16388   rm -rf conftest*
16389   eval "ac_cv_lib_$ac_lib_var=no"
16390 fi
16391 rm -f conftest*
16392 LIBS="$ac_save_LIBS"
16393
16394 fi
16395 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16396   echo "$ac_t""yes" 1>&6
16397   have_pth=yes
16398 else
16399   echo "$ac_t""no" 1>&6
16400 have_pth=no
16401 fi
16402
16403
16404                 if test $have_pth = yes ; then
16405                         cat >> confdefs.h <<\EOF
16406 #define HAVE_GNU_PTH 1
16407 EOF
16408
16409                         LTHREAD_LIBS="$LTHREAD_LIBS -lpth"
16410                         ol_link_threads=pth
16411                         ol_with_threads=found
16412
16413                         if test $ol_with_yielding_select = auto ; then
16414                                 ol_with_yielding_select=yes
16415                         fi
16416                 fi
16417         fi
16418 fi
16419
16420 if test $ol_with_threads = auto -o $ol_with_threads = yes \
16421         -o $ol_with_threads = lwp ; then
16422
16423                 for ac_hdr in thread.h synch.h
16424 do
16425 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16426 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16427 echo "configure:16428: checking for $ac_hdr" >&5
16428 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16429   echo $ac_n "(cached) $ac_c" 1>&6
16430 else
16431   cat > conftest.$ac_ext <<EOF
16432 #line 16433 "configure"
16433 #include "confdefs.h"
16434 #include <$ac_hdr>
16435 EOF
16436 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16437 { (eval echo configure:16438: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16438 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16439 if test -z "$ac_err"; then
16440   rm -rf conftest*
16441   eval "ac_cv_header_$ac_safe=yes"
16442 else
16443   echo "$ac_err" >&5
16444   echo "configure: failed program was:" >&5
16445   cat conftest.$ac_ext >&5
16446   rm -rf conftest*
16447   eval "ac_cv_header_$ac_safe=no"
16448 fi
16449 rm -f conftest*
16450 fi
16451 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16452   echo "$ac_t""yes" 1>&6
16453     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16454   cat >> confdefs.h <<EOF
16455 #define $ac_tr_hdr 1
16456 EOF
16457  
16458 else
16459   echo "$ac_t""no" 1>&6
16460 fi
16461 done
16462
16463         if test $ac_cv_header_thread_h = yes -a $ac_cv_header_synch_h = yes ; then
16464                 echo $ac_n "checking for thr_create in -lthread""... $ac_c" 1>&6
16465 echo "configure:16466: checking for thr_create in -lthread" >&5
16466 ac_lib_var=`echo thread'_'thr_create | sed 'y%./+-:%__p__%'`
16467 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16468   echo $ac_n "(cached) $ac_c" 1>&6
16469 else
16470   ac_save_LIBS="$LIBS"
16471 LIBS="-lthread  $LIBS"
16472 cat > conftest.$ac_ext <<EOF
16473 #line 16474 "configure"
16474 #include "confdefs.h"
16475 /* Override any gcc2 internal prototype to avoid an error.  */
16476 /* We use char because int might match the return type of a gcc2
16477     builtin and then its argument prototype would still apply.  */
16478 char thr_create();
16479
16480 int main() {
16481 thr_create()
16482 ; return 0; }
16483 EOF
16484 if { (eval echo configure:16485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16485   rm -rf conftest*
16486   eval "ac_cv_lib_$ac_lib_var=yes"
16487 else
16488   echo "configure: failed program was:" >&5
16489   cat conftest.$ac_ext >&5
16490   rm -rf conftest*
16491   eval "ac_cv_lib_$ac_lib_var=no"
16492 fi
16493 rm -f conftest*
16494 LIBS="$ac_save_LIBS"
16495
16496 fi
16497 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16498   echo "$ac_t""yes" 1>&6
16499   have_thr=yes
16500 else
16501   echo "$ac_t""no" 1>&6
16502 have_thr=no
16503 fi
16504
16505
16506                 if test $have_thr = yes ; then
16507                         cat >> confdefs.h <<\EOF
16508 #define HAVE_THR 1
16509 EOF
16510
16511                         LTHREAD_LIBS="$LTHREAD_LIBS -lthread"
16512                         ol_link_threads=thr
16513
16514                         if test $ol_with_yielding_select = auto ; then
16515                                 ol_with_yielding_select=yes
16516                         fi
16517
16518                                                 for ac_func in \
16519                                 thr_setconcurrency \
16520                                 thr_getconcurrency \
16521                         
16522 do
16523 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16524 echo "configure:16525: checking for $ac_func" >&5
16525 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16526   echo $ac_n "(cached) $ac_c" 1>&6
16527 else
16528   cat > conftest.$ac_ext <<EOF
16529 #line 16530 "configure"
16530 #include "confdefs.h"
16531 /* System header to define __stub macros and hopefully few prototypes,
16532     which can conflict with char $ac_func(); below.  */
16533 #include <assert.h>
16534 /* Override any gcc2 internal prototype to avoid an error.  */
16535 /* We use char because int might match the return type of a gcc2
16536     builtin and then its argument prototype would still apply.  */
16537 char $ac_func();
16538 char (*f)();
16539
16540 int main() {
16541
16542 /* The GNU C library defines this for functions which it implements
16543     to always fail with ENOSYS.  Some functions are actually named
16544     something starting with __ and the normal name is an alias.  */
16545 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16546 choke me
16547 #else
16548 f = $ac_func;
16549 #endif
16550
16551 ; return 0; }
16552 EOF
16553 if { (eval echo configure:16554: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16554   rm -rf conftest*
16555   eval "ac_cv_func_$ac_func=yes"
16556 else
16557   echo "configure: failed program was:" >&5
16558   cat conftest.$ac_ext >&5
16559   rm -rf conftest*
16560   eval "ac_cv_func_$ac_func=no"
16561 fi
16562 rm -f conftest*
16563 fi
16564
16565 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16566   echo "$ac_t""yes" 1>&6
16567     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16568   cat >> confdefs.h <<EOF
16569 #define $ac_tr_func 1
16570 EOF
16571  
16572 else
16573   echo "$ac_t""no" 1>&6
16574 fi
16575 done
16576
16577                 fi
16578         fi
16579
16580                 for ac_hdr in lwp/lwp.h
16581 do
16582 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16583 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16584 echo "configure:16585: checking for $ac_hdr" >&5
16585 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16586   echo $ac_n "(cached) $ac_c" 1>&6
16587 else
16588   cat > conftest.$ac_ext <<EOF
16589 #line 16590 "configure"
16590 #include "confdefs.h"
16591 #include <$ac_hdr>
16592 EOF
16593 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16594 { (eval echo configure:16595: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16595 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16596 if test -z "$ac_err"; then
16597   rm -rf conftest*
16598   eval "ac_cv_header_$ac_safe=yes"
16599 else
16600   echo "$ac_err" >&5
16601   echo "configure: failed program was:" >&5
16602   cat conftest.$ac_ext >&5
16603   rm -rf conftest*
16604   eval "ac_cv_header_$ac_safe=no"
16605 fi
16606 rm -f conftest*
16607 fi
16608 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16609   echo "$ac_t""yes" 1>&6
16610     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16611   cat >> confdefs.h <<EOF
16612 #define $ac_tr_hdr 1
16613 EOF
16614  
16615 else
16616   echo "$ac_t""no" 1>&6
16617 fi
16618 done
16619
16620         if test $ac_cv_header_lwp_lwp_h = yes ; then
16621                 echo $ac_n "checking for lwp_create in -llwp""... $ac_c" 1>&6
16622 echo "configure:16623: checking for lwp_create in -llwp" >&5
16623 ac_lib_var=`echo lwp'_'lwp_create | sed 'y%./+-:%__p__%'`
16624 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
16625   echo $ac_n "(cached) $ac_c" 1>&6
16626 else
16627   ac_save_LIBS="$LIBS"
16628 LIBS="-llwp  $LIBS"
16629 cat > conftest.$ac_ext <<EOF
16630 #line 16631 "configure"
16631 #include "confdefs.h"
16632 /* Override any gcc2 internal prototype to avoid an error.  */
16633 /* We use char because int might match the return type of a gcc2
16634     builtin and then its argument prototype would still apply.  */
16635 char lwp_create();
16636
16637 int main() {
16638 lwp_create()
16639 ; return 0; }
16640 EOF
16641 if { (eval echo configure:16642: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16642   rm -rf conftest*
16643   eval "ac_cv_lib_$ac_lib_var=yes"
16644 else
16645   echo "configure: failed program was:" >&5
16646   cat conftest.$ac_ext >&5
16647   rm -rf conftest*
16648   eval "ac_cv_lib_$ac_lib_var=no"
16649 fi
16650 rm -f conftest*
16651 LIBS="$ac_save_LIBS"
16652
16653 fi
16654 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
16655   echo "$ac_t""yes" 1>&6
16656   have_lwp=yes
16657 else
16658   echo "$ac_t""no" 1>&6
16659 have_lwp=no
16660 fi
16661
16662
16663                 if test $have_lwp = yes ; then
16664                         cat >> confdefs.h <<\EOF
16665 #define HAVE_LWP 1
16666 EOF
16667
16668                         LTHREAD_LIBS="$LTHREAD_LIBS -llwp"
16669                         ol_link_threads=lwp
16670
16671                         if test $ol_with_yielding_select = auto ; then
16672                                 ol_with_yielding_select=no
16673                         fi
16674                 fi
16675         fi
16676 fi
16677
16678 if test $ol_with_yielding_select = yes ; then
16679         cat >> confdefs.h <<\EOF
16680 #define HAVE_YIELDING_SELECT 1
16681 EOF
16682
16683 fi
16684
16685 if test $ol_with_threads = manual ; then
16686                 ol_link_threads=yes
16687
16688         echo "configure: warning: thread defines and link options must be set manually" 1>&2
16689
16690         for ac_hdr in pthread.h sched.h
16691 do
16692 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16693 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16694 echo "configure:16695: checking for $ac_hdr" >&5
16695 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16696   echo $ac_n "(cached) $ac_c" 1>&6
16697 else
16698   cat > conftest.$ac_ext <<EOF
16699 #line 16700 "configure"
16700 #include "confdefs.h"
16701 #include <$ac_hdr>
16702 EOF
16703 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16704 { (eval echo configure:16705: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16705 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16706 if test -z "$ac_err"; then
16707   rm -rf conftest*
16708   eval "ac_cv_header_$ac_safe=yes"
16709 else
16710   echo "$ac_err" >&5
16711   echo "configure: failed program was:" >&5
16712   cat conftest.$ac_ext >&5
16713   rm -rf conftest*
16714   eval "ac_cv_header_$ac_safe=no"
16715 fi
16716 rm -f conftest*
16717 fi
16718 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16719   echo "$ac_t""yes" 1>&6
16720     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16721   cat >> confdefs.h <<EOF
16722 #define $ac_tr_hdr 1
16723 EOF
16724  
16725 else
16726   echo "$ac_t""no" 1>&6
16727 fi
16728 done
16729
16730         for ac_func in sched_yield pthread_yield
16731 do
16732 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
16733 echo "configure:16734: checking for $ac_func" >&5
16734 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
16735   echo $ac_n "(cached) $ac_c" 1>&6
16736 else
16737   cat > conftest.$ac_ext <<EOF
16738 #line 16739 "configure"
16739 #include "confdefs.h"
16740 /* System header to define __stub macros and hopefully few prototypes,
16741     which can conflict with char $ac_func(); below.  */
16742 #include <assert.h>
16743 /* Override any gcc2 internal prototype to avoid an error.  */
16744 /* We use char because int might match the return type of a gcc2
16745     builtin and then its argument prototype would still apply.  */
16746 char $ac_func();
16747 char (*f)();
16748
16749 int main() {
16750
16751 /* The GNU C library defines this for functions which it implements
16752     to always fail with ENOSYS.  Some functions are actually named
16753     something starting with __ and the normal name is an alias.  */
16754 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16755 choke me
16756 #else
16757 f = $ac_func;
16758 #endif
16759
16760 ; return 0; }
16761 EOF
16762 if { (eval echo configure:16763: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16763   rm -rf conftest*
16764   eval "ac_cv_func_$ac_func=yes"
16765 else
16766   echo "configure: failed program was:" >&5
16767   cat conftest.$ac_ext >&5
16768   rm -rf conftest*
16769   eval "ac_cv_func_$ac_func=no"
16770 fi
16771 rm -f conftest*
16772 fi
16773
16774 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
16775   echo "$ac_t""yes" 1>&6
16776     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
16777   cat >> confdefs.h <<EOF
16778 #define $ac_tr_func 1
16779 EOF
16780  
16781 else
16782   echo "$ac_t""no" 1>&6
16783 fi
16784 done
16785
16786         
16787         echo $ac_n "checking for LinuxThreads pthread.h""... $ac_c" 1>&6
16788 echo "configure:16789: checking for LinuxThreads pthread.h" >&5
16789 if eval "test \"\${ol_cv_header_linux_threads+set}\" = set"; then
16790   echo $ac_n "(cached) $ac_c" 1>&6
16791 else
16792   cat > conftest.$ac_ext <<EOF
16793 #line 16794 "configure"
16794 #include "confdefs.h"
16795 #include <pthread.h>
16796 EOF
16797 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16798   egrep "pthread_kill_other_threads_np" >/dev/null 2>&1; then
16799   rm -rf conftest*
16800   ol_cv_header_linux_threads=yes
16801 else
16802   rm -rf conftest*
16803   ol_cv_header_linux_threads=no
16804 fi
16805 rm -f conftest*
16806
16807                 
16808 fi
16809
16810 echo "$ac_t""$ol_cv_header_linux_threads" 1>&6
16811         if test $ol_cv_header_linux_threads = yes; then
16812                 cat >> confdefs.h <<\EOF
16813 #define HAVE_LINUX_THREADS 1
16814 EOF
16815
16816         fi
16817
16818
16819         for ac_hdr in mach/cthreads.h
16820 do
16821 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16822 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16823 echo "configure:16824: checking for $ac_hdr" >&5
16824 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16825   echo $ac_n "(cached) $ac_c" 1>&6
16826 else
16827   cat > conftest.$ac_ext <<EOF
16828 #line 16829 "configure"
16829 #include "confdefs.h"
16830 #include <$ac_hdr>
16831 EOF
16832 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16833 { (eval echo configure:16834: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16834 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16835 if test -z "$ac_err"; then
16836   rm -rf conftest*
16837   eval "ac_cv_header_$ac_safe=yes"
16838 else
16839   echo "$ac_err" >&5
16840   echo "configure: failed program was:" >&5
16841   cat conftest.$ac_ext >&5
16842   rm -rf conftest*
16843   eval "ac_cv_header_$ac_safe=no"
16844 fi
16845 rm -f conftest*
16846 fi
16847 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16848   echo "$ac_t""yes" 1>&6
16849     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16850   cat >> confdefs.h <<EOF
16851 #define $ac_tr_hdr 1
16852 EOF
16853  
16854 else
16855   echo "$ac_t""no" 1>&6
16856 fi
16857 done
16858
16859         for ac_hdr in lwp/lwp.h
16860 do
16861 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16862 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16863 echo "configure:16864: checking for $ac_hdr" >&5
16864 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16865   echo $ac_n "(cached) $ac_c" 1>&6
16866 else
16867   cat > conftest.$ac_ext <<EOF
16868 #line 16869 "configure"
16869 #include "confdefs.h"
16870 #include <$ac_hdr>
16871 EOF
16872 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16873 { (eval echo configure:16874: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16874 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16875 if test -z "$ac_err"; then
16876   rm -rf conftest*
16877   eval "ac_cv_header_$ac_safe=yes"
16878 else
16879   echo "$ac_err" >&5
16880   echo "configure: failed program was:" >&5
16881   cat conftest.$ac_ext >&5
16882   rm -rf conftest*
16883   eval "ac_cv_header_$ac_safe=no"
16884 fi
16885 rm -f conftest*
16886 fi
16887 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16888   echo "$ac_t""yes" 1>&6
16889     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16890   cat >> confdefs.h <<EOF
16891 #define $ac_tr_hdr 1
16892 EOF
16893  
16894 else
16895   echo "$ac_t""no" 1>&6
16896 fi
16897 done
16898
16899         for ac_hdr in thread.h synch.h
16900 do
16901 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
16902 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
16903 echo "configure:16904: checking for $ac_hdr" >&5
16904 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
16905   echo $ac_n "(cached) $ac_c" 1>&6
16906 else
16907   cat > conftest.$ac_ext <<EOF
16908 #line 16909 "configure"
16909 #include "confdefs.h"
16910 #include <$ac_hdr>
16911 EOF
16912 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
16913 { (eval echo configure:16914: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
16914 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
16915 if test -z "$ac_err"; then
16916   rm -rf conftest*
16917   eval "ac_cv_header_$ac_safe=yes"
16918 else
16919   echo "$ac_err" >&5
16920   echo "configure: failed program was:" >&5
16921   cat conftest.$ac_ext >&5
16922   rm -rf conftest*
16923   eval "ac_cv_header_$ac_safe=no"
16924 fi
16925 rm -f conftest*
16926 fi
16927 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
16928   echo "$ac_t""yes" 1>&6
16929     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
16930   cat >> confdefs.h <<EOF
16931 #define $ac_tr_hdr 1
16932 EOF
16933  
16934 else
16935   echo "$ac_t""no" 1>&6
16936 fi
16937 done
16938
16939 fi
16940
16941 if test $ol_link_threads != no -a $ol_link_threads != nt ; then  
16942                         cat >> confdefs.h <<\EOF
16943 #define REENTRANT 1
16944 EOF
16945
16946         cat >> confdefs.h <<\EOF
16947 #define _REENTRANT 1
16948 EOF
16949
16950         cat >> confdefs.h <<\EOF
16951 #define THREAD_SAFE 1
16952 EOF
16953
16954         cat >> confdefs.h <<\EOF
16955 #define _THREAD_SAFE 1
16956 EOF
16957
16958         cat >> confdefs.h <<\EOF
16959 #define THREADSAFE 1
16960 EOF
16961
16962         cat >> confdefs.h <<\EOF
16963 #define _THREADSAFE 1
16964 EOF
16965
16966         cat >> confdefs.h <<\EOF
16967 #define _SGI_MP_SOURCE 1
16968 EOF
16969
16970
16971                         echo $ac_n "checking for thread specific errno""... $ac_c" 1>&6
16972 echo "configure:16973: checking for thread specific errno" >&5
16973 if eval "test \"\${ol_cv_errno_thread_specific+set}\" = set"; then
16974   echo $ac_n "(cached) $ac_c" 1>&6
16975 else
16976   
16977                 cat > conftest.$ac_ext <<EOF
16978 #line 16979 "configure"
16979 #include "confdefs.h"
16980 #include <errno.h>
16981 int main() {
16982 errno = 0;
16983 ; return 0; }
16984 EOF
16985 if { (eval echo configure:16986: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
16986   rm -rf conftest*
16987   ol_cv_errno_thread_specific=yes
16988 else
16989   echo "configure: failed program was:" >&5
16990   cat conftest.$ac_ext >&5
16991   rm -rf conftest*
16992   ol_cv_errno_thread_specific=no
16993 fi
16994 rm -f conftest*
16995         
16996 fi
16997
16998 echo "$ac_t""$ol_cv_errno_thread_specific" 1>&6
16999
17000                         echo $ac_n "checking for thread specific h_errno""... $ac_c" 1>&6
17001 echo "configure:17002: checking for thread specific h_errno" >&5
17002 if eval "test \"\${ol_cv_h_errno_thread_specific+set}\" = set"; then
17003   echo $ac_n "(cached) $ac_c" 1>&6
17004 else
17005   
17006                 cat > conftest.$ac_ext <<EOF
17007 #line 17008 "configure"
17008 #include "confdefs.h"
17009 #include <netdb.h>
17010 int main() {
17011 h_errno = 0;
17012 ; return 0; }
17013 EOF
17014 if { (eval echo configure:17015: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17015   rm -rf conftest*
17016   ol_cv_h_errno_thread_specific=yes
17017 else
17018   echo "configure: failed program was:" >&5
17019   cat conftest.$ac_ext >&5
17020   rm -rf conftest*
17021   ol_cv_h_errno_thread_specific=no
17022 fi
17023 rm -f conftest*
17024         
17025 fi
17026
17027 echo "$ac_t""$ol_cv_h_errno_thread_specific" 1>&6
17028
17029         if test $ol_cv_errno_thread_specific != yes \
17030                 -o $ol_cv_h_errno_thread_specific != yes ; then
17031                 LIBS="$LTHREAD_LIBS $LIBS"
17032                 LTHREAD_LIBS=""
17033         fi
17034
17035 fi  
17036
17037 if test $ol_link_threads = no ; then
17038         if test $ol_with_threads = yes ; then
17039                 { echo "configure: error: no suitable thread support" 1>&2; exit 1; }
17040         fi
17041
17042         if test $ol_with_threads = auto ; then
17043                 echo "configure: warning: no suitable thread support, disabling threads" 1>&2
17044                 ol_with_threads=no
17045         fi
17046
17047         cat >> confdefs.h <<\EOF
17048 #define NO_THREADS 1
17049 EOF
17050
17051         LTHREAD_LIBS=""
17052 fi
17053
17054 if test $ol_link_threads != no ; then
17055         cat >> confdefs.h <<\EOF
17056 #define LDAP_API_FEATURE_X_OPENLDAP_THREAD_SAFE 1
17057 EOF
17058
17059 fi
17060
17061 ol_link_ldbm=no 
17062
17063 if test $ol_with_ldbm_api = auto \
17064         -o $ol_with_ldbm_api = berkeley \
17065         -o $ol_with_ldbm_api = bcompat ; then
17066
17067         if test $ol_with_ldbm_api = bcompat; then \
17068                 for ac_hdr in db_185.h db.h
17069 do
17070 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17071 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17072 echo "configure:17073: checking for $ac_hdr" >&5
17073 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17074   echo $ac_n "(cached) $ac_c" 1>&6
17075 else
17076   cat > conftest.$ac_ext <<EOF
17077 #line 17078 "configure"
17078 #include "confdefs.h"
17079 #include <$ac_hdr>
17080 EOF
17081 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17082 { (eval echo configure:17083: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17083 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17084 if test -z "$ac_err"; then
17085   rm -rf conftest*
17086   eval "ac_cv_header_$ac_safe=yes"
17087 else
17088   echo "$ac_err" >&5
17089   echo "configure: failed program was:" >&5
17090   cat conftest.$ac_ext >&5
17091   rm -rf conftest*
17092   eval "ac_cv_header_$ac_safe=no"
17093 fi
17094 rm -f conftest*
17095 fi
17096 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17097   echo "$ac_t""yes" 1>&6
17098     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17099   cat >> confdefs.h <<EOF
17100 #define $ac_tr_hdr 1
17101 EOF
17102  
17103 else
17104   echo "$ac_t""no" 1>&6
17105 fi
17106 done
17107
17108 if test $ac_cv_header_db_185_h = yes -o $ac_cv_header_db_h = yes; then
17109         echo $ac_n "checking if Berkeley DB header compatibility""... $ac_c" 1>&6
17110 echo "configure:17111: checking if Berkeley DB header compatibility" >&5
17111 if eval "test \"\${ol_cv_header_db1+set}\" = set"; then
17112   echo $ac_n "(cached) $ac_c" 1>&6
17113 else
17114   
17115                 cat > conftest.$ac_ext <<EOF
17116 #line 17117 "configure"
17117 #include "confdefs.h"
17118
17119 #if HAVE_DB_185_H
17120 #       include <db_185.h>
17121 #else
17122 #       include <db.h>
17123 #endif
17124
17125  /* this check could be improved */
17126 #ifndef DB_VERSION_MAJOR
17127 #       define DB_VERSION_MAJOR 1
17128 #endif
17129
17130 #if DB_VERSION_MAJOR == 1 
17131         __db_version_1
17132 #endif
17133
17134 EOF
17135 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17136   egrep "__db_version_1" >/dev/null 2>&1; then
17137   rm -rf conftest*
17138   ol_cv_header_db1=yes
17139 else
17140   rm -rf conftest*
17141   ol_cv_header_db1=no
17142 fi
17143 rm -f conftest*
17144
17145 fi
17146
17147 echo "$ac_t""$ol_cv_header_db1" 1>&6
17148
17149         if test $ol_cv_header_db1 = yes ; then
17150                 ol_cv_lib_db=no
17151 if test $ol_cv_lib_db = no ; then
17152         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17153 echo "configure:17154: checking for Berkeley DB link (default)" >&5
17154 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17155   echo $ac_n "(cached) $ac_c" 1>&6
17156 else
17157   
17158         ol_DB_LIB=
17159         ol_LIBS=$LIBS
17160         LIBS="$ol_DB_LIB $LIBS"
17161
17162         cat > conftest.$ac_ext <<EOF
17163 #line 17164 "configure"
17164 #include "confdefs.h"
17165
17166 #ifdef HAVE_DB_185_H
17167 # include <db_185.h>
17168 #else
17169 # include <db.h>
17170 #endif
17171
17172 #ifndef DB_VERSION_MAJOR
17173 # define DB_VERSION_MAJOR 1
17174 #endif
17175
17176 #ifndef NULL
17177 #define NULL ((void*)0)
17178 #endif
17179
17180 int main() {
17181
17182 #if DB_VERSION_MAJOR > 1
17183         {
17184                 char *version;
17185                 int major, minor, patch;
17186
17187                 version = db_version( &major, &minor, &patch );
17188
17189                 if( major != DB_VERSION_MAJOR ||
17190                         minor < DB_VERSION_MINOR )
17191                 {
17192                         printf("Berkeley DB version mismatch\n"
17193                                 "\texpected: %s\n\tgot: %s\n",
17194                                 DB_VERSION_STRING, version);
17195                         return 1;
17196                 }
17197         }
17198 #endif
17199
17200 #if DB_VERSION_MAJOR > 2
17201         db_env_create( NULL, 0 );
17202 #elif DB_VERSION_MAJOR > 1
17203         db_appexit( NULL );
17204 #else
17205         (void) dbopen( NULL, 0, 0, 0, NULL);
17206 #endif
17207
17208 ; return 0; }
17209 EOF
17210 if { (eval echo configure:17211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17211   rm -rf conftest*
17212   ol_cv_db_none=yes
17213 else
17214   echo "configure: failed program was:" >&5
17215   cat conftest.$ac_ext >&5
17216   rm -rf conftest*
17217   ol_cv_db_none=no
17218 fi
17219 rm -f conftest*
17220
17221         LIBS="$ol_LIBS"
17222
17223 fi
17224
17225 echo "$ac_t""$ol_cv_db_none" 1>&6
17226
17227         if test $ol_cv_db_none = yes ; then
17228                 ol_cv_lib_db=yes
17229         fi
17230 fi
17231
17232 if test $ol_cv_lib_db = no ; then
17233         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17234 echo "configure:17235: checking for Berkeley DB link (-ldb4)" >&5
17235 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17236   echo $ac_n "(cached) $ac_c" 1>&6
17237 else
17238   
17239         ol_DB_LIB=-ldb4
17240         ol_LIBS=$LIBS
17241         LIBS="$ol_DB_LIB $LIBS"
17242
17243         cat > conftest.$ac_ext <<EOF
17244 #line 17245 "configure"
17245 #include "confdefs.h"
17246
17247 #ifdef HAVE_DB_185_H
17248 # include <db_185.h>
17249 #else
17250 # include <db.h>
17251 #endif
17252
17253 #ifndef DB_VERSION_MAJOR
17254 # define DB_VERSION_MAJOR 1
17255 #endif
17256
17257 #ifndef NULL
17258 #define NULL ((void*)0)
17259 #endif
17260
17261 int main() {
17262
17263 #if DB_VERSION_MAJOR > 1
17264         {
17265                 char *version;
17266                 int major, minor, patch;
17267
17268                 version = db_version( &major, &minor, &patch );
17269
17270                 if( major != DB_VERSION_MAJOR ||
17271                         minor < DB_VERSION_MINOR )
17272                 {
17273                         printf("Berkeley DB version mismatch\n"
17274                                 "\texpected: %s\n\tgot: %s\n",
17275                                 DB_VERSION_STRING, version);
17276                         return 1;
17277                 }
17278         }
17279 #endif
17280
17281 #if DB_VERSION_MAJOR > 2
17282         db_env_create( NULL, 0 );
17283 #elif DB_VERSION_MAJOR > 1
17284         db_appexit( NULL );
17285 #else
17286         (void) dbopen( NULL, 0, 0, 0, NULL);
17287 #endif
17288
17289 ; return 0; }
17290 EOF
17291 if { (eval echo configure:17292: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17292   rm -rf conftest*
17293   ol_cv_db_db4=yes
17294 else
17295   echo "configure: failed program was:" >&5
17296   cat conftest.$ac_ext >&5
17297   rm -rf conftest*
17298   ol_cv_db_db4=no
17299 fi
17300 rm -f conftest*
17301
17302         LIBS="$ol_LIBS"
17303
17304 fi
17305
17306 echo "$ac_t""$ol_cv_db_db4" 1>&6
17307
17308         if test $ol_cv_db_db4 = yes ; then
17309                 ol_cv_lib_db=-ldb4
17310         fi
17311 fi
17312
17313 if test $ol_cv_lib_db = no ; then
17314         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17315 echo "configure:17316: checking for Berkeley DB link (-ldb)" >&5
17316 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17317   echo $ac_n "(cached) $ac_c" 1>&6
17318 else
17319   
17320         ol_DB_LIB=-ldb
17321         ol_LIBS=$LIBS
17322         LIBS="$ol_DB_LIB $LIBS"
17323
17324         cat > conftest.$ac_ext <<EOF
17325 #line 17326 "configure"
17326 #include "confdefs.h"
17327
17328 #ifdef HAVE_DB_185_H
17329 # include <db_185.h>
17330 #else
17331 # include <db.h>
17332 #endif
17333
17334 #ifndef DB_VERSION_MAJOR
17335 # define DB_VERSION_MAJOR 1
17336 #endif
17337
17338 #ifndef NULL
17339 #define NULL ((void*)0)
17340 #endif
17341
17342 int main() {
17343
17344 #if DB_VERSION_MAJOR > 1
17345         {
17346                 char *version;
17347                 int major, minor, patch;
17348
17349                 version = db_version( &major, &minor, &patch );
17350
17351                 if( major != DB_VERSION_MAJOR ||
17352                         minor < DB_VERSION_MINOR )
17353                 {
17354                         printf("Berkeley DB version mismatch\n"
17355                                 "\texpected: %s\n\tgot: %s\n",
17356                                 DB_VERSION_STRING, version);
17357                         return 1;
17358                 }
17359         }
17360 #endif
17361
17362 #if DB_VERSION_MAJOR > 2
17363         db_env_create( NULL, 0 );
17364 #elif DB_VERSION_MAJOR > 1
17365         db_appexit( NULL );
17366 #else
17367         (void) dbopen( NULL, 0, 0, 0, NULL);
17368 #endif
17369
17370 ; return 0; }
17371 EOF
17372 if { (eval echo configure:17373: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17373   rm -rf conftest*
17374   ol_cv_db_db=yes
17375 else
17376   echo "configure: failed program was:" >&5
17377   cat conftest.$ac_ext >&5
17378   rm -rf conftest*
17379   ol_cv_db_db=no
17380 fi
17381 rm -f conftest*
17382
17383         LIBS="$ol_LIBS"
17384
17385 fi
17386
17387 echo "$ac_t""$ol_cv_db_db" 1>&6
17388
17389         if test $ol_cv_db_db = yes ; then
17390                 ol_cv_lib_db=-ldb
17391         fi
17392 fi
17393
17394 if test $ol_cv_lib_db = no ; then
17395         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17396 echo "configure:17397: checking for Berkeley DB link (-ldb3)" >&5
17397 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17398   echo $ac_n "(cached) $ac_c" 1>&6
17399 else
17400   
17401         ol_DB_LIB=-ldb3
17402         ol_LIBS=$LIBS
17403         LIBS="$ol_DB_LIB $LIBS"
17404
17405         cat > conftest.$ac_ext <<EOF
17406 #line 17407 "configure"
17407 #include "confdefs.h"
17408
17409 #ifdef HAVE_DB_185_H
17410 # include <db_185.h>
17411 #else
17412 # include <db.h>
17413 #endif
17414
17415 #ifndef DB_VERSION_MAJOR
17416 # define DB_VERSION_MAJOR 1
17417 #endif
17418
17419 #ifndef NULL
17420 #define NULL ((void*)0)
17421 #endif
17422
17423 int main() {
17424
17425 #if DB_VERSION_MAJOR > 1
17426         {
17427                 char *version;
17428                 int major, minor, patch;
17429
17430                 version = db_version( &major, &minor, &patch );
17431
17432                 if( major != DB_VERSION_MAJOR ||
17433                         minor < DB_VERSION_MINOR )
17434                 {
17435                         printf("Berkeley DB version mismatch\n"
17436                                 "\texpected: %s\n\tgot: %s\n",
17437                                 DB_VERSION_STRING, version);
17438                         return 1;
17439                 }
17440         }
17441 #endif
17442
17443 #if DB_VERSION_MAJOR > 2
17444         db_env_create( NULL, 0 );
17445 #elif DB_VERSION_MAJOR > 1
17446         db_appexit( NULL );
17447 #else
17448         (void) dbopen( NULL, 0, 0, 0, NULL);
17449 #endif
17450
17451 ; return 0; }
17452 EOF
17453 if { (eval echo configure:17454: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17454   rm -rf conftest*
17455   ol_cv_db_db3=yes
17456 else
17457   echo "configure: failed program was:" >&5
17458   cat conftest.$ac_ext >&5
17459   rm -rf conftest*
17460   ol_cv_db_db3=no
17461 fi
17462 rm -f conftest*
17463
17464         LIBS="$ol_LIBS"
17465
17466 fi
17467
17468 echo "$ac_t""$ol_cv_db_db3" 1>&6
17469
17470         if test $ol_cv_db_db3 = yes ; then
17471                 ol_cv_lib_db=-ldb3
17472         fi
17473 fi
17474
17475 if test $ol_cv_lib_db = no ; then
17476         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
17477 echo "configure:17478: checking for Berkeley DB link (-ldb2)" >&5
17478 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
17479   echo $ac_n "(cached) $ac_c" 1>&6
17480 else
17481   
17482         ol_DB_LIB=-ldb2
17483         ol_LIBS=$LIBS
17484         LIBS="$ol_DB_LIB $LIBS"
17485
17486         cat > conftest.$ac_ext <<EOF
17487 #line 17488 "configure"
17488 #include "confdefs.h"
17489
17490 #ifdef HAVE_DB_185_H
17491 # include <db_185.h>
17492 #else
17493 # include <db.h>
17494 #endif
17495
17496 #ifndef DB_VERSION_MAJOR
17497 # define DB_VERSION_MAJOR 1
17498 #endif
17499
17500 #ifndef NULL
17501 #define NULL ((void*)0)
17502 #endif
17503
17504 int main() {
17505
17506 #if DB_VERSION_MAJOR > 1
17507         {
17508                 char *version;
17509                 int major, minor, patch;
17510
17511                 version = db_version( &major, &minor, &patch );
17512
17513                 if( major != DB_VERSION_MAJOR ||
17514                         minor < DB_VERSION_MINOR )
17515                 {
17516                         printf("Berkeley DB version mismatch\n"
17517                                 "\texpected: %s\n\tgot: %s\n",
17518                                 DB_VERSION_STRING, version);
17519                         return 1;
17520                 }
17521         }
17522 #endif
17523
17524 #if DB_VERSION_MAJOR > 2
17525         db_env_create( NULL, 0 );
17526 #elif DB_VERSION_MAJOR > 1
17527         db_appexit( NULL );
17528 #else
17529         (void) dbopen( NULL, 0, 0, 0, NULL);
17530 #endif
17531
17532 ; return 0; }
17533 EOF
17534 if { (eval echo configure:17535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17535   rm -rf conftest*
17536   ol_cv_db_db2=yes
17537 else
17538   echo "configure: failed program was:" >&5
17539   cat conftest.$ac_ext >&5
17540   rm -rf conftest*
17541   ol_cv_db_db2=no
17542 fi
17543 rm -f conftest*
17544
17545         LIBS="$ol_LIBS"
17546
17547 fi
17548
17549 echo "$ac_t""$ol_cv_db_db2" 1>&6
17550
17551         if test $ol_cv_db_db2 = yes ; then
17552                 ol_cv_lib_db=-ldb2
17553         fi
17554 fi
17555
17556 if test $ol_cv_lib_db = no ; then
17557         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
17558 echo "configure:17559: checking for Berkeley DB link (-ldb1)" >&5
17559 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
17560   echo $ac_n "(cached) $ac_c" 1>&6
17561 else
17562   
17563         ol_DB_LIB=-ldb1
17564         ol_LIBS=$LIBS
17565         LIBS="$ol_DB_LIB $LIBS"
17566
17567         cat > conftest.$ac_ext <<EOF
17568 #line 17569 "configure"
17569 #include "confdefs.h"
17570
17571 #ifdef HAVE_DB_185_H
17572 # include <db_185.h>
17573 #else
17574 # include <db.h>
17575 #endif
17576
17577 #ifndef DB_VERSION_MAJOR
17578 # define DB_VERSION_MAJOR 1
17579 #endif
17580
17581 #ifndef NULL
17582 #define NULL ((void*)0)
17583 #endif
17584
17585 int main() {
17586
17587 #if DB_VERSION_MAJOR > 1
17588         {
17589                 char *version;
17590                 int major, minor, patch;
17591
17592                 version = db_version( &major, &minor, &patch );
17593
17594                 if( major != DB_VERSION_MAJOR ||
17595                         minor < DB_VERSION_MINOR )
17596                 {
17597                         printf("Berkeley DB version mismatch\n"
17598                                 "\texpected: %s\n\tgot: %s\n",
17599                                 DB_VERSION_STRING, version);
17600                         return 1;
17601                 }
17602         }
17603 #endif
17604
17605 #if DB_VERSION_MAJOR > 2
17606         db_env_create( NULL, 0 );
17607 #elif DB_VERSION_MAJOR > 1
17608         db_appexit( NULL );
17609 #else
17610         (void) dbopen( NULL, 0, 0, 0, NULL);
17611 #endif
17612
17613 ; return 0; }
17614 EOF
17615 if { (eval echo configure:17616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17616   rm -rf conftest*
17617   ol_cv_db_db1=yes
17618 else
17619   echo "configure: failed program was:" >&5
17620   cat conftest.$ac_ext >&5
17621   rm -rf conftest*
17622   ol_cv_db_db1=no
17623 fi
17624 rm -f conftest*
17625
17626         LIBS="$ol_LIBS"
17627
17628 fi
17629
17630 echo "$ac_t""$ol_cv_db_db1" 1>&6
17631
17632         if test $ol_cv_db_db1 = yes ; then
17633                 ol_cv_lib_db=-ldb1
17634         fi
17635 fi
17636
17637
17638                 if test "$ol_cv_lib_db" != no ; then
17639                         ol_cv_berkeley_db=yes
17640                 fi
17641         fi
17642 fi
17643
17644         else
17645                 ol_cv_berkeley_db=no
17646 for ac_hdr in db.h
17647 do
17648 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
17649 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
17650 echo "configure:17651: checking for $ac_hdr" >&5
17651 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
17652   echo $ac_n "(cached) $ac_c" 1>&6
17653 else
17654   cat > conftest.$ac_ext <<EOF
17655 #line 17656 "configure"
17656 #include "confdefs.h"
17657 #include <$ac_hdr>
17658 EOF
17659 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
17660 { (eval echo configure:17661: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
17661 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
17662 if test -z "$ac_err"; then
17663   rm -rf conftest*
17664   eval "ac_cv_header_$ac_safe=yes"
17665 else
17666   echo "$ac_err" >&5
17667   echo "configure: failed program was:" >&5
17668   cat conftest.$ac_ext >&5
17669   rm -rf conftest*
17670   eval "ac_cv_header_$ac_safe=no"
17671 fi
17672 rm -f conftest*
17673 fi
17674 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
17675   echo "$ac_t""yes" 1>&6
17676     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
17677   cat >> confdefs.h <<EOF
17678 #define $ac_tr_hdr 1
17679 EOF
17680  
17681 else
17682   echo "$ac_t""no" 1>&6
17683 fi
17684 done
17685
17686 if test $ac_cv_header_db_h = yes; then
17687         ol_cv_lib_db=no
17688 if test $ol_cv_lib_db = no ; then
17689         echo $ac_n "checking for Berkeley DB link (default)""... $ac_c" 1>&6
17690 echo "configure:17691: checking for Berkeley DB link (default)" >&5
17691 if eval "test \"\${ol_cv_db_none+set}\" = set"; then
17692   echo $ac_n "(cached) $ac_c" 1>&6
17693 else
17694   
17695         ol_DB_LIB=
17696         ol_LIBS=$LIBS
17697         LIBS="$ol_DB_LIB $LIBS"
17698
17699         cat > conftest.$ac_ext <<EOF
17700 #line 17701 "configure"
17701 #include "confdefs.h"
17702
17703 #ifdef HAVE_DB_185_H
17704 # include <db_185.h>
17705 #else
17706 # include <db.h>
17707 #endif
17708
17709 #ifndef DB_VERSION_MAJOR
17710 # define DB_VERSION_MAJOR 1
17711 #endif
17712
17713 #ifndef NULL
17714 #define NULL ((void*)0)
17715 #endif
17716
17717 int main() {
17718
17719 #if DB_VERSION_MAJOR > 1
17720         {
17721                 char *version;
17722                 int major, minor, patch;
17723
17724                 version = db_version( &major, &minor, &patch );
17725
17726                 if( major != DB_VERSION_MAJOR ||
17727                         minor < DB_VERSION_MINOR )
17728                 {
17729                         printf("Berkeley DB version mismatch\n"
17730                                 "\texpected: %s\n\tgot: %s\n",
17731                                 DB_VERSION_STRING, version);
17732                         return 1;
17733                 }
17734         }
17735 #endif
17736
17737 #if DB_VERSION_MAJOR > 2
17738         db_env_create( NULL, 0 );
17739 #elif DB_VERSION_MAJOR > 1
17740         db_appexit( NULL );
17741 #else
17742         (void) dbopen( NULL, 0, 0, 0, NULL);
17743 #endif
17744
17745 ; return 0; }
17746 EOF
17747 if { (eval echo configure:17748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17748   rm -rf conftest*
17749   ol_cv_db_none=yes
17750 else
17751   echo "configure: failed program was:" >&5
17752   cat conftest.$ac_ext >&5
17753   rm -rf conftest*
17754   ol_cv_db_none=no
17755 fi
17756 rm -f conftest*
17757
17758         LIBS="$ol_LIBS"
17759
17760 fi
17761
17762 echo "$ac_t""$ol_cv_db_none" 1>&6
17763
17764         if test $ol_cv_db_none = yes ; then
17765                 ol_cv_lib_db=yes
17766         fi
17767 fi
17768
17769 if test $ol_cv_lib_db = no ; then
17770         echo $ac_n "checking for Berkeley DB link (-ldb4)""... $ac_c" 1>&6
17771 echo "configure:17772: checking for Berkeley DB link (-ldb4)" >&5
17772 if eval "test \"\${ol_cv_db_db4+set}\" = set"; then
17773   echo $ac_n "(cached) $ac_c" 1>&6
17774 else
17775   
17776         ol_DB_LIB=-ldb4
17777         ol_LIBS=$LIBS
17778         LIBS="$ol_DB_LIB $LIBS"
17779
17780         cat > conftest.$ac_ext <<EOF
17781 #line 17782 "configure"
17782 #include "confdefs.h"
17783
17784 #ifdef HAVE_DB_185_H
17785 # include <db_185.h>
17786 #else
17787 # include <db.h>
17788 #endif
17789
17790 #ifndef DB_VERSION_MAJOR
17791 # define DB_VERSION_MAJOR 1
17792 #endif
17793
17794 #ifndef NULL
17795 #define NULL ((void*)0)
17796 #endif
17797
17798 int main() {
17799
17800 #if DB_VERSION_MAJOR > 1
17801         {
17802                 char *version;
17803                 int major, minor, patch;
17804
17805                 version = db_version( &major, &minor, &patch );
17806
17807                 if( major != DB_VERSION_MAJOR ||
17808                         minor < DB_VERSION_MINOR )
17809                 {
17810                         printf("Berkeley DB version mismatch\n"
17811                                 "\texpected: %s\n\tgot: %s\n",
17812                                 DB_VERSION_STRING, version);
17813                         return 1;
17814                 }
17815         }
17816 #endif
17817
17818 #if DB_VERSION_MAJOR > 2
17819         db_env_create( NULL, 0 );
17820 #elif DB_VERSION_MAJOR > 1
17821         db_appexit( NULL );
17822 #else
17823         (void) dbopen( NULL, 0, 0, 0, NULL);
17824 #endif
17825
17826 ; return 0; }
17827 EOF
17828 if { (eval echo configure:17829: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17829   rm -rf conftest*
17830   ol_cv_db_db4=yes
17831 else
17832   echo "configure: failed program was:" >&5
17833   cat conftest.$ac_ext >&5
17834   rm -rf conftest*
17835   ol_cv_db_db4=no
17836 fi
17837 rm -f conftest*
17838
17839         LIBS="$ol_LIBS"
17840
17841 fi
17842
17843 echo "$ac_t""$ol_cv_db_db4" 1>&6
17844
17845         if test $ol_cv_db_db4 = yes ; then
17846                 ol_cv_lib_db=-ldb4
17847         fi
17848 fi
17849
17850 if test $ol_cv_lib_db = no ; then
17851         echo $ac_n "checking for Berkeley DB link (-ldb)""... $ac_c" 1>&6
17852 echo "configure:17853: checking for Berkeley DB link (-ldb)" >&5
17853 if eval "test \"\${ol_cv_db_db+set}\" = set"; then
17854   echo $ac_n "(cached) $ac_c" 1>&6
17855 else
17856   
17857         ol_DB_LIB=-ldb
17858         ol_LIBS=$LIBS
17859         LIBS="$ol_DB_LIB $LIBS"
17860
17861         cat > conftest.$ac_ext <<EOF
17862 #line 17863 "configure"
17863 #include "confdefs.h"
17864
17865 #ifdef HAVE_DB_185_H
17866 # include <db_185.h>
17867 #else
17868 # include <db.h>
17869 #endif
17870
17871 #ifndef DB_VERSION_MAJOR
17872 # define DB_VERSION_MAJOR 1
17873 #endif
17874
17875 #ifndef NULL
17876 #define NULL ((void*)0)
17877 #endif
17878
17879 int main() {
17880
17881 #if DB_VERSION_MAJOR > 1
17882         {
17883                 char *version;
17884                 int major, minor, patch;
17885
17886                 version = db_version( &major, &minor, &patch );
17887
17888                 if( major != DB_VERSION_MAJOR ||
17889                         minor < DB_VERSION_MINOR )
17890                 {
17891                         printf("Berkeley DB version mismatch\n"
17892                                 "\texpected: %s\n\tgot: %s\n",
17893                                 DB_VERSION_STRING, version);
17894                         return 1;
17895                 }
17896         }
17897 #endif
17898
17899 #if DB_VERSION_MAJOR > 2
17900         db_env_create( NULL, 0 );
17901 #elif DB_VERSION_MAJOR > 1
17902         db_appexit( NULL );
17903 #else
17904         (void) dbopen( NULL, 0, 0, 0, NULL);
17905 #endif
17906
17907 ; return 0; }
17908 EOF
17909 if { (eval echo configure:17910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17910   rm -rf conftest*
17911   ol_cv_db_db=yes
17912 else
17913   echo "configure: failed program was:" >&5
17914   cat conftest.$ac_ext >&5
17915   rm -rf conftest*
17916   ol_cv_db_db=no
17917 fi
17918 rm -f conftest*
17919
17920         LIBS="$ol_LIBS"
17921
17922 fi
17923
17924 echo "$ac_t""$ol_cv_db_db" 1>&6
17925
17926         if test $ol_cv_db_db = yes ; then
17927                 ol_cv_lib_db=-ldb
17928         fi
17929 fi
17930
17931 if test $ol_cv_lib_db = no ; then
17932         echo $ac_n "checking for Berkeley DB link (-ldb3)""... $ac_c" 1>&6
17933 echo "configure:17934: checking for Berkeley DB link (-ldb3)" >&5
17934 if eval "test \"\${ol_cv_db_db3+set}\" = set"; then
17935   echo $ac_n "(cached) $ac_c" 1>&6
17936 else
17937   
17938         ol_DB_LIB=-ldb3
17939         ol_LIBS=$LIBS
17940         LIBS="$ol_DB_LIB $LIBS"
17941
17942         cat > conftest.$ac_ext <<EOF
17943 #line 17944 "configure"
17944 #include "confdefs.h"
17945
17946 #ifdef HAVE_DB_185_H
17947 # include <db_185.h>
17948 #else
17949 # include <db.h>
17950 #endif
17951
17952 #ifndef DB_VERSION_MAJOR
17953 # define DB_VERSION_MAJOR 1
17954 #endif
17955
17956 #ifndef NULL
17957 #define NULL ((void*)0)
17958 #endif
17959
17960 int main() {
17961
17962 #if DB_VERSION_MAJOR > 1
17963         {
17964                 char *version;
17965                 int major, minor, patch;
17966
17967                 version = db_version( &major, &minor, &patch );
17968
17969                 if( major != DB_VERSION_MAJOR ||
17970                         minor < DB_VERSION_MINOR )
17971                 {
17972                         printf("Berkeley DB version mismatch\n"
17973                                 "\texpected: %s\n\tgot: %s\n",
17974                                 DB_VERSION_STRING, version);
17975                         return 1;
17976                 }
17977         }
17978 #endif
17979
17980 #if DB_VERSION_MAJOR > 2
17981         db_env_create( NULL, 0 );
17982 #elif DB_VERSION_MAJOR > 1
17983         db_appexit( NULL );
17984 #else
17985         (void) dbopen( NULL, 0, 0, 0, NULL);
17986 #endif
17987
17988 ; return 0; }
17989 EOF
17990 if { (eval echo configure:17991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
17991   rm -rf conftest*
17992   ol_cv_db_db3=yes
17993 else
17994   echo "configure: failed program was:" >&5
17995   cat conftest.$ac_ext >&5
17996   rm -rf conftest*
17997   ol_cv_db_db3=no
17998 fi
17999 rm -f conftest*
18000
18001         LIBS="$ol_LIBS"
18002
18003 fi
18004
18005 echo "$ac_t""$ol_cv_db_db3" 1>&6
18006
18007         if test $ol_cv_db_db3 = yes ; then
18008                 ol_cv_lib_db=-ldb3
18009         fi
18010 fi
18011
18012 if test $ol_cv_lib_db = no ; then
18013         echo $ac_n "checking for Berkeley DB link (-ldb2)""... $ac_c" 1>&6
18014 echo "configure:18015: checking for Berkeley DB link (-ldb2)" >&5
18015 if eval "test \"\${ol_cv_db_db2+set}\" = set"; then
18016   echo $ac_n "(cached) $ac_c" 1>&6
18017 else
18018   
18019         ol_DB_LIB=-ldb2
18020         ol_LIBS=$LIBS
18021         LIBS="$ol_DB_LIB $LIBS"
18022
18023         cat > conftest.$ac_ext <<EOF
18024 #line 18025 "configure"
18025 #include "confdefs.h"
18026
18027 #ifdef HAVE_DB_185_H
18028 # include <db_185.h>
18029 #else
18030 # include <db.h>
18031 #endif
18032
18033 #ifndef DB_VERSION_MAJOR
18034 # define DB_VERSION_MAJOR 1
18035 #endif
18036
18037 #ifndef NULL
18038 #define NULL ((void*)0)
18039 #endif
18040
18041 int main() {
18042
18043 #if DB_VERSION_MAJOR > 1
18044         {
18045                 char *version;
18046                 int major, minor, patch;
18047
18048                 version = db_version( &major, &minor, &patch );
18049
18050                 if( major != DB_VERSION_MAJOR ||
18051                         minor < DB_VERSION_MINOR )
18052                 {
18053                         printf("Berkeley DB version mismatch\n"
18054                                 "\texpected: %s\n\tgot: %s\n",
18055                                 DB_VERSION_STRING, version);
18056                         return 1;
18057                 }
18058         }
18059 #endif
18060
18061 #if DB_VERSION_MAJOR > 2
18062         db_env_create( NULL, 0 );
18063 #elif DB_VERSION_MAJOR > 1
18064         db_appexit( NULL );
18065 #else
18066         (void) dbopen( NULL, 0, 0, 0, NULL);
18067 #endif
18068
18069 ; return 0; }
18070 EOF
18071 if { (eval echo configure:18072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18072   rm -rf conftest*
18073   ol_cv_db_db2=yes
18074 else
18075   echo "configure: failed program was:" >&5
18076   cat conftest.$ac_ext >&5
18077   rm -rf conftest*
18078   ol_cv_db_db2=no
18079 fi
18080 rm -f conftest*
18081
18082         LIBS="$ol_LIBS"
18083
18084 fi
18085
18086 echo "$ac_t""$ol_cv_db_db2" 1>&6
18087
18088         if test $ol_cv_db_db2 = yes ; then
18089                 ol_cv_lib_db=-ldb2
18090         fi
18091 fi
18092
18093 if test $ol_cv_lib_db = no ; then
18094         echo $ac_n "checking for Berkeley DB link (-ldb1)""... $ac_c" 1>&6
18095 echo "configure:18096: checking for Berkeley DB link (-ldb1)" >&5
18096 if eval "test \"\${ol_cv_db_db1+set}\" = set"; then
18097   echo $ac_n "(cached) $ac_c" 1>&6
18098 else
18099   
18100         ol_DB_LIB=-ldb1
18101         ol_LIBS=$LIBS
18102         LIBS="$ol_DB_LIB $LIBS"
18103
18104         cat > conftest.$ac_ext <<EOF
18105 #line 18106 "configure"
18106 #include "confdefs.h"
18107
18108 #ifdef HAVE_DB_185_H
18109 # include <db_185.h>
18110 #else
18111 # include <db.h>
18112 #endif
18113
18114 #ifndef DB_VERSION_MAJOR
18115 # define DB_VERSION_MAJOR 1
18116 #endif
18117
18118 #ifndef NULL
18119 #define NULL ((void*)0)
18120 #endif
18121
18122 int main() {
18123
18124 #if DB_VERSION_MAJOR > 1
18125         {
18126                 char *version;
18127                 int major, minor, patch;
18128
18129                 version = db_version( &major, &minor, &patch );
18130
18131                 if( major != DB_VERSION_MAJOR ||
18132                         minor < DB_VERSION_MINOR )
18133                 {
18134                         printf("Berkeley DB version mismatch\n"
18135                                 "\texpected: %s\n\tgot: %s\n",
18136                                 DB_VERSION_STRING, version);
18137                         return 1;
18138                 }
18139         }
18140 #endif
18141
18142 #if DB_VERSION_MAJOR > 2
18143         db_env_create( NULL, 0 );
18144 #elif DB_VERSION_MAJOR > 1
18145         db_appexit( NULL );
18146 #else
18147         (void) dbopen( NULL, 0, 0, 0, NULL);
18148 #endif
18149
18150 ; return 0; }
18151 EOF
18152 if { (eval echo configure:18153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18153   rm -rf conftest*
18154   ol_cv_db_db1=yes
18155 else
18156   echo "configure: failed program was:" >&5
18157   cat conftest.$ac_ext >&5
18158   rm -rf conftest*
18159   ol_cv_db_db1=no
18160 fi
18161 rm -f conftest*
18162
18163         LIBS="$ol_LIBS"
18164
18165 fi
18166
18167 echo "$ac_t""$ol_cv_db_db1" 1>&6
18168
18169         if test $ol_cv_db_db1 = yes ; then
18170                 ol_cv_lib_db=-ldb1
18171         fi
18172 fi
18173
18174
18175         if test "$ol_cv_lib_db" != no ; then
18176                 ol_cv_berkeley_db=yes
18177                 echo $ac_n "checking for Berkeley DB thread support""... $ac_c" 1>&6
18178 echo "configure:18179: checking for Berkeley DB thread support" >&5
18179 if eval "test \"\${ol_cv_berkeley_db_thread+set}\" = set"; then
18180   echo $ac_n "(cached) $ac_c" 1>&6
18181 else
18182   
18183         ol_LIBS="$LIBS"
18184         if test $ol_cv_lib_db != yes ; then
18185                 LIBS="$ol_cv_lib_db"
18186         fi
18187
18188         if test "$cross_compiling" = yes; then
18189   ol_cv_berkeley_db_thread=cross
18190 else
18191   cat > conftest.$ac_ext <<EOF
18192 #line 18193 "configure"
18193 #include "confdefs.h"
18194
18195 #ifdef HAVE_DB_185_H
18196         choke me;
18197 #else
18198 #include <db.h>
18199 #endif
18200 #ifndef NULL
18201 #define NULL ((void *)0)
18202 #endif
18203 main()
18204 {
18205         int rc;
18206         u_int32_t flags = DB_CREATE |
18207 #ifdef DB_PRIVATE
18208                 DB_PRIVATE |
18209 #endif
18210                 DB_THREAD;
18211
18212 #if DB_VERSION_MAJOR > 2
18213         DB_ENV *env = NULL;
18214
18215         rc = db_env_create( &env, 0 );
18216
18217         flags |= DB_INIT_MPOOL;
18218 #ifdef DB_MPOOL_PRIVATE
18219         flags |= DB_MPOOL_PRIVATE;
18220 #endif
18221
18222         if( rc ) {
18223                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18224                 return rc;
18225         }
18226
18227 #if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
18228         rc = env->open( env, NULL, flags, 0 );
18229 #else
18230         rc = env->open( env, NULL, NULL, flags, 0 );
18231 #endif
18232
18233         if ( rc == 0 ) {
18234                 rc = env->close( env, 0 );
18235         }
18236
18237         if( rc ) {
18238                 printf("BerkeleyDB: %s\n", db_strerror(rc) );
18239                 return rc;
18240         }
18241
18242 #else
18243         DB_ENV env;
18244         memset( &env, '\0', sizeof(env) );
18245
18246         rc = db_appinit( NULL, NULL, &env, flags );
18247
18248         if( rc == 0 ) {
18249                 db_appexit( &env );
18250         }
18251
18252         unlink("__db_mpool.share");
18253         unlink("__db_lock.share");
18254 #endif
18255
18256         return rc;
18257 }
18258 EOF
18259 if { (eval echo configure:18260: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
18260 then
18261   ol_cv_berkeley_db_thread=yes
18262 else
18263   echo "configure: failed program was:" >&5
18264   cat conftest.$ac_ext >&5
18265   rm -fr conftest*
18266   ol_cv_berkeley_db_thread=no
18267 fi
18268 rm -fr conftest*
18269 fi
18270
18271
18272         LIBS="$ol_LIBS"
18273
18274         if test $ol_cv_berkeley_db_thread != no ; then
18275                 cat >> confdefs.h <<\EOF
18276 #define HAVE_BERKELEY_DB_THREAD 1
18277 EOF
18278
18279         fi
18280
18281 fi
18282
18283 echo "$ac_t""$ol_cv_berkeley_db_thread" 1>&6
18284         fi
18285 fi
18286
18287         fi
18288
18289         if test $ol_cv_berkeley_db != no ; then
18290                 cat >> confdefs.h <<\EOF
18291 #define HAVE_BERKELEY_DB 1
18292 EOF
18293
18294
18295                 ol_link_ldbm=berkeley
18296                 ol_with_ldbm_api=berkeley
18297
18298                 if test $ol_with_ldbm_type = hash ; then
18299                         cat >> confdefs.h <<\EOF
18300 #define LDBM_USE_DBHASH 1
18301 EOF
18302
18303                 else
18304                         cat >> confdefs.h <<\EOF
18305 #define LDBM_USE_DBBTREE 1
18306 EOF
18307
18308                 fi
18309
18310                                                 if test $ol_cv_lib_db != yes ; then
18311                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_db"
18312                 fi
18313         fi
18314 fi
18315
18316 if test $ol_enable_bdb = yes -a $ol_link_ldbm != berkeley ; then
18317         { echo "configure: error: BDB: BerkeleyDB not available" 1>&2; exit 1; }
18318 elif test $ol_enable_bdb != no -a $ol_link_ldbm = berkeley ; then
18319         echo $ac_n "checking Berkeley DB version for BDB backend""... $ac_c" 1>&6
18320 echo "configure:18321: checking Berkeley DB version for BDB backend" >&5
18321 if eval "test \"\${ol_cv_bdb_compat+set}\" = set"; then
18322   echo $ac_n "(cached) $ac_c" 1>&6
18323 else
18324   
18325         cat > conftest.$ac_ext <<EOF
18326 #line 18327 "configure"
18327 #include "confdefs.h"
18328
18329 #include <db.h>
18330
18331  /* this check could be improved */
18332 #ifndef DB_VERSION_MAJOR
18333 #       define DB_VERSION_MAJOR 1
18334 #endif
18335
18336 /* require 4.0 or later */
18337 #if DB_VERSION_MAJOR >= 4 
18338         __db_version_compat
18339 #endif
18340         
18341 EOF
18342 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18343   egrep "__db_version_compat" >/dev/null 2>&1; then
18344   rm -rf conftest*
18345   ol_cv_bdb_compat=yes
18346 else
18347   rm -rf conftest*
18348   ol_cv_bdb_compat=no
18349 fi
18350 rm -f conftest*
18351
18352 fi
18353
18354 echo "$ac_t""$ol_cv_bdb_compat" 1>&6
18355
18356
18357         if test $ol_cv_bdb_compat = yes ; then
18358                 ol_enable_bdb=yes
18359         elif test $ol_enable_bdb = yes ; then
18360                 { echo "configure: error: BDB: BerkeleyDB version incompatible" 1>&2; exit 1; }
18361         else
18362                 ol_enable_bdb=no
18363         fi
18364 fi
18365
18366 if test $ol_link_ldbm = no -a $ol_with_ldbm_type = btree ; then
18367         echo "configure: warning: Could not find LDBM with BTREE support" 1>&2
18368         ol_with_ldbm_api=none
18369 fi
18370
18371 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = mdbm ; then
18372         echo $ac_n "checking for MDBM library""... $ac_c" 1>&6
18373 echo "configure:18374: checking for MDBM library" >&5
18374 if eval "test \"\${ol_cv_lib_mdbm+set}\" = set"; then
18375   echo $ac_n "(cached) $ac_c" 1>&6
18376 else
18377         ol_LIBS="$LIBS"
18378         echo $ac_n "checking for mdbm_set_chain""... $ac_c" 1>&6
18379 echo "configure:18380: checking for mdbm_set_chain" >&5
18380 if eval "test \"\${ac_cv_func_mdbm_set_chain+set}\" = set"; then
18381   echo $ac_n "(cached) $ac_c" 1>&6
18382 else
18383   cat > conftest.$ac_ext <<EOF
18384 #line 18385 "configure"
18385 #include "confdefs.h"
18386 /* System header to define __stub macros and hopefully few prototypes,
18387     which can conflict with char mdbm_set_chain(); below.  */
18388 #include <assert.h>
18389 /* Override any gcc2 internal prototype to avoid an error.  */
18390 /* We use char because int might match the return type of a gcc2
18391     builtin and then its argument prototype would still apply.  */
18392 char mdbm_set_chain();
18393 char (*f)();
18394
18395 int main() {
18396
18397 /* The GNU C library defines this for functions which it implements
18398     to always fail with ENOSYS.  Some functions are actually named
18399     something starting with __ and the normal name is an alias.  */
18400 #if defined (__stub_mdbm_set_chain) || defined (__stub___mdbm_set_chain)
18401 choke me
18402 #else
18403 f = mdbm_set_chain;
18404 #endif
18405
18406 ; return 0; }
18407 EOF
18408 if { (eval echo configure:18409: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18409   rm -rf conftest*
18410   eval "ac_cv_func_mdbm_set_chain=yes"
18411 else
18412   echo "configure: failed program was:" >&5
18413   cat conftest.$ac_ext >&5
18414   rm -rf conftest*
18415   eval "ac_cv_func_mdbm_set_chain=no"
18416 fi
18417 rm -f conftest*
18418 fi
18419
18420 if eval "test \"`echo '$ac_cv_func_'mdbm_set_chain`\" = yes"; then
18421   echo "$ac_t""yes" 1>&6
18422   ol_cv_lib_mdbm=yes
18423 else
18424   echo "$ac_t""no" 1>&6
18425
18426                 echo $ac_n "checking for mdbm_set_chain in -lmdbm""... $ac_c" 1>&6
18427 echo "configure:18428: checking for mdbm_set_chain in -lmdbm" >&5
18428 ac_lib_var=`echo mdbm'_'mdbm_set_chain | sed 'y%./+-:%__p__%'`
18429 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18430   echo $ac_n "(cached) $ac_c" 1>&6
18431 else
18432   ac_save_LIBS="$LIBS"
18433 LIBS="-lmdbm  $LIBS"
18434 cat > conftest.$ac_ext <<EOF
18435 #line 18436 "configure"
18436 #include "confdefs.h"
18437 /* Override any gcc2 internal prototype to avoid an error.  */
18438 /* We use char because int might match the return type of a gcc2
18439     builtin and then its argument prototype would still apply.  */
18440 char mdbm_set_chain();
18441
18442 int main() {
18443 mdbm_set_chain()
18444 ; return 0; }
18445 EOF
18446 if { (eval echo configure:18447: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18447   rm -rf conftest*
18448   eval "ac_cv_lib_$ac_lib_var=yes"
18449 else
18450   echo "configure: failed program was:" >&5
18451   cat conftest.$ac_ext >&5
18452   rm -rf conftest*
18453   eval "ac_cv_lib_$ac_lib_var=no"
18454 fi
18455 rm -f conftest*
18456 LIBS="$ac_save_LIBS"
18457
18458 fi
18459 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18460   echo "$ac_t""yes" 1>&6
18461   ol_cv_lib_mdbm=-lmdbm
18462 else
18463   echo "$ac_t""no" 1>&6
18464 ol_cv_lib_mdbm=no
18465 fi
18466
18467         
18468 fi
18469
18470         LIBS="$ol_LIBS"
18471
18472 fi
18473
18474 echo "$ac_t""$ol_cv_lib_mdbm" 1>&6
18475
18476
18477  for ac_hdr in mdbm.h
18478 do
18479 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18480 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18481 echo "configure:18482: checking for $ac_hdr" >&5
18482 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18483   echo $ac_n "(cached) $ac_c" 1>&6
18484 else
18485   cat > conftest.$ac_ext <<EOF
18486 #line 18487 "configure"
18487 #include "confdefs.h"
18488 #include <$ac_hdr>
18489 EOF
18490 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18491 { (eval echo configure:18492: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18492 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18493 if test -z "$ac_err"; then
18494   rm -rf conftest*
18495   eval "ac_cv_header_$ac_safe=yes"
18496 else
18497   echo "$ac_err" >&5
18498   echo "configure: failed program was:" >&5
18499   cat conftest.$ac_ext >&5
18500   rm -rf conftest*
18501   eval "ac_cv_header_$ac_safe=no"
18502 fi
18503 rm -f conftest*
18504 fi
18505 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18506   echo "$ac_t""yes" 1>&6
18507     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18508   cat >> confdefs.h <<EOF
18509 #define $ac_tr_hdr 1
18510 EOF
18511  
18512 else
18513   echo "$ac_t""no" 1>&6
18514 fi
18515 done
18516
18517  echo $ac_n "checking for db""... $ac_c" 1>&6
18518 echo "configure:18519: checking for db" >&5
18519 if eval "test \"\${ol_cv_mdbm+set}\" = set"; then
18520   echo $ac_n "(cached) $ac_c" 1>&6
18521 else
18522   
18523         if test $ol_cv_lib_mdbm = no -o $ac_cv_header_mdbm_h = no ; then
18524                 ol_cv_mdbm=no
18525         else
18526                 ol_cv_mdbm=yes
18527         fi
18528
18529 fi
18530
18531 echo "$ac_t""$ol_cv_mdbm" 1>&6
18532  if test $ol_cv_mdbm = yes ; then
18533         cat >> confdefs.h <<\EOF
18534 #define HAVE_MDBM 1
18535 EOF
18536
18537  fi
18538
18539
18540         if test $ol_cv_mdbm = yes ; then
18541                 ol_link_ldbm=mdbm
18542                 ol_with_ldbm_api=mdbm
18543                 if test $ol_cv_lib_mdbm != yes ; then
18544                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_mdbm"
18545                 fi
18546         fi
18547 fi
18548
18549 if test $ol_with_ldbm_api = auto -o $ol_with_ldbm_api = gdbm ; then
18550         echo $ac_n "checking for GDBM library""... $ac_c" 1>&6
18551 echo "configure:18552: checking for GDBM library" >&5
18552 if eval "test \"\${ol_cv_lib_gdbm+set}\" = set"; then
18553   echo $ac_n "(cached) $ac_c" 1>&6
18554 else
18555         ol_LIBS="$LIBS"
18556         echo $ac_n "checking for gdbm_open""... $ac_c" 1>&6
18557 echo "configure:18558: checking for gdbm_open" >&5
18558 if eval "test \"\${ac_cv_func_gdbm_open+set}\" = set"; then
18559   echo $ac_n "(cached) $ac_c" 1>&6
18560 else
18561   cat > conftest.$ac_ext <<EOF
18562 #line 18563 "configure"
18563 #include "confdefs.h"
18564 /* System header to define __stub macros and hopefully few prototypes,
18565     which can conflict with char gdbm_open(); below.  */
18566 #include <assert.h>
18567 /* Override any gcc2 internal prototype to avoid an error.  */
18568 /* We use char because int might match the return type of a gcc2
18569     builtin and then its argument prototype would still apply.  */
18570 char gdbm_open();
18571 char (*f)();
18572
18573 int main() {
18574
18575 /* The GNU C library defines this for functions which it implements
18576     to always fail with ENOSYS.  Some functions are actually named
18577     something starting with __ and the normal name is an alias.  */
18578 #if defined (__stub_gdbm_open) || defined (__stub___gdbm_open)
18579 choke me
18580 #else
18581 f = gdbm_open;
18582 #endif
18583
18584 ; return 0; }
18585 EOF
18586 if { (eval echo configure:18587: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18587   rm -rf conftest*
18588   eval "ac_cv_func_gdbm_open=yes"
18589 else
18590   echo "configure: failed program was:" >&5
18591   cat conftest.$ac_ext >&5
18592   rm -rf conftest*
18593   eval "ac_cv_func_gdbm_open=no"
18594 fi
18595 rm -f conftest*
18596 fi
18597
18598 if eval "test \"`echo '$ac_cv_func_'gdbm_open`\" = yes"; then
18599   echo "$ac_t""yes" 1>&6
18600   ol_cv_lib_gdbm=yes
18601 else
18602   echo "$ac_t""no" 1>&6
18603
18604                 echo $ac_n "checking for gdbm_open in -lgdbm""... $ac_c" 1>&6
18605 echo "configure:18606: checking for gdbm_open in -lgdbm" >&5
18606 ac_lib_var=`echo gdbm'_'gdbm_open | sed 'y%./+-:%__p__%'`
18607 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18608   echo $ac_n "(cached) $ac_c" 1>&6
18609 else
18610   ac_save_LIBS="$LIBS"
18611 LIBS="-lgdbm  $LIBS"
18612 cat > conftest.$ac_ext <<EOF
18613 #line 18614 "configure"
18614 #include "confdefs.h"
18615 /* Override any gcc2 internal prototype to avoid an error.  */
18616 /* We use char because int might match the return type of a gcc2
18617     builtin and then its argument prototype would still apply.  */
18618 char gdbm_open();
18619
18620 int main() {
18621 gdbm_open()
18622 ; return 0; }
18623 EOF
18624 if { (eval echo configure:18625: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18625   rm -rf conftest*
18626   eval "ac_cv_lib_$ac_lib_var=yes"
18627 else
18628   echo "configure: failed program was:" >&5
18629   cat conftest.$ac_ext >&5
18630   rm -rf conftest*
18631   eval "ac_cv_lib_$ac_lib_var=no"
18632 fi
18633 rm -f conftest*
18634 LIBS="$ac_save_LIBS"
18635
18636 fi
18637 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18638   echo "$ac_t""yes" 1>&6
18639   ol_cv_lib_gdbm=-lgdbm
18640 else
18641   echo "$ac_t""no" 1>&6
18642 ol_cv_lib_gdbm=no
18643 fi
18644
18645         
18646 fi
18647
18648         LIBS="$ol_LIBS"
18649
18650 fi
18651
18652 echo "$ac_t""$ol_cv_lib_gdbm" 1>&6
18653
18654
18655  for ac_hdr in gdbm.h
18656 do
18657 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18658 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18659 echo "configure:18660: checking for $ac_hdr" >&5
18660 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18661   echo $ac_n "(cached) $ac_c" 1>&6
18662 else
18663   cat > conftest.$ac_ext <<EOF
18664 #line 18665 "configure"
18665 #include "confdefs.h"
18666 #include <$ac_hdr>
18667 EOF
18668 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18669 { (eval echo configure:18670: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18670 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18671 if test -z "$ac_err"; then
18672   rm -rf conftest*
18673   eval "ac_cv_header_$ac_safe=yes"
18674 else
18675   echo "$ac_err" >&5
18676   echo "configure: failed program was:" >&5
18677   cat conftest.$ac_ext >&5
18678   rm -rf conftest*
18679   eval "ac_cv_header_$ac_safe=no"
18680 fi
18681 rm -f conftest*
18682 fi
18683 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18684   echo "$ac_t""yes" 1>&6
18685     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18686   cat >> confdefs.h <<EOF
18687 #define $ac_tr_hdr 1
18688 EOF
18689  
18690 else
18691   echo "$ac_t""no" 1>&6
18692 fi
18693 done
18694
18695  echo $ac_n "checking for db""... $ac_c" 1>&6
18696 echo "configure:18697: checking for db" >&5
18697 if eval "test \"\${ol_cv_gdbm+set}\" = set"; then
18698   echo $ac_n "(cached) $ac_c" 1>&6
18699 else
18700   
18701         if test $ol_cv_lib_gdbm = no -o $ac_cv_header_gdbm_h = no ; then
18702                 ol_cv_gdbm=no
18703         else
18704                 ol_cv_gdbm=yes
18705         fi
18706
18707 fi
18708
18709 echo "$ac_t""$ol_cv_gdbm" 1>&6
18710  if test $ol_cv_gdbm = yes ; then
18711         cat >> confdefs.h <<\EOF
18712 #define HAVE_GDBM 1
18713 EOF
18714
18715  fi
18716
18717
18718         if test $ol_cv_gdbm = yes ; then
18719                 ol_link_ldbm=gdbm
18720                 ol_with_ldbm_api=gdbm
18721
18722                 if test $ol_cv_lib_gdbm != yes ; then
18723                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_gdbm"
18724                 fi
18725         fi
18726 fi
18727
18728 if test $ol_with_ldbm_api = ndbm ; then
18729         echo $ac_n "checking for NDBM library""... $ac_c" 1>&6
18730 echo "configure:18731: checking for NDBM library" >&5
18731 if eval "test \"\${ol_cv_lib_ndbm+set}\" = set"; then
18732   echo $ac_n "(cached) $ac_c" 1>&6
18733 else
18734         ol_LIBS="$LIBS"
18735         echo $ac_n "checking for dbm_open""... $ac_c" 1>&6
18736 echo "configure:18737: checking for dbm_open" >&5
18737 if eval "test \"\${ac_cv_func_dbm_open+set}\" = set"; then
18738   echo $ac_n "(cached) $ac_c" 1>&6
18739 else
18740   cat > conftest.$ac_ext <<EOF
18741 #line 18742 "configure"
18742 #include "confdefs.h"
18743 /* System header to define __stub macros and hopefully few prototypes,
18744     which can conflict with char dbm_open(); below.  */
18745 #include <assert.h>
18746 /* Override any gcc2 internal prototype to avoid an error.  */
18747 /* We use char because int might match the return type of a gcc2
18748     builtin and then its argument prototype would still apply.  */
18749 char dbm_open();
18750 char (*f)();
18751
18752 int main() {
18753
18754 /* The GNU C library defines this for functions which it implements
18755     to always fail with ENOSYS.  Some functions are actually named
18756     something starting with __ and the normal name is an alias.  */
18757 #if defined (__stub_dbm_open) || defined (__stub___dbm_open)
18758 choke me
18759 #else
18760 f = dbm_open;
18761 #endif
18762
18763 ; return 0; }
18764 EOF
18765 if { (eval echo configure:18766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18766   rm -rf conftest*
18767   eval "ac_cv_func_dbm_open=yes"
18768 else
18769   echo "configure: failed program was:" >&5
18770   cat conftest.$ac_ext >&5
18771   rm -rf conftest*
18772   eval "ac_cv_func_dbm_open=no"
18773 fi
18774 rm -f conftest*
18775 fi
18776
18777 if eval "test \"`echo '$ac_cv_func_'dbm_open`\" = yes"; then
18778   echo "$ac_t""yes" 1>&6
18779   ol_cv_lib_ndbm=yes
18780 else
18781   echo "$ac_t""no" 1>&6
18782
18783                 echo $ac_n "checking for dbm_open in -lndbm""... $ac_c" 1>&6
18784 echo "configure:18785: checking for dbm_open in -lndbm" >&5
18785 ac_lib_var=`echo ndbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18786 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18787   echo $ac_n "(cached) $ac_c" 1>&6
18788 else
18789   ac_save_LIBS="$LIBS"
18790 LIBS="-lndbm  $LIBS"
18791 cat > conftest.$ac_ext <<EOF
18792 #line 18793 "configure"
18793 #include "confdefs.h"
18794 /* Override any gcc2 internal prototype to avoid an error.  */
18795 /* We use char because int might match the return type of a gcc2
18796     builtin and then its argument prototype would still apply.  */
18797 char dbm_open();
18798
18799 int main() {
18800 dbm_open()
18801 ; return 0; }
18802 EOF
18803 if { (eval echo configure:18804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18804   rm -rf conftest*
18805   eval "ac_cv_lib_$ac_lib_var=yes"
18806 else
18807   echo "configure: failed program was:" >&5
18808   cat conftest.$ac_ext >&5
18809   rm -rf conftest*
18810   eval "ac_cv_lib_$ac_lib_var=no"
18811 fi
18812 rm -f conftest*
18813 LIBS="$ac_save_LIBS"
18814
18815 fi
18816 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18817   echo "$ac_t""yes" 1>&6
18818   ol_cv_lib_ndbm=-lndbm
18819 else
18820   echo "$ac_t""no" 1>&6
18821
18822                         echo $ac_n "checking for dbm_open in -ldbm""... $ac_c" 1>&6
18823 echo "configure:18824: checking for dbm_open in -ldbm" >&5
18824 ac_lib_var=`echo dbm'_'dbm_open | sed 'y%./+-:%__p__%'`
18825 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
18826   echo $ac_n "(cached) $ac_c" 1>&6
18827 else
18828   ac_save_LIBS="$LIBS"
18829 LIBS="-ldbm  $LIBS"
18830 cat > conftest.$ac_ext <<EOF
18831 #line 18832 "configure"
18832 #include "confdefs.h"
18833 /* Override any gcc2 internal prototype to avoid an error.  */
18834 /* We use char because int might match the return type of a gcc2
18835     builtin and then its argument prototype would still apply.  */
18836 char dbm_open();
18837
18838 int main() {
18839 dbm_open()
18840 ; return 0; }
18841 EOF
18842 if { (eval echo configure:18843: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
18843   rm -rf conftest*
18844   eval "ac_cv_lib_$ac_lib_var=yes"
18845 else
18846   echo "configure: failed program was:" >&5
18847   cat conftest.$ac_ext >&5
18848   rm -rf conftest*
18849   eval "ac_cv_lib_$ac_lib_var=no"
18850 fi
18851 rm -f conftest*
18852 LIBS="$ac_save_LIBS"
18853
18854 fi
18855 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
18856   echo "$ac_t""yes" 1>&6
18857   ol_cv_lib_ndbm=-ldbm
18858 else
18859   echo "$ac_t""no" 1>&6
18860 ol_cv_lib_ndbm=no
18861 fi
18862                 
18863 fi
18864
18865         
18866 fi
18867
18868         LIBS="$ol_LIBS"
18869
18870 fi
18871
18872 echo "$ac_t""$ol_cv_lib_ndbm" 1>&6
18873
18874
18875  for ac_hdr in ndbm.h
18876 do
18877 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18878 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18879 echo "configure:18880: checking for $ac_hdr" >&5
18880 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18881   echo $ac_n "(cached) $ac_c" 1>&6
18882 else
18883   cat > conftest.$ac_ext <<EOF
18884 #line 18885 "configure"
18885 #include "confdefs.h"
18886 #include <$ac_hdr>
18887 EOF
18888 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18889 { (eval echo configure:18890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18890 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18891 if test -z "$ac_err"; then
18892   rm -rf conftest*
18893   eval "ac_cv_header_$ac_safe=yes"
18894 else
18895   echo "$ac_err" >&5
18896   echo "configure: failed program was:" >&5
18897   cat conftest.$ac_ext >&5
18898   rm -rf conftest*
18899   eval "ac_cv_header_$ac_safe=no"
18900 fi
18901 rm -f conftest*
18902 fi
18903 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18904   echo "$ac_t""yes" 1>&6
18905     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
18906   cat >> confdefs.h <<EOF
18907 #define $ac_tr_hdr 1
18908 EOF
18909  
18910 else
18911   echo "$ac_t""no" 1>&6
18912 fi
18913 done
18914
18915  echo $ac_n "checking for db""... $ac_c" 1>&6
18916 echo "configure:18917: checking for db" >&5
18917 if eval "test \"\${ol_cv_ndbm+set}\" = set"; then
18918   echo $ac_n "(cached) $ac_c" 1>&6
18919 else
18920   
18921         if test $ol_cv_lib_ndbm = no -o $ac_cv_header_ndbm_h = no ; then
18922                 ol_cv_ndbm=no
18923         else
18924                 ol_cv_ndbm=yes
18925         fi
18926
18927 fi
18928
18929 echo "$ac_t""$ol_cv_ndbm" 1>&6
18930  if test $ol_cv_ndbm = yes ; then
18931         cat >> confdefs.h <<\EOF
18932 #define HAVE_NDBM 1
18933 EOF
18934
18935  fi
18936
18937
18938         if test $ol_cv_ndbm = yes ; then
18939                 ol_link_ldbm=ndbm
18940                 ol_with_ldbm_api=ndbm
18941
18942                 if test $ol_cv_lib_ndbm != yes ; then
18943                         LDBM_LIBS="$LDBM_LIBS $ol_cv_lib_ndbm"
18944                 fi
18945         fi
18946 fi
18947
18948 if test $ol_link_ldbm = no -a $ol_enable_ldbm != no ; then
18949         echo "configure: warning: could not find suitable LDBM backend" 1>&2
18950         if test $ol_enable_ldbm = yes ; then
18951                 { echo "configure: error: select appropriate LDBM options or disable" 1>&2; exit 1; }
18952         fi
18953
18954         echo "configure: warning: disabling LDBM" 1>&2
18955         ol_enable_ldbm=no
18956 fi
18957
18958 if test $ol_enable_dynamic = yes -a $enable_shared = yes ; then
18959         BUILD_LIBS_DYNAMIC=shared
18960         cat >> confdefs.h <<\EOF
18961 #define LDAP_LIBS_DYNAMIC 1
18962 EOF
18963
18964 else
18965         BUILD_LIBS_DYNAMIC=static
18966 fi
18967
18968 if test $ol_enable_wrappers != no ; then
18969         for ac_hdr in tcpd.h
18970 do
18971 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
18972 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
18973 echo "configure:18974: checking for $ac_hdr" >&5
18974 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
18975   echo $ac_n "(cached) $ac_c" 1>&6
18976 else
18977   cat > conftest.$ac_ext <<EOF
18978 #line 18979 "configure"
18979 #include "confdefs.h"
18980 #include <$ac_hdr>
18981 EOF
18982 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
18983 { (eval echo configure:18984: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
18984 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
18985 if test -z "$ac_err"; then
18986   rm -rf conftest*
18987   eval "ac_cv_header_$ac_safe=yes"
18988 else
18989   echo "$ac_err" >&5
18990   echo "configure: failed program was:" >&5
18991   cat conftest.$ac_ext >&5
18992   rm -rf conftest*
18993   eval "ac_cv_header_$ac_safe=no"
18994 fi
18995 rm -f conftest*
18996 fi
18997 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
18998   echo "$ac_t""yes" 1>&6
18999     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19000   cat >> confdefs.h <<EOF
19001 #define $ac_tr_hdr 1
19002 EOF
19003  
19004                 echo $ac_n "checking for TCP wrappers library""... $ac_c" 1>&6
19005 echo "configure:19006: checking for TCP wrappers library" >&5
19006                 save_LIBS="$LIBS"
19007                 LIBS="$LIBS -lwrap"
19008                 cat > conftest.$ac_ext <<EOF
19009 #line 19010 "configure"
19010 #include "confdefs.h"
19011
19012 #include <tcpd.h>
19013 int allow_severity = 0;
19014 int deny_severity  = 0;
19015
19016 struct request_info *req;
19017                 
19018 int main() {
19019
19020 hosts_access(req)
19021                 
19022 ; return 0; }
19023 EOF
19024 if { (eval echo configure:19025: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19025   rm -rf conftest*
19026   echo "$ac_t""-lwrap" 1>&6
19027                 have_wrappers=yes
19028                 LIBS="$save_LIBS"
19029 else
19030   echo "configure: failed program was:" >&5
19031   cat conftest.$ac_ext >&5
19032   rm -rf conftest*
19033   
19034                                 LIBS="$LIBS -lnsl"
19035                 cat > conftest.$ac_ext <<EOF
19036 #line 19037 "configure"
19037 #include "confdefs.h"
19038
19039 #include <tcpd.h>
19040 int allow_severity = 0;
19041 int deny_severity  = 0;
19042
19043 struct request_info *req;
19044                 
19045 int main() {
19046
19047 hosts_access(req)
19048                 
19049 ; return 0; }
19050 EOF
19051 if { (eval echo configure:19052: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19052   rm -rf conftest*
19053   echo "$ac_t""-lwrap -lnsl" 1>&6
19054                 have_wrappers=yes
19055                 LIBS="$save_LIBS -lnsl"
19056 else
19057   echo "configure: failed program was:" >&5
19058   cat conftest.$ac_ext >&5
19059   rm -rf conftest*
19060   
19061                 echo "$ac_t""no" 1>&6
19062                 have_wrappers=no
19063                 LIBS=$save_LIBS
19064 fi
19065 rm -f conftest*
19066 fi
19067 rm -f conftest*
19068 else
19069   echo "$ac_t""no" 1>&6
19070 have_wrappers=no
19071 fi
19072 done
19073
19074
19075         if test $have_wrappers = yes ; then
19076                 cat >> confdefs.h <<\EOF
19077 #define HAVE_TCPD 1
19078 EOF
19079
19080                 WRAP_LIBS="-lwrap"
19081         elif test $ol_enable_wrappers = yes ; then
19082                 { echo "configure: error: could not find TCP wrappers, select apppropriate options ore disable" 1>&2; exit 1; }
19083         else
19084                 echo "configure: warning: could not find TCP wrappers, support disabled" 1>&2
19085                 WRAP_LIBS=""
19086         fi
19087 fi
19088
19089 if test $ol_enable_syslog != no ; then
19090         echo $ac_n "checking for openlog""... $ac_c" 1>&6
19091 echo "configure:19092: checking for openlog" >&5
19092 if eval "test \"\${ac_cv_func_openlog+set}\" = set"; then
19093   echo $ac_n "(cached) $ac_c" 1>&6
19094 else
19095   cat > conftest.$ac_ext <<EOF
19096 #line 19097 "configure"
19097 #include "confdefs.h"
19098 /* System header to define __stub macros and hopefully few prototypes,
19099     which can conflict with char openlog(); below.  */
19100 #include <assert.h>
19101 /* Override any gcc2 internal prototype to avoid an error.  */
19102 /* We use char because int might match the return type of a gcc2
19103     builtin and then its argument prototype would still apply.  */
19104 char openlog();
19105 char (*f)();
19106
19107 int main() {
19108
19109 /* The GNU C library defines this for functions which it implements
19110     to always fail with ENOSYS.  Some functions are actually named
19111     something starting with __ and the normal name is an alias.  */
19112 #if defined (__stub_openlog) || defined (__stub___openlog)
19113 choke me
19114 #else
19115 f = openlog;
19116 #endif
19117
19118 ; return 0; }
19119 EOF
19120 if { (eval echo configure:19121: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19121   rm -rf conftest*
19122   eval "ac_cv_func_openlog=yes"
19123 else
19124   echo "configure: failed program was:" >&5
19125   cat conftest.$ac_ext >&5
19126   rm -rf conftest*
19127   eval "ac_cv_func_openlog=no"
19128 fi
19129 rm -f conftest*
19130 fi
19131
19132 if eval "test \"`echo '$ac_cv_func_'openlog`\" = yes"; then
19133   echo "$ac_t""yes" 1>&6
19134   :
19135 else
19136   echo "$ac_t""no" 1>&6
19137 fi
19138
19139         if test $ac_cv_func_openlog = no -a $ol_enable_syslog = yes; then
19140                 { echo "configure: error: could not find syslog" 1>&2; exit 1; }
19141         fi
19142         ol_enable_syslog=$ac_cv_func_openlog
19143 fi
19144
19145
19146 ol_link_sql=no
19147 if test $ol_enable_sql != no ; then
19148         echo $ac_n "checking for SQLDriverConnect in -liodbc""... $ac_c" 1>&6
19149 echo "configure:19150: checking for SQLDriverConnect in -liodbc" >&5
19150 ac_lib_var=`echo iodbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19151 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19152   echo $ac_n "(cached) $ac_c" 1>&6
19153 else
19154   ac_save_LIBS="$LIBS"
19155 LIBS="-liodbc  $LIBS"
19156 cat > conftest.$ac_ext <<EOF
19157 #line 19158 "configure"
19158 #include "confdefs.h"
19159 /* Override any gcc2 internal prototype to avoid an error.  */
19160 /* We use char because int might match the return type of a gcc2
19161     builtin and then its argument prototype would still apply.  */
19162 char SQLDriverConnect();
19163
19164 int main() {
19165 SQLDriverConnect()
19166 ; return 0; }
19167 EOF
19168 if { (eval echo configure:19169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19169   rm -rf conftest*
19170   eval "ac_cv_lib_$ac_lib_var=yes"
19171 else
19172   echo "configure: failed program was:" >&5
19173   cat conftest.$ac_ext >&5
19174   rm -rf conftest*
19175   eval "ac_cv_lib_$ac_lib_var=no"
19176 fi
19177 rm -f conftest*
19178 LIBS="$ac_save_LIBS"
19179
19180 fi
19181 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19182   echo "$ac_t""yes" 1>&6
19183   have_iodbc=yes
19184 else
19185   echo "$ac_t""no" 1>&6
19186 have_iodbc=no
19187 fi
19188
19189         if test $have_iodbc = yes ; then
19190                 ol_link_sql="-liodbc"
19191         else
19192                 echo $ac_n "checking for SQLDriverConnect in -lodbc""... $ac_c" 1>&6
19193 echo "configure:19194: checking for SQLDriverConnect in -lodbc" >&5
19194 ac_lib_var=`echo odbc'_'SQLDriverConnect | sed 'y%./+-:%__p__%'`
19195 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19196   echo $ac_n "(cached) $ac_c" 1>&6
19197 else
19198   ac_save_LIBS="$LIBS"
19199 LIBS="-lodbc  $LIBS"
19200 cat > conftest.$ac_ext <<EOF
19201 #line 19202 "configure"
19202 #include "confdefs.h"
19203 /* Override any gcc2 internal prototype to avoid an error.  */
19204 /* We use char because int might match the return type of a gcc2
19205     builtin and then its argument prototype would still apply.  */
19206 char SQLDriverConnect();
19207
19208 int main() {
19209 SQLDriverConnect()
19210 ; return 0; }
19211 EOF
19212 if { (eval echo configure:19213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19213   rm -rf conftest*
19214   eval "ac_cv_lib_$ac_lib_var=yes"
19215 else
19216   echo "configure: failed program was:" >&5
19217   cat conftest.$ac_ext >&5
19218   rm -rf conftest*
19219   eval "ac_cv_lib_$ac_lib_var=no"
19220 fi
19221 rm -f conftest*
19222 LIBS="$ac_save_LIBS"
19223
19224 fi
19225 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19226   echo "$ac_t""yes" 1>&6
19227   have_odbc=yes
19228 else
19229   echo "$ac_t""no" 1>&6
19230 have_odbc=no
19231 fi
19232
19233                 if test $have_odbc = yes ; then
19234                         ol_link_sql="-lodbc"
19235                 fi
19236         fi
19237
19238         if test $ol_link_sql != no ; then
19239                 SLAPD_SQL_LIBS="$ol_link_sql"
19240
19241         elif test $ol_enable_sql != auto ; then
19242                 { echo "configure: error: could not locate suitable ODBC library" 1>&2; exit 1; }
19243         fi
19244 fi
19245
19246 if test $ol_enable_tcl != no ; then
19247         for ac_hdr in tcl.h
19248 do
19249 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19250 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19251 echo "configure:19252: checking for $ac_hdr" >&5
19252 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19253   echo $ac_n "(cached) $ac_c" 1>&6
19254 else
19255   cat > conftest.$ac_ext <<EOF
19256 #line 19257 "configure"
19257 #include "confdefs.h"
19258 #include <$ac_hdr>
19259 EOF
19260 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19261 { (eval echo configure:19262: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19262 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19263 if test -z "$ac_err"; then
19264   rm -rf conftest*
19265   eval "ac_cv_header_$ac_safe=yes"
19266 else
19267   echo "$ac_err" >&5
19268   echo "configure: failed program was:" >&5
19269   cat conftest.$ac_ext >&5
19270   rm -rf conftest*
19271   eval "ac_cv_header_$ac_safe=no"
19272 fi
19273 rm -f conftest*
19274 fi
19275 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19276   echo "$ac_t""yes" 1>&6
19277     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19278   cat >> confdefs.h <<EOF
19279 #define $ac_tr_hdr 1
19280 EOF
19281  
19282 else
19283   echo "$ac_t""no" 1>&6
19284 fi
19285 done
19286
19287
19288         if test $ac_cv_header_tcl_h != yes ; then
19289                 have_tcl=no
19290         else
19291                 for lib in tcl tcl7.6 tcl8.0 tcl8.2 ; do
19292                         echo $ac_n "checking for main in -l$lib""... $ac_c" 1>&6
19293 echo "configure:19294: checking for main in -l$lib" >&5
19294 ac_lib_var=`echo $lib'_'main | sed 'y%./+-:%__p__%'`
19295 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19296   echo $ac_n "(cached) $ac_c" 1>&6
19297 else
19298   ac_save_LIBS="$LIBS"
19299 LIBS="-l$lib  $LIBS"
19300 cat > conftest.$ac_ext <<EOF
19301 #line 19302 "configure"
19302 #include "confdefs.h"
19303
19304 int main() {
19305 main()
19306 ; return 0; }
19307 EOF
19308 if { (eval echo configure:19309: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19309   rm -rf conftest*
19310   eval "ac_cv_lib_$ac_lib_var=yes"
19311 else
19312   echo "configure: failed program was:" >&5
19313   cat conftest.$ac_ext >&5
19314   rm -rf conftest*
19315   eval "ac_cv_lib_$ac_lib_var=no"
19316 fi
19317 rm -f conftest*
19318 LIBS="$ac_save_LIBS"
19319
19320 fi
19321 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19322   echo "$ac_t""yes" 1>&6
19323   have_tcl=yes
19324                            if test x"$ol_with_tcl_module" = "xstatic" ; then
19325                                         SLAPD_LIBS="$SLAPD_LIBS -l${lib}"
19326                            else
19327                                         MOD_TCL_LIB="-l${lib}"
19328                            fi;break
19329 else
19330   echo "$ac_t""no" 1>&6
19331 have_tcl=no
19332 fi
19333
19334                 done
19335         fi
19336
19337         if test $have_tcl != yes ; then
19338                 echo "configure: warning: could not find -ltcl" 1>&2
19339                 if test $ol_enable_tcl = yes ; then
19340                         { echo "configure: error: could not find tcl, select appropriate options or disable" 1>&2; exit 1; }
19341                 fi
19342
19343                 ol_enable_tcl=no
19344         fi
19345 fi
19346
19347 ol_link_termcap=no
19348 for ac_hdr in termcap.h ncurses.h
19349 do
19350 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19351 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19352 echo "configure:19353: checking for $ac_hdr" >&5
19353 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19354   echo $ac_n "(cached) $ac_c" 1>&6
19355 else
19356   cat > conftest.$ac_ext <<EOF
19357 #line 19358 "configure"
19358 #include "confdefs.h"
19359 #include <$ac_hdr>
19360 EOF
19361 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19362 { (eval echo configure:19363: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19363 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19364 if test -z "$ac_err"; then
19365   rm -rf conftest*
19366   eval "ac_cv_header_$ac_safe=yes"
19367 else
19368   echo "$ac_err" >&5
19369   echo "configure: failed program was:" >&5
19370   cat conftest.$ac_ext >&5
19371   rm -rf conftest*
19372   eval "ac_cv_header_$ac_safe=no"
19373 fi
19374 rm -f conftest*
19375 fi
19376 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19377   echo "$ac_t""yes" 1>&6
19378     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19379   cat >> confdefs.h <<EOF
19380 #define $ac_tr_hdr 1
19381 EOF
19382  
19383 else
19384   echo "$ac_t""no" 1>&6
19385 fi
19386 done
19387
19388
19389 if test $ol_link_termcap = no ; then
19390         echo $ac_n "checking for tputs in -ltermcap""... $ac_c" 1>&6
19391 echo "configure:19392: checking for tputs in -ltermcap" >&5
19392 ac_lib_var=`echo termcap'_'tputs | sed 'y%./+-:%__p__%'`
19393 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19394   echo $ac_n "(cached) $ac_c" 1>&6
19395 else
19396   ac_save_LIBS="$LIBS"
19397 LIBS="-ltermcap  $LIBS"
19398 cat > conftest.$ac_ext <<EOF
19399 #line 19400 "configure"
19400 #include "confdefs.h"
19401 /* Override any gcc2 internal prototype to avoid an error.  */
19402 /* We use char because int might match the return type of a gcc2
19403     builtin and then its argument prototype would still apply.  */
19404 char tputs();
19405
19406 int main() {
19407 tputs()
19408 ; return 0; }
19409 EOF
19410 if { (eval echo configure:19411: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19411   rm -rf conftest*
19412   eval "ac_cv_lib_$ac_lib_var=yes"
19413 else
19414   echo "configure: failed program was:" >&5
19415   cat conftest.$ac_ext >&5
19416   rm -rf conftest*
19417   eval "ac_cv_lib_$ac_lib_var=no"
19418 fi
19419 rm -f conftest*
19420 LIBS="$ac_save_LIBS"
19421
19422 fi
19423 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19424   echo "$ac_t""yes" 1>&6
19425   have_termcap=yes
19426 else
19427   echo "$ac_t""no" 1>&6
19428 have_termcap=no
19429 fi
19430
19431         if test $have_termcap = yes ; then
19432                 cat >> confdefs.h <<\EOF
19433 #define HAVE_TERMCAP 1
19434 EOF
19435
19436                 ol_link_termcap=yes
19437                 TERMCAP_LIBS=-ltermcap
19438         fi
19439 fi
19440
19441 if test $ol_link_termcap = no ; then
19442         echo $ac_n "checking for initscr in -lncurses""... $ac_c" 1>&6
19443 echo "configure:19444: checking for initscr in -lncurses" >&5
19444 ac_lib_var=`echo ncurses'_'initscr | sed 'y%./+-:%__p__%'`
19445 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19446   echo $ac_n "(cached) $ac_c" 1>&6
19447 else
19448   ac_save_LIBS="$LIBS"
19449 LIBS="-lncurses  $LIBS"
19450 cat > conftest.$ac_ext <<EOF
19451 #line 19452 "configure"
19452 #include "confdefs.h"
19453 /* Override any gcc2 internal prototype to avoid an error.  */
19454 /* We use char because int might match the return type of a gcc2
19455     builtin and then its argument prototype would still apply.  */
19456 char initscr();
19457
19458 int main() {
19459 initscr()
19460 ; return 0; }
19461 EOF
19462 if { (eval echo configure:19463: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19463   rm -rf conftest*
19464   eval "ac_cv_lib_$ac_lib_var=yes"
19465 else
19466   echo "configure: failed program was:" >&5
19467   cat conftest.$ac_ext >&5
19468   rm -rf conftest*
19469   eval "ac_cv_lib_$ac_lib_var=no"
19470 fi
19471 rm -f conftest*
19472 LIBS="$ac_save_LIBS"
19473
19474 fi
19475 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19476   echo "$ac_t""yes" 1>&6
19477   have_ncurses=yes
19478 else
19479   echo "$ac_t""no" 1>&6
19480 have_ncurses=no
19481 fi
19482
19483         if test $have_ncurses = yes ; then
19484                 cat >> confdefs.h <<\EOF
19485 #define HAVE_NCURSES 1
19486 EOF
19487
19488                 ol_link_termcap=yes
19489                 TERMCAP_LIBS=-lncurses
19490         fi
19491 fi
19492
19493 if test $ol_link_termcap = no ; then
19494         cat >> confdefs.h <<\EOF
19495 #define NO_TERMCAP 1
19496 EOF
19497
19498         TERMCAP_LIBS=
19499 fi
19500
19501 ol_link_sasl=no
19502 ol_link_spasswd=no
19503 if test $ol_with_cyrus_sasl != no ; then
19504         for ac_hdr in sasl/sasl.h sasl.h
19505 do
19506 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19507 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19508 echo "configure:19509: checking for $ac_hdr" >&5
19509 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19510   echo $ac_n "(cached) $ac_c" 1>&6
19511 else
19512   cat > conftest.$ac_ext <<EOF
19513 #line 19514 "configure"
19514 #include "confdefs.h"
19515 #include <$ac_hdr>
19516 EOF
19517 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19518 { (eval echo configure:19519: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19519 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19520 if test -z "$ac_err"; then
19521   rm -rf conftest*
19522   eval "ac_cv_header_$ac_safe=yes"
19523 else
19524   echo "$ac_err" >&5
19525   echo "configure: failed program was:" >&5
19526   cat conftest.$ac_ext >&5
19527   rm -rf conftest*
19528   eval "ac_cv_header_$ac_safe=no"
19529 fi
19530 rm -f conftest*
19531 fi
19532 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19533   echo "$ac_t""yes" 1>&6
19534     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19535   cat >> confdefs.h <<EOF
19536 #define $ac_tr_hdr 1
19537 EOF
19538  
19539 else
19540   echo "$ac_t""no" 1>&6
19541 fi
19542 done
19543
19544
19545         if test $ac_cv_header_sasl_sasl_h = yes -o $ac_cv_header_sasl_h = yes; then
19546                 echo $ac_n "checking for sasl_client_init in -lsasl2""... $ac_c" 1>&6
19547 echo "configure:19548: checking for sasl_client_init in -lsasl2" >&5
19548 ac_lib_var=`echo sasl2'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19549 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19550   echo $ac_n "(cached) $ac_c" 1>&6
19551 else
19552   ac_save_LIBS="$LIBS"
19553 LIBS="-lsasl2  $LIBS"
19554 cat > conftest.$ac_ext <<EOF
19555 #line 19556 "configure"
19556 #include "confdefs.h"
19557 /* Override any gcc2 internal prototype to avoid an error.  */
19558 /* We use char because int might match the return type of a gcc2
19559     builtin and then its argument prototype would still apply.  */
19560 char sasl_client_init();
19561
19562 int main() {
19563 sasl_client_init()
19564 ; return 0; }
19565 EOF
19566 if { (eval echo configure:19567: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19567   rm -rf conftest*
19568   eval "ac_cv_lib_$ac_lib_var=yes"
19569 else
19570   echo "configure: failed program was:" >&5
19571   cat conftest.$ac_ext >&5
19572   rm -rf conftest*
19573   eval "ac_cv_lib_$ac_lib_var=no"
19574 fi
19575 rm -f conftest*
19576 LIBS="$ac_save_LIBS"
19577
19578 fi
19579 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19580   echo "$ac_t""yes" 1>&6
19581   ol_link_sasl="-lsasl2"
19582 else
19583   echo "$ac_t""no" 1>&6
19584 echo $ac_n "checking for sasl_client_init in -lsasl""... $ac_c" 1>&6
19585 echo "configure:19586: checking for sasl_client_init in -lsasl" >&5
19586 ac_lib_var=`echo sasl'_'sasl_client_init | sed 'y%./+-:%__p__%'`
19587 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19588   echo $ac_n "(cached) $ac_c" 1>&6
19589 else
19590   ac_save_LIBS="$LIBS"
19591 LIBS="-lsasl  $LIBS"
19592 cat > conftest.$ac_ext <<EOF
19593 #line 19594 "configure"
19594 #include "confdefs.h"
19595 /* Override any gcc2 internal prototype to avoid an error.  */
19596 /* We use char because int might match the return type of a gcc2
19597     builtin and then its argument prototype would still apply.  */
19598 char sasl_client_init();
19599
19600 int main() {
19601 sasl_client_init()
19602 ; return 0; }
19603 EOF
19604 if { (eval echo configure:19605: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19605   rm -rf conftest*
19606   eval "ac_cv_lib_$ac_lib_var=yes"
19607 else
19608   echo "configure: failed program was:" >&5
19609   cat conftest.$ac_ext >&5
19610   rm -rf conftest*
19611   eval "ac_cv_lib_$ac_lib_var=no"
19612 fi
19613 rm -f conftest*
19614 LIBS="$ac_save_LIBS"
19615
19616 fi
19617 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19618   echo "$ac_t""yes" 1>&6
19619   ol_link_sasl="-lsasl"
19620 else
19621   echo "$ac_t""no" 1>&6
19622 fi
19623
19624 fi
19625
19626         fi
19627
19628         if test $ol_link_sasl = no ; then
19629                 if test $ol_with_cyrus_sasl != auto ; then
19630                         { echo "configure: error: Could not locate Cyrus SASL" 1>&2; exit 1; }
19631                 else
19632                         echo "configure: warning: Could not locate Cyrus SASL" 1>&2
19633                         echo "configure: warning: SASL authentication not supported!" 1>&2
19634                         if test $ol_link_tls = no ; then
19635                                 echo "configure: warning: Strong authentication not supported!" 1>&2
19636                         fi
19637                 fi
19638         else
19639                 cat >> confdefs.h <<\EOF
19640 #define HAVE_CYRUS_SASL 1
19641 EOF
19642
19643                 SASL_LIBS="$ol_link_sasl"
19644                 if test $ol_enable_spasswd != no ; then
19645                         ol_link_spasswd=yes
19646                 fi
19647         fi
19648
19649 else
19650         echo "configure: warning: SASL authentication not supported!" 1>&2
19651         if test $ol_link_tls = no ; then
19652                 echo "configure: warning: Strong authentication not supported!" 1>&2
19653         fi
19654 fi
19655
19656 if test $cross_compiling != yes -a "$ac_cv_mingw32" != yes ; then
19657         dev=no
19658         if test -r /dev/urandom ; then
19659                 dev="/dev/urandom";
19660         elif test -r /idev/urandom ; then
19661                 dev="/idev/urandom";
19662         elif test -r /dev/srandom ; then
19663                 dev="/dev/srandom";
19664         elif test -r /dev/random ; then
19665                 dev="/dev/random";
19666         elif test -r /idev/random ; then
19667                 dev="/idev/random";
19668         fi
19669
19670         if test $dev != no ; then
19671                 cat >> confdefs.h <<EOF
19672 #define URANDOM_DEVICE "$dev"
19673 EOF
19674
19675         fi
19676 fi
19677
19678 ol_link_fetch=no
19679 if test $ol_with_fetch != no ; then
19680         ol_LIBS=$LIBS
19681 LIBS="-lfetch -lcom_err $LIBS"
19682 echo $ac_n "checking fetch(3) library""... $ac_c" 1>&6
19683 echo "configure:19684: checking fetch(3) library" >&5
19684 if eval "test \"\${ol_cv_lib_fetch+set}\" = set"; then
19685   echo $ac_n "(cached) $ac_c" 1>&6
19686 else
19687   
19688         cat > conftest.$ac_ext <<EOF
19689 #line 19690 "configure"
19690 #include "confdefs.h"
19691
19692 #include <sys/param.h>
19693 #include <stdio.h>
19694 #include <fetch.h>
19695 int main() {
19696 struct url *u = fetchParseURL("file:///"); 
19697 ; return 0; }
19698 EOF
19699 if { (eval echo configure:19700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19700   rm -rf conftest*
19701   ol_cv_lib_fetch=yes
19702 else
19703   echo "configure: failed program was:" >&5
19704   cat conftest.$ac_ext >&5
19705   rm -rf conftest*
19706   ol_cv_lib_fetch=no
19707 fi
19708 rm -f conftest*
19709 fi
19710
19711 echo "$ac_t""$ol_cv_lib_fetch" 1>&6
19712 LIBS=$ol_LIBS
19713 if test $ol_cv_lib_fetch != no ; then
19714         ol_link_fetch="-lfetch -lcom_err"
19715         cat >> confdefs.h <<\EOF
19716 #define HAVE_FETCH 1
19717 EOF
19718
19719 fi
19720
19721
19722         if test $ol_cv_lib_fetch != no ; then
19723                 LDIF_LIBS="$LDIF_LIBS $ol_link_fetch"
19724                 ol_link_fetch=freebsd
19725
19726         elif test $ol_with_fetch != auto ; then
19727                 { echo "configure: error: no suitable API for --with-fetch=$ol_with_fetch" 1>&2; exit 1; }
19728         fi 
19729 fi
19730
19731 ol_link_readline=no
19732 if test $ol_with_readline != no ; then
19733         for ac_hdr in readline/readline.h readline/history.h
19734 do
19735 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
19736 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
19737 echo "configure:19738: checking for $ac_hdr" >&5
19738 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
19739   echo $ac_n "(cached) $ac_c" 1>&6
19740 else
19741   cat > conftest.$ac_ext <<EOF
19742 #line 19743 "configure"
19743 #include "confdefs.h"
19744 #include <$ac_hdr>
19745 EOF
19746 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
19747 { (eval echo configure:19748: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
19748 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
19749 if test -z "$ac_err"; then
19750   rm -rf conftest*
19751   eval "ac_cv_header_$ac_safe=yes"
19752 else
19753   echo "$ac_err" >&5
19754   echo "configure: failed program was:" >&5
19755   cat conftest.$ac_ext >&5
19756   rm -rf conftest*
19757   eval "ac_cv_header_$ac_safe=no"
19758 fi
19759 rm -f conftest*
19760 fi
19761 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
19762   echo "$ac_t""yes" 1>&6
19763     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
19764   cat >> confdefs.h <<EOF
19765 #define $ac_tr_hdr 1
19766 EOF
19767  
19768 else
19769   echo "$ac_t""no" 1>&6
19770 fi
19771 done
19772
19773
19774         if test $ac_cv_header_readline_readline_h = yes ; then
19775                 save_LIBS="$LIBS"
19776                 LIBS="$TERMCAP_LIBS $LIBS"
19777                 echo $ac_n "checking for readline in -lreadline""... $ac_c" 1>&6
19778 echo "configure:19779: checking for readline in -lreadline" >&5
19779 ac_lib_var=`echo readline'_'readline | sed 'y%./+-:%__p__%'`
19780 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19781   echo $ac_n "(cached) $ac_c" 1>&6
19782 else
19783   ac_save_LIBS="$LIBS"
19784 LIBS="-lreadline  $LIBS"
19785 cat > conftest.$ac_ext <<EOF
19786 #line 19787 "configure"
19787 #include "confdefs.h"
19788 /* Override any gcc2 internal prototype to avoid an error.  */
19789 /* We use char because int might match the return type of a gcc2
19790     builtin and then its argument prototype would still apply.  */
19791 char readline();
19792
19793 int main() {
19794 readline()
19795 ; return 0; }
19796 EOF
19797 if { (eval echo configure:19798: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19798   rm -rf conftest*
19799   eval "ac_cv_lib_$ac_lib_var=yes"
19800 else
19801   echo "configure: failed program was:" >&5
19802   cat conftest.$ac_ext >&5
19803   rm -rf conftest*
19804   eval "ac_cv_lib_$ac_lib_var=no"
19805 fi
19806 rm -f conftest*
19807 LIBS="$ac_save_LIBS"
19808
19809 fi
19810 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19811   echo "$ac_t""yes" 1>&6
19812   have_readline=yes
19813 else
19814   echo "$ac_t""no" 1>&6
19815 have_readline=no
19816 fi
19817
19818                 LIBS="$save_LIBS"
19819                         
19820                 if test $have_readline = yes ; then
19821                         ol_with_readline=found
19822                         ol_link_readline=yes
19823
19824                         READLINE_LIBS="-lreadline"
19825                 fi
19826         fi
19827 fi
19828
19829 if test $ol_link_readline = yes ; then
19830         cat >> confdefs.h <<\EOF
19831 #define HAVE_READLINE 1
19832 EOF
19833
19834 fi
19835
19836
19837 if test $ol_enable_crypt != no ; then
19838         echo $ac_n "checking for crypt""... $ac_c" 1>&6
19839 echo "configure:19840: checking for crypt" >&5
19840 if eval "test \"\${ac_cv_func_crypt+set}\" = set"; then
19841   echo $ac_n "(cached) $ac_c" 1>&6
19842 else
19843   cat > conftest.$ac_ext <<EOF
19844 #line 19845 "configure"
19845 #include "confdefs.h"
19846 /* System header to define __stub macros and hopefully few prototypes,
19847     which can conflict with char crypt(); below.  */
19848 #include <assert.h>
19849 /* Override any gcc2 internal prototype to avoid an error.  */
19850 /* We use char because int might match the return type of a gcc2
19851     builtin and then its argument prototype would still apply.  */
19852 char crypt();
19853 char (*f)();
19854
19855 int main() {
19856
19857 /* The GNU C library defines this for functions which it implements
19858     to always fail with ENOSYS.  Some functions are actually named
19859     something starting with __ and the normal name is an alias.  */
19860 #if defined (__stub_crypt) || defined (__stub___crypt)
19861 choke me
19862 #else
19863 f = crypt;
19864 #endif
19865
19866 ; return 0; }
19867 EOF
19868 if { (eval echo configure:19869: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19869   rm -rf conftest*
19870   eval "ac_cv_func_crypt=yes"
19871 else
19872   echo "configure: failed program was:" >&5
19873   cat conftest.$ac_ext >&5
19874   rm -rf conftest*
19875   eval "ac_cv_func_crypt=no"
19876 fi
19877 rm -f conftest*
19878 fi
19879
19880 if eval "test \"`echo '$ac_cv_func_'crypt`\" = yes"; then
19881   echo "$ac_t""yes" 1>&6
19882   have_crypt=yes
19883 else
19884   echo "$ac_t""no" 1>&6
19885
19886                 echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
19887 echo "configure:19888: checking for crypt in -lcrypt" >&5
19888 ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-:%__p__%'`
19889 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
19890   echo $ac_n "(cached) $ac_c" 1>&6
19891 else
19892   ac_save_LIBS="$LIBS"
19893 LIBS="-lcrypt  $LIBS"
19894 cat > conftest.$ac_ext <<EOF
19895 #line 19896 "configure"
19896 #include "confdefs.h"
19897 /* Override any gcc2 internal prototype to avoid an error.  */
19898 /* We use char because int might match the return type of a gcc2
19899     builtin and then its argument prototype would still apply.  */
19900 char crypt();
19901
19902 int main() {
19903 crypt()
19904 ; return 0; }
19905 EOF
19906 if { (eval echo configure:19907: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19907   rm -rf conftest*
19908   eval "ac_cv_lib_$ac_lib_var=yes"
19909 else
19910   echo "configure: failed program was:" >&5
19911   cat conftest.$ac_ext >&5
19912   rm -rf conftest*
19913   eval "ac_cv_lib_$ac_lib_var=no"
19914 fi
19915 rm -f conftest*
19916 LIBS="$ac_save_LIBS"
19917
19918 fi
19919 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
19920   echo "$ac_t""yes" 1>&6
19921   LUTIL_LIBS="$LUTIL_LIBS -lcrypt"
19922                         have_crypt=yes
19923 else
19924   echo "$ac_t""no" 1>&6
19925 have_crypt=no
19926 fi
19927
19928 fi
19929
19930
19931         if test $have_crypt = yes ; then
19932                 cat >> confdefs.h <<\EOF
19933 #define HAVE_CRYPT 1
19934 EOF
19935
19936         else
19937                 echo "configure: warning: could not find crypt" 1>&2
19938                 if test $ol_enable_crypt = yes ; then
19939                         { echo "configure: error: could not find crypt" 1>&2; exit 1; }
19940                 fi
19941
19942                 echo "configure: warning: disabling crypt support" 1>&2
19943                 ol_enable_crypt=no
19944         fi
19945 fi
19946
19947 if test $ol_enable_proctitle != no ; then
19948         echo $ac_n "checking for setproctitle""... $ac_c" 1>&6
19949 echo "configure:19950: checking for setproctitle" >&5
19950 if eval "test \"\${ac_cv_func_setproctitle+set}\" = set"; then
19951   echo $ac_n "(cached) $ac_c" 1>&6
19952 else
19953   cat > conftest.$ac_ext <<EOF
19954 #line 19955 "configure"
19955 #include "confdefs.h"
19956 /* System header to define __stub macros and hopefully few prototypes,
19957     which can conflict with char setproctitle(); below.  */
19958 #include <assert.h>
19959 /* Override any gcc2 internal prototype to avoid an error.  */
19960 /* We use char because int might match the return type of a gcc2
19961     builtin and then its argument prototype would still apply.  */
19962 char setproctitle();
19963 char (*f)();
19964
19965 int main() {
19966
19967 /* The GNU C library defines this for functions which it implements
19968     to always fail with ENOSYS.  Some functions are actually named
19969     something starting with __ and the normal name is an alias.  */
19970 #if defined (__stub_setproctitle) || defined (__stub___setproctitle)
19971 choke me
19972 #else
19973 f = setproctitle;
19974 #endif
19975
19976 ; return 0; }
19977 EOF
19978 if { (eval echo configure:19979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
19979   rm -rf conftest*
19980   eval "ac_cv_func_setproctitle=yes"
19981 else
19982   echo "configure: failed program was:" >&5
19983   cat conftest.$ac_ext >&5
19984   rm -rf conftest*
19985   eval "ac_cv_func_setproctitle=no"
19986 fi
19987 rm -f conftest*
19988 fi
19989
19990 if eval "test \"`echo '$ac_cv_func_'setproctitle`\" = yes"; then
19991   echo "$ac_t""yes" 1>&6
19992   have_setproctitle=yes
19993 else
19994   echo "$ac_t""no" 1>&6
19995
19996                 echo $ac_n "checking for setproctitle in -lutil""... $ac_c" 1>&6
19997 echo "configure:19998: checking for setproctitle in -lutil" >&5
19998 ac_lib_var=`echo util'_'setproctitle | sed 'y%./+-:%__p__%'`
19999 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20000   echo $ac_n "(cached) $ac_c" 1>&6
20001 else
20002   ac_save_LIBS="$LIBS"
20003 LIBS="-lutil  $LIBS"
20004 cat > conftest.$ac_ext <<EOF
20005 #line 20006 "configure"
20006 #include "confdefs.h"
20007 /* Override any gcc2 internal prototype to avoid an error.  */
20008 /* We use char because int might match the return type of a gcc2
20009     builtin and then its argument prototype would still apply.  */
20010 char setproctitle();
20011
20012 int main() {
20013 setproctitle()
20014 ; return 0; }
20015 EOF
20016 if { (eval echo configure:20017: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20017   rm -rf conftest*
20018   eval "ac_cv_lib_$ac_lib_var=yes"
20019 else
20020   echo "configure: failed program was:" >&5
20021   cat conftest.$ac_ext >&5
20022   rm -rf conftest*
20023   eval "ac_cv_lib_$ac_lib_var=no"
20024 fi
20025 rm -f conftest*
20026 LIBS="$ac_save_LIBS"
20027
20028 fi
20029 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20030   echo "$ac_t""yes" 1>&6
20031   have_setproctitle=yes
20032                         LUTIL_LIBS="$LUTIL_LIBS -lutil"
20033 else
20034   echo "$ac_t""no" 1>&6
20035 have_setproctitle=no
20036                         LIBOBJS="$LIBOBJS setproctitle.o"
20037                         LIBSRCS="$LIBSRCS setproctitle.c"
20038 fi
20039
20040 fi
20041
20042
20043         if test $have_setproctitle = yes ; then
20044                 cat >> confdefs.h <<\EOF
20045 #define HAVE_SETPROCTITLE 1
20046 EOF
20047
20048         fi
20049 fi
20050
20051 if test $ol_enable_slp != no ; then
20052         for ac_hdr in slp.h 
20053 do
20054 ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
20055 echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
20056 echo "configure:20057: checking for $ac_hdr" >&5
20057 if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
20058   echo $ac_n "(cached) $ac_c" 1>&6
20059 else
20060   cat > conftest.$ac_ext <<EOF
20061 #line 20062 "configure"
20062 #include "confdefs.h"
20063 #include <$ac_hdr>
20064 EOF
20065 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20066 { (eval echo configure:20067: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20067 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20068 if test -z "$ac_err"; then
20069   rm -rf conftest*
20070   eval "ac_cv_header_$ac_safe=yes"
20071 else
20072   echo "$ac_err" >&5
20073   echo "configure: failed program was:" >&5
20074   cat conftest.$ac_ext >&5
20075   rm -rf conftest*
20076   eval "ac_cv_header_$ac_safe=no"
20077 fi
20078 rm -f conftest*
20079 fi
20080 if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
20081   echo "$ac_t""yes" 1>&6
20082     ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
20083   cat >> confdefs.h <<EOF
20084 #define $ac_tr_hdr 1
20085 EOF
20086  
20087 else
20088   echo "$ac_t""no" 1>&6
20089 fi
20090 done
20091
20092
20093         if test $ac_cv_header_slp_h = yes ; then
20094                 echo $ac_n "checking for SLPOpen in -lslp""... $ac_c" 1>&6
20095 echo "configure:20096: checking for SLPOpen in -lslp" >&5
20096 ac_lib_var=`echo slp'_'SLPOpen | sed 'y%./+-:%__p__%'`
20097 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
20098   echo $ac_n "(cached) $ac_c" 1>&6
20099 else
20100   ac_save_LIBS="$LIBS"
20101 LIBS="-lslp  $LIBS"
20102 cat > conftest.$ac_ext <<EOF
20103 #line 20104 "configure"
20104 #include "confdefs.h"
20105 /* Override any gcc2 internal prototype to avoid an error.  */
20106 /* We use char because int might match the return type of a gcc2
20107     builtin and then its argument prototype would still apply.  */
20108 char SLPOpen();
20109
20110 int main() {
20111 SLPOpen()
20112 ; return 0; }
20113 EOF
20114 if { (eval echo configure:20115: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
20115   rm -rf conftest*
20116   eval "ac_cv_lib_$ac_lib_var=yes"
20117 else
20118   echo "configure: failed program was:" >&5
20119   cat conftest.$ac_ext >&5
20120   rm -rf conftest*
20121   eval "ac_cv_lib_$ac_lib_var=no"
20122 fi
20123 rm -f conftest*
20124 LIBS="$ac_save_LIBS"
20125
20126 fi
20127 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
20128   echo "$ac_t""yes" 1>&6
20129   have_slp=yes
20130 else
20131   echo "$ac_t""no" 1>&6
20132 have_slp=no
20133 fi
20134
20135                 if test $have_slp = yes ; then
20136                         cat >> confdefs.h <<\EOF
20137 #define HAVE_SLP 1
20138 EOF
20139
20140                         SLAPD_SLP_LIBS=-lslp
20141                 fi
20142
20143         elif test $ol_enable_slp = yes ; then
20144                 { echo "configure: error: SLP not found" 1>&2; exit 1; }
20145         fi
20146 fi
20147
20148 echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
20149 echo "configure:20150: checking for ANSI C header files" >&5
20150 if eval "test \"\${ac_cv_header_stdc+set}\" = set"; then
20151   echo $ac_n "(cached) $ac_c" 1>&6
20152 else
20153   cat > conftest.$ac_ext <<EOF
20154 #line 20155 "configure"
20155 #include "confdefs.h"
20156 #include <stdlib.h>
20157 #include <stdarg.h>
20158 #include <string.h>
20159 #include <float.h>
20160 EOF
20161 ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
20162 { (eval echo configure:20163: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
20163 ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
20164 if test -z "$ac_err"; then
20165   rm -rf conftest*
20166   ac_cv_header_stdc=yes
20167 else
20168   echo "$ac_err" >&5
20169   echo "configure: failed program was:" >&5
20170   cat conftest.$ac_ext >&5
20171   rm -rf conftest*
20172   ac_cv_header_stdc=no
20173 fi
20174 rm -f conftest*
20175
20176 if test $ac_cv_header_stdc = yes; then
20177   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
20178 cat > conftest.$ac_ext <<EOF
20179 #line 20180 "configure"
20180 #include "confdefs.h"
20181 #include <string.h>
20182 EOF
20183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20184   egrep "memchr" >/dev/null 2>&1; then
20185   :
20186 else
20187   rm -rf conftest*
20188   ac_cv_header_stdc=no
20189 fi
20190 rm -f conftest*
20191
20192 fi
20193
20194 if test $ac_cv_header_stdc = yes; then
20195   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
20196 cat > conftest.$ac_ext <<EOF
20197 #line 20198 "configure"
20198 #include "confdefs.h"
20199 #include <stdlib.h>
20200 EOF
20201 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20202   egrep "free" >/dev/null 2>&1; then
20203   :
20204 else
20205   rm -rf conftest*
20206   ac_cv_header_stdc=no
20207 fi
20208 rm -f conftest*
20209
20210 fi
20211
20212 if test $ac_cv_header_stdc = yes; then
20213   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
20214 if test "$cross_compiling" = yes; then
20215   :
20216 else
20217   cat > conftest.$ac_ext <<EOF
20218 #line 20219 "configure"
20219 #include "confdefs.h"
20220 #include <ctype.h>
20221 #if ((' ' & 0x0FF) == 0x020)
20222 #define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
20223 #define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
20224 #else
20225 #define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
20226  || ('j' <= (c) && (c) <= 'r') \
20227  || ('s' <= (c) && (c) <= 'z'))
20228 #define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
20229 #endif
20230 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
20231 int main () { int i; for (i = 0; i < 256; i++)
20232 if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
20233 exit (0); }
20234
20235 EOF
20236 if { (eval echo configure:20237: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20237 then
20238   :
20239 else
20240   echo "configure: failed program was:" >&5
20241   cat conftest.$ac_ext >&5
20242   rm -fr conftest*
20243   ac_cv_header_stdc=no
20244 fi
20245 rm -fr conftest*
20246 fi
20247
20248 fi
20249 fi
20250
20251 echo "$ac_t""$ac_cv_header_stdc" 1>&6
20252 if test $ac_cv_header_stdc = yes; then
20253   cat >> confdefs.h <<\EOF
20254 #define STDC_HEADERS 1
20255 EOF
20256
20257 fi
20258
20259 echo $ac_n "checking for mode_t""... $ac_c" 1>&6
20260 echo "configure:20261: checking for mode_t" >&5
20261 if eval "test \"\${ac_cv_type_mode_t+set}\" = set"; then
20262   echo $ac_n "(cached) $ac_c" 1>&6
20263 else
20264   cat > conftest.$ac_ext <<EOF
20265 #line 20266 "configure"
20266 #include "confdefs.h"
20267 #include <sys/types.h>
20268 #if STDC_HEADERS
20269 #include <stdlib.h>
20270 #include <stddef.h>
20271 #endif
20272
20273 EOF
20274 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20275   egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20276   rm -rf conftest*
20277   eval "ac_cv_type_mode_t=yes"
20278 else
20279   rm -rf conftest*
20280   eval "ac_cv_type_mode_t=no"
20281 fi
20282 rm -f conftest*
20283
20284 fi
20285 if eval "test \"`echo '$ac_cv_type_'mode_t`\" = yes"; then
20286   echo "$ac_t""yes" 1>&6
20287 else
20288   echo "$ac_t""no" 1>&6
20289   cat >> confdefs.h <<EOF
20290 #define mode_t int
20291 EOF
20292
20293 fi
20294
20295 echo $ac_n "checking for off_t""... $ac_c" 1>&6
20296 echo "configure:20297: checking for off_t" >&5
20297 if eval "test \"\${ac_cv_type_off_t+set}\" = set"; then
20298   echo $ac_n "(cached) $ac_c" 1>&6
20299 else
20300   cat > conftest.$ac_ext <<EOF
20301 #line 20302 "configure"
20302 #include "confdefs.h"
20303 #include <sys/types.h>
20304 #if STDC_HEADERS
20305 #include <stdlib.h>
20306 #include <stddef.h>
20307 #endif
20308
20309 EOF
20310 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20311   egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20312   rm -rf conftest*
20313   eval "ac_cv_type_off_t=yes"
20314 else
20315   rm -rf conftest*
20316   eval "ac_cv_type_off_t=no"
20317 fi
20318 rm -f conftest*
20319
20320 fi
20321 if eval "test \"`echo '$ac_cv_type_'off_t`\" = yes"; then
20322   echo "$ac_t""yes" 1>&6
20323 else
20324   echo "$ac_t""no" 1>&6
20325   cat >> confdefs.h <<EOF
20326 #define off_t long
20327 EOF
20328
20329 fi
20330
20331 echo $ac_n "checking for pid_t""... $ac_c" 1>&6
20332 echo "configure:20333: checking for pid_t" >&5
20333 if eval "test \"\${ac_cv_type_pid_t+set}\" = set"; then
20334   echo $ac_n "(cached) $ac_c" 1>&6
20335 else
20336   cat > conftest.$ac_ext <<EOF
20337 #line 20338 "configure"
20338 #include "confdefs.h"
20339 #include <sys/types.h>
20340 #if STDC_HEADERS
20341 #include <stdlib.h>
20342 #include <stddef.h>
20343 #endif
20344
20345 EOF
20346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20347   egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20348   rm -rf conftest*
20349   eval "ac_cv_type_pid_t=yes"
20350 else
20351   rm -rf conftest*
20352   eval "ac_cv_type_pid_t=no"
20353 fi
20354 rm -f conftest*
20355
20356 fi
20357 if eval "test \"`echo '$ac_cv_type_'pid_t`\" = yes"; then
20358   echo "$ac_t""yes" 1>&6
20359 else
20360   echo "$ac_t""no" 1>&6
20361   cat >> confdefs.h <<EOF
20362 #define pid_t int
20363 EOF
20364
20365 fi
20366
20367 echo $ac_n "checking for ptrdiff_t""... $ac_c" 1>&6
20368 echo "configure:20369: checking for ptrdiff_t" >&5
20369 if eval "test \"\${am_cv_type_ptrdiff_t+set}\" = set"; then
20370   echo $ac_n "(cached) $ac_c" 1>&6
20371 else
20372   cat > conftest.$ac_ext <<EOF
20373 #line 20374 "configure"
20374 #include "confdefs.h"
20375 #include <stddef.h>
20376 int main() {
20377 ptrdiff_t p
20378 ; return 0; }
20379 EOF
20380 if { (eval echo configure:20381: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20381   rm -rf conftest*
20382   am_cv_type_ptrdiff_t=yes
20383 else
20384   echo "configure: failed program was:" >&5
20385   cat conftest.$ac_ext >&5
20386   rm -rf conftest*
20387   am_cv_type_ptrdiff_t=no
20388 fi
20389 rm -f conftest*
20390 fi
20391
20392 echo "$ac_t""$am_cv_type_ptrdiff_t" 1>&6
20393    if test $am_cv_type_ptrdiff_t = yes; then
20394      cat >> confdefs.h <<\EOF
20395 #define HAVE_PTRDIFF_T 1
20396 EOF
20397
20398    fi
20399
20400 echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
20401 echo "configure:20402: checking return type of signal handlers" >&5
20402 if eval "test \"\${ac_cv_type_signal+set}\" = set"; then
20403   echo $ac_n "(cached) $ac_c" 1>&6
20404 else
20405   cat > conftest.$ac_ext <<EOF
20406 #line 20407 "configure"
20407 #include "confdefs.h"
20408 #include <sys/types.h>
20409 #include <signal.h>
20410 #ifdef signal
20411 #undef signal
20412 #endif
20413 #ifdef __cplusplus
20414 extern "C" void (*signal (int, void (*)(int)))(int);
20415 #else
20416 void (*signal ()) ();
20417 #endif
20418
20419 int main() {
20420 int i;
20421 ; return 0; }
20422 EOF
20423 if { (eval echo configure:20424: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20424   rm -rf conftest*
20425   ac_cv_type_signal=void
20426 else
20427   echo "configure: failed program was:" >&5
20428   cat conftest.$ac_ext >&5
20429   rm -rf conftest*
20430   ac_cv_type_signal=int
20431 fi
20432 rm -f conftest*
20433 fi
20434
20435 echo "$ac_t""$ac_cv_type_signal" 1>&6
20436 cat >> confdefs.h <<EOF
20437 #define RETSIGTYPE $ac_cv_type_signal
20438 EOF
20439
20440
20441 echo $ac_n "checking for size_t""... $ac_c" 1>&6
20442 echo "configure:20443: checking for size_t" >&5
20443 if eval "test \"\${ac_cv_type_size_t+set}\" = set"; then
20444   echo $ac_n "(cached) $ac_c" 1>&6
20445 else
20446   cat > conftest.$ac_ext <<EOF
20447 #line 20448 "configure"
20448 #include "confdefs.h"
20449 #include <sys/types.h>
20450 #if STDC_HEADERS
20451 #include <stdlib.h>
20452 #include <stddef.h>
20453 #endif
20454
20455 EOF
20456 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20457   egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20458   rm -rf conftest*
20459   eval "ac_cv_type_size_t=yes"
20460 else
20461   rm -rf conftest*
20462   eval "ac_cv_type_size_t=no"
20463 fi
20464 rm -f conftest*
20465
20466 fi
20467 if eval "test \"`echo '$ac_cv_type_'size_t`\" = yes"; then
20468   echo "$ac_t""yes" 1>&6
20469 else
20470   echo "$ac_t""no" 1>&6
20471   cat >> confdefs.h <<EOF
20472 #define size_t unsigned
20473 EOF
20474
20475 fi
20476
20477
20478 echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
20479 echo "configure:20480: checking for ssize_t" >&5
20480 if eval "test \"\${ac_cv_type_ssize_t+set}\" = set"; then
20481   echo $ac_n "(cached) $ac_c" 1>&6
20482 else
20483   cat > conftest.$ac_ext <<EOF
20484 #line 20485 "configure"
20485 #include "confdefs.h"
20486 #include <sys/types.h>
20487 #if STDC_HEADERS
20488 #include <stdlib.h>
20489 #include <stddef.h>
20490 #endif
20491
20492 EOF
20493 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20494   egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20495   rm -rf conftest*
20496   eval "ac_cv_type_ssize_t=yes"
20497 else
20498   rm -rf conftest*
20499   eval "ac_cv_type_ssize_t=no"
20500 fi
20501 rm -f conftest*
20502
20503 fi
20504 if eval "test \"`echo '$ac_cv_type_'ssize_t`\" = yes"; then
20505   echo "$ac_t""yes" 1>&6
20506 else
20507   echo "$ac_t""no" 1>&6
20508   cat >> confdefs.h <<EOF
20509 #define ssize_t signed int
20510 EOF
20511
20512 fi
20513
20514 echo $ac_n "checking for caddr_t""... $ac_c" 1>&6
20515 echo "configure:20516: checking for caddr_t" >&5
20516 if eval "test \"\${ac_cv_type_caddr_t+set}\" = set"; then
20517   echo $ac_n "(cached) $ac_c" 1>&6
20518 else
20519   cat > conftest.$ac_ext <<EOF
20520 #line 20521 "configure"
20521 #include "confdefs.h"
20522 #include <sys/types.h>
20523 #if STDC_HEADERS
20524 #include <stdlib.h>
20525 #include <stddef.h>
20526 #endif
20527
20528 EOF
20529 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20530   egrep "(^|[^a-zA-Z_0-9])caddr_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
20531   rm -rf conftest*
20532   eval "ac_cv_type_caddr_t=yes"
20533 else
20534   rm -rf conftest*
20535   eval "ac_cv_type_caddr_t=no"
20536 fi
20537 rm -f conftest*
20538
20539 fi
20540 if eval "test \"`echo '$ac_cv_type_'caddr_t`\" = yes"; then
20541   echo "$ac_t""yes" 1>&6
20542 else
20543   echo "$ac_t""no" 1>&6
20544   cat >> confdefs.h <<EOF
20545 #define caddr_t char *
20546 EOF
20547
20548 fi
20549
20550
20551 echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
20552 echo "configure:20553: checking for socklen_t" >&5
20553 if eval "test \"\${ol_cv_type_socklen_t+set}\" = set"; then
20554   echo $ac_n "(cached) $ac_c" 1>&6
20555 else
20556   cat > conftest.$ac_ext <<EOF
20557 #line 20558 "configure"
20558 #include "confdefs.h"
20559
20560 #ifdef HAVE_SYS_TYPES_H
20561 #include <sys/types.h>
20562 #endif
20563 #ifdef HAVE_SYS_SOCKET_H
20564 #include <sys/socket.h>
20565 #endif
20566
20567 int main() {
20568 socklen_t len;
20569 ; return 0; }
20570 EOF
20571 if { (eval echo configure:20572: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20572   rm -rf conftest*
20573   ol_cv_type_socklen_t=yes
20574 else
20575   echo "configure: failed program was:" >&5
20576   cat conftest.$ac_ext >&5
20577   rm -rf conftest*
20578   ol_cv_type_socklen_t=no
20579 fi
20580 rm -f conftest*
20581 fi
20582
20583 echo "$ac_t""$ol_cv_type_socklen_t" 1>&6
20584   if test $ol_cv_type_socklen_t = no; then
20585     cat >> confdefs.h <<\EOF
20586 #define socklen_t int
20587 EOF
20588
20589   fi
20590  
20591 echo $ac_n "checking for member st_blksize in aggregate type struct stat""... $ac_c" 1>&6
20592 echo "configure:20593: checking for member st_blksize in aggregate type struct stat" >&5
20593 if eval "test \"\${ac_cv_c_struct_member_st_blksize+set}\" = set"; then
20594   echo $ac_n "(cached) $ac_c" 1>&6
20595 else
20596   cat > conftest.$ac_ext <<EOF
20597 #line 20598 "configure"
20598 #include "confdefs.h"
20599 #include <sys/types.h>
20600 #include <sys/stat.h>
20601 int main() {
20602 struct stat foo; foo.st_blksize;
20603 ; return 0; }
20604 EOF
20605 if { (eval echo configure:20606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20606   rm -rf conftest*
20607   ac_cv_c_struct_member_st_blksize=yes
20608 else
20609   echo "configure: failed program was:" >&5
20610   cat conftest.$ac_ext >&5
20611   rm -rf conftest*
20612   ac_cv_c_struct_member_st_blksize=no
20613 fi
20614 rm -f conftest*
20615 fi
20616
20617 echo "$ac_t""$ac_cv_c_struct_member_st_blksize" 1>&6
20618 st_blksize="$ac_cv_c_struct_member_st_blksize"
20619 if test $ac_cv_c_struct_member_st_blksize = yes; then
20620   cat >> confdefs.h <<\EOF
20621 #define HAVE_ST_BLKSIZE 1
20622 EOF
20623
20624 fi
20625
20626 echo $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6
20627 echo "configure:20628: checking whether time.h and sys/time.h may both be included" >&5
20628 if eval "test \"\${ac_cv_header_time+set}\" = set"; then
20629   echo $ac_n "(cached) $ac_c" 1>&6
20630 else
20631   cat > conftest.$ac_ext <<EOF
20632 #line 20633 "configure"
20633 #include "confdefs.h"
20634 #include <sys/types.h>
20635 #include <sys/time.h>
20636 #include <time.h>
20637 int main() {
20638 struct tm *tp;
20639 ; return 0; }
20640 EOF
20641 if { (eval echo configure:20642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20642   rm -rf conftest*
20643   ac_cv_header_time=yes
20644 else
20645   echo "configure: failed program was:" >&5
20646   cat conftest.$ac_ext >&5
20647   rm -rf conftest*
20648   ac_cv_header_time=no
20649 fi
20650 rm -f conftest*
20651 fi
20652
20653 echo "$ac_t""$ac_cv_header_time" 1>&6
20654 if test $ac_cv_header_time = yes; then
20655   cat >> confdefs.h <<\EOF
20656 #define TIME_WITH_SYS_TIME 1
20657 EOF
20658
20659 fi
20660
20661 echo $ac_n "checking whether struct tm is in sys/time.h or time.h""... $ac_c" 1>&6
20662 echo "configure:20663: checking whether struct tm is in sys/time.h or time.h" >&5
20663 if eval "test \"\${ac_cv_struct_tm+set}\" = set"; then
20664   echo $ac_n "(cached) $ac_c" 1>&6
20665 else
20666   cat > conftest.$ac_ext <<EOF
20667 #line 20668 "configure"
20668 #include "confdefs.h"
20669 #include <sys/types.h>
20670 #include <time.h>
20671 int main() {
20672 struct tm *tp; tp->tm_sec;
20673 ; return 0; }
20674 EOF
20675 if { (eval echo configure:20676: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20676   rm -rf conftest*
20677   ac_cv_struct_tm=time.h
20678 else
20679   echo "configure: failed program was:" >&5
20680   cat conftest.$ac_ext >&5
20681   rm -rf conftest*
20682   ac_cv_struct_tm=sys/time.h
20683 fi
20684 rm -f conftest*
20685 fi
20686
20687 echo "$ac_t""$ac_cv_struct_tm" 1>&6
20688 if test $ac_cv_struct_tm = sys/time.h; then
20689   cat >> confdefs.h <<\EOF
20690 #define TM_IN_SYS_TIME 1
20691 EOF
20692
20693 fi
20694
20695 echo $ac_n "checking for uid_t in sys/types.h""... $ac_c" 1>&6
20696 echo "configure:20697: checking for uid_t in sys/types.h" >&5
20697 if eval "test \"\${ac_cv_type_uid_t+set}\" = set"; then
20698   echo $ac_n "(cached) $ac_c" 1>&6
20699 else
20700   cat > conftest.$ac_ext <<EOF
20701 #line 20702 "configure"
20702 #include "confdefs.h"
20703 #include <sys/types.h>
20704 EOF
20705 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20706   egrep "uid_t" >/dev/null 2>&1; then
20707   rm -rf conftest*
20708   ac_cv_type_uid_t=yes
20709 else
20710   rm -rf conftest*
20711   ac_cv_type_uid_t=no
20712 fi
20713 rm -f conftest*
20714
20715 fi
20716
20717 echo "$ac_t""$ac_cv_type_uid_t" 1>&6
20718 if test $ac_cv_type_uid_t = no; then
20719   cat >> confdefs.h <<\EOF
20720 #define uid_t int
20721 EOF
20722
20723   cat >> confdefs.h <<\EOF
20724 #define gid_t int
20725 EOF
20726
20727 fi
20728
20729 echo $ac_n "checking for sig_atomic_t""... $ac_c" 1>&6
20730 echo "configure:20731: checking for sig_atomic_t" >&5
20731 if eval "test \"\${ol_cv_type_sig_atomic_t+set}\" = set"; then
20732   echo $ac_n "(cached) $ac_c" 1>&6
20733 else
20734   cat > conftest.$ac_ext <<EOF
20735 #line 20736 "configure"
20736 #include "confdefs.h"
20737 #include <signal.h>
20738 int main() {
20739 sig_atomic_t atomic;
20740 ; return 0; }
20741 EOF
20742 if { (eval echo configure:20743: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20743   rm -rf conftest*
20744   ol_cv_type_sig_atomic_t=yes
20745 else
20746   echo "configure: failed program was:" >&5
20747   cat conftest.$ac_ext >&5
20748   rm -rf conftest*
20749   ol_cv_type_sig_atomic_t=no
20750 fi
20751 rm -f conftest*
20752 fi
20753
20754 echo "$ac_t""$ol_cv_type_sig_atomic_t" 1>&6
20755   if test $ol_cv_type_sig_atomic_t = no; then
20756     cat >> confdefs.h <<\EOF
20757 #define sig_atomic_t int
20758 EOF
20759
20760   fi
20761  
20762
20763
20764 # test for pw_gecos in struct passwd
20765 echo $ac_n "checking struct passwd for pw_gecos""... $ac_c" 1>&6
20766 echo "configure:20767: checking struct passwd for pw_gecos" >&5
20767 if eval "test \"\${ol_cv_struct_passwd_pw_gecos+set}\" = set"; then
20768   echo $ac_n "(cached) $ac_c" 1>&6
20769 else
20770   
20771         cat > conftest.$ac_ext <<EOF
20772 #line 20773 "configure"
20773 #include "confdefs.h"
20774 #include <pwd.h>
20775 int main() {
20776
20777         struct passwd pwd;
20778         pwd.pw_gecos = pwd.pw_name;
20779
20780 ; return 0; }
20781 EOF
20782 if { (eval echo configure:20783: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20783   rm -rf conftest*
20784   ol_cv_struct_passwd_pw_gecos=yes
20785 else
20786   echo "configure: failed program was:" >&5
20787   cat conftest.$ac_ext >&5
20788   rm -rf conftest*
20789   ol_cv_struct_passwd_pw_gecos=no
20790 fi
20791 rm -f conftest*
20792 fi
20793
20794 echo "$ac_t""$ol_cv_struct_passwd_pw_gecos" 1>&6
20795 if test $ol_cv_struct_passwd_pw_gecos = yes ; then
20796         cat >> confdefs.h <<\EOF
20797 #define HAVE_PW_GECOS 1
20798 EOF
20799
20800 fi
20801
20802 # test for pw_passwd in struct passwd
20803 echo $ac_n "checking struct passwd for pw_passwd""... $ac_c" 1>&6
20804 echo "configure:20805: checking struct passwd for pw_passwd" >&5
20805 if eval "test \"\${ol_cv_struct_passwd_pw_passwd+set}\" = set"; then
20806   echo $ac_n "(cached) $ac_c" 1>&6
20807 else
20808   
20809         cat > conftest.$ac_ext <<EOF
20810 #line 20811 "configure"
20811 #include "confdefs.h"
20812 #include <pwd.h>
20813 int main() {
20814
20815         struct passwd pwd;
20816         pwd.pw_passwd = pwd.pw_name;
20817
20818 ; return 0; }
20819 EOF
20820 if { (eval echo configure:20821: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20821   rm -rf conftest*
20822   ol_cv_struct_passwd_pw_passwd=yes
20823 else
20824   echo "configure: failed program was:" >&5
20825   cat conftest.$ac_ext >&5
20826   rm -rf conftest*
20827   ol_cv_struct_passwd_pw_passwd=no
20828 fi
20829 rm -f conftest*
20830 fi
20831
20832 echo "$ac_t""$ol_cv_struct_passwd_pw_passwd" 1>&6
20833 if test $ol_cv_struct_passwd_pw_passwd = yes ; then
20834         cat >> confdefs.h <<\EOF
20835 #define HAVE_PW_PASSWD 1
20836 EOF
20837
20838 fi
20839
20840
20841 echo $ac_n "checking if toupper() requires islower()""... $ac_c" 1>&6
20842 echo "configure:20843: checking if toupper() requires islower()" >&5
20843 if eval "test \"\${ol_cv_c_upper_lower+set}\" = set"; then
20844   echo $ac_n "(cached) $ac_c" 1>&6
20845 else
20846   
20847         if test "$cross_compiling" = yes; then
20848   ol_cv_c_upper_lower=safe
20849 else
20850   cat > conftest.$ac_ext <<EOF
20851 #line 20852 "configure"
20852 #include "confdefs.h"
20853
20854 #include <ctype.h>
20855 main()
20856 {
20857         if ('C' == toupper('C'))
20858                 exit(0);
20859         else
20860                 exit(1);
20861 }
20862 EOF
20863 if { (eval echo configure:20864: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
20864 then
20865   ol_cv_c_upper_lower=no
20866 else
20867   echo "configure: failed program was:" >&5
20868   cat conftest.$ac_ext >&5
20869   rm -fr conftest*
20870   ol_cv_c_upper_lower=yes
20871 fi
20872 rm -fr conftest*
20873 fi
20874
20875 fi
20876
20877 echo "$ac_t""$ol_cv_c_upper_lower" 1>&6
20878 if test $ol_cv_c_upper_lower != no ; then
20879         cat >> confdefs.h <<\EOF
20880 #define C_UPPER_LOWER 1
20881 EOF
20882
20883 fi
20884
20885 echo $ac_n "checking for working const""... $ac_c" 1>&6
20886 echo "configure:20887: checking for working const" >&5
20887 if eval "test \"\${ac_cv_c_const+set}\" = set"; then
20888   echo $ac_n "(cached) $ac_c" 1>&6
20889 else
20890   cat > conftest.$ac_ext <<EOF
20891 #line 20892 "configure"
20892 #include "confdefs.h"
20893
20894 int main() {
20895
20896 /* Ultrix mips cc rejects this.  */
20897 typedef int charset[2]; const charset x;
20898 /* SunOS 4.1.1 cc rejects this.  */
20899 char const *const *ccp;
20900 char **p;
20901 /* NEC SVR4.0.2 mips cc rejects this.  */
20902 struct point {int x, y;};
20903 static struct point const zero = {0,0};
20904 /* AIX XL C 1.02.0.0 rejects this.
20905    It does not let you subtract one const X* pointer from another in an arm
20906    of an if-expression whose if-part is not a constant expression */
20907 const char *g = "string";
20908 ccp = &g + (g ? g-g : 0);
20909 /* HPUX 7.0 cc rejects these. */
20910 ++ccp;
20911 p = (char**) ccp;
20912 ccp = (char const *const *) p;
20913 { /* SCO 3.2v4 cc rejects this.  */
20914   char *t;
20915   char const *s = 0 ? (char *) 0 : (char const *) 0;
20916
20917   *t++ = 0;
20918 }
20919 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20920   int x[] = {25, 17};
20921   const int *foo = &x[0];
20922   ++foo;
20923 }
20924 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20925   typedef const int *iptr;
20926   iptr p = 0;
20927   ++p;
20928 }
20929 { /* AIX XL C 1.02.0.0 rejects this saying
20930      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20931   struct s { int j; const int *ap[3]; };
20932   struct s *b; b->j = 5;
20933 }
20934 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20935   const int foo = 10;
20936 }
20937
20938 ; return 0; }
20939 EOF
20940 if { (eval echo configure:20941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20941   rm -rf conftest*
20942   ac_cv_c_const=yes
20943 else
20944   echo "configure: failed program was:" >&5
20945   cat conftest.$ac_ext >&5
20946   rm -rf conftest*
20947   ac_cv_c_const=no
20948 fi
20949 rm -f conftest*
20950 fi
20951
20952 echo "$ac_t""$ac_cv_c_const" 1>&6
20953 if test $ac_cv_c_const = no; then
20954   cat >> confdefs.h <<\EOF
20955 #define const 
20956 EOF
20957
20958 fi
20959
20960 echo $ac_n "checking if compiler understands volatile""... $ac_c" 1>&6
20961 echo "configure:20962: checking if compiler understands volatile" >&5
20962 if eval "test \"\${ol_cv_c_volatile+set}\" = set"; then
20963   echo $ac_n "(cached) $ac_c" 1>&6
20964 else
20965   cat > conftest.$ac_ext <<EOF
20966 #line 20967 "configure"
20967 #include "confdefs.h"
20968 int x, y, z;
20969 int main() {
20970 volatile int a; int * volatile b = x ? &y : &z;
20971       /* Older MIPS compilers (eg., in Ultrix 4.2) don't like *b = 0 */
20972       *b = 0;
20973 ; return 0; }
20974 EOF
20975 if { (eval echo configure:20976: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
20976   rm -rf conftest*
20977   ol_cv_c_volatile=yes
20978 else
20979   echo "configure: failed program was:" >&5
20980   cat conftest.$ac_ext >&5
20981   rm -rf conftest*
20982   ol_cv_c_volatile=no
20983 fi
20984 rm -f conftest*
20985 fi
20986
20987 echo "$ac_t""$ol_cv_c_volatile" 1>&6
20988   if test $ol_cv_c_volatile = yes; then
20989     : 
20990   else
20991     cat >> confdefs.h <<\EOF
20992 #define volatile 
20993 EOF
20994
20995   fi
20996  
20997
20998 if test $cross_compiling = yes ; then
20999         cat >> confdefs.h <<\EOF
21000 #define CROSS_COMPILING 1
21001 EOF
21002
21003 else
21004         echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
21005 echo "configure:21006: checking whether byte ordering is bigendian" >&5
21006 if eval "test \"\${ac_cv_c_bigendian+set}\" = set"; then
21007   echo $ac_n "(cached) $ac_c" 1>&6
21008 else
21009   ac_cv_c_bigendian=unknown
21010 # See if sys/param.h defines the BYTE_ORDER macro.
21011 cat > conftest.$ac_ext <<EOF
21012 #line 21013 "configure"
21013 #include "confdefs.h"
21014 #include <sys/types.h>
21015 #include <sys/param.h>
21016 int main() {
21017
21018 #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
21019  bogus endian macros
21020 #endif
21021 ; return 0; }
21022 EOF
21023 if { (eval echo configure:21024: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21024   rm -rf conftest*
21025   # It does; now see whether it defined to BIG_ENDIAN or not.
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
21034  not big endian
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   ac_cv_c_bigendian=yes
21041 else
21042   echo "configure: failed program was:" >&5
21043   cat conftest.$ac_ext >&5
21044   rm -rf conftest*
21045   ac_cv_c_bigendian=no
21046 fi
21047 rm -f conftest*
21048 else
21049   echo "configure: failed program was:" >&5
21050   cat conftest.$ac_ext >&5
21051 fi
21052 rm -f conftest*
21053 if test $ac_cv_c_bigendian = unknown; then
21054 if test "$cross_compiling" = yes; then
21055     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
21056 else
21057   cat > conftest.$ac_ext <<EOF
21058 #line 21059 "configure"
21059 #include "confdefs.h"
21060 main () {
21061   /* Are we little or big endian?  From Harbison&Steele.  */
21062   union
21063   {
21064     long l;
21065     char c[sizeof (long)];
21066   } u;
21067   u.l = 1;
21068   exit (u.c[sizeof (long) - 1] == 1);
21069 }
21070 EOF
21071 if { (eval echo configure:21072: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21072 then
21073   ac_cv_c_bigendian=no
21074 else
21075   echo "configure: failed program was:" >&5
21076   cat conftest.$ac_ext >&5
21077   rm -fr conftest*
21078   ac_cv_c_bigendian=yes
21079 fi
21080 rm -fr conftest*
21081 fi
21082
21083 fi
21084 fi
21085
21086 echo "$ac_t""$ac_cv_c_bigendian" 1>&6
21087 if test $ac_cv_c_bigendian = yes; then
21088   cat >> confdefs.h <<\EOF
21089 #define WORDS_BIGENDIAN 1
21090 EOF
21091
21092 fi
21093
21094 fi
21095
21096 echo $ac_n "checking size of short""... $ac_c" 1>&6
21097 echo "configure:21098: checking size of short" >&5 
21098 if eval "test \"\${ac_cv_sizeof_short+set}\" = set"; then
21099   echo $ac_n "(cached) $ac_c" 1>&6
21100 else
21101   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21102   cat > conftest.$ac_ext <<EOF
21103 #line 21104 "configure"
21104 #include "confdefs.h"
21105 #include "confdefs.h" 
21106 #include <sys/types.h> 
21107  
21108
21109 int main() {
21110 switch (0) case 0: case (sizeof (short) == $ac_size):;
21111 ; return 0; }
21112 EOF
21113 if { (eval echo configure:21114: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21114   rm -rf conftest*
21115   ac_cv_sizeof_short=$ac_size
21116 else
21117   echo "configure: failed program was:" >&5
21118   cat conftest.$ac_ext >&5
21119 fi
21120 rm -f conftest* 
21121   if test x$ac_cv_sizeof_short != x ; then break; fi 
21122 done 
21123
21124 fi
21125  
21126 if test x$ac_cv_sizeof_short = x ; then 
21127   { echo "configure: error: cannot determine a size for short" 1>&2; exit 1; } 
21128 fi 
21129 echo "$ac_t""$ac_cv_sizeof_short" 1>&6 
21130 cat >> confdefs.h <<EOF
21131 #define SIZEOF_SHORT $ac_cv_sizeof_short
21132 EOF
21133  
21134  
21135 echo $ac_n "checking size of int""... $ac_c" 1>&6
21136 echo "configure:21137: checking size of int" >&5 
21137 if eval "test \"\${ac_cv_sizeof_int+set}\" = set"; then
21138   echo $ac_n "(cached) $ac_c" 1>&6
21139 else
21140   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21141   cat > conftest.$ac_ext <<EOF
21142 #line 21143 "configure"
21143 #include "confdefs.h"
21144 #include "confdefs.h" 
21145 #include <sys/types.h> 
21146  
21147
21148 int main() {
21149 switch (0) case 0: case (sizeof (int) == $ac_size):;
21150 ; return 0; }
21151 EOF
21152 if { (eval echo configure:21153: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21153   rm -rf conftest*
21154   ac_cv_sizeof_int=$ac_size
21155 else
21156   echo "configure: failed program was:" >&5
21157   cat conftest.$ac_ext >&5
21158 fi
21159 rm -f conftest* 
21160   if test x$ac_cv_sizeof_int != x ; then break; fi 
21161 done 
21162
21163 fi
21164  
21165 if test x$ac_cv_sizeof_int = x ; then 
21166   { echo "configure: error: cannot determine a size for int" 1>&2; exit 1; } 
21167 fi 
21168 echo "$ac_t""$ac_cv_sizeof_int" 1>&6 
21169 cat >> confdefs.h <<EOF
21170 #define SIZEOF_INT $ac_cv_sizeof_int
21171 EOF
21172  
21173  
21174 echo $ac_n "checking size of long""... $ac_c" 1>&6
21175 echo "configure:21176: checking size of long" >&5 
21176 if eval "test \"\${ac_cv_sizeof_long+set}\" = set"; then
21177   echo $ac_n "(cached) $ac_c" 1>&6
21178 else
21179   for ac_size in 4 8 1 2 16  ; do # List sizes in rough order of prevalence. 
21180   cat > conftest.$ac_ext <<EOF
21181 #line 21182 "configure"
21182 #include "confdefs.h"
21183 #include "confdefs.h" 
21184 #include <sys/types.h> 
21185  
21186
21187 int main() {
21188 switch (0) case 0: case (sizeof (long) == $ac_size):;
21189 ; return 0; }
21190 EOF
21191 if { (eval echo configure:21192: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21192   rm -rf conftest*
21193   ac_cv_sizeof_long=$ac_size
21194 else
21195   echo "configure: failed program was:" >&5
21196   cat conftest.$ac_ext >&5
21197 fi
21198 rm -f conftest* 
21199   if test x$ac_cv_sizeof_long != x ; then break; fi 
21200 done 
21201
21202 fi
21203  
21204 if test x$ac_cv_sizeof_long = x ; then 
21205   { echo "configure: error: cannot determine a size for long" 1>&2; exit 1; } 
21206 fi 
21207 echo "$ac_t""$ac_cv_sizeof_long" 1>&6 
21208 cat >> confdefs.h <<EOF
21209 #define SIZEOF_LONG $ac_cv_sizeof_long
21210 EOF
21211  
21212
21213
21214 if test "$ac_cv_sizeof_int" -lt 4 ; then
21215         echo "configure: warning: OpenLDAP requires 'int' to be 32 bits or greater." 1>&2
21216
21217         cat >> confdefs.h <<\EOF
21218 #define LBER_INT_T long
21219 EOF
21220
21221 else
21222         cat >> confdefs.h <<\EOF
21223 #define LBER_INT_T int
21224 EOF
21225
21226 fi
21227
21228 cat >> confdefs.h <<\EOF
21229 #define LBER_LEN_T long
21230 EOF
21231
21232 cat >> confdefs.h <<\EOF
21233 #define LBER_SOCKET_T int
21234 EOF
21235
21236 cat >> confdefs.h <<\EOF
21237 #define LBER_TAG_T long
21238 EOF
21239
21240
21241 echo $ac_n "checking for 8-bit clean memcmp""... $ac_c" 1>&6
21242 echo "configure:21243: checking for 8-bit clean memcmp" >&5
21243 if eval "test \"\${ac_cv_func_memcmp_clean+set}\" = set"; then
21244   echo $ac_n "(cached) $ac_c" 1>&6
21245 else
21246   if test "$cross_compiling" = yes; then
21247   ac_cv_func_memcmp_clean=no
21248 else
21249   cat > conftest.$ac_ext <<EOF
21250 #line 21251 "configure"
21251 #include "confdefs.h"
21252
21253 main()
21254 {
21255   char c0 = 0x40, c1 = 0x80, c2 = 0x81;
21256   exit(memcmp(&c0, &c2, 1) < 0 && memcmp(&c1, &c2, 1) < 0 ? 0 : 1);
21257 }
21258
21259 EOF
21260 if { (eval echo configure:21261: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
21261 then
21262   ac_cv_func_memcmp_clean=yes
21263 else
21264   echo "configure: failed program was:" >&5
21265   cat conftest.$ac_ext >&5
21266   rm -fr conftest*
21267   ac_cv_func_memcmp_clean=no
21268 fi
21269 rm -fr conftest*
21270 fi
21271
21272 fi
21273
21274 echo "$ac_t""$ac_cv_func_memcmp_clean" 1>&6
21275 test $ac_cv_func_memcmp_clean = no && LIBOBJS="$LIBOBJS memcmp.${ac_objext}"
21276
21277 echo $ac_n "checking for strftime""... $ac_c" 1>&6
21278 echo "configure:21279: checking for strftime" >&5
21279 if eval "test \"\${ac_cv_func_strftime+set}\" = set"; then
21280   echo $ac_n "(cached) $ac_c" 1>&6
21281 else
21282   cat > conftest.$ac_ext <<EOF
21283 #line 21284 "configure"
21284 #include "confdefs.h"
21285 /* System header to define __stub macros and hopefully few prototypes,
21286     which can conflict with char strftime(); below.  */
21287 #include <assert.h>
21288 /* Override any gcc2 internal prototype to avoid an error.  */
21289 /* We use char because int might match the return type of a gcc2
21290     builtin and then its argument prototype would still apply.  */
21291 char strftime();
21292 char (*f)();
21293
21294 int main() {
21295
21296 /* The GNU C library defines this for functions which it implements
21297     to always fail with ENOSYS.  Some functions are actually named
21298     something starting with __ and the normal name is an alias.  */
21299 #if defined (__stub_strftime) || defined (__stub___strftime)
21300 choke me
21301 #else
21302 f = strftime;
21303 #endif
21304
21305 ; return 0; }
21306 EOF
21307 if { (eval echo configure:21308: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21308   rm -rf conftest*
21309   eval "ac_cv_func_strftime=yes"
21310 else
21311   echo "configure: failed program was:" >&5
21312   cat conftest.$ac_ext >&5
21313   rm -rf conftest*
21314   eval "ac_cv_func_strftime=no"
21315 fi
21316 rm -f conftest*
21317 fi
21318
21319 if eval "test \"`echo '$ac_cv_func_'strftime`\" = yes"; then
21320   echo "$ac_t""yes" 1>&6
21321   cat >> confdefs.h <<\EOF
21322 #define HAVE_STRFTIME 1
21323 EOF
21324
21325 else
21326   echo "$ac_t""no" 1>&6
21327 # strftime is in -lintl on SCO UNIX.
21328 echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
21329 echo "configure:21330: checking for strftime in -lintl" >&5
21330 ac_lib_var=`echo intl'_'strftime | sed 'y%./+-:%__p__%'`
21331 if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
21332   echo $ac_n "(cached) $ac_c" 1>&6
21333 else
21334   ac_save_LIBS="$LIBS"
21335 LIBS="-lintl  $LIBS"
21336 cat > conftest.$ac_ext <<EOF
21337 #line 21338 "configure"
21338 #include "confdefs.h"
21339 /* Override any gcc2 internal prototype to avoid an error.  */
21340 /* We use char because int might match the return type of a gcc2
21341     builtin and then its argument prototype would still apply.  */
21342 char strftime();
21343
21344 int main() {
21345 strftime()
21346 ; return 0; }
21347 EOF
21348 if { (eval echo configure:21349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21349   rm -rf conftest*
21350   eval "ac_cv_lib_$ac_lib_var=yes"
21351 else
21352   echo "configure: failed program was:" >&5
21353   cat conftest.$ac_ext >&5
21354   rm -rf conftest*
21355   eval "ac_cv_lib_$ac_lib_var=no"
21356 fi
21357 rm -f conftest*
21358 LIBS="$ac_save_LIBS"
21359
21360 fi
21361 if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
21362   echo "$ac_t""yes" 1>&6
21363   cat >> confdefs.h <<\EOF
21364 #define HAVE_STRFTIME 1
21365 EOF
21366
21367 LIBS="-lintl $LIBS"
21368 else
21369   echo "$ac_t""no" 1>&6
21370 fi
21371
21372 fi
21373
21374
21375 echo $ac_n "checking for inet_aton()""... $ac_c" 1>&6
21376 echo "configure:21377: checking for inet_aton()" >&5
21377 if eval "test \"\${ol_cv_func_inet_aton+set}\" = set"; then
21378   echo $ac_n "(cached) $ac_c" 1>&6
21379 else
21380   cat > conftest.$ac_ext <<EOF
21381 #line 21382 "configure"
21382 #include "confdefs.h"
21383
21384 #ifdef HAVE_SYS_TYPES_H
21385 #       include <sys/types.h>
21386 #endif
21387 #ifdef HAVE_SYS_SOCKET_H
21388 #       include <sys/socket.h>
21389 #       ifdef HAVE_SYS_SELECT_H
21390 #               include <sys/select.h>
21391 #       endif
21392 #       include <netinet/in.h>
21393 #       ifdef HAVE_ARPA_INET_H
21394 #               include <arpa/inet.h>
21395 #       endif
21396 #endif
21397
21398 int main() {
21399 struct in_addr in;
21400 int rc = inet_aton( "255.255.255.255", &in );
21401 ; return 0; }
21402 EOF
21403 if { (eval echo configure:21404: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21404   rm -rf conftest*
21405   ol_cv_func_inet_aton=yes
21406 else
21407   echo "configure: failed program was:" >&5
21408   cat conftest.$ac_ext >&5
21409   rm -rf conftest*
21410   ol_cv_func_inet_aton=no
21411 fi
21412 rm -f conftest*
21413 fi
21414
21415 echo "$ac_t""$ol_cv_func_inet_aton" 1>&6
21416   if test $ol_cv_func_inet_aton != no; then
21417     cat >> confdefs.h <<\EOF
21418 #define HAVE_INET_ATON 1
21419 EOF
21420
21421   fi
21422  
21423
21424 echo $ac_n "checking for _spawnlp""... $ac_c" 1>&6
21425 echo "configure:21426: checking for _spawnlp" >&5
21426 if eval "test \"\${ac_cv_func__spawnlp+set}\" = set"; then
21427   echo $ac_n "(cached) $ac_c" 1>&6
21428 else
21429   cat > conftest.$ac_ext <<EOF
21430 #line 21431 "configure"
21431 #include "confdefs.h"
21432 /* System header to define __stub macros and hopefully few prototypes,
21433     which can conflict with char _spawnlp(); below.  */
21434 #include <assert.h>
21435 /* Override any gcc2 internal prototype to avoid an error.  */
21436 /* We use char because int might match the return type of a gcc2
21437     builtin and then its argument prototype would still apply.  */
21438 char _spawnlp();
21439 char (*f)();
21440
21441 int main() {
21442
21443 /* The GNU C library defines this for functions which it implements
21444     to always fail with ENOSYS.  Some functions are actually named
21445     something starting with __ and the normal name is an alias.  */
21446 #if defined (__stub__spawnlp) || defined (__stub____spawnlp)
21447 choke me
21448 #else
21449 f = _spawnlp;
21450 #endif
21451
21452 ; return 0; }
21453 EOF
21454 if { (eval echo configure:21455: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21455   rm -rf conftest*
21456   eval "ac_cv_func__spawnlp=yes"
21457 else
21458   echo "configure: failed program was:" >&5
21459   cat conftest.$ac_ext >&5
21460   rm -rf conftest*
21461   eval "ac_cv_func__spawnlp=no"
21462 fi
21463 rm -f conftest*
21464 fi
21465
21466 if eval "test \"`echo '$ac_cv_func_'_spawnlp`\" = yes"; then
21467   echo "$ac_t""yes" 1>&6
21468   cat >> confdefs.h <<\EOF
21469 #define HAVE_SPAWNLP 1
21470 EOF
21471
21472 else
21473   echo "$ac_t""no" 1>&6
21474 fi
21475
21476
21477 echo $ac_n "checking for _snprintf""... $ac_c" 1>&6
21478 echo "configure:21479: checking for _snprintf" >&5
21479 if eval "test \"\${ac_cv_func__snprintf+set}\" = set"; then
21480   echo $ac_n "(cached) $ac_c" 1>&6
21481 else
21482   cat > conftest.$ac_ext <<EOF
21483 #line 21484 "configure"
21484 #include "confdefs.h"
21485 /* System header to define __stub macros and hopefully few prototypes,
21486     which can conflict with char _snprintf(); below.  */
21487 #include <assert.h>
21488 /* Override any gcc2 internal prototype to avoid an error.  */
21489 /* We use char because int might match the return type of a gcc2
21490     builtin and then its argument prototype would still apply.  */
21491 char _snprintf();
21492 char (*f)();
21493
21494 int main() {
21495
21496 /* The GNU C library defines this for functions which it implements
21497     to always fail with ENOSYS.  Some functions are actually named
21498     something starting with __ and the normal name is an alias.  */
21499 #if defined (__stub__snprintf) || defined (__stub____snprintf)
21500 choke me
21501 #else
21502 f = _snprintf;
21503 #endif
21504
21505 ; return 0; }
21506 EOF
21507 if { (eval echo configure:21508: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21508   rm -rf conftest*
21509   eval "ac_cv_func__snprintf=yes"
21510 else
21511   echo "configure: failed program was:" >&5
21512   cat conftest.$ac_ext >&5
21513   rm -rf conftest*
21514   eval "ac_cv_func__snprintf=no"
21515 fi
21516 rm -f conftest*
21517 fi
21518
21519 if eval "test \"`echo '$ac_cv_func_'_snprintf`\" = yes"; then
21520   echo "$ac_t""yes" 1>&6
21521   ac_cv_func_snprintf=yes
21522         cat >> confdefs.h <<\EOF
21523 #define snprintf _snprintf
21524 EOF
21525
21526
21527 else
21528   echo "$ac_t""no" 1>&6
21529 fi
21530
21531
21532 echo $ac_n "checking for _vsnprintf""... $ac_c" 1>&6
21533 echo "configure:21534: checking for _vsnprintf" >&5
21534 if eval "test \"\${ac_cv_func__vsnprintf+set}\" = set"; then
21535   echo $ac_n "(cached) $ac_c" 1>&6
21536 else
21537   cat > conftest.$ac_ext <<EOF
21538 #line 21539 "configure"
21539 #include "confdefs.h"
21540 /* System header to define __stub macros and hopefully few prototypes,
21541     which can conflict with char _vsnprintf(); below.  */
21542 #include <assert.h>
21543 /* Override any gcc2 internal prototype to avoid an error.  */
21544 /* We use char because int might match the return type of a gcc2
21545     builtin and then its argument prototype would still apply.  */
21546 char _vsnprintf();
21547 char (*f)();
21548
21549 int main() {
21550
21551 /* The GNU C library defines this for functions which it implements
21552     to always fail with ENOSYS.  Some functions are actually named
21553     something starting with __ and the normal name is an alias.  */
21554 #if defined (__stub__vsnprintf) || defined (__stub____vsnprintf)
21555 choke me
21556 #else
21557 f = _vsnprintf;
21558 #endif
21559
21560 ; return 0; }
21561 EOF
21562 if { (eval echo configure:21563: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21563   rm -rf conftest*
21564   eval "ac_cv_func__vsnprintf=yes"
21565 else
21566   echo "configure: failed program was:" >&5
21567   cat conftest.$ac_ext >&5
21568   rm -rf conftest*
21569   eval "ac_cv_func__vsnprintf=no"
21570 fi
21571 rm -f conftest*
21572 fi
21573
21574 if eval "test \"`echo '$ac_cv_func_'_vsnprintf`\" = yes"; then
21575   echo "$ac_t""yes" 1>&6
21576   ac_cv_func_vsnprintf=yes
21577         cat >> confdefs.h <<\EOF
21578 #define vsnprintf _vsnprintf
21579 EOF
21580
21581
21582 else
21583   echo "$ac_t""no" 1>&6
21584 fi
21585
21586
21587 echo $ac_n "checking for vprintf""... $ac_c" 1>&6
21588 echo "configure:21589: checking for vprintf" >&5
21589 if eval "test \"\${ac_cv_func_vprintf+set}\" = set"; then
21590   echo $ac_n "(cached) $ac_c" 1>&6
21591 else
21592   cat > conftest.$ac_ext <<EOF
21593 #line 21594 "configure"
21594 #include "confdefs.h"
21595 /* System header to define __stub macros and hopefully few prototypes,
21596     which can conflict with char vprintf(); below.  */
21597 #include <assert.h>
21598 /* Override any gcc2 internal prototype to avoid an error.  */
21599 /* We use char because int might match the return type of a gcc2
21600     builtin and then its argument prototype would still apply.  */
21601 char vprintf();
21602 char (*f)();
21603
21604 int main() {
21605
21606 /* The GNU C library defines this for functions which it implements
21607     to always fail with ENOSYS.  Some functions are actually named
21608     something starting with __ and the normal name is an alias.  */
21609 #if defined (__stub_vprintf) || defined (__stub___vprintf)
21610 choke me
21611 #else
21612 f = vprintf;
21613 #endif
21614
21615 ; return 0; }
21616 EOF
21617 if { (eval echo configure:21618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21618   rm -rf conftest*
21619   eval "ac_cv_func_vprintf=yes"
21620 else
21621   echo "configure: failed program was:" >&5
21622   cat conftest.$ac_ext >&5
21623   rm -rf conftest*
21624   eval "ac_cv_func_vprintf=no"
21625 fi
21626 rm -f conftest*
21627 fi
21628
21629 if eval "test \"`echo '$ac_cv_func_'vprintf`\" = yes"; then
21630   echo "$ac_t""yes" 1>&6
21631   cat >> confdefs.h <<\EOF
21632 #define HAVE_VPRINTF 1
21633 EOF
21634
21635 else
21636   echo "$ac_t""no" 1>&6
21637 fi
21638
21639 if test "$ac_cv_func_vprintf" != yes; then
21640 echo $ac_n "checking for _doprnt""... $ac_c" 1>&6
21641 echo "configure:21642: checking for _doprnt" >&5
21642 if eval "test \"\${ac_cv_func__doprnt+set}\" = set"; then
21643   echo $ac_n "(cached) $ac_c" 1>&6
21644 else
21645   cat > conftest.$ac_ext <<EOF
21646 #line 21647 "configure"
21647 #include "confdefs.h"
21648 /* System header to define __stub macros and hopefully few prototypes,
21649     which can conflict with char _doprnt(); below.  */
21650 #include <assert.h>
21651 /* Override any gcc2 internal prototype to avoid an error.  */
21652 /* We use char because int might match the return type of a gcc2
21653     builtin and then its argument prototype would still apply.  */
21654 char _doprnt();
21655 char (*f)();
21656
21657 int main() {
21658
21659 /* The GNU C library defines this for functions which it implements
21660     to always fail with ENOSYS.  Some functions are actually named
21661     something starting with __ and the normal name is an alias.  */
21662 #if defined (__stub__doprnt) || defined (__stub____doprnt)
21663 choke me
21664 #else
21665 f = _doprnt;
21666 #endif
21667
21668 ; return 0; }
21669 EOF
21670 if { (eval echo configure:21671: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21671   rm -rf conftest*
21672   eval "ac_cv_func__doprnt=yes"
21673 else
21674   echo "configure: failed program was:" >&5
21675   cat conftest.$ac_ext >&5
21676   rm -rf conftest*
21677   eval "ac_cv_func__doprnt=no"
21678 fi
21679 rm -f conftest*
21680 fi
21681
21682 if eval "test \"`echo '$ac_cv_func_'_doprnt`\" = yes"; then
21683   echo "$ac_t""yes" 1>&6
21684   cat >> confdefs.h <<\EOF
21685 #define HAVE_DOPRNT 1
21686 EOF
21687
21688 else
21689   echo "$ac_t""no" 1>&6
21690 fi
21691
21692 fi
21693
21694
21695 if test $ac_cv_func_vprintf = yes ; then
21696                 for ac_func in vsnprintf vsprintf
21697 do
21698 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21699 echo "configure:21700: checking for $ac_func" >&5
21700 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21701   echo $ac_n "(cached) $ac_c" 1>&6
21702 else
21703   cat > conftest.$ac_ext <<EOF
21704 #line 21705 "configure"
21705 #include "confdefs.h"
21706 /* System header to define __stub macros and hopefully few prototypes,
21707     which can conflict with char $ac_func(); below.  */
21708 #include <assert.h>
21709 /* Override any gcc2 internal prototype to avoid an error.  */
21710 /* We use char because int might match the return type of a gcc2
21711     builtin and then its argument prototype would still apply.  */
21712 char $ac_func();
21713 char (*f)();
21714
21715 int main() {
21716
21717 /* The GNU C library defines this for functions which it implements
21718     to always fail with ENOSYS.  Some functions are actually named
21719     something starting with __ and the normal name is an alias.  */
21720 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21721 choke me
21722 #else
21723 f = $ac_func;
21724 #endif
21725
21726 ; return 0; }
21727 EOF
21728 if { (eval echo configure:21729: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21729   rm -rf conftest*
21730   eval "ac_cv_func_$ac_func=yes"
21731 else
21732   echo "configure: failed program was:" >&5
21733   cat conftest.$ac_ext >&5
21734   rm -rf conftest*
21735   eval "ac_cv_func_$ac_func=no"
21736 fi
21737 rm -f conftest*
21738 fi
21739
21740 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21741   echo "$ac_t""yes" 1>&6
21742     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21743   cat >> confdefs.h <<EOF
21744 #define $ac_tr_func 1
21745 EOF
21746  
21747 else
21748   echo "$ac_t""no" 1>&6
21749 fi
21750 done
21751
21752 fi
21753
21754 for ac_func in \
21755         bcopy                   \
21756         closesocket             \
21757         chroot                  \
21758         endgrent                \
21759         endpwent                \
21760         fcntl                   \
21761         flock                   \
21762         getdtablesize   \
21763         getgrgid                \
21764         gethostname             \
21765         getpass                 \
21766         getpassphrase   \
21767         getpwuid                \
21768         getpwnam                \
21769         getspnam                \
21770         gettimeofday    \
21771         initgroups              \
21772         lockf                   \
21773         memcpy                  \
21774         memmove                 \
21775         mkstemp                 \
21776         mktemp                  \
21777         pipe                    \
21778         read                    \
21779         recv                    \
21780         recvfrom                \
21781         setpwfile               \
21782         setgid                  \
21783         setegid                 \
21784         setsid                  \
21785         setuid                  \
21786         seteuid                 \
21787         sigaction               \
21788         signal                  \
21789         sigset                  \
21790         strdup                  \
21791         strerror                \
21792         strpbrk                 \
21793         strrchr                 \
21794         strsep                  \
21795         strstr                  \
21796         strtol                  \
21797         strtoul                 \
21798         strspn                  \
21799         sysconf                 \
21800         usleep                  \
21801         waitpid                 \
21802         wait4                   \
21803         write                   \
21804         send                    \
21805         sendto                  \
21806
21807 do
21808 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21809 echo "configure:21810: checking for $ac_func" >&5
21810 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21811   echo $ac_n "(cached) $ac_c" 1>&6
21812 else
21813   cat > conftest.$ac_ext <<EOF
21814 #line 21815 "configure"
21815 #include "confdefs.h"
21816 /* System header to define __stub macros and hopefully few prototypes,
21817     which can conflict with char $ac_func(); below.  */
21818 #include <assert.h>
21819 /* Override any gcc2 internal prototype to avoid an error.  */
21820 /* We use char because int might match the return type of a gcc2
21821     builtin and then its argument prototype would still apply.  */
21822 char $ac_func();
21823 char (*f)();
21824
21825 int main() {
21826
21827 /* The GNU C library defines this for functions which it implements
21828     to always fail with ENOSYS.  Some functions are actually named
21829     something starting with __ and the normal name is an alias.  */
21830 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21831 choke me
21832 #else
21833 f = $ac_func;
21834 #endif
21835
21836 ; return 0; }
21837 EOF
21838 if { (eval echo configure:21839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21839   rm -rf conftest*
21840   eval "ac_cv_func_$ac_func=yes"
21841 else
21842   echo "configure: failed program was:" >&5
21843   cat conftest.$ac_ext >&5
21844   rm -rf conftest*
21845   eval "ac_cv_func_$ac_func=no"
21846 fi
21847 rm -f conftest*
21848 fi
21849
21850 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21851   echo "$ac_t""yes" 1>&6
21852     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21853   cat >> confdefs.h <<EOF
21854 #define $ac_tr_func 1
21855 EOF
21856  
21857 else
21858   echo "$ac_t""no" 1>&6
21859 fi
21860 done
21861
21862
21863 for ac_func in getopt
21864 do
21865 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
21866 echo "configure:21867: checking for $ac_func" >&5
21867 if eval "test \"\${ac_cv_func_$ac_func+set}\" = set"; then
21868   echo $ac_n "(cached) $ac_c" 1>&6
21869 else
21870   cat > conftest.$ac_ext <<EOF
21871 #line 21872 "configure"
21872 #include "confdefs.h"
21873 /* System header to define __stub macros and hopefully few prototypes,
21874     which can conflict with char $ac_func(); below.  */
21875 #include <assert.h>
21876 /* Override any gcc2 internal prototype to avoid an error.  */
21877 /* We use char because int might match the return type of a gcc2
21878     builtin and then its argument prototype would still apply.  */
21879 char $ac_func();
21880 char (*f)();
21881
21882 int main() {
21883
21884 /* The GNU C library defines this for functions which it implements
21885     to always fail with ENOSYS.  Some functions are actually named
21886     something starting with __ and the normal name is an alias.  */
21887 #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
21888 choke me
21889 #else
21890 f = $ac_func;
21891 #endif
21892
21893 ; return 0; }
21894 EOF
21895 if { (eval echo configure:21896: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21896   rm -rf conftest*
21897   eval "ac_cv_func_$ac_func=yes"
21898 else
21899   echo "configure: failed program was:" >&5
21900   cat conftest.$ac_ext >&5
21901   rm -rf conftest*
21902   eval "ac_cv_func_$ac_func=no"
21903 fi
21904 rm -f conftest*
21905 fi
21906
21907 if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
21908   echo "$ac_t""yes" 1>&6
21909     ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
21910   cat >> confdefs.h <<EOF
21911 #define $ac_tr_func 1
21912 EOF
21913  
21914 else
21915   echo "$ac_t""no" 1>&6
21916 LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}"
21917 fi
21918 done
21919
21920
21921
21922 if test "$ac_cv_func_getopt" != yes; then
21923         LIBSRCS="$LIBSRCS getopt.c"
21924 fi
21925
21926 # Check Configuration
21927 echo $ac_n "checking declaration of sys_errlist""... $ac_c" 1>&6
21928 echo "configure:21929: checking declaration of sys_errlist" >&5
21929 if eval "test \"\${ol_cv_dcl_sys_errlist+set}\" = set"; then
21930   echo $ac_n "(cached) $ac_c" 1>&6
21931 else
21932   
21933         cat > conftest.$ac_ext <<EOF
21934 #line 21935 "configure"
21935 #include "confdefs.h"
21936
21937 #include <stdio.h>
21938 #include <sys/types.h>
21939 #include <errno.h>
21940 #ifdef WINNT
21941 #include <stdlib.h>
21942 #endif 
21943 int main() {
21944 char *c = (char *) *sys_errlist
21945 ; return 0; }
21946 EOF
21947 if { (eval echo configure:21948: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
21948   rm -rf conftest*
21949   ol_cv_dcl_sys_errlist=yes
21950         ol_cv_have_sys_errlist=yes
21951 else
21952   echo "configure: failed program was:" >&5
21953   cat conftest.$ac_ext >&5
21954   rm -rf conftest*
21955   ol_cv_dcl_sys_errlist=no
21956 fi
21957 rm -f conftest*
21958 fi
21959
21960 echo "$ac_t""$ol_cv_dcl_sys_errlist" 1>&6
21961 #
21962 # It's possible (for near-UNIX clones) that sys_errlist doesn't exist
21963 if test $ol_cv_dcl_sys_errlist = no ; then
21964         cat >> confdefs.h <<\EOF
21965 #define DECL_SYS_ERRLIST 1
21966 EOF
21967
21968
21969         echo $ac_n "checking existence of sys_errlist""... $ac_c" 1>&6
21970 echo "configure:21971: checking existence of sys_errlist" >&5
21971 if eval "test \"\${ol_cv_have_sys_errlist+set}\" = set"; then
21972   echo $ac_n "(cached) $ac_c" 1>&6
21973 else
21974   
21975                 cat > conftest.$ac_ext <<EOF
21976 #line 21977 "configure"
21977 #include "confdefs.h"
21978 #include <errno.h>
21979 int main() {
21980 char *c = (char *) *sys_errlist
21981 ; return 0; }
21982 EOF
21983 if { (eval echo configure:21984: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
21984   rm -rf conftest*
21985   ol_cv_have_sys_errlist=yes
21986 else
21987   echo "configure: failed program was:" >&5
21988   cat conftest.$ac_ext >&5
21989   rm -rf conftest*
21990   ol_cv_have_sys_errlist=no
21991 fi
21992 rm -f conftest*
21993 fi
21994
21995 echo "$ac_t""$ol_cv_have_sys_errlist" 1>&6
21996 fi
21997 if test $ol_cv_have_sys_errlist = yes ; then
21998         cat >> confdefs.h <<\EOF
21999 #define HAVE_SYS_ERRLIST 1
22000 EOF
22001
22002 fi
22003
22004
22005
22006 if test "$ol_enable_debug" != no ; then
22007         cat >> confdefs.h <<\EOF
22008 #define LDAP_DEBUG 1
22009 EOF
22010
22011 fi
22012 if test "$ol_enable_syslog" = yes ; then
22013         cat >> confdefs.h <<\EOF
22014 #define LDAP_SYSLOG 1
22015 EOF
22016
22017 fi
22018 if test "$ol_enable_cache" = no ; then
22019         cat >> confdefs.h <<\EOF
22020 #define LDAP_NOCACHE 1
22021 EOF
22022
22023 fi
22024 if test "$ol_link_kbind" != no ; then
22025         cat >> confdefs.h <<\EOF
22026 #define LDAP_API_FEATURE_X_OPENLDAP_V2_KBIND LDAP_VENDOR_VERSION
22027 EOF
22028
22029 fi
22030 if test "$ol_enable_proctitle" != no ; then
22031         cat >> confdefs.h <<\EOF
22032 #define LDAP_PROCTITLE 1
22033 EOF
22034
22035 fi
22036 if test "$ol_enable_referrals" != no ; then
22037         cat >> confdefs.h <<\EOF
22038 #define LDAP_API_FEATURE_X_OPENLDAP_V2_REFERRALS LDAP_VENDOR_VERSION
22039 EOF
22040
22041 fi
22042 if test "$ol_enable_local" != no; then
22043         cat >> confdefs.h <<\EOF
22044 #define LDAP_PF_LOCAL 1
22045 EOF
22046
22047 fi
22048 if test "$ol_link_ipv6" != no; then
22049         cat >> confdefs.h <<\EOF
22050 #define LDAP_PF_INET6 1
22051 EOF
22052
22053 fi
22054 if test "$ol_enable_cleartext" != no ; then
22055         cat >> confdefs.h <<\EOF
22056 #define SLAPD_CLEARTEXT 1
22057 EOF
22058
22059 fi
22060 if test "$ol_enable_crypt" != no ; then
22061         cat >> confdefs.h <<\EOF
22062 #define SLAPD_CRYPT 1
22063 EOF
22064
22065 fi
22066 if test "$ol_link_kpasswd" != no ; then
22067         cat >> confdefs.h <<\EOF
22068 #define SLAPD_KPASSWD 1
22069 EOF
22070
22071 fi
22072 if test "$ol_link_spasswd" != no ; then
22073         cat >> confdefs.h <<\EOF
22074 #define SLAPD_SPASSWD 1
22075 EOF
22076
22077 fi
22078 if test "$ol_enable_phonetic" != no ; then
22079         cat >> confdefs.h <<\EOF
22080 #define SLAPD_PHONETIC 1
22081 EOF
22082
22083 fi
22084 if test "$ol_enable_rlookups" != no ; then
22085         cat >> confdefs.h <<\EOF
22086 #define SLAPD_RLOOKUPS 1
22087 EOF
22088
22089 fi
22090 if test "$ol_enable_aci" != no ; then
22091         cat >> confdefs.h <<\EOF
22092 #define SLAPD_ACI_ENABLED 1
22093 EOF
22094
22095 fi
22096
22097 if test "$ol_link_modules" != no ; then
22098         cat >> confdefs.h <<\EOF
22099 #define SLAPD_MODULES 1
22100 EOF
22101
22102         BUILD_SLAPD=yes
22103         SLAPD_MODULES_LDFLAGS="-dlopen self"
22104 fi
22105
22106 if test "$ol_enable_bdb" != no ; then
22107         cat >> confdefs.h <<\EOF
22108 #define SLAPD_BDB 1
22109 EOF
22110
22111         BUILD_SLAPD=yes
22112         BUILD_BDB=yes
22113         if test "$ol_with_bdb_module" != static ; then
22114                 cat >> confdefs.h <<\EOF
22115 #define SLAPD_BDB_DYNAMIC 1
22116 EOF
22117
22118                 BUILD_BDB=mod
22119                 BUILD_BDB_DYNAMIC=shared
22120                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-bdb/back_bdb.la"
22121                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-bdb"
22122         else
22123                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-bdb"
22124         fi
22125 fi
22126
22127 if test "$ol_link_dnssrv" != no ; then
22128         cat >> confdefs.h <<\EOF
22129 #define SLAPD_DNSSRV 1
22130 EOF
22131
22132         BUILD_SLAPD=yes
22133         BUILD_DNSSRV=yes
22134         if test "$ol_with_dnssrv_module" != static ; then
22135                 cat >> confdefs.h <<\EOF
22136 #define SLAPD_DNSSRV_DYNAMIC 1
22137 EOF
22138
22139                 BUILD_DNSSRV=mod
22140                 BUILD_DNSSRV_DYNAMIC=shared
22141                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-dnssrv/back_dnssrv.la"
22142                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-dnssrv"
22143         else
22144                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-dnssrv"
22145         fi
22146 fi
22147
22148 if test "$ol_enable_ldap" != no ; then
22149         cat >> confdefs.h <<\EOF
22150 #define SLAPD_LDAP 1
22151 EOF
22152
22153         BUILD_SLAPD=yes
22154         BUILD_LDAP=yes
22155         if test "$ol_with_ldap_module" != static ; then
22156                 cat >> confdefs.h <<\EOF
22157 #define SLAPD_LDAP_DYNAMIC 1
22158 EOF
22159
22160                 BUILD_LDAP=mod
22161                 BUILD_LDAP_DYNAMIC=shared
22162                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldap/back_ldap.la"
22163                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldap"
22164         else
22165                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldap"
22166         fi
22167 fi
22168
22169 if test "$ol_link_ldbm" != no -a $ol_enable_ldbm != no; then
22170         cat >> confdefs.h <<\EOF
22171 #define SLAPD_LDBM 1
22172 EOF
22173
22174         BUILD_SLAPD=yes
22175         BUILD_LDBM=yes
22176         LDBM_LIB="-lldbm"
22177         if test "$ol_with_ldbm_module" != static ; then
22178                 cat >> confdefs.h <<\EOF
22179 #define SLAPD_LDBM_DYNAMIC 1
22180 EOF
22181
22182                 BUILD_LDBM=mod
22183                 BUILD_LDBM_DYNAMIC=shared
22184                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-ldbm/back_ldbm.la"
22185                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-ldbm"
22186         else
22187                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-ldbm"
22188         fi
22189 fi
22190
22191 if test "$ol_enable_meta" != no ; then
22192         if test "$ol_enable_ldap" = no ; then
22193                 { echo "configure: error: need --enable-ldap to use --enable-meta" 1>&2; exit 1; }
22194         fi
22195         if test "$ol_enable_rewrite" = no ; then
22196                 { echo "configure: error: need --enable-rewrite to use --enable-meta" 1>&2; exit 1; }
22197         fi
22198         cat >> confdefs.h <<\EOF
22199 #define SLAPD_META 1
22200 EOF
22201
22202         BUILD_SLAPD=yes
22203         BUILD_META=yes
22204         if test "$ol_with_meta_module" != static ; then
22205                 cat >> confdefs.h <<\EOF
22206 #define SLAPD_META_DYNAMIC 1
22207 EOF
22208
22209                 BUILD_META=mod
22210                 BUILD_META_DYNAMIC=shared
22211                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-meta/back_meta.la"
22212                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-meta"
22213         else
22214                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-meta"
22215         fi
22216 fi
22217
22218 if test "$ol_enable_monitor" != no ; then
22219         cat >> confdefs.h <<\EOF
22220 #define SLAPD_MONITOR 1
22221 EOF
22222
22223         BUILD_SLAPD=yes
22224         BUILD_MONITOR=yes
22225         if test "$ol_with_monitor_module" != static ; then
22226                 cat >> confdefs.h <<\EOF
22227 #define SLAPD_MONITOR_DYNAMIC 1
22228 EOF
22229
22230                 BUILD_MONITOR=mod
22231                 BUILD_MONITOR_DYNAMIC=shared
22232                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-monitor/back_monitor.la"
22233                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-monitor"
22234         else
22235                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-monitor"
22236         fi
22237 fi
22238
22239 if test "$ol_enable_null" != no ; then
22240         cat >> confdefs.h <<\EOF
22241 #define SLAPD_NULL 1
22242 EOF
22243
22244         BUILD_SLAPD=yes
22245         BUILD_NULL=yes
22246         if test "$ol_with_null_module" != static ; then
22247                 cat >> confdefs.h <<\EOF
22248 #define SLAPD_NULL_DYNAMIC 1
22249 EOF
22250
22251                 BUILD_NULL=mod
22252                 BUILD_NULL_DYNAMIC=shared
22253                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-null/back_null.la"
22254                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-null"
22255         else
22256                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-null"
22257         fi
22258 fi
22259
22260 if test "$ol_enable_passwd" != no ; then
22261         cat >> confdefs.h <<\EOF
22262 #define SLAPD_PASSWD 1
22263 EOF
22264
22265         BUILD_SLAPD=yes
22266         BUILD_PASSWD=yes
22267         if test "$ol_with_passwd_module" != static ; then
22268                 cat >> confdefs.h <<\EOF
22269 #define SLAPD_PASSWD_DYNAMIC 1
22270 EOF
22271
22272                 BUILD_PASSWD=mod
22273                 BUILD_PASSWD_DYNAMIC=shared
22274                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-passwd/back_passwd.la"
22275                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-passwd"
22276         else
22277                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-passwd"
22278         fi
22279 fi
22280
22281 if test "$ol_link_perl" != no ; then
22282         cat >> confdefs.h <<\EOF
22283 #define SLAPD_PERL 1
22284 EOF
22285
22286         BUILD_SLAPD=yes
22287         BUILD_PERL=yes
22288         if test "$ol_with_perl_module" != static ; then
22289                 cat >> confdefs.h <<\EOF
22290 #define SLAPD_PERL_DYNAMIC 1
22291 EOF
22292
22293                 BUILD_PERL=mod
22294                 BUILD_PERL_DYNAMIC=shared
22295                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-perl/back_perl.la"
22296                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-perl"
22297         else
22298                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-perl"
22299         fi
22300 fi
22301
22302 if test "$ol_enable_shell" != no ; then
22303         cat >> confdefs.h <<\EOF
22304 #define SLAPD_SHELL 1
22305 EOF
22306
22307         BUILD_SLAPD=yes
22308         BUILD_SHELL=yes
22309         if test "$ol_with_shell_module" != static ; then
22310                 cat >> confdefs.h <<\EOF
22311 #define SLAPD_SHELL_DYNAMIC 1
22312 EOF
22313
22314                 BUILD_SHELL=mod
22315                 BUILD_SHELL_DYNAMIC=shared
22316                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-shell/back_shell.la"
22317                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-shell"
22318         else
22319                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-shell"
22320         fi
22321 fi
22322
22323 if test "$ol_enable_tcl" != no ; then
22324         cat >> confdefs.h <<\EOF
22325 #define SLAPD_TCL 1
22326 EOF
22327
22328         BUILD_SLAPD=yes
22329         BUILD_TCL=yes
22330         if test "$ol_with_tcl_module" != static; then
22331                 cat >> confdefs.h <<\EOF
22332 #define SLAPD_TCL_DYNAMIC 1
22333 EOF
22334
22335                 BUILD_TCL=mod
22336                 BUILD_TCL_DYNAMIC=shared
22337                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-tcl/back_tcl.la"
22338                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-tcl"
22339         else
22340                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-tcl"
22341         fi
22342 fi
22343
22344 if test "$ol_link_sql" != no ; then
22345         cat >> confdefs.h <<\EOF
22346 #define SLAPD_SQL 1
22347 EOF
22348
22349         BUILD_SLAPD=yes
22350         BUILD_SQL=yes
22351         if test "$ol_with_sql_module" != static; then
22352                 cat >> confdefs.h <<\EOF
22353 #define SLAPD_SQL_DYNAMIC 1
22354 EOF
22355
22356                 BUILD_SQL=mod
22357                 BUILD_SQL_DYNAMIC=shared
22358                 SLAPD_MODULES_LIST="$SLAPD_MODULES_LIST -dlopen \$(SLAP_DIR)back-sql/back_sql.la"
22359                 SLAPD_DYNAMIC_BACKENDS="$SLAPD_DYNAMIC_BACKENDS back-sql"
22360         else
22361                 SLAPD_STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS back-sql"
22362         fi
22363 fi
22364
22365 if test "$ol_enable_slurpd" != no -a "$ol_link_threads" != no -a \
22366         $BUILD_SLAPD = yes ; then
22367         BUILD_SLURPD=yes
22368 fi
22369
22370 if test "$ol_enable_rewrite" != no ; then
22371         cat >> confdefs.h <<\EOF
22372 #define ENABLE_REWRITE 1
22373 EOF
22374
22375         BUILD_REWRITE=yes
22376 fi
22377
22378
22379
22380 if test "$ac_cv_mingw32" = yes ; then
22381         PLAT=NT
22382         SLAPD_MODULES_LDFLAGS=
22383         SLAPD_MODULES_LIST=
22384 else
22385         PLAT=UNIX
22386 fi
22387
22388
22389
22390
22391
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 # Check whether --with-xxinstall or --without-xxinstall was given.
22458 if test "${with_xxinstall+set}" = set; then
22459   withval="$with_xxinstall"
22460   :
22461 fi
22462
22463
22464
22465 trap '' 1 2 15
22466
22467 trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
22468
22469 test "x$prefix" = xNONE && prefix=$ac_default_prefix
22470 # Let make expand exec_prefix.
22471 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22472
22473 # Any assignment to VPATH causes Sun make to only execute
22474 # the first set of double-colon rules, so remove it if not needed.
22475 # If there is a colon in the path, we need to keep it.
22476 if test "x$srcdir" = x.; then
22477   ac_vpsub='/^[         ]*VPATH[        ]*=[^:]*$/d'
22478 fi
22479
22480 trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
22481
22482 DEFS=-DHAVE_CONFIG_H
22483
22484 # Without the "./", some shells look in PATH for config.status.
22485 : ${CONFIG_STATUS=./config.status}
22486
22487 echo creating $CONFIG_STATUS
22488 rm -f $CONFIG_STATUS
22489 cat > $CONFIG_STATUS <<EOF
22490 #! /bin/sh
22491 # Generated automatically by configure.
22492 # Run this file to recreate the current configuration.
22493 # This directory was configured as follows,
22494 # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
22495 #
22496 # $0 $ac_configure_args
22497 #
22498 # Compiler output produced by configure, useful for debugging
22499 # configure, is in ./config.log if it exists.
22500
22501 ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
22502 for ac_option
22503 do
22504   case "\$ac_option" in
22505   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22506     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
22507     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
22508   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
22509     echo "$CONFIG_STATUS generated by autoconf version 2.13.1"
22510     exit 0 ;;
22511   -help | --help | --hel | --he | --h)
22512     echo "\$ac_cs_usage"; exit 0 ;;
22513   *) echo "\$ac_cs_usage"; exit 1 ;;
22514   esac
22515 done
22516
22517 ac_given_srcdir=$srcdir
22518 ac_given_INSTALL="$INSTALL"
22519
22520 trap 'rm -fr `echo "\
22521 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22522 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22523 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22524 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22525 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22526 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22527 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22528 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22529 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.mk \
22530 clients/mail500/Makefile:build/top.mk:clients/mail500/Makefile.in:build/rules.mk \
22531 clients/ud/Makefile:build/top.mk:clients/ud/Makefile.in:build/rules.mk \
22532 clients/maildap/Makefile:build/top.mk:clients/maildap/Makefile.in:build/rules.mk \
22533 clients/tools/Makefile:build/top.mk:clients/tools/Makefile.in:build/rules.mk \
22534 include/Makefile:build/top.mk:include/Makefile.in \
22535 libraries/Makefile:build/top.mk:libraries/Makefile.in:build/dir.mk      \
22536 libraries/libavl/Makefile:build/top.mk:libraries/libavl/Makefile.in:build/lib.mk:build/lib-static.mk    \
22537 libraries/liblber/Makefile:build/top.mk:libraries/liblber/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22538 libraries/libldap/Makefile:build/top.mk:libraries/libldap/Makefile.in:build/lib.mk:build/lib-shared.mk  \
22539 libraries/libldap_r/Makefile:build/top.mk:libraries/libldap_r/Makefile.in:build/lib.mk:build/lib-shared.mk      \
22540 libraries/libldbm/Makefile:build/top.mk:libraries/libldbm/Makefile.in:build/lib.mk:build/lib-static.mk  \
22541 libraries/libldif/Makefile:build/top.mk:libraries/libldif/Makefile.in:build/lib.mk:build/lib-static.mk  \
22542 libraries/liblunicode/Makefile:build/top.mk:libraries/liblunicode/Makefile.in:build/lib.mk:build/lib-static.mk  \
22543 libraries/liblutil/Makefile:build/top.mk:libraries/liblutil/Makefile.in:build/lib.mk:build/lib-static.mk        \
22544 libraries/librewrite/Makefile:build/top.mk:libraries/librewrite/Makefile.in:build/lib.mk:build/lib-static.mk \
22545 servers/Makefile:build/top.mk:servers/Makefile.in:build/dir.mk \
22546 servers/slapd/Makefile:build/top.mk:servers/slapd/Makefile.in:build/srv.mk \
22547 servers/slapd/back-bdb/Makefile:build/top.mk:servers/slapd/back-bdb/Makefile.in:build/mod.mk \
22548 servers/slapd/back-dnssrv/Makefile:build/top.mk:servers/slapd/back-dnssrv/Makefile.in:build/mod.mk \
22549 servers/slapd/back-ldap/Makefile:build/top.mk:servers/slapd/back-ldap/Makefile.in:build/mod.mk \
22550 servers/slapd/back-ldbm/Makefile:build/top.mk:servers/slapd/back-ldbm/Makefile.in:build/mod.mk \
22551 servers/slapd/back-meta/Makefile:build/top.mk:servers/slapd/back-meta/Makefile.in:build/mod.mk \
22552 servers/slapd/back-monitor/Makefile:build/top.mk:servers/slapd/back-monitor/Makefile.in:build/mod.mk \
22553 servers/slapd/back-null/Makefile:build/top.mk:servers/slapd/back-null/Makefile.in:build/mod.mk \
22554 servers/slapd/back-passwd/Makefile:build/top.mk:servers/slapd/back-passwd/Makefile.in:build/mod.mk \
22555 servers/slapd/back-perl/Makefile:build/top.mk:servers/slapd/back-perl/Makefile.in:build/mod.mk \
22556 servers/slapd/back-shell/Makefile:build/top.mk:servers/slapd/back-shell/Makefile.in:build/mod.mk \
22557 servers/slapd/back-sql/Makefile:build/top.mk:servers/slapd/back-sql/Makefile.in:build/mod.mk \
22558 servers/slapd/back-tcl/Makefile:build/top.mk:servers/slapd/back-tcl/Makefile.in:build/mod.mk \
22559 servers/slapd/shell-backends/Makefile:build/top.mk:servers/slapd/shell-backends/Makefile.in:build/srv.mk \
22560 servers/slapd/tools/Makefile:build/top.mk:servers/slapd/tools/Makefile.in \
22561 servers/slurpd/Makefile:build/top.mk:servers/slurpd/Makefile.in:build/srv.mk \
22562 tests/Makefile:build/top.mk:tests/Makefile.in:build/dir.mk \
22563 tests/progs/Makefile:build/top.mk:tests/progs/Makefile.in:build/rules.mk \
22564  include/portable.h include/ldap_features.h include/lber_types.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
22565 EOF
22566 cat >> $CONFIG_STATUS <<EOF
22567
22568 # Protect against being on the right side of a sed subst in config.status.
22569 sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
22570  s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
22571 $ac_vpsub
22572 $extrasub
22573 s%@SHELL@%$SHELL%g
22574 s%@CFLAGS@%$CFLAGS%g
22575 s%@CPPFLAGS@%$CPPFLAGS%g
22576 s%@CXXFLAGS@%$CXXFLAGS%g
22577 s%@FFLAGS@%$FFLAGS%g
22578 s%@DEFS@%$DEFS%g
22579 s%@LDFLAGS@%$LDFLAGS%g
22580 s%@LIBS@%$LIBS%g
22581 s%@exec_prefix@%$exec_prefix%g
22582 s%@prefix@%$prefix%g
22583 s%@program_transform_name@%$program_transform_name%g
22584 s%@bindir@%$bindir%g
22585 s%@sbindir@%$sbindir%g
22586 s%@libexecdir@%$libexecdir%g
22587 s%@datadir@%$datadir%g
22588 s%@sysconfdir@%$sysconfdir%g
22589 s%@sharedstatedir@%$sharedstatedir%g
22590 s%@localstatedir@%$localstatedir%g
22591 s%@libdir@%$libdir%g
22592 s%@includedir@%$includedir%g
22593 s%@oldincludedir@%$oldincludedir%g
22594 s%@infodir@%$infodir%g
22595 s%@mandir@%$mandir%g
22596 s%@host@%$host%g
22597 s%@host_alias@%$host_alias%g
22598 s%@host_cpu@%$host_cpu%g
22599 s%@host_vendor@%$host_vendor%g
22600 s%@host_os@%$host_os%g
22601 s%@target@%$target%g
22602 s%@target_alias@%$target_alias%g
22603 s%@target_cpu@%$target_cpu%g
22604 s%@target_vendor@%$target_vendor%g
22605 s%@target_os@%$target_os%g
22606 s%@build@%$build%g
22607 s%@build_alias@%$build_alias%g
22608 s%@build_cpu@%$build_cpu%g
22609 s%@build_vendor@%$build_vendor%g
22610 s%@build_os@%$build_os%g
22611 s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
22612 s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
22613 s%@INSTALL_DATA@%$INSTALL_DATA%g
22614 s%@PACKAGE@%$PACKAGE%g
22615 s%@VERSION@%$VERSION%g
22616 s%@ACLOCAL@%$ACLOCAL%g
22617 s%@AUTOCONF@%$AUTOCONF%g
22618 s%@AUTOMAKE@%$AUTOMAKE%g
22619 s%@AUTOHEADER@%$AUTOHEADER%g
22620 s%@MAKEINFO@%$MAKEINFO%g
22621 s%@install_sh@%$install_sh%g
22622 s%@AMTAR@%$AMTAR%g
22623 s%@AWK@%$AWK%g
22624 s%@AMTARFLAGS@%$AMTARFLAGS%g
22625 s%@SET_MAKE@%$SET_MAKE%g
22626 s%@OPENLDAP_LIBVERSION@%$OPENLDAP_LIBVERSION%g
22627 s%@top_builddir@%$top_builddir%g
22628 s%@ldap_subdir@%$ldap_subdir%g
22629 s%@CC@%$CC%g
22630 s%@AR@%$AR%g
22631 s%@LN_S@%$LN_S%g
22632 s%@OBJEXT@%$OBJEXT%g
22633 s%@EXEEXT@%$EXEEXT%g
22634 s%@ECHO@%$ECHO%g
22635 s%@RANLIB@%$RANLIB%g
22636 s%@STRIP@%$STRIP%g
22637 s%@DLLTOOL@%$DLLTOOL%g
22638 s%@AS@%$AS%g
22639 s%@OBJDUMP@%$OBJDUMP%g
22640 s%@CPP@%$CPP%g
22641 s%@LIBTOOL@%$LIBTOOL%g
22642 s%@LN_H@%$LN_H%g
22643 s%@SENDMAIL@%$SENDMAIL%g
22644 s%@EDITOR@%$EDITOR%g
22645 s%@FINGER@%$FINGER%g
22646 s%@PERLBIN@%$PERLBIN%g
22647 s%@OL_MKDEP@%$OL_MKDEP%g
22648 s%@OL_MKDEP_FLAGS@%$OL_MKDEP_FLAGS%g
22649 s%@LIBOBJS@%$LIBOBJS%g
22650 s%@LIBSRCS@%$LIBSRCS%g
22651 s%@PLAT@%$PLAT%g
22652 s%@BUILD_LIBS_DYNAMIC@%$BUILD_LIBS_DYNAMIC%g
22653 s%@BUILD_SLAPD@%$BUILD_SLAPD%g
22654 s%@BUILD_BDB@%$BUILD_BDB%g
22655 s%@BUILD_DNSSRV@%$BUILD_DNSSRV%g
22656 s%@BUILD_LDAP@%$BUILD_LDAP%g
22657 s%@BUILD_LDBM@%$BUILD_LDBM%g
22658 s%@BUILD_META@%$BUILD_META%g
22659 s%@BUILD_MONITOR@%$BUILD_MONITOR%g
22660 s%@BUILD_NULL@%$BUILD_NULL%g
22661 s%@BUILD_PASSWD@%$BUILD_PASSWD%g
22662 s%@BUILD_PERL@%$BUILD_PERL%g
22663 s%@BUILD_SHELL@%$BUILD_SHELL%g
22664 s%@BUILD_SQL@%$BUILD_SQL%g
22665 s%@BUILD_TCL@%$BUILD_TCL%g
22666 s%@BUILD_BDB_DYNAMIC@%$BUILD_BDB_DYNAMIC%g
22667 s%@BUILD_DNSSRV_DYNAMIC@%$BUILD_DNSSRV_DYNAMIC%g
22668 s%@BUILD_LDAP_DYNAMIC@%$BUILD_LDAP_DYNAMIC%g
22669 s%@BUILD_LDBM_DYNAMIC@%$BUILD_LDBM_DYNAMIC%g
22670 s%@BUILD_META_DYNAMIC@%$BUILD_META_DYNAMIC%g
22671 s%@BUILD_MONITOR_DYNAMIC@%$BUILD_MONITOR_DYNAMIC%g
22672 s%@BUILD_NULL_DYNAMIC@%$BUILD_NULL_DYNAMIC%g
22673 s%@BUILD_PASSWD_DYNAMIC@%$BUILD_PASSWD_DYNAMIC%g
22674 s%@BUILD_PERL_DYNAMIC@%$BUILD_PERL_DYNAMIC%g
22675 s%@BUILD_SHELL_DYNAMIC@%$BUILD_SHELL_DYNAMIC%g
22676 s%@BUILD_SQL_DYNAMIC@%$BUILD_SQL_DYNAMIC%g
22677 s%@BUILD_TCL_DYNAMIC@%$BUILD_TCL_DYNAMIC%g
22678 s%@BUILD_SLURPD@%$BUILD_SLURPD%g
22679 s%@LDBM_LIB@%$LDBM_LIB%g
22680 s%@LDAP_LIBS@%$LDAP_LIBS%g
22681 s%@LDIF_LIBS@%$LDIF_LIBS%g
22682 s%@SLAPD_LIBS@%$SLAPD_LIBS%g
22683 s%@SLURPD_LIBS@%$SLURPD_LIBS%g
22684 s%@LDBM_LIBS@%$LDBM_LIBS%g
22685 s%@LTHREAD_LIBS@%$LTHREAD_LIBS%g
22686 s%@LUTIL_LIBS@%$LUTIL_LIBS%g
22687 s%@WRAP_LIBS@%$WRAP_LIBS%g
22688 s%@MOD_TCL_LIB@%$MOD_TCL_LIB%g
22689 s%@SLAPD_MODULES_CPPFLAGS@%$SLAPD_MODULES_CPPFLAGS%g
22690 s%@SLAPD_MODULES_LDFLAGS@%$SLAPD_MODULES_LDFLAGS%g
22691 s%@SLAPD_MODULES_LIST@%$SLAPD_MODULES_LIST%g
22692 s%@SLAPD_STATIC_BACKENDS@%$SLAPD_STATIC_BACKENDS%g
22693 s%@SLAPD_DYNAMIC_BACKENDS@%$SLAPD_DYNAMIC_BACKENDS%g
22694 s%@PERL_CPPFLAGS@%$PERL_CPPFLAGS%g
22695 s%@SLAPD_PERL_LDFLAGS@%$SLAPD_PERL_LDFLAGS%g
22696 s%@MOD_PERL_LDFLAGS@%$MOD_PERL_LDFLAGS%g
22697 s%@KRB4_LIBS@%$KRB4_LIBS%g
22698 s%@KRB5_LIBS@%$KRB5_LIBS%g
22699 s%@READLINE_LIBS@%$READLINE_LIBS%g
22700 s%@SASL_LIBS@%$SASL_LIBS%g
22701 s%@TERMCAP_LIBS@%$TERMCAP_LIBS%g
22702 s%@TLS_LIBS@%$TLS_LIBS%g
22703 s%@MODULES_LIBS@%$MODULES_LIBS%g
22704 s%@AUTH_LIBS@%$AUTH_LIBS%g
22705 s%@SLAPD_SLP_LIBS@%$SLAPD_SLP_LIBS%g
22706 s%@SLAPD_SQL_LDFLAGS@%$SLAPD_SQL_LDFLAGS%g
22707 s%@SLAPD_SQL_LIBS@%$SLAPD_SQL_LIBS%g
22708 s%@SLAPD_SQL_INCLUDES@%$SLAPD_SQL_INCLUDES%g
22709
22710 CEOF
22711 EOF
22712
22713 cat >> $CONFIG_STATUS <<\EOF
22714
22715 # Split the substitutions into bite-sized pieces for seds with
22716 # small command number limits, like on Digital OSF/1 and HP-UX.
22717 ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
22718 ac_file=1 # Number of current file.
22719 ac_beg=1 # First line for current file.
22720 ac_end=$ac_max_sed_cmds # Line after last line for current file.
22721 ac_more_lines=:
22722 ac_sed_cmds=""
22723 while $ac_more_lines; do
22724   if test $ac_beg -gt 1; then
22725     sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
22726   else
22727     sed "${ac_end}q" conftest.subs > conftest.s$ac_file
22728   fi
22729   if test ! -s conftest.s$ac_file; then
22730     ac_more_lines=false
22731     rm -f conftest.s$ac_file
22732   else
22733     if test -z "$ac_sed_cmds"; then
22734       ac_sed_cmds="sed -f conftest.s$ac_file"
22735     else
22736       ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
22737     fi
22738     ac_file=`expr $ac_file + 1`
22739     ac_beg=$ac_end
22740     ac_end=`expr $ac_end + $ac_max_sed_cmds`
22741   fi
22742 done
22743 if test -z "$ac_sed_cmds"; then
22744   ac_sed_cmds=cat
22745 fi
22746 EOF
22747
22748 cat >> $CONFIG_STATUS <<EOF
22749
22750 CONFIG_FILES=\${CONFIG_FILES-"\
22751 Makefile:build/top.mk:Makefile.in:build/dir.mk \
22752 doc/Makefile:build/top.mk:doc/Makefile.in:build/dir.mk \
22753 doc/man/Makefile:build/top.mk:doc/man/Makefile.in:build/dir.mk \
22754 doc/man/man1/Makefile:build/top.mk:doc/man/man1/Makefile.in:build/man.mk \
22755 doc/man/man3/Makefile:build/top.mk:doc/man/man3/Makefile.in:build/man.mk \
22756 doc/man/man5/Makefile:build/top.mk:doc/man/man5/Makefile.in:build/man.mk \
22757 doc/man/man8/Makefile:build/top.mk:doc/man/man8/Makefile.in:build/man.mk \
22758 clients/Makefile:build/top.mk:clients/Makefile.in:build/dir.mk \
22759 clients/finger/Makefile:build/top.mk:clients/finger/Makefile.in:build/rules.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